Class: CommandButton

Inherits:
Gtk::Button
  • Object
show all
Defined in:
lib/yasysdui/command_button.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#actionStrObject

Returns the value of attribute actionStr.



6
7
8
# File 'lib/yasysdui/command_button.rb', line 6

def actionStr
  @actionStr
end

#ctrlObject

Returns the value of attribute ctrl.



5
6
7
# File 'lib/yasysdui/command_button.rb', line 5

def ctrl
  @ctrl
end