From ee6aebafa72303dc01c91a5ca069fbe7188b1a14 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 26 Nov 2020 09:35:23 +0100 Subject: Remove stub event handlers from pugl::View This was a bit weird since event dispatching can be handled by some other object. Just remove them, and have clients use a catch-all template to handle events that are not handled specially. --- examples/pugl_cxx_demo.cpp | 6 +++++- examples/pugl_vulkan_cxx_demo.cpp | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'examples') diff --git a/examples/pugl_cxx_demo.cpp b/examples/pugl_cxx_demo.cpp index 482f67f..0aa66ad 100644 --- a/examples/pugl_cxx_demo.cpp +++ b/examples/pugl_cxx_demo.cpp @@ -38,7 +38,11 @@ public: setEventHandler(*this); } - using pugl::View::onEvent; + template + pugl::Status onEvent(const pugl::Event&) noexcept + { + return pugl::Status::success; + } static pugl::Status onEvent(const pugl::ConfigureEvent& event) noexcept; pugl::Status onEvent(const pugl::UpdateEvent& event) noexcept; diff --git a/examples/pugl_vulkan_cxx_demo.cpp b/examples/pugl_vulkan_cxx_demo.cpp index b4e04ef..154bbaf 100644 --- a/examples/pugl_vulkan_cxx_demo.cpp +++ b/examples/pugl_vulkan_cxx_demo.cpp @@ -1385,7 +1385,11 @@ public: setEventHandler(*this); } - using pugl::View::onEvent; + template + pugl::Status onEvent(const pugl::Event&) noexcept + { + return pugl::Status::success; + } pugl::Status onEvent(const pugl::ConfigureEvent& event); pugl::Status onEvent(const pugl::UpdateEvent& event); -- cgit v1.2.1