Class: Shoes::Button

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

Direct Known Subclasses

ToggleButton

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 Native

#clear, #focus, #initialize, #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

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

Constructor Details

This class inherits a constructor from Shoes::Native

Instance Method Details

#click(&blk) ⇒ Object



290
291
292
293
294
# File 'lib/shoes/basic.rb', line 290

def click &blk
  @real.addSelectionListener do |e|
    self.class == Button ? blk[self] : (blk[self] if @real.getSelection)
  end
end