aboutsummaryrefslogtreecommitdiff
path: root/include/cru/ui/window.hpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2019-04-04 17:52:15 +0800
committercrupest <crupest@outlook.com>2019-04-04 17:52:15 +0800
commit4d650160a388b0192e04c454ba1a3de21b0d4cc3 (patch)
treef9c416767e039eeb7c5a37f93b70443f37c49f1d /include/cru/ui/window.hpp
parenta410e2048db6f5ef6fb50e401a59b4b98b979050 (diff)
downloadcru-4d650160a388b0192e04c454ba1a3de21b0d4cc3.tar.gz
cru-4d650160a388b0192e04c454ba1a3de21b0d4cc3.tar.bz2
cru-4d650160a388b0192e04c454ba1a3de21b0d4cc3.zip
...
Diffstat (limited to 'include/cru/ui/window.hpp')
-rw-r--r--include/cru/ui/window.hpp23
1 files changed, 9 insertions, 14 deletions
diff --git a/include/cru/ui/window.hpp b/include/cru/ui/window.hpp
index 043aae35..f0c790be 100644
--- a/include/cru/ui/window.hpp
+++ b/include/cru/ui/window.hpp
@@ -60,23 +60,18 @@ class Window final : public ContentControl {
void OnNativeDestroy();
void OnNativePaint();
- void OnNativeResize(float new_width, float new_height);
+ void OnNativeResize(const Size& size);
- void OnSetFocusInternal();
- void OnKillFocusInternal();
+ void OnNativeFocus(bool focus);
- void OnMouseMoveInternal(POINT point);
- void OnMouseLeaveInternal();
- void OnMouseDownInternal(MouseButton button, POINT point);
- void OnMouseUpInternal(MouseButton button, POINT point);
+ void OnNativeMouseMove(const Point& point);
+ void OnNativeMouseLeave();
+ void OnNativeMouseDown(platform::MouseButton button, const Point& point);
+ void OnNativeMouseUp(platform::MouseButton button, const Point& point);
- void OnMouseWheelInternal(short delta, POINT point);
- void OnKeyDownInternal(int virtual_code);
- void OnKeyUpInternal(int virtual_code);
- void OnCharInternal(wchar_t c);
+ void OnNativeKeyDown(int virtual_code);
+ void OnNativeKeyUp(int virtual_code);
- void OnActivatedInternal();
- void OnDeactivatedInternal();
//*************** region: event dispatcher helper ***************
@@ -86,7 +81,7 @@ class Window final : public ContentControl {
private:
platform::NativeWindow* native_window_;
- std::vector<EventHandlerToken> revoke_tokens_;
+ std::vector<EventHandlerRevoker> event_revokers_;
std::shared_ptr<render::WindowRenderObject> render_object_;