aboutsummaryrefslogtreecommitdiff
path: root/dw/widget.hh
diff options
context:
space:
mode:
Diffstat (limited to 'dw/widget.hh')
-rw-r--r--dw/widget.hh30
1 files changed, 23 insertions, 7 deletions
diff --git a/dw/widget.hh b/dw/widget.hh
index 58306c92..a99e12ab 100644
--- a/dw/widget.hh
+++ b/dw/widget.hh
@@ -27,23 +27,37 @@ class Widget: public lout::identity::IdentifiableObject
protected:
enum Flags {
/**
+ * \todo Comment this.
+ */
+ RESIZE_QUEUED = 1 << 0,
+
+ /**
+ * \todo Comment this.
+ */
+ EXTREMES_QUEUED = 1 << 1,
+
+ /**
* \brief Set, when dw::core::Widget::requisition is not up to date
* anymore.
+ *
+ * \todo Update, see RESIZE_QUEUED.
*/
- NEEDS_RESIZE = 1 << 0,
+ NEEDS_RESIZE = 1 << 2,
/**
* \brief Only used internally, set to enforce size allocation.
*
* (I've forgotten the case, for which this is necessary.)
*/
- NEEDS_ALLOCATE = 1 << 1,
+ NEEDS_ALLOCATE = 1 << 3,
/**
* \brief Set, when dw::core::Widget::extremes is not up to date
* anymore.
+ *
+ * \todo Update, see RESIZE_QUEUED.
*/
- EXTREMES_CHANGED = 1 << 2,
+ EXTREMES_CHANGED = 1 << 4,
/**
* \brief Set by the widget itself (in the constructor), when set...
@@ -51,7 +65,7 @@ protected:
*
* Will hopefully be removed, after redesigning the size model.
*/
- USES_HINTS = 1 << 3,
+ USES_HINTS = 1 << 5,
/**
* \brief Set by the widget itself (in the constructor), when it contains
@@ -59,19 +73,19 @@ protected:
*
* Will hopefully be removed, after redesigning the size model.
*/
- HAS_CONTENTS = 1 << 4,
+ HAS_CONTENTS = 1 << 6,
/**
* \brief Set, when a widget was already once allocated,
*
* The dw::Image widget uses this flag, see dw::Image::setBuffer.
*/
- WAS_ALLOCATED = 1 << 5,
+ WAS_ALLOCATED = 1 << 7,
/**
* \brief Set for block-level widgets (as opposed to inline widgets)
*/
- BLOCK_LEVEL = 1 << 6,
+ BLOCK_LEVEL = 1 << 8,
};
private:
@@ -244,6 +258,8 @@ public:
Widget ();
~Widget ();
+ inline bool resizeQueued () { return flags & RESIZE_QUEUED; }
+ inline bool extremesQueued () { return flags & EXTREMES_QUEUED; }
inline bool needsResize () { return flags & NEEDS_RESIZE; }
inline bool needsAllocate () { return flags & NEEDS_ALLOCATE; }
inline bool extremesChanged () { return flags & EXTREMES_CHANGED; }