Package peppy :: Package actions :: Class RadioAction
[frames] | no frames]

Class RadioAction

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

Display a group of radio buttons in a menu bar.

This is used to display a list of radio 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. Like its ListAction parent, the isEnabled method sets the enable state for all the items in the radio list.

The subclass should also override getIndex to return the position within the list of the selected item in the radio 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.

Nested Classes

Inherited from ListAction: IdCache

Instance Methods
 
__init__(self, frame, menu=None, toolbar=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
 
insertIntoMenu(self, menu, pos=None)
 
showEnable(self)
 
showCheck(self)
 
getIndex(self)

Inherited from ListAction: dynamic, getHash, getIcons, getIndexOfId, getItems, getSubIds

Inherited from SelectAction: __call__, 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 = -1
  inline = False

Inherited from ListAction: abbrev_width, localize_items

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

Inherited from debug.debugmixin: debuglevel

Properties

Inherited from object: __class__

Method Details

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

 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

insertIntoMenu(self, menu, pos=None)

 
Overrides: SelectAction.insertIntoMenu

showEnable(self)

 
Overrides: SelectAction.showEnable