aboutsummaryrefslogtreecommitdiffstats
path: root/ext/tk/lib/tkextlib/tcllib/canvas_sqmap.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/tk/lib/tkextlib/tcllib/canvas_sqmap.rb')
-rw-r--r--ext/tk/lib/tkextlib/tcllib/canvas_sqmap.rb36
1 files changed, 36 insertions, 0 deletions
diff --git a/ext/tk/lib/tkextlib/tcllib/canvas_sqmap.rb b/ext/tk/lib/tkextlib/tcllib/canvas_sqmap.rb
new file mode 100644
index 0000000000..0bd59511c1
--- /dev/null
+++ b/ext/tk/lib/tkextlib/tcllib/canvas_sqmap.rb
@@ -0,0 +1,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