Class: Shoes::Button

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

Direct Known Subclasses

ToggleButton

Instance Attribute Summary

Attributes inherited from Native

#state

Attributes inherited from Basic

#args, #cleared, #hided, #initials, #parent, #shows

Attributes included from Mod

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

Instance Method Summary collapse

Methods inherited from Native

#change, #focus

Methods inherited from Basic

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

Methods included from Mod

#hover, #leave, #release, #set_margin

Constructor Details

This class inherits a constructor from Shoes::Basic

Instance Method Details

#click(&blk) ⇒ Object



330
331
332
# File 'lib/shoes/basic.rb', line 330

def click &blk
  real.signal_connect "clicked", &proc{parent.append{blk[self]}} if blk
end