summaryrefslogtreecommitdiff
path: root/support/dktools/Dk4WxColourPalette.h
blob: f494b916e7b6f83c35500074642b0ff3e922fbdf (plain)
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
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
/*
Copyright (C) 2018-2020, Dirk Krause
SPDX-License-Identifier: BSD-3-Clause
*/

/*
	WARNING: This file was generated by the dkct program (see
	http://dktools.sourceforge.net/ for details).
	Changes you make here will be lost if dkct is run again!
	You should modify the original source and run dkct on it.
	Original source: Dk4WxColourPalette.wxc
*/

/**	@file Dk4WxColourPalette.h Header file for the Dk4WxColourPalette module.
*/

#ifndef DK4WXCOLOURPALETTE_H_INCLUDED
/** Avoid multiple inclusions. */
#define DK4WXCOLOURPALETTE_H_INCLUDED 1


#line 430 "Dk4WxColourPalette.wxc"

#ifndef DK4CONF_H_INCLUDED
#if DK4_BUILDING_DKTOOLS4
#include "dk4conf.h"
#else
#include <dktools-4/dk4conf.h>
#endif
#endif

#ifndef WX_WXPREC_H_INCLUDED
#include <wx/wxprec.h>
#define	WX_WXPREC_H_INCLUDED 1
#endif

#ifdef __BORLANDC__
#pragma hdrstop
#endif

#ifndef WX_PRECOMP
#ifndef WX_WX_H_INCLUDED
#include <wx/wx.h>
#define	WX_WX_H_INCLUDED 1
#endif
#endif

#ifndef WX_GBSIZER_H_INCLUDED
#include <wx/gbsizer.h>
#define	WX_GBSIZER_H_INCLUDED 1
#endif

#ifndef	WX_BOOKCTRL_H_INCLUDED
#include <wx/bookctrl.h>
#define	WX_BOOKCTRL_H_INCLUDED 1
#endif

#ifndef	WX_CHOICEBK_H_INCLUDED
#include <wx/choicebk.h>
#define	WX_CHOICEBK_H_INCLUDED 1
#endif

#ifndef	WX_STATBOX_H_INCLUDED
#include <wx/statbox.h>
#define	WX_STATBOX_H_INCLUDED 1
#endif

#ifndef DK4WXAPPLICTIONHELPER_H_INCLUDED
#if DK4_BUILDING_DKTOOLS4
#include "Dk4WxApplicationHelper.h"
#else
#include <dktools-4/Dk4WxApplicationHelper.h>
#endif
#endif

#ifndef	DK4WXCOLOURVIEW_H_INCLUDED
#if DK4_BUILDING_DKTOOLS4
#include "Dk4WxColourView.h"
#else
#include <dktools-4/Dk4WxColourView.h>
#endif
#endif


#line 492 "Dk4WxColourPalette.wxc"

/**	Color palette allowing to choose between predefined colours.
*/
class Dk4WxColourPalette : public wxDialog
{
	/**	Item in a colour palette.
	*/
	class Dk4WxColourPaletteItem : public wxControl
	{
		/**	Class is dynamic.
		*/
#if	wxCHECK_VERSION(3,0,0)
		wxDECLARE_DYNAMIC_CLASS(Dk4WxColourPaletteItem);
#else
		DECLARE_DYNAMIC_CLASS(Dk4WxColourPaletteItem)
#endif

		/**	Event table for control.
		*/
#if wxCHECK_VERSION(3,0,0)
		wxDECLARE_EVENT_TABLE();
#else
		DECLARE_EVENT_TABLE()
#endif

	protected:

		/**	Parent dialog we have to notify about color change.
		*/
		Dk4WxColourPalette		*pParentWindow;

		/**	Application helper.
		*/
		Dk4WxApplicationHelper	*pAppHelp;
		
		/**	Class name, used in constructor and Create().
		*/
		static wxChar const		 Dk4WxColourPaletteItemName[];
		
