2 Copyright (C) 1999-2002 Paul Davis
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.
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.
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.
20 #ifndef __ardour_export_dialog_h__
21 #define __ardour_export_dialog_h__
25 #include <ardour/export.h>
26 #include "ardour_dialog.h"
27 #include <ardour/location.h>
37 class ExportDialog : public ArdourDialog
40 ExportDialog (PublicEditor&, ARDOUR::AudioRegion* r = 0);
43 void connect_to_session (ARDOUR::Session*);
44 void set_range (jack_nframes_t start, jack_nframes_t end);
49 ARDOUR::Session* session;
50 ARDOUR::AudioRegion* audio_region;
52 Gtk::VBox track_vpacker;
56 Gtk::Table format_table;
57 Gtk::Frame format_frame;
59 Gtk::Label sample_rate_label;
60 Gtk::Combo sample_rate_combo;
61 Gtk::Label src_quality_label;
62 Gtk::Combo src_quality_combo;
63 Gtk::Label dither_type_label;
64 Gtk::Combo dither_type_combo;
65 Gtk::Label cue_file_label;
66 Gtk::Combo cue_file_combo;
67 Gtk::Label channel_count_label;
68 Gtk::Combo channel_count_combo;
69 Gtk::Label header_format_label;
70 Gtk::Combo header_format_combo;
71 Gtk::Label bitdepth_format_label;
72 Gtk::Combo bitdepth_format_combo;
73 Gtk::Label endian_format_label;
74 Gtk::Combo endian_format_combo;
75 Gtk::CheckButton cuefile_only_checkbox;
77 Gtk::Frame file_frame;
78 Gtk::Entry file_entry;
80 Gtk::Button file_browse_button;
82 Gtk::Button ok_button;
83 Gtk::Button cancel_button;
84 Gtk::Label cancel_label;
85 Gtk::ProgressBar progress_bar;
86 Gtk::ScrolledWindow track_scroll;
87 Gtk::ScrolledWindow master_scroll;
88 Gtk::Button track_selector_button;
89 Gtk::CList track_selector;
90 Gtk::CList master_selector;
91 Gtk::FileSelection *file_selector;
92 ARDOUR::AudioExportSpecification spec;
94 static GdkPixmap *check_pixmap;
95 static GdkBitmap *check_mask;
96 static GdkPixmap *empty_pixmap;
97 static GdkBitmap *empty_mask;
99 static void *_thread (void *arg);
100 gint progress_timeout ();
101 SigC::Connection progress_connection;
102 void build_window ();
104 gint header_chosen (GdkEventAny *ignored);
105 gint channels_chosen (GdkEventAny *ignored);
106 gint bitdepth_chosen (GdkEventAny *ignored);
107 gint sample_rate_chosen (GdkEventAny *ignored);
108 gint cue_file_type_chosen(GdkEventAny *ignored);
109 gint track_selector_button_press_event (GdkEventButton *ev);
110 gint master_selector_button_press_event (GdkEventButton *ev);
112 void do_export_cd_markers (const string& path, const string& cuefile_type);
113 void export_cue_file (ARDOUR::Locations::LocationList& locations, const string& path);
114 void export_toc_file (ARDOUR::Locations::LocationList& locations, const string& path);
116 gint change_focus_policy (GdkEventAny *, bool);
117 gint window_closed (GdkEventAny *ignored);
119 void track_selector_button_click ();
121 void initiate_browse ();
122 void finish_browse (int status);
127 static void* _export_region_thread (void *);
128 void export_region ();
131 #endif // __ardour_export_dialog_h__