2 Copyright (C) 2000-2007 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_gtk_tempo_dialog_h__
21 #define __ardour_gtk_tempo_dialog_h__
23 #include <gtkmm/entry.h>
24 #include <gtkmm/frame.h>
25 #include <gtkmm/box.h>
26 #include <gtkmm/button.h>
27 #include <gtkmm/label.h>
28 #include <gtkmm/table.h>
29 #include <gtkmm/entry.h>
30 #include <gtkmm/spinbutton.h>
31 #include <gtkmm/comboboxtext.h>
33 #include <ardour/types.h>
34 #include <ardour/tempo.h>
36 #include "ardour_dialog.h"
38 struct TempoDialog
: public ArdourDialog
40 Gtk::ComboBoxText note_types
;
41 vector
<string
> strings
;
42 Gtk::Adjustment bpm_adjustment
;
43 Gtk::SpinButton bpm_spinner
;
45 Gtk::Button ok_button
;
46 Gtk::Button cancel_button
;
47 Gtk::HBox hspacer1
, hspacer2
;
49 Gtk::Entry when_bar_entry
;
50 Gtk::Entry when_beat_entry
;
51 Gtk::Label when_bar_label
;
52 Gtk::Label when_beat_label
;
53 Gtk::Table when_table
;
54 Gtk::Frame when_frame
;
57 TempoDialog (ARDOUR::TempoMap
&, nframes_t
, const string
& action
);
58 TempoDialog (ARDOUR::TempoSection
&, const string
& action
);
61 double get_note_type ();
62 bool get_bbt_time (ARDOUR::BBT_Time
&);
65 void init (const ARDOUR::BBT_Time
& start
, double, double, bool);
67 bool bpm_button_press (GdkEventButton
* );
68 bool bpm_button_release (GdkEventButton
* );
69 bool entry_key_release (GdkEventKey
* );
70 void note_types_change ();
73 struct MeterDialog
: public ArdourDialog
76 Gtk::ComboBoxText note_types
;
77 vector
<string
> strings
;
79 Gtk::Button ok_button
;
80 Gtk::Button cancel_button
;
81 Gtk::Entry when_bar_entry
;
82 Gtk::Frame when_frame
;
85 MeterDialog (ARDOUR::TempoMap
&, nframes_t
, const string
& action
);
86 MeterDialog (ARDOUR::MeterSection
&, const string
& action
);
89 double get_note_type ();
90 bool get_bbt_time (ARDOUR::BBT_Time
&);
93 void init (const ARDOUR::BBT_Time
&, double, double, bool);
94 bool entry_key_press (GdkEventKey
* );
95 bool entry_key_release (GdkEventKey
* );
96 void note_types_change ();
99 #endif /* __ardour_gtk_tempo_dialog_h__ */