		/**	Height.
		*/
		int						 w;
		
		/**	Width.
		*/
		int						 h;
		
		/**	Red component of color to show.
		*/
		int						 r;
		
		/**	Green component of color to show.
		*/
		int						 g;
		
		/**	Blue component of color to show.
		*/
		int						 b;
		
	public:
		
		/**	Default constructor.
		*/
		Dk4WxColourPaletteItem();
		
		/**	Constructor.
			@param	pParent		Parent window.
			@param	wxid		Window ID.
			@param	appHelper	Application helper.
			@param	red	Red 	component of color to show.
			@param	green		Green component of color to show.
			@param	blue		Blue component of color to show.
			@param	pos			Object position.
			@param	size		Object minimum size.
			@param	style		Style for control.
			@param	name		Class name.
		*/
		Dk4WxColourPaletteItem(
			wxWindow				*pParent,
			wxWindowID				 wxid,
			Dk4WxColourPalette		*pal,
			Dk4WxApplicationHelper	*appHelper,
			int						 red,
			int						 green,
			int						 blue,
			wxPoint const &			 pos	= wxDefaultPosition,
			wxSize  const &			 size	= wxDefaultSize,
			long					 style	= wxBORDER_NONE,
			wxChar const			*name	= Dk4WxColourPaletteItemName
		);
		
		/**	Create object after using default constructor.
			@param	pParent		Parent window.
			@param	wxid		Window ID.
			@param	appHelper	Application helper.
			@param	red	Red 	component of color to show.
			@param	green		Green component of color to show.
			@param	blue		Blue component of color to show.
			@param	pos			Object position.
			@param	size		Object minimum size.
			@param	style		Style for control.
			@param	name		Class name.
			@return	true on success, false on error.
		*/
		bool
		Create(
			wxWindow				*pParent,
			wxWindowID				 wxid,
			Dk4WxColourPalette		*pal,
			Dk4WxApplicationHelper	*appHelper,
			int						 red	= 255,
			int						 green	= 255,
			int						 blue	= 255,
			wxPoint const &			 pos	= wxDefaultPosition,
			wxSize  const &			 size	= wxDefaultSize,
			long					 style	= wxBORDER_NONE,
			wxChar const			*name	= Dk4WxColourPaletteItemName
		);
		
		/**	Find minimum size.
		*/
		wxSize
		DoGetBestSize() const;
		
		/**	Handler for erase event.
			@param	event	Event to process.
		*/
		void
		OnErase(wxEraseEvent & event);
		
		/**	Handler for paint event.
			@param	event	Event to process.
		*/
		void
		OnPaint(wxPaintEvent & event);
		
		/**	Handler for mouse click event.
			@param	event	Event to process.
		*/
		void
		OnLeftMouseButtonDown(wxMouseEvent & event);

	};

private:

	/**	Events we have to respond to.
	*/
#if	wxCHECK_VERSION(3,0,0)
	wxDECLARE_EVENT_TABLE();
#else
	DECLARE_EVENT_TABLE()
#endif

protected:

	/**	Red colour for text labels.
	*/
	wxColour				 colourRed;

	/**	Green colour for text labels.
	*/
	wxColour				 colourGreen;

	/**	Blue colour for text labels.
	*/
	wxColour				 colourBlue;

	/**	Application helper.
	*/
	Dk4WxApplicationHelper	*pAppHelp;

	/**	Localized texts.
	*/
	wxChar const * const	*localizedTexts;

	/**	Shade slider value -20 to 20.
	*/
	int						 slvshade;

	/**	Red slider value 0 to 5.
	*/
	int						 slvred;

	/**	Green slider value 0 to 5.
	*/
	int						 slvgreen;

	/**	Blue slider value 0 to 5.
	*/
	int						 slvblue;

	/**	Index of selected list item.
	*/
	int						 listSelection;

	/**	Base red component, not shaded.
	*/
	int						 rb;

