From 15faa626f7df7a3024dda5d11001347ed4573568 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Thu, 9 May 2019 20:52:43 +0200 Subject: Add tooltip buttons to frames. --- plugingui/eventhandler.cc | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'plugingui/eventhandler.cc') diff --git a/plugingui/eventhandler.cc b/plugingui/eventhandler.cc index 696b242..fd333b8 100644 --- a/plugingui/eventhandler.cc +++ b/plugingui/eventhandler.cc @@ -254,10 +254,31 @@ void EventHandler::processEvents() closeNotifier(); break; + + case EventType::mouseEnter: + { + auto enterEvent = static_cast(event.get()); + auto widget = window.find(enterEvent->x, enterEvent->y); + if(widget) + { + widget->mouseEnterEvent(); + } + } + break; + + case EventType::mouseLeave: + { + auto widget = window.mouseFocus(); + if(widget) + { + widget->mouseLeaveEvent(); + } + } + break; } } - // Probe window and children to readrw as needed. + // Probe window and children to redraw as needed. // NOTE: This method will invoke native->redraw() if a redraw is needed. window.updateBuffer(); } -- cgit v1.2.3