![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "common/darktable.h"#include "develop/masks.h"#include "bauhaus/bauhaus.h"#include "common/debug.h"#include "control/signal.h"#include "develop/imageop_gui.h"#include "dtgtk/button.h"#include "dtgtk/paint.h"#include "gui/actions/menu.h"#include "gui/draw.h"#include "gui/gtk.h"#include <math.h>#include <stdlib.h>
Include dependency graph for masks_gui.c:Go to the source code of this file.
Data Structures | |
| struct | dt_masks_shape_button_def_t |
| struct | dt_masks_shape_buttons_data_t |
| struct | dt_masks_gui_interaction_slider_t |
Macros | |
| #define | DT_MASKS_SHAPE_BUTTON_COUNT 5 |
| #define | masks_gtk_menu_item_new_bold(label, selected, state, icon) |
Typedefs | |
| typedef struct dt_masks_shape_button_def_t | dt_masks_shape_button_def_t |
| typedef struct dt_masks_shape_buttons_data_t | dt_masks_shape_buttons_data_t |
| typedef struct dt_masks_gui_interaction_slider_t | dt_masks_gui_interaction_slider_t |
Variables | |
| static const dt_masks_shape_button_def_t | _masks_shape_button_defs [] |
| #define DT_MASKS_SHAPE_BUTTON_COUNT 5 |
Definition at line 34 of file masks_gui.c.
| #define masks_gtk_menu_item_new_bold | ( | label, | |
| selected, | |||
| state, | |||
| icon | |||
| ) |
Definition at line 587 of file masks_gui.c.
| typedef struct dt_masks_shape_button_def_t dt_masks_shape_button_def_t |
| typedef struct dt_masks_shape_buttons_data_t dt_masks_shape_buttons_data_t |
|
static |
Definition at line 383 of file masks_gui.c.
References _masks_gui_interaction_slider_changed(), _masks_gui_menu_item_block_activate(), _masks_gui_menu_item_forward_event(), darktable_t::bauhaus, darktable, dt_bauhaus_slider_new_with_range(), dt_bauhaus_slider_set(), dt_bauhaus_slider_set_digits(), dt_bauhaus_slider_set_factor(), dt_bauhaus_slider_set_format(), DT_BAUHAUS_WIDGET, dt_bauhaus_widget_set_label(), DT_GUI_BOX_SPACING, DT_GUI_MODULE, DT_PIXEL_APPLY_DPI, factor, FALSE, dt_masks_gui_interaction_slider_t::form_group, dt_masks_gui_interaction_slider_t::gui, dt_masks_gui_interaction_slider_t::increment, dt_masks_gui_interaction_slider_t::interaction, dt_masks_gui_interaction_slider_t::last_value, max, min, dt_masks_gui_interaction_slider_t::slider, TRUE, and value.
Referenced by dt_masks_create_menu().
Definition at line 463 of file masks_gui.c.
References darktable, darktable_t::develop, dt_masks_form_get_selected_group(), dt_masks_get_from_id(), dt_masks_get_visible_form(), dt_masks_remove_or_delete(), dt_masks_form_group_t::formid, dt_masks_form_gui_t::group_selected, IS_NULL_PTR, and dt_masks_form_group_t::parentid.
Referenced by dt_masks_create_menu().
Definition at line 488 of file masks_gui.c.
References dt_masks_form_gui_t::creation, darktable, darktable_t::develop, dt_dev_add_history_item, dt_masks_form_exit_creation(), dt_masks_form_get_selected_group(), dt_masks_get_from_id(), dt_masks_get_visible_form(), dt_masks_remove_node(), dt_masks_form_group_t::formid, dt_masks_form_gui_t::group_selected, IS_NULL_PTR, dt_masks_form_gui_t::node_dragging, dt_masks_form_gui_t::node_hovered, dt_masks_form_group_t::parentid, and TRUE.
Referenced by _polygon_populate_context_menu(), and dt_masks_create_menu().
Definition at line 525 of file masks_gui.c.
References dt_masks_form_exit_creation().
Referenced by dt_masks_create_menu().
|
static |
Definition at line 271 of file masks_gui.c.
References _masks_gui_interaction_commit(), delta, dt_masks_form_set_interaction_value(), DT_MASKS_INCREMENT_ABSOLUTE, DT_MASKS_INCREMENT_SCALE, dt_masks_gui_interaction_slider_t::form_group, dt_masks_gui_interaction_slider_t::gui, dt_masks_gui_interaction_slider_t::increment, dt_masks_gui_interaction_slider_t::interaction, IS_NULL_PTR, dt_masks_gui_interaction_slider_t::last_value, and value.
Referenced by _masks_gui_interaction_slider_changed().
|
static |
Definition at line 261 of file masks_gui.c.
References darktable, darktable_t::develop, DT_DEBUG_CONTROL_SIGNAL_RAISE, dt_dev_add_history_item, DT_MASKS_EVENT_UPDATE, DT_SIGNAL_MASK_CHANGED, dt_masks_gui_interaction_slider_t::form_group, dt_masks_form_group_t::formid, IS_NULL_PTR, dt_masks_form_group_t::parentid, darktable_t::signals, and TRUE.
Referenced by _masks_gui_interaction_apply_value().
Definition at line 375 of file masks_gui.c.
References _masks_gui_interaction_apply_value(), dt_bauhaus_slider_get(), dt_masks_gui_interaction_slider_t::form_group, and IS_NULL_PTR.
Referenced by _masks_gui_add_interaction_slider().
Definition at line 295 of file masks_gui.c.
Referenced by _masks_gui_add_interaction_slider().
|
static |
Definition at line 300 of file masks_gui.c.
References copy(), FALSE, IS_NULL_PTR, dt_masks_gui_interaction_slider_t::slider, TRUE, and x.
Referenced by _masks_gui_add_interaction_slider().
|
static |
Definition at line 532 of file masks_gui.c.
References darktable, darktable_t::develop, DT_DEBUG_CONTROL_SIGNAL_RAISE, DT_MASKS_EVENT_CHANGE, dt_masks_form_get_selected_group(), dt_masks_form_move(), dt_masks_get_from_id(), dt_masks_get_visible_form(), DT_MASKS_GROUP, DT_SIGNAL_MASK_CHANGED, dt_masks_form_group_t::formid, dt_masks_form_gui_t::group_selected, IS_NULL_PTR, dt_masks_form_group_t::parentid, darktable_t::signals, and dt_masks_form_t::type.
Referenced by _masks_movedown_callback(), and _masks_moveup_callback().
Definition at line 558 of file masks_gui.c.
References _masks_move_up_down_callback().
Referenced by dt_masks_create_menu().
Definition at line 553 of file masks_gui.c.
References _masks_move_up_down_callback().
Referenced by dt_masks_create_menu().
Contextual menu
Definition at line 565 of file masks_gui.c.
References apply_operation(), darktable, dt_control_log(), DT_DEBUG_CONTROL_SIGNAL_RAISE, DT_MASKS_EVENT_UPDATE, DT_MASKS_STATE_IS_COMBINE_OP, DT_SIGNAL_MASK_CHANGED, dt_masks_form_group_t::formid, IS_NULL_PTR, dt_masks_form_group_t::parentid, and darktable_t::signals.
|
static |
Definition at line 91 of file masks_gui.c.
References dt_masks_shape_buttons_data_t::buttons, DT_MASKS_SHAPE_BUTTON_COUNT, i, and IS_NULL_PTR.
Referenced by _masks_shape_button_pressed().
|
static |
Definition at line 102 of file masks_gui.c.
References dt_masks_shape_buttons_data_t::config, dt_masks_form_gui_t::creation, dt_masks_form_gui_t::creation_module, dt_masks_shape_buttons_config_t::creation_module, darktable, darktable_t::develop, dt_masks_get_visible_form(), dt_develop_t::form_gui, IS_NULL_PTR, dt_masks_form_t::type, and dt_masks_shape_buttons_data_t::types.
Referenced by _masks_shape_button_pressed().
|
static |
Definition at line 114 of file masks_gui.c.
References _masks_shape_button_index(), _masks_shape_button_is_current_creation(), dt_masks_shape_buttons_config_t::can_start, dt_masks_shape_buttons_data_t::config, darktable, darktable_t::develop, dt_control_queue_redraw_center(), dt_masks_creation_mode_enter(), dt_masks_form_exit_creation(), dt_masks_shape_buttons_deactivate_all(), dt_ui_center(), dt_masks_shape_buttons_config_t::exited, FALSE, dt_develop_t::form_gui, dt_masks_shape_buttons_config_t::form_type, darktable_t::gui, dt_gui_gtk_t::reset, dt_masks_shape_buttons_config_t::started, TRUE, type, dt_masks_shape_buttons_data_t::types, dt_gui_gtk_t::ui, and dt_masks_shape_buttons_config_t::user_data.
Referenced by dt_masks_shape_buttons_create().
|
static |
Definition at line 67 of file masks_gui.c.
References dt_masks_shape_buttons_data_t::buttons, DT_MASKS_SHAPE_BUTTON_COUNT, FALSE, i, and IS_NULL_PTR.
Referenced by _masks_shape_buttons_deactivate_signal().
|
static |
Definition at line 80 of file masks_gui.c.
References _masks_shape_buttons_deactivate().
Referenced by _masks_shape_buttons_destroy(), and dt_masks_shape_buttons_create().
|
static |
Definition at line 166 of file masks_gui.c.
References _masks_shape_buttons_deactivate_signal(), darktable, DT_DEBUG_CONTROL_SIGNAL_DISCONNECT, dt_free, and darktable_t::signals.
Referenced by dt_masks_shape_buttons_create().
| GtkWidget * dt_masks_create_menu | ( | dt_masks_form_gui_t * | gui, |
| dt_masks_form_t * | form, | ||
| const dt_masks_form_group_t * | formgroup, | ||
| const float | pzx, | ||
| const float | pzy | ||
| ) |
Definition at line 603 of file masks_gui.c.
References _masks_gui_add_interaction_slider(), _masks_gui_delete_form_callback(), _masks_gui_delete_node_callback(), _masks_gui_exit_creation_callback(), _masks_movedown_callback(), _masks_moveup_callback(), dt_masks_form_gui_t::creation, ctx_gtk_menu_item_new_with_markup(), ctx_gtk_menu_item_new_with_markup_and_pixbuf(), darktable, darktable_t::develop, dt_draw_get_pixbuf_from_cairo(), dt_free, DT_MASKS_BRUSH, DT_MASKS_CIRCLE, DT_MASKS_ELLIPSE, dt_masks_form_get_interaction_value(), dt_masks_form_group_from_parentid(), dt_masks_get_from_id(), DT_MASKS_GRADIENT, DT_MASKS_GROUP, DT_MASKS_INCREMENT_ABSOLUTE, DT_MASKS_INCREMENT_SCALE, DT_MASKS_INTERACTION_HARDNESS, DT_MASKS_INTERACTION_OPACITY, DT_MASKS_INTERACTION_SIZE, DT_MASKS_IS_RETOUCHE, DT_MASKS_POLYGON, DT_MASKS_STATE_DIFFERENCE, DT_MASKS_STATE_EXCLUSION, DT_MASKS_STATE_INTERSECTION, DT_MASKS_STATE_INVERSE, DT_MASKS_STATE_IS_COMBINE_OP, DT_MASKS_STATE_UNION, DT_PIXEL_APPLY_DPI, dtgtk_cairo_paint_masks_difference(), dtgtk_cairo_paint_masks_exclusion(), dtgtk_cairo_paint_masks_intersection(), dtgtk_cairo_paint_masks_inverse(), dtgtk_cairo_paint_masks_union(), FALSE, dt_masks_form_gui_t::form_selected, dt_masks_form_group_t::formid, dt_masks_form_t::formid, dt_masks_form_t::functions, dt_develop_t::gui_module, IS_NULL_PTR, k, masks_gtk_menu_item_new_bold, MAX, menu_item_set_fake_accel, dt_masks_form_t::name, dt_masks_form_gui_t::node_hovered, dt_masks_form_gui_t::node_selected, dt_masks_form_group_t::parentid, dt_masks_form_t::points, dt_masks_functions_t::populate_context_menu, dt_masks_form_gui_t::seg_hovered, dt_masks_form_group_t::state, state, TRUE, dt_masks_form_t::type, and width.
Referenced by dt_masks_events_button_pressed().
| int dt_masks_gui_confirm_delete_form_dialog | ( | const char * | form_name | ) |
Dialogs
Definition at line 439 of file masks_gui.c.
References darktable, dt_ui_main_window(), darktable_t::gui, IS_NULL_PTR, and dt_gui_gtk_t::ui.
Referenced by dt_masks_remove_or_delete().
| GtkWidget * dt_masks_shape_buttons_create | ( | const dt_masks_shape_buttons_config_t * | config | ) |
Build a synchronized toolbar for creating masks shapes.
The buttons all use the same creation callback and listen to a process-wide deactivation signal. This keeps multiple mask toolbars, such as blending, retouch and the shape manager, from showing stale active buttons after another toolbar starts or exits a shape creation.
Definition at line 180 of file masks_gui.c.
References _masks_shape_button_defs, _masks_shape_button_pressed(), _masks_shape_buttons_deactivate_signal(), _masks_shape_buttons_destroy(), dt_masks_shape_buttons_config_t::action_section, dt_masks_shape_buttons_data_t::box, dt_masks_shape_buttons_config_t::buttons, dt_masks_shape_buttons_data_t::buttons, dt_masks_shape_buttons_data_t::config, dt_masks_shape_button_def_t::ctrl_label, darktable, DT_DEBUG_CONTROL_SIGNAL_CONNECT, DT_GUI_BOX_SPACING, dt_iop_togglebutton_new(), dt_iop_togglebutton_new_no_register(), DT_SIGNAL_MASK_SHAPE_BUTTONS_DEACTIVATE, dtgtk_togglebutton_new(), FALSE, dt_masks_shape_button_def_t::flag, dt_masks_shape_buttons_config_t::flags, i, dt_masks_shape_button_def_t::index, IS_NULL_PTR, dt_masks_shape_button_def_t::label, dt_masks_shape_buttons_config_t::local, dt_masks_shape_buttons_config_t::owner_module, dt_masks_shape_button_def_t::paint, dt_masks_shape_buttons_config_t::register_flags, darktable_t::signals, dt_masks_shape_button_def_t::type, dt_masks_shape_buttons_config_t::types, and dt_masks_shape_buttons_data_t::types.
Referenced by _blendop_masks_create_shape_buttons(), gui_init(), and gui_init().
Definition at line 86 of file masks_gui.c.
References darktable, DT_DEBUG_CONTROL_SIGNAL_RAISE, DT_SIGNAL_MASK_SHAPE_BUTTONS_DEACTIVATE, and darktable_t::signals.
Referenced by _blendop_masks_show_and_edit(), _lib_masks_recreate_list(), _masks_shape_button_pressed(), dt_iop_gui_blending_lose_focus(), dt_iop_gui_update_blending(), dt_masks_reset_form_gui(), dt_masks_reset_show_masks_icons(), gui_focus(), and rt_edit_masks_callback().
|
static |
Definition at line 54 of file masks_gui.c.
Referenced by dt_masks_shape_buttons_create().