Parent class for the 6 renderers defined: Standard, VC71, Fancy, Firefox 2, VC8 and Ribbon. This class implements the common methods of all 6 renderers.
wx.lib.agw.flatnotebook.FNBRendererDefault
, wx.lib.agw.flatnotebook.FNBRendererFancy
, wx.lib.agw.flatnotebook.FNBRendererFirefox2
, wx.lib.agw.flatnotebook.FNBRendererRibbonTabs
, wx.lib.agw.flatnotebook.FNBRendererVC71
, wx.lib.agw.flatnotebook.FNBRendererVC8
Default class constructor. |
|
Calculates the height of the input tab. |
|
Calculates the width of the input tab. |
|
Draws the left and right scrolling arrows. |
|
Draws tab drag hint, the default implementation is to do nothing. |
|
Draws the drop-down arrow in the navigation area. |
|
Draws a focus rectangle like the native |
|
Draws the left navigation arrow. |
|
Draws the right navigation arrow. |
|
Actually draws the tabs in |
|
Draws a line over the tabs. |
|
Draws the ‘X’ in the selected tab. |
|
Draw the ‘X’ navigation button in the navigation area. |
|
Returns the navigation area width. |
|
Returns the drop down button position in the navigation area. |
|
Returns the left button position in the navigation area. |
|
Returns the right button position in the navigation area. |
|
Returns the ‘X’ button position in the navigation area. |
|
Calculates the number of tabs that can fit on the available space on screen. |
FNBRenderer
(object)¶Parent class for the 6 renderers defined: Standard, VC71, Fancy, Firefox 2, VC8 and Ribbon. This class implements the common methods of all 6 renderers.
__init__
(self)¶Default class constructor.
CalcTabHeight
(self, pageContainer)¶Calculates the height of the input tab.
pageContainer – an instance of FlatNotebook
.
CalcTabWidth
(self, pageContainer, tabIdx, tabHeight)¶Calculates the width of the input tab.
pageContainer – an instance of FlatNotebook
;
tabIdx – the index of the input tab;
tabHeight – the height of the tab.
DrawArrowAccordingToState
(self, dc, pc, rect)¶Draws the left and right scrolling arrows.
dc – an instance of wx.DC
;
pc – an instance of FlatNotebook
;
rect – the client rectangle containing the scrolling arrows.
DrawDragHint
(self, pc, tabIdx)¶Draws tab drag hint, the default implementation is to do nothing. You can override this function to provide a nice feedback to user.
pc – an instance of FlatNotebook
;
tabIdx – the index of the tab we are dragging.
Note
To show your own custom drag and drop UI feedback, you must override this method in your derived class.
DrawDropDownArrow
(self, pageContainer, dc)¶Draws the drop-down arrow in the navigation area.
pageContainer – an instance of FlatNotebook
;
dc – an instance of wx.DC
.
DrawFocusRectangle
(self, dc, pageContainer, page)¶Draws a focus rectangle like the native Notebook
.
dc – an instance of wx.DC
;
pageContainer – an instance of FlatNotebook
;
page – an instance of PageInfo
, representing a page in the notebook.
DrawLeftArrow
(self, pageContainer, dc)¶Draws the left navigation arrow.
pageContainer – an instance of FlatNotebook
;
dc – an instance of wx.DC
.
DrawRightArrow
(self, pageContainer, dc)¶Draws the right navigation arrow.
pageContainer – an instance of FlatNotebook
;
dc – an instance of wx.DC
.
DrawTabs
(self, pageContainer, dc)¶Actually draws the tabs in FlatNotebook
.
pageContainer – an instance of FlatNotebook
;
dc – an instance of wx.DC
.
DrawTabsLine
(self, pageContainer, dc, selTabX1=-1, selTabX2=-1)¶Draws a line over the tabs.
pageContainer – an instance of FlatNotebook
;
dc – an instance of wx.DC
;
selTabX1 – first x coordinate of the tab line;
selTabX2 – second x coordinate of the tab line.
DrawTabX
(self, pageContainer, dc, rect, tabIdx, btnStatus)¶Draws the ‘X’ in the selected tab.
pageContainer – an instance of FlatNotebook
;
dc – an instance of wx.DC
;
rect – the current tab client rectangle;
tabIdx – the index of the current tab;
btnStatus – the status of the ‘X’ button in the current tab.
DrawX
(self, pageContainer, dc)¶Draw the ‘X’ navigation button in the navigation area.
pageContainer – an instance of FlatNotebook
;
dc – an instance of wx.DC
.
GetButtonsAreaLength
(self, pageContainer)¶Returns the navigation area width.
pageContainer – an instance of FlatNotebook
.
GetDropArrowButtonPos
(self, pageContainer)¶Returns the drop down button position in the navigation area.
pageContainer – an instance of FlatNotebook
.
GetLeftButtonPos
(self, pageContainer)¶Returns the left button position in the navigation area.
pageContainer – an instance of FlatNotebook
.
GetRightButtonPos
(self, pageContainer)¶Returns the right button position in the navigation area.
pageContainer – an instance of FlatNotebook
.
GetXPos
(self, pageContainer)¶Returns the ‘X’ button position in the navigation area.
pageContainer – an instance of FlatNotebook
.
NumberTabsCanFit
(self, pageContainer, fr=-1)¶Calculates the number of tabs that can fit on the available space on screen.
pageContainer – an instance of FlatNotebook
;
fr – the current first visible tab.