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_audio_length();
71 double total_video_length();
72 double total_length_framealigned(double fps
);
73 // Update y pixels after a zoom
74 void update_y_pixels(Theme
*theme
);
75 // Total number of tracks where the following toggles are selected
76 void select_all(int type
,
78 void translate_camera(float offset_x
, float offset_y
);
79 void translate_projector(float offset_x
, float offset_y
);
80 int total_of(int type
);
82 Track
* add_audio_track(int above
, Track
*dst_track
);
83 Track
* add_video_track(int above
, Track
*dst_track
);
84 // Track* add_audio_track(int to_end = 1);
85 // Track* add_video_track(int to_end = 1);
87 int delete_track(Track
* track
);
88 // detach shared effects referencing module
89 int detach_shared_effects(int module
);
97 // Types for drag toggle behavior
117 int change_channels(int oldchannels
, int newchannels
);
122 // Change references to shared modules in all tracks from old to new.
123 // If do_swap is true values of new are replaced with old.
124 void change_modules(int old_location
, int new_location
, int do_swap
);
125 // Append all the tracks to the end of the recordable tracks
126 int concatenate_tracks(int edit_plugins
);
127 // Change references to shared plugins in all tracks
128 void change_plugins(SharedLocation
&old_location
, SharedLocation
&new_location
, int do_swap
);
130 int delete_tracks(); // delete all the recordable tracks
131 int delete_all_tracks(); // delete just the tracks
133 void copy_from(Tracks
*tracks
);
135 // ================================== EDL editing
136 int copy(double start
,
140 char *output_path
= "");
144 int copy_assets(FileXML
*xml
,
148 int clear(double start
, double end
, int clear_plugins
);
149 void clear_automation(double selectionstart
,
150 double selectionend
);
151 void straighten_automation(double selectionstart
,
152 double selectionend
);
153 int clear_default_keyframe();
154 int clear_handle(double start
,
156 double &longest_distance
,
159 int copy_automation(double selectionstart
,
164 int copy_default_keyframe(FileXML
*file
);
165 void loaded_lengths_to_tracklengths(int includerecordtracks
);
166 void paste_automation(double selectionstart
,
169 int paste_default_keyframe(FileXML
*file
);
170 int paste(int64_t start
, int64_t end
);
171 // all units are samples by default
172 int paste_output(int64_t startproject
,
174 int64_t startsource_sample
,
175 int64_t endsource_sample
,
176 int64_t startsource_frame
,
177 int64_t endsource_frame
,
179 int paste_silence(double start
,
182 int purge_asset(Asset_GC asset
);
183 int asset_used(Asset_GC asset
);
185 int popup_transition(int cursor_x
, int cursor_y
);
186 int select_auto(int cursor_x
, int cursor_y
);
187 int move_auto(int cursor_x
, int cursor_y
, int shift_down
);
188 int modify_edithandles(double &oldposition
,
194 int modify_pluginhandles(double &oldposition
,
200 int select_handles();
202 int select_edit(int64_t cursor_position
, int cursor_x
, int cursor_y
, int64_t &new_start
, int64_t &new_end
);
203 int feather_edits(int64_t start
, int64_t end
, int64_t samples
, int audio
, int video
);
204 int64_t get_feather(int64_t selectionstart
, int64_t selectionend
, int audio
, int video
);
205 // Move edit boundaries and automation during a framerate change
206 int scale_time(float rate_scale
, int ignore_record
, int scale_edits
, int scale_autos
, int64_t start
, int64_t end
);
208 // ================================== accounting
210 int handles
, titles
; // show handles or titles
211 int show_output
; // what type of video to draw
212 AutoConf auto_conf
; // which autos are visible
213 int overlays_visible
;
214 double total_playable_length(); // Longest track.
215 // Used by equivalent_output
216 int total_playable_vtracks();
217 double total_recordable_length(); // Longest track with recording on
218 int totalpixels(); // height of all tracks in pixels
219 int number_of(Track
*track
); // track number of pointer
220 Track
* number(int number
); // pointer to track number
230 // c-file-style: "linux"