summaryrefslogtreecommitdiff
path: root/ext/tk/lib/tk/radiobutton.rb
blob: 697c02128372f69173d963cea5b99a8cad1c5115 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#
# tk/radiobutton.rb : treat radiobutton widget
#
require 'tk'
require 'tk/button'

class TkRadioButton<TkButton
  TkCommandNames = ['radiobutton'.freeze].freeze
  WidgetClassName = 'Radiobutton'.freeze
  WidgetClassNames[WidgetClassName] = self
  #def create_self(keys)
  #  if keys and keys != None
  #    tk_call_without_enc('radiobutton', @path, *hash_kv(keys, true))
  #  else
  #    tk_call_without_enc('radiobutton', @path)
  #  end
  #end
  #private :create_self

  def deselect
    tk_send_without_enc('deselect')
    self
  end
  def select
    tk_send_without_enc('select')
    self
  end
  def variable(v)
    configure 'variable', tk_trace_variable(v)
  end
end
TkRadiobutton = TkRadioButton