diff mde/gui/widget/Ifaces.d @ 103:42e241e7be3e

ContentList content type; getting content items/lists from Options generically via content.Items, and a new addContent widget function. Several improvements to generic handling of content. New button-with-text widget. Some tidy-up. Some name changes, to increase uniformity. Bug-fix: floating widgets of fixed size could previously be made larger than intended from config dimdata.
author Diggory Hardy <diggory.hardy@gmail.com>
date Tue, 25 Nov 2008 18:01:44 +0000
parents 5de5810e3516
children 08651e8a8c51
line wrap: on
line diff
--- a/mde/gui/widget/Ifaces.d	Sat Nov 22 20:59:36 2008 +0000
+++ b/mde/gui/widget/Ifaces.d	Tue Nov 25 18:01:44 2008 +0000
@@ -54,14 +54,18 @@
      *
      * Params:
      *  id      = Identifier, within data files, of the data for the widget.
+     *  data    = Pass this data to the widget, not data looked up via id.
      *  content = An IContent may be passed to some widgets on creation.
      *
      * Creates a widget, using the widget data with index id. Widget data is loaded from files,
      * and per design (multiple gui layouts, called designs, may exist; data is per design).
-     */
+     * 
+     * The function taking a WidgetData is intended for modifier functions and only exists to
+     * avoid circular dependencies between the modifier function's module and createWidget. */
     IChildWidget makeWidget (widgetID id, IContent content = null);
+    IChildWidget makeWidget (widgetID id, WidgetData data, IContent content = null);
     
-    /// Get dimensional data.
+    /** Get dimension data for a widget. */
     wdims dimData (widgetID id);
     
     /** Record some changes, for saving. Should only be called from IWidget.saveChanges() to avoid