cabd9eba478f2d5b0514ed2768cd3e2913514eef
[ardour.git] / gtk2_ardour / step_entry.h
1 /*
2     Copyright (C) 2010 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 __gtk2_ardour_step_entry_h__
21 #define __gtk2_ardour_step_entry_h__
22
23 #include <gtkmm/togglebutton.h>
24 #include <gtkmm/radiobutton.h>
25 #include <gtkmm/spinbutton.h>
26 #include <gtkmm/box.h>
27 #include <gtkmm/adjustment.h>
28
29 #include "ardour_dialog.h"
30 #include "gtk_pianokeyboard.h"
31
32 class MidiTimeAxisView;
33
34 class StepEntry : public ArdourDialog
35 {
36   public:
37         StepEntry (MidiTimeAxisView&);
38         ~StepEntry ();
39
40         void note_off_event_handler (int note);
41         
42   private:
43         Gtk::VBox packer;
44         Gtk::HBox upper_box;
45         Gtk::HBox note_length_box;
46         Gtk::HBox note_velocity_box;
47
48         Gtk::ToggleButton chord_button;
49         Gtk::ToggleButton triplet_button;
50         Gtk::ToggleButton dot_button;
51
52         Gtk::Button sustain_button;
53         Gtk::Button rest_button;
54
55         Gtk::RadioButton length_1_button;
56         Gtk::RadioButton length_2_button;
57         Gtk::RadioButton length_4_button;
58         Gtk::RadioButton length_8_button;
59         Gtk::RadioButton length_12_button;
60         Gtk::RadioButton length_16_button;
61         Gtk::RadioButton length_32_button;
62         Gtk::RadioButton length_64_button;
63
64         Gtk::RadioButton velocity_ppp_button;
65         Gtk::RadioButton velocity_pp_button;
66         Gtk::RadioButton velocity_p_button;
67         Gtk::RadioButton velocity_mp_button;
68         Gtk::RadioButton velocity_mf_button;
69         Gtk::RadioButton velocity_f_button;
70         Gtk::RadioButton velocity_ff_button;
71         Gtk::RadioButton velocity_fff_button;
72
73         Gtk::Adjustment channel_adjustment;
74         Gtk::SpinButton channel_spinner;
75
76         PianoKeyboard* _piano;
77         Gtk::Widget* piano;
78         MidiTimeAxisView* _mtv;
79
80         void rest_click ();
81         void sustain_click ();
82 };
83
84 #endif /* __gtk2_ardour_step_entry_h__ */