a bunch of tweaks for the step entry process (computer keyboard input now works,...
[ardour2.git] / gtk2_ardour / step_entry.h
blobd65cbe17db34cd8879663c8a5501438137e83062
1 /*
2 Copyright (C) 2010 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 __gtk2_ardour_step_entry_h__
21 #define __gtk2_ardour_step_entry_h__
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>
29 #include "ardour_dialog.h"
30 #include "gtk_pianokeyboard.h"
32 class MidiTimeAxisView;
34 class StepEntry : public ArdourDialog
36 public:
37 StepEntry (MidiTimeAxisView&);
38 ~StepEntry ();
40 void note_off_event_handler (int note);
41 void rest_event_handler ();
43 private:
44 Gtk::VBox packer;
45 Gtk::HBox upper_box;
46 Gtk::HBox note_length_box;
47 Gtk::HBox note_velocity_box;
49 Gtk::ToggleButton chord_button;
50 Gtk::ToggleButton triplet_button;
51 Gtk::ToggleButton dot_button;
53 Gtk::Button sustain_button;
54 Gtk::Button rest_button;
56 Gtk::RadioButton length_1_button;
57 Gtk::RadioButton length_2_button;
58 Gtk::RadioButton length_4_button;
59 Gtk::RadioButton length_8_button;
60 Gtk::RadioButton length_12_button;
61 Gtk::RadioButton length_16_button;
62 Gtk::RadioButton length_32_button;
63 Gtk::RadioButton length_64_button;
65 Gtk::RadioButton velocity_ppp_button;
66 Gtk::RadioButton velocity_pp_button;
67 Gtk::RadioButton velocity_p_button;
68 Gtk::RadioButton velocity_mp_button;
69 Gtk::RadioButton velocity_mf_button;
70 Gtk::RadioButton velocity_f_button;
71 Gtk::RadioButton velocity_ff_button;
72 Gtk::RadioButton velocity_fff_button;
74 Gtk::Adjustment channel_adjustment;
75 Gtk::SpinButton channel_spinner;
77 PianoKeyboard* _piano;
78 Gtk::Widget* piano;
79 MidiTimeAxisView* _mtv;
81 void rest_click ();
82 void sustain_click ();
83 void chord_toggled ();
84 void triplet_toggled ();
86 bool piano_enter_notify_event (GdkEventCrossing *ev);
87 bool on_key_release_event (GdkEventKey*);
88 bool on_key_press_event (GdkEventKey*);
91 #endif /* __gtk2_ardour_step_entry_h__ */