Class: Shoes::ToggleButton

Inherits:
Button show all
Defined in:
lib/shoes/basic.rb

Direct Known Subclasses

Check, Radio

Instance Attribute Summary

Attributes inherited from Basic

#args, #dps, #initials, #ln, #parent, #pl

Attributes included from Mod

#hover_proc, #hovered, #leave_proc, #margin_bottom, #margin_left, #margin_right, #margin_top

Instance Method Summary collapse

Methods inherited from Button

#click

Methods inherited from Native

#clear, #move, #move2, #text, #text=, #toggle

Methods inherited from Basic

#center_at, #clear, #fix_size, #hide, #initialize, #move, #move2, #move3, #positioning, #set_args, #show, #style, #toggle

Methods included from Mod

#click, #hided, #hover, #leave, #release, #set_margin

Constructor Details

This class inherits a constructor from Shoes::Basic

Instance Method Details

#checked=(tof) ⇒ Object



274
275
276
277
# File 'lib/shoes/basic.rb', line 274

def checked=(tof)
  real.setSelection tof
  block.call if tof
end

#checked?Boolean

Returns:

  • (Boolean)


271
272
273
# File 'lib/shoes/basic.rb', line 271

def checked?
  real.getSelection
end