3 <!-- ***** BEGIN LICENSE BLOCK *****
4 - Version: MPL 1.1/GPL 2.0/LGPL 2.1
6 - The contents of this file are subject to the Mozilla Public License Version
7 - 1.1 (the "License"); you may not use this file except in compliance with
8 - the License. You may obtain a copy of the License at
9 - http://www.mozilla.org/MPL/
11 - Software distributed under the License is distributed on an "AS IS" basis,
12 - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13 - for the specific language governing rights and limitations under the
16 - The Original Code is KaiRo.at Mandelbrot, XULRunner version.
18 - The Initial Developer of the Original Code is
19 - Robert Kaiser <kairo@kairo.at>.
20 - Portions created by the Initial Developer are Copyright (C) 2008-2011
21 - the Initial Developer. All Rights Reserved.
24 - Robert Kaiser <kairo@kairo.at>
26 - Alternatively, the contents of this file may be used under the terms of
27 - either the GNU General Public License Version 2 or later (the "GPL"), or
28 - the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
29 - in which case the provisions of the GPL or the LGPL are applicable instead
30 - of those above. If you wish to allow use of your version of this file only
31 - under the terms of either the GPL or the LGPL, and not to allow others to
32 - use your version of this file under the terms of the MPL, indicate your
33 - decision by deleting the provisions above and replace them with the notice
34 - and other provisions required by the LGPL or the GPL. If you do not delete
35 - the provisions above, a recipient may use your version of this file under
36 - the terms of any one of the MPL, the GPL or the LGPL.
38 - ***** END LICENSE BLOCK ***** -->
40 <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
41 <?xml-stylesheet href="chrome://mandelbrot/skin/" type="text/css"?>
44 <!ENTITY % mandelOverlayDTD SYSTEM "chrome://mandelbrot/locale/mandelbrot-overlay.dtd">
46 <!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
48 <!ENTITY % mandelbrotDTD SYSTEM "chrome://mandelbrot/locale/mandelbrot.dtd">
50 <!ENTITY % imgSettingsDTD SYSTEM "chrome://mandelbrot/locale/image-settings.dtd">
54 <page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
55 xmlns:html="http://www.w3.org/1999/xhtml"
56 id="mandelbrotWindow" title="&windowTitle;"
57 disablefastfind="true"
60 <html:link rel="shortcut icon"
61 href="chrome://mandelbrot/skin/mandelbrotIcon16.png"/>
63 <script type="application/x-javascript"
64 src="chrome://mandelbrot/content/mandelbrot.js"/>
66 <stringbundleset id="stringbundleset">
67 <stringbundle id="mbrotBundle" src="chrome://mandelbrot/locale/mandelbrot.properties"/>
70 <commandset id="mainCommands">
74 <toolbar class="chromeclass-toolbar"
75 id="mandelbrotToolbar"
77 <toolbarbutton id="fileMenu"
80 label="&fileMenu.label;">
81 <menupopup id="menu_filePopup">
82 <menuitem id="fileDraw" label="&fileDraw.label;" oncommand="drawImage();"/>
83 <menuitem id="fileSave" label="&fileSave.label;" oncommand="saveImage();"/>
86 <toolbarbutton id="bookmarkMenu"
89 label="&bookmarkMenu.label;">
90 <menupopup id="menu_bookmarkPopup"
91 onpopupshowing="updateBookmarkMenu(event.target);"
92 oncommand="callBookmark(event.target);">
93 <menuitem id="bookmarkOverview" label="&bookmarkOverview.label;"/>
94 <menuitem id="bookmarkSave" label="&bookmarkSave.label;" oncommand="saveBookmark();"/>
95 <menuseparator id="bookmarkSeparator"/>
98 <toolbarbutton id="prefMenu"
101 label="&prefMenu.label;">
102 <menupopup id="menu_prefPopup">
103 <menu id="iterMenu" label="&iterMenu.label;">
104 <menupopup id="menu_iterPopup" onpopupshowing="updateIterMenu();" oncommand="setIter(event.target.value);">
105 <menuitem type="radio" name="iter" value="50" label="&iter50.label;"/>
106 <menuitem type="radio" name="iter" value="100" label="&iter100.label;"/>
107 <menuitem type="radio" name="iter" value="500" label="&iter500.label;"/>
108 <menuitem type="radio" name="iter" value="1000" label="&iter1000.label;"/>
111 <menu id="colorMenu" label="&colorMenu.label;">
112 <menupopup id="menu_palettePopup" onpopupshowing="updatePaletteMenu();" oncommand="setPalette(event.target.value);">
113 <menuitem type="radio" name="palette" value="bw" label="&colorBW.label;"/>
114 <menuitem type="radio" name="palette" value="kairo" label="&colorKairo.label;"/>
115 <menuitem type="radio" name="palette" value="rainbow-linear1" label="&colorRBLin1.label;"/>
116 <menuitem type="radio" name="palette" value="rainbow-squared1" label="&colorRBSq1.label;"/>
117 <menuitem type="radio" name="palette" value="rainbow-linear2" label="&colorRBLin2.label;"/>
118 <menuitem type="radio" name="palette" value="rainbow-squared2" label="&colorRBSq2.label;"/>
121 <menuitem id="imgSettings" label="&imgSettings.label;" oncommand="imgSettings();"/>
124 <toolbarbutton id="debugMenu"
127 label="&debugMenu.label;">
128 <menupopup id="menu_debugPopup" onpopupshowing="updateDebugMenu();">
129 <menuitem type="checkbox" id="tracejitEnabled" label="&tracejitEnabled.label;" oncommand="toggleJITState(event.target, 'trace');"/>
130 <menuitem type="checkbox" id="methodjitEnabled" label="&methodjitEnabled.label;" oncommand="toggleJITState(event.target, 'method');"/>
131 <menu id="algoMenu" label="&algoMenu.label;">
132 <menupopup id="menu_algoPopup" onpopupshowing="updateAlgoMenu();" oncommand="setAlgorithm(event.target.value);">
133 <menuitem type="radio" name="algorithm" value="numeric" label="&algoNumeric.label;"/>
134 <menuitem type="radio" name="algorithm" value="oo" label="&algoOO.label;"/>
141 <panel id="imgSettingsPanel"
146 onpopupshowing="initImgSettings();"
147 onpopuphiding="saveImgSettings();"
148 label="&imageSettings.title;">
149 <titlebar><label value="&imageSettings.title;"/></titlebar>
151 <caption label="&coord.title;"/>
152 <description value="&coord.real.label;" class="coord-caption"/>
153 <hbox align="center">
154 <label value="&coord.min.label;" control="is_Cr_min"/>
155 <textbox id="is_Cr_min" size="10"
156 onchange="checkISValue(this, 'coord'); recalcCoord('Cr', 'scale');"/>
157 <label value="&coord.max.label;" control="is_Cr_max"/>
158 <textbox id="is_Cr_max" size="10"
159 onchange="checkISValue(this, 'coord'); recalcCoord('Cr', 'scale');"/>
160 <label value="&coord.scale.label;" control="is_Cr_scale"/>
161 <textbox id="is_Cr_scale" size="10"
162 onchange="checkISValue(this, 'coord'); recalcCoord('Cr', 'max');"/>
164 <separator class="thin"/>
165 <description value="&coord.imag.label;" class="coord-caption"/>
166 <hbox align="center">
167 <label value="&coord.min.label;" control="is_Ci_min"/>
168 <textbox id="is_Ci_min" size="10"
169 onchange="checkISValue(this, 'coord'); recalcCoord('Ci', 'scale');"/>
170 <label value="&coord.max.label;" control="is_Ci_max"/>
171 <textbox id="is_Ci_max" size="10"
172 onchange="checkISValue(this, 'coord'); recalcCoord('Ci', 'scale');"/>
173 <label value="&coord.scale.label;" control="is_Ci_scale"/>
174 <textbox id="is_Ci_scale" size="10"
175 onchange="checkISValue(this, 'coord'); recalcCoord('Ci', 'max');"/>
181 <caption label="&img.size.title;"/>
182 <hbox align="center">
183 <label value="&img.width.label;" control="is_img_width"/>
184 <textbox id="is_img_width" size="4"
185 onchange="checkISValue(this, 'dim'); recalcCoord('Ci', 'scale');"/>
187 <hbox align="center">
188 <label value="&img.height.label;" control="is_img_height"/>
189 <textbox id="is_img_height" size="4"
190 onchange="checkISValue(this, 'dim'); recalcCoord('Cr', 'scale');"/>
195 <caption label="&preview.title;"/>
196 <hbox flex="1" pack="center" align="center">
197 <html:canvas id="is_mbrotPreview" width="50" height="50"></html:canvas>
199 <button id="is_previewButton" label="&previewDraw.label;" oncommand="drawPreview();"/>
203 <caption label="&options.title;"/>
204 <hbox align="center">
205 <checkbox id="is_syncProp"
206 onclick="checkProportions();"/>
207 <label value="&syncProp.label;" control="is_syncProp"/>
212 <button id="is_closeButton" label="&closeSettings.label;" oncommand="closeImgSettings();"/>
214 <button id="is_drawButton" label="&DrawImageButton.label;" oncommand="closeImgSettings(); drawImage();"/>
217 <hbox flex="1" pack="center" align="center">
219 <html:canvas id="mbrotImage" width="300" height="300"
220 onmousedown="mouseevent('down', event);"
221 onmouseup="mouseevent('up', event);"
222 onmousemove="mouseevent('move', event);">
224 <button id="drawButton" label="&fileDraw.label;" oncommand="drawImage();"/>
227 <hbox pack="end" align="end">
228 <description id="statusLabel"/>