summaryrefslogtreecommitdiff
path: root/dw
diff options
context:
space:
mode:
Diffstat (limited to 'dw')
-rw-r--r--dw/widget.cc14
-rw-r--r--dw/widget.hh3
2 files changed, 13 insertions, 4 deletions
diff --git a/dw/widget.cc b/dw/widget.cc
index 7d83081a..1099ee77 100644
--- a/dw/widget.cc
+++ b/dw/widget.cc
@@ -528,8 +528,12 @@ bool Widget::usesAvailHeight ()
}
/**
- * \brief This method is a wrapper for Widget::sizeRequestImpl(); it calls
- * the latter only when needed.
+ * \brief This method is a wrapper for Widget::sizeRequestImpl(); it calls
+ * the latter only when needed.
+ *
+ * Computes the size (Requisition) that the current widget wants. The output
+ * \param requisition has the final values which will be used to compute the
+ * widget allocation.
*/
void Widget::sizeRequest (Requisition *requisition, int numPos,
Widget **references, int *x, int *y)
@@ -1143,7 +1147,11 @@ Widget *Widget::getExtremesReference (int index)
/**
* \brief Wrapper for Widget::sizeAllocateImpl, calls the latter only when
- * needed.
+ * needed.
+ *
+ * Sets the allocation of the widget to \param allocation, which is the final
+ * size and position it will have on the canvas. This is usually called after
+ * the requisition size is determined in Widget::sizeRequest().
*/
void Widget::sizeAllocate (Allocation *allocation)
{
diff --git a/dw/widget.hh b/dw/widget.hh
index d1957d4f..1787be1f 100644
--- a/dw/widget.hh
+++ b/dw/widget.hh
@@ -198,7 +198,8 @@ protected:
/**
* \brief The current allocation: size and position, always relative to the
- * canvas.
+ * canvas. The allocation is the outermost box for the widget, as in the CSS
+ * box model. It also includes the extraSpace.
*/
Allocation allocation;