AGW Logo

agw_title 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 plugable 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 SetArtProvider to make use this new dock art.

Metric Ordinals

These are the possible pane dock art settings for AuiManager:


Metric Ordinal Constant Description
AUI_DOCKART_SASH_SIZE Customizes the sash size
AUI_DOCKART_CAPTION_SIZE Customizes the caption size
AUI_DOCKART_GRIPPER_SIZE Customizes the gripper size
AUI_DOCKART_PANE_BORDER_SIZE Customizes the pane border size
AUI_DOCKART_PANE_BUTTON_SIZE Customizes the pane button size
AUI_DOCKART_BACKGROUND_COLOUR Customizes the background colour
AUI_DOCKART_BACKGROUND_GRADIENT_COLOUR Customizes the background gradient colour
AUI_DOCKART_SASH_COLOUR Customizes the sash colour
AUI_DOCKART_ACTIVE_CAPTION_COLOUR Customizes the active caption colour
AUI_DOCKART_ACTIVE_CAPTION_GRADIENT_COLOUR Customizes the active caption gradient colour
AUI_DOCKART_INACTIVE_CAPTION_COLOUR Customizes the inactive caption colour
AUI_DOCKART_INACTIVE_CAPTION_GRADIENT_COLOUR Customizes the inactive gradient caption colour
AUI_DOCKART_ACTIVE_CAPTION_TEXT_COLOUR Customizes the active caption text colour
AUI_DOCKART_INACTIVE_CAPTION_TEXT_COLOUR Customizes the inactive caption text colour
AUI_DOCKART_BORDER_COLOUR Customizes the border colour
AUI_DOCKART_GRIPPER_COLOUR Customizes the gripper colour
AUI_DOCKART_CAPTION_FONT Customizes the caption font
AUI_DOCKART_GRADIENT_TYPE Customizes the gradient type (no gradient, vertical or horizontal)
AUI_DOCKART_DRAW_SASH_GRIP Draw a sash grip on the sash

Gradient Types

These are the possible gradient dock art settings for AuiManager:


Gradient Constant Description
AUI_GRADIENT_NONE No gradient on the captions
AUI_GRADIENT_VERTICAL Vertical gradient on the captions
AUI_GRADIENT_HORIZONTAL Horizontal gradient on the captions

Button States

These are the possible pane button / AuiNotebook button / AuiToolBar button states:


Button State Constant Description
AUI_BUTTON_STATE_NORMAL Normal button state
AUI_BUTTON_STATE_HOVER Hovered button state
AUI_BUTTON_STATE_PRESSED Pressed button state
AUI_BUTTON_STATE_DISABLED Disabled button state
AUI_BUTTON_STATE_HIDDEN Hidden button state
AUI_BUTTON_STATE_CHECKED Checked button state

Button Identifiers

These are the possible pane button / AuiNotebook button / AuiToolBar button identifiers:


Button Identifier Description
AUI_BUTTON_CLOSE Shows a close button on the pane
AUI_BUTTON_MAXIMIZE_RESTORE Shows a maximize/restore button on the pane
AUI_BUTTON_MINIMIZE Shows a minimize button on the pane
AUI_BUTTON_PIN Shows a pin button on the pane
AUI_BUTTON_OPTIONS Shows an option button on the pane (not implemented)
AUI_BUTTON_WINDOWLIST Shows a window list button on the pane (for AuiNotebook)
AUI_BUTTON_LEFT Shows a left button on the pane (for AuiNotebook)
AUI_BUTTON_RIGHT Shows a right button on the pane (for AuiNotebook)
AUI_BUTTON_UP Shows an up button on the pane (not implemented)
AUI_BUTTON_DOWN Shows a down button on the pane (not implemented)
AUI_BUTTON_CUSTOM1 Shows a custom button on the pane (not implemented)
AUI_BUTTON_CUSTOM2 Shows a custom button on the pane (not implemented)
AUI_BUTTON_CUSTOM3 Shows a custom button on the pane (not implemented)

hierarchy Inheritance Diagram

Inheritance diagram for: AuiDefaultDockArt

Inheritance diagram of AuiDefaultDockArt


subclasses Known Subclasses


method_summary Methods Summary

