really make mandelbrot ready for add-on release
[mandelbrot.git] / xulapp / chrome / mandelbrot / content / mandelbrot.xul
CommitLineData
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;"
53 width="350" height="450"
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
RK
68 <toolbox>
69 <menubar>
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();">
112 <menuitem type="checkbox" id="jitEnabled" label="&jitEnabled.label;" oncommand="toggleJITState(event.target);"/>
113 <menu id="algoMenu" label="&algoMenu.label;">
114 <menupopup id="menu_algoPopup" onpopupshowing="updateAlgoMenu();" oncommand="setAlgorithm(event.target.value);">
115 <menuitem type="radio" name="algorithm" value="numeric" label="&algoNumeric.label;"/>
116 <menuitem type="radio" name="algorithm" value="oo" label="&algoOO.label;"/>
25de2bfe
RK
117 </menupopup>
118 </menu>
af3c147c
RK
119 <menuitem id="errorConsole" label="&errorConsole.label;"
120 oncommand="errorConsole();"/>
121 <menuitem id="addonsMgr" label="&addonsManager.label;"
122 oncommand="addonsManager();"/>
25de2bfe
RK
123 </menupopup>
124 </menu>
37b05b56
RK
125 </menubar>
126 </toolbox>
37b05b56 127 <hbox flex="1" pack="center" align="center">
5366c7d6 128 <stack>
4d8e7dcb
RK
129 <html:canvas id="mbrotImage" width="300" height="300"
130 onmousedown="mouseevent('down', event);"
7e4a9776
RK
131 onmouseup="mouseevent('up',event);"
132 onmousemove="mouseevent('move',event);">
4d8e7dcb 133 </html:canvas>
5366c7d6
RK
134 <button id="drawButton" label="&fileDraw.label;" oncommand="drawImage();"/>
135 </stack>
37b05b56 136 </hbox>
6e98af87
RK
137 <hbox pack="end" align="end">
138 <description id="statusLabel"/>
139 </hbox>
37b05b56 140</window>