Zrythm
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
tracklist.h
1// clang-format off
2// SPDX-FileCopyrightText: © 2019-2021, 2023 Alexandros Theodotou <alex@zrythm.org>
3// SPDX-License-Identifier: LicenseRef-ZrythmLicense
4// clang-format on
5
6#ifndef __GUI_WIDGETS_TRACKLIST_H__
7#define __GUI_WIDGETS_TRACKLIST_H__
8
9#include "gtk_wrapper.h"
10
11#define USE_WIDE_HANDLE 1
12
13#define TRACKLIST_WIDGET_TYPE (tracklist_widget_get_type ())
14G_DECLARE_FINAL_TYPE (TracklistWidget, tracklist_widget, Z, TRACKLIST_WIDGET, GtkBox)
15
16
22#define MW_TRACKLIST MW_TIMELINE_PANEL->tracklist
23
24typedef struct _TrackWidget TrackWidget;
25typedef struct _DragDestBoxWidget DragDestBoxWidget;
26typedef struct _ChordTrackWidget ChordTrackWidget;
27typedef struct Track InstrumentTrack;
28typedef struct Tracklist Tracklist;
29typedef struct _AddTrackMenuButtonWidget AddTrackMenuButtonWidget;
30
39typedef struct _TracklistWidget
40{
41 GtkBox parent_instance;
42
44 GtkScrolledWindow * unpinned_scroll;
45
46 gulong unpinned_scroll_vall_changed_handler_id;
47
50 gulong unpinned_scroll_scroll_down_id;
51 double scroll_speed;
52
54 GtkBox * pinned_box;
55
57 GtkBox * unpinned_box;
58
64
69
70 AddTrackMenuButtonWidget * channel_add;
71
74 GtkSizeGroup * pinned_size_group;
75 GtkSizeGroup * unpinned_size_group;
76
78 GdkRectangle last_allocation;
79
80 bool setup;
81
82 double hover_y;
84
88void
90
94void
96
101void
103
107GMenu *
109
115
119void
121 TracklistWidget * self,
122 GtkEventControllerScroll * scroll_controller,
123 double dy);
124
128void
130
134void
136
140void
142
147#endif
void tracklist_widget_handle_vertical_zoom_scroll(TracklistWidget *self, GtkEventControllerScroll *scroll_controller, double dy)
Handle ctrl+shift+scroll.
void tracklist_widget_soft_refresh(TracklistWidget *self)
Refreshes each track without recreating it.
void tracklist_widget_set_unpinned_scroll_start_y(TracklistWidget *self, int y)
Updates the scroll adjustment.
GMenu * tracklist_widget_generate_add_track_menu(void)
Generates a menu for adding tracks to the tracklist.
TrackWidget * tracklist_widget_get_hit_track(TracklistWidget *self, double x, double y)
Gets hit TrackWidget and the given coordinates.
void tracklist_widget_tear_down(TracklistWidget *self)
Prepare for finalization.
void tracklist_widget_update_track_visibility(TracklistWidget *self)
Makes sure all the tracks for channels marked as visible are visible.
void tracklist_widget_setup(TracklistWidget *self, Tracklist *tracklist)
Sets up the TracklistWidget.
void tracklist_widget_hard_refresh(TracklistWidget *self)
Deletes all tracks and re-adds them.
DnD destination box used by mixer and tracklist widgets.
The TrackWidget is split into 3 parts.
Definition track.h:107
Track to be inserted into the Project's Tracklist.
Definition track.h:177
The TracklistWidget holds all the Track's in the Project.
Definition tracklist.h:40
GtkBox * pinned_box
Box to hold pinned tracks.
Definition tracklist.h:54
gulong unpinned_scroll_scroll_up_id
For DND autoscroll.
Definition tracklist.h:49
GdkRectangle last_allocation
Cache.
Definition tracklist.h:78
GtkScrolledWindow * unpinned_scroll
The scrolled window for unpinned tracks.
Definition tracklist.h:44
GtkBox * unpinned_box
Box inside unpinned scroll.
Definition tracklist.h:57
Tracklist * tracklist
Internal tracklist.
Definition tracklist.h:68
GtkSizeGroup * pinned_size_group
Size group to set the pinned track box and the pinned timeline to the same height.
Definition tracklist.h:74
DragDestBoxWidget * ddbox
Widget for drag and dropping plugins in to create new tracks.
Definition tracklist.h:63
The Tracklist contains all the tracks in the Project.
Definition tracklist.h:61