extend image settings with coordinates and preview
[mandelbrot.git] / xulapp / chrome / mandelbrot / content / image-settings.xul
index efe8288096daeb7358b338deb752abd2439318ef..04da6562b5a34335cbfe03aa27214bebda5440af 100644 (file)
@@ -44,6 +44,7 @@
 
 <prefwindow id="imgSettingsDlg"
             xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+            xmlns:html="http://www.w3.org/1999/xhtml"
             title="&imageSettings.title;"
             dlgbuttons="accept,cancel"
             ondialogaccept="callDrawImage();"
                   type="int"/>
       <preference id="mandelbrot.image.height" name="mandelbrot.image.height"
                   type="int"/>
+      <preference id="mandelbrot.last_image.Cr_min" name="mandelbrot.last_image.Cr_min"
+                  type="string"/>
+      <preference id="mandelbrot.last_image.Cr_max" name="mandelbrot.last_image.Cr_max"
+                  type="string"/>
+      <preference id="mandelbrot.last_image.Ci_min" name="mandelbrot.last_image.Ci_min"
+                  type="string"/>
+      <preference id="mandelbrot.last_image.Ci_max" name="mandelbrot.last_image.Ci_max"
+                  type="string"/>
     </preferences>
 
-    <groupbox label="&img.size.title;">
+    <groupbox>
+      <caption label="&coord.title;"/>
+      <description value="&coord.real.label;"/>
       <hbox flex="1">
-        <label value="&img.width.label;" control="imgWidth"/>
-        <textbox id="imgWidth" size="4" preference="mandelbrot.image.width"/>
+        <label value="&coord.min.label;" control="Cr_min"/>
+        <textbox id="Cr_min" size="10"
+                 preference="mandelbrot.last_image.Cr_min"/>
+        <label value="&coord.max.label;" control="Cr_max"/>
+        <textbox id="Cr_max" size="10"
+                 preference="mandelbrot.last_image.Cr_max"/>
       </hbox>
+      <description value="&coord.imag.label;"/>
       <hbox flex="1">
-        <label value="&img.height.label;" control="imgHeight"/>
-        <textbox id="imgHeight" size="4" preference="mandelbrot.image.heigth"/>
+        <label value="&coord.min.label;" control="Ci_min"/>
+        <textbox id="Ci_min" size="10"
+                 preference="mandelbrot.last_image.Ci_min"/>
+        <label value="&coord.max.label;" control="Ci_max"/>
+        <textbox id="Ci_max" size="10"
+                 preference="mandelbrot.last_image.Ci_max"/>
       </hbox>
     </groupbox>
+
+    <hbox flex="1">
+      <groupbox>
+        <caption label="&img.size.title;"/>
+        <hbox flex="1">
+          <label value="&img.width.label;" control="imgWidth"/>
+          <textbox id="imgWidth" size="4"
+                   preference="mandelbrot.image.width"/>
+        </hbox>
+        <hbox flex="1">
+          <label value="&img.height.label;" control="imgHeight"/>
+          <textbox id="imgHeight" size="4"
+                   preference="mandelbrot.image.height"/>
+        </hbox>
+      </groupbox>
+    
+      <groupbox>
+        <caption label="&preview.title;"/>
+        <hbox flex="1" pack="center" align="center">
+          <html:canvas id="mbrotPreview" width="50" height="50"></html:canvas>
+        </hbox>
+        <button id="previewButton" label="&previewDraw.label;" oncommand="drawPreview();"/>
+      </groupbox>
+    </hbox>
   </prefpane>
 </prefwindow>