AGW Logo

agw_title CaptionBarStyle

This class encapsulates the styles you wish to set for the CaptionBar (this is the part of the FoldPanel where the caption is displayed). It can either be applied at creation time be reapplied when styles need to be changed.

At construction time, all styles are set to their default transparency. This means none of the styles will be applied to the CaptionBar in question, meaning it will be created using the default internals. When setting i.e the colour, font or panel style, these styles become active to be used.

hierarchy Inheritance Diagram

Inheritance diagram for: CaptionBarStyle

Inheritance diagram of CaptionBarStyle


method_summary Methods Summary

__init__Default constructor for this class.
CaptionColourUsedChecks if the caption colour of the caption bar is set.
CaptionFontUsedChecks if the caption bar font is set.
CaptionStyleUsedChecks if the caption style of the caption bar is set.
FirstColourUsedChecks if the first colour of the caption bar is set.
GetCaptionColourReturns the caption colour for the caption bar.
GetCaptionFontReturns the font for the caption bar.
GetCaptionStyleReturns the caption style for the caption bar.
GetFirstColourReturns the first colour for the caption bar.
GetSecondColourReturns the second colour for the caption bar.
ResetDefaultsResets default CaptionBarStyle.
SecondColourUsedChecks if the second colour of the caption bar is set.
SetCaptionColourSets caption colour for the caption bar.
SetCaptionFontSets font for the caption bar.
SetCaptionStyleSets caption style for the caption bar.
SetFirstColourSets first colour for the caption bar.
SetSecondColourSets second colour for the caption bar.

API Class API

class CaptionBarStyle(object)[source]

This class encapsulates the styles you wish to set for the CaptionBar (this is the part of the FoldPanel where the caption is displayed). It can either be applied at creation time be reapplied when styles need to be changed.

At construction time, all styles are set to their default transparency. This means none of the styles will be applied to the CaptionBar in question, meaning it will be created using the default internals. When setting i.e the colour, font or panel style, these styles become active to be used.



__init__()[source]

Default constructor for this class.



CaptionColourUsed()[source]

Checks if the caption colour of the caption bar is set.



CaptionFontUsed()[source]

Checks if the caption bar font is set.



CaptionStyleUsed()[source]

Checks if the caption style of the caption bar is set.



FirstColourUsed()[source]

Checks if the first colour of the caption bar is set.



GetCaptionColour()[source]

Returns the caption colour for the caption bar.

Note

Please be warned this will result in an assertion failure when this property is not previously set.



GetCaptionFont()[source]

Returns the font for the caption bar.

Note

Please be warned this will result in an assertion failure when this property is not previously set.



GetCaptionStyle()[source]

Returns the caption style for the caption bar.

Note

Please be warned this will result in an assertion failure when this property is not previously set.



GetFirstColour()[source]

Returns the first colour for the caption bar.

Note

Please be warned this will result in an assertion failure when this property is not previously set.



GetSecondColour()[source]

Returns the second colour for the caption bar.

Note

Please be warned this will result in an assertion failure when this property is not previously set.



ResetDefaults()[source]

Resets default CaptionBarStyle.



SecondColourUsed()[source]

Checks if the second colour of the caption bar is set.



SetCaptionColour(colour)[source]

Sets caption colour for the caption bar.

Parameters:colour – a valid wx.Colour object.

Note

If this is not set, the colour property is undefined and will not be used. Use CaptionColourUsed to check if this style is used.



SetCaptionFont(font)[source]

Sets font for the caption bar.

Parameters:font – a valid wx.Font object.

Note

If this is not set, the font property is undefined and will not be used. Use CaptionFontUsed to check if this style is used.



SetCaptionStyle(style)[source]

Sets caption style for the caption bar.

Parameters:style – can be one of the following bits:


Caption Style Value Description
CAPTIONBAR_GRADIENT_V 1 Draws a vertical gradient from top to bottom
CAPTIONBAR_GRADIENT_H 2 Draws a horizontal gradient from left to right
CAPTIONBAR_SINGLE 3 Draws a single filled rectangle to draw the caption
CAPTIONBAR_RECTANGLE 4 Draws a single colour with a rectangle around the caption
CAPTIONBAR_FILLED_RECTANGLE 5 Draws a filled rectangle and a border around it

Note

If this is not set, the property is undefined and will not be used. Use CaptionStyleUsed to check if this style is used.



SetFirstColour(colour)[source]

Sets first colour for the caption bar.

Parameters:colour – a valid wx.Colour object.

Note

If this is not set, the colour property is undefined and will not be used. Use FirstColourUsed to check if this style is used.



SetSecondColour(colour)[source]

Sets second colour for the caption bar.

Parameters:colour – a valid wx.Colour object.

Note

If this is not set, the colour property is undefined and will not be used. Use SecondColourUsed to check if this style is used.

Tree

Table Of Contents

Previous topic

CaptionBarEvent

Next topic

FoldPanelBar