AuiTabContainer is a class which contains information about each tab. It also can render an entire tab control to a specified DC. It’s not a window class itself, because this code will be used by the AuiManager, where it is disadvantageous to have separate windows for each tab control in the case of “docked tabs”.
A derived class, AuiTabCtrl, is an actual wx.Window - derived window which can be used as a tab control in the normal sense.
__init__ | Default class constructor. |
AddButton | Adds a button in the tab area. |
AddPage | Adds a page to the tab control. |
ButtonHitTest | Tests if a button was hit. |
CloneButtons | Clones the tab area buttons when the AuiNotebook is being split. |
DoShowHide | This function shows the active window, then hides all of the other windows |
EnableTab | Enables/disables a tab in the AuiTabContainer. |
GetAGWFlags | Returns the tab art flags. |
GetActivePage | Returns the current selected tab or wx.NOT_FOUND if none is selected. |
GetArtProvider | Returns the current art provider being used. |
GetEnabled | Returns whether a tab is enabled or not. |
GetIdxFromWindow | Returns the tab index based on the window wnd associated with it. |
GetPage | Returns the page specified by the given index. |
GetPageCount | Returns the number of pages in the AuiTabContainer. |
GetPages | Returns a list of all the pages in this AuiTabContainer. |
GetTabOffset | Returns the tab offset. |
GetWindowFromIdx | Returns the window associated with the tab with index idx. |
InsertPage | Inserts a page in the tab control in the position specified by idx. |
IsTabVisible | Returns whether a tab is visible or not. |
MakeTabVisible | Make the tab visible if it wasn’t already. |
MinimizeTabOffset | Minimize self._tab_offset to fit as many tabs as possible in the available space. |
MovePage | Moves a page in a new position specified by new_idx. |
RemoveButton | Removes a button from the tab area. |
RemovePage | Removes a page from the tab control. |
Render | Renders the tab catalog to the specified wx.DC. |
SetAGWFlags | Sets the tab art flags. |
SetActivePage | Sets the AuiTabContainer active page. |
SetArtProvider | Instructs AuiTabContainer to use art provider specified by parameter art |
SetMeasuringFont | Sets the font for calculating text measurements. |
SetNoneActive | Sets all the tabs as inactive (non-selected). |
SetNormalFont | Sets the normal font for drawing tab labels. |
SetSelectedFont | Sets the selected tab font for drawing tab labels. |
SetTabOffset | Sets the tab offset. |
SetTabRect | Sets the tab area rectangle. |
TabHitTest | TabHitTest() tests if a tab was hit, passing the window pointer |
AuiTabContainer is a class which contains information about each tab. It also can render an entire tab control to a specified DC. It’s not a window class itself, because this code will be used by the AuiManager, where it is disadvantageous to have separate windows for each tab control in the case of “docked tabs”.
A derived class, AuiTabCtrl, is an actual wx.Window - derived window which can be used as a tab control in the normal sense.
Default class constructor. Used internally, do not call it in your code!
Parameters: | auiNotebook – the parent AuiNotebook window. |
---|
Adds a button in the tab area.
Parameters: |
|
---|
Adds a page to the tab control.
Parameters: |
|
---|
Tests if a button was hit.
Parameters: |
|
---|---|
Returns: | and instance of AuiTabContainerButton if a button was hit, None otherwise. |
Clones the tab area buttons when the AuiNotebook is being split.
See also
Note
Standard buttons for AuiNotebook are not cloned, only custom ones.
This function shows the active window, then hides all of the other windows (in that order).
Enables/disables a tab in the AuiTabContainer.
Parameters: |
|
---|
Returns the tab art flags.
See SetAGWFlags for a list of possible return values.
See also
Returns the tab index based on the window wnd associated with it.
Parameters: | wnd – an instance of wx.Window. |
---|
Returns the page specified by the given index.
Parameters: | idx – the tab index. |
---|
Returns the number of pages in the AuiTabContainer.
Returns a list of all the pages in this AuiTabContainer.
Returns the window associated with the tab with index idx.
Parameters: | idx – the tab index. |
---|
Inserts a page in the tab control in the position specified by idx.
Parameters: |
|
---|
Returns whether a tab is visible or not.
Parameters: |
---|
Make the tab visible if it wasn’t already.
Parameters: |
|
---|
Minimize self._tab_offset to fit as many tabs as possible in the available space.
Parameters: |
---|
Moves a page in a new position specified by new_idx.
Parameters: |
|
---|
Removes a button from the tab area.
Parameters: | id – the button identifier. See AddButton for a list of button identifiers. |
---|
See also
Removes a page from the tab control.
Parameters: | wnd – an instance of wx.Window, a window associated with this tab. |
---|
Renders the tab catalog to the specified wx.DC.
It is a virtual function and can be overridden to provide custom drawing capabilities.
Parameters: |
---|
Sets the tab art flags.
Parameters: | agwFlags – a combination of the following values:
|
---|
Todo
Implementation of flags AUI_NB_RIGHT and AUI_NB_LEFT.
Sets the AuiTabContainer active page.
Parameters: | wndOrInt – an instance of wx.Window or an integer specifying a tab index. |
---|
Instructs AuiTabContainer to use art provider specified by parameter art for all drawing calls. This allows plugable look-and-feel features.
Parameters: | art – an art provider. |
---|
Note
The previous art provider object, if any, will be deleted by AuiTabContainer.
Sets the font for calculating text measurements.
Parameters: | font – a wx.Font object. |
---|
Sets the normal font for drawing tab labels.
Parameters: | font – a wx.Font object. |
---|
Sets the selected tab font for drawing tab labels.
Parameters: | font – a wx.Font object. |
---|
Sets the tab area rectangle.
Parameters: | rect – an instance of wx.Rect, specifying the available area for AuiTabContainer. |
---|