diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2019-05-09 20:52:43 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2019-05-09 20:52:47 +0200 |
commit | 15faa626f7df7a3024dda5d11001347ed4573568 (patch) | |
tree | aad5c44d8906caef72e76f767b6895c0a4682a46 /plugingui/eventhandler.cc | |
parent | 751f01eea8c40f70d412e691e6677d3daae54c7a (diff) |
Add tooltip buttons to frames.
Diffstat (limited to 'plugingui/eventhandler.cc')
-rw-r--r-- | plugingui/eventhandler.cc | 23 |
1 files changed, 22 insertions, 1 deletions
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<MouseEnterEvent*>(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(); } |