Zrythm
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
ArrangerWidget Struct Reference

The arranger widget is a canvas that draws all the arranger objects it contains. More...

#include <gui/widgets/arranger.h>

Collaboration diagram for ArrangerWidget:

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.
 
ArrangerObjectstart_object
 The object that was clicked in this drag cycle, if any.
 
ArrangerObjecthovered_object
 Object currently hovered.
 
int start_object_was_selected
 Whether the start object was selected before drag_begin.
 
ArrangerSelectionssel_at_start
 A clone of the ArrangerSelections on drag begin.
 
ZRegionregion_at_start
 Region on drag begin, if editing automation.
 
ArrangerSelectionssel_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.
 
SnapGridsnap_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.
 
AutomationTrackhovered_at
 
TrackLanehovered_lane
 
Trackhovered_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.
 

Detailed Description

The arranger widget is a canvas that draws all the arranger objects it contains.

Definition at line 107 of file arranger.h.

Field Documentation

◆ action

UiOverlayAction ArrangerWidget::action

Definition at line 130 of file arranger.h.

◆ adj_ticks_diff

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.

◆ alt_held

int ArrangerWidget::alt_held

Whether Alt is currently held down.

Definition at line 259 of file arranger.h.

◆ ap_layout

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.

◆ audio_layout

PangoLayout* ArrangerWidget::audio_layout

Layout for drawing audio editor text.

Definition at line 435 of file arranger.h.

◆ can_link

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.

◆ click

GtkGestureClick* ArrangerWidget::click

Definition at line 115 of file arranger.h.

◆ clip_start_line_node

GskRenderNode* ArrangerWidget::clip_start_line_node

Definition at line 308 of file arranger.h.

◆ ctrl_held

int ArrangerWidget::ctrl_held

Whether Ctrl button is held down.

Definition at line 256 of file arranger.h.

◆ curr_pos

Position ArrangerWidget::curr_pos

The absolute (not snapped) Position as of the current action.

Definition at line 235 of file arranger.h.

◆ curr_ticks_diff_from_start

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.

◆ cut_line_node

GskRenderNode* ArrangerWidget::cut_line_node

Definition at line 309 of file arranger.h.

◆ debug_layout

PangoLayout* ArrangerWidget::debug_layout

Layout for debug text.

Definition at line 438 of file arranger.h.

◆ drag

GtkGestureDrag* ArrangerWidget::drag

Definition at line 114 of file arranger.h.

◆ drag_start_btn

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.

◆ drag_update_started

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.

◆ dval_at_start

double ArrangerWidget::dval_at_start

Definition at line 353 of file arranger.h.

◆ earliest_obj_exists

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.

◆ earliest_obj_start_pos

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.

◆ end_pos

Position ArrangerWidget::end_pos

for moving regions

Definition at line 237 of file arranger.h.

◆ fade_pos_at_start

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.

◆ first_draw

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.

◆ fork_awesome_snowflake_texture

GdkTexture* ArrangerWidget::fork_awesome_snowflake_texture

Definition at line 300 of file arranger.h.

◆ fval_at_start

float ArrangerWidget::fval_at_start

Float value at start.

Used when changing the audio region gain.

Definition at line 351 of file arranger.h.

◆ highlight_rect

GdkRectangle ArrangerWidget::highlight_rect

The rectangle to highlight.

Definition at line 384 of file arranger.h.

◆ hit_objs_to_draw

GPtrArray* ArrangerWidget::hit_objs_to_draw

Array of objects to draw.

To be reused in snapshot().

Definition at line 455 of file arranger.h.

◆ hover_x

double ArrangerWidget::hover_x

Current hovering positions (absolute).

Definition at line 241 of file arranger.h.

◆ hover_y

double ArrangerWidget::hover_y

Definition at line 242 of file arranger.h.

◆ hovered

bool ArrangerWidget::hovered

Definition at line 244 of file arranger.h.

◆ hovered_at

AutomationTrack* ArrangerWidget::hovered_at

Definition at line 293 of file arranger.h.

◆ hovered_chord_index

int ArrangerWidget::hovered_chord_index

Index of the chord being hovered on.

Definition at line 340 of file arranger.h.

◆ hovered_lane

TrackLane* ArrangerWidget::hovered_lane

Definition at line 294 of file arranger.h.

◆ hovered_note

int ArrangerWidget::hovered_note

The note currently hovering over.

Definition at line 316 of file arranger.h.

◆ hovered_object

ArrangerObject* ArrangerWidget::hovered_object

Object currently hovered.

Definition at line 181 of file arranger.h.

◆ hovered_track

Track* ArrangerWidget::hovered_track

Definition at line 295 of file arranger.h.

◆ is_highlighted

bool ArrangerWidget::is_highlighted

Whether a rectangle is highlighted for DND.

Definition at line 381 of file arranger.h.

◆ is_pinned

int ArrangerWidget::is_pinned

Whether this TimelineArrangerWidget is for the PinnedTracklist or not.

Definition at line 280 of file arranger.h.

◆ key_is_pressed

