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