diff mde/gui/WidgetManager.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 dbf332403c6e
line wrap: on
line diff
--- a/mde/gui/WidgetManager.d	Tue Oct 21 09:57:19 2008 +0100
+++ b/mde/gui/WidgetManager.d	Tue Oct 21 11:35:15 2008 +0100
@@ -333,7 +333,7 @@
         scope(exit) mutex.unlock;
         
         // Make all widgets save any changed data; return if no changes:
-        if (!child.saveChanges ("root"))
+        if (!child.saveChanges)
             return;
         
         if (loadUserFile) { // merge entries from user file into current changes
@@ -425,11 +425,21 @@
         }
     }
     
-    /** For making changes. */
+    /** Get dimension data for a widget. */
+    wdims dimData (widgetID id) {
+        return curData.dims (id);
+    }
+    
+    /** For making changes to widget structure. */
     void setData (widgetID id, WidgetData d) {
         changes[id] = d;        // also updates WidgetDataSet in data.
     }
     
+    /** For making changes to widget dimensions. */
+    void setDimData (widgetID id, wdims d) {
+        changes.setDims(id, d);    // also updates WidgetDataSet in data.
+    }
+    
     /** Second stage of loading the widgets.
     * 
     * loadDesign handles the data; this method needs to: