Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
timeline_panel.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: © 2019-2020 Alexandros Theodotou <alex@zrythm.org>
2// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
9
10#ifndef __GUI_WIDGETS_TIMELINE_PANEL_H__
11#define __GUI_WIDGETS_TIMELINE_PANEL_H__
12
13#include "common/utils/types.h"
14#include "gui/backend/gtk_widgets/gtk_wrapper.h"
15
16#define TIMELINE_PANEL_WIDGET_TYPE (timeline_panel_widget_get_type ())
17G_DECLARE_FINAL_TYPE (
19 timeline_panel_widget,
20 Z,
21 TIMELINE_PANEL_WIDGET,
22 GtkBox)
23
24TYPEDEF_STRUCT_UNDERSCORED (RulerWidget);
25TYPEDEF_STRUCT_UNDERSCORED (TracklistWidget);
26TYPEDEF_STRUCT_UNDERSCORED (TracklistHeaderWidget);
27TYPEDEF_STRUCT_UNDERSCORED (TimelineToolbarWidget);
28TYPEDEF_STRUCT_UNDERSCORED (TimelineBotBoxWidget);
29TYPEDEF_STRUCT_UNDERSCORED (ArrangerWrapperWidget);
30
36
37#define MW_TIMELINE_PANEL (MW_MAIN_NOTEBOOK->timeline_panel)
38
39#define MW_TRACKLIST_SCROLL (MW_TIMELINE_PANEL->tracklist_scroll)
40
41typedef struct _TimelinePanelWidget
42{
43 GtkBox parent_instance;
44
45 GtkPaned * tracklist_timeline;
46 GtkBox * tracklist_top;
47 TracklistHeaderWidget * tracklist_header;
48 TracklistWidget * tracklist;
49
52
54 RulerWidget * ruler;
55
59
60 ArrangerWrapperWidget * timeline_wrapper;
61
64
65 TimelineToolbarWidget * timeline_toolbar;
66
69
74
75void
76timeline_panel_widget_setup (TimelinePanelWidget * self);
77
79timeline_panel_widget_new (void);
80
84void
86
90
91#endif
struct _ArrangerWidget { GtkWidget parent_instance; ArrangerWidgetType type; GtkGestureDrag * drag; GtkGestureClick * click; GtkGestureClick * right_click; GtkEventControllerMotion *motion_controller; double last_offset_x; double last_offset_y; double offset_x_from_scroll; double offset_y_from_scroll; UiOverlayAction action; double start_x; double start_y; double start_pos_px; bool drag_update_started; std::unique_ptr< Position > earliest_obj_start_pos; Position fade_pos_at_start; std::unique_ptr< ArrangerObject > start_object; std::weak_ptr< ArrangerObject > prj_start_object; std::weak_ptr< ArrangerObject > hovered_object; bool start_object_was_selected; std::unique_ptr< ArrangerSelections > sel_at_start; std::unique_ptr< Region > region_at_start; std::unique_ptr< ArrangerSelections > sel_to_delete; Position start_pos; bool was_paused; Position playhead_pos_at_start; double curr_ticks_diff_from_start; double adj_ticks_diff; double last_adj_ticks_diff; Position curr_pos; Position end_pos; gboolean key_is_pressed; double hover_x; double hover_y; bool hovered; int n_press; std::shared_ptr< SnapGrid > snap_grid; int shift_held; int ctrl_held; int alt_held; gint64 last_frame_time; int visible_track_diff; int lane_diff; int visible_at_diff; int is_pinned; int resizing_range; int resizing_range_start; 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; GskRenderNode *loop_line_node; GskRenderNode *clip_start_line_node; GskRenderNode *cut_line_node; int hovered_note; int start_vel_val; int vel_diff; int hovered_chord_index; float fval_at_start; double dval_at_start; int last_playhead_px; bool redraw; graphene_rect_t last_rect; bool can_link; bool is_highlighted; GdkRectangle highlight_rect; GdkRectangle last_selection_rect; guint drag_start_btn; bool first_draw; double new_hadj_val; Transport::Display ruler_display; PangoLayoutUniquePtr vel_layout; PangoLayoutUniquePtr ap_layout; PangoLayoutUniquePtr audio_layout; PangoLayoutUniquePtr debug_layout; int queued_playhead_px; GtkPopoverMenu *popover_menu; guint unlisten_notes_timeout_id;} ArrangerWidget
A canvas widget for drawing and interacting with arranger objects.
Definition arranger.h:95
void timeline_panel_widget_tear_down(TimelinePanelWidget *self)
Prepare for finalization.
struct _ArrangerWrapperWidget { GtkWidget parent_instance; GtkOverlay *overlay; GtkScrollbar * right_scrollbar; ArrangerWidget * child; ArrangerMinimapWidget *minimap;} ArrangerWrapperWidget
Wraps the arranger widget in a box with scrollbars.
GtkBox * timeline_divider_box
The paned dividing the pinned and unpinned timelines.
GtkBox * timelines_plus_ruler
Box for the timelines and the ruler.
ArrangerWidget * pinned_timeline
The pinned timeline above the main one.
ArrangerWidget * timeline
The main timeline.
GtkSizeGroup * timeline_ruler_h_size_group
Size group for keeping the whole ruler and each timeline the same width.
RulerWidget * ruler
Ruler.
The Timeline toolbar in the top.
The TracklistWidget holds all the Track's in the Project.
Definition tracklist.h:38