Commit | Line | Data |
---|---|---|
84e4253d RK |
1 | <?xml version="1.0"?> |
2 | ||
3 | <!-- ***** BEGIN LICENSE BLOCK ***** | |
4 | - Version: MPL 1.1/GPL 2.0/LGPL 2.1 | |
5 | - | |
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/ | |
10 | - | |
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 | |
14 | - License. | |
15 | - | |
16 | - The Original Code is KaiRo.at Mandelbrot, XULRunner version. | |
17 | - | |
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. | |
22 | - | |
23 | - Contributor(s): | |
24 | - Robert Kaiser <kairo@kairo.at> | |
25 | - | |
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. | |
37 | - | |
38 | - ***** END LICENSE BLOCK ***** --> | |
39 | ||
40 | <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> | |
41 | <?xml-stylesheet href="chrome://mandelbrot/skin/" type="text/css"?> | |
42 | ||
43 | <!DOCTYPE page [ | |
44 | <!ENTITY % mandelOverlayDTD SYSTEM "chrome://mandelbrot/locale/mandelbrot-overlay.dtd"> | |
45 | %mandelOverlayDTD; | |
46 | <!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd"> | |
47 | %brandDTD; | |
48 | <!ENTITY % mandelbrotDTD SYSTEM "chrome://mandelbrot/locale/mandelbrot.dtd"> | |
49 | %mandelbrotDTD; | |
50 | ]> | |
51 | ||
52 | <page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" | |
53 | xmlns:html="http://www.w3.org/1999/xhtml" | |
54 | id="mandelbrotWindow" title="&windowTitle;" | |
55 | disablefastfind="true" | |
56 | onload="Startup();"> | |
57 | ||
58 | <html:link rel="shortcut icon" | |
59 | href="chrome://mandelbrot/skin/mandelbrotIcon16.png"/> | |
60 | ||
61 | <script type="application/x-javascript" | |
62 | src="chrome://mandelbrot/content/mandelbrot.js"/> | |
63 | ||
64 | <stringbundleset id="stringbundleset"> | |
65 | <stringbundle id="mbrotBundle" src="chrome://mandelbrot/locale/mandelbrot.properties"/> | |
66 | </stringbundleset> | |
67 | ||
68 | <commandset id="mainCommands"> | |
69 | </commandset> | |
70 | ||
71 | <toolbox> | |
72 | <toolbar class="chromeclass-toolbar" | |
73 | id="mandelbrotToolbar" | |
74 | align="center"> | |
75 | <toolbarbutton id="fileMenu" | |
76 | type="menu" | |
77 | class="tabbable" | |
78 | label="&fileMenu.label;"> | |
79 | <menupopup id="menu_filePopup"> | |
80 | <menuitem id="fileDraw" label="&fileDraw.label;" oncommand="drawImage();"/> | |
81 | <menuitem id="fileSave" label="&fileSave.label;" oncommand="saveImage();"/> | |
82 | </menupopup> | |
83 | </toolbarbutton> | |
84 | <toolbarbutton id="bookmarkMenu" | |
85 | type="menu" | |
86 | class="tabbable" | |
87 | label="&bookmarkMenu.label;"> | |
88 | <menupopup id="menu_bookmarkPopup" | |
89 | onpopupshowing="updateBookmarkMenu(event.target);" | |
90 | oncommand="callBookmark(event.target);"> | |
91 | <menuitem id="bookmarkOverview" label="&bookmarkOverview.label;"/> | |
92 | <menuitem id="bookmarkSave" label="&bookmarkSave.label;" oncommand="saveBookmark();"/> | |
93 | <menuseparator id="bookmarkSeparator"/> | |
94 | </menupopup> | |
95 | </toolbarbutton> | |
96 | <toolbarbutton id="prefMenu" | |
97 | type="menu" | |
98 | class="tabbable" | |
99 | label="&prefMenu.label;"> | |
100 | <menupopup id="menu_prefPopup"> | |
101 | <menu id="iterMenu" label="&iterMenu.label;"> | |
102 | <menupopup id="menu_iterPopup" onpopupshowing="updateIterMenu();" oncommand="setIter(event.target.value);"> | |
103 | <menuitem type="radio" name="iter" value="50" label="&iter50.label;"/> | |
104 | <menuitem type="radio" name="iter" value="100" label="&iter100.label;"/> | |
105 | <menuitem type="radio" name="iter" value="500" label="&iter500.label;"/> | |
106 | <menuitem type="radio" name="iter" value="1000" label="&iter1000.label;"/> | |
107 | </menupopup> | |
108 | </menu> | |
109 | <menu id="colorMenu" label="&colorMenu.label;"> | |
110 | <menupopup id="menu_palettePopup" onpopupshowing="updatePaletteMenu();" oncommand="setPalette(event.target.value);"> | |
111 | <menuitem type="radio" name="palette" value="bw" label="&colorBW.label;"/> | |
112 | <menuitem type="radio" name="palette" value="kairo" label="&colorKairo.label;"/> | |
113 | <menuitem type="radio" name="palette" value="rainbow-linear1" label="&colorRBLin1.label;"/> | |
114 | <menuitem type="radio" name="palette" value="rainbow-squared1" label="&colorRBSq1.label;"/> | |
115 | <menuitem type="radio" name="palette" value="rainbow-linear2" label="&colorRBLin2.label;"/> | |
116 | <menuitem type="radio" name="palette" value="rainbow-squared2" label="&colorRBSq2.label;"/> | |
117 | </menupopup> | |
118 | </menu> | |
119 | <menuitem id="imgSettings" label="&imgSettings.label;" oncommand="imgSettings();"/> | |
120 | </menupopup> | |
121 | </toolbarbutton> | |
122 | <toolbarbutton id="debugMenu" | |
123 | type="menu" | |
124 | class="tabbable" | |
125 | label="&debugMenu.label;"> | |
126 | <menupopup id="menu_debugPopup" onpopupshowing="updateDebugMenu();"> | |
5e12f409 | 127 | <menuitem type="checkbox" id="jitEnabled" label="&tracejitEnabled.label;" oncommand="toggleJITState(event.target, '');" hidden="true"/> |
84e4253d RK |
128 | <menuitem type="checkbox" id="tracejitEnabled" label="&tracejitEnabled.label;" oncommand="toggleJITState(event.target, 'trace');"/> |
129 | <menuitem type="checkbox" id="methodjitEnabled" label="&methodjitEnabled.label;" oncommand="toggleJITState(event.target, 'method');"/> | |
130 | <menu id="algoMenu" label="&algoMenu.label;"> | |
131 | <menupopup id="menu_algoPopup" onpopupshowing="updateAlgoMenu();" oncommand="setAlgorithm(event.target.value);"> | |
132 | <menuitem type="radio" name="algorithm" value="numeric" label="&algoNumeric.label;"/> | |
133 | <menuitem type="radio" name="algorithm" value="oo" label="&algoOO.label;"/> | |
134 | </menupopup> | |
135 | </menu> | |
84e4253d RK |
136 | </menupopup> |
137 | </toolbarbutton> | |
138 | </toolbar> | |
139 | </toolbox> | |
8a2b6e17 | 140 | <panel id="imgSettingsPanel" |
8a2b6e17 | 141 | onpopupshowing="initImgSettings();" |
60e048b2 RK |
142 | onpopuphiding="saveImgSettings();"> |
143 | <!-- |titlebar="normal" noautohide="true" close="true" label="&imageSettings.title;"| | |
144 | doesn't seem to work on the panel, so work around with a <titlebar> instead --> | |
8a2b6e17 RK |
145 | <titlebar><label value="&imageSettings.title;"/></titlebar> |
146 | <groupbox> | |
147 | <caption label="&coord.title;"/> | |
148 | <description value="&coord.real.label;" class="coord-caption"/> | |
149 | <hbox align="center"> | |
150 | <label value="&coord.min.label;" control="is_Cr_min"/> | |
151 | <textbox id="is_Cr_min" size="10" | |
152 | onchange="checkISValue(this, 'coord'); recalcCoord('Cr', 'scale');"/> | |
153 | <label value="&coord.max.label;" control="is_Cr_max"/> | |
154 | <textbox id="is_Cr_max" size="10" | |
155 | onchange="checkISValue(this, 'coord'); recalcCoord('Cr', 'scale');"/> | |
156 | <label value="&coord.scale.label;" control="is_Cr_scale"/> | |
157 | <textbox id="is_Cr_scale" size="10" | |
158 | onchange="checkISValue(this, 'coord'); recalcCoord('Cr', 'max');"/> | |
159 | </hbox> | |
160 | <separator class="thin"/> | |
161 | <description value="&coord.imag.label;" class="coord-caption"/> | |
162 | <hbox align="center"> | |
163 | <label value="&coord.min.label;" control="is_Ci_min"/> | |
164 | <textbox id="is_Ci_min" size="10" | |
165 | onchange="checkISValue(this, 'coord'); recalcCoord('Ci', 'scale');"/> | |
166 | <label value="&coord.max.label;" control="is_Ci_max"/> | |
167 | <textbox id="is_Ci_max" size="10" | |
168 | onchange="checkISValue(this, 'coord'); recalcCoord('Ci', 'scale');"/> | |
169 | <label value="&coord.scale.label;" control="is_Ci_scale"/> | |
170 | <textbox id="is_Ci_scale" size="10" | |
171 | onchange="checkISValue(this, 'coord'); recalcCoord('Ci', 'max');"/> | |
172 | </hbox> | |
173 | </groupbox> | |
174 | ||
175 | <hbox flex="1"> | |
176 | <groupbox> | |
177 | <caption label="&img.size.title;"/> | |
178 | <hbox align="center"> | |
179 | <label value="&img.width.label;" control="is_img_width"/> | |
180 | <textbox id="is_img_width" size="4" | |
181 | onchange="checkISValue(this, 'dim'); recalcCoord('Ci', 'scale');"/> | |
182 | </hbox> | |
183 | <hbox align="center"> | |
184 | <label value="&img.height.label;" control="is_img_height"/> | |
185 | <textbox id="is_img_height" size="4" | |
186 | onchange="checkISValue(this, 'dim'); recalcCoord('Cr', 'scale');"/> | |
187 | </hbox> | |
188 | </groupbox> | |
189 | ||
190 | <groupbox> | |
191 | <caption label="&preview.title;"/> | |
192 | <hbox flex="1" pack="center" align="center"> | |
193 | <html:canvas id="is_mbrotPreview" width="50" height="50"></html:canvas> | |
194 | </hbox> | |
195 | <button id="is_previewButton" label="&previewDraw.label;" oncommand="drawPreview();"/> | |
196 | </groupbox> | |
197 | ||
198 | <groupbox> | |
199 | <caption label="&options.title;"/> | |
200 | <hbox align="center"> | |
201 | <checkbox id="is_syncProp" | |
a79ddf52 | 202 | label="&syncProp.label;" |
8a2b6e17 | 203 | onclick="checkProportions();"/> |
8a2b6e17 RK |
204 | </hbox> |
205 | </groupbox> | |
206 | </hbox> | |
207 | <hbox> | |
208 | <button id="is_closeButton" label="&closeSettings.label;" oncommand="closeImgSettings();"/> | |
209 | <spacer flex="1"/> | |
60e048b2 | 210 | <button id="is_drawButton" label="&drawImageButton.label;" oncommand="closeImgSettings(); drawImage();"/> |
8a2b6e17 RK |
211 | </hbox> |
212 | </panel> | |
84e4253d RK |
213 | <hbox flex="1" pack="center" align="center"> |
214 | <stack> | |
215 | <html:canvas id="mbrotImage" width="300" height="300" | |
216 | onmousedown="mouseevent('down', event);" | |
217 | onmouseup="mouseevent('up', event);" | |
218 | onmousemove="mouseevent('move', event);"> | |
219 | </html:canvas> | |
220 | <button id="drawButton" label="&fileDraw.label;" oncommand="drawImage();"/> | |
221 | </stack> | |
222 | </hbox> | |
223 | <hbox pack="end" align="end"> | |
224 | <description id="statusLabel"/> | |
225 | </hbox> | |
226 | </page> |