Class: Shoes::Mock::Button
- Inherits:
-
Object
- Object
- Shoes::Mock::Button
- Includes:
- Clickable, CommonMethods
- Defined in:
- shoes-core/lib/shoes/mock/button.rb
Instance Method Summary collapse
- #enabled(_value) ⇒ Object
-
#initialize(dsl, _parent) ⇒ Button
constructor
A new instance of Button.
Methods included from Clickable
Methods included from CommonMethods
#update_fill, #update_position, #update_stroke, #update_visibility
Constructor Details
#initialize(dsl, _parent) ⇒ Button
Returns a new instance of Button.
9 10 11 12 13 14 15 16 17 18 |
# File 'shoes-core/lib/shoes/mock/button.rb', line 9 def initialize(dsl, _parent) # For whatever reason the SWT button sets sizes back during initialize # and at least one test (for the ask dialog which runs a full Shoes.app) # relies on that sizing being set for positioning logic to run. # # Best I can tell, it doesn't matter *what* the values are, as long as # they're there. dsl.width = 0 unless dsl.width dsl.height = 0 unless dsl.height end |
Instance Method Details
#enabled(_value) ⇒ Object
20 21 |
# File 'shoes-core/lib/shoes/mock/button.rb', line 20 def enabled(_value) end |