gboolean ArrangerWidget::key_is_pressed

Definition at line 238 of file arranger.h.

◆ lane_diff

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.

◆ last_adj_ticks_diff

double ArrangerWidget::last_adj_ticks_diff

adj_ticks_diff in last cycle.

Definition at line 231 of file arranger.h.

◆ last_frame_time

gint64 ArrangerWidget::last_frame_time

Definition at line 261 of file arranger.h.

◆ last_offset_x

double ArrangerWidget::last_offset_x

Used when dragging.

Definition at line 120 of file arranger.h.

◆ last_offset_y

double ArrangerWidget::last_offset_y

Definition at line 121 of file arranger.h.

◆ last_playhead_px

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.

◆ last_rect

graphene_rect_t ArrangerWidget::last_rect

Rectangle in the last call.

Definition at line 370 of file arranger.h.

◆ last_selection_rect

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.

◆ loop_line_node

GskRenderNode* ArrangerWidget::loop_line_node

Cached nodes for region loop lines.

Definition at line 307 of file arranger.h.

◆ media_playlist_repeat_texture

GdkTexture* ArrangerWidget::media_playlist_repeat_texture

Definition at line 301 of file arranger.h.

◆ motion_controller

GtkEventControllerMotion* ArrangerWidget::motion_controller

Definition at line 117 of file arranger.h.

◆ music_note_16th_texture

GdkTexture* ArrangerWidget::music_note_16th_texture

Definition at line 299 of file arranger.h.

◆ n_press

int ArrangerWidget::n_press

Number of clicks in current action.

Definition at line 247 of file arranger.h.

◆ new_hadj_val

double ArrangerWidget::new_hadj_val

New temporary hadjustment value used when zooming in/out.

Definition at line 411 of file arranger.h.

◆ offset_x_from_scroll

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.

◆ offset_y_from_scroll

double ArrangerWidget::offset_y_from_scroll

Definition at line 128 of file arranger.h.

◆ parent_instance

GtkWidget ArrangerWidget::parent_instance

Definition at line 109 of file arranger.h.

◆ playhead_pos_at_start

Position ArrangerWidget::playhead_pos_at_start

Playhead position at start of drag.

Definition at line 219 of file arranger.h.

◆ popover_menu

GtkPopoverMenu* ArrangerWidget::popover_menu

Popover to be reused for context menus.

Definition at line 458 of file arranger.h.

◆ queued_playhead_px

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.

◆ redraw

bool ArrangerWidget::redraw

Set to 1 to redraw.

Definition at line 363 of file arranger.h.

◆ region_at_start

ZRegion* ArrangerWidget::region_at_start

Region on drag begin, if editing automation.

Definition at line 200 of file arranger.h.

◆ region_icon_texture_size

int ArrangerWidget::region_icon_texture_size

Size of above textures.

Definition at line 304 of file arranger.h.

◆ resizing_range

int ArrangerWidget::resizing_range

1 if resizing range.

Definition at line 285 of file arranger.h.

◆ resizing_range_start

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.

◆ right_click

GtkGestureClick* ArrangerWidget::right_click

Definition at line 116 of file arranger.h.

◆ ruler_display

TransportDisplay ArrangerWidget::ruler_display

Cached setting.

Definition at line 414 of file arranger.h.

◆ sel_at_start

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.

◆ sel_to_delete

ArrangerSelections* ArrangerWidget::sel_to_delete

Selections to delete, used with the eraser tool.

Definition at line 204 of file arranger.h.

◆ shift_held

int ArrangerWidget::shift_held

Whether shift button is held down.

Definition at line 253 of file arranger.h.

◆ snap_grid

SnapGrid* ArrangerWidget::snap_grid

Associated SnapGrid.

Definition at line 250 of file arranger.h.

◆ start_object

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.

◆ start_object_was_selected

int ArrangerWidget::start_object_was_selected

Whether the start object was selected before drag_begin.

Definition at line 185 of file arranger.h.

◆ start_pos

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.

◆ start_pos_px

double ArrangerWidget::start_pos_px

X-axis coordinate at the start of the drag, in pixels.

Definition at line 140 of file arranger.h.

◆ start_vel_val

int ArrangerWidget::start_vel_val

1-127.

Definition at line 323 of file arranger.h.

◆ start_x

double ArrangerWidget::start_x

X-axis coordinate at start of drag.

Definition at line 133 of file arranger.h.

◆ start_y

double ArrangerWidget::start_y

Y-axis coordinate at start of drag.

Definition at line 136 of file arranger.h.

◆ symbolic_link_texture

GdkTexture* ArrangerWidget::symbolic_link_texture

Definition at line 298 of file arranger.h.

◆ type

ArrangerWidgetType ArrangerWidget::type

Type of arranger this is.

Definition at line 112 of file arranger.h.

◆ vel_diff

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.

◆ vel_layout

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.

◆ visible_at_diff

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.

◆ visible_track_diff

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.

◆ was_paused

bool ArrangerWidget::was_paused

Whether playback was paused during drag begin.

Definition at line 216 of file arranger.h.


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