Share and Money Management 0.18devel
|
Mixin to handle pop-up menus. More...
Public Member Functions | |
def | __init__ (self, *args, **kwargs) |
def | OnShowPopup (self, event) |
Event handler to show the pop-up menu. More... | |
Public Attributes | |
widget_attr | |
Static Public Attributes | |
popupmenu = None | |
Reference to the pop-up menu. More... | |
string | widget_attr = "list" |
Name of widget class attribute to add the pop-up menu. More... | |
Private Member Functions | |
def | _fill_popup_menu (self) |
Fills the pop-up menu initially. More... | |
def | _adapt_popup (self) |
Adapt the content before the menu is shown. More... | |
def | _show_popup_on_event_pos (self, event) |
Shows the popup menu at the location specified by the event. More... | |
Mixin to handle pop-up menus.
Displays the popup menu previously created with _fill_popup_menu().
Overwrite
Implement logic to adapt the popup menu to the current needs in _adapt_popup()
def gui.controls.PopupMenuMixin.__init__ | ( | self, | |
* | args, | ||
** | kwargs | ||
) |
Reimplemented in gui.panel.PanelShare, gui.panel.PanelTransaction, gui.panel.PanelIndex, and gui.panel.PanelOpenPositionList.
|
private |
Adapt the content before the menu is shown.
Use this function to change/enable/disable menu entries to reflect the current state before the menu is shown.
Default - do nothing - derive this function to implement your own functionality.
Reimplemented in gui.panel.PanelShare, and gui.panel.PanelOpenPositionList.
Referenced by gui.controls.PopupMenuMixin.OnShowPopup().
|
private |
Fills the pop-up menu initially.
Derive this function to implement your own functionality.
Reimplemented in gui.panel.PanelShare, gui.panel.PanelTransaction, gui.panel.PanelIndex, and gui.panel.PanelOpenPositionList.
|
private |
Shows the popup menu at the location specified by the event.
References gui.controls.PopupMenuMixin.popupmenu, gui.controls.BaseListSmall.popupmenu, and gui.controls.TransactionListSmall.popupmenu.
Referenced by gui.controls.PopupMenuMixin.OnShowPopup().
def gui.controls.PopupMenuMixin.OnShowPopup | ( | self, | |
event | |||
) |
Event handler to show the pop-up menu.
References gui.controls.PopupMenuMixin._adapt_popup(), gui.panel.PanelShare._adapt_popup(), gui.panel.PanelOpenPositionList._adapt_popup(), gui.controls.PopupMenuMixin._show_popup_on_event_pos(), and gui.controls.PopupMenuMixin.widget_attr.
Referenced by gui.controls.BaseListSmall.__init__().
|
static |
Reference to the pop-up menu.
Referenced by gui.panel.PanelShare._fill_popup_menu(), gui.panel.PanelTransaction._fill_popup_menu(), gui.panel.PanelOpenPositionList._fill_popup_menu(), gui.controls.PopupMenuMixin._show_popup_on_event_pos(), and gui.controls.BaseListSmall.OnShowPopup().
|
static |
Name of widget class attribute to add the pop-up menu.
Referenced by gui.controls.PopupMenuMixin.OnShowPopup().
gui.controls.PopupMenuMixin.widget_attr |
Referenced by gui.controls.PopupMenuMixin.OnShowPopup().