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

Class Button
source code

object --+        
         |        
 _EGObject --+    
             |    
     _EGWidget --+
                 |
                Button
Known Subclasses:
AboutButton, CloseButton, HelpButton, OpenFileButton, PreferencesButton, QuitButton, SaveFileButton, SelectFolderButton

A push button.

Instance Methods [hide private]
  __init__(self, id, label="", stock=None, callback=None)
Push button constructor.
  __setup_gui__(self)
  __setup_connections__(self)
  __get_resize_mode__(self)
Return a tuple with ( horizontal, vertical ) resize mode

Inherited from _EGWidget: __get_widgets__, hide, set_active, set_inactive, show

Inherited from _EGObject: __repr__, __str__

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


Class Variables [hide private]
stock_items  
_gtk_stock_map  

Inherited from object: __class__


Properties [hide private]
stock  
callback  

Inherited from _EGWidget: app

Inherited from _EGObject: id


Method Details [hide private]

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

source code 
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: _EGWidget.__init__

__setup_gui__(self)

source code 

__setup_connections__(self)

source code 

__get_resize_mode__(self)

source code 
Return a tuple with ( horizontal, vertical ) resize mode
Overrides: _EGWidget.__get_resize_mode__

Class Variable Details [hide private]

stock_items

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

_gtk_stock_map

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

Property Details [hide private]

stock

Get Method:
unreachable.get(self)
Set Method:
unreachable.set(self, value)
Delete Method:
None

callback

Get Method:
unreachable.get(self)
Set Method:
unreachable.set(self, value)
Delete Method:
None