Class: Shoes::Swt::Button

Inherits:
SwtButton show all
Defined in:
shoes-swt/lib/shoes/swt/button.rb

Instance Attribute Summary

Attributes inherited from SwtButton

#app, #dsl, #real

Instance Method Summary collapse

Methods inherited from SwtButton

#click, #enabled, #eval_block, #remove_listeners

Methods included from Common::Visibility

#hidden?, #hidden_from_view?, #hide, #outside_parent_view?, #show, #toggle, #visible?

Methods included from Common::Remove

#remove

Methods included from Common::Focus

#focus, #focused?

Constructor Details

#initialize(dsl, app) ⇒ Button

Create a button

Parameters:



10
11
12
13
14
# File 'shoes-swt/lib/shoes/swt/button.rb', line 10

def initialize(dsl, app)
  super(dsl, app, ::Swt::SWT::PUSH) do |button|
    button.set_text @dsl.text
  end
end

Instance Method Details

#text=(value) ⇒ Object



16
17
18
# File 'shoes-swt/lib/shoes/swt/button.rb', line 16

def text=(value)
  @real.text = value
end