summaryrefslogtreecommitdiff
path: root/jni/ruby/ext/tk/lib/tkextlib/tcllib/canvas_sqmap.rb
blob: ba87cd3aae20387b729f5893071048f2d93edfb1 (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