Add touch-events signal emission to ArdourKnob
This commit is contained in:
@@ -393,6 +393,8 @@ ArdourKnob::on_button_press_event (GdkEventButton *ev)
|
||||
if (ev->type != GDK_BUTTON_PRESS) {
|
||||
if (_grabbed) {
|
||||
remove_modal_grab();
|
||||
_grabbed = false;
|
||||
StopGesture ();
|
||||
gdk_pointer_ungrab (GDK_CURRENT_TIME);
|
||||
}
|
||||
return true;
|
||||
@@ -410,6 +412,7 @@ ArdourKnob::on_button_press_event (GdkEventButton *ev)
|
||||
_tooltip.start_drag();
|
||||
add_modal_grab();
|
||||
_grabbed = true;
|
||||
StartGesture ();
|
||||
gdk_pointer_grab(ev->window,false,
|
||||
GdkEventMask( Gdk::POINTER_MOTION_MASK | Gdk::BUTTON_PRESS_MASK |Gdk::BUTTON_RELEASE_MASK),
|
||||
NULL,NULL,ev->time);
|
||||
@@ -421,6 +424,7 @@ ArdourKnob::on_button_release_event (GdkEventButton *ev)
|
||||
{
|
||||
_tooltip.stop_drag();
|
||||
_grabbed = false;
|
||||
StopGesture ();
|
||||
remove_modal_grab();
|
||||
gdk_pointer_ungrab (GDK_CURRENT_TIME);
|
||||
|
||||
|
||||
@@ -91,6 +91,9 @@ public:
|
||||
|
||||
void color_handler ();
|
||||
|
||||
sigc::signal<void> StartGesture;
|
||||
sigc::signal<void> StopGesture;
|
||||
|
||||
protected:
|
||||
void render (Cairo::RefPtr<Cairo::Context> const&, cairo_rectangle_t*);
|
||||
void on_size_request (Gtk::Requisition* req);
|
||||
|
||||
Reference in New Issue
Block a user