wx.lib.agw.flatmenu.MenuEntryInfo¶
Internal class which holds information about a menu.
Class Hierarchy¶
Methods Summary¶
Default class constructor. |
|
Returns the associated menu accelerator identifier. |
|
Returns the associated menu. |
|
Returns the associated menu client rectangle. |
|
Returns the associated selected menu bitmap. |
|
Returns the associated menu state. |
|
Returns the associated menu bitmap. |
|
Returns the associated menu title. |
|
Sets the associated menu client rectangle. |
|
Sets the associated selected menu bitmap. |
|
Sets the associated menu state. |
|
Sets the associated menu bitmap. |
Class API¶
- class MenuEntryInfo(object)¶
Internal class which holds information about a menu.
Methods¶
- __init__(self, titleOrMenu='', menu=None, state=ControlNormal, cmd=wx.ID_ANY)¶
Default class constructor.
Used internally. Do not call it in your code!
- Parameters:
titleOrMenu – if it is a string, it represents the new menu label, otherwise it is another instance of
wx.MenuEntryInfo
from which the attributes are copied;menu – the associated
FlatMenu
object;state (integer) – the menu item state. This can be one of the following:
Item State
Value
Description
ControlPressed
0
The item is pressed
ControlFocus
1
The item is focused
ControlDisabled
2
The item is disabled
ControlNormal
3
Normal state
cmd (integer) – the menu accelerator identifier.
- GetCmdId(self)¶
Returns the associated menu accelerator identifier.
- GetMenu(self)¶
Returns the associated menu.
- GetRect(self)¶
Returns the associated menu client rectangle.
- GetSelectedTextBitmap(self)¶
Returns the associated selected menu bitmap.
- GetState(self)¶
Returns the associated menu state.
See also
SetState
for a list of valid menu states.
- GetTextBitmap(self)¶
Returns the associated menu bitmap.
- GetTitle(self)¶
Returns the associated menu title.
- SetRect(self, rect)¶
Sets the associated menu client rectangle.
- Parameters:
rect – an instance of
wx.Rect
, representing the menu client rectangle.
- SetSelectedTextBitmap(self, bmp)¶
Sets the associated selected menu bitmap.
- Parameters:
bmp – a valid
wx.Bitmap
object.
- SetState(self, state)¶
Sets the associated menu state.
- Parameters:
state (integer) – the menu item state. This can be one of the following:
Item State
Value
Description
ControlPressed
0
The item is pressed
ControlFocus
1
The item is focused
ControlDisabled
2
The item is disabled
ControlNormal
3
Normal state