	/**	Base green component, not shaded.
	*/
	int						 gb;

	/**	Base blue component, not shaded.
	*/
	int						 bb;

	/**	Result red component.
	*/
	int						 r;

	/**	Result green component.
	*/
	int						 g;

	/**	Result blue component.
	*/
	int						 b;

	/**	Flag: Already in correction process.
	*/
	bool					 bIsCorrecting;

    /**	Flag: GUI ok.
    */
    bool dkctGUILayoutOK;

    /**	GUI element mainSizerHorizontal.
    */
#line 12 "Dk4WxColourPalette.wxc"
    wxBoxSizer *mainSizerHorizontal;

    /**	GUI element mainSizerVertical.
    */
#line 18 "Dk4WxColourPalette.wxc"
    wxBoxSizer *mainSizerVertical;

    /**	GUI element choiceBookInput.
    */
#line 31 "Dk4WxColourPalette.wxc"
    wxChoicebook *choiceBookInput;

    /**	GUI element resultSizerHexadecimal.
    */
#line 362 "Dk4WxColourPalette.wxc"
    wxBoxSizer *resultSizerHexadecimal;

    /**	GUI element resultSizerDecimal.
    */
#line 371 "Dk4WxColourPalette.wxc"
    wxBoxSizer *resultSizerDecimal;

    /**	GUI element colourViewResult.
    */
#line 408 "Dk4WxColourPalette.wxc"
    Dk4WxColourView *colourViewResult;

    /**	GUI element buttonsDialog.
    */
#line 414 "Dk4WxColourPalette.wxc"
    wxStdDialogButtonSizer *buttonsDialog;

    /**	GUI element panelFig.
    */
#line 38 "Dk4WxColourPalette.wxc"
    wxPanel *panelFig;

    /**	GUI element panelHtmlNamed.
    */
#line 284 "Dk4WxColourPalette.wxc"
    wxPanel *panelHtmlNamed;

    /**	GUI element panelHtml216.
    */
#line 306 "Dk4WxColourPalette.wxc"
    wxPanel *panelHtml216;

    /**	GUI element figSizerHorizontal.
    */
#line 42 "Dk4WxColourPalette.wxc"
    wxBoxSizer *figSizerHorizontal;

    /**	GUI element figSizerVertical.
    */
#line 48 "Dk4WxColourPalette.wxc"
    wxBoxSizer *figSizerVertical;

    /**	GUI element figButtonRow0.
    */
#line 64 "Dk4WxColourPalette.wxc"
    wxBoxSizer *figButtonRow0;

    /**	GUI element figButtonRow1.
    */
#line 82 "Dk4WxColourPalette.wxc"
    wxBoxSizer *figButtonRow1;

    /**	GUI element figButtonRow2.
    */
#line 100 "Dk4WxColourPalette.wxc"
    wxBoxSizer *figButtonRow2;

    /**	GUI element figButtonRow3.
    */
#line 118 "Dk4WxColourPalette.wxc"
    wxBoxSizer *figButtonRow3;

    /**	GUI element figShaderLabelSizer.
    */
#line 264 "Dk4WxColourPalette.wxc"
    wxBoxSizer *figShaderLabelSizer;

    /**	GUI element figShaderSlider.
    */
#line 276 "Dk4WxColourPalette.wxc"
    wxSlider *figShaderSlider;

    /**	GUI element b00.
    */
#line 136 "Dk4WxColourPalette.wxc"
    Dk4WxColourPaletteItem *b00;

    /**	GUI element b01.
    */
#line 140 "Dk4WxColourPalette.wxc"
    Dk4WxColourPaletteItem *b01;

    /**	GUI element b02.
    */
#line 144 "Dk4WxColourPalette.wxc"
    Dk4WxColourPaletteItem *b02;

    /**	GUI element b03.
    */
#line 148 "Dk4WxColourPalette.wxc"
    Dk4WxColourPaletteItem *b03;

