Mercurial > projects > mde
diff mde/gui/widget/Ifaces.d @ 92:085f2ca31914
Shared alignments supported in more complex cases.
author | Diggory Hardy <diggory.hardy@gmail.com> |
---|---|
date | Tue, 21 Oct 2008 09:57:19 +0100 |
parents | 4d5d53e4f881 |
children | 08a4ae11454b |
line wrap: on
line diff
--- a/mde/gui/widget/Ifaces.d Thu Oct 16 17:43:48 2008 +0100 +++ b/mde/gui/widget/Ifaces.d Tue Oct 21 09:57:19 2008 +0100 @@ -135,11 +135,24 @@ * A parent widget is responsible for setting the size of its children widgets, however it must * satisfy their minimal sizes as available from minWidth() and minHeight(). setWidth() and * setHeight() are called on all widgets after creation. + * + * Also see finalize(). *************************************************************************************************/ //NOTE: add another this() without the data for default initialization, for the GUI editor? interface IChildWidget : IWidget { //BEGIN Load and save + // NOTE - change? + /** Called on all widgets after all widgets have been created in a deepest first order. + * + * Must be called before any other methods on the widget, which means this cannot call sub- + * widgets' methods, but finalize can. */ + void prefinalize (); + void finalize (); /// ditto + + /** Widget should return a list of all its children. */ + IChildWidget[] children (); + /** When this is called, if the widget has any changed data to save it should call * IWidgetManager.setData (id, data) to set it and return true. Otherwise it should return * false. @@ -177,10 +190,7 @@ /** The minimal size the widget could be shrunk to (or its fixed size). * - * Takes into account child-widgets and any other contents. - * - * Note: layout uses these calls to initialize it's alignment device. So, after creating a - * (layout) widget, minWidth should be the first function called on it! */ + * Takes into account child-widgets and any other contents. */ wdim minWidth (); wdim minHeight (); /// ditto