20b0538a7fa6dd9ca1972816aaf3340fa21f4fa4
[ardour.git] / gtk2_ardour / time_fx_dialog.h
1 /*
2     Copyright (C) 2000-2009 Paul Davis
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 __ardour_time_fx_dialog_h__
21 #define __ardour_time_fx_dialog_h__
22
23 #include <gtkmm.h>
24
25 #include "ardour_dialog.h"
26 #include "region_selection.h"
27 #include "progress_reporter.h"
28
29 class Editor;
30
31 class TimeFXDialog : public ArdourDialog, public ProgressReporter
32 {
33 public:
34     ARDOUR::TimeFXRequest request;
35     Editor&               editor;
36     bool                  pitching;
37     Gtk::Adjustment       pitch_octave_adjustment;
38     Gtk::Adjustment       pitch_semitone_adjustment;
39     Gtk::Adjustment       pitch_cent_adjustment;
40     Gtk::SpinButton       pitch_octave_spinner;
41     Gtk::SpinButton       pitch_semitone_spinner;
42     Gtk::SpinButton       pitch_cent_spinner;
43     RegionSelection       regions;
44     Gtk::ProgressBar      progress_bar;
45
46     /* SoundTouch */
47     Gtk::CheckButton      quick_button;
48     Gtk::CheckButton      antialias_button;
49     Gtk::VBox             upper_button_box;
50
51     /* RubberBand */
52     Gtk::ComboBoxText     stretch_opts_selector;
53     Gtk::Label            stretch_opts_label;
54     Gtk::CheckButton      precise_button;
55     Gtk::CheckButton      preserve_formants_button;
56
57     Gtk::Button*          cancel_button;
58     Gtk::Button*          action_button;
59     Gtk::VBox             packer;
60     int                   status;
61
62     TimeFXDialog (Editor& e, bool for_pitch);
63
64     sigc::connection first_cancel;
65     sigc::connection first_delete;
66     void cancel_in_progress ();
67     gint delete_in_progress (GdkEventAny*);
68
69 private:
70         
71     void update_progress_gui (float);
72 };
73
74 #endif /* __ardour_time_fx_dialog_h__ */