OSDN Git Service

import source-tree based svn r84.
[bluegriffon/BlueGriffon.git] / base / content / bluegriffon / xul / colourPicker.xul
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 Mozilla.org
17    -
18    - The Initial Developer of the Original Code is
19    - Linspire Inc..
20    - Portions created by the Initial Developer are Copyright (C) 2003
21    - the Initial Developer. All Rights Reserved.
22    -
23    - Contributor(s):
24    -   Daniel Glazman (glazman@disruptive-innovations.com), on behalf of Linspire Inc.
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://bluegriffon/skin/colourPicker.css" type="text/css"?>
42
43 <!DOCTYPE dialog SYSTEM "chrome://bluegriffon/locale/colourPicker.dtd" >
44 <dialog
45     xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
46     xmlns:html="http://www.w3.org/1999/xhtml"
47     onload="StartUp();"
48     ondialogaccept="return onAccept();"
49     ondialogcancel="return onCancelColor();"
50     persist="screenX screenY"
51     screenX="24" screenY="24"> 
52
53   <script type="application/javascript" src="chrome://bluegriffon/content/utils/dgid.js"/>
54   <script type="application/javascript" src="chrome://bluegriffon/content/js/colourPicker.js"/>
55
56   <broadcaster id="args" value=""/>
57   <spacer id="location" offsetY="50" persist="offsetX offsetY"/>
58
59   <hbox id="TableOrCellGroup" align="center" collapsed="true">
60     <label control="CellOrTableGroup" value="&background.label;" accesskey="&background.accessKey;"/>
61     <radiogroup id="CellOrTableGroup" orient="horizontal">
62       <radio id="TableRadio" label="&table.label;" accesskey="&table.accessKey;"/>
63       <radio id="CellRadio"  label="&cell.label;"  accesskey="&cell.accessKey;"/>
64     </radiogroup>
65   </hbox>
66
67   <hbox>
68     <vbox>
69       <html:div style="position: relative;">
70         <html:img id="hueAndSaturationImg" src="chrome://bluegriffon/content/hsPanel.png"
71                   style="width: 200px; height: 200px; max-width: 200px; max-height: 200px; border: inset thin; margin: 8px" />
72         <html:img id="hueAndSaturationCrosshair"
73                   src="chrome://bluegriffon/content/colourPickerCrosshair.gif" style="position: absolute; top: 35px; left: 65px" />
74       </html:div>
75       <spacer class="spacer" />
76       <html:div style="position: relative; height: 34px;">
77         <html:img id="brightnessImg"
78                   src="chrome://bluegriffon/content/brightness.png" style="width: 200px; height: 25px; border: inset thin; margin-left: 8px; margin-right: 8px" />
79         <html:img id="brightnessArrow"
80                   src="chrome://bluegriffon/content/colourPickerArrow.gif" style="position: absolute; bottom: 0px; left: 35px" />
81       </html:div>
82       <grid>
83         <columns><column/><column/><column/><column/><column/><column/><column/></columns>
84         <rows>
85           <row align="center">
86             <label value="&hue.label;"
87                    id="hueLabel"
88                    control="hue"/>
89             <textbox size="3"
90                      id="hue"
91                      oninput="onTextboxValueChanged(this, 'hue')"/>
92             <spinbuttons onup="IncreaseTextboxValue('hue', 359)"
93                          ondown="DecreaseTextboxValue('hue', 0)"/>
94             <spacer class="spacer"/>
95             <label value="&red.label;"
96                    control="red"
97                    id="redLabel" />
98             <textbox size="3"
99                      id="red" 
100                      oninput="onTextboxValueChanged(this, 'red')"/>
101             <spinbuttons onup="IncreaseTextboxValue('red', 255)"
102                          ondown="DecreaseTextboxValue('red', 0)"/>
103           </row>
104           <row align="center">
105             <label value="&saturation.label;"
106                    control="saturation"
107                    id="saturationLabel" />
108             <textbox size="3"
109                      id="saturation" 
110                      oninput="onTextboxValueChanged(this, 'saturation')"/>
111             <spinbuttons onup="IncreaseTextboxValue('saturation', 100)"
112                          ondown="DecreaseTextboxValue('saturation', 0)"/>
113             <spacer class="spacer"/>
114             <label value="&green.label;"
115                    control="green"
116                    id="greenLabel" />
117             <textbox size="3"
118                      id="green" 
119                      oninput="onTextboxValueChanged(this, 'green')"/>
120             <spinbuttons onup="IncreaseTextboxValue('green', 255)"
121                          ondown="DecreaseTextboxValue('green', 0)"/>
122           </row>
123           <row align="center">
124             <label value="&brightness.label;"
125                    control="brightness"
126                    id="brightnessLabel" />
127             <textbox size="3"
128                      id="brightness" 
129                      oninput="onTextboxValueChanged(this, 'brightness')"/>
130             <spinbuttons onup="IncreaseTextboxValue('brightness', 255)"
131                          ondown="DecreaseTextboxValue('brightness', 0)"/>
132             <spacer class="spacer"/>
133             <label value="&blue.label;"
134                    control="blue"
135                    id="blueLabel" />
136             <textbox size="3"
137                      id="blue" 
138                      oninput="onTextboxValueChanged(this, 'blue')"/>
139             <spinbuttons onup="IncreaseTextboxValue('blue', 255)"
140                          ondown="DecreaseTextboxValue('blue', 0)"/>
141           </row>
142         </rows>
143       </grid>
144         
145     </vbox>
146
147     <vbox>
148       <label value="&predef.label;" />
149       <colorpicker id="colorpicker"
150                    onselect="SelectColor();"/>
151       <spacer flex="1"/>
152       <button id="LastPickedButton" crop="right" oncommand="SelectLastPickedColor();">
153         <spacer id="LastPickedColor"
154                     LastTextColor="" LastBackgroundColor=""
155                     persist="LastTextColor LastBackgroundColor"/>
156         <label value="&lastPickedColor.label;" accesskey="&lastPickedColor.accessKey;" flex="1" style="text-align: center;"/>
157       </button>
158       <hbox>
159               <grid>
160                 <columns><column/><column/></columns>
161                 <rows>
162                   <row align="center">
163                     <label value="&hexColor.label;"
164                            control="hexColour"
165                            id="hexColourLabel" />
166                     <textbox size="7" id="hexColour"/>
167                   </row>
168                   <row align="center">
169                     <label value="&nameColor.label;"
170                            control="nameColour" 
171                            id="nameColourLabel" />
172                     <textbox size="7"
173                              id="nameColour"
174                              oninput="onNamedColourChanged(this)"/>
175                   </row>
176                 </rows>
177               </grid>
178         <html:p flex="1" id="swatch">   </html:p>
179       </hbox>
180       <checkbox label="&transparency.label;"
181                 id="transparencyCheckbox"
182                 oncommand="ToggleTransparency(this)"/>
183     </vbox>
184   </hbox>
185
186 </dialog>