#include <dlgcol.h>
Public Member Functions | |
DialogColourInfo () | |
Constructor. Caches the Host Operatig System's dialogue redraw colours, ready for use by kernel-rendered dialogues. | |
DocColour & | DialogBack (void) |
DocColour & | TextBack (void) |
DocColour & | TextFore (void) |
DocColour & | DisabledTextFore (void) |
DocColour & | HighlightedTextBack (void) |
DocColour & | HighlightedTextFore (void) |
DocColour & | ButtonFace (void) |
DocColour & | ButtonHighlight (void) |
DocColour & | ButtonShadow (void) |
Static Public Member Functions | |
static void | RecacheColours (void) |
Re-caches the Host Operatig System's dialogue redraw colours, ready for use by kernel-rendered dialogues. | |
Static Private Attributes | |
static DocColour | mDialogBack |
static DocColour | mTextBack |
static DocColour | mTextFore |
static DocColour | mDisabledTextFore |
static DocColour | mHighlightedTextBack |
static DocColour | mHighlightedTextFore |
static DocColour | mButtonFace |
static DocColour | mButtonHighlight |
static DocColour | mButtonShadow |
The methods provided by this class return a reference to a static DocColour, as in: DocColour &DialogBack(void); DO NOT alter the contents of any of these colours!
Note that if you create a DialogColourInfo on the fly each time you redraw, the colours are guaranteed to be kept up to date; but if you keep one around permanently, then they may not be updated correctly if the host OS changes its colour scheme (As can be done under Windows with the control panel). Hence, you should either recreate the object, or call its RecacheColours method before each redraw.
The methods provide the following colours: MonoOn DialogBack() // Dialogue window background colour
TextBack() // Text background colour TextFore() // Text foreground colour
DisabledTextFore() // Text foreground colour (when shaded)
HighlightedTextBack() // Text background colour (when selected) HighlightedTextFore() // Text foreground colour (when selected)
ButtonFace() // Button face colour ButtonHighlight() // Button/plinth highlight colour ButtonShadow() // Button/plinth shadow colour MonoOff
Example: MonoOn if (pRender != NULL) { DialogColourInfo RedrawColours; pRender->SetLineColour(RedrawColours.DialogBack()); ... } MonoOff
Definition at line 167 of file dlgcol.h.
|
Constructor. Caches the Host Operatig System's dialogue redraw colours, ready for use by kernel-rendered dialogues.
Definition at line 138 of file dlgcol.cpp. 00139 { 00140 RecacheColours(); 00141 }
|
|
Definition at line 191 of file dlgcol.h. 00191 { return mButtonFace; };
|
|
Definition at line 192 of file dlgcol.h. 00192 { return mButtonHighlight; };
|
|
Definition at line 193 of file dlgcol.h. 00193 { return mButtonShadow; };
|
|
Definition at line 181 of file dlgcol.h. 00181 { return mDialogBack; };
|
|
Definition at line 186 of file dlgcol.h. 00186 { return mDisabledTextFore; };
|
|
Definition at line 188 of file dlgcol.h. 00188 { return mHighlightedTextBack; };
|
|
Definition at line 189 of file dlgcol.h. 00189 { return mHighlightedTextFore; };
|
|
Re-caches the Host Operatig System's dialogue redraw colours, ready for use by kernel-rendered dialogues.
Definition at line 203 of file dlgcol.cpp. 00204 { 00205 GetOSColour(&mDialogBack, wxSYS_COLOUR_BTNFACE); 00206 00207 GetOSColour(&mTextBack, wxSYS_COLOUR_WINDOW); 00208 GetOSColour(&mTextFore, wxSYS_COLOUR_WINDOWTEXT); 00209 00210 GetOSColour(&mDisabledTextFore, wxSYS_COLOUR_GRAYTEXT); 00211 00212 GetOSColour(&mHighlightedTextBack, wxSYS_COLOUR_HIGHLIGHT); 00213 GetOSColour(&mHighlightedTextFore, wxSYS_COLOUR_HIGHLIGHTTEXT); 00214 00215 GetOSColour(&mButtonFace, wxSYS_COLOUR_BTNFACE); 00216 GetOSColour(&mButtonHighlight, wxSYS_COLOUR_BTNHIGHLIGHT); 00217 GetOSColour(&mButtonShadow, wxSYS_COLOUR_BTNSHADOW); 00218 }
|
|
Definition at line 183 of file dlgcol.h. 00183 { return mTextBack; };
|
|
Definition at line 184 of file dlgcol.h. 00184 { return mTextFore; };
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|