Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
bauhaus.c File Reference
#include "bauhaus/bauhaus.h"
#include "common/calculator.h"
#include "common/math.h"
#include "control/conf.h"
#include "common/debug.h"
#include "control/control.h"
#include "gui/color_picker_proxy.h"
#include <strings.h>
#include <pango/pangocairo.h>
+ Include dependency graph for bauhaus.c:

Macros

#define DEBUG   0
 

Typedefs

typedef enum _bh_active_region_t _bh_active_region_t
 
typedef enum _bh_valign_t _bh_valign_t
 
typedef enum _bh_halign_t _bh_halign_t
 

Enumerations

enum  _bh_active_region_t {
  BH_REGION_OUT = 0 ,
  BH_REGION_MAIN ,
  BH_REGION_QUAD
}
 
enum  _bh_valign_t {
  BH_ALIGN_TOP = 0 ,
  BH_ALIGN_BOTTOM = 1 ,
  BH_ALIGN_MIDDLE = 2
}
 
enum  _bh_halign_t {
  BH_ALIGN_LEFT = 0 ,
  BH_ALIGN_RIGHT = 1 ,
  BH_ALIGN_CENTER = 2
}
 

Functions

static gboolean dt_bauhaus_popup_draw (GtkWidget *widget, cairo_t *cr, gpointer user_data)
 
static gboolean dt_bauhaus_popup_key_press (GtkWidget *widget, GdkEventKey *event, gpointer user_data)
 
static gboolean _widget_draw (GtkWidget *widget, cairo_t *crf)
 
static gboolean _widget_scroll (GtkWidget *widget, GdkEventScroll *event)
 
static gboolean _widget_key_press (GtkWidget *widget, GdkEventKey *event)
 
static void _get_preferred_width (GtkWidget *widget, gint *minimum_size, gint *natural_size)
 
static void _style_updated (GtkWidget *widget)
 
static void dt_bauhaus_widget_accept (struct dt_bauhaus_widget_t *w, gboolean timeout)
 
static void dt_bauhaus_widget_reject (struct dt_bauhaus_widget_t *w)
 
static void _combobox_set (GtkWidget *widget, const int pos, gboolean timeout)
 Set a combobox to a given integer position. Private API function, called from user events.
 
static void _margins_retrieve (struct dt_bauhaus_widget_t *w)
 Update the box margin and padding properties of the widget w by reading CSS context.
 
static float _bh_get_row_height (struct dt_bauhaus_widget_t *w)
 Get the total height of a GUI row containing a line of text + top and bottom padding.
 
static double _widget_get_quad_width (struct dt_bauhaus_widget_t *w)
 Get the width of the quad without padding.
 
static double _widget_get_total_width (struct dt_bauhaus_widget_t *w, GtkWidget *widget)
 Get the total width of the main Bauhaus widget area, accounting for padding and margins.
 
static double _widget_get_main_width (struct dt_bauhaus_widget_t *w, GtkWidget *widget, double *total_width)
 Get the width of the main Bauhaus widget area (slider scale or combobox), accounting for quad space, padding and margins.
 
static double _widget_get_main_height (struct dt_bauhaus_widget_t *w, GtkWidget *widget)
 Get the height of the main Bauhaus widget area (slider scale or combobox), that is the box allocation minus padding and margins.
 
static double _get_combobox_height (GtkWidget *widget)
 
static double _get_slider_height (GtkWidget *widget)
 
static double _get_indicator_y_position (struct dt_bauhaus_widget_t *w)
 
static double _get_slider_bar_height (struct dt_bauhaus_widget_t *w)
 
static double _get_combobox_popup_height (struct dt_bauhaus_widget_t *w)
 
static void _translate_cursor (double *x, double *y, struct dt_bauhaus_widget_t *const w)
 Translate in-place the cursor coordinates within the widget or popup according to padding and margin, so x = 0 is mapped to the starting point of the slider.
 
static _bh_active_region_t _bh_get_active_region (GtkWidget *widget, double *x, double *y, double *width, GtkWidget *popup)
 Check if we have user cursor over quad area or over the slider/main area, then correct cursor coordinates for widget padding and margin. For sliders, it means that x = 0 is mapped to the origin of the scale.
 
static float _bh_round_to_n_digits (const struct dt_bauhaus_widget_t *const w, float x)
 Round a slider numeric value to the number of digits specified in the widget w.
 
static float _bh_slider_get_min_step (const struct dt_bauhaus_widget_t *const w)
 Return the minimum representable value step, for current UI scaling factor and number of digits.
 
static double _bh_slider_get_scale (struct dt_bauhaus_widget_t *w)
 
static void _bh_combobox_get_hovered_entry (struct dt_bauhaus_widget_t *w)
 
static _bh_active_region_t _popup_coordinates (dt_bauhaus_t *bh, const double x_root, const double y_root, double *event_x, double *event_y)
 
static gboolean ensure_focus_idle (gpointer data)
 
gboolean dt_bauhaus_focus_in_callback (GtkWidget *widget, GdkEventFocus event, gpointer user_data)
 
gboolean dt_bauhaus_focus_out_callback (GtkWidget *widget, GdkEventFocus event, gpointer user_data)
 
gboolean dt_bauhaus_focus_callback (GtkWidget *widget, GtkDirectionType direction, gpointer data)
 
gboolean _action_request_focus (GtkAccelGroup *accel_group, GObject *accelerable, guint keyval, GdkModifierType modifier, gpointer data)
 
static void _combobox_next_sensitive (struct dt_bauhaus_widget_t *w, int delta)
 
static dt_bauhaus_combobox_entry_tnew_combobox_entry (const char *label, dt_bauhaus_combobox_alignment_t alignment, gboolean sensitive, void *data, void(*free_func)(void *))
 
static void free_combobox_entry (gpointer data)
 
static GdkRGBA * default_color_assign ()
 
static void show_pango_text (struct dt_bauhaus_widget_t *w, GtkStyleContext *context, cairo_t *cr, GdkRectangle *bounding_box, const char *text, _bh_halign_t halign, _bh_valign_t valign, PangoEllipsizeMode ellipsize, GdkRGBA *bg_color, float *width, float *height, GtkStateFlags state)
 Display text aligned in a bounding box, with pseudo-classes properties handled, and optional background color.
 
static void dt_bauhaus_slider_set_normalized (struct dt_bauhaus_widget_t *w, float pos, gboolean raise, gboolean timeout)
 Set the value of a slider as a ratio of the GUI slider width.
 