    /**	GUI element b04.
    */
#line 152 "Dk4WxColourPalette.wxc"
    Dk4WxColourPaletteItem *b04;

    /**	GUI element b05.
    */
#line 156 "Dk4WxColourPalette.wxc"
    Dk4WxColourPaletteItem *b05;

    /**	GUI element b06.
    */
#line 160 "Dk4WxColourPalette.wxc"
    Dk4WxColourPaletteItem *b06;

    /**	GUI element b07.
    */
#line 164 "Dk4WxColourPalette.wxc"
    Dk4WxColourPaletteItem *b07;

    /**	GUI element b08.
    */
#line 168 "Dk4WxColourPalette.wxc"
    Dk4WxColourPaletteItem *b08;

    /**	GUI element b09.
    */
#line 172 "Dk4WxColourPalette.wxc"
    Dk4WxColourPaletteItem *b09;

    /**	GUI element b10.
    */
#line 176 "Dk4WxColourPalette.wxc"
    Dk4WxColourPaletteItem *b10;

    /**	GUI element b11.
    */
#line 180 "Dk4WxColourPalette.wxc"
    Dk4WxColourPaletteItem *b11;

    /**	GUI element b12.
    */
#line 184 "Dk4WxColourPalette.wxc"
    Dk4WxColourPaletteItem *b12;

    /**	GUI element b13.
    */
#line 188 "Dk4WxColourPalette.wxc"
    Dk4WxColourPaletteItem *b13;

    /**	GUI element b14.
    */
#line 192 "Dk4WxColourPalette.wxc"
    Dk4WxColourPaletteItem *b14;

    /**	GUI element b15.
    */
#line 196 "Dk4WxColourPalette.wxc"
    Dk4WxColourPaletteItem *b15;

    /**	GUI element b16.
    */
#line 200 "Dk4WxColourPalette.wxc"
    Dk4WxColourPaletteItem *b16;

    /**	GUI element b17.
    */
#line 204 "Dk4WxColourPalette.wxc"
    Dk4WxColourPaletteItem *b17;

    /**	GUI element b18.
    */
#line 208 "Dk4WxColourPalette.wxc"
    Dk4WxColourPaletteItem *b18;

    /**	GUI element b19.
    */
#line 212 "Dk4WxColourPalette.wxc"
    Dk4WxColourPaletteItem *b19;

    /**	GUI element b20.
    */
#line 216 "Dk4WxColourPalette.wxc"
    Dk4WxColourPaletteItem *b20;

    /**	GUI element b21.
    */
#line 220 "Dk4WxColourPalette.wxc"
    Dk4WxColourPaletteItem *b21;

    /**	GUI element b22.
    */
#line 224 "Dk4WxColourPalette.wxc"
    Dk4WxColourPaletteItem *b22;

    /**	GUI element b23.
    */
#line 228 "Dk4WxColourPalette.wxc"
    Dk4WxColourPaletteItem *b23;

    /**	GUI element b24.
    */
#line 232 "Dk4WxColourPalette.wxc"
    Dk4WxColourPaletteItem *b24;

    /**	GUI element b25.
    */
#line 236 "Dk4WxColourPalette.wxc"
    Dk4WxColourPaletteItem *b25;

    /**	GUI element b26.
    */
#line 240 "Dk4WxColourPalette.wxc"
    Dk4WxColourPaletteItem *b26;

    /**	GUI element b27.
    */
#line 244 "Dk4WxColourPalette.wxc"
    Dk4WxColourPaletteItem *b27;

    /**	GUI element b28.
    */
#line 248 "Dk4WxColourPalette.wxc"
    Dk4WxColourPaletteItem *b28;

    /**	GUI element b29.
    */
#line 252 "Dk4WxColourPalette.wxc"
    Dk4WxColourPaletteItem *b29;

    /**	GUI element b30.
    */
#line 256 "Dk4WxColourPalette.wxc"
    Dk4WxColourPaletteItem *b30;

