Add Canvas::re_enter() which picks the current item again based on mouse pointer position and generates an enter event for it
This commit is contained in:
parent
779fe6c082
commit
69a92e67f0
@ -331,6 +331,14 @@ Canvas::queue_draw_item_area (Item* item, Rect area)
|
||||
request_redraw (item->item_to_window (area));
|
||||
}
|
||||
|
||||
void
|
||||
GtkCanvas::re_enter ()
|
||||
{
|
||||
DEBUG_TRACE (PBD::DEBUG::CanvasEnterLeave, "re-enter canvas by request\n");
|
||||
_current_item = 0;
|
||||
pick_current_item (0);
|
||||
}
|
||||
|
||||
/** Construct a GtkCanvas */
|
||||
GtkCanvas::GtkCanvas ()
|
||||
: _current_item (0)
|
||||
|
@ -135,6 +135,11 @@ public:
|
||||
std::string indent() const;
|
||||
std::string render_indent() const;
|
||||
void dump (std::ostream&) const;
|
||||
|
||||
/** Ask the canvas to pick the current item again, and generate
|
||||
an enter event for it.
|
||||
*/
|
||||
virtual void re_enter () = 0;
|
||||
|
||||
protected:
|
||||
void queue_draw_item_area (Item *, Rect);
|
||||
@ -169,6 +174,8 @@ public:
|
||||
|
||||
bool get_mouse_position (Duple& winpos) const;
|
||||
|
||||
void re_enter ();
|
||||
|
||||
protected:
|
||||
bool on_scroll_event (GdkEventScroll *);
|
||||
bool on_expose_event (GdkEventExpose *);
|
||||
|
Loading…
Reference in New Issue
Block a user