summaryrefslogtreecommitdiff
path: root/src/widget_type.h
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2009-07-15 22:17:08 +0000
committeralberth <alberth@openttd.org>2009-07-15 22:17:08 +0000
commit92206f2d18257feb4e95ecce2e48f447bd240201 (patch)
tree8db565fa08a867000f2853bcd886ea33f3c3e66c /src/widget_type.h
parentf085d7775b12e77b8012ab09ae72b850367a3237 (diff)
downloadopenttd-92206f2d18257feb4e95ecce2e48f447bd240201.tar.xz
(svn r16837) -Codechange: Collect largest used index while constructing nested widget tree.
Diffstat (limited to 'src/widget_type.h')
-rw-r--r--src/widget_type.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/widget_type.h b/src/widget_type.h
index 3106dc8ae..6f2f6ba3d 100644
--- a/src/widget_type.h
+++ b/src/widget_type.h
@@ -561,8 +561,12 @@ struct NWidgetPartPIP {
uint8 pre, inter, post; ///< Amount of space before/between/after child widgets.
};
-/** Pointer to function returning a nested widget. */
-typedef NWidgetBase *NWidgetFunctionType();
+/** Pointer to function returning a nested widget.
+ * @param biggest_index Pointer to storage for collecting the biggest index used in the nested widget.
+ * @return Nested widget (tree).
+ * @postcond \c *biggest_index must contain the value of the biggest index in the returned tree.
+ */
+typedef NWidgetBase *NWidgetFunctionType(int *biggest_index);
/** Partial widget specification to allow NWidgets to be written nested.
* @ingroup NestedWidgetParts */