summaryrefslogtreecommitdiff
path: root/jni/ruby/ext/tk/lib/tkextlib/tcllib/tablelist_tile.rb
blob: 0a1458415ef80d88290898da952019b1cf8cf415 (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
#
#  tkextlib/tcllib/tablelist_tlie.rb
#                               by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
#
#   * Part of tcllib extension
#   * A multi-column listbox

require 'tk'
require 'tkextlib/tcllib.rb'

# TkPackage.require('tablelist_tile', '4.2')
TkPackage.require('tablelist_tile')

unless defined? Tk::Tcllib::Tablelist_usingTile
  Tk::Tcllib::Tablelist_usingTile = true
end

requrie 'tkextlib/tcllib/tablelist_core'

module Tk
  module Tcllib
    class Tablelist
      # commands related to tile Themems
      def self.set_theme(theme)
        Tk.tk_call('::tablelist::setTheme', theme)
      end

      def self.get_current_theme
        Tk.tk_call('::tablelist::getCurrentTheme')
      end

      def self.get_theme_list
        TkComm.simplelist(Tk.tk_call('::tablelist::getThemes'))
      end
      def self.set_theme_defaults
        Tk.tk_call('::tablelist::setThemeDefaults')
      end
    end

    Tablelist_Tile = Tablelist
    TableList_Tile = Tablelist
  end
end