Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
dt_gui_module_t Struct Reference

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)
 
void(* ensure_visible )(dt_gui_module_t *module)
 
char * accel_path
 

Detailed Description

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 42 of file gui_module_api.h.

Field Documentation

◆ accel_path

char* dt_gui_module_t::accel_path

Definition at line 72 of file gui_module_api.h.

Referenced by dt_iop_gui_cleanup_module(), and dt_iop_gui_init().

◆ deprecated

gboolean dt_gui_module_t::deprecated

this module will not appear in view for new edits

Definition at line 57 of file gui_module_api.h.

◆ ensure_visible

void(* dt_gui_module_t::ensure_visible) (dt_gui_module_t *module)

make the module's own container visible so a widget inside it can take focus.

Expanding a collapsed IOP, and dropping stale focus first, is module-type-specific – gui/bauhaus.c used to reach into develop/ for dt_iop_gui_set_expanded() and dt_iop_request_focus() to do it. Optional: NULL means nothing needs doing.

Definition at line 70 of file gui_module_api.h.

◆ focus

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

Parameters
toggleif TRUE, adopt a show/hide behaviour. Otherwise, always show.

Definition at line 62 of file gui_module_api.h.

◆ instance_name

char* dt_gui_module_t::instance_name

Definition at line 51 of file gui_module_api.h.

Referenced by _iop_panel_label(), and dt_iop_gui_cleanup_module().

◆ name

char* dt_gui_module_t::name

translated name of the module

Definition at line 49 of file gui_module_api.h.

Referenced by dt_iop_cleanup_module().

◆ view

char* dt_gui_module_t::view

translated name of the view

Definition at line 54 of file gui_module_api.h.

Referenced by dt_iop_cleanup_module(), and dt_lib_cleanup().

◆ widget_list

GList* dt_gui_module_t::widget_list

Definition at line 45 of file gui_module_api.h.

Referenced by _add_widget_to_module_list().

◆ widget_list_bh

GList* dt_gui_module_t::widget_list_bh

Definition at line 46 of file gui_module_api.h.


The documentation for this struct was generated from the following file: