Base class for the FlatMenu
renderers. This class implements the common
methods of all the renderers.
wx.lib.agw.flatmenu.FMRendererMSOffice2007
, wx.lib.agw.flatmenu.FMRendererXP
Default class constructor. |
|
Convert the given image to a bitmap, optionally overlaying an alpha |
|
Draws a shadow using background bitmap. |
|
Draws a button. |
|
Draws the menu left margin. |
|
Draws the menu. |
|
Draws everything for |
|
Draws the menu bar background colour according to the menubar.GetBackgroundColour |
|
Draws the highlight on a |
|
Draws the highlight on a FlatMenu |
|
Draws the menu item. |
|
Draws the scroll button |
|
Draws a separator inside a |
|
Draws the toolbar background |
|
Draws a separator inside the toolbar in |
|
Returns a |
|
Set the colour to highlight focus on the menu bar. |
|
Set the colour to highlight focus on the menu. |
Base class for the FlatMenu
renderers. This class implements the common
methods of all the renderers.
Default class constructor.
Convert the given image to a bitmap, optionally overlaying an alpha channel to it.
xpm – a list of strings formatted as XPM;
alpha – a list of alpha values, the same size as the xpm bitmap.
Draws a shadow using background bitmap.
dc – an instance of wx.DC
;
rect – an instance of wx.Rect
, representing the bitmap client rectangle;
where (integer) –
where to draw the shadow. This can be any combination of the following bits:
Shadow Settings |
Value |
Description |
---|---|---|
|
1 |
Right side shadow |
|
2 |
Not full bottom shadow |
|
4 |
Full bottom shadow |
Draws a button.
dc – an instance of wx.DC
;
rect – an instance of wx.Rect
, representing the button client rectangle;
state (integer) – the button state;
colour – if not None
, an instance of wx.Colour
to be used to draw
the FlatMenuItem
background.
Draws the menu left margin.
item – an instance of FlatMenuItem
;
dc – an instance of wx.DC
;
menuRect – an instance of wx.Rect
, representing the menu client rectangle.
Draws the menu.
Draws everything for FlatMenuBar
.
menubar – an instance of FlatMenuBar
.
dc – an instance of wx.DC
.
Draws the menu bar background colour according to the menubar.GetBackgroundColour
Draws the highlight on a FlatMenuBar
.
Draws the highlight on a FlatMenu
Draws the menu item.
item – a FlatMenuItem
instance;
dc – an instance of wx.DC
;
xCoord (integer) – the current x position where to draw the menu;
yCoord (integer) – the current y position where to draw the menu;
imageMarginX (integer) – the spacing between the image and the menu border;
markerMarginX (integer) – the spacing between the checkbox/radio marker and the menu border;
textX (integer) – the menu item label x position;
rightMarginX (integer) – the right margin between the text and the menu border;
selected (bool) – True
if this menu item is currently hovered by the mouse,
False
otherwise.
backgroundImage – if not None
, an instance of wx.Bitmap
which will
become the background image for this FlatMenu
.
Draws the scroll button
Draws a separator inside a FlatMenu
.
dc – an instance of wx.DC
;
xCoord (integer) – the current x position where to draw the separator;
yCoord (integer) – the current y position where to draw the separator;
textX (integer) – the menu item label x position;
sepWidth (integer) – the width of the separator, in pixels.
Draws the toolbar background
Draws a separator inside the toolbar in FlatMenuBar
.
Returns a wx.Colour
according to the menu item state.
state (integer) – one of the following bits:
Item State |
Value |
Description |
---|---|---|
|
0 |
The item is pressed |
|
1 |
The item is focused |
|
2 |
The item is disabled |
|
3 |
Normal state |
Set the colour to highlight focus on the menu bar.
colour – a valid instance of wx.Colour
.