summaryrefslogtreecommitdiff
path: root/src/window_gui.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/window_gui.h')
-rw-r--r--src/window_gui.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/window_gui.h b/src/window_gui.h
index 552c0a6e2..e399eb06a 100644
--- a/src/window_gui.h
+++ b/src/window_gui.h
@@ -501,6 +501,20 @@ public:
virtual void DrawWidget(const Rect &r, int widget) const {}
/**
+ * Compute size of the contents of a widget.
+ * If no useful size can be computed, return null-size (both width and height \c 0).
+ * @param widget Number of the widget to get the size of.
+ * @return Size of the contents of the widget.
+ * @note If the contents ever becomes larger than what is returned here, the window should be re-initialized (with #Window::ReInit),
+ * and this function should return a larger size.
+ */
+ virtual Dimension GetWidgetContentSize(int widget)
+ {
+ Dimension d = {0, 0};
+ return d;
+ }
+
+ /**
* Called when window gains focus
*/
virtual void OnFocus() {}