static double get_slider_line_offset (const double pos, const double scale, const double x, double y, const double line_height)
 
static void draw_slider_line (cairo_t *cr, const double pos, const double off, const double scale, const double width, const double height, const double line_height, double line_width)
 
static void _slider_zoom_range (struct dt_bauhaus_widget_t *w, float zoom)
 
static gboolean dt_bauhaus_popup_scroll (GtkWidget *widget, GdkEventScroll *event, gpointer user_data)
 
static gboolean dt_bauhaus_popup_motion_notify (GtkWidget *widget, GdkEventMotion *event, gpointer user_data)
 
static gboolean dt_bauhaus_popup_leave_notify (GtkWidget *widget, GdkEventCrossing *event, gpointer user_data)
 
static gboolean dt_bauhaus_popup_button_release (GtkWidget *widget, GdkEventButton *event, gpointer user_data)
 
static gboolean dt_bauhaus_popup_button_press (GtkWidget *widget, GdkEventButton *event, gpointer user_data)
 
static void dt_bauhaus_window_show (GtkWidget *w, gpointer user_data)
 
static void dt_bh_init (DtBauhausWidget *class)
 
static gboolean _enter_leave (GtkWidget *widget, GdkEventCrossing *event)
 
static void _widget_finalize (GObject *widget)
 
static void dt_bh_class_init (DtBauhausWidgetClass *class)
 
void dt_bauhaus_load_theme (dt_bauhaus_t *bauhaus)
 
dt_bauhaus_tdt_bauhaus_init ()
 
void dt_bauhaus_cleanup (dt_bauhaus_t *bauhaus)
 
static gboolean dt_bauhaus_slider_button_press (GtkWidget *widget, GdkEventButton *event, gpointer user_data)
 
static gboolean dt_bauhaus_slider_button_release (GtkWidget *widget, GdkEventButton *event, gpointer user_data)
 
static gboolean dt_bauhaus_slider_motion_notify (GtkWidget *widget, GdkEventMotion *event, gpointer user_data)
 
static gboolean dt_bauhaus_combobox_button_press (GtkWidget *widget, GdkEventButton *event, gpointer user_data)
 
static void _bauhaus_widget_init (dt_bauhaus_t *bauhaus, dt_bauhaus_widget_t *w, dt_gui_module_t *self)
 
void dt_bauhaus_combobox_set_default (GtkWidget *widget, int def)
 
void dt_bauhaus_slider_set_hard_min (GtkWidget *widget, float val)
 
float dt_bauhaus_slider_get_hard_min (GtkWidget *widget)
 
void dt_bauhaus_slider_set_hard_max (GtkWidget *widget, float val)
 
float dt_bauhaus_slider_get_hard_max (GtkWidget *widget)
 
void dt_bauhaus_slider_set_soft_min (GtkWidget *widget, float val)
 
float dt_bauhaus_slider_get_soft_min (GtkWidget *widget)
 
void dt_bauhaus_slider_set_soft_max (GtkWidget *widget, float val)
 
float dt_bauhaus_slider_get_soft_max (GtkWidget *widget)
 
void dt_bauhaus_slider_set_default (GtkWidget *widget, float def)
 
void dt_bauhaus_slider_set_soft_range (GtkWidget *widget, float soft_min, float soft_max)
 
void dt_bauhaus_widget_set_label (GtkWidget *widget, const char *label)
 
const char * dt_bauhaus_widget_get_label (GtkWidget *widget)
 
void dt_bauhaus_widget_set_quad_paint (GtkWidget *widget, dt_bauhaus_quad_paint_f f, int paint_flags, void *paint_data)
 
void dt_bauhaus_widget_set_field (GtkWidget *widget, gpointer field, dt_introspection_type_t field_type)
 
void dt_bauhaus_widget_set_quad_toggle (GtkWidget *widget, int toggle)
 
void dt_bauhaus_widget_set_quad_active (GtkWidget *widget, int active)
 
void dt_bauhaus_widget_set_quad_visibility (GtkWidget *widget, const gboolean visible)
 
int dt_bauhaus_widget_get_quad_active (GtkWidget *widget)
 
void dt_bauhaus_widget_press_quad (GtkWidget *widget)
 
void dt_bauhaus_widget_release_quad (GtkWidget *widget)
 
GtkWidget * dt_bauhaus_slider_new (dt_bauhaus_t *bh, dt_gui_module_t *self)
 
GtkWidget * dt_bauhaus_slider_new_with_range (dt_bauhaus_t *bh, dt_gui_module_t *self, float min, float max, float step, float defval, int digits)
 
GtkWidget * dt_bauhaus_slider_new_with_range_and_feedback (dt_bauhaus_t *bh, dt_gui_module_t *self, float min, float max, float step, float defval, int digits, int feedback)
 
GtkWidget * dt_bauhaus_slider_from_widget (dt_bauhaus_t *bh, dt_bauhaus_widget_t *w, dt_gui_module_t *self, float min, float max, float step, float defval, int digits, int feedback)
 
GtkWidget * dt_bauhaus_combobox_new (dt_bauhaus_t *bh, dt_gui_module_t *self)
 
GtkWidget * dt_bauhaus_combobox_new_full (dt_bauhaus_t *bh, dt_gui_module_t *self, const char *label, const char *tip, int pos, GtkCallback callback, gpointer data, const char **texts)
 
void dt_bauhaus_combobox_from_widget (dt_bauhaus_t *bh, dt_bauhaus_widget_t *w, dt_gui_module_t *self)
 
static dt_bauhaus_combobox_data_t_combobox_data (GtkWidget *widget)
 
void dt_bauhaus_combobox_add_populate_fct (GtkWidget *widget, void(*fct)(GtkWidget *w, void *module))
 
void dt_bauhaus_combobox_add_list (GtkWidget *widget, const char **texts)
 
void dt_bauhaus_combobox_add (GtkWidget *widget, const char *text)
 
void dt_bauhaus_combobox_add_aligned (GtkWidget *widget, const char *text, dt_bauhaus_combobox_alignment_t align)
 
void dt_bauhaus_combobox_add_full (GtkWidget *widget, const char *text, dt_bauhaus_combobox_alignment_t align, gpointer data, void(free_func)(void *data), gboolean sensitive)
 
void dt_bauhaus_combobox_set_entries_ellipsis (GtkWidget *widget, PangoEllipsizeMode ellipis)
 
