Module eagle :: Class Item
[show private | hide private]
[frames | no frames]

Type Item

object --+        
         |        
_AutoGenId --+    
             |    
object --+   |    
         |   |    
 _EGObject --+    
             |    
      BaseItem --+
                 |
                Item


Simple menu item composed of text and callback function.
Method Summary
  __init__(self, id, label, callback, active, visible)
Menu.Item constructor.
  __repr__(self)
  __setup_gui__(self)
  __str__(self)
  get_label(self)
  set_label(self, value)
    Inherited from BaseItem
  disable(self)
Same as set_active( False )
  enable(self, active)
Set the menu item as active.
  get_active(self)
Return True if it's active (enabled) or False inactive (disabled).
  get_visible(self)
Return true if menu item is visible (shown).
  hide(self)
Make menu item invisible.
  is_active(self)
Return True if it's active (enabled) or False inactive (disabled).
  is_enabled(self)
Return True if it's active (enabled) or False inactive (disabled).
  is_visible(self)
Return true if menu item is visible (shown).
  set_active(self, active)
Set the menu item as active.
  set_inactive(self)
Same as set_active( False )
  set_visible(self, visible)
Show or hide menu item based on value of 'visible'.
  show(self)
Make menu item visible.
    Inherited from _AutoGenId
  __get_id__(classobj)
(Class method)
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value

Property Summary
  label
    Inherited from BaseItem
  _wid
  active
  visible
    Inherited from _EGObject
  id

Class Variable Summary
str auto_gen_name = 'Menu.Item'
    Inherited from _AutoGenId
int last_id_num = 0                                                                     

Instance Method Details

__init__(self, id=None, label='', callback=None, active=True, visible=True)
(Constructor)

Menu.Item constructor.

@param id: unique id to this application, or None to generate one
       automatically.
@param label: some text to display.
@param callback: function or tuple of functions to be called
    back when item is clicked. Callbacks should have
    the following signature:

        def callback( app, menu_item ):

    where app is the App instance that contains this item
    and menu_item is an instance to clicked item.
@param active: boolean to set item state.
@param visible: boolean to set item visibility.
Overrides:
eagle.BaseItem.__init__

Property Details

label

Get Method:
get_label(self)
Set Method:
set_label(self, value)

Class Variable Details

auto_gen_name

Type:
str
Value:
'Menu.Item'                                                            

Generated by Epydoc 2.1 on Sun Apr 22 21:30:28 2007 http://epydoc.sf.net