Inheritance diagram for AuiNotebook:
AuiNotebook is a notebook control which implements many features common in applications with dockable panes. Specifically, AuiNotebook implements functionality which allows the user to rearrange tab order via drag-and-drop, split the tab window into many different splitter configurations, and toggle through different themes to customize the control’s look and feel.
An effort has been made to try to maintain an API as similar to that of wx.Notebook.
The default theme that is used is AuiDefaultTabArt, which provides a modern, glossy look and feel. The theme can be changed by calling AuiNotebook.SetArtProvider.
Bases: wx._controls.PyControl
AuiNotebook is a notebook control which implements many features common in applications with dockable panes. Specifically, AuiNotebook implements functionality which allows the user to rearrange tab order via drag-and-drop, split the tab window into many different splitter configurations, and toggle through different themes to customize the control’s look and feel.
An effort has been made to try to maintain an API as similar to that of wx.Notebook.
The default theme that is used is AuiDefaultTabArt, which provides a modern, glossy look and feel. The theme can be changed by calling AuiNotebook.SetArtProvider.
Default class constructor.
Parameters: |
|
---|
Flag name | Description |
---|---|
AUI_NB_TOP | With this style, tabs are drawn along the top of the notebook |
AUI_NB_LEFT | With this style, tabs are drawn along the left of the notebook. Not implemented yet. |
AUI_NB_RIGHT | With this style, tabs are drawn along the right of the notebook. Not implemented yet. |
AUI_NB_BOTTOM | With this style, tabs are drawn along the bottom of the notebook. Not implemented for the Chrome tab art. |
AUI_NB_TAB_SPLIT | Allows the tab control to be split by dragging a tab |
AUI_NB_TAB_MOVE | Allows a tab to be moved horizontally by dragging |
AUI_NB_TAB_EXTERNAL_MOVE | Allows a tab to be moved to another tab control |
AUI_NB_TAB_FIXED_WIDTH | With this style, all tabs have the same width |
AUI_NB_SCROLL_BUTTONS | With this style, left and right scroll buttons are displayed |
AUI_NB_WINDOWLIST_BUTTON | With this style, a drop-down list of windows is available |
AUI_NB_CLOSE_BUTTON | With this style, a close button is available on the tab bar |
AUI_NB_CLOSE_ON_ACTIVE_TAB | With this style, a close button is available on the active tab |
AUI_NB_CLOSE_ON_ALL_TABS | With this style, a close button is available on all tabs |
AUI_NB_MIDDLE_CLICK_CLOSE | Allows to close AuiNotebook tabs by mouse middle button click |
AUI_NB_SUB_NOTEBOOK | This style is used by AuiManager to create automatic AuiNotebooks |
AUI_NB_HIDE_ON_SINGLE_TAB | Hides the tab window if only one tab is present |
AUI_NB_SMART_TABS | Use Smart Tabbing, like Alt+Tab on Windows |
AUI_NB_USE_IMAGES_DROPDOWN | Uses images on dropdown window list menu instead of check items |
Default value for style is: AUI_NB_DEFAULT_STYLE = AUI_NB_TOP |
AUI_NB_TAB_SPLIT | AUI_NB_TAB_MOVE | AUI_NB_SCROLL_BUTTONS | AUI_NB_CLOSE_ON_ACTIVE_TAB | AUI_NB_MIDDLE_CLICK_CLOSE
Adds a page. If the select parameter is True, calling this will generate a page change event.
Parameters: |
|
---|
Cycles through the tabs. The call to this function generates the page changing events.
Parameter: | forward – whether to advance forward or backward. |
---|
Deletes a page at the given index. Calling this method will generate a page change event.
Parameter: | page_idx – the page index to be deleted. |
---|
@note: DeletePage() removes a tab from the multi-notebook, and destroys the window as well.
Enables/disables a page in the notebook.
Parameters: |
|
---|
Ensures the input page index indx is visible.
Parameter: | indx – the page index. |
---|
FindTab() finds the tab control that currently contains the window as well as the index of the window in the tab control. It returns True if the window was found, otherwise False.
Parameter: | page – an instance of L{AuiNotebookPage}. |
---|
Returns whether the page specified by the index page_idx is enabled.
Parameter: | page_idx – the page index. |
---|
Gets the height of the notebook for a given page height.
Parameter: | pageHeight – the given page height. |
---|
Returns the page specified by the given index.
Parameter: | page_idx – the page index. |
---|
Returns the tab bitmap for the page.
Parameter: | page_idx – the page index. |
---|
Returns the tab label for the page.
Parameter: | page_idx – the page index. |
---|
Returns the tab text colour for the page.
Parameter: | page_idx – the page index. |
---|
Returns the tab control at the specified point.
Parameter: | pt – a wx.Point object. |
---|
Returns the tab frame associated with a tab control.
Parameter: | tab_ctrl – an instance of L{AuiTabCtrl}. |
---|
InitNotebook() contains common initialization code called by all constructors.
Parameter: | style – the notebook style. See L{__init__} for more details. |
---|
This is similar to L{AddPage}, but allows the ability to specify the insert location.
Parameters: |
|
---|
Handles the wx.EVT_CHILD_FOCUS event for L{AuiNotebook}.
Parameter: | event – a L{wx.ChildFocusEvent} event to be processed. |
---|
Handles the wx.EVT_NAVIGATION_KEY event for L{AuiNotebook}.
Parameter: | event – a L{wx.NavigationKeyEvent} event to be processed. |
---|
Handles the wx.EVT_SIZE event for L{AuiNotebook}.
Parameter: | event – a L{wx.SizeEvent} event to be processed. |
---|
Handles the EVT_AUINOTEBOOK_BEGIN_DRAG event for L{AuiNotebook}.
Parameter: | event – a L{wx.EVT_AUINOTEBOOK_BEGIN_DRAG} event to be processed. |
---|
Handles the EVT_AUINOTEBOOK_BG_DCLICK event for L{AuiNotebook}.
Parameter: | event – a L{wx.EVT_AUINOTEBOOK_BG_DCLICK} event to be processed. |
---|
Handles the EVT_AUINOTEBOOK_BUTTON event for L{AuiNotebook}.
Parameter: | event – a EVT_AUINOTEBOOK_BUTTON event to be processed. |
---|
Handles the EVT_AUINOTEBOOK_CANCEL_DRAG event for L{AuiNotebook}.
Parameter: | event – a L{wx.EVT_AUINOTEBOOK_CANCEL_DRAG} event to be processed. |
---|
Handles the EVT_AUINOTEBOOK_PAGE_CHANGING event for L{AuiNotebook}.
Parameter: | event – a L{wx.EVT_AUINOTEBOOK_PAGE_CHANGING} event to be processed. |
---|
Handles the EVT_AUINOTEBOOK_TAB_DCLICK event for L{AuiNotebook}.
Parameter: | event – a L{wx.EVT_AUINOTEBOOK_TAB_DCLICK} event to be processed. |
---|
Handles the EVT_AUINOTEBOOK_DRAG_MOTION event for L{AuiNotebook}.
Parameter: | event – a L{wx.EVT_AUINOTEBOOK_DRAG_MOTION} event to be processed. |
---|
Handles the EVT_AUINOTEBOOK_END_DRAG event for L{AuiNotebook}.
Parameter: | event – a L{wx.EVT_AUINOTEBOOK_END_DRAG} event to be processed. |
---|
Handles the EVT_AUINOTEBOOK_TAB_MIDDLE_DOWN event for L{AuiNotebook}.
Parameter: | event – a EVT_AUINOTEBOOK_TAB_MIDDLE_DOWN event to be processed. |
---|
Handles the EVT_AUINOTEBOOK_TAB_MIDDLE_UP event for L{AuiNotebook}.
Parameter: | event – a EVT_AUINOTEBOOK_TAB_MIDDLE_UP event to be processed. |
---|
Handles the EVT_AUINOTEBOOK_TAB_RIGHT_DOWN event for L{AuiNotebook}.
Parameter: | event – a EVT_AUINOTEBOOK_TAB_RIGHT_DOWN event to be processed. |
---|
Handles the EVT_AUINOTEBOOK_TAB_RIGHT_UP event for L{AuiNotebook}.
Parameter: | event – a EVT_AUINOTEBOOK_TAB_RIGHT_UP event to be processed. |
---|
Removes a page, without deleting the window pointer.
Parameter: | page_idx – the page index to be removed. |
---|
@note: DeletePage() removes a tab from the multi-notebook, but does not destroys the window.
Sets the art provider to be used by the notebook.
Parameter: | art – an art provider. |
---|
Overridden from wx.PyControl. Sets the tab font.
Parameter: | font – a wx.Font object. |
---|
Sets the font for calculating text measurements.
Parameter: | font – a wx.Font object. |
---|
Sets the icon used by the L{TabNavigatorWindow}.
Parameter: | bitmap – an instance of wx.Bitmap. |
---|
Sets the normal font for drawing tab labels.
Parameter: | font – a wx.Font object. |
---|
Sets the tab bitmap for the page.
Parameters: |
|
---|
Sets the tab label for the page.
Parameters: |
|
---|
Sets the tab text colour for the page.
Parameters: |
|
---|
Sets the selected tab font for drawing tab labels.
Parameter: | font – a wx.Font object. |
---|
Sets the page selection. Calling this method will generate a page change event.
Parameters: |
|
---|
Sets the selection based on the input page.
Parameter: | page – an instance of L{AuiNotebookPage}. |
---|
Sets the selection based on the input window win.
Parameter: | win – a wx.Window derived window. |
---|
Sets the tab height. By default, the tab control height is calculated by measuring the text height and bitmap sizes on the tab captions. Calling this method will override that calculation and set the tab control to the specified height parameter. A call to this method will override any call to L{SetUniformBitmapSize}. Specifying -1 as the height will return the control to its default auto-sizing behaviour.
Parameter: | height – the tab control area height. |
---|
SetUniformBitmapSize() ensures that all tabs will have the same height, even if some tabs don’t have bitmaps. Passing wx.DefaultSize to this function will instruct the control to use dynamic tab height, which is the default behaviour. Under the default behaviour, when a tab with a large bitmap is added, the tab control’s height will automatically increase to accommodate the larger bitmap.
Parameter: | size – an instance of wx.Size specifying the tab bitmap size. |
---|
Overridden from wx.PyControl. Sets the style of the window.
Parameter: | style – the new window style. |
---|
@note: Please note that some styles cannot be changed after the window creation and that Refresh might need to be be called after changing the others for the change to take place immediately.
Split performs a split operation programmatically.
Parameters: |
|
---|
UpdateTabCtrlHeight() does the actual tab resizing. It’s meant to be used interally.
Parameter: | force – force the tab art to repaint. |
---|