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();"> | |
5e12f409 | 112 | <menuitem type="checkbox" id="jitEnabled" label="&tracejitEnabled.label;" oncommand="toggleJITState(event.target, '');" hidden="true"/> |
84e4253d RK |
113 | <menuitem type="checkbox" id="tracejitEnabled" label="&tracejitEnabled.label;" oncommand="toggleJITState(event.target, 'trace');"/> |
114 | <menuitem type="checkbox" id="methodjitEnabled" label="&methodjitEnabled.label;" oncommand="toggleJITState(event.target, 'method');"/> | |
6e98af87 RK |
115 | <menu id="algoMenu" label="&algoMenu.label;"> |
116 | <menupopup id="menu_algoPopup" onpopupshowing="updateAlgoMenu();" oncommand="setAlgorithm(event.target.value);"> | |
117 | <menuitem type="radio" name="algorithm" value="numeric" label="&algoNumeric.label;"/> | |
118 | <menuitem type="radio" name="algorithm" value="oo" label="&algoOO.label;"/> | |
25de2bfe RK |
119 | </menupopup> |
120 | </menu> | |
af3c147c RK |
121 | <menuitem id="errorConsole" label="&errorConsole.label;" |
122 | oncommand="errorConsole();"/> | |
123 | <menuitem id="addonsMgr" label="&addonsManager.label;" | |
124 | oncommand="addonsManager();"/> | |
25de2bfe RK |
125 | </menupopup> |
126 | </menu> | |
37b05b56 RK |
127 | </menubar> |
128 | </toolbox> | |
60e048b2 RK |
129 | <panel id="imgSettingsPanel" |
130 | onpopupshowing="initImgSettings();" | |
131 | onpopuphiding="saveImgSettings();"> | |
132 | <!-- |titlebar="normal" noautohide="true" close="true" label="&imageSettings.title;"| | |
133 | doesn't seem to work on the panel, so work around with a <titlebar> instead --> | |
134 | <titlebar><label value="&imageSettings.title;"/></titlebar> | |
135 | <groupbox> | |
136 | <caption label="&coord.title;"/> | |
137 | <description value="&coord.real.label;" class="coord-caption"/> | |
138 | <hbox align="center"> | |
139 | <label value="&coord.min.label;" control="is_Cr_min"/> | |
140 | <textbox id="is_Cr_min" size="10" | |
141 | onchange="checkISValue(this, 'coord'); recalcCoord('Cr', 'scale');"/> | |
142 | <label value="&coord.max.label;" control="is_Cr_max"/> | |
143 | <textbox id="is_Cr_max" size="10" | |
144 | onchange="checkISValue(this, 'coord'); recalcCoord('Cr', 'scale');"/> | |
145 | <label value="&coord.scale.label;" control="is_Cr_scale"/> | |
146 | <textbox id="is_Cr_scale" size="10" | |
147 | onchange="checkISValue(this, 'coord'); recalcCoord('Cr', 'max');"/> | |
148 | </hbox> | |
149 | <separator class="thin"/> | |
150 | <description value="&coord.imag.label;" class="coord-caption"/> | |
151 | <hbox align="center"> | |
152 | <label value="&coord.min.label;" control="is_Ci_min"/> | |
153 | <textbox id="is_Ci_min" size="10" | |
154 | onchange="checkISValue(this, 'coord'); recalcCoord('Ci', 'scale');"/> | |
155 | <label value="&coord.max.label;" control="is_Ci_max"/> | |
156 | <textbox id="is_Ci_max" size="10" | |
157 | onchange="checkISValue(this, 'coord'); recalcCoord('Ci', 'scale');"/> | |
158 | <label value="&coord.scale.label;" control="is_Ci_scale"/> | |
159 | <textbox id="is_Ci_scale" size="10" | |
160 | onchange="checkISValue(this, 'coord'); recalcCoord('Ci', 'max');"/> | |
161 | </hbox> | |
162 | </groupbox> | |
163 | ||
164 | <hbox flex="1"> | |
165 | <groupbox> | |
166 | <caption label="&img.size.title;"/> | |
167 | <hbox align="center"> | |
168 | <label value="&img.width.label;" control="is_img_width"/> | |
169 | <textbox id="is_img_width" size="4" | |
170 | onchange="checkISValue(this, 'dim'); recalcCoord('Ci', 'scale');"/> | |
171 | </hbox> | |
172 | <hbox align="center"> | |
173 | <label value="&img.height.label;" control="is_img_height"/> | |
174 | <textbox id="is_img_height" size="4" | |
175 | onchange="checkISValue(this, 'dim'); recalcCoord('Cr', 'scale');"/> | |
176 | </hbox> | |
177 | </groupbox> | |
178 | ||
179 | <groupbox> | |
180 | <caption label="&preview.title;"/> | |
181 | <hbox flex="1" pack="center" align="center"> | |
182 | <html:canvas id="is_mbrotPreview" width="50" height="50"></html:canvas> | |
183 | </hbox> | |
184 | <button id="is_previewButton" label="&previewDraw.label;" oncommand="drawPreview();"/> | |
185 | </groupbox> | |
186 | ||
187 | <groupbox> | |
188 | <caption label="&options.title;"/> | |
189 | <hbox align="center"> | |
190 | <checkbox id="is_syncProp" | |
a79ddf52 | 191 | label="&syncProp.label;" |
60e048b2 | 192 | onclick="checkProportions();"/> |
60e048b2 RK |
193 | </hbox> |
194 | </groupbox> | |
195 | </hbox> | |
196 | <hbox> | |
197 | <button id="is_closeButton" label="&closeSettings.label;" oncommand="closeImgSettings();"/> | |
198 | <spacer flex="1"/> | |
199 | <button id="is_drawButton" label="&drawImageButton.label;" oncommand="closeImgSettings(); drawImage();"/> | |
200 | </hbox> | |
201 | </panel> | |
37b05b56 | 202 | <hbox flex="1" pack="center" align="center"> |
5366c7d6 | 203 | <stack> |
4d8e7dcb RK |
204 | <html:canvas id="mbrotImage" width="300" height="300" |
205 | onmousedown="mouseevent('down', event);" | |
7e4a9776 RK |
206 | onmouseup="mouseevent('up',event);" |
207 | onmousemove="mouseevent('move',event);"> | |
4d8e7dcb | 208 | </html:canvas> |
5366c7d6 RK |
209 | <button id="drawButton" label="&fileDraw.label;" oncommand="drawImage();"/> |
210 | </stack> | |
37b05b56 | 211 | </hbox> |
6e98af87 RK |
212 | <hbox pack="end" align="end"> |
213 | <description id="statusLabel"/> | |
214 | </hbox> | |
37b05b56 | 215 | </window> |