- /** Default constructor for this class */
- wxCaptionBarStyle() {
- ResetDefaults();
- };
-
- ~wxCaptionBarStyle() {
-
- };
-
- void ResetDefaults() {
- _firstColourUsed = false;
- _secondColourUsed = false;
- _textColourUsed = false;
- _captionFontUsed = false;
- _captionStyleUsed = false;
- _captionStyle = wxCAPTIONBAR_GRADIENT_V;
- };
-
- /** Copy operator. Only the styles in use in the source object are being copied to the destination object. All other
- styles are not copied */
- void operator=(const wxCaptionBarStyle &s) {
- if(s._captionStyleUsed)
- {
- _captionStyleUsed = true;
- _captionStyle = s._captionStyle;
- }
- if(s._captionFontUsed)
- {
- _captionFontUsed = true;
- _captionFont = s._captionFont;
- }
- if(s._firstColourUsed)
- {
- _firstColourUsed = true;
- _firstColour = s._firstColour;
- }
- if(s._secondColourUsed)
- {
- _secondColourUsed = true;
- _secondColour = s._secondColour;
- }
- if(s._textColourUsed)
- {
- _textColourUsed = true;
- _textColour = s._textColour;
- }
- };
-
- // ------- CaptionBar Font -------
-
- /** Set font for the caption bar. If this is not set, the font property is undefined
- and will not be used. Use CaptionFontUsed() to check if this style is used */
- void SetCaptionFont(const wxFont &font) {
- _captionFont = font;
- _captionFontUsed = true;
- };
-
- /** Checks if the caption bar font is set */
- bool CaptionFontUsed() const {
- return _captionFontUsed;
- };
-
- /** Returns the font for the caption bar. Please be warned this will result in an assertion failure when
- this property is not previously set
- \sa SetCaptionFont(), CaptionFontUsed() */
- wxFont GetCaptionFont() const {
- wxASSERT(_captionFontUsed);
- return _captionFont;
- };
-
- // ------- FirstColour -------
-
- /** Set first colour for the caption bar. If this is not set, the colour property is
- undefined and will not be used. Use FirstColourUsed() to check if this
- style is used */
- void SetFirstColour(const wxColour &col) {
- _firstColour = col;
- _firstColourUsed = true;
- };
-
- /** Checks if the first colour of the caption bar is set */
- bool FirstColourUsed() const {
- return _firstColourUsed;
- };
-
- /** Returns the first colour for the caption bar. Please be warned this will
- result in an assertion failure when this property is not previously set.
- \sa SetCaptionFirstColour(), CaptionFirstColourUsed() */
- wxColour GetFirstColour() const {
- wxASSERT(_firstColourUsed);
- return _firstColour;
- };
-
- // ------- SecondColour -------
-
- /** Set second colour for the caption bar. If this is not set, the colour property is undefined and
- will not be used. Use SecondColourUsed() to check if this style is used */
- void SetSecondColour(const wxColour &col) {
- _secondColour = col;
- _secondColourUsed = true;
- };
-
- /** Checks if the second colour of the caption bar is set */
- bool SecondColourUsed() const {
- return _secondColourUsed;
- };
-
- /** Returns the second colour for the caption bar. Please be warned this will result in
- an assertion failure when this property is not previously set.
- \sa SetSecondColour(), SecondColourUsed() */
- wxColour GetSecondColour() const {
- wxASSERT(_secondColourUsed);
- return _secondColour;
- };
-
- // ------- Caption Text Colour -------
-
- /** Set caption colour for the caption bar. If this is not set, the colour property is
- undefined and will not be used. Use CaptionColourUsed() to check if this style is used */
- void SetCaptionColour(const wxColour &col) {
- _textColour = col;
- _textColourUsed = true;
- };
-
- /** Checks if the caption colour of the caption bar is set */
- bool CaptionColourUsed() const {
- return _textColourUsed;
- };
-
- /** Returns the caption colour for the caption bar. Please be warned this will
- result in an assertion failure when this property is not previously set.
- \sa SetCaptionColour(), CaptionColourUsed() */
- wxColour GetCaptionColour() const {
- wxASSERT(_textColourUsed);
- return _textColour;
- };
-
- // ------- CaptionStyle -------
-
- /** Set caption style for the caption bar. If this is not set, the property is
- undefined and will not be used. Use CaptionStyleUsed() to check if this style is used.
- The following styles can be applied:
- - wxCAPTIONBAR_GRADIENT_V: Draws a vertical gradient from top to bottom
- - wxCAPTIONBAR_GRADIENT_H: Draws a horizontal gradient from left to right
- - wxCAPTIONBAR_SINGLE: Draws a single filled rectangle to draw the caption
- - wxCAPTIONBAR_RECTANGLE: Draws a single colour with a rectangle around the caption
- - wxCAPTIONBAR_FILLED_RECTANGLE: Draws a filled rectangle and a border around it
- */
- void SetCaptionStyle(int style) {
- _captionStyle = style;
- _captionStyleUsed = true;
- };
-
- /** Checks if the caption style of the caption bar is set */
- bool CaptionStyleUsed() const {
- return _captionStyleUsed;
- };
-
- /** Returns the caption style for the caption bar. Please be warned this will
- result in an assertion failure when this property is not previously set.
- \sa SetCaptionStyle(), CaptionStyleUsed() */
- int GetCaptionStyle() const {
- wxASSERT(_captionStyleUsed);
- return _captionStyle;
- };
+ /** Default constructor for this class */
+ wxCaptionBarStyle() {
+ ResetDefaults();
+ };
+
+ ~wxCaptionBarStyle() {
+
+ };
+
+ void ResetDefaults() {
+ _firstColourUsed = false;
+ _secondColourUsed = false;
+ _textColourUsed = false;
+ _captionFontUsed = false;
+ _captionStyleUsed = false;
+ _captionStyle = wxCAPTIONBAR_GRADIENT_V;
+ };
+
+ /** Copy operator. Only the styles in use in the source object are being copied to the destination object. All other
+ styles are not copied */
+ void operator=(const wxCaptionBarStyle &s) {
+ if(s._captionStyleUsed)
+ {
+ _captionStyleUsed = true;
+ _captionStyle = s._captionStyle;
+ }
+ if(s._captionFontUsed)
+ {
+ _captionFontUsed = true;
+ _captionFont = s._captionFont;
+ }
+ if(s._firstColourUsed)
+ {
+ _firstColourUsed = true;
+ _firstColour = s._firstColour;
+ }
+ if(s._secondColourUsed)
+ {
+ _secondColourUsed = true;
+ _secondColour = s._secondColour;
+ }
+ if(s._textColourUsed)
+ {
+ _textColourUsed = true;
+ _textColour = s._textColour;
+ }
+ };
+
+ // ------- CaptionBar Font -------
+
+ /** Set font for the caption bar. If this is not set, the font property is undefined
+ and will not be used. Use CaptionFontUsed() to check if this style is used */
+ void SetCaptionFont(const wxFont &font) {
+ _captionFont = font;
+ _captionFontUsed = true;
+ };
+
+ /** Checks if the caption bar font is set */
+ bool CaptionFontUsed() const {
+ return _captionFontUsed;
+ };
+
+ /** Returns the font for the caption bar. Please be warned this will result in an assertion failure when
+ this property is not previously set
+ \sa SetCaptionFont(), CaptionFontUsed() */
+ wxFont GetCaptionFont() const {
+ wxASSERT(_captionFontUsed);
+ return _captionFont;
+ };
+
+ // ------- FirstColour -------
+
+ /** Set first colour for the caption bar. If this is not set, the colour property is
+ undefined and will not be used. Use FirstColourUsed() to check if this
+ style is used */
+ void SetFirstColour(const wxColour &col) {
+ _firstColour = col;
+ _firstColourUsed = true;
+ };
+
+ /** Checks if the first colour of the caption bar is set */
+ bool FirstColourUsed() const {
+ return _firstColourUsed;
+ };
+
+ /** Returns the first colour for the caption bar. Please be warned this will
+ result in an assertion failure when this property is not previously set.
+ \sa SetCaptionFirstColour(), CaptionFirstColourUsed() */
+ wxColour GetFirstColour() const {
+ wxASSERT(_firstColourUsed);
+ return _firstColour;
+ };
+
+ // ------- SecondColour -------
+
+ /** Set second colour for the caption bar. If this is not set, the colour property is undefined and
+ will not be used. Use SecondColourUsed() to check if this style is used */
+ void SetSecondColour(const wxColour &col) {
+ _secondColour = col;
+ _secondColourUsed = true;
+ };
+
+ /** Checks if the second colour of the caption bar is set */
+ bool SecondColourUsed() const {
+ return _secondColourUsed;
+ };
+
+ /** Returns the second colour for the caption bar. Please be warned this will result in
+ an assertion failure when this property is not previously set.
+ \sa SetSecondColour(), SecondColourUsed() */
+ wxColour GetSecondColour() const {
+ wxASSERT(_secondColourUsed);
+ return _secondColour;
+ };
+
+ // ------- Caption Text Colour -------
+
+ /** Set caption colour for the caption bar. If this is not set, the colour property is
+ undefined and will not be used. Use CaptionColourUsed() to check if this style is used */
+ void SetCaptionColour(const wxColour &col) {
+ _textColour = col;
+ _textColourUsed = true;
+ };
+
+ /** Checks if the caption colour of the caption bar is set */
+ bool CaptionColourUsed() const {
+ return _textColourUsed;
+ };
+
+ /** Returns the caption colour for the caption bar. Please be warned this will
+ result in an assertion failure when this property is not previously set.
+ \sa SetCaptionColour(), CaptionColourUsed() */
+ wxColour GetCaptionColour() const {
+ wxASSERT(_textColourUsed);
+ return _textColour;
+ };
+
+ // ------- CaptionStyle -------
+
+ /** Set caption style for the caption bar. If this is not set, the property is
+ undefined and will not be used. Use CaptionStyleUsed() to check if this style is used.
+ The following styles can be applied:
+ - wxCAPTIONBAR_GRADIENT_V: Draws a vertical gradient from top to bottom
+ - wxCAPTIONBAR_GRADIENT_H: Draws a horizontal gradient from left to right
+ - wxCAPTIONBAR_SINGLE: Draws a single filled rectangle to draw the caption
+ - wxCAPTIONBAR_RECTANGLE: Draws a single colour with a rectangle around the caption
+ - wxCAPTIONBAR_FILLED_RECTANGLE: Draws a filled rectangle and a border around it
+ */
+ void SetCaptionStyle(int style) {
+ _captionStyle = style;
+ _captionStyleUsed = true;
+ };
+
+ /** Checks if the caption style of the caption bar is set */
+ bool CaptionStyleUsed() const {
+ return _captionStyleUsed;
+ };
+
+ /** Returns the caption style for the caption bar. Please be warned this will
+ result in an assertion failure when this property is not previously set.
+ \sa SetCaptionStyle(), CaptionStyleUsed() */
+ int GetCaptionStyle() const {
+ wxASSERT(_captionStyleUsed);
+ return _captionStyle;
+ };