    /**	GUI element b31.
    */
#line 260 "Dk4WxColourPalette.wxc"
    Dk4WxColourPaletteItem *b31;

    /**	GUI element figShaderLabelText.
    */
#line 271 "Dk4WxColourPalette.wxc"
    wxStaticText *figShaderLabelText;

    /**	GUI element htmlNamedSizerHorizontal.
    */
#line 288 "Dk4WxColourPalette.wxc"
    wxBoxSizer *htmlNamedSizerHorizontal;

    /**	GUI element htmlNamedSizerVertical.
    */
#line 294 "Dk4WxColourPalette.wxc"
    wxBoxSizer *htmlNamedSizerVertical;

    /**	GUI element listHtmlNames.
    */
#line 299 "Dk4WxColourPalette.wxc"
    wxListBox *listHtmlNames;

    /**	GUI element html216SizerHorizontal.
    */
#line 310 "Dk4WxColourPalette.wxc"
    wxBoxSizer *html216SizerHorizontal;

    /**	GUI element html216SizerVertical.
    */
#line 316 "Dk4WxColourPalette.wxc"
    wxBoxSizer *html216SizerVertical;

    /**	GUI element labelHtml216Red.
    */
#line 329 "Dk4WxColourPalette.wxc"
    wxStaticText *labelHtml216Red;

    /**	GUI element sliderHtml216Red.
    */
#line 332 "Dk4WxColourPalette.wxc"
    wxSlider *sliderHtml216Red;

    /**	GUI element labelHtml216Green.
    */
#line 340 "Dk4WxColourPalette.wxc"
    wxStaticText *labelHtml216Green;

    /**	GUI element sliderHtml216Green.
    */
#line 343 "Dk4WxColourPalette.wxc"
    wxSlider *sliderHtml216Green;

    /**	GUI element labelHtml216Blue.
    */
#line 351 "Dk4WxColourPalette.wxc"
    wxStaticText *labelHtml216Blue;

    /**	GUI element sliderHtml216Blue.
    */
#line 354 "Dk4WxColourPalette.wxc"
    wxSlider *sliderHtml216Blue;

    /**	GUI element hexRed.
    */
#line 380 "Dk4WxColourPalette.wxc"
    wxStaticText *hexRed;

    /**	GUI element hexGreen.
    */
#line 384 "Dk4WxColourPalette.wxc"
    wxStaticText *hexGreen;

    /**	GUI element hexBlue.
    */
#line 389 "Dk4WxColourPalette.wxc"
    wxStaticText *hexBlue;

    /**	GUI element decRed.
    */
#line 394 "Dk4WxColourPalette.wxc"
    wxStaticText *decRed;

    /**	GUI element decGreen.
    */
#line 398 "Dk4WxColourPalette.wxc"
    wxStaticText *decGreen;

    /**	GUI element decBlue.
    */
#line 403 "Dk4WxColourPalette.wxc"
    wxStaticText *decBlue;

    /**	GUI element buttonOK.
    */
#line 418 "Dk4WxColourPalette.wxc"
    wxButton *buttonOK;

    /**	GUI element buttonCancel.
    */
#line 423 "Dk4WxColourPalette.wxc"
    wxButton *buttonCancel;


#line 717 "Dk4WxColourPalette.wxc"

protected:

	/**	Correct shade label.
	*/
	void
	CorrectShadeLabel(void);

	/**	Shade a color.
		@param	val	Original value.
		@return	Shaded color value.
	*/
	int
	ShadeColour(int val);

	/**	Correct appearance after using controls.
		@param	reason	Which control was used.
	*/
	void
	CorrectGui(int reason);

	/**	Set the R, G, B text labels for the r, g, b variables.
	*/
	void
	SetRgbTextLabels(void);

	/**	Find RGB slider value next to a given color value.
	*/
	int
	FindSliderValue(int colval);

	/**	Find slider values next to the r, g, b variables.
	*/
	void
	FindRgbSliderValues(void);