void dt_bauhaus_combobox_set_editable (GtkWidget *widget, int editable)
 
int dt_bauhaus_combobox_get_editable (GtkWidget *widget)
 
void dt_bauhaus_combobox_set_selected_text_align (GtkWidget *widget, const dt_bauhaus_combobox_alignment_t text_align)
 
void dt_bauhaus_combobox_remove_at (GtkWidget *widget, int pos)
 
void dt_bauhaus_combobox_insert (GtkWidget *widget, const char *text, int pos)
 
void dt_bauhaus_combobox_insert_full (GtkWidget *widget, const char *text, dt_bauhaus_combobox_alignment_t align, gpointer data, void(*free_func)(void *), int pos)
 
int dt_bauhaus_combobox_length (GtkWidget *widget)
 
const char * dt_bauhaus_combobox_get_text (GtkWidget *widget)
 
gpointer dt_bauhaus_combobox_get_data (GtkWidget *widget)
 
void dt_bauhaus_combobox_clear (GtkWidget *widget)
 
const char * dt_bauhaus_combobox_get_entry (GtkWidget *widget, int pos)
 
void dt_bauhaus_combobox_set_text (GtkWidget *widget, const char *text)
 
static gint _delayed_combobox_commit (gpointer data)
 
void dt_bauhaus_combobox_set (GtkWidget *widget, const int pos)
 
gboolean dt_bauhaus_combobox_set_from_text (GtkWidget *widget, const char *text)
 
gboolean dt_bauhaus_combobox_set_from_value (GtkWidget *widget, int value)
 
int dt_bauhaus_combobox_get (GtkWidget *widget)
 
void dt_bauhaus_combobox_entry_set_sensitive (GtkWidget *widget, int pos, gboolean sensitive)
 
void dt_bauhaus_slider_clear_stops (GtkWidget *widget)
 
void dt_bauhaus_slider_set_stop (GtkWidget *widget, float stop, float r, float g, float b)
 
static void draw_equilateral_triangle (cairo_t *cr, float radius)
 
static void dt_bauhaus_draw_indicator (struct dt_bauhaus_widget_t *w, float pos, cairo_t *cr, float wd, const GdkRGBA fg_color, const GdkRGBA border_color)
 
static void dt_bauhaus_draw_quad (struct dt_bauhaus_widget_t *w, cairo_t *cr, const double x, const double y)
 
static void dt_bauhaus_draw_baseline (struct dt_bauhaus_widget_t *w, cairo_t *cr, float width)
 Draw the slider baseline, aka the backgronud bar.
 
static gchar * _build_label (const struct dt_bauhaus_widget_t *w)
 
static float _get_combobox_max_width (GtkWidget *widget)
 
void dt_bauhaus_hide_popup (dt_bauhaus_t *bh)
 
void dt_bauhaus_show_popup (GtkWidget *widget)
 
static void _slider_add_step (GtkWidget *widget, float delta, guint state)
 
float dt_bauhaus_slider_get (GtkWidget *widget)
 
float dt_bauhaus_slider_get_val (GtkWidget *widget)
 
char * dt_bauhaus_slider_get_text (GtkWidget *w, float val)
 
void dt_bauhaus_slider_set (GtkWidget *widget, float pos)
 
void dt_bauhaus_slider_set_val (GtkWidget *widget, float val)
 
void dt_bauhaus_slider_set_digits (GtkWidget *widget, int val)
 
int dt_bauhaus_slider_get_digits (GtkWidget *widget)
 
void dt_bauhaus_slider_set_step (GtkWidget *widget, float val)
 
float dt_bauhaus_slider_get_step (GtkWidget *widget)
 
void dt_bauhaus_slider_set_feedback (GtkWidget *widget, int feedback)
 
void dt_bauhaus_slider_reset (GtkWidget *widget)
 
void dt_bauhaus_slider_set_format (GtkWidget *widget, const char *format)
 
void dt_bauhaus_slider_set_factor (GtkWidget *widget, float factor)
 
void dt_bauhaus_slider_set_offset (GtkWidget *widget, float offset)
 
static gboolean _delayed_slider_commit (gpointer data)
 
void dt_bauhaus_disable_accels (GtkWidget *widget)
 
void dt_bauhaus_set_use_default_callback (GtkWidget *widget)
 Tell the widget to use the globally-defined default callback in the bauhaus structure This callback needs to be defined first, of course.
 

Macro Definition Documentation

◆ DEBUG

#define DEBUG   0

Typedef Documentation

◆ _bh_active_region_t

◆ _bh_halign_t

typedef enum _bh_halign_t _bh_halign_t

◆ _bh_valign_t

typedef enum _bh_valign_t _bh_valign_t

Enumeration Type Documentation

◆ _bh_active_region_t

Enumerator
BH_REGION_OUT 
BH_REGION_MAIN 
BH_REGION_QUAD 

◆ _bh_halign_t

Enumerator
BH_ALIGN_LEFT 
BH_ALIGN_RIGHT 
BH_ALIGN_CENTER 

◆ _bh_valign_t

Enumerator
BH_ALIGN_TOP 
BH_ALIGN_BOTTOM 
BH_ALIGN_MIDDLE 

Function Documentation

◆ _action_request_focus()

gboolean _action_request_focus ( GtkAccelGroup *  accel_group,
GObject *  accelerable,
guint  keyval,
GdkModifierType  modifier,
gpointer  data 
)

◆ _bauhaus_widget_init()

◆ _bh_combobox_get_hovered_entry()

◆ _bh_get_active_region()

static _bh_active_region_t _bh_get_active_region ( GtkWidget *  widget,
double x,
double y,
double width,
GtkWidget *  popup 
)
static

Check if we have user cursor over quad area or over the slider/main area, then correct cursor coordinates for widget padding and margin. For sliders, it means that x = 0 is mapped to the origin of the scale.

Parameters
widgetBauhaus widget
eventUser event
xInitial coordinate x of the cursor. Will be corrected in-place for margin and padding.
yInitial coordinate y of the cursor. Will be corrected in-place for margin and padding.
widthReturn pointer for the main width. Can be NULL. Caller owns the memory and is responsible for freeing it.
popupPointer to the Gtk window for the popup if any. Can be NULL. Height is computed from there if defined.
Returns
_bh_active_region_t the region being selected, or BH_REGION_OUT (aka 0) if the cursor is outside the padding box (inactive region).

