Zrythm
a highly automated and intuitive digital audio workstation
|
Custom button to be drawn inside drawing areas. More...
#include <gui/widgets/custom_button.h>
Data Fields | |
GdkRGBA | def_color |
Function to call on press (after click and release). | |
GdkRGBA | hovered_color |
Hovered color. | |
GdkRGBA | toggled_color |
Toggled color. | |
GdkRGBA | held_color |
Held color (used after clicking and before releasing). | |
char | icon_name [120] |
Name of the icon to show. | |
int | size |
Size in pixels (width and height will be set to this). | |
int | width |
if non-zero, the button has "size" height and this width. | |
double | aspect |
Whether currently hovered. | |
double | corner_radius |
Corner curvature radius for the rounded rectangle. | |
GdkTexture * | icon_texture |
Object to pass to the callback. | |
CustomButtonWidgetState | last_state |
Used to update caches if state changed. | |
CustomButtonWidgetOwner | owner_type |
Owner type. | |
void * | owner |
Owner. | |
GdkRGBA | last_color |
Used during transitions. | |
char * | text |
Text, if any, to show after the icon. | |
int | text_height |
PangoLayout * | layout |
Cache layout for drawing the text. | |
double | x |
X/y relative to parent drawing area. | |
double | y |
unsigned int | button_id |
The id of the button returned by a symap of its icon name, for better performance vs comparing strings. | |
int | transition_frames |
Frames left for a transition in color. | |
Custom button to be drawn inside drawing areas.
Definition at line 44 of file custom_button.h.
double CustomButtonWidget::aspect |
Whether currently hovered.
Whether currently held down. Aspect ratio for the rounded rectangle.
Definition at line 84 of file custom_button.h.
unsigned int CustomButtonWidget::button_id |
The id of the button returned by a symap of its icon name, for better performance vs comparing strings.
TODO
Definition at line 131 of file custom_button.h.
double CustomButtonWidget::corner_radius |
Corner curvature radius for the rounded rectangle.
Definition at line 88 of file custom_button.h.
GdkRGBA CustomButtonWidget::def_color |
Function to call on press (after click and release).
Whether the button is a toggle. Default color.
Definition at line 54 of file custom_button.h.
GdkRGBA CustomButtonWidget::held_color |
Held color (used after clicking and before releasing).
Definition at line 64 of file custom_button.h.
GdkRGBA CustomButtonWidget::hovered_color |
Hovered color.
Definition at line 57 of file custom_button.h.
char CustomButtonWidget::icon_name[120] |
Name of the icon to show.
Definition at line 67 of file custom_button.h.
GdkTexture* CustomButtonWidget::icon_texture |
GdkRGBA CustomButtonWidget::last_color |
Used during transitions.
Definition at line 106 of file custom_button.h.
CustomButtonWidgetState CustomButtonWidget::last_state |
Used to update caches if state changed.
Definition at line 97 of file custom_button.h.
PangoLayout* CustomButtonWidget::layout |
Cache layout for drawing the text.
Definition at line 118 of file custom_button.h.
void* CustomButtonWidget::owner |
Owner.
Definition at line 103 of file custom_button.h.
CustomButtonWidgetOwner CustomButtonWidget::owner_type |
Owner type.
Definition at line 100 of file custom_button.h.
int CustomButtonWidget::size |
Size in pixels (width and height will be set to this).
Definition at line 71 of file custom_button.h.
char* CustomButtonWidget::text |
Text, if any, to show after the icon.
This will be ellipsized.
Definition at line 113 of file custom_button.h.
int CustomButtonWidget::text_height |
Definition at line 115 of file custom_button.h.
GdkRGBA CustomButtonWidget::toggled_color |
Toggled color.
Definition at line 60 of file custom_button.h.
int CustomButtonWidget::transition_frames |
Frames left for a transition in color.
Definition at line 134 of file custom_button.h.
int CustomButtonWidget::width |
if non-zero, the button has "size" height and this width.
Definition at line 75 of file custom_button.h.
double CustomButtonWidget::x |
X/y relative to parent drawing area.
Definition at line 121 of file custom_button.h.
double CustomButtonWidget::y |
Definition at line 122 of file custom_button.h.