Zrythm
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
tracklist_selections.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: © 2019-2023 Alexandros Theodotou <alex@zrythm.org>
2// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
10#ifndef __ACTIONS_TRACKLIST_SELECTIONS_H__
11#define __ACTIONS_TRACKLIST_SELECTIONS_H__
12
13#include "dsp/track.h"
14#include "utils/yaml.h"
15
16typedef enum TracklistSelectionsActionType TracklistSelectionsActionType;
18
25#define TRACKLIST_SELECTIONS (PROJECT->tracklist_selections)
26
35typedef struct TracklistSelections
36{
38 Track * tracks[600];
39 int num_tracks;
40
43
51
52void
53tracklist_selections_init_loaded (TracklistSelections * ts);
54
60tracklist_selections_new (bool is_project);
61
68 GError ** error);
69
76Track *
78
85Track *
87
88void
89tracklist_selections_add_track (
91 Track * track,
92 bool fire_events);
93
94void
95tracklist_selections_add_tracks_in_range (
97 int min_pos,
98 int max_pos,
99 bool fire_events);
100
104void
105tracklist_selections_clear (TracklistSelections * self, const bool fire_events);
106
111void
113
117void
119 Track * track,
120 bool ctrl,
121 bool shift,
122 bool dragged);
123
124bool
125tracklist_selections_contains_uninstantiated_plugin (
126 const TracklistSelections * self);
127
128bool
129tracklist_selections_contains_undeletable_track (
130 const TracklistSelections * self);
131
132bool
133tracklist_selections_contains_uncopyable_track (
134 const TracklistSelections * self);
135
140bool
142 const TracklistSelections * self);
143
152bool
154 TracklistSelections * self,
155 bool soloed);
156
165bool
167 TracklistSelections * self,
168 bool listened);
169
178bool
180 TracklistSelections * self,
181 bool muted);
182
183bool
184tracklist_selections_contains_enabled_track (
185 TracklistSelections * self,
186 bool enabled);
187
191bool
193
194bool
195tracklist_selections_contains_track_index (
196 TracklistSelections * self,
197 int track_idx);
198
199void
200tracklist_selections_remove_track (
202 Track * track,
203 int fire_events);
204
209void
212 Track * track,
213 bool fire_events);
214
220void
222
227void
229
233void
235
239void
241
245void
247
252void
254
255void
256tracklist_selections_paste_to_pos (TracklistSelections * ts, int pos);
257
263void
265
266NONNULL void
267tracklist_selections_get_plugins (TracklistSelections * self, GPtrArray * arr);
268
278void
281 bool with_parents,
282 bool mark_master);
283
284void
285tracklist_selections_free (TracklistSelections * self);
286
291#endif
The backend for a timeline track.
EditTracksActionType
Action type.
NONNULL_ARGS(1) int undo_manager_undo(UndoManager *self
Undo last action.
void tracklist_selections_clear(TracklistSelections *self, const bool fire_events)
Clears the selections.
void tracklist_selections_select_all(TracklistSelections *ts, int visible_only)
Selects all Track's.
Track * tracklist_selections_get_lowest_track(TracklistSelections *self)
Gets lowest track in the selections.
bool tracklist_selections_contains_non_automatable_track(const TracklistSelections *self)
Returns whether the tracklist selections contains a track that cannot have automation lanes.
void tracklist_selections_select_foldable_children(TracklistSelections *self)
Make sure all children of foldable tracks in the selection are also selected.
void tracklist_selections_print(TracklistSelections *self)
For debugging.
bool tracklist_selections_contains_muted_track(TracklistSelections *self, bool muted)
Returns whether the selections contain a muted track if muted is true or an unmuted track if muted is...
bool tracklist_selections_contains_listened_track(TracklistSelections *self, bool listened)
Returns whether the selections contain a listened track if listened is true or an unlistened track if...
void tracklist_selections_select_last_visible(TracklistSelections *ts)
Selects the last visible track after clearing the selections.
void tracklist_selections_select_single(TracklistSelections *ts, Track *track, bool fire_events)
Selects a single track after clearing the selections.
void tracklist_selections_handle_click(Track *track, bool ctrl, bool shift, bool dragged)
Handle a click selection.
void tracklist_selections_mark_for_bounce(TracklistSelections *ts, bool with_parents, bool mark_master)
Marks the tracks to be bounced.
TracklistSelections * tracklist_selections_new(bool is_project)
bool tracklist_selections_contains_soloed_track(TracklistSelections *self, bool soloed)
Returns whether the selections contain a soloed track if soloed is true or an unsoloed track if soloe...
void tracklist_selections_sort(TracklistSelections *self, bool asc)
Sorts the tracks by position.
Track * tracklist_selections_get_highest_track(TracklistSelections *self)
Gets highest track in the selections.
void tracklist_selections_toggle_visibility(TracklistSelections *ts)
Toggle visibility of the selected tracks.
bool tracklist_selections_contains_track(TracklistSelections *self, Track *track)
Returns if the Track is selected or not.
TracklistSelections * tracklist_selections_clone(TracklistSelections *src, GError **error)
Clone the struct for copying, undoing, etc.
void tracklist_selections_toggle_pinned(TracklistSelections *ts)
Toggle pin/unpin of the selected tracks.
void tracklist_selections_post_deserialize(TracklistSelections *self)
To be called after receiving tracklist selections from the clipboard.
Track to be inserted into the Project's Tracklist.
Definition track.h:177
Selections to be used for the tracklist's current selections, copying, undoing, etc.
bool free_tracks
Flag to free tracks even if these are the project selections (e.g.
Track * tracks[600]
Selected Tracks.
bool is_project
Whether these are the project selections.
YAML utils.