summaryrefslogtreecommitdiff
path: root/ext/tk/lib/tkextlib/tcllib/canvas_sqmap.rb
blob: 0bd59511c11b4ce198b19a07aada0bc5021b1baf (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
#
#  tkextlib/tcllib/canvas.rb
#                               by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
#
#   * Part of tcllib extension
#   * 
#

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

# TkPackage.require('widget::canvas_sqmap', '0.2')
TkPackage.require('widget::canvas_sqmap')

module Tk::Tcllib
  module Widget
    class Canvas_Sqmap < Canvas
      TkCommandNames = ['::widget::canvas_sqmap'.freeze].freeze

      def image_set(cell, img)
        tk_send('image', 'set', cell, img)
        self
      end

      def image_unset(cell)
        tk_send('image', 'unset', cell)
        self
      end

      def flush
        tk_send('flush')
        self
      end
    end
  end
end