Zrythm
a highly automated and intuitive digital audio workstation
|
The arranger widget is a canvas that draws all the arranger objects it contains. More...
#include <gui/widgets/arranger.h>
Data Fields | |
GtkWidget | parent_instance |
ArrangerWidgetType | type |
Type of arranger this is. | |
GtkGestureDrag * | drag |
GtkGestureClick * | click |
GtkGestureClick * | right_click |
GtkEventControllerMotion * | motion_controller |
double | last_offset_x |
Used when dragging. | |
double | last_offset_y |
double | offset_x_from_scroll |
Whether there is an offset from a user scroll that should be added to the offset while dragging. | |
double | offset_y_from_scroll |
UiOverlayAction | action |
double | start_x |
X-axis coordinate at start of drag. | |
double | start_y |
Y-axis coordinate at start of drag. | |
double | start_pos_px |
X-axis coordinate at the start of the drag, in pixels. | |
bool | drag_update_started |
Whether a drag update operation started. | |
bool | earliest_obj_exists |
Whether an object exists, so we can use the earliest_obj_start_pos. | |
Position | earliest_obj_start_pos |
Start Position of the earliest object at the start of the drag. | |
Position | fade_pos_at_start |
Fade in/out position at start. | |
ArrangerObject * | start_object |
The object that was clicked in this drag cycle, if any. | |
ArrangerObject * | hovered_object |
Object currently hovered. | |
int | start_object_was_selected |
Whether the start object was selected before drag_begin. | |
ArrangerSelections * | sel_at_start |
A clone of the ArrangerSelections on drag begin. | |
Region * | region_at_start |
Region on drag begin, if editing automation. | |
ArrangerSelections * | sel_to_delete |
Selections to delete, used with the eraser tool. | |
Position | start_pos |
Start Position of the earliest object currently. | |
bool | was_paused |
Whether playback was paused during drag begin. | |
Position | playhead_pos_at_start |
Playhead position at start of drag. | |
double | curr_ticks_diff_from_start |
The absolute (not snapped) current diff in ticks from the curr_pos to the start_pos. | |
double | adj_ticks_diff |
The adjusted diff in ticks to use for moving objects starting from their cached start positions. | |
double | last_adj_ticks_diff |
adj_ticks_diff in last cycle. | |
Position | curr_pos |
The absolute (not snapped) Position as of the current action. | |
Position | end_pos |
for moving regions | |
gboolean | key_is_pressed |
double | hover_x |
Current hovering positions (absolute). | |
double | hover_y |
bool | hovered |
int | n_press |
Number of clicks in current action. | |
SnapGrid * | snap_grid |
Associated SnapGrid. | |
int | shift_held |
Whether shift button is held down. | |
int | ctrl_held |
Whether Ctrl button is held down. | |
int | alt_held |
Whether Alt is currently held down. | |
gint64 | last_frame_time |
int | visible_track_diff |
The number of visible tracks moved during a moving operation between tracks up to the last cycle. | |
int | lane_diff |
The number of lanes moved during a moving operation between lanes, up to the last cycle. | |
int | visible_at_diff |
The number of visible automation t racks moved during a moving operation between automation tracks up to the last cycle. | |
int | is_pinned |
Whether this TimelineArrangerWidget is for the PinnedTracklist or not. | |
int | resizing_range |
1 if resizing range. | |
int | resizing_range_start |
1 if this is the first call to resize the range, so range1 can be set. | |
AutomationTrack * | hovered_at |
TrackLane * | hovered_lane |
Track * | hovered_track |
GdkTexture * | symbolic_link_texture |
GdkTexture * | music_note_16th_texture |
GdkTexture * | fork_awesome_snowflake_texture |
GdkTexture * | media_playlist_repeat_texture |
int | region_icon_texture_size |
Size of above textures. | |
GskRenderNode * | loop_line_node |
Cached nodes for region loop lines. | |
GskRenderNode * | clip_start_line_node |
GskRenderNode * | cut_line_node |
int | hovered_note |
The note currently hovering over. | |
int | start_vel_val |
1-127. | |
int | vel_diff |
Maximum Velocity diff applied in this action. | |
int | hovered_chord_index |
Index of the chord being hovered on. | |
float | fval_at_start |
Float value at start. | |
double | dval_at_start |
int | last_playhead_px |
Px the playhead was last drawn at, so we can redraw this and the new px only when the playhead changes position. | |
bool | redraw |
Set to 1 to redraw. | |
graphene_rect_t | last_rect |
Rectangle in the last call. | |
bool | can_link |
Whether the current selections can link (ie, only regions are selected). | |
bool | is_highlighted |
Whether a rectangle is highlighted for DND. | |
GdkRectangle | highlight_rect |
The rectangle to highlight. | |
GdkRectangle | last_selection_rect |
Last selection rectangle, used to redraw the union of the new selection and this. | |
guint | drag_start_btn |
Drag start button (primary, secondary, etc.). | |
bool | first_draw |
Whether this is the first time the widget is drawn. | |
double | new_hadj_val |
New temporary hadjustment value used when zooming in/out. | |
TransportDisplay | ruler_display |
Cached setting. | |
PangoLayout * | vel_layout |
Layout for drawing velocity text. | |
PangoLayout * | ap_layout |
Layout for drawing automation point text. | |
PangoLayout * | audio_layout |
Layout for drawing audio editor text. | |
PangoLayout * | debug_layout |
Layout for debug text. | |
int | queued_playhead_px |
Cached playhead x to draw. | |
GPtrArray * | hit_objs_to_draw |
Array of objects to draw. | |
GtkPopoverMenu * | popover_menu |
Popover to be reused for context menus. | |
The arranger widget is a canvas that draws all the arranger objects it contains.
Definition at line 107 of file arranger.h.
UiOverlayAction ArrangerWidget::action |
Definition at line 130 of file arranger.h.
double ArrangerWidget::adj_ticks_diff |
The adjusted diff in ticks to use for moving objects starting from their cached start positions.
Definition at line 228 of file arranger.h.
int ArrangerWidget::alt_held |
Whether Alt is currently held down.
Definition at line 259 of file arranger.h.
PangoLayout* ArrangerWidget::ap_layout |
Layout for drawing automation point text.
TODO move to AutomationPoint if parallel processing is needed - no need now.
Definition at line 430 of file arranger.h.
PangoLayout* ArrangerWidget::audio_layout |
Layout for drawing audio editor text.
Definition at line 435 of file arranger.h.
bool ArrangerWidget::can_link |
Whether the current selections can link (ie, only regions are selected).
To be set on drag begin.
Definition at line 378 of file arranger.h.
GtkGestureClick* ArrangerWidget::click |
Definition at line 115 of file arranger.h.
GskRenderNode* ArrangerWidget::clip_start_line_node |
Definition at line 308 of file arranger.h.
int ArrangerWidget::ctrl_held |
Whether Ctrl button is held down.
Definition at line 256 of file arranger.h.
Position ArrangerWidget::curr_pos |
The absolute (not snapped) Position as of the current action.
Definition at line 235 of file arranger.h.
double ArrangerWidget::curr_ticks_diff_from_start |
The absolute (not snapped) current diff in ticks from the curr_pos to the start_pos.
Definition at line 223 of file arranger.h.
GskRenderNode* ArrangerWidget::cut_line_node |
Definition at line 309 of file arranger.h.
PangoLayout* ArrangerWidget::debug_layout |
Layout for debug text.
Definition at line 438 of file arranger.h.
GtkGestureDrag* ArrangerWidget::drag |
Definition at line 114 of file arranger.h.
guint ArrangerWidget::drag_start_btn |
Drag start button (primary, secondary, etc.).
Can be tested against GDK_BUTTON_SECONDARY and GDK_BUTTON_PRIMARY.
Definition at line 398 of file arranger.h.
bool ArrangerWidget::drag_update_started |
Whether a drag update operation started.
drag_update will be skipped unless this is true or gtk_drag_check_threshold() returns true.
Definition at line 149 of file arranger.h.
double ArrangerWidget::dval_at_start |
Definition at line 353 of file arranger.h.
bool ArrangerWidget::earliest_obj_exists |
Whether an object exists, so we can use the earliest_obj_start_pos.
Definition at line 153 of file arranger.h.
Position ArrangerWidget::earliest_obj_start_pos |
Start Position of the earliest object at the start of the drag.
Definition at line 157 of file arranger.h.
Position ArrangerWidget::end_pos |
for moving regions
Definition at line 237 of file arranger.h.
Position ArrangerWidget::fade_pos_at_start |
Fade in/out position at start.
Used when moving fade in/out points.
Definition at line 164 of file arranger.h.
bool ArrangerWidget::first_draw |
Whether this is the first time the widget is drawn.
This is used for loading back the scroll positions saved in the project.
Definition at line 407 of file arranger.h.
GdkTexture* ArrangerWidget::fork_awesome_snowflake_texture |
Definition at line 300 of file arranger.h.
float ArrangerWidget::fval_at_start |
Float value at start.
Used when changing the audio region gain.
Definition at line 351 of file arranger.h.
GdkRectangle ArrangerWidget::highlight_rect |
The rectangle to highlight.
Definition at line 384 of file arranger.h.
GPtrArray* ArrangerWidget::hit_objs_to_draw |
double ArrangerWidget::hover_x |
Current hovering positions (absolute).
Definition at line 241 of file arranger.h.
double ArrangerWidget::hover_y |
Definition at line 242 of file arranger.h.
bool ArrangerWidget::hovered |
Definition at line 244 of file arranger.h.
AutomationTrack* ArrangerWidget::hovered_at |
Definition at line 293 of file arranger.h.
int ArrangerWidget::hovered_chord_index |
Index of the chord being hovered on.
Definition at line 340 of file arranger.h.
TrackLane* ArrangerWidget::hovered_lane |
Definition at line 294 of file arranger.h.
int ArrangerWidget::hovered_note |
The note currently hovering over.
Definition at line 316 of file arranger.h.
ArrangerObject* ArrangerWidget::hovered_object |
Object currently hovered.
Definition at line 181 of file arranger.h.
Track* ArrangerWidget::hovered_track |
Definition at line 295 of file arranger.h.
bool ArrangerWidget::is_highlighted |
Whether a rectangle is highlighted for DND.
Definition at line 381 of file arranger.h.
int ArrangerWidget::is_pinned |
Whether this TimelineArrangerWidget is for the PinnedTracklist or not.
Definition at line 280 of file arranger.h.
gboolean ArrangerWidget::key_is_pressed |
Definition at line 238 of file arranger.h.
int ArrangerWidget::lane_diff |
The number of lanes moved during a moving operation between lanes, up to the last cycle.
Definition at line 271 of file arranger.h.
double ArrangerWidget::last_adj_ticks_diff |
adj_ticks_diff in last cycle.
Definition at line 231 of file arranger.h.
gint64 ArrangerWidget::last_frame_time |
Definition at line 261 of file arranger.h.
double ArrangerWidget::last_offset_x |
Used when dragging.
Definition at line 120 of file arranger.h.
double ArrangerWidget::last_offset_y |
Definition at line 121 of file arranger.h.
int ArrangerWidget::last_playhead_px |
Px the playhead was last drawn at, so we can redraw this and the new px only when the playhead changes position.
Definition at line 360 of file arranger.h.
graphene_rect_t ArrangerWidget::last_rect |
Rectangle in the last call.
Definition at line 370 of file arranger.h.
GdkRectangle ArrangerWidget::last_selection_rect |
Last selection rectangle, used to redraw the union of the new selection and this.
Definition at line 390 of file arranger.h.
GskRenderNode* ArrangerWidget::loop_line_node |
Cached nodes for region loop lines.
Definition at line 307 of file arranger.h.
GdkTexture* ArrangerWidget::media_playlist_repeat_texture |
Definition at line 301 of file arranger.h.
GtkEventControllerMotion* ArrangerWidget::motion_controller |
Definition at line 117 of file arranger.h.
GdkTexture* ArrangerWidget::music_note_16th_texture |
Definition at line 299 of file arranger.h.
int ArrangerWidget::n_press |
Number of clicks in current action.
Definition at line 247 of file arranger.h.
double ArrangerWidget::new_hadj_val |
New temporary hadjustment value used when zooming in/out.
Definition at line 411 of file arranger.h.
double ArrangerWidget::offset_x_from_scroll |
Whether there is an offset from a user scroll that should be added to the offset while dragging.
FIXME: This is probably not needed - see ruler implementation on_motion() on how to avoid these.
Definition at line 127 of file arranger.h.
double ArrangerWidget::offset_y_from_scroll |
Definition at line 128 of file arranger.h.
GtkWidget ArrangerWidget::parent_instance |
Definition at line 109 of file arranger.h.
Position ArrangerWidget::playhead_pos_at_start |
Playhead position at start of drag.
Definition at line 219 of file arranger.h.
GtkPopoverMenu* ArrangerWidget::popover_menu |
Popover to be reused for context menus.
Definition at line 458 of file arranger.h.
int ArrangerWidget::queued_playhead_px |
Cached playhead x to draw.
This is used to avoid queuing drawing at x and then drawing after it (if playhead moved). The playhead will be drawn at the location it was when the draw was queued.
Definition at line 448 of file arranger.h.
bool ArrangerWidget::redraw |
Set to 1 to redraw.
Definition at line 363 of file arranger.h.
Region* ArrangerWidget::region_at_start |
Region on drag begin, if editing automation.
Definition at line 200 of file arranger.h.
int ArrangerWidget::region_icon_texture_size |
Size of above textures.
Definition at line 304 of file arranger.h.
int ArrangerWidget::resizing_range |
1 if resizing range.
Definition at line 285 of file arranger.h.
int ArrangerWidget::resizing_range_start |
1 if this is the first call to resize the range, so range1 can be set.
Definition at line 291 of file arranger.h.
GtkGestureClick* ArrangerWidget::right_click |
Definition at line 116 of file arranger.h.
TransportDisplay ArrangerWidget::ruler_display |
Cached setting.
Definition at line 414 of file arranger.h.
ArrangerSelections* ArrangerWidget::sel_at_start |
A clone of the ArrangerSelections on drag begin.
When autofilling velocities, this is used to store the affected objects before editing.
This must contain clones only.
Definition at line 195 of file arranger.h.
ArrangerSelections* ArrangerWidget::sel_to_delete |
Selections to delete, used with the eraser tool.
Definition at line 204 of file arranger.h.
int ArrangerWidget::shift_held |
Whether shift button is held down.
Definition at line 253 of file arranger.h.
SnapGrid* ArrangerWidget::snap_grid |
Associated SnapGrid.
Definition at line 250 of file arranger.h.
ArrangerObject* ArrangerWidget::start_object |
The object that was clicked in this drag cycle, if any.
This is the ArrangerObject that was clicked, even though there could be more selected.
This is also used when changing values via the event viewer.
FIXME this sometimes stores project objects (that should not be free'd) and sometimes clones (eg, arranger_object_edit_begin/finish()). Only allow one type.
Definition at line 178 of file arranger.h.
int ArrangerWidget::start_object_was_selected |
Whether the start object was selected before drag_begin.
Definition at line 185 of file arranger.h.
Position ArrangerWidget::start_pos |
Start Position of the earliest object currently.
The absolute (not snapped) Position at the start of a drag, translated from start_x.
Definition at line 212 of file arranger.h.
double ArrangerWidget::start_pos_px |
X-axis coordinate at the start of the drag, in pixels.
Definition at line 140 of file arranger.h.
int ArrangerWidget::start_vel_val |
1-127.
Definition at line 323 of file arranger.h.
double ArrangerWidget::start_x |
X-axis coordinate at start of drag.
Definition at line 133 of file arranger.h.
double ArrangerWidget::start_y |
Y-axis coordinate at start of drag.
Definition at line 136 of file arranger.h.
GdkTexture* ArrangerWidget::symbolic_link_texture |
Definition at line 298 of file arranger.h.
ArrangerWidgetType ArrangerWidget::type |
Type of arranger this is.
Definition at line 112 of file arranger.h.
int ArrangerWidget::vel_diff |
Maximum Velocity diff applied in this action.
Used in drag_end to create an UndableAction. This can have any value, even greater than 127 and it will be clamped when applying it to a Velocity.
Definition at line 333 of file arranger.h.
PangoLayout* ArrangerWidget::vel_layout |
Layout for drawing velocity text.
TODO move to Velocity if parallel processing is needed - no need now.
Definition at line 422 of file arranger.h.
int ArrangerWidget::visible_at_diff |
The number of visible automation t racks moved during a moving operation between automation tracks up to the last cycle.
Definition at line 276 of file arranger.h.
int ArrangerWidget::visible_track_diff |
The number of visible tracks moved during a moving operation between tracks up to the last cycle.
Definition at line 267 of file arranger.h.
bool ArrangerWidget::was_paused |
Whether playback was paused during drag begin.
Definition at line 216 of file arranger.h.