wx.lib.agw.aui.dockart.AuiDefaultDockArt¶
Dock art provider code - a dock provider provides all drawing functionality to the AUI dock manager. This allows the dock manager to have a pluggable look-and-feel.
By default, a AuiManager uses an instance of this class called
AuiDefaultDockArt which provides bitmap art and a colour scheme that is adapted to the major
platforms’ look. You can either derive from that class to alter its behaviour or
write a completely new dock art class.
Call AuiManager.SetArtProvider()
to make use this new dock art.
Metric Ordinals
These are the possible pane dock art settings for AuiDefaultDockArt:
Metric Ordinal Constant |
Description |
|---|---|
|
Customizes the sash size |
|
Customizes the caption size |
|
Customizes the gripper size |
|
Customizes the pane border size |
|
Customizes the pane button size |
|
Customizes the background colour |
|
Customizes the background gradient colour |
|
Customizes the sash colour |
|
Customizes the active caption colour |
|
Customizes the active caption gradient colour |
|
Customizes the inactive caption colour |
|
Customizes the inactive gradient caption colour |
|
Customizes the active caption text colour |
|
Customizes the inactive caption text colour |
|
Customizes the border colour |
|
Customizes the gripper colour |
|
Customizes the caption font |
|
Customizes the gradient type (no gradient, vertical or horizontal) |
|
Draw a sash grip on the sash |
|
Customizes the hint window background colour (currently light blue) |
|
Customizes the hint window border background colour (currently grey) |
Gradient Types
These are the possible gradient dock art settings for AuiDefaultDockArt:
Gradient Constant |
Description |
|---|---|
|
No gradient on the captions |
|
Vertical gradient on the captions |
|
Horizontal gradient on the captions |
Button States
These are the possible pane button / AuiNotebook button /
AuiToolBar button states:
Button State Constant |
Description |
|---|---|
|
Normal button state |
|
Hovered button state |
|
Pressed button state |
|
Disabled button state |
|
Hidden button state |
|
Checked button state |
Button Identifiers
These are the possible pane button / AuiNotebook button /
AuiToolBar button identifiers:
Button Identifier |
Description |
|---|---|
|
Shows a close button on the pane |
|
Shows a maximize/restore button on the pane |
|
Shows a minimize button on the pane |
|
Shows a pin button on the pane |
|
Shows an option button on the pane (not implemented) |
|
Shows a window list button on the pane (for |
|
Shows a left button on the pane (for |
|
Shows a right button on the pane (for |
|
Shows an up button on the pane (not implemented) |
|
Shows a down button on the pane (not implemented) |
|
Shows a custom button on the pane (not implemented) |
|
Shows a custom button on the pane (not implemented) |
|
Shows a custom button on the pane (not implemented) |
Class Hierarchy¶
Known Subclasses¶
wx.lib.agw.aui.dockart.ModernDockArt
Methods Summary¶
Default class constructor. |
|
Draws a background. |
|
Draws the pane border. |
|
Draws the text in the pane caption. |
|
Draws the text caption background in the pane. |
|
Draws a gripper on the pane. |
|
Draws the icon in the pane caption area. |
|
Draws a pane button in the pane caption area. |
|
Draws a sash between two windows. |
|
Draws a sash gripper on a sash between two windows. |
|
Gets the colour of a certain setting. |
|
Gets a font setting. |
|
Gets the value of a certain setting. |
|
Initializes the dock art. |
|
Requests the user attention by intermittently highlighting the pane caption. |
|
Sets the colour of a certain setting. |
|
Sets a custom button bitmap for the pane button. |
|
Sets the default colours, which are calculated from the given base colour. |
|
Assigns the default pane bitmaps. |
|
Sets a font setting. |
|
Sets the value of a certain setting using new_val |
Class API¶
- class AuiDefaultDockArt(object)¶
Dock art provider code - a dock provider provides all drawing functionality to the AUI dock manager. This allows the dock manager to have a pluggable look-and-feel.
By default, a
AuiManageruses an instance of this class calledAuiDefaultDockArtwhich provides bitmap art and a colour scheme that is adapted to the major platforms’ look. You can either derive from that class to alter its behaviour or write a completely new dock art class.Call
AuiManager.SetArtProvider()to make use this new dock art.Metric Ordinals
These are the possible pane dock art settings for
AuiDefaultDockArt:Metric Ordinal Constant
Description
AUI_DOCKART_SASH_SIZECustomizes the sash size
AUI_DOCKART_CAPTION_SIZECustomizes the caption size
AUI_DOCKART_GRIPPER_SIZECustomizes the gripper size
AUI_DOCKART_PANE_BORDER_SIZECustomizes the pane border size
AUI_DOCKART_PANE_BUTTON_SIZECustomizes the pane button size
AUI_DOCKART_BACKGROUND_COLOURCustomizes the background colour
AUI_DOCKART_BACKGROUND_GRADIENT_COLOURCustomizes the background gradient colour
AUI_DOCKART_SASH_COLOURCustomizes the sash colour
AUI_DOCKART_ACTIVE_CAPTION_COLOURCustomizes the active caption colour
AUI_DOCKART_ACTIVE_CAPTION_GRADIENT_COLOURCustomizes the active caption gradient colour
AUI_DOCKART_INACTIVE_CAPTION_COLOURCustomizes the inactive caption colour
AUI_DOCKART_INACTIVE_CAPTION_GRADIENT_COLOURCustomizes the inactive gradient caption colour
AUI_DOCKART_ACTIVE_CAPTION_TEXT_COLOURCustomizes the active caption text colour
AUI_DOCKART_INACTIVE_CAPTION_TEXT_COLOURCustomizes the inactive caption text colour
AUI_DOCKART_BORDER_COLOURCustomizes the border colour
AUI_DOCKART_GRIPPER_COLOURCustomizes the gripper colour
AUI_DOCKART_CAPTION_FONTCustomizes the caption font
AUI_DOCKART_GRADIENT_TYPECustomizes the gradient type (no gradient, vertical or horizontal)
AUI_DOCKART_DRAW_SASH_GRIPDraw a sash grip on the sash
AUI_DOCKART_HINT_WINDOW_COLOURCustomizes the hint window background colour (currently light blue)
AUI_DOCKART_HINT_WINDOW_BORDER_COLOURCustomizes the hint window border background colour (currently grey)
Gradient Types
These are the possible gradient dock art settings for
AuiDefaultDockArt:Gradient Constant
Description
AUI_GRADIENT_NONENo gradient on the captions
AUI_GRADIENT_VERTICALVertical gradient on the captions
AUI_GRADIENT_HORIZONTALHorizontal gradient on the captions
Button States
These are the possible pane button /
AuiNotebookbutton /AuiToolBarbutton states:Button State Constant
Description
AUI_BUTTON_STATE_NORMALNormal button state
AUI_BUTTON_STATE_HOVERHovered button state
AUI_BUTTON_STATE_PRESSEDPressed button state
AUI_BUTTON_STATE_DISABLEDDisabled button state
AUI_BUTTON_STATE_HIDDENHidden button state
AUI_BUTTON_STATE_CHECKEDChecked button state
Button Identifiers
These are the possible pane button /
AuiNotebookbutton /AuiToolBarbutton identifiers:Button Identifier
Description
AUI_BUTTON_CLOSEShows a close button on the pane
AUI_BUTTON_MAXIMIZE_RESTOREShows a maximize/restore button on the pane
AUI_BUTTON_MINIMIZEShows a minimize button on the pane
AUI_BUTTON_PINShows a pin button on the pane
AUI_BUTTON_OPTIONSShows an option button on the pane (not implemented)
AUI_BUTTON_WINDOWLISTShows a window list button on the pane (for
AuiNotebook)AUI_BUTTON_LEFTShows a left button on the pane (for
AuiNotebook)AUI_BUTTON_RIGHTShows a right button on the pane (for
AuiNotebook)AUI_BUTTON_UPShows an up button on the pane (not implemented)
AUI_BUTTON_DOWNShows a down button on the pane (not implemented)
AUI_BUTTON_CUSTOM1Shows a custom button on the pane (not implemented)
AUI_BUTTON_CUSTOM2Shows a custom button on the pane (not implemented)
AUI_BUTTON_CUSTOM3Shows a custom button on the pane (not implemented)
Methods¶
- __init__(self)¶
Default class constructor.
- DrawBackground(self, dc, window, orient, rect)¶
Draws a background.
- DrawBorder(self, dc, window, rect, pane)¶
Draws the pane border.
- DrawCaption(self, dc, window, text, rect, pane)¶
Draws the text in the pane caption.
- DrawCaptionBackground(self, dc, rect, pane)¶
Draws the text caption background in the pane.
- DrawGripper(self, dc, window, rect, pane)¶
Draws a gripper on the pane.
- DrawIcon(self, dc, rect, pane)¶
Draws the icon in the pane caption area.
- DrawPaneButton(self, dc, window, button, button_state, _rect, pane)¶
Draws a pane button in the pane caption area.
- DrawSash(self, dc, window, orient, rect)¶
Draws a sash between two windows.
- DrawSashGripper(self, dc, orient, rect)¶
Draws a sash gripper on a sash between two windows.
- GetColor(self, id)¶
Gets the colour of a certain setting.
- Parameters:
id (integer) – can be one of the colour values in Metric Ordinals.
- GetFont(self, id)¶
Gets a font setting.
- Parameters:
id (integer) – must be
AUI_DOCKART_CAPTION_FONT, otherwiseNullFontis returned.
- GetMetric(self, id)¶
Gets the value of a certain setting.
- Parameters:
id (integer) – can be one of the size values in Metric Ordinals.
- Init(self)¶
Initializes the dock art.
- RequestUserAttention(self, dc, window, text, rect, pane)¶
Requests the user attention by intermittently highlighting the pane caption.
- SetColor(self, id, colour)¶
Sets the colour of a certain setting.
- Parameters:
id (integer) – can be one of the colour values in Metric Ordinals;
colour (
wx.Colouror tuple or integer) – the new value of the setting.
- SetCustomPaneBitmap(self, bmp, button, active, maximize=False)¶
Sets a custom button bitmap for the pane button.
- Parameters:
bmp (wx.Bitmap) – the actual bitmap to set;
button (integer) – the button identifier;
active (bool) – whether it is the bitmap for the active button or not;
maximize (bool) – used to distinguish between the maximize and restore bitmaps.
- SetDefaultColours(self, base_colour=None)¶
Sets the default colours, which are calculated from the given base colour.
- Parameters:
base_colour – an instance of
wx.Colour. If defaulted toNone, a colour is generated accordingly to the platform and theme.
- SetDefaultPaneBitmaps(self, isMac)¶
Assigns the default pane bitmaps.
- Parameters:
isMac (bool) – whether we are on wxMAC or not.
- SetFont(self, id, font)¶
Sets a font setting.
- Parameters:
id (integer) – must be
AUI_DOCKART_CAPTION_FONT;font – an instance of
wx.Font.
- SetMetric(self, id, new_val)¶
Sets the value of a certain setting using new_val
- Parameters:
id (integer) – can be one of the size values in Metric Ordinals;
new_val – the new value of the setting.