References _translate_cursor(), _widget_get_main_height(), _widget_get_main_width(), BH_REGION_MAIN, BH_REGION_OUT, BH_REGION_QUAD, DT_BAUHAUS_WIDGET, INTERNAL_PADDING, and width.

Referenced by _popup_coordinates(), dt_bauhaus_combobox_button_press(), dt_bauhaus_slider_button_press(), and dt_bauhaus_slider_motion_notify().

◆ _bh_get_row_height()

static float _bh_get_row_height ( struct dt_bauhaus_widget_t w)
static

Get the total height of a GUI row containing a line of text + top and bottom padding.

This applies to comboboxes list elements only. Sliders text lines have only bottom padding.

Returns
float

References dt_bauhaus_widget_t::bauhaus, and dt_bauhaus_t::line_height.

Referenced by _bh_combobox_get_hovered_entry(), _get_combobox_height(), _get_combobox_popup_height(), dt_bauhaus_draw_quad(), and dt_bauhaus_popup_draw().

◆ _bh_round_to_n_digits()

static float _bh_round_to_n_digits ( const struct dt_bauhaus_widget_t *const  w,
float  x 
)
static

Round a slider numeric value to the number of digits specified in the widget w.

Parameters
w
xValue to round.
Returns
float

References dt_bauhaus_widget_t::data, dt_bauhaus_slider_data_t::digits, factor, ipow(), and dt_bauhaus_data_t::slider.

Referenced by dt_bauhaus_slider_set_hard_max(), and dt_bauhaus_slider_set_hard_min().

◆ _bh_slider_get_min_step()

static float _bh_slider_get_min_step ( const struct dt_bauhaus_widget_t *const  w)
static

Return the minimum representable value step, for current UI scaling factor and number of digits.

Parameters
w
Returns
float

References dt_bauhaus_widget_t::data, dt_bauhaus_slider_data_t::digits, dt_bauhaus_slider_data_t::factor, ipow(), and dt_bauhaus_data_t::slider.

Referenced by _bh_slider_get_scale(), and _slider_zoom_range().

◆ _bh_slider_get_scale()

◆ _build_label()

static gchar * _build_label ( const struct dt_bauhaus_widget_t w)
static

◆ _combobox_data()

◆ _combobox_next_sensitive()

◆ _combobox_set()

void _combobox_set ( GtkWidget *  widget,
const int  pos,
gboolean  timeout 
)
static

Set a combobox to a given integer position. Private API function, called from user events.

Parameters
widget
pos-1 for "custom" value in editable comboboxes, >= 0 for items in the list
timeoutTRUE to apply an adaptative timeout preventing intermediate setting steps (e.g. while scrolling) to emit too many value-changed signals and committing to pipeline. FALSE forces immediate dispatch of new value, when there is no ambiguity that the setting is final (e.g left click).

References _delayed_combobox_commit(), dt_bauhaus_combobox_data_t::active, dt_bauhaus_widget_t::bauhaus, dt_bauhaus_data_t::combobox, dt_bauhaus_t::current, darktable, dt_bauhaus_widget_t::data, DT_BAUHAUS_WIDGET, dt_bauhaus_combobox_data_t::entries, darktable_t::gui, dt_bauhaus_t::popup_area, dt_gui_gtk_t::reset, dt_bauhaus_widget_t::timeout, and dt_bauhaus_combobox_data_t::timeout_handle.

Referenced by _combobox_next_sensitive(), dt_bauhaus_combobox_button_press(), dt_bauhaus_combobox_set(), dt_bauhaus_popup_button_press(), and dt_bauhaus_widget_accept().

◆ _delayed_combobox_commit()

◆ _delayed_slider_commit()

◆ _enter_leave()

static gboolean _enter_leave ( GtkWidget *  widget,
GdkEventCrossing *  event 
)
static

◆ _get_combobox_height()

static double _get_combobox_height ( GtkWidget *  widget)
static

◆ _get_combobox_max_width()

◆ _get_combobox_popup_height()

◆ _get_indicator_y_position()

static double _get_indicator_y_position ( struct dt_bauhaus_widget_t w)
static

◆ _get_preferred_width()

static void _get_preferred_width ( GtkWidget *  widget,
gint *  minimum_size,
gint *  natural_size 
)
static

◆ _get_slider_bar_height()

◆ _get_slider_height()

◆ _margins_retrieve()

static void _margins_retrieve ( struct dt_bauhaus_widget_t w)
static

Update the box margin and padding properties of the widget w by reading CSS context.

Parameters
wThe widget to update and from which the CSS context is read.

References dt_bauhaus_widget_t::margin, and dt_bauhaus_widget_t::padding.

Referenced by _style_updated(), and _widget_draw().

◆ _popup_coordinates()

static _bh_active_region_t _popup_coordinates ( dt_bauhaus_t bh,
const double  x_root,
const double  y_root,
double event_x,
double event_y 
)
static

◆ _slider_add_step()

◆ _slider_zoom_range()

◆ _style_updated()

static void _style_updated ( GtkWidget *  widget)
static

◆ _translate_cursor()

static void _translate_cursor ( double x,
double y,
struct dt_bauhaus_widget_t *const  w 
)
static

Translate in-place the cursor coordinates within the widget or popup according to padding and margin, so x = 0 is mapped to the starting point of the slider.

Parameters
xCursor coordinate x
yCursor coordinate y
wWidget

References dt_bauhaus_widget_t::margin, and dt_bauhaus_widget_t::padding.

Referenced by _bh_get_active_region().

◆ _widget_draw()

◆ _widget_finalize()

◆ _widget_get_main_height()

static double _widget_get_main_height ( struct dt_bauhaus_widget_t w,
GtkWidget *  widget 
)
static

Get the height of the main Bauhaus widget area (slider scale or combobox), that is the box allocation minus padding and margins.

Parameters
wPointer to the structure holding the widget attributes, aka the dt_bauhaus_widget_t
widgetActual GtkWidget to get allocation from. Can be NULL if it's the same as the Bauhaus widget.
Returns
double

References dt_bauhaus_widget_t::margin, and dt_bauhaus_widget_t::padding.

Referenced by _bh_get_active_region(), _widget_draw(), dt_bauhaus_popup_draw(), and dt_bauhaus_popup_motion_notify().

◆ _widget_get_main_width()

static double _widget_get_main_width ( struct dt_bauhaus_widget_t w,
GtkWidget *  widget,
double total_width 
)
static

