comparison mde/gui/widget/Ifaces.d @ 116:5ee69b3ed9c9

Partial implementation of infinite widget recursion protection; some cleanup. Implemented recursion protection which only allowed unsafe widgets to be instantiated once; realised this was far too restrictive (multiple sibling instances are needed) and a check against parent widgets would be needed. Could be implemented by passing widgets a reference to parents. Removed ButtonWidget aka First interactible widget.
author Diggory Hardy <diggory.hardy@gmail.com>
date Sun, 21 Dec 2008 12:03:50 +0000
parents 1b1e2297e2fc
children aba2dd815a1f
comparison
equal deleted inserted replaced
115:1b1e2297e2fc 116:5ee69b3ed9c9
56 * id = Identifier, within data files, of the data for the widget. 56 * id = Identifier, within data files, of the data for the widget.
57 * data = Pass this data to the widget, not data looked up via id. 57 * data = Pass this data to the widget, not data looked up via id.
58 * content = An IContent may be passed to some widgets on creation. 58 * content = An IContent may be passed to some widgets on creation.
59 * 59 *
60 * Creates a widget, using the widget data with index id. Widget data is loaded from files, 60 * Creates a widget, using the widget data with index id. Widget data is loaded from files,
61 * and per design (multiple gui layouts, called designs, may exist; data is per design). 61 * and per design (multiple gui layouts, called designs, may exist; data is per design). */
62 *
63 * The function taking a WidgetData is intended for modifier functions and only exists to
64 * avoid circular dependencies between the modifier function's module and createWidget. */
65 IChildWidget makeWidget (widgetID id, IContent content = null); 62 IChildWidget makeWidget (widgetID id, IContent content = null);
66 IChildWidget makeWidget (widgetID id, WidgetData data, IContent content = null);
67 63
68 /** Get dimension data for a widget. */ 64 /** Get dimension data for a widget. */
69 wdims dimData (widgetID id); 65 wdims dimData (widgetID id);
70 66
71 /** Record some changes, for saving. Should only be called from IWidget.saveChanges() to avoid 67 /** Record some changes, for saving. Should only be called from IWidget.saveChanges() to avoid