	/**	Find list box entry next to the r, g, b variables.
	*/
	void
	FindListBoxEntry(void);

public:

	/**	Our IDs.
	*/
	enum {
	
		/**	ID of choicebook change.
		*/
		ID_CHOICEBOOK	=	((wxID_HIGHEST) + 1) ,
	
		/**	ID of XFig shade slider.
		*/
		ID_SLIDER_SHADE ,
	
		/**	ID of HTML named colors list control.
		*/
		ID_HTML_NAMED_LIST ,
	
		/**	ID of HTML 216 red slider.
		*/
		ID_SLIDER_RED ,
	
		/**	ID of HTML 216 green slider.
		*/
		ID_SLIDER_GREEN ,
	
		/**	ID of HTML 216 blue slider.
		*/
		ID_SLIDER_BLUE
	};

	/**	Reasons for GUI corrections.
	*/
	enum {
							/**	New page selected in choice book.
							*/
		REASON_CHOICEBOOK	= 0 ,
	
							/**	Base colors changed.
							*/
		REASON_BASE_COLOR ,
	
							/**	Shade slider changed.
							*/
		REASON_SHADE_SLIDER ,
	
							/**	List selection changed.
							*/
		REASON_LIST_SELECT ,
	
							/**	RGB slider changed.
							*/
		REASON_RGB_SLIDER 
	};

	/**	Default constructor.
	*/
	Dk4WxColourPalette();

	/**	Real constructor.
		@param	pParent		Parent window.
		@param	pAppHelper	Application helper.
		@param	red			Initial red component.
		@param	green		Initial green component.
		@param	blue		Initial blue component.
		@param	withborder	Flag: Show border around dialog box.
	*/
	Dk4WxColourPalette(
		wxWindow				*pParent,
		Dk4WxApplicationHelper	*pAppHelper,
		int						 red,
		int						 green,
		int						 blue,
		bool					 withborder = true
	);

	/**	Handler for OK button.
		@param	event	Event to respond to, unused.
	*/
	void
	OnOK(wxCommandEvent & event);

	/**	Handler for Cancel button.
		@param	event	Event to respond to, unused.
	*/
	void
	OnCancel(wxCommandEvent & event);

	/**	Handler for shade slider events.
		@param	event	Event to respond to, unused.
	*/
	void
	OnShadeSlider(wxCommandEvent & event);

	/**	Handler for RGB slider events.
		@param	event	Event to respond to, unused.
	*/
	void
	OnRgbSlider(wxCommandEvent & event);

#if	wxCHECK_VERSION(3,0,0)
	/**	Handler for changed choicebook page.
		@param	event	Event to respond to, unused
	*/
	void
	OnChoicebookChanged(wxBookCtrlEvent & event);
#else
	/**	Handler for changed choicebook page.
		@param	event	Event to respond to, unused
	*/
	void
	OnChoicebookChanged(wxChoicebookEvent & event);
#endif

	/**	Handler for changed selection on list box.
		@param	event	Event to respond to, unused.
	*/
	void
	OnListBoxChanged(wxCommandEvent & event);

	/**	Retrieve red component.
		@return	Red value.
	*/
	int
	Red(void) const;

	/**	Retrieve green component.
		@return	Green value.
	*/
	int
	Green(void) const;

	/**	Retrieve blue component.
		@return	Blue value.
	*/
	int
	Blue(void) const;

	/**	React on Dk4WxColourPaletteItem click.
		@param	red		New base red component.
		@param	green	New base green component.
		@param	blue	New base blue component.
	*/
	void
	SetBaseRGB(int red, int green, int blue);

	/**	Construct a dialog style value.
		@param	bBorder	Flag: Draw border.
		@param	bTitle	Flag: Title bar on dialog.
	*/
	static
	int
	GetDialogStyle(bool bBorder = true, bool bTitle = true);

};



#line 916 "Dk4WxColourPalette.wxc"


#endif