put the issue of using a monitor section into ~/.config/ardour.rc, not the session...
[ardour2.git] / gtk2_ardour / tempo_dialog.h
blobc75f60ac23c5227833261f575d403d6fbe931dad
1 /*
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 std::vector<std::string> strings;
42 Gtk::Adjustment bpm_adjustment;
43 Gtk::SpinButton bpm_spinner;
44 Gtk::Button ok_button;
45 Gtk::Button cancel_button;
46 Gtk::Entry when_bar_entry;
47 Gtk::Entry when_beat_entry;
48 Gtk::Label when_bar_label;
49 Gtk::Label when_beat_label;
50 char buf[64];
52 TempoDialog (ARDOUR::TempoMap&, nframes_t, const std::string & action);
53 TempoDialog (ARDOUR::TempoSection&, const std::string & action);
55 double get_bpm ();
56 double get_note_type ();
57 bool get_bbt_time (ARDOUR::BBT_Time&);
59 private:
60 void init (const ARDOUR::BBT_Time& start, double, double, bool);
61 void bpm_changed ();
62 bool bpm_button_press (GdkEventButton* );
63 bool bpm_button_release (GdkEventButton* );
64 bool entry_key_release (GdkEventKey* );
65 void note_types_change ();
68 struct MeterDialog : public ArdourDialog
70 Gtk::Entry bpb_entry;
71 Gtk::ComboBoxText note_types;
72 std::vector<std::string> strings;
73 Gtk::Button ok_button;
74 Gtk::Button cancel_button;
75 Gtk::Entry when_bar_entry;
76 char buf[64];
78 MeterDialog (ARDOUR::TempoMap&, nframes_t, const std::string & action);
79 MeterDialog (ARDOUR::MeterSection&, const std::string & action);
81 double get_bpb ();
82 double get_note_type ();
83 bool get_bbt_time (ARDOUR::BBT_Time&);
85 private:
86 void init (const ARDOUR::BBT_Time&, double, double, bool);
87 bool entry_key_press (GdkEventKey* );
88 bool entry_key_release (GdkEventKey* );
89 void note_types_change ();
92 #endif /* __ardour_gtk_tempo_dialog_h__ */