Class: Shoes::Mock::Button

Inherits:
Object
  • Object
show all
Includes:
Clickable, CommonMethods
Defined in:
shoes-core/lib/shoes/mock/button.rb

Instance Method Summary collapse

Methods included from Clickable

#click, #release

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