Internal class which holds information about a menu.
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. |
MenuEntryInfo
(object)¶Internal class which holds information about a menu.
__init__
(self, titleOrMenu="", menu=None, state=ControlNormal, cmd=wx.ID_ANY)¶Default class constructor.
Used internally. Do not call it in your code!
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 |
---|---|---|
|
0 |
The item is pressed |
|
1 |
The item is focused |
|
2 |
The item is disabled |
|
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.
rect – an instance of wx.Rect
, representing the menu client rectangle.
SetSelectedTextBitmap
(self, bmp)¶Sets the associated selected menu bitmap.
bmp – a valid wx.Bitmap
object.
SetState
(self, state)¶Sets the associated menu state.
state (integer) – the menu item state. This can be one of the following:
Item State |
Value |
Description |
---|---|---|
|
0 |
The item is pressed |
|
1 |
The item is focused |
|
2 |
The item is disabled |
|
3 |
Normal state |