Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
AutomationModeWidget Class Reference

Custom button group to be drawn inside drawing areas. More...

#include <src/gui/backend/gtk_widgets/automation_mode.h>

Public Member Functions

 AutomationModeWidget (int height, PangoLayout *layout, AutomationTrack *owner)
 Creates a new track widget from the given track.
void init ()
void draw (GtkSnapshot *snapshot, double x, double y, double x_cursor, CustomButtonWidget::State state)

Data Fields

double x_
 X/y relative to parent drawing area.
double y_
int width_
 Total width/height.
int height_
int text_widths_ [static_cast< int >(AutomationMode::NUM_AUTOMATION_MODES)]
 Width of each button, including padding.
int text_heights_ [static_cast< int >(AutomationMode::NUM_AUTOMATION_MODES)]
int max_text_height_
int has_hit_mode_
AutomationMode hit_mode_
 Currently hit mode.
GdkRGBA def_color_
 Default color.
GdkRGBA hovered_color_
 Hovered color.
std::array< GdkRGBA, NUM_AUTOMATION_MODES > toggled_colors_
 Toggled color.
std::array< GdkRGBA, NUM_AUTOMATION_MODES > held_colors_
 Held color (used after clicking and before releasing).
double aspect_
 Aspect ratio for the rounded rectangle.
double corner_radius_
 Corner curvature radius for the rounded rectangle.
std::array< CustomButtonWidget::State, NUM_AUTOMATION_MODES > last_states_
 Used to update caches if state changed.
std::array< CustomButtonWidget::State, NUM_AUTOMATION_MODES > current_states_
 Used during drawing.
std::array< GdkRGBA, NUM_AUTOMATION_MODES > last_colors_
 Used during transitions.
PangoLayout * layout_
 Cache layout for drawing text.
AutomationTrack * owner_
 Owner.
int transition_frames_
 Frames left for a transition in color.

Detailed Description

Custom button group to be drawn inside drawing areas.

Definition at line 24 of file automation_mode.h.

Field Documentation

◆ aspect_

double AutomationModeWidget::aspect_

Aspect ratio for the rounded rectangle.

Definition at line 100 of file automation_mode.h.

◆ corner_radius_

double AutomationModeWidget::corner_radius_

Corner curvature radius for the rounded rectangle.

Definition at line 104 of file automation_mode.h.

◆ current_states_

std::array<CustomButtonWidget::State, NUM_AUTOMATION_MODES> AutomationModeWidget::current_states_

Used during drawing.

Definition at line 110 of file automation_mode.h.

◆ def_color_

GdkRGBA AutomationModeWidget::def_color_

Default color.

Definition at line 88 of file automation_mode.h.

◆ has_hit_mode_

int AutomationModeWidget::has_hit_mode_

Definition at line 82 of file automation_mode.h.

◆ height_

int AutomationModeWidget::height_

Definition at line 74 of file automation_mode.h.

◆ held_colors_

std::array<GdkRGBA, NUM_AUTOMATION_MODES> AutomationModeWidget::held_colors_

Held color (used after clicking and before releasing).

Definition at line 97 of file automation_mode.h.

◆ hit_mode_

AutomationMode AutomationModeWidget::hit_mode_

Currently hit mode.

Definition at line 85 of file automation_mode.h.

◆ hovered_color_

GdkRGBA AutomationModeWidget::hovered_color_

Hovered color.

Definition at line 91 of file automation_mode.h.

◆ last_colors_

std::array<GdkRGBA, NUM_AUTOMATION_MODES> AutomationModeWidget::last_colors_

Used during transitions.

Definition at line 113 of file automation_mode.h.

◆ last_states_

std::array<CustomButtonWidget::State, NUM_AUTOMATION_MODES> AutomationModeWidget::last_states_

Used to update caches if state changed.

Definition at line 107 of file automation_mode.h.

◆ layout_

PangoLayout* AutomationModeWidget::layout_

Cache layout for drawing text.

Definition at line 116 of file automation_mode.h.

◆ max_text_height_

int AutomationModeWidget::max_text_height_

Definition at line 80 of file automation_mode.h.

◆ owner_

AutomationTrack* AutomationModeWidget::owner_

Owner.

Definition at line 119 of file automation_mode.h.

◆ text_heights_

int AutomationModeWidget::text_heights_[static_cast< int >(AutomationMode::NUM_AUTOMATION_MODES)]

Definition at line 79 of file automation_mode.h.

◆ text_widths_

int AutomationModeWidget::text_widths_[static_cast< int >(AutomationMode::NUM_AUTOMATION_MODES)]

Width of each button, including padding.

Definition at line 78 of file automation_mode.h.

◆ toggled_colors_

std::array<GdkRGBA, NUM_AUTOMATION_MODES> AutomationModeWidget::toggled_colors_

Toggled color.

Definition at line 94 of file automation_mode.h.

◆ transition_frames_

int AutomationModeWidget::transition_frames_

Frames left for a transition in color.

Definition at line 122 of file automation_mode.h.

◆ width_

int AutomationModeWidget::width_

Total width/height.

Definition at line 73 of file automation_mode.h.

◆ x_

double AutomationModeWidget::x_

X/y relative to parent drawing area.

Definition at line 69 of file automation_mode.h.

◆ y_

double AutomationModeWidget::y_

Definition at line 70 of file automation_mode.h.


The documentation for this class was generated from the following file: