comparison 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
comparison
equal deleted inserted replaced
122:f96e8d18c00a 123:d3b2cefd46c9
28 import mde.content.Content; 28 import mde.content.Content;
29 29
30 30
31 /************************************************************************************************* 31 /*************************************************************************************************
32 * Interface for parent widgets, including IWidgetManager. 32 * Interface for parent widgets, including IWidgetManager.
33 *
34 * All widgets implement this via AWidget to make things simpler (code sharing).
33 * 35 *
34 * Notation: 36 * Notation:
35 * Positive/negative direction: along the x/y axis in this direction. 37 * Positive/negative direction: along the x/y axis in this direction.
36 * Layout widget: a widget containing multiple sub-widges (which hence controls how they are 38 * Layout widget: a widget containing multiple sub-widges (which hence controls how they are
37 * laid out). 39 * laid out).
38 *************************************************************************************************/ 40 *************************************************************************************************/
39 interface IParentWidget 41 interface IParentWidget
40 { 42 {
41 /** Checks for recursion of unsafe widgets to prevent infinite recursion. */ 43 /** Checks for recursion of unsafe widgets to prevent infinite recursion. */
42 void recursionCheck (widgetID); 44 void recursionCheck (widgetID);
45
46 /** Child widgets should call this on their parent if their minimal size changes, since they
47 * cannot resize themselves.
48 *
49 * Parents should resize children calling this when the size is increased, and possibly when
50 * decreased and the widget is not resizable (but should not do so when it is).
51 *
52 * Params:
53 * widget = The child widget calling the function
54 * mw = New minimal width
55 * mh = New minimal height */
56 void minSizeChange (IChildWidget widget, wdim mw, wdim mh);
43 } 57 }
44 58
45 59
46 /************************************************************************************************* 60 /*************************************************************************************************
47 * Interface for the widget manager. 61 * Interface for the widget manager.