Share and Money Management 0.18devel
Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions | List of all members
gui.controls.PopupMenuMixin Class Reference

Mixin to handle pop-up menus. More...

Inheritance diagram for gui.controls.PopupMenuMixin:

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...
 

Detailed Description

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()

Constructor & Destructor Documentation

◆ __init__()

def gui.controls.PopupMenuMixin.__init__ (   self,
args,
**  kwargs 
)

Member Function Documentation

◆ _adapt_popup()

def gui.controls.PopupMenuMixin._adapt_popup (   self)
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().

Here is the caller graph for this function:

◆ _fill_popup_menu()

def gui.controls.PopupMenuMixin._fill_popup_menu (   self)
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.

◆ _show_popup_on_event_pos()

def gui.controls.PopupMenuMixin._show_popup_on_event_pos (   self,
  event 
)
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().

Here is the caller graph for this function:

◆ 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__().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ popupmenu

gui.controls.PopupMenuMixin.popupmenu = None
static

◆ widget_attr [1/2]

string gui.controls.PopupMenuMixin.widget_attr = "list"
static

Name of widget class attribute to add the pop-up menu.

Referenced by gui.controls.PopupMenuMixin.OnShowPopup().

◆ widget_attr [2/2]

gui.controls.PopupMenuMixin.widget_attr

The documentation for this class was generated from the following file: