A class to draw tabs using the Google Chrome browser style. It uses custom bitmap to render the tabs, so that the look and feel is as close as possible to the Chrome style.
wx.lib.agw.aui.tabart.AuiDefaultTabArt
Default class constructor. |
|
Clones the art object. |
|
Draws a single tab. |
|
Returns the tab size for the given caption, bitmap and button state. |
|
Sets the tab art flags. |
|
Assigns the tab custom bitmaps |
|
Sets the tab sizing information. |
ChromeTabArt
(AuiDefaultTabArt)¶A class to draw tabs using the Google Chrome browser style. It uses custom bitmap to render the tabs, so that the look and feel is as close as possible to the Chrome style.
__init__
(self)¶Default class constructor.
Clone
(self)¶Clones the art object.
DrawTab
(self, dc, wnd, page, in_rect, close_button_state, paint_control=False)¶Draws a single tab.
dc – a wx.DC
device context;
wnd – a wx.Window
instance object;
page – the tab control page associated with the tab;
in_rect (wx.Rect) – rectangle the tab should be confined to;
close_button_state (integer) – the state of the close button on the tab;
paint_control (bool) – whether to draw the control inside a tab (if any) on a MemoryDC
.
GetTabSize
(self, dc, wnd, caption, bitmap, active, close_button_state, control=None)¶Returns the tab size for the given caption, bitmap and button state.
dc – a wx.DC
device context;
wnd – a wx.Window
instance object;
caption (string) – the tab text caption;
bitmap (wx.Bitmap) – the bitmap displayed on the tab;
active (bool) – whether the tab is selected or not;
close_button_state (integer) – the state of the close button on the tab;
control (wx.Window) – a wx.Window
instance inside a tab (or None
).
SetAGWFlags
(self, agwFlags)¶Sets the tab art flags.
agwFlags (integer) – a combination of the following values:
Flag name |
Description |
---|---|
|
With this style, tabs are drawn along the top of the notebook |
|
With this style, tabs are drawn along the left of the notebook. Not implemented yet. |
|
With this style, tabs are drawn along the right of the notebook. Not implemented yet. |
|
With this style, tabs are drawn along the bottom of the notebook |
|
Allows the tab control to be split by dragging a tab |
|
Allows a tab to be moved horizontally by dragging |
|
Allows a tab to be moved to another tab control |
|
With this style, all tabs have the same width |
|
With this style, left and right scroll buttons are displayed |
|
With this style, a drop-down list of windows is available |
|
With this style, a close button is available on the tab bar |
|
With this style, a close button is available on the active tab |
|
With this style, a close button is available on all tabs |
|
Allows to close |
|
This style is used by |
|
Hides the tab window if only one tab is present |
|
Use Smart Tabbing, like |
|
Uses images on dropdown window list menu instead of check items |
|
Draws the tab close button on the left instead of on the right (a la Camino browser) |
|
Allows the floating of single tabs. Known limitation: when the notebook is more or less full screen, tabs cannot be dragged far enough outside of the notebook to become floating pages |
|
Draws an image representation of a tab while dragging (on by default) |
|
Tab navigation order by last access time for the tabs |
|
Don’t draw tab focus rectangle |
Note
Overridden from AuiDefaultTabArt
.
SetBitmaps
(self, mirror)¶Assigns the tab custom bitmaps
mirror (bool) – whether to vertically mirror the bitmap or not.
SetSizingInfo
(self, tab_ctrl_size, tab_count, minMaxTabWidth)¶Sets the tab sizing information.
tab_ctrl_size (wx.Size) – the size of the tab control area;
tab_count (integer) – the number of tabs;
minMaxTabWidth (tuple) – a tuple containing the minimum and maximum tab widths
to be used when the AUI_NB_TAB_FIXED_WIDTH
style is active.