
wx.lib.agw.flatmenu.FMRenderer¶Base class for the FlatMenu renderers. This class implements the common
methods of all the renderers.
Methods Summary¶__init__ |
Default class constructor. |
ConvertToBitmap |
Convert the given image to a bitmap, optionally overlaying an alpha |
DrawBitmapShadow |
Draws a shadow using background bitmap. |
DrawButton |
Draws a button. |
DrawLeftMargin |
Draws the menu left margin. |
DrawMenu |
Draws the menu. |
DrawMenuBar |
Draws everything for FlatMenuBar. |
DrawMenuBarBackground |
Draws the menu bar background colour according to the menubar.GetBackgroundColour |
DrawMenuBarButton |
Draws the highlight on a FlatMenuBar. |
DrawMenuButton |
Draws the highlight on a FlatMenu |
DrawMenuItem |
Draws the menu item. |
DrawScrollButton |
Draws the scroll button |
DrawSeparator |
Draws a separator inside a FlatMenu. |
DrawToolBarBg |
Draws the toolbar background |
DrawToolbarSeparator |
Draws a separator inside the toolbar in FlatMenuBar. |
GetColoursAccordingToState |
Returns a wx.Colour according to the menu item state. |
SetMenuBarHighlightColour |
Set the colour to highlight focus on the menu bar. |
SetMenuHighlightColour |
Set the colour to highlight focus on the menu. |
Class API¶FMRenderer(object)¶Base class for the FlatMenu renderers. This class implements the common
methods of all the renderers.
__init__(self)¶Default class constructor.
ConvertToBitmap(self, xpm, alpha=None)¶Convert the given image to a bitmap, optionally overlaying an alpha channel to it.
| Parameters: |
|
|---|
DrawBitmapShadow(self, dc, rect, where=BottomShadow|RightShadow)¶Draws a shadow using background bitmap.
| Parameters: |
|
|---|
DrawButton(self, dc, rect, state, colour=None)¶Draws a button.
| Parameters: |
|
|---|
DrawLeftMargin(self, item, dc, menuRect)¶Draws the menu left margin.
| Parameters: |
|
|---|
DrawMenu(self, flatmenu, dc)¶Draws the menu.
| Parameters: |
|---|
DrawMenuBar(self, menubar, dc)¶Draws everything for FlatMenuBar.
| Parameters: |
|
|---|
DrawMenuBarBackground(self, dc, rect)¶Draws the menu bar background colour according to the menubar.GetBackgroundColour
| Parameters: |
|---|
DrawMenuBarButton(self, dc, rect, state)¶Draws the highlight on a FlatMenuBar.
| Parameters: |
|---|
DrawMenuButton(self, dc, rect, state)¶Draws the highlight on a FlatMenu
| Parameters: |
|---|
DrawMenuItem(self, item, dc, xCoord, yCoord, imageMarginX, markerMarginX, textX, rightMarginX, selected=False, backgroundImage=None)¶Draws the menu item.
| Parameters: |
|
|---|
DrawScrollButton(self, dc, rect, state)¶Draws the scroll button
| Parameters: |
|---|
DrawSeparator(self, dc, xCoord, yCoord, textX, sepWidth)¶Draws a separator inside a FlatMenu.
| Parameters: |
|
|---|
DrawToolBarBg(self, dc, rect)¶Draws the toolbar background
| Parameters: |
|---|
DrawToolbarSeparator(self, dc, rect)¶Draws a separator inside the toolbar in FlatMenuBar.
| Parameters: |
|---|
GetColoursAccordingToState(self, state)¶Returns a wx.Colour according to the menu item state.
| Parameters: | state (integer) – one of the following bits:
|
|---|
SetMenuBarHighlightColour(self, colour)¶Set the colour to highlight focus on the menu bar.
| Parameters: | colour – a valid instance of wx.Colour. |
|---|