Commit | Line | Data |
---|---|---|
37b05b56 | 1 | <?xml version="1.0"?> |
5b823560 RK |
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 | |
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 | ||
37b05b56 RK |
40 | <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> |
41 | <?xml-stylesheet href="chrome://mandelbrot/skin/" type="text/css"?> | |
42 | ||
43 | <!DOCTYPE window [ | |
920e1fea RK |
44 | <!ENTITY % mandelOverlayDTD SYSTEM "chrome://mandelbrot/locale/mandelbrot-overlay.dtd"> |
45 | %mandelOverlayDTD; | |
37b05b56 RK |
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 | <window id="mandelbrotWindow" title="&windowTitle;" | |
60e048b2 | 53 | width="650" height="750" |
6e98af87 | 54 | onload="Startup()" |
37b05b56 RK |
55 | xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" |
56 | xmlns:html="http://www.w3.org/1999/xhtml"> | |
6e98af87 | 57 | |
37b05b56 RK |
58 | <script type="application/x-javascript" |
59 | src="chrome://mandelbrot/content/mandelbrot.js"/> | |
6e98af87 RK |
60 | |
61 | <stringbundleset id="stringbundleset"> | |
62 | <stringbundle id="mbrotBundle" src="chrome://mandelbrot/locale/mandelbrot.properties"/> | |
63 | </stringbundleset> | |
64 | ||
4846aa2e RK |
65 | <commandset id="mainCommands"> |
66 | </commandset> | |
67 | ||
37b05b56 | 68 | <toolbox> |
60e048b2 | 69 | <menubar id="mandelbrotMenubar"> |
6e98af87 RK |
70 | <menu id="fileMenu" label="&fileMenu.label;"> |
71 | <menupopup id="menu_filePopup"> | |
72 | <menuitem id="fileDraw" label="&fileDraw.label;" oncommand="drawImage();"/> | |
73 | <menuitem id="fileSave" label="&fileSave.label;" oncommand="saveImage();"/> | |
37b05b56 | 74 | <menuseparator/> |
474b436c | 75 | <menuitem id="fileQuit" label="&fileQuit.label;" oncommand="exitMandelbrot();"/> |
37b05b56 RK |
76 | </menupopup> |
77 | </menu> | |
287a980b RK |
78 | <menu id="bookmarkMenu" label="&bookmarkMenu.label;"> |
79 | <menupopup id="menu_bookmarkPopup" | |
80 | onpopupshowing="updateBookmarkMenu(event.target);" | |
2eed6617 | 81 | oncommand="callBookmark(event.target);"> |
fa4ecb24 | 82 | <menuitem id="bookmarkOverview" label="&bookmarkOverview.label;"/> |
287a980b RK |
83 | <menuitem id="bookmarkSave" label="&bookmarkSave.label;" oncommand="saveBookmark();"/> |
84 | <menuseparator id="bookmarkSeparator"/> | |
2eed6617 RK |
85 | </menupopup> |
86 | </menu> | |
6e98af87 RK |
87 | <menu id="prefMenu" label="&prefMenu.label;"> |
88 | <menupopup id="menu_prefPopup"> | |
89 | <menu id="iterMenu" label="&iterMenu.label;"> | |
90 | <menupopup id="menu_iterPopup" onpopupshowing="updateIterMenu();" oncommand="setIter(event.target.value);"> | |
91 | <menuitem type="radio" name="iter" value="50" label="&iter50.label;"/> | |
92 | <menuitem type="radio" name="iter" value="100" label="&iter100.label;"/> | |
93 | <menuitem type="radio" name="iter" value="500" label="&iter500.label;"/> | |
94 | <menuitem type="radio" name="iter" value="1000" label="&iter1000.label;"/> | |
25de2bfe RK |
95 | </menupopup> |
96 | </menu> | |
6e98af87 RK |
97 | <menu id="colorMenu" label="&colorMenu.label;"> |
98 | <menupopup id="menu_palettePopup" onpopupshowing="updatePaletteMenu();" oncommand="setPalette(event.target.value);"> | |
99 | <menuitem type="radio" name="palette" value="bw" label="&colorBW.label;"/> | |
100 | <menuitem type="radio" name="palette" value="kairo" label="&colorKairo.label;"/> | |
72eff464 RK |
101 | <menuitem type="radio" name="palette" value="rainbow-linear1" label="&colorRBLin1.label;"/> |
102 | <menuitem type="radio" name="palette" value="rainbow-squared1" label="&colorRBSq1.label;"/> | |
103 | <menuitem type="radio" name="palette" value="rainbow-linear2" label="&colorRBLin2.label;"/> | |
104 | <menuitem type="radio" name="palette" value="rainbow-squared2" label="&colorRBSq2.label;"/> | |
6e98af87 RK |
105 | </menupopup> |
106 | </menu> | |
6403d662 | 107 | <menuitem id="imgSettings" label="&imgSettings.label;" oncommand="imgSettings();"/> |
6e98af87 RK |
108 | </menupopup> |
109 | </menu> | |
110 | <menu id="debugMenu" label="&debugMenu.label;"> | |
111 | <menupopup id="menu_debugPopup" onpopupshowing="updateDebugMenu();"> | |
84e4253d RK |
112 | <menuitem type="checkbox" id="tracejitEnabled" label="&tracejitEnabled.label;" oncommand="toggleJITState(event.target, 'trace');"/> |
113 | <menuitem type="checkbox" id="methodjitEnabled" label="&methodjitEnabled.label;" oncommand="toggleJITState(event.target, 'method');"/> | |
6e98af87 RK |
114 | <menu id="algoMenu" label="&algoMenu.label;"> |
115 | <menupopup id="menu_algoPopup" onpopupshowing="updateAlgoMenu();" oncommand="setAlgorithm(event.target.value);"> | |
116 | <menuitem type="radio" name="algorithm" value="numeric" label="&algoNumeric.label;"/> | |
117 | <menuitem type="radio" name="algorithm" value="oo" label="&algoOO.label;"/> | |
25de2bfe RK |
118 | </menupopup> |
119 | </menu> | |
af3c147c RK |
120 | <menuitem id="errorConsole" label="&errorConsole.label;" |
121 | oncommand="errorConsole();"/> | |
122 | <menuitem id="addonsMgr" label="&addonsManager.label;" | |
123 | oncommand="addonsManager();"/> | |
25de2bfe RK |
124 | </menupopup> |
125 | </menu> | |
37b05b56 RK |
126 | </menubar> |
127 | </toolbox> | |
60e048b2 RK |
128 | <panel id="imgSettingsPanel" |
129 | onpopupshowing="initImgSettings();" | |
130 | onpopuphiding="saveImgSettings();"> | |
131 | <!-- |titlebar="normal" noautohide="true" close="true" label="&imageSettings.title;"| | |
132 | doesn't seem to work on the panel, so work around with a <titlebar> instead --> | |
133 | <titlebar><label value="&imageSettings.title;"/></titlebar> | |
134 | <groupbox> | |
135 | <caption label="&coord.title;"/> | |
136 | <description value="&coord.real.label;" class="coord-caption"/> | |
137 | <hbox align="center"> | |
138 | <label value="&coord.min.label;" control="is_Cr_min"/> | |
139 | <textbox id="is_Cr_min" size="10" | |
140 | onchange="checkISValue(this, 'coord'); recalcCoord('Cr', 'scale');"/> | |
141 | <label value="&coord.max.label;" control="is_Cr_max"/> | |
142 | <textbox id="is_Cr_max" size="10" | |
143 | onchange="checkISValue(this, 'coord'); recalcCoord('Cr', 'scale');"/> | |
144 | <label value="&coord.scale.label;" control="is_Cr_scale"/> | |
145 | <textbox id="is_Cr_scale" size="10" | |
146 | onchange="checkISValue(this, 'coord'); recalcCoord('Cr', 'max');"/> | |
147 | </hbox> | |
148 | <separator class="thin"/> | |
149 | <description value="&coord.imag.label;" class="coord-caption"/> | |
150 | <hbox align="center"> | |
151 | <label value="&coord.min.label;" control="is_Ci_min"/> | |
152 | <textbox id="is_Ci_min" size="10" | |
153 | onchange="checkISValue(this, 'coord'); recalcCoord('Ci', 'scale');"/> | |
154 | <label value="&coord.max.label;" control="is_Ci_max"/> | |
155 | <textbox id="is_Ci_max" size="10" | |
156 | onchange="checkISValue(this, 'coord'); recalcCoord('Ci', 'scale');"/> | |
157 | <label value="&coord.scale.label;" control="is_Ci_scale"/> | |
158 | <textbox id="is_Ci_scale" size="10" | |
159 | onchange="checkISValue(this, 'coord'); recalcCoord('Ci', 'max');"/> | |
160 | </hbox> | |
161 | </groupbox> | |
162 | ||
163 | <hbox flex="1"> | |
164 | <groupbox> | |
165 | <caption label="&img.size.title;"/> | |
166 | <hbox align="center"> | |
167 | <label value="&img.width.label;" control="is_img_width"/> | |
168 | <textbox id="is_img_width" size="4" | |
169 | onchange="checkISValue(this, 'dim'); recalcCoord('Ci', 'scale');"/> | |
170 | </hbox> | |
171 | <hbox align="center"> | |
172 | <label value="&img.height.label;" control="is_img_height"/> | |
173 | <textbox id="is_img_height" size="4" | |
174 | onchange="checkISValue(this, 'dim'); recalcCoord('Cr', 'scale');"/> | |
175 | </hbox> | |
176 | </groupbox> | |
177 | ||
178 | <groupbox> | |
179 | <caption label="&preview.title;"/> | |
180 | <hbox flex="1" pack="center" align="center"> | |
181 | <html:canvas id="is_mbrotPreview" width="50" height="50"></html:canvas> | |
182 | </hbox> | |
183 | <button id="is_previewButton" label="&previewDraw.label;" oncommand="drawPreview();"/> | |
184 | </groupbox> | |
185 | ||
186 | <groupbox> | |
187 | <caption label="&options.title;"/> | |
188 | <hbox align="center"> | |
189 | <checkbox id="is_syncProp" | |
190 | onclick="checkProportions();"/> | |
191 | <label value="&syncProp.label;" control="is_syncProp"/> | |
192 | </hbox> | |
193 | </groupbox> | |
194 | </hbox> | |
195 | <hbox> | |
196 | <button id="is_closeButton" label="&closeSettings.label;" oncommand="closeImgSettings();"/> | |
197 | <spacer flex="1"/> | |
198 | <button id="is_drawButton" label="&drawImageButton.label;" oncommand="closeImgSettings(); drawImage();"/> | |
199 | </hbox> | |
200 | </panel> | |
37b05b56 | 201 | <hbox flex="1" pack="center" align="center"> |
5366c7d6 | 202 | <stack> |
4d8e7dcb RK |
203 | <html:canvas id="mbrotImage" width="300" height="300" |
204 | onmousedown="mouseevent('down', event);" | |
7e4a9776 RK |
205 | onmouseup="mouseevent('up',event);" |
206 | onmousemove="mouseevent('move',event);"> | |
4d8e7dcb | 207 | </html:canvas> |
5366c7d6 RK |
208 | <button id="drawButton" label="&fileDraw.label;" oncommand="drawImage();"/> |
209 | </stack> | |
37b05b56 | 210 | </hbox> |
6e98af87 RK |
211 | <hbox pack="end" align="end"> |
212 | <description id="statusLabel"/> | |
213 | </hbox> | |
37b05b56 | 214 | </window> |