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
37 StepEntry (MidiTimeAxisView&);
40 void note_off_event_handler (int note);
41 void rest_event_handler ();
43 Evoral::MusicalTime note_length() const;
44 uint8_t note_velocity() const;
45 uint8_t note_channel() const;
50 Gtk::HBox note_length_box;
51 Gtk::HBox note_velocity_box;
53 Gtk::ToggleButton chord_button;
54 Gtk::ToggleButton triplet_button;
55 Gtk::ToggleButton dot_button;
56 Gtk::ToggleButton restart_button;
58 Gtk::Button sustain_button;
59 Gtk::Button rest_button;
60 Gtk::Button grid_rest_button;
63 Gtk::RadioButton length_1_button;
64 Gtk::RadioButton length_2_button;
65 Gtk::RadioButton length_4_button;
66 Gtk::RadioButton length_8_button;
67 Gtk::RadioButton length_12_button;
68 Gtk::RadioButton length_16_button;
69 Gtk::RadioButton length_32_button;
70 Gtk::RadioButton length_64_button;
72 Gtk::RadioButton velocity_ppp_button;
73 Gtk::RadioButton velocity_pp_button;
74 Gtk::RadioButton velocity_p_button;
75 Gtk::RadioButton velocity_mp_button;
76 Gtk::RadioButton velocity_mf_button;
77 Gtk::RadioButton velocity_f_button;
78 Gtk::RadioButton velocity_ff_button;
79 Gtk::RadioButton velocity_fff_button;
81 Gtk::Adjustment channel_adjustment;
82 Gtk::SpinButton channel_spinner;
84 PianoKeyboard* _piano;
86 MidiTimeAxisView* _mtv;
89 void grid_rest_click ();
90 void sustain_click ();
91 void chord_toggled ();
92 void triplet_toggled ();
94 bool piano_enter_notify_event (GdkEventCrossing *ev);
95 bool on_key_release_event (GdkEventKey*);
96 bool on_key_press_event (GdkEventKey*);
101 #endif /* __gtk2_ardour_step_entry_h__ */