Get the width of the main Bauhaus widget area (slider scale or combobox), accounting for quad space, padding and margins.

Parameters
wPointer to the structure holding the widget attributes, aka the dt_bauhaus_widget_t
widgetActual GtkWidget to get allocation from. Can be NULL if it's the same as the Bauhaus widget.
total_widthPointer where to write the total width of the widget, which is used in intermediate computations. This will spare another call to gtk_widget_get_allocation() if both are needed. Can be NULL.
Returns
double

References _widget_get_quad_width(), _widget_get_total_width(), and INNER_PADDING.

Referenced by _bh_get_active_region(), _widget_draw(), dt_bauhaus_popup_draw(), dt_bauhaus_popup_motion_notify(), and dt_bauhaus_slider_button_release().

◆ _widget_get_quad_width()

static double _widget_get_quad_width ( struct dt_bauhaus_widget_t w)
static

Get the width of the quad without padding.

Parameters
w
Returns
double

References dt_bauhaus_widget_t::bauhaus, dt_bauhaus_t::quad_width, and dt_bauhaus_widget_t::show_quad.

Referenced by _widget_get_main_width().

◆ _widget_get_total_width()

static double _widget_get_total_width ( struct dt_bauhaus_widget_t w,
GtkWidget *  widget 
)
static

Get the total width of the main Bauhaus widget area, accounting for padding and margins.

Parameters
wPointer to the structure holding the widget attributes, aka the dt_bauhaus_widget_t
widgetActual GtkWidget to get allocation from. Can be NULL if it's the same as the Bauhaus widget.
Returns
double

References dt_bauhaus_widget_t::margin, and dt_bauhaus_widget_t::padding.

Referenced by _widget_get_main_width().

◆ _widget_key_press()

◆ _widget_scroll()

◆ default_color_assign()

static GdkRGBA * default_color_assign ( )
static

◆ draw_equilateral_triangle()

static void draw_equilateral_triangle ( cairo_t *  cr,
float  radius 
)
static

References M_PI.

Referenced by dt_bauhaus_draw_indicator().

◆ draw_slider_line()

static void draw_slider_line ( cairo_t *  cr,
const double  pos,
const double  off,
const double  scale,
const double  width,
const double  height,
const double  line_height,
double  line_width 
)
static

References double(), height, sqf(), and width.

Referenced by dt_bauhaus_popup_draw().

◆ dt_bauhaus_cleanup()

void dt_bauhaus_cleanup ( dt_bauhaus_t bauhaus)

Referenced by dt_cleanup().

◆ dt_bauhaus_combobox_add()

◆ dt_bauhaus_combobox_add_aligned()

void dt_bauhaus_combobox_add_aligned ( GtkWidget *  widget,
const char *  text,
dt_bauhaus_combobox_alignment_t  align 
)

◆ dt_bauhaus_combobox_add_full()

◆ dt_bauhaus_combobox_add_list()

void dt_bauhaus_combobox_add_list ( GtkWidget *  widget,
const char **  texts 
)

◆ dt_bauhaus_combobox_add_populate_fct()

void dt_bauhaus_combobox_add_populate_fct ( GtkWidget *  widget,
void(*)(GtkWidget *w, void *module)  fct 
)

◆ dt_bauhaus_combobox_button_press()

◆ dt_bauhaus_combobox_clear()

◆ dt_bauhaus_combobox_entry_set_sensitive()

void dt_bauhaus_combobox_entry_set_sensitive ( GtkWidget *  widget,
int  pos,
gboolean  sensitive 
)

◆ dt_bauhaus_combobox_from_widget()

◆ dt_bauhaus_combobox_get()

int dt_bauhaus_combobox_get ( GtkWidget *  widget)

References _combobox_data(), and dt_bauhaus_combobox_data_t::active.

Referenced by _area_scrolled_callback(), _auto_set_exposure(), _auto_set_illuminant(), _blendop_masks_mode_changed(), _callback_bool(), _color_mode_changed(), _colorchecker_rebuild_patch_list(), _dimensions_type_changed(), _display_callback(), _edit_preset_response(), _event_aspect_presets_changed(), _intent_callback(), _intent_changed(), _interpolator_callback(), _needs_recompute(), _orientation_changed(), _printer_intent_callback(), _printer_profile_changed(), _profile_changed(), _profile_changed(), _redraw_surface(), _settings_colors_changed(), _settings_flip_changed(), _settings_flip_update(), _settings_guides_changed(), _settings_update_visibility(), _size_in_px_update(), _size_update_display(), _spot_settings_changed_callback(), _spot_settings_changed_callback(), _stage_callback(), _statistic_changed(), _style_callback(), _style_changed(), _unit_changed(), ask_user_confirmation(), aspect_changed(), aspect_presets_changed(), bit_depth_changed(), bit_depth_changed(), blue_callback(), bpp_combobox_changed(), bpp_combobox_changed(), bpp_combobox_changed(), bpp_toggle_callback(), btn_toggled(), checker_changed_callback(), color_mode_changed(), colorscheme_callback(), compress_combobox_changed(), compression_changed(), compression_combobox_changed(), compression_toggle_callback(), compression_type_changed(), cropmode_callback(), dt_masks_iop_value_changed_callback(), fitting_option_changed(), format_changed(), get_params(), get_params(), green_callback(), gui_changed(), gui_reset(), gui_reset(), gui_update(), hint_combobox_changed(), hvflip_callback(), icc_toggle_callback(), interpolator_callback(), interpolator_callback(), interpolator_callback(), keystone_type_changed(), mode_callback(), mode_callback(), mode_toggle_callback(), modflags_changed(), onsave_action_toggle_callback(), optimize_changed_callback(), orientation_toggle_callback(), output_callback(), pages_toggle_callback(), patch_callback(), pixels2print(), position_h_changed(), position_v_changed(), preset_changed(), preset_tune_callback(), print2pixels(), profile_callback(), profile_changed(), rawoverexposed_colorscheme_callback(), rawoverexposed_mode_callback(), red_callback(), rotate_toggle_callback(), selected_member(), set_format_by_name(), set_visible_widgets(), shortfile_combobox_changed(), size_toggle_callback(), softproof_profile_callback(), target_callback(), target_geometry_changed(), tiling_changed(), watermark_callback(), and workicc_changed().

◆ dt_bauhaus_combobox_get_data()

◆ dt_bauhaus_combobox_get_editable()

