41 |
sigc::signal<void> signal_region_selected(); |
sigc::signal<void> signal_region_selected(); |
42 |
sigc::signal<void> signal_instrument_changed(); |
sigc::signal<void> signal_instrument_changed(); |
43 |
|
|
44 |
|
sigc::signal<void, gig::Instrument*> signal_instrument_struct_to_be_changed(); |
45 |
|
sigc::signal<void, gig::Instrument*> signal_instrument_struct_changed(); |
46 |
|
|
47 |
|
sigc::signal<void, gig::Region*> signal_region_to_be_changed(); |
48 |
|
sigc::signal<void, gig::Region*> signal_region_changed_signal(); |
49 |
|
|
50 |
gig::Region* get_region() { return region; } |
gig::Region* get_region() { return region; } |
51 |
|
|
52 |
protected: |
protected: |
60 |
gig::Region* get_region(int key); |
gig::Region* get_region(int key); |
61 |
|
|
62 |
Glib::RefPtr<Gdk::GC> gc; |
Glib::RefPtr<Gdk::GC> gc; |
63 |
Gdk::Color blue, red, black, white, green, grey1; |
Gdk::Color blue, red, grey1; |
64 |
|
|
65 |
void draw_region(int from, int to, const Gdk::Color& color); |
void draw_region(int from, int to, const Gdk::Color& color); |
66 |
|
|
67 |
sigc::signal<void> region_selected; |
sigc::signal<void> region_selected; |
68 |
sigc::signal<void> instrument_changed; |
sigc::signal<void> instrument_changed; |
69 |
|
|
70 |
|
sigc::signal<void, gig::Instrument*> instrument_struct_to_be_changed_signal; |
71 |
|
sigc::signal<void, gig::Instrument*> instrument_struct_changed_signal; |
72 |
|
|
73 |
|
sigc::signal<void, gig::Region*> region_to_be_changed_signal; |
74 |
|
sigc::signal<void, gig::Region*> region_changed_signal; |
75 |
|
|
76 |
gig::Instrument* instrument; |
gig::Instrument* instrument; |
77 |
gig::Region* region; |
gig::Region* region; |
78 |
|
|
79 |
|
void motion_resize_region(int x, int y); |
80 |
|
void motion_move_region(int x, int y); |
81 |
|
|
82 |
// information needed during a resize |
// information needed during a resize |
83 |
struct { |
struct { |
84 |
bool active; |
bool active; |
94 |
gig::Region* prev_region; |
gig::Region* prev_region; |
95 |
} resize; |
} resize; |
96 |
|
|
97 |
|
// information needed during a region move |
98 |
|
struct { |
99 |
|
bool active; |
100 |
|
double from_x; |
101 |
|
int pos; |
102 |
|
bool touch_left; |
103 |
|
bool touch_right; |
104 |
|
} move; |
105 |
|
|
106 |
bool cursor_is_resize; |
bool cursor_is_resize; |
107 |
bool is_in_resize_zone(double x, double y); |
bool is_in_resize_zone(double x, double y); |
108 |
|
|