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

Type Button

object --+        
         |        
 _EGObject --+    
             |    
     _EGWidget --+
                 |
                Button

Known Subclasses:
AboutButton, CloseButton, HelpButton, OpenFileButton, PreferencesButton, QuitButton, SaveFileButton, SelectFolderButton

A push button.
Method Summary
  __init__(self, id, label, stock, callback)
Push button constructor.
  __setup_connections__(self)
  __setup_gui__(self)
    Inherited from _EGWidget
  __get_resize_mode__(self)
Return a tuple with ( horizontal, vertical ) resize mode
  __get_widgets__(self)
Return a list of internal widgets this Eagle widget contains.
  hide(self)
Make widget invisible.
  set_active(self, active)
Set the widget as active.
  set_inactive(self)
Same as set_active( False )
  show(self)
Make widget visible.
    Inherited from _EGObject
  __repr__(self)
  __str__(self)
    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
  callback
  stock
    Inherited from _EGWidget
  app
    Inherited from _EGObject
  id

Class Variable Summary
tuple stock_items = ('about', 'help', 'quit', 'add', 'remove',...
dict _gtk_stock_map = {'help': 'gtk-help', 'color': 'gtk-sele...

Method Details

__init__(self, id, label='', stock=None, callback=None)
(Constructor)

Push button constructor.
Parameters:
label - what text to show, if stock isn't provided.
stock - optional. One of stock_items.
callback - the function (or list of functions) to call when button is pressed. Function will get as parameter:
  • App reference
  • Button reference
Overrides:
eagle._EGWidget.__init__

Property Details

callback

Get Method:
get(...)
Set Method:
set(...)

stock

Get Method:
get(...)
Set Method:
set(...)

Class Variable Details

stock_items

Type:
tuple
Value:
('about', 'help', 'quit', 'add', 'remove', 'refresh', 'update', 'yes',\
 'no')                                                                 

_gtk_stock_map

Type:
dict
Value:
{'about': 'gtk-about',
 'add': 'gtk-add',
 'apply': 'gtk-apply',
 'back': 'gtk-go-back',
 'cancel': 'gtk-cancel',
 'clear': 'gtk-clear',
 'close': 'gtk-close',
 'color': 'gtk-select-color',
...                                                                    

Generated by Epydoc 2.1 on Thu Apr 27 16:28:55 2006 http://epydoc.sf.net