int dt_bauhaus_combobox_get_editable ( GtkWidget *  widget)

◆ dt_bauhaus_combobox_get_entry()

const char * dt_bauhaus_combobox_get_entry ( GtkWidget *  widget,
int  pos 
)

◆ dt_bauhaus_combobox_get_text()

◆ dt_bauhaus_combobox_insert()

void dt_bauhaus_combobox_insert ( GtkWidget *  widget,
const char *  text,
int  pos 
)

◆ dt_bauhaus_combobox_insert_full()

void dt_bauhaus_combobox_insert_full ( GtkWidget *  widget,
const char *  text,
dt_bauhaus_combobox_alignment_t  align,
gpointer  data,
void(*)(void *)  free_func,
int  pos 
)

◆ dt_bauhaus_combobox_length()

◆ dt_bauhaus_combobox_new()

◆ dt_bauhaus_combobox_new_full()

GtkWidget * dt_bauhaus_combobox_new_full ( dt_bauhaus_t bh,
dt_gui_module_t self,
const char *  label,
const char *  tip,
int  pos,
GtkCallback  callback,
gpointer  data,
const char **  texts 
)

◆ dt_bauhaus_combobox_remove_at()

◆ dt_bauhaus_combobox_set()

◆ dt_bauhaus_combobox_set_default()

void dt_bauhaus_combobox_set_default ( GtkWidget *  widget,
int  def 
)

◆ dt_bauhaus_combobox_set_editable()

◆ dt_bauhaus_combobox_set_entries_ellipsis()

void dt_bauhaus_combobox_set_entries_ellipsis ( GtkWidget *  widget,
PangoEllipsizeMode  ellipis 
)

◆ dt_bauhaus_combobox_set_from_text()

◆ dt_bauhaus_combobox_set_from_value()

◆ dt_bauhaus_combobox_set_selected_text_align()

◆ dt_bauhaus_combobox_set_text()

◆ dt_bauhaus_disable_accels()

void dt_bauhaus_disable_accels ( GtkWidget *  widget)

◆ dt_bauhaus_draw_baseline()

◆ dt_bauhaus_draw_indicator()

static void dt_bauhaus_draw_indicator ( struct dt_bauhaus_widget_t w,
float  pos,
cairo_t *  cr,
float  wd,
const GdkRGBA  fg_color,
const GdkRGBA  border_color 
)
static

◆ dt_bauhaus_draw_quad()

◆ dt_bauhaus_focus_callback()

gboolean dt_bauhaus_focus_callback ( GtkWidget *  widget,
GtkDirectionType  direction,
gpointer  data 
)

References FALSE, and TRUE.

Referenced by _bauhaus_widget_init().

◆ dt_bauhaus_focus_in_callback()

gboolean dt_bauhaus_focus_in_callback ( GtkWidget *  widget,
GdkEventFocus  event,
gpointer  user_data 
)

◆ dt_bauhaus_focus_out_callback()

gboolean dt_bauhaus_focus_out_callback ( GtkWidget *  widget,
GdkEventFocus  event,
gpointer  user_data 
)

◆ dt_bauhaus_hide_popup()

◆ dt_bauhaus_init()

◆ dt_bauhaus_load_theme()

◆ dt_bauhaus_popup_button_press()

◆ dt_bauhaus_popup_button_release()

static gboolean dt_bauhaus_popup_button_release ( GtkWidget *  widget,
GdkEventButton *  event,
gpointer  user_data 
)
static

◆ dt_bauhaus_popup_draw()

◆ dt_bauhaus_popup_key_press()

◆ dt_bauhaus_popup_leave_notify()

static gboolean dt_bauhaus_popup_leave_notify ( GtkWidget *  widget,
GdkEventCrossing *  event,
gpointer  user_data 
)
static

References TRUE.

Referenced by dt_bauhaus_init().

◆ dt_bauhaus_popup_motion_notify()

◆ dt_bauhaus_popup_scroll()

static gboolean dt_bauhaus_popup_scroll ( GtkWidget *  widget,
GdkEventScroll *  event,
gpointer  user_data 
)
static

◆ dt_bauhaus_set_use_default_callback()

void dt_bauhaus_set_use_default_callback ( GtkWidget *  widget)

Tell the widget to use the globally-defined default callback in the bauhaus structure This callback needs to be defined first, of course.

Parameters
widget

References TRUE, and dt_bauhaus_widget_t::use_default_callback.

Referenced by _combobox_new_from_list(), dt_iop_gui_init_blendif(), dt_iop_gui_init_blending(), dt_iop_gui_init_masks(), and dt_iop_gui_init_raster().

◆ dt_bauhaus_show_popup()

◆ dt_bauhaus_slider_button_press()

◆ dt_bauhaus_slider_button_release()

◆ dt_bauhaus_slider_clear_stops()

◆ dt_bauhaus_slider_from_widget()

◆ dt_bauhaus_slider_get()

float dt_bauhaus_slider_get ( GtkWidget *  widget)

References dt_bauhaus_widget_t::data, DT_BAUHAUS_WIDGET, dt_bauhaus_slider_data_t::max, dt_bauhaus_slider_data_t::min, dt_bauhaus_slider_data_t::pos, and dt_bauhaus_data_t::slider.

Referenced by _auto_set_exposure(), _auto_set_illuminant(), _blendop_blendif_boost_factor_callback(), _blendop_blendif_details_callback(), _grid_horizontal_changed(), _grid_subdiv_changed(), _grid_vertical_changed(), _opacity_changed_callback(), _settings_contrast_changed(), _slider_add_step(), _slider_zoom_range(), _spot_settings_changed_callback(), _spot_settings_changed_callback(), _target_color_draw(), _widget_draw(), balance_callback(), black_point_source_callback(), black_point_target_callback(), blue_callback(), button_released(), checker_size_callback(), color_rgb_sliders(), color_temptint_sliders(), compress_level_changed(), compression_level_changed(), contrast_callback(), display_borders_callback(), display_brightness_callback(), dt_bauhaus_popup_draw(), dt_bauhaus_slider_get_val(), dt_bauhaus_slider_set_hard_max(), dt_bauhaus_slider_set_hard_min(), dt_bauhaus_slider_set_soft_max(), dt_bauhaus_slider_set_soft_min(), dt_bauhaus_value_changed_default_callback(), extra_callback(), global_saturation_callback(), green_callback(), grey_point_source_callback(), grey_point_target_callback(), gui_changed(), gui_update(), illum_xy_callback(), latitude_stops_callback(), logbase_callback(), logbase_callback(), lower_callback(), mix_callback(), output_power_callback(), paint_hue(), preset_tune_callback(), quality_changed(), quality_changed(), quality_changed(), quality_changed(), radius_callback(), rawoverexposed_threshold_callback(), red_callback(), rt_mask_opacity_callback(), safety_changed_callback(), saturation_callback(), security_threshold_callback(), slope_callback(), smoothing_callback(), target_a_callback(), target_b_callback(), target_C_callback(), target_color_draw(), target_L_callback(), temp_tint_callback(), upper_callback(), value_member(), white_point_source_callback(), and white_point_target_callback().

