![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "widgets/popup.h"#include "system/macros.h"#include "widgets/widget_settings.h"#include "widgets/widget_style.h"
Include dependency graph for popup.c:Go to the source code of this file.
Functions | |
| GtkWidget * | dt_gui_get_popup_relative_widget (GtkWidget *widget, GdkRectangle *rect) |
| Resolve the widget to use as parent for a nested popup on Wayland. | |
| void | dt_gui_menu_popup (GtkMenu *menu, GtkWidget *button, GdkGravity widget_anchor, GdkGravity menu_anchor) |
| static void | _popover_set_relative_to_topmost_parent (GtkPopover *popover, GtkWidget *button) |
| GtkBox * | attach_popover (GtkWidget *widget, const char *icon, GtkWidget *content) |
| GtkBox * | attach_help_popover (GtkWidget *widget, const char *label) |
|
static |
Definition at line 83 of file popup.c.
References dt_gui_get_popup_relative_widget(), and L.
Referenced by attach_popover().
Add a help button triggering a popover label next to an arbitrary widget, to document its action. This is a better take at help tooltips that most people don't see unless they know about them. Tooltip window positioning is also wonky (can easily overflow the viewport), line breaks are added manually (ugly hack), and they appear and disappear on hover (not available on touch screens), so it's flimsy UI.
| widget | the original widget to document. DON'T add it to a container. |
| label | the in-app "docstring" for the widget |
Definition at line 122 of file popup.c.
References attach_popover(), L, and TRUE.
Referenced by gui_init().
Add an arbitrary button next to the widget that opens a popover with arbitrary content.
| widget | the original widget next to which the popover button will be added. DON'T add it to a container. |
| icon | the Freedesktop icon name to put in the button |
| content | the widget that will fit inside the popover |
Definition at line 91 of file popup.c.
References _popover_set_relative_to_topmost_parent(), dt_gui_add_class(), DT_GUI_BOX_SPACING, DT_PIXEL_APPLY_DPI, FALSE, and L.
Referenced by attach_help_popover(), gui_init(), and gui_init().
| GtkWidget * dt_gui_get_popup_relative_widget | ( | GtkWidget * | widget, |
| GdkRectangle * | rect | ||
| ) |
Resolve the widget to use as parent for a nested popup on Wayland.
Walks the parent chain to the top-most enclosing popup while leaving the caller in charge of the popup logic. When rect is not NULL, it receives the position and size of widget in the returned anchor's coordinate system.
| widget | the widget the popup should visually point to. |
| rect | optional output rectangle receiving the geometry of widget. |
widget is NULL. Definition at line 25 of file popup.c.
References IS_NULL_PTR, L, MAX, rect::width, rect::x, and rect::y.
Referenced by _completion_update(), _popover_set_relative_to_topmost_parent(), _setup_completion(), dt_dev_toolbox_show_popup(), and dt_gui_menu_popup().
| void dt_gui_menu_popup | ( | GtkMenu * | menu, |
| GtkWidget * | button, | ||
| GdkGravity | widget_anchor, | ||
| GdkGravity | menu_anchor | ||
| ) |
Pop a menu up at button (or at the pointer when button is NULL), anchored correctly even when the button itself sits inside another popover.
Definition at line 53 of file popup.c.
References dt_gui_get_popup_relative_widget(), dt_widget_root_window(), IS_NULL_PTR, and L.
Referenced by _blendif_options_callback(), _gui_multiinstance_callback(), _ioporder_node_show_presets(), _lib_navigation_button_press_callback(), _presets_popup_callback(), _show_popover_menu(), camera_autosearch_clicked(), camera_menusearch_clicked(), lens_autosearch_clicked(), lens_menusearch_clicked(), and presets_popup_callback().