aboutsummaryrefslogtreecommitdiff
path: root/dw/widget.hh
diff options
context:
space:
mode:
authorSebastian Geerken <devnull@localhost>2014-05-30 15:08:16 +0200
committerSebastian Geerken <devnull@localhost>2014-05-30 15:08:16 +0200
commit1a3983870885abaf0cb73cc72e46a43f7f289a10 (patch)
treefb61296259f5e0a8d5e60f7b3c38420b9e57ce49 /dw/widget.hh
parentdbb857df40f41a11a46622c2c561400bd029994c (diff)
Added Widget::extraSpace (not used yet).
Diffstat (limited to 'dw/widget.hh')
-rw-r--r--dw/widget.hh17
1 files changed, 17 insertions, 0 deletions
diff --git a/dw/widget.hh b/dw/widget.hh
index 5abbf89a..3d8cdbd6 100644
--- a/dw/widget.hh
+++ b/dw/widget.hh
@@ -193,6 +193,12 @@ protected:
Layout *layout;
+ /**
+ * \brief Space around the margin box. Allocation is extraSpace +
+ * margin + border + padding + contents;
+ */
+ style::Box extraSpace;
+
/*inline void printFlags () {
DBG_IF_RTFL {
char buf[10 * 3 - 1 + 1];
@@ -404,6 +410,17 @@ public:
/** \todo I do not like this. */
inline Allocation *getAllocation () { return &allocation; }
+ inline int boxOffsetX ()
+ { return extraSpace.left + getStyle()->boxOffsetX (); }
+ inline int boxRestWidth ()
+ { return extraSpace.right + getStyle()->boxRestWidth (); }
+ inline int boxDiffWidth () { return boxOffsetX () + boxRestWidth (); }
+ inline int boxOffsetY ()
+ { return extraSpace.top + getStyle()->boxOffsetY (); }
+ inline int boxRestHeight ()
+ { return extraSpace.bottom + getStyle()->boxRestHeight (); }
+ inline int boxDiffHeight () { return boxOffsetY () + boxRestHeight (); }
+
void sizeRequest (Requisition *requisition);
void getExtremes (Extremes *extremes);
void sizeAllocate (Allocation *allocation);