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
22#define TRACKLIST_SELECTIONS (PROJECT->tracklist_selections)
23
32typedef struct TracklistSelections
33{
35 Track * tracks[600];
36 int num_tracks;
37
40
48
49void
50tracklist_selections_init_loaded (TracklistSelections * ts);
51
57tracklist_selections_new (bool is_project);
58
65 GError ** error);
66
73Track *
75
82Track *
84
85void
86tracklist_selections_add_track (
88 Track * track,
89 bool fire_events);
90
91void
92tracklist_selections_add_tracks_in_range (
94 int min_pos,
95 int max_pos,
96 bool fire_events);
97
101void
102tracklist_selections_clear (TracklistSelections * self, const bool fire_events);
103
108void
110
114void
116 Track * track,
117 bool ctrl,
118 bool shift,
119 bool dragged);
120
121bool
122tracklist_selections_contains_uninstantiated_plugin (
123 const TracklistSelections * self);
124
125bool
126tracklist_selections_contains_undeletable_track (
127 const TracklistSelections * self);
128
129bool
130tracklist_selections_contains_uncopyable_track (
131 const TracklistSelections * self);
132
137bool
139 const TracklistSelections * self);
140
149bool
151 TracklistSelections * self,
152 bool soloed);
153
162bool
164 TracklistSelections * self,
165 bool listened);
166
175bool
177 TracklistSelections * self,
178 bool muted);
179
180bool
181tracklist_selections_contains_enabled_track (
182 TracklistSelections * self,
183 bool enabled);
184
188bool
190
191bool
192tracklist_selections_contains_track_index (
193 TracklistSelections * self,
194 int track_idx);
195
196void
197tracklist_selections_remove_track (
199 Track * track,
200 int fire_events);
201
206void
209 Track * track,
210 bool fire_events);
211
217void
219
224void
226
230void
232
236void
238
242void
244
249void
251
252void
253tracklist_selections_paste_to_pos (TracklistSelections * ts, int pos);
254
260void
262
263NONNULL void
264tracklist_selections_get_plugins (TracklistSelections * self, GPtrArray * arr);
265
275void
278 bool with_parents,
279 bool mark_master);
280
281void
282tracklist_selections_free (TracklistSelections * self);
283
288#endif
The backend for a timeline track.
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.