![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "widgets/container.h"#include "common/telemetry.h"#include "common/sentry.h"#include "widgets/gdkkeys.h"#include "widgets/popup.h"#include "gui/application.h"#include "widgets/accelerators.h"#include "common/collection.h"#include "common/hash.h"#include "common/module.h"#include "common/module_versioning.h"#include "common/usermanual_url.h"#include "control/control.h"#include "control/signal.h"#include "database/history_repository.h"#include "database/preset_repository.h"#include "develop/blend.h"#include "develop/blend_gui.h"#include "develop/gui_throttle.h"#include "develop/masks_gui.h"#include "develop/dev_pixelpipe.h"#include "gui/presets.h"#include "widgets/expander.h"#include "widgets/label.h"#include "widgets/widget_settings.h"#include "widgets/widget_style.h"#include "history/notify.h"#include "develop/imageop_gui.h"#include "develop/dev_history.h"#include "develop/develop.h"#include "widgets/resetlabel.h"#include "common/conf.h"#include "develop/imageop.h"#include "widgets/bauhaus.h"#include "widgets/button.h"#include "system/macros.h"#include "system/mem_alloc.h"#include "common/utility.h"#include <assert.h>#include <math.h>#include <stdlib.h>#include <string.h>#include <time.h>#include "widgets/togglebutton.h"
Include dependency graph for imageop_gui.c:Go to the source code of this file.
Data Structures | |
| struct | dt_module_param_t |
| struct | dt_iop_reset_label_t |
Macros | |
| #define | DT_IOP_HEADER_MENU_OPEN "dt-module-header-menu-open" |
| #define | DT_IOP_HEADER_MENU_DISMISS_CLICK "dt-module-header-menu-dismiss-click" |
| #define | DT_IOP_HEADER_IGNORE_RELEASE "dt-module-header-ignore-release" |
Typedefs | |
| typedef struct dt_module_param_t | dt_module_param_t |
| typedef struct dt_iop_reset_label_t | dt_iop_reset_label_t |
Definition at line 55 of file imageop_gui.c.
Definition at line 53 of file imageop_gui.c.
Definition at line 52 of file imageop_gui.c.
|
static |
Definition at line 108 of file imageop_gui.c.
References IS_NULL_PTR, and L.
Referenced by dt_bauhaus_toggle_from_params(), dt_iop_button_new(), and dt_iop_togglebutton_new().
|
static |
Definition at line 1632 of file imageop_gui.c.
References DT_DEV_PIXELPIPE_DISPLAY_NONE, dt_dev_pixelpipe_update_history_main, dt_gui_freeze_begin, dt_gui_freeze_end, dt_gui_widgets_suppressed(), dt_iop_request_focus(), dt_iop_set_cache_bypass(), FALSE, and L.
Referenced by dt_iop_gui_set_expander().
Definition at line 676 of file imageop_gui.c.
References _rename_module_idle(), IS_NULL_PTR, and L.
Referenced by _gui_multiinstance_callback().
|
static |
Definition at line 438 of file imageop_gui.c.
References dt_develop_t::alliop, dt_control_queue_redraw_center(), dt_dev_module_remove(), dt_dev_pixelpipe_rebuild_all, dt_dev_undo_end_record(), dt_dev_undo_start_record(), dt_dev_write_history(), dt_gui_freeze_begin, dt_gui_freeze_end, dt_gui_refocus_center(), dt_iop_gui_cleanup_module(), dt_iop_is_hidden(), dt_iop_request_focus(), dt_iop_update_multi_priority(), FALSE, dt_develop_t::gui_attached, dt_develop_t::gui_module, dt_develop_t::history, IS_NULL_PTR, L, and dt_dev_history_item_t::multi_priority.
Referenced by _gui_multiinstance_callback().
Definition at line 684 of file imageop_gui.c.
References _rename_module_idle(), IS_NULL_PTR, and L.
Referenced by _gui_multiinstance_callback().
|
static |
Definition at line 826 of file imageop_gui.c.
References _gui_copy_callback(), _gui_delete_callback(), _gui_duplicate_callback(), _gui_rename_callback(), _iop_plugin_header_menu_deactivate(), dt_gui_menu_popup(), DT_IOP_HEADER_MENU_OPEN, DTGTK_BUTTON, dtgtk_button_set_active(), FALSE, IOP_FLAGS_ONE_INSTANCE, IS_NULL_PTR, L, and TRUE.
Referenced by dt_iop_gui_set_expander().
Definition at line 882 of file imageop_gui.c.
References dt_dev_add_history_item, dt_free, dt_gui_widgets_suppressed(), dt_history_item_get_name(), dt_sentry_record_module_usage(), dt_telemetry_record_module_usage(), FALSE, L, tooltip, and TRUE.
Referenced by dt_iop_gui_set_expander().
|
static |
Definition at line 795 of file imageop_gui.c.
References dt_iop_gui_rename_module(), and L.
Referenced by _gui_multiinstance_callback().
|
static |
Definition at line 1213 of file imageop_gui.c.
References dt_control_signal_get_global(), DT_DEBUG_CONTROL_SIGNAL_RAISE, dt_dev_add_history_item, dt_gui_presets_autoapply_for_module(), dt_iop_color_picker_reset(), dt_iop_commit_blend_params(), dt_iop_gui_blending_lose_focus(), dt_iop_gui_reset(), dt_iop_gui_update(), dt_iop_reload_defaults(), DT_MASKS_EVENT_RESET, dt_masks_form_delete(), dt_masks_get_from_id(), dt_modifier_is(), DT_PRIMARY_MASK, DT_SIGNAL_MASK_CHANGED, FALSE, L, and TRUE.
Referenced by dt_iop_gui_set_expander().
|
static |
Definition at line 1379 of file imageop_gui.c.
References dt_conf_set_bool(), dt_control_queue_redraw_center(), dt_gui_add_class(), dt_gui_get_ui(), dt_gui_remove_class(), dt_iop_request_focus(), dt_ui_container_focus_widget(), DT_UI_CONTAINER_SIZE, DTGTK_EXPANDER, dtgtk_expander_set_expanded(), IS_NULL_PTR, k, and L.
Referenced by dt_iop_gui_duplicate(), and dt_iop_gui_set_expanded().
Definition at line 413 of file imageop_gui.c.
References blend_color_picker_apply(), DT_DEBUG_DEV, dt_iop_color_picker_get_ready_data(), dt_print(), IS_NULL_PTR, L, piece, and pipe.
Referenced by dt_iop_gui_cleanup_module(), and dt_iop_gui_init().
| void _iop_dim_all_but | ( | dt_iop_module_t * | module, |
| gboolean | dim | ||
| ) |
Dim all modules except the one referenced, if any reference, or undim all
Definition at line 1426 of file imageop_gui.c.
References dt_dev_get_global(), dt_gui_add_class(), dt_gui_remove_class(), dt_iop_gui_get_pluginui(), IS_NULL_PTR, L, and m.
Referenced by dt_iop_gui_set_expanded().
Clear GUI pointers that still reference one iop widget being finalized.
| user_data | iop module owner. |
| where_the_object_was | finalized widget address. |
Definition at line 1072 of file imageop_gui.c.
References dt_gui_get_global(), IS_NULL_PTR, L, dt_gui_gtk_t::scroll_to, and dt_gui_gtk_t::scroll_to_header_once.
Referenced by dt_iop_gui_set_expander().
|
static |
Definition at line 433 of file imageop_gui.c.
Referenced by dt_iop_gui_cleanup_module(), and dt_iop_gui_init().
|
static |
Definition at line 924 of file imageop_gui.c.
References _iop_plugin_focus_accel(), delete_underscore(), dt_accels_build_path(), dt_accels_new_virtual_instance_shortcut(), dt_accels_remove_shortcut(), dt_capitalize_label(), dt_free, dt_gui_container_nth_child(), dt_gui_get_accels(), dt_history_item_get_label(), IOP_MODULE_LABEL, and L.
Referenced by dt_iop_gui_update_header().
|
static |
Definition at line 1468 of file imageop_gui.c.
References _presets_popup_callback(), dt_iop_request_focus(), dt_widget_set_scroll_focus(), FALSE, L, and TRUE.
Referenced by dt_iop_gui_set_expander().
|
static |
Definition at line 1523 of file imageop_gui.c.
References dt_dev_add_history_item, dt_iop_gui_set_expanded(), dt_iop_request_focus(), FALSE, IS_NULL_PTR, L, and TRUE.
Referenced by dt_iop_gui_init().
|
static |
Definition at line 1507 of file imageop_gui.c.
References IS_NULL_PTR, L, and TRUE.
Referenced by _iop_panel_label(), and dt_iop_gui_init().
|
static |
Definition at line 1491 of file imageop_gui.c.
References FALSE, IS_NULL_PTR, and L.
Referenced by dt_iop_gui_set_expander().
|
static |
Definition at line 1549 of file imageop_gui.c.
References _presets_popup_callback(), dt_iop_gui_rename_module(), DT_IOP_HEADER_IGNORE_RELEASE, DT_IOP_HEADER_MENU_DISMISS_CLICK, DT_IOP_HEADER_MENU_OPEN, dt_modifier_is(), DT_PRIMARY_MASK, dt_widget_set_scroll_focus(), FALSE, IS_NULL_PTR, L, and TRUE.
Referenced by dt_iop_gui_set_expander().
|
static |
Definition at line 1593 of file imageop_gui.c.
References dt_iop_gui_set_expanded(), DT_IOP_HEADER_IGNORE_RELEASE, DT_IOP_HEADER_MENU_DISMISS_CLICK, DT_IOP_HEADER_MENU_OPEN, dt_iop_request_focus(), dt_modifier_is(), FALSE, IS_NULL_PTR, L, and TRUE.
Referenced by dt_iop_gui_set_expander().
|
static |
Definition at line 1498 of file imageop_gui.c.
References FALSE, L, and TRUE.
Referenced by dt_iop_gui_set_expander().
Keep the dismiss-click marker until the next main-loop pass. GTK first deactivates the menu, then may deliver the same pointer event to the module header underneath. That event closes the menu only; it must not also toggle the expander state.
Definition at line 810 of file imageop_gui.c.
References _iop_plugin_header_menu_dismiss_idle(), DT_IOP_HEADER_MENU_DISMISS_CLICK, DT_IOP_HEADER_MENU_OPEN, L, and TRUE.
Referenced by _gui_multiinstance_callback(), and _presets_popup_callback().
|
static |
Definition at line 800 of file imageop_gui.c.
References DT_IOP_HEADER_MENU_DISMISS_CLICK, and L.
Referenced by _iop_plugin_header_menu_deactivate().
Definition at line 2223 of file imageop_gui.c.
References d, dt_dev_add_history_item, dt_dev_get_global(), FALSE, IS_NULL_PTR, L, and TRUE.
Referenced by dt_iop_gui_reset_label_new().
|
static |
Definition at line 90 of file imageop_gui.c.
References dt_gui_widgets_suppressed(), dt_iop_gui_changed(), L, and dt_module_param_t::param.
Referenced by dt_bauhaus_toggle_from_params().
| gboolean _iop_tooltip_callback | ( | GtkWidget * | widget, |
| gint | x, | ||
| gint | y, | ||
| gboolean | keyboard_mode, | ||
| GtkTooltip * | tooltip, | ||
| gpointer | user_data | ||
| ) |
Definition at line 1786 of file imageop_gui.c.
References dt_gui_add_class(), DT_GUI_BOX_SPACING, DT_PIXEL_APPLY_DPI, FALSE, IS_NULL_PTR, k, L, tooltip, and TRUE.
Referenced by dt_iop_gui_set_expander().
|
static |
Definition at line 1663 of file imageop_gui.c.
References dt_develop_blend_get_mask_usage(), FALSE, IS_NULL_PTR, L, and top.
Referenced by _mask_indicator_tooltip(), and dt_iop_add_remove_mask_indicator().
|
static |
Definition at line 1701 of file imageop_gui.c.
References _mask_indicator_get_usage(), dt_free, dt_history_item_get_name(), FALSE, L, res, tooltip, TRUE, type, void(), and x.
Referenced by dt_iop_gui_set_expander().
|
static |
Definition at line 1257 of file imageop_gui.c.
References _iop_plugin_header_menu_deactivate(), dt_gui_get_global(), dt_gui_menu_popup(), dt_gui_presets_popup_menu_show_for_module(), DT_IOP_HEADER_MENU_OPEN, IS_NULL_PTR, L, and TRUE.
Referenced by _iop_plugin_body_button_press(), _iop_plugin_header_button_press(), and dt_iop_gui_set_expander().
|
static |
Rename a freshly-created module after GTK has finished the menu activation.
The copy/duplicate actions create and show a new expander while the multi-instance menu is still unwinding its activation path. Starting the in-place editor immediately can lose the entry focus to the menu teardown, so we wait for the next main-loop idle before installing the entry in the new module header.
Definition at line 668 of file imageop_gui.c.
References dt_iop_gui_rename_module(), and L.
Referenced by _gui_copy_callback(), and _gui_duplicate_callback().
|
static |
Definition at line 692 of file imageop_gui.c.
References _rename_module_key_press(), dt_dev_add_history_item, dt_iop_gui_update_header(), dt_keys_mainpad_alternatives(), dt_masks_group_update_name(), FALSE, key, L, name, and TRUE.
Referenced by _rename_module_key_press(), and dt_iop_gui_rename_module().
|
static |
Definition at line 745 of file imageop_gui.c.
References L, state, TRUE, and width.
Referenced by dt_iop_gui_rename_module().
| GtkWidget * dt_bauhaus_combobox_from_params | ( | dt_iop_module_t * | self, |
| const char * | param | ||
| ) |
Definition at line 222 of file imageop_gui.c.
References dt_bauhaus_combobox_add(), dt_bauhaus_combobox_add_full(), DT_BAUHAUS_COMBOBOX_ALIGN_RIGHT, dt_bauhaus_combobox_new(), dt_bauhaus_get_global(), DT_BAUHAUS_WIDGET, dt_bauhaus_widget_set_field(), dt_bauhaus_widget_set_label(), dt_free, DT_GUI_BOX_SPACING, DT_GUI_MODULE, DT_INTROSPECTION_TYPE_BOOL, DT_INTROSPECTION_TYPE_ENUM, DT_INTROSPECTION_TYPE_INT, DT_INTROSPECTION_TYPE_UINT, dt_util_str_replace(), f, FALSE, dt_iop_module_t::gui, IS_NULL_PTR, L, p, param, dt_iop_module_t::params, dt_iop_module_t::so, TRUE, dt_bauhaus_widget_t::use_default_callback, and dt_iop_module_gui_t::widget.
Referenced by gui_init(), and gui_init().
| GtkWidget * dt_bauhaus_slider_from_params | ( | dt_iop_module_t * | self, |
| const char * | param | ||
| ) |
Definition at line 117 of file imageop_gui.c.
References d, dt_iop_module_t::default_params, dt_bauhaus_get_global(), dt_bauhaus_slider_new(), dt_bauhaus_slider_new_with_range_and_feedback(), DT_BAUHAUS_WIDGET, dt_bauhaus_widget_set_field(), dt_bauhaus_widget_set_label(), dt_free, DT_GUI_BOX_SPACING, DT_GUI_MODULE, DT_INTROSPECTION_TYPE_FLOAT, DT_INTROSPECTION_TYPE_INT, DT_INTROSPECTION_TYPE_USHORT, dt_util_str_replace(), f, FALSE, dt_iop_module_t::gui, IS_NULL_PTR, L, max, MAX, min, p, param, dt_iop_module_t::params, dt_iop_module_t::so, top, TRUE, dt_bauhaus_widget_t::use_default_callback, and dt_iop_module_gui_t::widget.
Referenced by gui_init(), and gui_init().
| GtkWidget * dt_bauhaus_toggle_from_params | ( | dt_iop_module_t * | self, |
| const char * | param | ||
| ) |
Definition at line 286 of file imageop_gui.c.
References _add_widget_to_module_list(), _iop_toggle_callback(), dt_free, DT_GUI_BOX_SPACING, DT_INTROSPECTION_TYPE_BOOL, dt_util_str_replace(), f, FALSE, dt_iop_module_t::gui, IS_NULL_PTR, L, p, param, dt_iop_module_t::params, dt_iop_module_t::so, and dt_iop_module_gui_t::widget.
Referenced by gui_init(), and gui_init().
| void dt_bauhaus_update_module | ( | dt_iop_module_t * | self | ) |
Definition at line 2055 of file imageop_gui.c.
References DT_BAUHAUS_COMBOBOX, dt_bauhaus_combobox_set(), dt_bauhaus_combobox_set_from_value(), DT_BAUHAUS_SLIDER, dt_bauhaus_slider_set(), DT_BAUHAUS_WIDGET, DT_GUI_MODULE, DT_INTROSPECTION_TYPE_BOOL, DT_INTROSPECTION_TYPE_ENUM, DT_INTROSPECTION_TYPE_FLOAT, DT_INTROSPECTION_TYPE_INT, DT_INTROSPECTION_TYPE_UINT, DT_INTROSPECTION_TYPE_USHORT, IS_NULL_PTR, L, and m.
Referenced by dt_iop_gui_update().
Definition at line 2108 of file imageop_gui.c.
References dt_bauhaus_data_t::combobox, d, dt_bauhaus_combobox_entry_t::data, dt_bauhaus_widget_t::data, DT_BAUHAUS_COMBOBOX, DT_BAUHAUS_SLIDER, dt_bauhaus_slider_get(), DT_BAUHAUS_WIDGET, DT_INTROSPECTION_TYPE_BOOL, DT_INTROSPECTION_TYPE_ENUM, DT_INTROSPECTION_TYPE_FLOAT, DT_INTROSPECTION_TYPE_INT, DT_INTROSPECTION_TYPE_UINT, DT_INTROSPECTION_TYPE_USHORT, dt_iop_gui_changed(), f, dt_bauhaus_widget_t::field, dt_bauhaus_widget_t::field_type, i, IS_NULL_PTR, L, dt_bauhaus_widget_t::label, and dt_bauhaus_widget_t::type.
Referenced by enter().
| void dt_iop_add_remove_mask_indicator | ( | dt_iop_module_t * | module | ) |
add/remove mask indicator to iop module header
Definition at line 1762 of file imageop_gui.c.
References _mask_indicator_get_usage(), FALSE, IS_NULL_PTR, and L.
Referenced by _blendop_masks_mode_changed(), dt_iop_gui_blend_masks_update(), dt_iop_gui_blend_set_drawn_mask_group(), dt_iop_gui_update_blendif(), dt_iop_gui_update_blending(), and dt_iop_gui_update_header().
| GtkWidget * dt_iop_button_new | ( | dt_iop_module_t * | self, |
| const gchar * | label, | ||
| GCallback | callback, | ||
| gboolean | local, | ||
| guint | accel_key, | ||
| GdkModifierType | mods, | ||
| DTGTKCairoPaintIconFunc | paint, | ||
| gint | paintflags, | ||
| GtkWidget * | box | ||
| ) |
Definition at line 374 of file imageop_gui.c.
References _add_widget_to_module_list(), dtgtk_button_new(), L, and TRUE.
Referenced by gui_init().
| void dt_iop_gui_changed | ( | dt_iop_module_t * | action, |
| GtkWidget * | widget, | ||
| gpointer | data | ||
| ) |
Definition at line 2037 of file imageop_gui.c.
References dt_dev_add_history_item, dt_iop_color_picker_reset(), dt_iop_gui_set_enable_button(), dt_iop_gui_update_header(), IS_NULL_PTR, L, and TRUE.
Referenced by _iop_toggle_callback(), and dt_bauhaus_value_changed_default_callback().
| void dt_iop_gui_cleanup_module | ( | dt_iop_module_t * | module | ) |
cleans up gui of module and of blendops
Definition at line 1090 of file imageop_gui.c.
References _iop_color_picker_data_ready_callback(), _iop_listens_to_picker_data(), dt_accels_build_path(), dt_accels_remove_accel(), dt_accels_remove_shortcut(), dt_control_signal_get_global(), DT_DEBUG_CONTROL_SIGNAL_DISCONNECT, dt_free, dt_gui_get_accels(), dt_gui_get_global(), DT_GUI_MODULE, dt_iop_gui_cleanup_blending(), dt_iop_gui_data(), dt_iop_is_hidden(), IOP_FLAGS_DEPRECATED, IS_NULL_PTR, L, m, dt_gui_gtk_t::scroll_to, and dt_gui_gtk_t::scroll_to_header_once.
Referenced by _gui_delete_callback(), _init_module_so(), _studio_dev_teardown(), dt_dev_history_gui_update(), and leave().
| dt_iop_module_t * dt_iop_gui_duplicate | ( | dt_iop_module_t * | base, |
| gboolean | copy_params | ||
| ) |
Create another instance of base, insert it into dev->iop and give it a GUI.
| base | the module to duplicate. |
| copy_params | TRUE to carry over base's current parameters and blending. |
Definition at line 581 of file imageop_gui.c.
References _gui_set_single_expanded(), dt_iop_module_t::blend_params, dt_iop_module_t::dev, dt_dev_add_history_item, dt_dev_history_flush_pending_commits(), dt_dev_pixelpipe_rebuild_all, dt_gui_freeze_begin, dt_gui_freeze_end, dt_gui_get_global(), dt_iop_commit_blend_params(), dt_iop_gui_init(), dt_iop_gui_set_expanded(), dt_iop_gui_set_expander(), dt_iop_gui_update(), dt_iop_gui_update_blending(), dt_iop_is_hidden(), dt_iop_reload_defaults(), dt_iop_request_focus(), dt_masks_iop_use_same_as(), dt_iop_module_gui_t::expander, FALSE, dt_iop_module_t::gui, IOP_FLAGS_SUPPORTS_BLENDING, IS_NULL_PTR, L, dt_develop_blend_params_t::mask_id, dt_iop_module_t::params, dt_gui_gtk_t::scroll_to_header_once, and TRUE.
Referenced by _menuitem_button_released_preset().
| void dt_iop_gui_enter_critical_section | ( | dt_iop_module_t *const | module | ) |
Take the module's GUI lock, serialising access to its dt_iop_gui_data_t.
enter/leave a GUI critical section by acquiring gui->gui_lock. Implemented in imageop_gui.c; tolerate headless callers (no GUI, no GUI data to protect), so common/iop-autoset.c and friends can call them without seeing the gui struct.
Must be paired with dt_iop_gui_leave_critical_section() on every path. The pair uses the BAD_ lock variants because the acquire and release routinely sit in different functions, which the thread-safety analyser cannot model.
Definition at line 2186 of file imageop_gui.c.
References dt_pthread_mutex_BAD_lock(), and L.
Referenced by __attribute__(), __attribute__(), _auto_levels_callback(), _auto_levels_callback(), _auto_set_exposure(), _auto_set_illuminant(), _develop_cacheline_ready_callback(), _develop_history_resync_callback(), _develop_ui_pipe_finished_callback(), _develop_ui_pipe_finished_callback(), _develop_ui_pipe_finished_callback(), _do_get_structure_auto(), _draw(), _event_draw(), _get_structure(), _history_resync_callback(), _preview_pipe_finished_callback(), _process_common_setup(), _refresh_module_histogram(), _select_region_toggled_callback(), _select_region_toggled_callback(), _spot_settings_changed_callback(), button_pressed(), button_pressed(), button_released(), button_released(), checker_changed_callback(), checker_color_changed_callback(), color_picker_apply(), commit_profile_callback(), dt_drawlayer_begin_gui_stroke_capture(), dt_drawlayer_commit_dabs(), dt_iop_autoset_advance(), dt_iop_levels_compute_levels_automatic(), dt_iop_zonesystem_preview_draw(), gui_cache_init(), gui_cleanup(), gui_focus(), gui_init(), gui_init(), gui_post_expose(), gui_post_expose(), gui_update(), gui_update(), invalidate_luminance_cache(), key_pressed(), masks_selection_changed(), mouse_moved(), mouse_moved(), optimize_changed_callback(), process(), process(), process(), process_cl(), process_cl(), process_clusters(), process_common_cleanup(), process_drago(), process_internal(), rt_auto_levels_callback(), rt_curr_scale_update(), rt_develop_ui_pipe_finished_callback(), rt_display_wavelet_scale_callback(), run_profile_callback(), run_validation_callback(), safety_changed_callback(), scrolled(), start_profiling_callback(), and update_histogram().
| dt_iop_module_t * dt_iop_gui_get_next_visible_module | ( | dt_iop_module_t * | module | ) |
returns the next visible module on the module list
Definition at line 567 of file imageop_gui.c.
References dt_iop_gui_module_is_visible(), and L.
| GtkWidget * dt_iop_gui_get_off | ( | dt_iop_module_t * | module | ) |
widget-identity helpers for gui/ callers that must not see the gui struct through this header's forward declaration (the struct lives in imageop_gui.h, layer-wise above them until the T6 re-stratification). Implemented in imageop_gui.c; all NULL-safe.
Definition at line 2199 of file imageop_gui.c.
Referenced by _color_picker_callback_button_press().
| GtkWidget * dt_iop_gui_get_pluginui | ( | dt_iop_module_t * | module | ) |
get the eventbox of plugin ui in expander
Definition at line 2030 of file imageop_gui.c.
References DTGTK_EXPANDER, dtgtk_expander_get_frame(), IS_NULL_PTR, and L.
Referenced by _iop_dim_all_but(), and dt_iop_request_focus().
| dt_iop_module_t * dt_iop_gui_get_previous_visible_module | ( | dt_iop_module_t * | module | ) |
returns the previous visible module on the module list
Definition at line 553 of file imageop_gui.c.
References dt_iop_gui_module_is_visible(), and L.
| GtkWidget * dt_iop_gui_get_widget | ( | dt_iop_module_t * | module | ) |
get the widget of plugin ui in expander
Definition at line 2023 of file imageop_gui.c.
References DTGTK_EXPANDER, dtgtk_expander_get_body(), IS_NULL_PTR, and L.
Referenced by dt_gui_presets_apply_preset().
| void dt_iop_gui_init | ( | dt_iop_module_t * | module | ) |
creates the module's gui widget
Definition at line 1017 of file imageop_gui.c.
References _iop_color_picker_data_ready_callback(), _iop_listens_to_picker_data(), _iop_plugin_enable_accel(), _iop_plugin_focus_accel(), delete_underscore(), dt_accels_build_path(), dt_accels_new_darkroom_action, dt_capitalize_label(), dt_control_signal_get_global(), DT_DEBUG_CONTROL_SIGNAL_CONNECT, dt_free, dt_gui_widget_freeze, dt_iop_is_hidden(), DT_SIGNAL_CONTROL_PICKERDATA_READY, IOP_FLAGS_DEPRECATED, IS_NULL_PTR, and L.
Referenced by _init_module_so(), dt_dev_history_gui_update(), dt_iop_gui_duplicate(), and enter().
| void dt_iop_gui_leave_critical_section | ( | dt_iop_module_t *const | module | ) |
Release what dt_iop_gui_enter_critical_section() took. Also a no-op headless.
Definition at line 2194 of file imageop_gui.c.
References dt_pthread_mutex_BAD_unlock(), and L.
Referenced by __attribute__(), __attribute__(), _auto_levels_callback(), _auto_levels_callback(), _auto_set_exposure(), _auto_set_illuminant(), _develop_cacheline_ready_callback(), _develop_history_resync_callback(), _develop_ui_pipe_finished_callback(), _develop_ui_pipe_finished_callback(), _develop_ui_pipe_finished_callback(), _do_get_structure_auto(), _draw(), _event_draw(), _get_structure(), _history_resync_callback(), _preview_pipe_finished_callback(), _process_common_setup(), _refresh_module_histogram(), _select_region_toggled_callback(), _select_region_toggled_callback(), _spot_settings_changed_callback(), button_pressed(), button_pressed(), button_released(), button_released(), checker_changed_callback(), checker_color_changed_callback(), color_picker_apply(), commit_profile_callback(), dt_drawlayer_begin_gui_stroke_capture(), dt_drawlayer_commit_dabs(), dt_iop_autoset_advance(), dt_iop_levels_compute_levels_automatic(), dt_iop_zonesystem_preview_draw(), gui_cache_init(), gui_cleanup(), gui_focus(), gui_init(), gui_init(), gui_post_expose(), gui_post_expose(), gui_update(), gui_update(), invalidate_luminance_cache(), key_pressed(), masks_selection_changed(), mouse_moved(), mouse_moved(), optimize_changed_callback(), process(), process(), process(), process_cl(), process_cl(), process_clusters(), process_common_cleanup(), process_drago(), process_internal(), rt_auto_levels_callback(), rt_curr_scale_update(), rt_develop_ui_pipe_finished_callback(), rt_display_wavelet_scale_callback(), run_profile_callback(), run_validation_callback(), safety_changed_callback(), scrolled(), start_profiling_callback(), and update_histogram().
| gboolean dt_iop_gui_module_is_visible | ( | dt_iop_module_t * | module | ) |
check if current module is visible
Definition at line 545 of file imageop_gui.c.
References dt_iop_is_hidden(), and L.
Referenced by _focus_module(), dt_dev_modules_update_multishow(), dt_iop_gui_get_next_visible_module(), and dt_iop_gui_get_previous_visible_module().
| gboolean dt_iop_gui_owns_widget | ( | const dt_iop_module_t * | module, |
| const GtkWidget * | target | ||
| ) |
Definition at line 2204 of file imageop_gui.c.
Referenced by _ui_scroll_target_is_live_widget().
| void dt_iop_gui_rename_module | ( | dt_iop_module_t * | module | ) |
Definition at line 764 of file imageop_gui.c.
References _rename_module_key_press(), _rename_module_resize(), dt_accels_disconnect_on_text_input(), dt_iop_gui_update_header(), IS_NULL_PTR, L, and TRUE.
Referenced by _gui_rename_callback(), _iop_plugin_header_button_press(), _menuitem_button_released_preset(), and _rename_module_idle().
| GtkWidget * dt_iop_gui_reset_label_new | ( | const gchar * | label, |
| dt_iop_module_t * | module, | ||
| void * | param, | ||
| int | param_size | ||
| ) |
Definition at line 2233 of file imageop_gui.c.
References _iop_reset_label_reset(), d, dtgtk_reset_label_new(), L, dt_iop_reset_label_t::offset, param, and dt_iop_module_t::params.
Referenced by gui_init(), and gui_init().
| void dt_iop_gui_set_enable_button | ( | dt_iop_module_t * | module | ) |
updates the enable button state. (take into account module->enabled and module->hide_enable_button
Definition at line 993 of file imageop_gui.c.
References dt_gui_add_class(), dt_gui_remove_class(), dt_iop_gui_set_enable_button_icon(), FALSE, IS_NULL_PTR, L, and TRUE.
Referenced by _commit_gui(), dt_iop_gui_changed(), and dt_iop_gui_update_header().
| void dt_iop_gui_set_enable_button_icon | ( | GtkWidget * | w, |
| dt_iop_module_t * | module | ||
| ) |
Definition at line 976 of file imageop_gui.c.
References dtgtk_cairo_paint_module_switch(), dtgtk_cairo_paint_module_switch_on(), DTGTK_TOGGLEBUTTON, dtgtk_togglebutton_set_paint(), and L.
Referenced by dt_iop_gui_set_enable_button(), and dt_iop_gui_set_expander().
| void dt_iop_gui_set_expanded | ( | dt_iop_module_t * | module, |
| gboolean | expanded, | ||
| gboolean | collapse_others | ||
| ) |
set expanded state of iop
Definition at line 1442 of file imageop_gui.c.
References _gui_set_single_expanded(), _iop_dim_all_but(), FALSE, IS_NULL_PTR, L, and m.
Referenced by _focus_module(), _focus_next_module(), _focus_previous_module(), _history_show_module_for_end(), _iop_ensure_visible(), _iop_plugin_enable_accel(), _iop_plugin_header_button_release(), _modulegroups_switch_tab_next(), _modulegroups_switch_tab_previous(), _update_iop_visibility(), default_iop_focus(), and dt_iop_gui_duplicate().
| void dt_iop_gui_set_expander | ( | dt_iop_module_t * | module | ) |
creates a label widget for the expander, with callback to enable/disable this module.
Definition at line 1854 of file imageop_gui.c.
References _display_mask_indicator_callback(), _gui_multiinstance_callback(), _gui_off_callback(), _gui_reset_callback(), _iop_gui_widget_gone(), _iop_plugin_body_button_press(), _iop_plugin_header_activate(), _iop_plugin_header_button_press(), _iop_plugin_header_button_release(), _iop_plugin_header_child_button_press(), _iop_tooltip_callback(), _mask_indicator_tooltip(), _presets_popup_callback(), dt_get_help_url(), dt_gui_add_class(), dt_gui_add_help_link(), DT_GUI_BOX_SPACING, dt_gui_get_ui(), dt_iop_gui_init_blending(), dt_iop_gui_set_enable_button_icon(), dt_iop_gui_update_header(), dt_ui_container_add_widget(), DT_UI_CONTAINER_PANEL_RIGHT_CENTER, dtgtk_button_new(), dtgtk_cairo_paint_module_switch(), dtgtk_cairo_paint_multiinstance(), dtgtk_cairo_paint_presets(), dtgtk_cairo_paint_reset(), dtgtk_cairo_paint_showmask(), DTGTK_EXPANDER, dtgtk_expander_get_body_event_box(), dtgtk_expander_get_frame(), dtgtk_expander_get_header_event_box(), dtgtk_expander_new(), dtgtk_togglebutton_new(), FALSE, i, IOP_FLAGS_DEPRECATED, IOP_FLAGS_ONE_INSTANCE, IOP_MODULE_ICON, IOP_MODULE_INSTANCE, IOP_MODULE_LABEL, IOP_MODULE_LAST, IOP_MODULE_MASK, IOP_MODULE_PRESETS, IOP_MODULE_RESET, IOP_MODULE_SWITCH, L, and TRUE.
Referenced by dt_dev_history_gui_update(), dt_iop_gui_duplicate(), and enter().
| void dt_iop_gui_update | ( | dt_iop_module_t * | module | ) |
updates the gui params and the enabled switch.
Definition at line 1193 of file imageop_gui.c.
References dt_bauhaus_update_module(), dt_gui_freeze_begin, dt_gui_freeze_end, dt_iop_gui_data(), dt_iop_gui_update_blending(), dt_iop_gui_update_expanded(), dt_iop_gui_update_header(), dt_iop_is_hidden(), and L.
Referenced by _blendif_change_blend_colorspace(), _blendif_hide_output_channels(), _blendif_show_output_channels(), _gui_reset_callback(), dt_dev_history_gui_update(), dt_gui_presets_apply_preset(), dt_iop_autoset_advance(), and dt_iop_gui_duplicate().
| void dt_iop_gui_update_expanded | ( | dt_iop_module_t * | module | ) |
refresh iop according to set expanded state
Definition at line 1459 of file imageop_gui.c.
References DTGTK_EXPANDER, dtgtk_expander_set_expanded(), IS_NULL_PTR, and L.
Referenced by dt_iop_gui_update(), and enter().
| void dt_iop_gui_update_header | ( | dt_iop_module_t * | module | ) |
Definition at line 964 of file imageop_gui.c.
References _iop_panel_label(), dt_iop_add_remove_mask_indicator(), dt_iop_gui_set_enable_button(), IS_NULL_PTR, and L.
Referenced by _blendop_blend_mode_callback(), _blendop_blendif_boost_factor_callback(), _blendop_blendif_details_callback(), _blendop_blendif_invert(), _blendop_blendif_polarity_callback(), _blendop_blendif_reset(), _blendop_blendif_sliders_callback(), _blendop_blendif_sliders_reset_callback(), _blendop_compositing_changed(), _blendop_masks_apply_and_commit(), _blendop_masks_combine_callback(), _blendop_masks_invert_toggled(), _blendop_masks_mode_changed(), _blendop_masks_polarity_callback(), _raster_polarity_callback(), _raster_value_changed_callback(), _rename_module_key_press(), dt_iop_gui_blend_set_drawn_mask_group(), dt_iop_gui_changed(), dt_iop_gui_rename_module(), dt_iop_gui_set_expander(), dt_iop_gui_update(), and dt_iop_reload_defaults().
| gboolean dt_iop_is_visible | ( | dt_iop_module_t * | module | ) |
Check if the module is currently visible in GUI
Definition at line 916 of file imageop_gui.c.
References dt_iop_is_hidden(), IS_NULL_PTR, and L.
| void dt_iop_request_focus | ( | dt_iop_module_t * | module | ) |
Move darkroom focus to module, or clear it with NULL.
requests the focus for this plugin (to draw overlays over the center image) NOTE: this sets the current module expander as the scroll reference, which is handled when the parent panel changes size, which happens when uncollapsing the module. So dt_iop_request_focus() needs to be called before expanding modules (dt_iop_set_expanded) for auto-scroll to work properly.
Not a passive setter. It calls the outgoing module's gui_focus(FALSE) and the incoming one's gui_focus(TRUE) – which modules use to enter and leave edit modes – asks the panel to scroll the module into view, and triggers a module-visibility refresh that runs later, on the GTK main loop. Callers that change other state in the same callback should assume that refresh observes whatever is committed by the time control returns, not what is true at the moment of this call.
No-op when the module already has focus, or while widgets are suppressed.
Definition at line 1276 of file imageop_gui.c.
References dt_collection_get_global(), dt_collection_hint_message(), dt_control_queue_cursor, dt_control_queue_redraw_center(), dt_control_signal_get_global(), DT_DEBUG_CONTROL_SIGNAL_RAISE, dt_dev_get_global(), dt_dev_modulegroups_switch_tab(), dt_gui_add_class(), dt_gui_get_global(), dt_gui_refocus_center(), dt_gui_remove_class(), dt_gui_widgets_suppressed(), dt_iop_color_picker_reset(), dt_iop_gui_blending_lose_focus(), dt_iop_gui_get_pluginui(), dt_masks_reset_form_gui(), DT_SIGNAL_DEVELOP_MASKS_GUI_CHANGED, dt_widget_scroll_focus(), dt_widget_set_scroll_focus(), FALSE, dt_develop_t::gui_module, IS_NULL_PTR, L, dt_gui_gtk_t::scroll_to, dt_gui_gtk_t::scroll_to_header_once, and TRUE.
Referenced by _add_shape(), _area_button_press_callback(), _area_scroll_callback(), _auto_levels_callback(), _auto_levels_callback(), _blendop_blendif_channel_display_toggled(), _blendop_blendif_key_press(), _blendop_blendif_showmask_clicked(), _blendop_masks_shape_can_start(), _blendop_masks_show_and_edit(), _color_picker_callback_button_press(), _custom_model_callback(), _darkroom_image_loaded_callback(), _display_mask_callback(), _display_mask_indicator_callback(), _edit_masks(), _enter_edit_mode(), _enter_edit_mode(), _event_fit_both_button_clicked(), _event_fit_h_button_clicked(), _event_fit_v_button_clicked(), _event_structure_auto_clicked(), _event_structure_lines_clicked(), _event_structure_quad_clicked(), _focus_module(), _gui_delete_callback(), _gui_set_single_expanded(), _history_show_module_for_end(), _iop_ensure_visible(), _iop_plugin_body_button_press(), _iop_plugin_enable_accel(), _iop_plugin_header_button_release(), _modulegroups_switch_tab_next(), _modulegroups_switch_tab_previous(), _raster_combo_populate(), _scroll_event(), _select_region_toggled_callback(), _select_region_toggled_callback(), _update_iop_visibility(), acquire_source_button_pressed(), acquire_target_button_pressed(), area_button_press(), area_button_press(), area_button_release(), btn_make_radio_callback(), button_pressed(), button_pressed(), default_iop_focus(), dt_dev_history_gui_update(), dt_iop_gui_duplicate(), dt_iop_levels_button_press(), dt_iop_levels_scroll(), dt_masks_creation_mode_enter(), dt_masks_iop_combo_populate(), gui_reset(), key_pressed(), mask_callback(), notebook_button_press(), profile_changed(), rt_auto_levels_callback(), rt_display_wavelet_scale_callback(), rt_edit_masks_callback(), rt_select_algorithm_callback(), rt_shape_buttons_can_start(), rt_showmask_callback(), rt_suppress_callback(), rt_wdbar_button_press(), rt_wdbar_scrolled(), show_luminance_mask_callback(), start_profiling_callback(), and workicc_changed().
| GtkWidget * dt_iop_togglebutton_new | ( | dt_iop_module_t * | self, |
| const char * | section, | ||
| const gchar * | label, | ||
| const gchar * | ctrl_label, | ||
| GCallback | callback, | ||
| gboolean | local, | ||
| guint | accel_key, | ||
| GdkModifierType | mods, | ||
| DTGTKCairoPaintIconFunc | paint, | ||
| GtkWidget * | box | ||
| ) |
Definition at line 327 of file imageop_gui.c.
References _add_widget_to_module_list(), dt_free, dtgtk_togglebutton_new(), FALSE, IS_NULL_PTR, L, and tooltip.
Referenced by dt_masks_shape_buttons_create(), gui_init(), and gui_init().
| GtkWidget * dt_iop_togglebutton_new_no_register | ( | dt_iop_module_t * | self, |
| const char * | section, | ||
| const gchar * | label, | ||
| const gchar * | ctrl_label, | ||
| GCallback | callback, | ||
| gboolean | local, | ||
| guint | accel_key, | ||
| GdkModifierType | mods, | ||
| DTGTKCairoPaintIconFunc | paint, | ||
| GtkWidget * | box | ||
| ) |
Build an IOP toggle button without registering it for module GUI refresh.
Definition at line 351 of file imageop_gui.c.
References dt_free, dtgtk_togglebutton_new(), FALSE, IS_NULL_PTR, L, and tooltip.
Referenced by dt_iop_gui_init_blendif(), dt_iop_gui_init_blending_body(), dt_iop_gui_init_masks(), and dt_masks_shape_buttons_create().
| gboolean dt_mask_scroll_increases | ( | int | up | ) |
Definition at line 399 of file imageop_gui.c.
References dt_conf_get_bool(), and L.
Referenced by dt_masks_events_mouse_scrolled(), scrolled(), and scrolled().