diff mde/gui/widget/Ifaces.d @ 123:d3b2cefd46c9

minSizeChange() allows run-time changes to widgets' minimal size (except for shrinking in a GridLayoutWidget). FloatingAreaWidget: correct resize limiters AStringContent: allows space and ignores modifier keys
author Diggory Hardy <diggory.hardy@gmail.com>
date Sun, 04 Jan 2009 17:35:15 +0000
parents 5b37d0400732
children a2ef6b549101
line wrap: on
line diff
--- a/mde/gui/widget/Ifaces.d	Fri Jan 02 18:10:14 2009 +0000
+++ b/mde/gui/widget/Ifaces.d	Sun Jan 04 17:35:15 2009 +0000
@@ -31,6 +31,8 @@
 /*************************************************************************************************
  * Interface for parent widgets, including IWidgetManager.
  *
+ * All widgets implement this via AWidget to make things simpler (code sharing).
+ *
  * Notation:
  *  Positive/negative direction: along the x/y axis in this direction.
  *  Layout widget: a widget containing multiple sub-widges (which hence controls how they are
@@ -40,6 +42,18 @@
 {
     /** Checks for recursion of unsafe widgets to prevent infinite recursion. */
     void recursionCheck (widgetID);
+    
+    /** Child widgets should call this on their parent if their minimal size changes, since they
+     * cannot resize themselves.
+     * 
+     * Parents should resize children calling this when the size is increased, and possibly when
+     * decreased and the widget is not resizable (but should not do so when it is).
+     * 
+     * Params:
+     *	widget	= The child widget calling the function
+     *	mw	= New minimal width
+     *	mh	= New minimal height */
+    void minSizeChange (IChildWidget widget, wdim mw, wdim mh);
 }