29 |
#include <gtkmm/menu.h> |
#include <gtkmm/menu.h> |
30 |
|
|
31 |
#include "dimensionmanager.h" |
#include "dimensionmanager.h" |
32 |
|
#include "paramedit.h" |
33 |
|
|
34 |
#include <gig.h> |
#include <gig.h> |
35 |
|
|
36 |
|
enum virt_keyboard_mode_t { |
37 |
|
VIRT_KEYBOARD_MODE_NORMAL, |
38 |
|
VIRT_KEYBOARD_MODE_CHORD |
39 |
|
}; |
40 |
|
|
41 |
class SortedRegions { |
class SortedRegions { |
42 |
private: |
private: |
43 |
std::vector<gig::Region*> regions; |
std::vector<gig::Region*> regions; |
69 |
sigc::signal<void, gig::Region*>& signal_region_to_be_changed(); |
sigc::signal<void, gig::Region*>& signal_region_to_be_changed(); |
70 |
sigc::signal<void, gig::Region*>& signal_region_changed_signal(); |
sigc::signal<void, gig::Region*>& signal_region_changed_signal(); |
71 |
|
|
72 |
|
sigc::signal<void, int/*key*/, int/*velocity*/>& signal_keyboard_key_hit(); |
73 |
|
sigc::signal<void, int/*key*/, int/*velocity*/>& signal_keyboard_key_released(); |
74 |
|
|
75 |
gig::Region* get_region() { return region; } |
gig::Region* get_region() { return region; } |
76 |
|
|
77 |
void on_note_on_event(int key, int velocity); |
void on_note_on_event(int key, int velocity); |
78 |
void on_note_off_event(int key, int velocity); |
void on_note_off_event(int key, int velocity); |
79 |
|
|
80 |
|
Gtk::HBox m_VirtKeybPropsBox; |
81 |
|
|
82 |
protected: |
protected: |
83 |
virtual void on_realize(); |
virtual void on_realize(); |
84 |
virtual bool on_expose_event(GdkEventExpose* e); |
virtual bool on_expose_event(GdkEventExpose* e); |
101 |
sigc::signal<void, gig::Region*> region_to_be_changed_signal; |
sigc::signal<void, gig::Region*> region_to_be_changed_signal; |
102 |
sigc::signal<void, gig::Region*> region_changed_signal; |
sigc::signal<void, gig::Region*> region_changed_signal; |
103 |
|
|
104 |
|
sigc::signal<void, int/*key*/, int/*velocity*/> keyboard_key_hit_signal; |
105 |
|
sigc::signal<void, int/*key*/, int/*velocity*/> keyboard_key_released_signal; |
106 |
|
|
107 |
gig::Instrument* instrument; |
gig::Instrument* instrument; |
108 |
gig::Region* region; |
gig::Region* region; |
109 |
SortedRegions regions; |
SortedRegions regions; |
110 |
|
|
111 |
bool is_black_key(int key); |
bool is_black_key(int key); |
112 |
void draw_region(int from, int to, const Gdk::Color& color); |
void draw_region(int from, int to, const Gdk::Color& color); |
113 |
|
void draw_digit(int key); |
114 |
void motion_resize_region(int x, int y); |
void motion_resize_region(int x, int y); |
115 |
void motion_move_region(int x, int y); |
void motion_move_region(int x, int y); |
116 |
|
|
155 |
Glib::RefPtr<Gtk::ActionGroup> actionGroup; |
Glib::RefPtr<Gtk::ActionGroup> actionGroup; |
156 |
Glib::RefPtr<Gtk::UIManager> uiManager; |
Glib::RefPtr<Gtk::UIManager> uiManager; |
157 |
|
|
158 |
|
// properties of the virtaul keyboard |
159 |
|
ChoiceEntry<virt_keyboard_mode_t> m_VirtKeybModeChoice; |
160 |
|
Gtk::Label m_VirtKeybVelocityLabelDescr; |
161 |
|
Gtk::Label m_VirtKeybVelocityLabel; |
162 |
|
Gtk::Label m_VirtKeybOffVelocityLabelDescr; |
163 |
|
Gtk::Label m_VirtKeybOffVelocityLabel; |
164 |
|
int currentActiveKey; |
165 |
|
|
166 |
DimensionManager dimensionManager; |
DimensionManager dimensionManager; |
167 |
}; |
}; |
168 |
|
|