DialogColourInfo Class Reference

Most host operating systems supply applications with a set of colours to be used for rendering special parts of dialogues, e.g. window background, plinth colours, default text foreground/background colours, selection highlight colours, etc. More...

#include <dlgcol.h>

List of all members.

Public Member Functions

 DialogColourInfo ()
 Constructor. Caches the Host Operatig System's dialogue redraw colours, ready for use by kernel-rendered dialogues.
DocColourDialogBack (void)
DocColourTextBack (void)
DocColourTextFore (void)
DocColourDisabledTextFore (void)
DocColourHighlightedTextBack (void)
DocColourHighlightedTextFore (void)
DocColourButtonFace (void)
DocColourButtonHighlight (void)
DocColourButtonShadow (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


Detailed Description

Most host operating systems supply applications with a set of colours to be used for rendering special parts of dialogues, e.g. window background, plinth colours, default text foreground/background colours, selection highlight colours, etc.

Author:
Jason_Williams (Xara Group Ltd) <camelotdev@xara.com>
Date:
28/11/94
This class provides a means by which kernel entities can find out the required colours for various standard dialogue components.

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

See also:
DialogOp::GetHostColours

Definition at line 167 of file dlgcol.h.


Constructor & Destructor Documentation

DialogColourInfo::DialogColourInfo  ) 
 

Constructor. Caches the Host Operatig System's dialogue redraw colours, ready for use by kernel-rendered dialogues.

Author:
Jason_Williams (Xara Group Ltd) <camelotdev@xara.com>
Date:
28/11/94

Definition at line 138 of file dlgcol.cpp.

00139 {
00140     RecacheColours();
00141 }


Member Function Documentation

DocColour& DialogColourInfo::ButtonFace void   )  [inline]
 

Definition at line 191 of file dlgcol.h.

00191 { return mButtonFace; };

DocColour& DialogColourInfo::ButtonHighlight void   )  [inline]
 

Definition at line 192 of file dlgcol.h.

00192 { return mButtonHighlight; };

DocColour& DialogColourInfo::ButtonShadow void   )  [inline]
 

Definition at line 193 of file dlgcol.h.

00193 { return mButtonShadow; };

DocColour& DialogColourInfo::DialogBack void   )  [inline]
 

Definition at line 181 of file dlgcol.h.

00181 { return mDialogBack; };

DocColour& DialogColourInfo::DisabledTextFore void   )  [inline]
 

Definition at line 186 of file dlgcol.h.

00186 { return mDisabledTextFore; };

DocColour& DialogColourInfo::HighlightedTextBack void   )  [inline]
 

Definition at line 188 of file dlgcol.h.

00188 { return mHighlightedTextBack; };

DocColour& DialogColourInfo::HighlightedTextFore void   )  [inline]
 

Definition at line 189 of file dlgcol.h.

00189 { return mHighlightedTextFore; };

void DialogColourInfo::RecacheColours void   )  [static]
 

Re-caches the Host Operatig System's dialogue redraw colours, ready for use by kernel-rendered dialogues.

Author:
Jason_Williams (Xara Group Ltd) <camelotdev@xara.com>
Date:
28/11/94

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 }

DocColour& DialogColourInfo::TextBack void   )  [inline]
 

Definition at line 183 of file dlgcol.h.

00183 { return mTextBack; };

DocColour& DialogColourInfo::TextFore void   )  [inline]
 

Definition at line 184 of file dlgcol.h.

00184 { return mTextFore; };


Member Data Documentation

DocColour DialogColourInfo::mButtonFace [static, private]
 

Definition at line 207 of file dlgcol.h.

DocColour DialogColourInfo::mButtonHighlight [static, private]
 

Definition at line 208 of file dlgcol.h.

DocColour DialogColourInfo::mButtonShadow [static, private]
 

Definition at line 209 of file dlgcol.h.

DocColour DialogColourInfo::mDialogBack [static, private]
 

Definition at line 193 of file dlgcol.h.

DocColour DialogColourInfo::mDisabledTextFore [static, private]
 

Definition at line 202 of file dlgcol.h.

DocColour DialogColourInfo::mHighlightedTextBack [static, private]
 

Definition at line 204 of file dlgcol.h.

DocColour DialogColourInfo::mHighlightedTextFore [static, private]
 

Definition at line 205 of file dlgcol.h.

DocColour DialogColourInfo::mTextBack [static, private]
 

Definition at line 199 of file dlgcol.h.

DocColour DialogColourInfo::mTextFore [static, private]
 

Definition at line 200 of file dlgcol.h.


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 03:53:31 2007 for Camelot by  doxygen 1.4.4