Package peppy :: Module menu :: Class ListAction
[frames] | no frames]

Class ListAction

      object --+        
               |        
debug.debugmixin --+    
                   |    
        SelectAction --+
                       |
                      ListAction
Known Subclasses:

Display a list of items in a menu bar.

This is used to display a list of items while only requiring a single action to display the entire list.

The subclass should override the getItems method to return the list of items to display. These items should be strings. Overriding isEnabled will determine the enable/disable state for all of the items in the list.

If the items change their text strings, you should add the OnDemandActionMixin and override the getHash method to indicate when the user interface should redraw the menu.

Instance Methods
 
__init__(self, frame, menu=None, toolbar=None)
 
getSubIds(self)
 
getIndexOfId(self, id)
 
insertIntoMenu(self, menu, pos=None)
 
getHash(self)
 
dynamic(self)
 
getItems(self)
 
getIcons(self)
 
showEnable(self)

Inherited from SelectAction: __call__, __del__, action, getMenuItemName, getTooltip, initPostHook, initPreHook, insertIntoToolbar, isEnabled

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Methods

Inherited from SelectAction: getHelp, setAcceleratorText, worksWithMajorMode

Inherited from debug.debugmixin: dprint

Class Variables
  menumax = 30
  abbrev_width = 16
  inline = False

Inherited from SelectAction: alias, debuglevel, default_menu, default_toolbar, global_id, icon, key_bindings, keyboard, name, stock_id, tooltip

Properties

Inherited from object: __class__

Method Details

__init__(self, frame, menu=None, toolbar=None)
(Constructor)

 
Overrides: SelectAction.__init__

getSubIds(self)

 
Overrides: SelectAction.getSubIds

insertIntoMenu(self, menu, pos=None)

 
Overrides: SelectAction.insertIntoMenu

showEnable(self)

 
Overrides: SelectAction.showEnable