Module: Shoes::Common::Clickable
- Included in:
- Button, Shoes::CheckButton, ArtElement, Image, InternalApp, Slot, Swt::App, Swt::Arc, Swt::Arrow, Swt::Image, Swt::Line, Swt::Link, Swt::Oval, Swt::Rect, Swt::Shape, Swt::Slot, Swt::Star, Swt::TextBlock, TextBlock
- Defined in:
- shoes-core/lib/shoes/common/clickable.rb
Instance Attribute Summary collapse
-
#pass_coordinates ⇒ Object
Returns the value of attribute pass_coordinates.
Instance Method Summary collapse
- #click(&blk) ⇒ Object
- #pass_coordinates? ⇒ Boolean
- #register_click(blk = nil) ⇒ Object
- #release(&blk) ⇒ Object
Instance Attribute Details
#pass_coordinates ⇒ Object
Returns the value of attribute pass_coordinates.
6 7 8 |
# File 'shoes-core/lib/shoes/common/clickable.rb', line 6 def pass_coordinates @pass_coordinates end |
Instance Method Details
#click(&blk) ⇒ Object
8 9 10 11 |
# File 'shoes-core/lib/shoes/common/clickable.rb', line 8 def click(&blk) @gui.click blk self end |
#pass_coordinates? ⇒ Boolean
23 24 25 |
# File 'shoes-core/lib/shoes/common/clickable.rb', line 23 def pass_coordinates? @pass_coordinates end |
#register_click(blk = nil) ⇒ Object
18 19 20 21 |
# File 'shoes-core/lib/shoes/common/clickable.rb', line 18 def register_click(blk = nil) click(&@style[:click]) if @style[:click] click(&blk) if blk end |
#release(&blk) ⇒ Object
13 14 15 16 |
# File 'shoes-core/lib/shoes/common/clickable.rb', line 13 def release(&blk) @gui.release blk self end |