use stringcr_t and gain 1/1000 binary size reduction. not thaat much...
[ardour.git] / gtk2_ardour / tempo_dialog.h
1 #ifndef __ardour_gtk_tempo_dialog_h__
2 #define __ardour_gtk_tempo_dialog_h__
3
4 #include <gtkmm/entry.h>
5 #include <gtkmm/frame.h>
6 #include <gtkmm/box.h>
7 #include <gtkmm/button.h>
8 #include <gtkmm/label.h>
9 #include <gtkmm/table.h>
10 #include <gtkmm/entry.h>
11 #include <gtkmm/comboboxtext.h>
12
13 #include <ardour/types.h>
14 #include <ardour/tempo.h>
15
16 #include "ardour_dialog.h"
17
18 struct TempoDialog : public ArdourDialog 
19 {
20     Gtk::Entry   bpm_entry;
21     Gtk::Frame   bpm_frame;
22     Gtk::VBox    vpacker;
23     Gtk::Button  ok_button;
24     Gtk::Button  cancel_button;
25     Gtk::HBox    button_box;
26     Gtk::HBox    hspacer1;
27     Gtk::VBox    vspacer1;
28     Gtk::Entry   when_bar_entry;
29     Gtk::Entry   when_beat_entry;
30     Gtk::Label   when_bar_label;
31     Gtk::Label   when_beat_label;
32     Gtk::Table   when_table;
33     Gtk::Frame   when_frame;
34     char buf[64];
35     
36     TempoDialog (ARDOUR::TempoMap&, jack_nframes_t, ARDOUR::stringcr_t action);
37     TempoDialog (ARDOUR::TempoSection&, ARDOUR::stringcr_t action);
38
39     double get_bpm ();
40     bool   get_bbt_time (ARDOUR::BBT_Time&);
41     
42   private:
43     void init (const ARDOUR::BBT_Time& start, double, bool);
44 };
45
46 struct MeterDialog : public ArdourDialog 
47 {
48     Gtk::Entry   bpb_entry;
49     Gtk::ComboBoxText note_types;
50     vector<string> strings;
51     Gtk::Frame   note_frame;
52     Gtk::Frame   bpb_frame;
53     Gtk::VBox    vpacker;
54     Gtk::Button  ok_button;
55     Gtk::Button  cancel_button;
56     Gtk::HBox    button_box;
57     Gtk::HBox    hspacer1, hspacer2;
58     Gtk::VBox    vspacer1, vspacer2;
59     Gtk::Entry   when_bar_entry;
60     Gtk::Entry   when_beat_entry;
61     Gtk::Label   when_bar_label;
62     Gtk::Label   when_beat_label;
63     Gtk::Table   when_table;
64     Gtk::Frame   when_frame;
65     char buf[64];
66     
67     MeterDialog (ARDOUR::TempoMap&, jack_nframes_t, ARDOUR::stringcr_t action);
68     MeterDialog (ARDOUR::MeterSection&, ARDOUR::stringcr_t action);
69
70     double get_bpb ();
71     double get_note_type ();
72     bool   get_bbt_time (ARDOUR::BBT_Time&);
73
74   private:
75     void init (const ARDOUR::BBT_Time&, double, double, bool);
76 };
77
78 #endif /* __ardour_gtk_tempo_dialog_h__ */