add new files for export dialogs
[ardour.git] / gtk2_ardour / export_range_markers_dialog.h
1 /*
2     Copyright (C) 2006 Andre Raue
3
4     This program is free software; you can redistribute it and/or modify
5     it under the terms of the GNU General Public License as published by
6     the Free Software Foundation; either version 2 of the License, or
7     (at your option) any later version.
8
9     This program is distributed in the hope that it will be useful,
10     but WITHOUT ANY WARRANTY; without even the implied warranty of
11     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12     GNU General Public License for more details.
13
14     You should have received a copy of the GNU General Public License
15     along with this program; if not, write to the Free Software
16     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17
18 */
19
20 #ifndef __export_range_markers_dialog_h__
21 #define __export_range_markers_dialog_h__
22
23 #include <ardour/location.h>
24
25 #include "export_dialog.h"
26
27
28 class ExportRangeMarkersDialog : public ExportDialog 
29 {
30   public:
31         ExportRangeMarkersDialog (PublicEditor&);
32   
33   protected:
34         virtual bool is_filepath_valid(string &filepath);
35
36         void export_audio_data();
37   
38   private:
39         // keeps the duration of all range_markers before the current
40         vector<jack_nframes_t>  range_markers_durations_aggregated;
41         vector<jack_nframes_t>  range_markers_durations;
42         // duration of all range markers
43         jack_nframes_t  total_duration;
44         // index of range marker, that get's exported right now
45         unsigned int    current_range_marker_index;
46         
47         // sets value of progress bar
48         virtual gint progress_timeout ();
49   
50         // initializes range_markers_durations_aggregated, range_markers_durations
51         // and total_duration
52         void init_progress_computing(ARDOUR::Locations::LocationList& locations);
53
54         // searches for a filename like "<filename><nr>.<postfix>" in path, that 
55         // does not exist
56     string get_target_filepath(string path, string filename, string postfix);
57
58         void process_range_markers_export(ARDOUR::Locations::LocationList&);
59 };
60
61
62 #endif // __export_range_markers_dialog_h__