Dillo v3.1.1-98-g318d1f14
Loading...
Searching...
No Matches
stackingcontextmgr.hh
Go to the documentation of this file.
1#ifndef __DW_STACKINGCONTEXTMGR_HH__
2#define __DW_STACKINGCONTEXTMGR_HH__
3
4#ifndef __INCLUDED_FROM_DW_CORE_HH__
5# error Do not include this file directly, use "core.hh" instead.
6#endif
7
8#include "../lout/container.hh"
9
10#include <limits.h>
11
12namespace dw {
13
14namespace core {
15
20{
21private:
25
26 int findZIndex (int zIndex, bool mustExist);
27 void draw (View *view, Rectangle *area, int startZIndex, int endZIndex,
28 DrawingContext *context);
29 Widget *getWidgetAtPoint (int x, int y,
31 int startZIndex, int endZIndex);
32
33public:
36
42
44 // Each widget establishing a stacking context is child of another
45 // stacking context, so drawn by StackingContextMgr::drawTop or
46 // StackingContextMgr::drawBottom etc.
47 return widget->getParent () != NULL
49 }
50
52
53 inline int getNumZIndices () { return numZIndices; }
54 inline int getNumChildSCWidgets () { return childSCWidgets->size (); }
55
56 inline void drawBottom (View *view, Rectangle *area, DrawingContext *context)
57 { draw (view, area, INT_MIN, -1, context); }
58 void drawTop (View *view, Rectangle *area, DrawingContext *context)
59 { draw (view, area, 0, INT_MAX, context); }
60
61 inline Widget *getTopWidgetAtPoint (int x, int y,
63 *context)
64 { return getWidgetAtPoint (x, y, context, 0, INT_MAX); }
65
66 inline Widget *getBottomWidgetAtPoint (int x, int y,
68 *context)
69 { return getWidgetAtPoint (x, y, context, INT_MIN, -1); }
70};
71
72} // namespace core
73
74} // namespace dw
75
76#endif // __DW_STACKINGCONTEXTMGR_HH__
Set at the top when drawing.
Definition types.hh:295
Set at the top when getting the widget at the point.
Definition types.hh:313
dw::core::Shape implemtation for simple rectangles.
Definition types.hh:70
See Handling stacking contexts.
int findZIndex(int zIndex, bool mustExist)
Widget * getTopWidgetAtPoint(int x, int y, core::GettingWidgetAtPointContext *context)
void draw(View *view, Rectangle *area, int startZIndex, int endZIndex, DrawingContext *context)
void drawTop(View *view, Rectangle *area, DrawingContext *context)
Widget * getWidgetAtPoint(int x, int y, core::GettingWidgetAtPointContext *context, int startZIndex, int endZIndex)
static bool handledByStackingContextMgr(Widget *widget)
void drawBottom(View *view, Rectangle *area, DrawingContext *context)
static bool isEstablishingStackingContext(Widget *widget)
void addChildSCWidget(Widget *widget)
lout::container::typed::Vector< Widget > * childSCWidgets
Widget * getBottomWidgetAtPoint(int x, int y, core::GettingWidgetAtPointContext *context)
An interface to encapsulate platform dependent drawing.
Definition view.hh:17
The base class of all dillo widgets.
Definition widget.hh:44
Widget * getParent()
Definition widget.hh:587
style::Style * getStyle()
Definition widget.hh:482
Typed version of container::untyped::Vector.
Definition container.hh:447
@ Z_INDEX_AUTO
'z-index' is stored as int; use this for the value 'auto'.
Definition style.hh:388
Dw is in this namespace, or sub namespaces of this one.
@ IMPL_POS
Definition core.hh:16