14#include "utils/color.h"
15#include "utils/format.h"
23#define UI_CACHES (zrythm_app->ui_caches_)
24#define UI_COLORS (&UI_CACHES->colors_)
27constexpr const char * UI_COLOR_DARK_TEXT =
"#323232";
28constexpr const char * UI_COLOR_BRIGHT_TEXT =
"#cdcdcd";
29constexpr const char * UI_COLOR_YELLOW =
"#F9CA1B";
30constexpr const char * UI_COLOR_PURPLE =
"#9D3955";
31constexpr const char * UI_COLOR_BUTTON_NORMAL =
"#343434";
32constexpr const char * UI_COLOR_BUTTON_HOVER =
"#444444";
33constexpr const char * UI_COLOR_RECORD_CHECKED =
"#ED2939";
34constexpr const char * UI_COLOR_RECORD_ACTIVE =
"#FF2400";
35constexpr const char * UI_COLOR_BRIGHT_GREEN =
"#1DD169";
36constexpr const char * UI_COLOR_DARKISH_GREEN =
"#19664c";
37constexpr const char * UI_COLOR_DARK_ORANGE =
"#D68A0C";
38constexpr const char * UI_COLOR_Z_YELLOW =
"#F9CA1B";
39constexpr const char * UI_COLOR_BRIGHT_ORANGE =
"#F79616";
40constexpr const char * UI_COLOR_Z_PURPLE =
"#9D3955";
41constexpr const char * UI_COLOR_MATCHA =
"#2eb398";
42constexpr const char * UI_COLOR_LIGHT_BLUEISH =
"#1aa3ffcc";
43constexpr const char * UI_COLOR_PREFADER_SEND =
"#D21E6D";
44constexpr const char * UI_COLOR_POSTFADER_SEND =
"#901ed2";
45constexpr const char * UI_COLOR_SOLO_ACTIVE = UI_COLOR_MATCHA;
46constexpr const char * UI_COLOR_SOLO_CHECKED = UI_COLOR_DARKISH_GREEN;
47constexpr const char * UI_COLOR_HIGHLIGHT_SCALE_BG =
"#662266";
48constexpr const char * UI_COLOR_HIGHLIGHT_CHORD_BG =
"#BB22BB";
49constexpr const char * UI_COLOR_HIGHLIGHT_BASS_BG = UI_COLOR_LIGHT_BLUEISH;
50constexpr const char * UI_COLOR_HIGHLIGHT_BOTH_BG =
"#FF22FF";
51constexpr const char * UI_COLOR_HIGHLIGHT_SCALE_FG =
"#F79616";
52constexpr const char * UI_COLOR_HIGHLIGHT_CHORD_FG = UI_COLOR_HIGHLIGHT_SCALE_FG;
53constexpr const char * UI_COLOR_HIGHLIGHT_BASS_FG =
"white";
54constexpr const char * UI_COLOR_HIGHLIGHT_BOTH_FG =
"white";
55constexpr const char * UI_COLOR_FADER_FILL_END = UI_COLOR_Z_YELLOW;
56constexpr const char * UI_DELETE_ICON_NAME =
"z-edit-delete";
79 Color fader_fill_start;
81 Color highlight_scale_bg;
82 Color highlight_chord_bg;
83 Color highlight_bass_bg;
84 Color highlight_both_bg;
85 Color highlight_scale_fg;
86 Color highlight_chord_fg;
87 Color highlight_bass_fg;
88 Color highlight_both_fg;
105 UI_CURSOR_STATE_DEFAULT,
106 UI_CURSOR_STATE_RESIZE_L,
107 UI_CURSOR_STATE_REPEAT_L,
108 UI_CURSOR_STATE_RESIZE_R,
109 UI_CURSOR_STATE_REPEAT_R,
110 UI_CURSOR_STATE_RESIZE_UP,
129 RESIZING_UP_FADE_OUT,
133 STARTING_AUDITIONING,
152 STARTING_MOVING_COPY,
153 STARTING_MOVING_LINK,
157 STARTING_CHANGING_CURVE,
181 NUM_UI_OVERLAY_ACTIONS,
197 "RESIZING_UP_FADE_IN",
198 "RESIZING_UP_FADE_OUT",
201 "STARTING_AUDITIONING",
207 "STARTING_MOVING_COPY",
208 "STARTING_MOVING_LINK",
212 "STARTING_CHANGING_CURVE",
214 "STARTING_SELECTION",
216 "STARTING_DELETE_SELECTION",
235 UI_DRAG_MODE_RELATIVE,
239 UI_DRAG_MODE_RELATIVE_WITH_MULTIPLIER,
244ui_set_pointer_cursor (GtkWidget * widget);
246# define ui_set_pencil_cursor(widget) \
247 ui_set_cursor_from_icon_name (GTK_WIDGET (widget), "edit-cursor", 2, 3);
249# define ui_set_brush_cursor(widget) \
250 ui_set_cursor_from_icon_name (GTK_WIDGET (widget), "brush-cursor", 2, 3);
252# define ui_set_cut_clip_cursor(widget) \
253 ui_set_cursor_from_icon_name (GTK_WIDGET (widget), "cut-cursor", 9, 7);
255# define ui_set_eraser_cursor(widget) \
256 ui_set_cursor_from_icon_name (GTK_WIDGET (widget), "eraser-cursor", 4, 2);
258# define ui_set_line_cursor(widget) \
259 ui_set_cursor_from_icon_name (GTK_WIDGET (widget), "ramp-cursor", 2, 3);
261# define ui_set_speaker_cursor(widget) \
262 ui_set_cursor_from_icon_name ( \
263 GTK_WIDGET (widget), "audition-cursor", 10, 12);
265# define ui_set_hand_cursor(widget) \
266 ui_set_cursor_from_icon_name (GTK_WIDGET (widget), "move-cursor", 12, 11);
268# define ui_set_left_resize_cursor(widget) \
269 ui_set_cursor_from_icon_name ( \
270 GTK_WIDGET (widget), "w-resize-cursor", 14, 11);
272# define ui_set_left_stretch_cursor(widget) \
273 ui_set_cursor_from_icon_name ( \
274 GTK_WIDGET (widget), "w-stretch-cursor", 14, 11);
276# define ui_set_left_resize_loop_cursor(widget) \
277 ui_set_cursor_from_icon_name (GTK_WIDGET (widget), "w-loop-cursor", 14, 11);
279# define ui_set_right_resize_cursor(widget) \
280 ui_set_cursor_from_icon_name ( \
281 GTK_WIDGET (widget), "e-resize-cursor", 10, 11);
283# define ui_set_right_stretch_cursor(widget) \
284 ui_set_cursor_from_icon_name ( \
285 GTK_WIDGET (widget), "e-stretch-cursor", 10, 11);
287# define ui_set_right_resize_loop_cursor(widget) \
288 ui_set_cursor_from_icon_name (GTK_WIDGET (widget), "e-loop-cursor", 10, 11);
290# define ui_set_time_select_cursor(widget) \
291 ui_set_cursor_from_icon_name ( \
292 GTK_WIDGET (widget), "time-select-cursor", 10, 12);
294# define ui_set_fade_in_cursor(widget) \
295 ui_set_cursor_from_icon_name (GTK_WIDGET (widget), "fade-in-cursor", 3, 1);
297# define ui_set_fade_out_cursor(widget) \
298 ui_set_cursor_from_icon_name (GTK_WIDGET (widget), "fade-out-cursor", 3, 1);
Commonly used UI textures.
double ui_get_normalized_draggable_value(double size, double cur_val, double start_px, double cur_px, double last_px, double multiplier, UiDragMode mode)
Gets a draggable value as a normalized value between 0 and 1.
std::string ui_get_db_value_as_string(float val)
Returns an appropriate string representation of the given dB value.
DEFINE_ENUM_FORMATTER(UiOverlayAction, UiOverlayAction, "NONE", "RESIZING_R", "MOVING", "RESIZING_L", "RESIZING_L_LOOP", "RESIZING_L_FADE", "RESIZING_R", "RESIZING_R_LOOP", "RESIZING_R_FADE", "RESIZING_UP", "RESIZING_UP_FADE_IN", "RESIZING_UP_FADE_OUT", "STRETCHING_L", "STRETCHING_R", "STARTING_AUDITIONING", "AUDITIONING", "AUTOFILLING", "ERASING", "STARTING_ERASING", "STARTING_MOVING", "STARTING_MOVING_COPY", "STARTING_MOVING_LINK", "MOVING", "MOVING_COPY", "MOVING_LINK", "STARTING_CHANGING_CURVE", "CHANGING_CURVE", "STARTING_SELECTION", "SELECTING", "STARTING_DELETE_SELECTION", "DELETE_SELECTING", "STARTING_RAMP", "RAMPING", "CUTTING", "RENAMING", "STARTING_PANNING", "PANNING", "--INVALID--") enum class UiDragMode
Dragging modes for widgets that have click&drag.
UiCursorState
Various cursor states to be shared.
UiOverlayAction
Various overlay actions to be shared.
@ AUTOFILLING
Auto-filling in edit mode.
@ STARTING_DELETE_SELECTION
Like selecting but it auto deletes whatever touches the selection.
@ STARTING_SELECTION
To be set in drag_start.
@ STARTING_MOVING
To be set in drag_start.