Package fife :: Package extensions :: Package pychan :: Package widgets' :: Module buttons :: Class ToggleButton
[hide private]
[frames] | no frames]

Class ToggleButton

source code

                 object --+            
                          |            
              widget.Widget --+        
                              |        
basictextwidget.BasicTextWidget --+    
                                  |    
                        ImageButton --+
                                      |
                                     ToggleButton

A basic push button that can be toggled.

Unfortunately a bit of code duplication from ImageButton.

New Attributes

Instance Methods [hide private]
 
__init__(self, parent=None, name=None, size=None, min_size=None, max_size=None, helptext=None, position=None, style=None, hexpand=None, vexpand=None, font=None, base_color=None, background_color=None, foreground_color=None, selection_color=None, border_size=None, position_technique=None, is_focusable=None, comment=None, margins=None, text=None, up_image=None, down_image=None, hover_image=None, offset=None, group=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
_setGroup(self, group) source code
 
_getGroup(self) source code
 
_setToggled(self, toggled) source code
 
_isToggled(self) source code
 
resizeToContent(self, recurse=True)
Try to shrink the widget, so that it fits closely around its content.
source code

Inherited from ImageButton (private): _getOffset, _setOffset

Inherited from widget.Widget: __repr__, __str__, adaptLayout, addChild, addChildren, afterHide, beforeShow, capture, collectData, collectDataAsDict, deepApply, distributeData, distributeInitialData, execute, expandContent, findChild, findChildByName, findChildren, getAbsolutePos, getData, getNamedChildren, hide, insertChild, insertChildBefore, isCaptured, isVisible, listNamedWidgets, mapEvents, match, removeAllChildren, removeChild, removeChildren, requestFocus, setData, setInitialData, show, sizeChanged, stylize

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

Class Variables [hide private]
  ATTRIBUTES = BasicTextWidget.ATTRIBUTES+ [Attr('up_image'), At...
  DEFAULT_GROUP = ""
  group = property(_getGroup, _setGroup)
  toggled = property(_isToggled, _setToggled)

Inherited from ImageButton: DEFAULT_DOWNIMAGE, DEFAULT_HOVERIMAGE, DEFAULT_OFFSET, DEFAULT_UPIMAGE, down_image, hover_image, offset, up_image

Inherited from basictextwidget.BasicTextWidget: DEFAULT_HEXPAND, DEFAULT_MARGINS, DEFAULT_TEXT, DEFAULT_VEXPAND, text

Inherited from widget.Widget: DEFAULT_BORDER_SIZE, DEFAULT_COMMENT, DEFAULT_FONT, DEFAULT_HELPTEXT, DEFAULT_MAX_SIZE, DEFAULT_MIN_SIZE, DEFAULT_NAME, DEFAULT_POSITION, DEFAULT_POSITION_TECHNIQUE, DEFAULT_SIZE, HIDE_SHOW_ERROR, background_color, base_color, border_size, font, foreground_color, height, is_focusable, max_height, max_width, min_height, min_width, name, parent, position, selection_color, size, style, width, x, y

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, parent=None, name=None, size=None, min_size=None, max_size=None, helptext=None, position=None, style=None, hexpand=None, vexpand=None, font=None, base_color=None, background_color=None, foreground_color=None, selection_color=None, border_size=None, position_technique=None, is_focusable=None, comment=None, margins=None, text=None, up_image=None, down_image=None, hover_image=None, offset=None, group=None)
(Constructor)

source code 

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

Overrides: object.__init__
(inherited documentation)

resizeToContent(self, recurse=True)

source code 

Try to shrink the widget, so that it fits closely around its content. Do not call directly.

Overrides: widget.Widget.resizeToContent
(inherited documentation)

Class Variable Details [hide private]

ATTRIBUTES

Value:
BasicTextWidget.ATTRIBUTES+ [Attr('up_image'), Attr('down_image'), Att\
r('hover_image'), PointAttr('offset'), Attr('group')]