![]() |
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
Definition at line 41 of file gui_module_api.h.
| char* dt_gui_module_t::accel_path |
Definition at line 63 of file gui_module_api.h.
| gboolean dt_gui_module_t::deprecated |
this module will not appear in view for new edits
Definition at line 56 of file gui_module_api.h.
| 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. |
Definition at line 61 of file gui_module_api.h.
| char* dt_gui_module_t::instance_name |
Definition at line 50 of file gui_module_api.h.
| char* dt_gui_module_t::name |
translated name of the module
Definition at line 48 of file gui_module_api.h.
| char* dt_gui_module_t::view |
translated name of the view
Definition at line 53 of file gui_module_api.h.
Referenced by dt_lib_cleanup().
| GList* dt_gui_module_t::widget_list |
Definition at line 44 of file gui_module_api.h.
Referenced by _add_widget_to_module_list().
| GList* dt_gui_module_t::widget_list_bh |
Definition at line 45 of file gui_module_api.h.