@@ -95,29 +95,29 @@ void TopLevelWidget::setGeometryConstraints(const uint minimumWidth, | |||
// -------------------------------------------------------------------------------------------------------------------- | |||
bool TopLevelWidget::onKeyboard(const KeyboardEvent&) | |||
bool TopLevelWidget::onKeyboard(const KeyboardEvent& ev) | |||
{ | |||
return false; | |||
return pData->keyboardEvent(ev); | |||
} | |||
bool TopLevelWidget::onCharacterInput(const CharacterInputEvent&) | |||
bool TopLevelWidget::onCharacterInput(const CharacterInputEvent& ev) | |||
{ | |||
return false; | |||
return pData->characterInputEvent(ev); | |||
} | |||
bool TopLevelWidget::onMouse(const MouseEvent&) | |||
bool TopLevelWidget::onMouse(const MouseEvent& ev) | |||
{ | |||
return false; | |||
return pData->mouseEvent(ev); | |||
} | |||
bool TopLevelWidget::onMotion(const MotionEvent&) | |||
bool TopLevelWidget::onMotion(const MotionEvent& ev) | |||
{ | |||
return false; | |||
return pData->motionEvent(ev); | |||
} | |||
bool TopLevelWidget::onScroll(const ScrollEvent&) | |||
bool TopLevelWidget::onScroll(const ScrollEvent& ev) | |||
{ | |||
return false; | |||
return pData->scrollEvent(ev); | |||
} | |||
// -------------------------------------------------------------------------------------------------------------------- | |||
@@ -42,10 +42,6 @@ bool TopLevelWidget::PrivateData::keyboardEvent(const KeyboardEvent& ev) | |||
if (! selfw->pData->visible) | |||
return false; | |||
// give top-level widget chance to catch this event first | |||
if (self->onKeyboard(ev)) | |||
return true; | |||
// propagate event to all subwidgets recursively | |||
return selfw->pData->giveKeyboardEventForSubWidgets(ev); | |||
} | |||
@@ -56,10 +52,6 @@ bool TopLevelWidget::PrivateData::characterInputEvent(const CharacterInputEvent& | |||
if (! selfw->pData->visible) | |||
return false; | |||
// give top-level widget chance to catch this event first | |||
if (self->onCharacterInput(ev)) | |||
return true; | |||
// propagate event to all subwidgets recursively | |||
return selfw->pData->giveCharacterInputEventForSubWidgets(ev); | |||
} | |||
@@ -82,10 +74,6 @@ bool TopLevelWidget::PrivateData::mouseEvent(const MouseEvent& ev) | |||
rev.absolutePos.setY(ev.absolutePos.getY() / autoScaleFactor); | |||
} | |||
// give top-level widget chance to catch this event first | |||
if (self->onMouse(ev)) | |||
return true; | |||
// propagate event to all subwidgets recursively | |||
return selfw->pData->giveMouseEventForSubWidgets(rev); | |||
} | |||
@@ -108,10 +96,6 @@ bool TopLevelWidget::PrivateData::motionEvent(const MotionEvent& ev) | |||
rev.absolutePos.setY(ev.absolutePos.getY() / autoScaleFactor); | |||
} | |||
// give top-level widget chance to catch this event first | |||
if (self->onMotion(ev)) | |||
return true; | |||
// propagate event to all subwidgets recursively | |||
return selfw->pData->giveMotionEventForSubWidgets(rev); | |||
} | |||
@@ -136,10 +120,6 @@ bool TopLevelWidget::PrivateData::scrollEvent(const ScrollEvent& ev) | |||
rev.delta.setY(ev.delta.getY() / autoScaleFactor); | |||
} | |||
// give top-level widget chance to catch this event first | |||
if (self->onScroll(ev)) | |||
return true; | |||
// propagate event to all subwidgets recursively | |||
return selfw->pData->giveScrollEventForSubWidgets(rev); | |||
} | |||
@@ -822,7 +822,7 @@ void Window::PrivateData::onPuglKey(const Widget::KeyboardEvent& ev) | |||
{ | |||
TopLevelWidget* const widget(*rit); | |||
if (widget->isVisible() && widget->pData->keyboardEvent(ev)) | |||
if (widget->isVisible() && widget->onKeyboard(ev)) | |||
break; | |||
} | |||
#endif | |||
@@ -840,7 +840,7 @@ void Window::PrivateData::onPuglText(const Widget::CharacterInputEvent& ev) | |||
{ | |||
TopLevelWidget* const widget(*rit); | |||
if (widget->isVisible() && widget->pData->characterInputEvent(ev)) | |||
if (widget->isVisible() && widget->onCharacterInput(ev)) | |||
break; | |||
} | |||
#endif | |||
@@ -858,7 +858,7 @@ void Window::PrivateData::onPuglMouse(const Widget::MouseEvent& ev) | |||
{ | |||
TopLevelWidget* const widget(*rit); | |||
if (widget->isVisible() && widget->pData->mouseEvent(ev)) | |||
if (widget->isVisible() && widget->onMouse(ev)) | |||
break; | |||
} | |||
#endif | |||
@@ -876,7 +876,7 @@ void Window::PrivateData::onPuglMotion(const Widget::MotionEvent& ev) | |||
{ | |||
TopLevelWidget* const widget(*rit); | |||
if (widget->isVisible() && widget->pData->motionEvent(ev)) | |||
if (widget->isVisible() && widget->onMotion(ev)) | |||
break; | |||
} | |||
#endif | |||
@@ -894,7 +894,7 @@ void Window::PrivateData::onPuglScroll(const Widget::ScrollEvent& ev) | |||
{ | |||
TopLevelWidget* const widget(*rit); | |||
if (widget->isVisible() && widget->pData->scrollEvent(ev)) | |||
if (widget->isVisible() && widget->onScroll(ev)) | |||
break; | |||
} | |||
#endif | |||