◆ dt_bauhaus_slider_get_digits()

int dt_bauhaus_slider_get_digits ( GtkWidget *  widget)

◆ dt_bauhaus_slider_get_hard_max()

float dt_bauhaus_slider_get_hard_max ( GtkWidget *  widget)

◆ dt_bauhaus_slider_get_hard_min()

float dt_bauhaus_slider_get_hard_min ( GtkWidget *  widget)

◆ dt_bauhaus_slider_get_soft_max()

float dt_bauhaus_slider_get_soft_max ( GtkWidget *  widget)

◆ dt_bauhaus_slider_get_soft_min()

float dt_bauhaus_slider_get_soft_min ( GtkWidget *  widget)

◆ dt_bauhaus_slider_get_step()

◆ dt_bauhaus_slider_get_text()

◆ dt_bauhaus_slider_get_val()

float dt_bauhaus_slider_get_val ( GtkWidget *  widget)

◆ dt_bauhaus_slider_motion_notify()

static gboolean dt_bauhaus_slider_motion_notify ( GtkWidget *  widget,
GdkEventMotion *  event,
gpointer  user_data 
)
static

◆ dt_bauhaus_slider_new()

GtkWidget * dt_bauhaus_slider_new ( dt_bauhaus_t bh,
dt_gui_module_t self 
)

◆ dt_bauhaus_slider_new_with_range()

GtkWidget * dt_bauhaus_slider_new_with_range ( dt_bauhaus_t bh,
dt_gui_module_t self,
float  min,
float  max,
float  step,
float  defval,
int  digits 
)

◆ dt_bauhaus_slider_new_with_range_and_feedback()

GtkWidget * dt_bauhaus_slider_new_with_range_and_feedback ( dt_bauhaus_t bh,
dt_gui_module_t self,
float  min,
float  max,
float  step,
float  defval,
int  digits,
int  feedback 
)

◆ dt_bauhaus_slider_reset()

◆ dt_bauhaus_slider_set()

void dt_bauhaus_slider_set ( GtkWidget *  widget,
float  pos 
)

References dt_bauhaus_widget_t::data, dt_bauhaus_slider_set_normalized(), DT_BAUHAUS_WIDGET, FALSE, dt_bauhaus_slider_data_t::hard_max, dt_bauhaus_slider_data_t::hard_min, dt_bauhaus_slider_data_t::max, dt_bauhaus_slider_data_t::min, dt_bauhaus_data_t::slider, dt_bauhaus_slider_data_t::soft_max, dt_bauhaus_slider_data_t::soft_min, and TRUE.

Referenced by _auto_set_exposure(), _auto_set_illuminant(), _blendop_blend_mode_callback(), _blendop_blendif_update_tab(), _colorchecker_update_sliders(), _develop_ui_pipe_finished_callback(), _exposure_set_black(), _exposure_set_white(), _guides_gui_grid(), _reset_opacity_slider(), _set_opacity_slider(), _slider_add_step(), _slider_zoom_range(), apply_auto_black(), apply_auto_black(), apply_auto_black(), apply_auto_black(), apply_auto_Dmax(), apply_auto_Dmin(), apply_auto_dynamic_range(), apply_auto_exposure(), apply_auto_grey(), apply_auto_grey(), apply_auto_grey(), apply_auto_offset(), apply_auto_WB_high(), apply_auto_WB_low(), apply_auto_white_point_source(), apply_auto_white_point_source(), apply_autocolor(), apply_autogrey(), apply_autoluma(), apply_autotune(), apply_autotune(), apply_autotune(), apply_gain_auto(), apply_gain_neutralize(), apply_gamma_auto(), apply_gamma_neutralize(), apply_lift_auto(), apply_lift_neutralize(), aspect_changed(), auto_adjust_contrast_boost(), auto_adjust_exposure_boost(), autoscale_pressed(), button_released(), color_picker_apply(), colorpick_callback(), commit_profile_callback(), Dmin_picker_callback(), do_fit(), dt_bauhaus_slider_reset(), dt_bauhaus_slider_set_hard_max(), dt_bauhaus_slider_set_hard_min(), dt_bauhaus_slider_set_soft_max(), dt_bauhaus_slider_set_soft_min(), dt_bauhaus_slider_set_val(), dt_bauhaus_update_module(), dt_guides_popover(), dt_guides_update_popover_values(), dt_iop_colorcorrection_scrolled(), dt_iop_gui_update_blending(), extra_callback(), grey_point_source_callback(), gui_changed(), gui_init(), gui_init(), gui_init(), gui_post_expose(), gui_reset(), gui_reset(), gui_update(), gui_update(), gui_update(), gui_update(), illum_xy_callback(), lens_menu_select(), mouse_moved(), output_callback(), position_h_changed(), position_v_changed(), preset_tune_callback(), reset_mix(), rt_shape_selection_changed(), sanitize_latitude(), scrolled(), security_threshold_callback(), set_HSL_sliders(), set_params(), set_RGB_sliders(), target_a_callback(), target_b_callback(), target_C_callback(), temp_tint_callback(), update_exposure_sliders(), value_member(), Wb_high_norm_callback(), WB_high_picker_callback(), Wb_low_norm_callback(), and WB_low_picker_callback().

◆ dt_bauhaus_slider_set_default()

◆ dt_bauhaus_slider_set_digits()

void dt_bauhaus_slider_set_digits ( GtkWidget *  widget,
int  val 
)

◆ dt_bauhaus_slider_set_factor()

void dt_bauhaus_slider_set_factor ( GtkWidget *  widget,
float  factor 
)

◆ dt_bauhaus_slider_set_feedback()

◆ dt_bauhaus_slider_set_format()

