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

Class Button
source code

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

A push button.

Instance Methods [hide private]
  __init__(self, id, label="", stock=None, callback=None, expand_policy=None)
Push button constructor.
  __setup_gui__(self)
  __setup_connections__(self)

Inherited from _EGWidget: __configure_orientation__, __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  
callback  
stock_items  
_gtk_stock_map  

Inherited from _EGWidget: ORIENTATION_HORIZONTAL, ORIENTATION_VERTICAL, app

Inherited from _EGObject: id

Inherited from object: __class__


Method Details [hide private]

__init__(self, id, label="", stock=None, callback=None, expand_policy=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
  • expand_policy - how this widget should fit space, see ExpandPolicy.Policy.Rule.
Overrides: _EGWidget.__init__

__setup_gui__(self)

source code 

__setup_connections__(self)

source code 

Class Variable Details [hide private]

stock

Value:
_gen_ro_property("stock")                                              
      

callback

Value:
_gen_ro_property("callback")                                           
      

stock_items

Value:
"about","help","quit","add","remove","refresh","update","yes","no","zo\
om_100","zoom_in","zoom_out","zoom_fit","undo","execute","stop","open"\
,"save","save_as","properties","preferences","print","print_preview","\
ok","cancel","apply","close","clear","convert","next","back","up","dow\
n","font","color","media:play","media:pause","media:stop","media:previ\
ous","media:next","media:forward","media:rewind",                      
      

_gtk_stock_map

Value:
{"about":gtk.STOCK_ABOUT,"help":gtk.STOCK_HELP,"quit":gtk.STOCK_QUIT,"\
add":gtk.STOCK_ADD,"remove":gtk.STOCK_REMOVE,"refresh":gtk.STOCK_REFRE\
SH,"update":gtk.STOCK_REFRESH,"yes":gtk.STOCK_YES,"no":gtk.STOCK_NO,"z\
oom_100":gtk.STOCK_ZOOM_100,"zoom_in":gtk.STOCK_ZOOM_IN,"zoom_out":gtk\
.STOCK_ZOOM_OUT,"zoom_fit":gtk.STOCK_ZOOM_FIT,"undo":gtk.STOCK_UNDO,"e\
xecute":gtk.STOCK_EXECUTE,"stop":gtk.STOCK_STOP,"open":gtk.STOCK_OPEN,\
"save":gtk.STOCK_SAVE,"save_as":gtk.STOCK_SAVE_AS,"properties":gtk.STO\
CK_PROPERTIES,"preferences":gtk.STOCK_PREFERENCES,"print":gtk.STOCK_PR\
...