diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2015-11-18 21:00:48 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2015-11-18 21:00:48 +0100 |
commit | c1973bc4d4ec9d8d18a690359a2d649905e35264 (patch) | |
tree | 045c4d5afc28422319c4e20322fbafe97fefd280 /plugingui/eventhandler.cc | |
parent | f11a61a36fa5e21b0c6c2362af2952a3f87408a0 (diff) |
Refactored Slider. Expanded all event variable names (all was 'e' before). Changed all uievent enums to enum classes.
Diffstat (limited to 'plugingui/eventhandler.cc')
-rw-r--r-- | plugingui/eventhandler.cc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/plugingui/eventhandler.cc b/plugingui/eventhandler.cc index 4b55ce5..ff8fded 100644 --- a/plugingui/eventhandler.cc +++ b/plugingui/eventhandler.cc @@ -62,11 +62,11 @@ void EventHandler::processEvents() } switch(event->type()) { - case Event::Repaint: + case EventType::repaint: window.redraw(); break; - case Event::Resize: + case EventType::resize: { auto resizeEvent = static_cast<ResizeEvent*>(event); if((resizeEvent->width != window.width()) || @@ -77,7 +77,7 @@ void EventHandler::processEvents() } break; - case Event::MouseMove: + case EventType::mouseMove: { auto moveEvent = static_cast<MouseMoveEvent*>(event); @@ -119,7 +119,7 @@ void EventHandler::processEvents() } break; - case Event::Button: + case EventType::button: { if(lastWasDoubleClick) { @@ -129,13 +129,13 @@ void EventHandler::processEvents() auto buttonEvent = static_cast<ButtonEvent*>(event); - lastWasDoubleClick = buttonEvent->doubleclick; + lastWasDoubleClick = buttonEvent->doubleClick; auto widget = window.find(buttonEvent->x, buttonEvent->y); if(window.buttonDownFocus()) { - if(buttonEvent->direction == ButtonEvent::Up) + if(buttonEvent->direction == Direction::up) { auto widget = window.buttonDownFocus(); buttonEvent->x -= widget->windowX(); @@ -157,7 +157,7 @@ void EventHandler::processEvents() widget->buttonEvent(buttonEvent); - if((buttonEvent->direction == ButtonEvent::Down) && + if((buttonEvent->direction == Direction::down) && widget->catchMouse()) { window.setButtonDownFocus(widget); @@ -171,7 +171,7 @@ void EventHandler::processEvents() } break; - case Event::Scroll: + case EventType::scroll: { auto scrollEvent = static_cast<ScrollEvent*>(event); @@ -186,7 +186,7 @@ void EventHandler::processEvents() } break; - case Event::Key: + case EventType::key: { auto keyEvent = static_cast<KeyEvent*>(event); if(window.keyboardFocus()) @@ -196,7 +196,7 @@ void EventHandler::processEvents() } break; - case Event::Close: + case EventType::close: closeNotifier(); break; } |