diff options
author | Sebastian Geerken <devnull@localhost> | 2015-01-23 23:20:59 +0100 |
---|---|---|
committer | Sebastian Geerken <devnull@localhost> | 2015-01-23 23:20:59 +0100 |
commit | cf581248257b88e98fa4315525a0ee531b4cb9c8 (patch) | |
tree | 73ecec5922d6ae58de09fb32ad4636cd6dedab17 /dw/stackingcontextmgr.hh | |
parent | e497d315b87a42184dce3f9b90e495b3a3806b14 (diff) |
Same simplifications for Widget::getWidgetAtPoint as for Widget::draw before.
Diffstat (limited to 'dw/stackingcontextmgr.hh')
-rw-r--r-- | dw/stackingcontextmgr.hh | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/dw/stackingcontextmgr.hh b/dw/stackingcontextmgr.hh index 3836d98d..3a877031 100644 --- a/dw/stackingcontextmgr.hh +++ b/dw/stackingcontextmgr.hh @@ -26,9 +26,9 @@ private: int findZIndex (int zIndex, bool mustExist); void draw (View *view, Rectangle *area, int startZIndex, int endZIndex, DrawingContext *context); - Widget *getWidgetAtPoint (int x, int y, StackingIteratorStack *iteratorStack, - Widget **interruptedWidget, int *zIndexIndex, - int startZIndex, int endZIndex, int *index); + Widget *getWidgetAtPoint (int x, int y, + core::GettingWidgetAtPointContext *context, + int startZIndex, int endZIndex); public: StackingContextMgr (Widget *widget); @@ -57,14 +57,15 @@ public: void drawTop (View *view, Rectangle *area, DrawingContext *context) { draw (view, area, 0, INT_MAX, context); } - Widget *getTopWidgetAtPoint (int x, int y, - core::StackingIteratorStack *iteratorStack, - Widget **interruptedWidget, - int *zIndexIndex, int *index); - Widget *getBottomWidgetAtPoint (int x, int y, - core::StackingIteratorStack *iteratorStack, - Widget **interruptedWidget, - int *zIndexIndex, int *index); + inline Widget *getTopWidgetAtPoint (int x, int y, + core::GettingWidgetAtPointContext + *context) + { return getWidgetAtPoint (x, y, context, 0, INT_MAX); } + + inline Widget *getBottomWidgetAtPoint (int x, int y, + core::GettingWidgetAtPointContext + *context) + { return getWidgetAtPoint (x, y, context, INT_MIN, -1); } }; } // namespace core |