qubx :: toolspace :: SubLayer_Radio :: Class SubLayer_Radio
[hide private]
[frames] | no frames]

Class SubLayer_Radio

source code

object --+        
         |        
  SubLayer --+    
             |    
SubLayer_Label --+
                 |
                SubLayer_Radio

Label with radio button behavior. All events via fellow.on_radio.

Instance Methods [hide private]
 
__init__(self, fellow=None, on_radio=<__builtin__.function object>, fill_color=('toolspace.radio.fill', (1, 0.5, 0, 0.8)), active=None, *args, **kw)
See also: SubLayer.__init__
source code
 
set_active(self, x, sub=None, user=False) source code
 
__action(self, x, y, e) source code
 
draw(self, context, w, h, appearance)
Override this method to paint the SubLayer.
source code

Inherited from SubLayer_Label: set_color, set_if_color, set_label, set_rotate

Inherited from SubLayer: button_press, button_release, invalidate, pt_in_rect, set_actual_x, set_actual_y, set_cBG, set_h, set_layer, set_tooltip, set_w, set_x, set_y

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

Instance Variables [hide private]
  active
bool

Inherited from SubLayer_Label: color, hover_color, label

Inherited from SubLayer: OnChangeTooltip, OnHideTooltip, OnInvalidate, action, border, cBG, cBorder, enter, exit, h, invalid, mouse_drag, mouse_move, rq_h, rq_w, scroll, w, x, y

Properties [hide private]

Inherited from SubLayer_Label: rotate

Inherited from SubLayer: layer, tooltip

Inherited from object: __class__

Method Details [hide private]

__init__(self, fellow=None, on_radio=<__builtin__.function object>, fill_color=('toolspace.radio.fill', (1, 0.5, 0, 0.8)), active=None, *args, **kw)
(Constructor)

source code 

See also: SubLayer.__init__

Parameters:
  • label - a string
  • justify - negative: left-justify; zero: center; positive: right-justify
  • vcenter - True/nonzero to center vertically
  • color - COLORREF for text
  • hover_color - COLORREF for mouse-over text
Overrides: object.__init__
(inherited documentation)

draw(self, context, w, h, appearance)

source code 

Override this method to paint the SubLayer. Don't forget to call SubLayer.draw(context, w, h, appearance).

Overrides: SubLayer.draw
(inherited documentation)

Instance Variable Details [hide private]

active

bool
Get Method:
unreachable(self)
Set Method:
unreachable(self, x)