11 #include "pluginserver.inc"
12 #include "threadindexer.inc"
14 #include "trackcanvas.inc"
15 #include "transition.inc"
19 class Tracks
: public List
<Track
>
26 Tracks
& operator=(Tracks
&tracks
);
27 int load(FileXML
*xml
, int &track_offset
, uint32_t load_flags
);
28 void move_edits(ArrayList
<Edit
*> *edits
,
34 void move_effect(Plugin
*plugin
,
35 PluginSet
*plugin_set
,
39 // Construct a list of all the recordable edits which start on position
40 void get_affected_edits(ArrayList
<Edit
*> *drag_edits
,
44 void get_automation_extents(float *min
,
49 void equivalent_output(Tracks
*tracks
, double *result
);
51 int move_track_up(Track
*track
); // move recordable tracks up
52 int move_track_down(Track
*track
); // move recordable tracks down
53 int move_tracks_up(); // move recordable tracks up
54 int move_tracks_down(); // move recordable tracks down
55 void paste_audio_transition(PluginServer
*server
);
56 void paste_video_transition(PluginServer
*server
, int first_track
= 0);
58 void paste_transition(PluginServer
*server
, Edit
*dest_edit
);
59 // Return the numbers of tracks with the play patch enabled
60 int playable_audio_tracks();
61 int playable_video_tracks();
62 // Return number of tracks with the record patch enabled
63 int recordable_audio_tracks();
64 int recordable_video_tracks();
65 int total_audio_tracks();
66 int total_video_tracks();
67 // return the longest track in all the tracks in seconds
68 double total_length();
69 double total_video_length();
70 // Update y pixels after a zoom
71 void update_y_pixels(Theme
*theme
);
72 // Total number of tracks where the following toggles are selected
73 void select_all(int type
,
75 void translate_camera(float offset_x
, float offset_y
);
76 void translate_projector(float offset_x
, float offset_y
);
77 int total_of(int type
);
79 Track
* add_audio_track(int above
, Track
*dst_track
);
80 Track
* add_video_track(int above
, Track
*dst_track
);
81 // Track* add_audio_track(int to_end = 1);
82 // Track* add_video_track(int to_end = 1);
84 int delete_track(Track
* track
);
85 // detach shared effects referencing module
86 int detach_shared_effects(int module
);
94 // Types for drag toggle behavior
114 int change_channels(int oldchannels
, int newchannels
);
119 // Change references to shared modules in all tracks from old to new.
120 // If do_swap is true values of new are replaced with old.
121 void change_modules(int old_location
, int new_location
, int do_swap
);
122 // Append all the tracks to the end of the recordable tracks
123 int concatenate_tracks(int edit_plugins
);
124 // Change references to shared plugins in all tracks
125 void change_plugins(SharedLocation
&old_location
, SharedLocation
&new_location
, int do_swap
);
127 int delete_tracks(); // delete all the recordable tracks
128 int delete_all_tracks(); // delete just the tracks
130 void copy_from(Tracks
*tracks
);
132 // ================================== EDL editing
133 int copy(double start
,
137 char *output_path
= "");
141 int copy_assets(FileXML
*xml
,
145 int clear(double start
, double end
, int clear_plugins
);
146 // Returns the point to restart background rendering at.
147 // -1 means nothing changed.
148 void clear_automation(double selectionstart
,
149 double selectionend
);
150 int clear_default_keyframe();
151 int clear_handle(double start
,
153 double &longest_distance
,
156 int copy_automation(double selectionstart
,
161 int copy_default_keyframe(FileXML
*file
);
162 void paste_automation(double selectionstart
,
165 int paste_default_keyframe(FileXML
*file
);
166 int paste(int64_t start
, int64_t end
);
167 // all units are samples by default
168 int paste_output(int64_t startproject
,
170 int64_t startsource_sample
,
171 int64_t endsource_sample
,
172 int64_t startsource_frame
,
173 int64_t endsource_frame
,
175 int paste_silence(double start
,
178 int purge_asset(Asset
*asset
);
179 int asset_used(Asset
*asset
);
181 int popup_transition(int cursor_x
, int cursor_y
);
182 int select_auto(int cursor_x
, int cursor_y
);
183 int move_auto(int cursor_x
, int cursor_y
, int shift_down
);
184 int modify_edithandles(double &oldposition
,
190 int modify_pluginhandles(double &oldposition
,
196 int select_handles();
198 int select_edit(int64_t cursor_position
, int cursor_x
, int cursor_y
, int64_t &new_start
, int64_t &new_end
);
199 int feather_edits(int64_t start
, int64_t end
, int64_t samples
, int audio
, int video
);
200 int64_t get_feather(int64_t selectionstart
, int64_t selectionend
, int audio
, int video
);
201 // Move edit boundaries and automation during a framerate change
202 int scale_time(float rate_scale
, int ignore_record
, int scale_edits
, int scale_autos
, int64_t start
, int64_t end
);
204 // ================================== accounting
206 int handles
, titles
; // show handles or titles
207 int show_output
; // what type of video to draw
208 AutoConf auto_conf
; // which autos are visible
209 int overlays_visible
;
210 double total_playable_length(); // Longest track.
211 // Used by equivalent_output
212 int total_playable_vtracks();
213 double total_recordable_length(); // Longest track with recording on
214 int totalpixels(); // height of all tracks in pixels
215 int number_of(Track
*track
); // track number of pointer
216 Track
* number(int number
); // pointer to track number