__init__Default class constructor.
DrawBackgroundDraws a background.
DrawBorderDraws the pane border.
DrawCaptionDraws the text in the pane caption.
DrawCaptionBackgroundDraws the text caption background in the pane.
DrawGripperDraws a gripper on the pane.
DrawIconDraws the icon in the pane caption area.
DrawPaneButtonDraws a pane button in the pane caption area.
DrawSashDraws a sash between two windows.
DrawSashGripperDraws a sash gripper on a sash between two windows.
GetColorGets the colour of a certain setting.
GetColourGets the colour of a certain setting.
GetFontGets a font setting.
GetMetricGets the value of a certain setting.
InitInitializes the dock art.
RequestUserAttentionRequests the user attention by intermittently highlighting the pane caption.
SetColorSets the colour of a certain setting.
SetColourSets the colour of a certain setting.
SetCustomPaneBitmapSets a custom button bitmap for the pane button.
SetDefaultColoursSets the default colours, which are calculated from the given base colour.
SetDefaultPaneBitmapsAssigns the default pane bitmaps.
SetFontSets a font setting.
SetMetricSets the value of a certain setting using new_val

API Class API

class AuiDefaultDockArt(object)[source]

Dock art provider code - a dock provider provides all drawing functionality to the AUI dock manager. This allows the dock manager to have a plugable 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 AuiManager:


Metric Ordinal Constant Description
AUI_DOCKART_SASH_SIZE Customizes the sash size
AUI_DOCKART_CAPTION_SIZE Customizes the caption size
AUI_DOCKART_GRIPPER_SIZE Customizes the gripper size
AUI_DOCKART_PANE_BORDER_SIZE Customizes the pane border size
AUI_DOCKART_PANE_BUTTON_SIZE Customizes the pane button size
AUI_DOCKART_BACKGROUND_COLOUR Customizes the background colour
AUI_DOCKART_BACKGROUND_GRADIENT_COLOUR Customizes the background gradient colour
AUI_DOCKART_SASH_COLOUR Customizes the sash colour
AUI_DOCKART_ACTIVE_CAPTION_COLOUR Customizes the active caption colour
AUI_DOCKART_ACTIVE_CAPTION_GRADIENT_COLOUR Customizes the active caption gradient colour
AUI_DOCKART_INACTIVE_CAPTION_COLOUR Customizes the inactive caption colour
AUI_DOCKART_INACTIVE_CAPTION_GRADIENT_COLOUR Customizes the inactive gradient caption colour
AUI_DOCKART_ACTIVE_CAPTION_TEXT_COLOUR Customizes the active caption text colour
AUI_DOCKART_INACTIVE_CAPTION_TEXT_COLOUR Customizes the inactive caption text colour
AUI_DOCKART_BORDER_COLOUR Customizes the border colour
AUI_DOCKART_GRIPPER_COLOUR Customizes the gripper colour
AUI_DOCKART_CAPTION_FONT Customizes the caption font
AUI_DOCKART_GRADIENT_TYPE Customizes the gradient type (no gradient, vertical or horizontal)
AUI_DOCKART_DRAW_SASH_GRIP Draw a sash grip on the sash

Gradient Types

These are the possible gradient dock art settings for AuiManager:


Gradient Constant Description
AUI_GRADIENT_NONE No gradient on the captions
AUI_GRADIENT_VERTICAL Vertical gradient on the captions
AUI_GRADIENT_HORIZONTAL Horizontal gradient on the captions

Button States

These are the possible pane button / AuiNotebook button / AuiToolBar button states:


Button State Constant Description
AUI_BUTTON_STATE_NORMAL Normal button state
AUI_BUTTON_STATE_HOVER Hovered button state
AUI_BUTTON_STATE_PRESSED Pressed button state
AUI_BUTTON_STATE_DISABLED Disabled button state
AUI_BUTTON_STATE_HIDDEN Hidden button state
AUI_BUTTON_STATE_CHECKED Checked button state

Button Identifiers

These are the possible pane button / AuiNotebook button / AuiToolBar button identifiers:


Button Identifier Description
AUI_BUTTON_CLOSE Shows a close button on the pane
AUI_BUTTON_MAXIMIZE_RESTORE Shows a maximize/restore button on the pane
AUI_BUTTON_MINIMIZE Shows a minimize button on the pane
AUI_BUTTON_PIN Shows a pin button on the pane
AUI_BUTTON_OPTIONS Shows an option button on the pane (not implemented)
AUI_BUTTON_WINDOWLIST Shows a window list button on the pane (for AuiNotebook)
AUI_BUTTON_LEFT Shows a left button on the pane (for AuiNotebook)
AUI_BUTTON_RIGHT Shows a right button on the pane (for AuiNotebook)
AUI_BUTTON_UP Shows an up button on the pane (not implemented)
AUI_BUTTON_DOWN Shows a down button on the pane (not implemented)
AUI_BUTTON_CUSTOM1 Shows a custom button on the pane (not implemented)
AUI_BUTTON_CUSTOM2 Shows a custom button on the pane (not implemented)
AUI_BUTTON_CUSTOM3 Shows a custom button on the pane (not implemented)


__init__()[source]

Default class constructor.



DrawBackground(dc, window, orient, rect)[source]

