summaryrefslogtreecommitdiff
path: root/jni/ruby/ext/tk/lib/tkextlib/iwidgets/disjointlistbox.rb
blob: 07ab025cdff1b5911dc058e47bd1dffa28e403fa (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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#
#  tkextlib/iwidgets/disjointlistbox.rb
#                               by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
#

require 'tk'
require 'tkextlib/iwidgets.rb'

module Tk
  module Iwidgets
    class  Disjointlistbox < Tk::Itk::Widget
    end
  end
end

class Tk::Iwidgets::Disjointlistbox
  TkCommandNames = ['::iwidgets::disjointlistbox'.freeze].freeze
  WidgetClassName = 'Disjointlistbox'.freeze
  WidgetClassNames[WidgetClassName] ||= self

  def __strval_optkeys
    super() << 'lhslabeltext' << 'rhslabeltext' << 'lhsbuttonlabel' << 'rhsbuttonlabel'
  end
  private :__strval_optkeys

  def set_lhs(*items)
    tk_call(@path, 'setlhs', items)
    self
  end
  def set_rhs(*items)
    tk_call(@path, 'setrhs', items)
    self
  end

  def get_lhs
    simplelist(tk_call(@path, 'getlhs'))
  end
  def get_rhs
    simplelist(tk_call(@path, 'getrhs'))
  end

  def insert_lhs(*items)
    tk_call(@path, 'insertlhs', items)
    self
  end
  def insert_rhs(*items)
    tk_call(@path, 'insertrhs', items)
    self
  end
end