phoenix_title wx.lib.agw.flatmenu.MenuEntryInfo

Internal class which holds information about a menu.


class_hierarchy Class Hierarchy

Inheritance diagram for class MenuEntryInfo:

method_summary Methods Summary

__init__

Default class constructor.

GetCmdId

Returns the associated menu accelerator identifier.

GetMenu

Returns the associated menu.

GetRect

Returns the associated menu client rectangle.

GetSelectedTextBitmap

Returns the associated selected menu bitmap.

GetState

Returns the associated menu state.

GetTextBitmap

Returns the associated menu bitmap.

GetTitle

Returns the associated menu title.

SetRect

Sets the associated menu client rectangle.

SetSelectedTextBitmap

Sets the associated selected menu bitmap.

SetState

Sets the associated menu state.

SetTextBitmap

Sets the associated menu bitmap.


api 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



SetTextBitmap(self, bmp)

Sets the associated menu bitmap.

Parameters:

bmp – a valid wx.Bitmap object.