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
,
50 void equivalent_output(Tracks
*tracks
, double *result
);
52 int move_track_up(Track
*track
); // move recordable tracks up
53 int move_track_down(Track
*track
); // move recordable tracks down
54 int move_tracks_up(); // move recordable tracks up
55 int move_tracks_down(); // move recordable tracks down
56 void paste_audio_transition(PluginServer
*server
);
57 void paste_video_transition(PluginServer
*server
, int first_track
= 0);
59 void paste_transition(PluginServer
*server
, Edit
*dest_edit
);
60 // Return the numbers of tracks with the play patch enabled
61 int playable_audio_tracks();
62 int playable_video_tracks();
63 // Return number of tracks with the record patch enabled
64 int recordable_audio_tracks();
65 int recordable_video_tracks();
66 int total_audio_tracks();
67 int total_video_tracks();
68 // return the longest track in all the tracks in seconds
69 double total_length();
70 double total_video_length();
71 // Update y pixels after a zoom
72 void update_y_pixels(Theme
*theme
);
73 // Total number of tracks where the following toggles are selected
74 void select_all(int type
,
76 void translate_camera(float offset_x
, float offset_y
);
77 void translate_projector(float offset_x
, float offset_y
);
78 int total_of(int type
);
80 Track
* add_audio_track(int above
, Track
*dst_track
);
81 Track
* add_video_track(int above
, Track
*dst_track
);
82 // Track* add_audio_track(int to_end = 1);
83 // Track* add_video_track(int to_end = 1);
85 int delete_track(Track
* track
);
86 // detach shared effects referencing module
87 int detach_shared_effects(int module
);
95 // Types for drag toggle behavior
115 int change_channels(int oldchannels
, int newchannels
);
120 // Change references to shared modules in all tracks from old to new.
121 // If do_swap is true values of new are replaced with old.
122 void change_modules(int old_location
, int new_location
, int do_swap
);
123 // Append all the tracks to the end of the recordable tracks
124 int concatenate_tracks(int edit_plugins
);
125 // Change references to shared plugins in all tracks
126 void change_plugins(SharedLocation
&old_location
, SharedLocation
&new_location
, int do_swap
);
128 int delete_tracks(); // delete all the recordable tracks
129 int delete_all_tracks(); // delete just the tracks
131 void copy_from(Tracks
*tracks
);
133 // ================================== EDL editing
134 int copy(double start
,
138 char *output_path
= "");
142 int copy_assets(FileXML
*xml
,
146 int clear(double start
, double end
, int clear_plugins
);
147 void clear_automation(double selectionstart
,
148 double selectionend
);
149 void straighten_automation(double selectionstart
,
150 double selectionend
);
151 int clear_default_keyframe();
152 int clear_handle(double start
,
154 double &longest_distance
,
157 int copy_automation(double selectionstart
,
162 int copy_default_keyframe(FileXML
*file
);
163 void paste_automation(double selectionstart
,
166 int paste_default_keyframe(FileXML
*file
);
167 int paste(int64_t start
, int64_t end
);
168 // all units are samples by default
169 int paste_output(int64_t startproject
,
171 int64_t startsource_sample
,
172 int64_t endsource_sample
,
173 int64_t startsource_frame
,
174 int64_t endsource_frame
,
176 int paste_silence(double start
,
179 int purge_asset(Asset
*asset
);
180 int asset_used(Asset
*asset
);
182 int popup_transition(int cursor_x
, int cursor_y
);
183 int select_auto(int cursor_x
, int cursor_y
);
184 int move_auto(int cursor_x
, int cursor_y
, int shift_down
);
185 int modify_edithandles(double &oldposition
,
191 int modify_pluginhandles(double &oldposition
,
197 int select_handles();
199 int select_edit(int64_t cursor_position
, int cursor_x
, int cursor_y
, int64_t &new_start
, int64_t &new_end
);
200 int feather_edits(int64_t start
, int64_t end
, int64_t samples
, int audio
, int video
);
201 int64_t get_feather(int64_t selectionstart
, int64_t selectionend
, int audio
, int video
);
202 // Move edit boundaries and automation during a framerate change
203 int scale_time(float rate_scale
, int ignore_record
, int scale_edits
, int scale_autos
, int64_t start
, int64_t end
);
205 // ================================== accounting
207 int handles
, titles
; // show handles or titles
208 int show_output
; // what type of video to draw
209 AutoConf auto_conf
; // which autos are visible
210 int overlays_visible
;
211 double total_playable_length(); // Longest track.
212 // Used by equivalent_output
213 int total_playable_vtracks();
214 double total_recordable_length(); // Longest track with recording on
215 int totalpixels(); // height of all tracks in pixels
216 int number_of(Track
*track
); // track number of pointer
217 Track
* number(int number
); // pointer to track number