aboutsummaryrefslogtreecommitdiff
path: root/dw/types.hh
diff options
context:
space:
mode:
Diffstat (limited to 'dw/types.hh')
-rw-r--r--dw/types.hh31
1 files changed, 31 insertions, 0 deletions
diff --git a/dw/types.hh b/dw/types.hh
index 87f688aa..0b2d7a0e 100644
--- a/dw/types.hh
+++ b/dw/types.hh
@@ -237,6 +237,37 @@ struct Content
static void printMask (Type mask);
};
+class DrawingContext
+{
+private:
+ Rectangle toplevelArea;
+ lout::container::typed::HashSet<lout::object::TypedPointer<Widget> >
+ *widgetsDrawnAsInterruption;
+
+public:
+ inline DrawingContext (Rectangle *toplevelArea) {
+ this->toplevelArea = *toplevelArea;
+ widgetsDrawnAsInterruption =
+ new lout::container::typed::HashSet<lout::object::
+ TypedPointer<Widget> > (true);
+ }
+
+ inline ~DrawingContext () { delete widgetsDrawnAsInterruption; }
+
+ inline Rectangle *getToplevelArea () { return &toplevelArea; }
+
+ inline bool hasWidgetBeenDrawnAsInterruption (Widget *widget) {
+ lout::object::TypedPointer<Widget> key (widget);
+ return widgetsDrawnAsInterruption->contains (&key);
+ }
+
+ inline void addWidgetDrawnAsInterruption (Widget *widget) {
+ lout::object::TypedPointer<Widget> *key =
+ new lout::object::TypedPointer<Widget> (widget);
+ return widgetsDrawnAsInterruption->put (key);
+ }
+};
+
} // namespace core
} // namespace dw