Module: Glimmer::Tk::Commandable

Included in:
ButtonProxy, CheckbuttonProxy, RadiobuttonProxy, ScrollbarProxy
Defined in:
lib/glimmer/tk/commandable.rb

Overview

Represents widgets that can invoke a command

Instance Method Summary collapse

Instance Method Details

#command_block=(proc) ⇒ Object



28
29
30
# File 'lib/glimmer/tk/commandable.rb', line 28

def command_block=(proc)
  tk.command(proc)
end

#handle_listener(listener_name, &listener) ⇒ Object



32
33
34
35
36
37
38
39
# File 'lib/glimmer/tk/commandable.rb', line 32

def handle_listener(listener_name, &listener)
  case listener_name.to_s.downcase
  when 'command'
    command(listener)
  else
    super
  end
end