Draws a background.

Parameters:
  • dc – a wx.DC device context;
  • window – an instance of wx.Window;
  • orient – the gradient (if any) orientation;
  • rect – the background rectangle.


DrawBorder(dc, window, rect, pane)[source]

Draws the pane border.

Parameters:
  • dc – a wx.DC device context;

  • window – an instance of wx.Window;

  • rect – the border rectangle;
  • pane – the pane for which the border is drawn.


DrawCaption(dc, window, text, rect, pane)[source]

Draws the text in the pane caption.

Parameters:
  • dc – a wx.DC device context;

  • window – an instance of wx.Window;

  • text – the text to be displayed;
  • rect – the pane caption rectangle;
  • pane – the pane for which the text is drawn.


DrawCaptionBackground(dc, rect, pane)[source]

Draws the text caption background in the pane.

Parameters:
  • dc – a wx.DC device context;

  • rect – the text caption rectangle;
  • pane – the pane for which the text background is drawn.


DrawGripper(dc, window, rect, pane)[source]

Draws a gripper on the pane.

Parameters:
  • dc – a wx.DC device context;

  • window – an instance of wx.Window;

  • rect – the pane caption rectangle;
  • pane – the pane for which the gripper is drawn.


DrawIcon(dc, rect, pane)[source]

Draws the icon in the pane caption area.

Parameters:
  • dc – a wx.DC device context;

  • rect – the pane caption rectangle;
  • pane – the pane for which the icon is drawn.


DrawPaneButton(dc, window, button, button_state, _rect, pane)[source]

Draws a pane button in the pane caption area.

Parameters:
  • dc – a wx.DC device context;

  • window – an instance of wx.Window;

  • button – the button to be drawn;
  • button_state – the pane button state;
  • _rect – the pane caption rectangle;
  • pane – the pane for which the button is drawn.


DrawSash(dc, window, orient, rect)[source]

Draws a sash between two windows.

Parameters:
  • dc – a wx.DC device context;

  • window – an instance of wx.Window;

  • orient – the sash orientation;
  • rect – the sash rectangle.


DrawSashGripper(dc, orient, rect)[source]

Draws a sash gripper on a sash between two windows.

Parameters:
  • dc – a wx.DC device context;

  • orient – the sash orientation;
  • rect – the sash rectangle.


GetColor(id)[source]

Gets the colour of a certain setting.

Parameters:id – can be one of the colour values in Metric Ordinals.


GetColour(id)

Gets the colour of a certain setting.

Parameters:id – can be one of the colour values in Metric Ordinals.


GetFont(id)[source]

Gets a font setting.

Parameters:id – must be AUI_DOCKART_CAPTION_FONT, otherwise wx.NullFont is returned.


GetMetric(id)[source]

Gets the value of a certain setting.

Parameters:id – can be one of the size values in Metric Ordinals.


Init()[source]

Initializes the dock art.



RequestUserAttention(dc, window, text, rect, pane)[source]

Requests the user attention by intermittently highlighting the pane caption.

Parameters:
  • dc – a wx.DC device context;

  • window – an instance of wx.Window;

  • text – the text to be displayed;
  • rect – the pane caption rectangle;
  • pane – the pane for which the text is drawn.


SetColor(id, colour)[source]

Sets the colour of a certain setting.

Parameters:
  • id – can be one of the colour values in Metric Ordinals;
  • colour – the new value of the setting.


SetColour(id, colour)

Sets the colour of a certain setting.

Parameters:
  • id – can be one of the colour values in Metric Ordinals;
  • colour – the new value of the setting.


SetCustomPaneBitmap(bmp, button, active, maximize=False)[source]

Sets a custom button bitmap for the pane button.

Parameters:
  • bmp – the actual bitmap to set;
  • button – the button identifier;
  • active – whether it is the bitmap for the active button or not;
  • maximize – used to distinguish between the maximize and restore bitmaps.


SetDefaultColours(base_colour=None)[source]

Sets the default colours, which are calculated from the given base colour.

Parameters:base_colour – an instance of wx.Colour. If defaulted to None, a colour is generated accordingly to the platform and theme.


SetDefaultPaneBitmaps(isMac)[source]

Assigns the default pane bitmaps.

Parameters:isMac – whether we are on wxMAC or not.


SetFont(id, font)[source]

Sets a font setting.

Parameters:
  • id – must be AUI_DOCKART_CAPTION_FONT;
  • font – an instance of wx.Font.


SetMetric(id, new_val)[source]

Sets the value of a certain setting using new_val

Parameters:
  • id – can be one of the size values in Metric Ordinals;
  • new_val – the new value of the setting.
Tree

Table Of Contents

Previous topic

aui.dockart

Next topic

ModernDockArt