Class: CommandButton
- Inherits:
-
Gtk::Button
- Object
- Gtk::Button
- CommandButton
- Defined in:
- lib/yasysdui/command_button.rb
Instance Attribute Summary collapse
-
#actionStr ⇒ Object
Returns the value of attribute actionStr.
-
#ctrl ⇒ Object
Returns the value of attribute ctrl.
Instance Method Summary collapse
-
#initialize(actionStr, ctrl) ⇒ CommandButton
constructor
A new instance of CommandButton.
Constructor Details
#initialize(actionStr, ctrl) ⇒ CommandButton
Returns a new instance of CommandButton.
7 8 9 10 11 12 |
# File 'lib/yasysdui/command_button.rb', line 7 def initialize(actionStr, ctrl) super(:label => actionStr) @ctrl = ctrl @actionStr = actionStr self.signal_connect("clicked") {@ctrl.execute(@actionStr)} end |
Instance Attribute Details
#actionStr ⇒ Object
Returns the value of attribute actionStr.
6 7 8 |
# File 'lib/yasysdui/command_button.rb', line 6 def actionStr @actionStr end |
#ctrl ⇒ Object
Returns the value of attribute ctrl.
5 6 7 |
# File 'lib/yasysdui/command_button.rb', line 5 def ctrl @ctrl end |