aboutsummaryrefslogtreecommitdiff
path: root/CruUI/ui/window.h
diff options
context:
space:
mode:
Diffstat (limited to 'CruUI/ui/window.h')
-rw-r--r--CruUI/ui/window.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/CruUI/ui/window.h b/CruUI/ui/window.h
index 9ffa4dc6..551e2048 100644
--- a/CruUI/ui/window.h
+++ b/CruUI/ui/window.h
@@ -172,6 +172,7 @@ namespace cru {
//Return false if the message is not handled.
bool HandleWindowMessage(HWND hwnd, int msg, WPARAM w_param, LPARAM l_param, LRESULT& result);
+ Point GetMousePosition();
//*************** region: position and size ***************
@@ -207,6 +208,11 @@ namespace cru {
Control* GetFocusControl();
+ //*************** region: mouse capture ***************
+
+ Control* CaptureMouseFor(Control* control);
+ Control* ReleaseCurrentMouseCapture();
+
private:
//*************** region: native operations ***************
@@ -230,8 +236,6 @@ namespace cru {
void OnMouseDownInternal(MouseButton button, POINT point);
void OnMouseUpInternal(MouseButton button, POINT point);
-
-
//*************** region: event dispatcher helper ***************
template<typename EventArgs>
@@ -258,6 +262,8 @@ namespace cru {
}
}
+ void DispatchMouseHoverControlChangeEvent(Control* old_control, Control * new_control, const Point& point);
+
private:
std::unique_ptr<WindowLayoutManager> layout_manager_;
@@ -270,6 +276,8 @@ namespace cru {
bool window_focus_ = false;
Control* focus_control_ = this; // "focus_control_" can't be nullptr
+
+ Control* mouse_capture_control_ = nullptr;
};
}
}