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