◆ dt_bauhaus_slider_set_hard_max()

◆ dt_bauhaus_slider_set_hard_min()

◆ dt_bauhaus_slider_set_normalized()

static void dt_bauhaus_slider_set_normalized ( struct dt_bauhaus_widget_t w,
float  pos,
gboolean  raise,
gboolean  timeout 
)
static

Set the value of a slider as a ratio of the GUI slider width.

Parameters
wBauhaus widget
posRelative position over the slider bar (ratio between 0 and 1)
raiseSet to FALSE to redraw slider position without committing the actual value to pipeline nor sending the value-changed event (e.g. in motion-notify events, while dragging). Set to TRUE when the change is finished (e.g. in button-pressed events).
timeoutTRUE to add a timeout preventing intermediate setting steps (e.g. while scrolling) to emit value-changed signal and commit to pipeline too often. FALSE to set immediately, when there is no ambiguity on the final setting (e.g. at init time and on click). Doesn't change anything if raise is FALSE.

References _delayed_slider_commit(), dt_bauhaus_widget_t::bauhaus, dt_bauhaus_t::current, darktable, dt_bauhaus_widget_t::data, dt_bauhaus_slider_data_t::digits, dt_bauhaus_slider_data_t::factor, darktable_t::gui, ipow(), dt_bauhaus_slider_data_t::max, dt_bauhaus_slider_data_t::min, dt_bauhaus_t::popup_area, dt_bauhaus_slider_data_t::pos, precision(), dt_gui_gtk_t::reset, dt_bauhaus_data_t::slider, dt_bauhaus_widget_t::timeout, and dt_bauhaus_slider_data_t::timeout_handle.

Referenced by dt_bauhaus_popup_button_press(), dt_bauhaus_popup_motion_notify(), dt_bauhaus_slider_button_press(), dt_bauhaus_slider_button_release(), dt_bauhaus_slider_motion_notify(), dt_bauhaus_slider_set(), dt_bauhaus_widget_accept(), and dt_bauhaus_widget_reject().

◆ dt_bauhaus_slider_set_offset()

void dt_bauhaus_slider_set_offset ( GtkWidget *  widget,
float  offset 
)

◆ dt_bauhaus_slider_set_soft_max()

◆ dt_bauhaus_slider_set_soft_min()

◆ dt_bauhaus_slider_set_soft_range()

void dt_bauhaus_slider_set_soft_range ( GtkWidget *  widget,
float  soft_min,
float  soft_max 
)

◆ dt_bauhaus_slider_set_step()

void dt_bauhaus_slider_set_step ( GtkWidget *  widget,
float  val 
)

◆ dt_bauhaus_slider_set_stop()

◆ dt_bauhaus_slider_set_val()

void dt_bauhaus_slider_set_val ( GtkWidget *  widget,
float  val 
)

◆ dt_bauhaus_widget_accept()

◆ dt_bauhaus_widget_get_label()

const char * dt_bauhaus_widget_get_label ( GtkWidget *  widget)

◆ dt_bauhaus_widget_get_quad_active()

int dt_bauhaus_widget_get_quad_active ( GtkWidget *  widget)

◆ dt_bauhaus_widget_press_quad()

◆ dt_bauhaus_widget_reject()

◆ dt_bauhaus_widget_release_quad()

void dt_bauhaus_widget_release_quad ( GtkWidget *  widget)

◆ dt_bauhaus_widget_set_field()

◆ dt_bauhaus_widget_set_label()

◆ dt_bauhaus_widget_set_quad_active()

◆ dt_bauhaus_widget_set_quad_paint()

void dt_bauhaus_widget_set_quad_paint ( GtkWidget *  widget,
dt_bauhaus_quad_paint_f  f,
int  paint_flags,
void paint_data 
)

◆ dt_bauhaus_widget_set_quad_toggle()

void dt_bauhaus_widget_set_quad_toggle ( GtkWidget *  widget,
int  toggle 
)

◆ dt_bauhaus_widget_set_quad_visibility()

void dt_bauhaus_widget_set_quad_visibility ( GtkWidget *  widget,
const gboolean  visible 
)

◆ dt_bauhaus_window_show()

static void dt_bauhaus_window_show ( GtkWidget *  w,
gpointer  user_data 
)
static

Referenced by dt_bauhaus_init().

◆ dt_bh_class_init()

◆ dt_bh_init()

static void dt_bh_init ( DtBauhausWidget class)
static
Todo:
: the common code from bauhaus_widget_init() could go here.

◆ ensure_focus_idle()

static gboolean ensure_focus_idle ( gpointer  data)
static

◆ free_combobox_entry()

◆ get_slider_line_offset()

static double get_slider_line_offset ( const double  pos,
const double  scale,
const double  x,
double  y,
const double  line_height 
)
static

References sqf().

Referenced by dt_bauhaus_popup_motion_notify().

◆ new_combobox_entry()

◆ show_pango_text()

static void show_pango_text ( struct dt_bauhaus_widget_t w,
GtkStyleContext *  context,
cairo_t *  cr,
GdkRectangle *  bounding_box,
const char *  text,
_bh_halign_t  halign,
_bh_valign_t  valign,
PangoEllipsizeMode  ellipsize,
GdkRGBA *  bg_color,
float *  width,
float *  height,
GtkStateFlags  state 
)
static

Display text aligned in a bounding box, with pseudo-classes properties handled, and optional background color.

Parameters
wThe current widget
contextGtk CSS context
crCairo drawing object
bounding_boxThe bounding box in which the text should fit.
textThe text content to display.
halignHorizontal alignment within the bounding box
valignVertical alignment within the bounding box
ellipsizePango ellipsization strategy, used only if text overflows its bounding box.
bg_colorBackground color to paint in the bounding box. Can be NULL.
widthPointer where text spanning width will be returned in Cairo units. Can be NULL.
heightPointer where text spanning height will be returned in Cairo units. Can be NULL.
ignore_pseudo_classesDisregard styling done in pseudo-classes and use the normal style.

References dt_bauhaus_widget_t::bauhaus, BH_ALIGN_BOTTOM, BH_ALIGN_CENTER, BH_ALIGN_LEFT, BH_ALIGN_MIDDLE, BH_ALIGN_RIGHT, BH_ALIGN_TOP, double(), height, dt_bauhaus_t::line_height, and width.

Referenced by _get_combobox_max_width(), _widget_draw(), and dt_bauhaus_popup_draw().