diff mde/gui/widget/Ifaces.d @ 93:08a4ae11454b

Widgets now save dimensions without preventing structural changes in the base config file from applying. Widget dimensional data separated from other data in files, hence above change. Moved TextAdapter from TextWidget to IRenderer.
author Diggory Hardy <diggory.hardy@gmail.com>
date Tue, 21 Oct 2008 11:35:15 +0100
parents 085f2ca31914
children 2a364c7d82c9
line wrap: on
line diff
--- a/mde/gui/widget/Ifaces.d	Tue Oct 21 09:57:19 2008 +0100
+++ b/mde/gui/widget/Ifaces.d	Tue Oct 21 11:35:15 2008 +0100
@@ -61,9 +61,15 @@
      */
     IChildWidget makeWidget (widgetID id, IContent content = null);
     
+    /// Get dimensional data.
+    wdims dimData (widgetID id);
+    
     /** Record some changes, for saving. Should only be called from IWidget.saveChanges() to avoid
-     * multiple calls for instanced widgets of same id. */
+     * multiple calls for instanced widgets of same id.
+     * 
+     * WidgetData is for most data, dimensional data (wdims) is for dimensions. */
     void setData (widgetID id, WidgetData);
+    void setDimData (widgetID id, wdims d);     /// ditto
     
     // Rendering:
     /** For when a widget needs redrawing.
@@ -159,8 +165,7 @@
      * 
      * If the widget has subwidgets, it should also be recursively called on these (passing their 
      * ids). */
-    // FIXME - no longer necessary to pass id!
-    bool saveChanges (widgetID id);
+    bool saveChanges ();
     
     /** Called when the renderer is changed (at least when the changes affect dimensions).
      * Also called after widget creation, before any other methods are called.