![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
The dt_gui_module_t type is the intersection between a dt_lib_module_t and a dt_iop_module_t structure. It acts as an abstract class from which we can connect to the common fields of both structures, for the sake of blindly connecting bauhaus widgets without inheriting modules. Indeed, modules need to inheritate the bauhaus API to instanciate its widgets. But then, if the bauhaus API also inheritates modules, the circular dependency becomes a mess. This allows to reference parent modules in bauhaus widget without inheriting their API, and without caring if the parent is a dt_iop_module_t or a dt_lib_module_t. More...
#include <gui_module_api.h>
Collaboration diagram for dt_gui_module_t:Data Fields | |
| GList * | widget_list |
| GList * | widget_list_bh |
| char * | name |
| char * | instance_name |
| char * | view |
| gboolean | deprecated |
| int(* | focus )(dt_gui_module_t *module, gboolean toggle) |
| char * | accel_path |
The dt_gui_module_t type is the intersection between a dt_lib_module_t and a dt_iop_module_t structure. It acts as an abstract class from which we can connect to the common fields of both structures, for the sake of blindly connecting bauhaus widgets without inheriting modules. Indeed, modules need to inheritate the bauhaus API to instanciate its widgets. But then, if the bauhaus API also inheritates modules, the circular dependency becomes a mess. This allows to reference parent modules in bauhaus widget without inheriting their API, and without caring if the parent is a dt_iop_module_t or a dt_lib_module_t.
The beginning of both structures needs to match exactly this abstract class, so we can cast them when needed.
Warning: keep in sync with the number and order of elements in libs/lib.h and develop/imageop.h
| char* dt_gui_module_t::accel_path |
Referenced by dt_iop_gui_cleanup_module(), and dt_iop_gui_init().
| gboolean dt_gui_module_t::deprecated |
this module will not appear in view for new edits
| int(* dt_gui_module_t::focus) (dt_gui_module_t *module, gboolean toggle) |
give focus to the current module and adapt other parts of the GUI if needed
| toggle | if TRUE, adopt a show/hide behaviour. Otherwise, always show. |
| char* dt_gui_module_t::instance_name |
Referenced by _iop_panel_label().
| char* dt_gui_module_t::name |
translated name of the module
| char* dt_gui_module_t::view |
translated name of the view
| GList* dt_gui_module_t::widget_list |
Referenced by _add_widget_to_module_list().
| GList* dt_gui_module_t::widget_list_bh |