xref: /aoo42x/main/cui/source/dialogs/colorpicker.src (revision b03844c4)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23
24#include "colorpicker.hrc"
25
26#define DLG_WIDTH 295
27#define DLG_HEIGHT 216
28
29#define BUTTON_WIDTH 50
30#define BUTTON_HEIGHT 14
31
32#define METRIC_WIDTH 30
33#define METRIC_HEIGHT 12
34
35#define RADIO_WIDTH 8
36#define RADIO_HEIGHT 8
37
38#define LABEL_WIDTH 50
39#define LABEL_HEIGHT 10
40
41#define SLIDER_WIDTH 22
42#define PREVIEW_HEIGHT 16
43
44#define LINE_WIDTH (3 + RADIO_WIDTH + 2 + LABEL_WIDTH + 3 + METRIC_WIDTH + 3)
45#define LINE_HEIGHT 8
46
47#define CONTROL_AREA_X (DLG_WIDTH - LINE_WIDTH - 6)
48#define CONTROL_AREA_X_RADIO (CONTROL_AREA_X + 3)
49#define CONTROL_AREA_X_LABEL (CONTROL_AREA_X + 3 + RADIO_WIDTH + 2)
50#define CONTROL_AREA_X_METRIC (CONTROL_AREA_X + 3 + RADIO_WIDTH + 2 + LABEL_WIDTH + 3)
51
52#define CHOOSER_SIZE (CONTROL_AREA_X - 6 - SLIDER_WIDTH - 2 - 2 )
53
54#define BOTTOMLINE_Y (DLG_HEIGHT - 3 - 3 - 8 - 14)
55#define BUTTON_LINE_Y (BOTTOMLINE_Y + 8 + 3)
56
57#define RGB_Y1 (6 + LINE_HEIGHT + 1)
58#define RGB_Y2 (RGB_Y1 + METRIC_HEIGHT + 2)
59#define RGB_Y3 (RGB_Y2 + METRIC_HEIGHT + 2)
60#define RGB_Y4 (RGB_Y3 + METRIC_HEIGHT + 4)
61#define HSB_Y0 (RGB_Y4 + METRIC_HEIGHT + 1)
62#define HSB_Y1 (HSB_Y0 + LINE_HEIGHT + 2)
63#define HSB_Y2 (HSB_Y1 + METRIC_HEIGHT + 2)
64#define HSB_Y3 (HSB_Y2 + METRIC_HEIGHT + 2)
65#define CMYK_Y0 (HSB_Y3 + METRIC_HEIGHT + 1)
66#define CMYK_Y1 (CMYK_Y0 + LINE_HEIGHT + 1)
67#define CMYK_Y2 (CMYK_Y1 + METRIC_HEIGHT + 2)
68#define CMYK_Y3 (CMYK_Y2 + METRIC_HEIGHT + 2)
69#define CMYK_Y4 (CMYK_Y3 + METRIC_HEIGHT + 2)
70
71
72
73ModalDialog RID_CUI_DIALOG_COLORPICKER
74{
75	HelpID = "cui:ModalDialog:ColorPicker" ;
76
77	OutputSize = TRUE ;
78	SvLook = TRUE ;
79	Moveable = TRUE ;
80	Size = MAP_APPFONT ( DLG_WIDTH, DLG_HEIGHT ) ;
81
82	Text [ en-US ] = "Color Picker" ;
83
84	Control CT_COLORFIELD
85	{
86		HelpID = "cui:Control:ColorPicker:ColorField" ;
87		Pos = MAP_APPFONT ( 6, 6 ) ;
88		Size = MAP_APPFONT ( CHOOSER_SIZE, CHOOSER_SIZE ) ;
89		Border = TRUE ;
90		TabStop = TRUE ;
91	};
92
93	Control CT_COLORSLIDER
94	{
95		HelpID = "cui:Control:ColorPicker:ColorSlider" ;
96		Pos = MAP_APPFONT ( CONTROL_AREA_X - 2 - SLIDER_WIDTH + 4, 6 ) ;
97		Size = MAP_APPFONT ( SLIDER_WIDTH - 8, CHOOSER_SIZE ) ;
98		Border = TRUE ;
99		TabStop = TRUE ;
100	};
101
102	Control CT_PREVIEW
103	{
104		HelpID = "cui:Control:ColorPicker:ColorPreview" ;
105		Pos = MAP_APPFONT ( 6, 6 + CHOOSER_SIZE + 3 ) ;
106		Size = MAP_APPFONT ( CHOOSER_SIZE, PREVIEW_HEIGHT ) ;
107		Border = FALSE;
108	};
109
110	Control CT_PREVIOUS
111	{
112		HelpID = "cui:Control:ColorPicker:ColorPrevious" ;
113		Pos = MAP_APPFONT ( 6 + (CHOOSER_SIZE/2), 6 + CHOOSER_SIZE + 3 ) ;
114		Size = MAP_APPFONT ( CHOOSER_SIZE/2, PREVIEW_HEIGHT ) ;
115		Border = FALSE ;
116		Hide = TRUE ;
117	};
118
119	FixedImage CT_LEFT_SLIDER
120	{
121	};
122
123	FixedImage CT_RIGHT_SLIDER
124	{
125	};
126
127	Image CT_SLIDERIMG
128	{
129		ImageBitmap = Bitmap { File = "colorslider.png" ; };
130	};
131
132#if 0
133	ImageButton PB_PICKER
134	{
135		HelpID = "cui:ImageButton:ColorPicker:Picker" ;
136		Pos = MAP_APPFONT ( CONTROL_AREA_X - 2 - SLIDER_WIDTH + 4, 6 + CHOOSER_SIZE + 3 ) ;
137		Size = MAP_APPFONT( SLIDER_WIDTH - 8, PREVIEW_HEIGHT ) ;
138		TabStop = TRUE ;
139		QuickHelpText [ en-US ] = "Pick a color from the document" ;
140		ButtonImage = Image
141		{
142			ImageBitmap = Bitmap { File = "pipette.png" ; };
143		};
144	};
145#endif
146
147	FixedLine FL_RGB
148	{
149		Pos = MAP_APPFONT ( CONTROL_AREA_X, 6 ) ;
150		Size = MAP_APPFONT ( LINE_WIDTH, LINE_HEIGHT ) ;
151		Text [ en-US ] = "RGB" ;
152	};
153
154	RadioButton CT_RED
155	{
156		HelpID = "cui:RadioButton:ColorPicker:Red" ;
157		Pos = MAP_APPFONT ( CONTROL_AREA_X_RADIO, RGB_Y1+2 ) ;
158		Size = MAP_APPFONT ( RADIO_WIDTH, RADIO_HEIGHT ) ;
159		Group = TRUE;
160	};
161
162	RadioButton CT_GREEN
163	{
164		HelpID = "cui:RadioButton:ColorPicker:Green" ;
165		Pos = MAP_APPFONT ( CONTROL_AREA_X_RADIO, RGB_Y2+2 ) ;
166		Size = MAP_APPFONT ( RADIO_WIDTH, RADIO_HEIGHT ) ;
167	};
168
169	RadioButton CT_BLUE
170	{
171		HelpID = "cui:RadioButton:ColorPicker:Blue" ;
172		Pos = MAP_APPFONT ( CONTROL_AREA_X_RADIO, RGB_Y3+2 ) ;
173		Size = MAP_APPFONT ( RADIO_WIDTH, RADIO_HEIGHT ) ;
174	};
175
176	RadioButton CT_HUE
177	{
178		HelpID = "cui:RadioButton:ColorPicker:Hue" ;
179		Pos = MAP_APPFONT ( CONTROL_AREA_X_RADIO, HSB_Y1+2 ) ;
180		Size = MAP_APPFONT ( RADIO_WIDTH, RADIO_HEIGHT ) ;
181		Check = TRUE ;
182	};
183
184	RadioButton CT_SATURATION
185	{
186		HelpID = "cui:RadioButton:ColorPicker:Saturation" ;
187		Pos = MAP_APPFONT ( CONTROL_AREA_X_RADIO, HSB_Y2+2 ) ;
188		Size = MAP_APPFONT ( RADIO_WIDTH, RADIO_HEIGHT ) ;
189	};
190
191	RadioButton CT_BRIGHTNESS
192	{
193		HelpID = "cui:RadioButton:ColorPicker:Brightness" ;
194		Pos = MAP_APPFONT ( CONTROL_AREA_X_RADIO, HSB_Y3+2 ) ;
195		Size = MAP_APPFONT ( RADIO_WIDTH, RADIO_HEIGHT ) ;
196	};
197
198	FixedText CT_RED
199	{
200		Pos = MAP_APPFONT ( CONTROL_AREA_X_LABEL, RGB_Y1+1 ) ;
201		Size = MAP_APPFONT ( LABEL_WIDTH, LABEL_HEIGHT ) ;
202		Text [ en-US ] = "~Red" ;
203	};
204
205	MetricField CT_RED
206	{
207		HelpID = "cui:MetricField:ColorPicker:Red" ;
208		Border = TRUE ;
209		Pos = MAP_APPFONT ( CONTROL_AREA_X_METRIC, RGB_Y1 ) ;
210		Size = MAP_APPFONT ( METRIC_WIDTH, METRIC_HEIGHT ) ;
211		TabStop = TRUE ;
212		Repeat = TRUE ;
213		Spin = TRUE ;
214		Maximum = 255 ;
215		Last = 255 ;
216	};
217
218	FixedText CT_GREEN
219	{
220		Pos = MAP_APPFONT ( CONTROL_AREA_X_LABEL, RGB_Y2+1 ) ;
221		Size = MAP_APPFONT ( LABEL_WIDTH, LABEL_HEIGHT ) ;
222		Text [ en-US ] = "~Green" ;
223	};
224
225	MetricField CT_GREEN
226	{
227		HelpID = "cui:MetricField:ColorPicker:Green" ;
228		Border = TRUE ;
229		Pos = MAP_APPFONT ( CONTROL_AREA_X_METRIC, RGB_Y2 ) ;
230		Size = MAP_APPFONT ( METRIC_WIDTH, METRIC_HEIGHT ) ;
231		TabStop = TRUE ;
232		Repeat = TRUE ;
233		Spin = TRUE ;
234		Maximum = 255 ;
235		Last = 255 ;
236	};
237
238	FixedText CT_BLUE
239	{
240		Pos = MAP_APPFONT ( CONTROL_AREA_X_LABEL, RGB_Y3+1 ) ;
241		Size = MAP_APPFONT ( LABEL_WIDTH, LABEL_HEIGHT ) ;
242		Text [ en-US ] = "~Blue" ;
243	};
244
245	MetricField CT_BLUE
246	{
247		HelpID = "cui:MetricField:ColorPicker:Blue" ;
248		Border = TRUE ;
249		Pos = MAP_APPFONT ( CONTROL_AREA_X_METRIC, RGB_Y3 ) ;
250		Size = MAP_APPFONT ( METRIC_WIDTH, METRIC_HEIGHT ) ;
251		TabStop = TRUE ;
252		Repeat = TRUE ;
253		Spin = TRUE ;
254		Maximum = 255 ;
255		Last = 255 ;
256	};
257
258	FixedText CT_HEX
259	{
260		Pos = MAP_APPFONT ( CONTROL_AREA_X_LABEL, RGB_Y4+1 ) ;
261		Size = MAP_APPFONT ( LABEL_WIDTH, LABEL_HEIGHT ) ;
262		Text [ en-US ] = "Hex ~#" ;
263	};
264
265	Edit CT_HEX
266	{
267		HelpID = "cui:MetricField:ColorPicker:Hex" ;
268		Border = TRUE ;
269		Left = TRUE ;
270		Pos = MAP_APPFONT ( CONTROL_AREA_X_METRIC, RGB_Y4 ) ;
271		Size = MAP_APPFONT ( METRIC_WIDTH, METRIC_HEIGHT ) ;
272		TabStop = TRUE ;
273	};
274
275// -------------------------------------------------------------------------
276// HSB
277// -------------------------------------------------------------------------
278
279	FixedLine FL_HSB
280	{
281		Pos = MAP_APPFONT ( CONTROL_AREA_X, HSB_Y0 ) ;
282		Size = MAP_APPFONT ( LINE_WIDTH, LINE_HEIGHT ) ;
283		Text [ en-US ] = "HSB" ;
284	};
285
286	FixedText CT_HUE
287	{
288		Pos = MAP_APPFONT ( CONTROL_AREA_X_LABEL, HSB_Y1+1 ) ;
289		Size = MAP_APPFONT ( LABEL_WIDTH, LABEL_HEIGHT ) ;
290		Text [ en-US ] = "H~ue" ;
291	};
292
293	MetricField CT_HUE
294	{
295		HelpID = "cui:MetricField:ColorPicker:Hue" ;
296		Border = TRUE ;
297		Pos = MAP_APPFONT ( CONTROL_AREA_X_METRIC, HSB_Y1 ) ;
298		Size = MAP_APPFONT ( METRIC_WIDTH, METRIC_HEIGHT ) ;
299		TabStop = TRUE ;
300		Repeat = TRUE ;
301		Spin = TRUE ;
302		Maximum = 360 ;
303		Last = 360 ;
304		Unit = FUNIT_CUSTOM ;
305	};
306
307	FixedText CT_SATURATION
308	{
309		Pos = MAP_APPFONT ( CONTROL_AREA_X_LABEL, HSB_Y2+1 ) ;
310		Size = MAP_APPFONT ( LABEL_WIDTH, LABEL_HEIGHT ) ;
311		Text [ en-US ] = "~Saturation" ;
312	};
313
314	MetricField CT_SATURATION
315	{
316		HelpID = "cui:MetricField:ColorPicker:Saturation" ;
317		Border = TRUE ;
318		Pos = MAP_APPFONT ( CONTROL_AREA_X_METRIC, HSB_Y2 ) ;
319		Size = MAP_APPFONT ( METRIC_WIDTH, METRIC_HEIGHT ) ;
320		TabStop = TRUE ;
321		Repeat = TRUE ;
322		Spin = TRUE ;
323		Maximum = 100 ;
324		Last = 100 ;
325		Unit = FUNIT_PERCENT ;
326	};
327
328	FixedText CT_BRIGHTNESS
329	{
330		Pos = MAP_APPFONT ( CONTROL_AREA_X_LABEL, HSB_Y3+1 ) ;
331		Size = MAP_APPFONT ( LABEL_WIDTH, LABEL_HEIGHT ) ;
332		Text [ en-US ] = "Bright~ness" ;
333	};
334
335	MetricField CT_BRIGHTNESS
336	{
337		HelpID = "cui:MetricField:ColorPicker:Brightness" ;
338		Border = TRUE ;
339		Pos = MAP_APPFONT ( CONTROL_AREA_X_METRIC, HSB_Y3 ) ;
340		Size = MAP_APPFONT ( METRIC_WIDTH, METRIC_HEIGHT ) ;
341		TabStop = TRUE ;
342		Repeat = TRUE ;
343		Spin = TRUE ;
344		Maximum = 100 ;
345		Last = 100 ;
346		Unit = FUNIT_PERCENT ;
347	};
348
349// -------------------------------------------------------------------------
350// CMYK
351// -------------------------------------------------------------------------
352
353	FixedLine FL_CMYK
354	{
355		Pos = MAP_APPFONT ( CONTROL_AREA_X, CMYK_Y0 ) ;
356		Size = MAP_APPFONT ( LINE_WIDTH, LINE_HEIGHT ) ;
357		Text [ en-US ] = "CMYK" ;
358	};
359
360	FixedText CT_CYAN
361	{
362		Pos = MAP_APPFONT ( CONTROL_AREA_X_LABEL, CMYK_Y1+1 ) ;
363		Size = MAP_APPFONT ( LABEL_WIDTH, LABEL_HEIGHT ) ;
364		Text [ en-US ] = "~Cyan" ;
365	};
366
367	MetricField CT_CYAN
368	{
369		HelpID = "cui:MetricField:ColorPicker:Cyan" ;
370		Border = TRUE ;
371		Pos = MAP_APPFONT ( CONTROL_AREA_X_METRIC, CMYK_Y1 ) ;
372		Size = MAP_APPFONT ( METRIC_WIDTH, METRIC_HEIGHT ) ;
373		TabStop = TRUE ;
374		Repeat = TRUE ;
375		Spin = TRUE ;
376		Maximum = 100 ;
377		Last = 100 ;
378		Unit = FUNIT_PERCENT ;
379	};
380
381	FixedText CT_MAGENTA
382	{
383		Pos = MAP_APPFONT ( CONTROL_AREA_X_LABEL, CMYK_Y2+1 ) ;
384		Size = MAP_APPFONT ( LABEL_WIDTH, LABEL_HEIGHT ) ;
385		Text [ en-US ] = "~Magenta" ;
386	};
387
388	MetricField CT_MAGENTA
389	{
390		HelpID = "cui:MetricField:ColorPicker:Magenta" ;
391		Border = TRUE ;
392		Pos = MAP_APPFONT ( CONTROL_AREA_X_METRIC, CMYK_Y2 ) ;
393		Size = MAP_APPFONT ( METRIC_WIDTH, METRIC_HEIGHT ) ;
394		TabStop = TRUE ;
395		Repeat = TRUE ;
396		Spin = TRUE ;
397		Maximum = 100 ;
398		Last = 100 ;
399		Unit = FUNIT_PERCENT ;
400	};
401
402	FixedText CT_YELLOW
403	{
404		Pos = MAP_APPFONT ( CONTROL_AREA_X_LABEL, CMYK_Y3+1 ) ;
405		Size = MAP_APPFONT ( LABEL_WIDTH, LABEL_HEIGHT ) ;
406		Text [ en-US ] = "~Yellow" ;
407	};
408
409	MetricField CT_YELLOW
410	{
411		HelpID = "cui:MetricField:ColorPicker:Yellow" ;
412		Border = TRUE ;
413		Pos = MAP_APPFONT ( CONTROL_AREA_X_METRIC, CMYK_Y3 ) ;
414		Size = MAP_APPFONT ( METRIC_WIDTH, METRIC_HEIGHT ) ;
415		TabStop = TRUE ;
416		Repeat = TRUE ;
417		Spin = TRUE ;
418		Maximum = 100 ;
419		Last = 100 ;
420		Unit = FUNIT_PERCENT ;
421	};
422
423	FixedText CT_KEY
424	{
425		Pos = MAP_APPFONT ( CONTROL_AREA_X_LABEL, CMYK_Y4+1 ) ;
426		Size = MAP_APPFONT ( LABEL_WIDTH, LABEL_HEIGHT ) ;
427		Text [ en-US ] = "~Key" ;
428	};
429
430	MetricField CT_KEY
431	{
432		HelpID = "cui:MetricField:ColorPicker:Key" ;
433		Border = TRUE ;
434		Pos = MAP_APPFONT ( CONTROL_AREA_X_METRIC, CMYK_Y4 ) ;
435		Size = MAP_APPFONT ( METRIC_WIDTH, METRIC_HEIGHT ) ;
436		TabStop = TRUE ;
437		Repeat = TRUE ;
438		Spin = TRUE ;
439		Maximum = 100 ;
440		Last = 100 ;
441		Unit = FUNIT_PERCENT ;
442	};
443
444	// ------------------------------------------------------
445	// bottom buttons
446	// ------------------------------------------------------
447
448	FixedLine FT_BOTTOMLINE
449	{
450		Pos = MAP_APPFONT ( 0, BOTTOMLINE_Y ) ;
451		Size = MAP_APPFONT ( DLG_WIDTH, 8 ) ;
452	};
453
454	HelpButton BTN_HELP
455	{
456		Pos = MAP_APPFONT ( 3, BUTTON_LINE_Y ) ;
457		Size = MAP_APPFONT ( BUTTON_WIDTH, BUTTON_HEIGHT ) ;
458		TabStop = TRUE ;
459	};
460
461	OKButton BTN_OK
462	{
463		Pos = MAP_APPFONT ( DLG_WIDTH - 3 - BUTTON_WIDTH - 3 - BUTTON_WIDTH, BUTTON_LINE_Y ) ;
464		Size = MAP_APPFONT ( BUTTON_WIDTH, BUTTON_HEIGHT ) ;
465		TabStop = TRUE ;
466		DefButton = TRUE ;
467	};
468	CancelButton BTN_CANCEL
469	{
470		Pos = MAP_APPFONT ( DLG_WIDTH - 3 - BUTTON_WIDTH, BUTTON_LINE_Y ) ;
471		Size = MAP_APPFONT ( BUTTON_WIDTH, BUTTON_HEIGHT ) ;
472		TabStop = TRUE ;
473	};
474};
475
476// ********************************************************************** EOF
477