summaryrefslogtreecommitdiff
path: root/ext/tk/lib/tk/texttag.rb
diff options
context:
space:
mode:
authornagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-07-01 09:38:48 +0000
committernagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-07-01 09:38:48 +0000
commitffcedd79505ea2e99f859c7cea2fb2221c948d4c (patch)
tree02232516faf0e1959ecb5d5b7aca25a52f9f87ca /ext/tk/lib/tk/texttag.rb
parent73cf1d02bac2dbdd5d7f673a33d81444a00c865e (diff)
* ext/tk/lib/tcltklib : bug fix
* ext/tk/lib/tk : bug fix and add Tcl/Tk extension support libraries git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/lib/tk/texttag.rb')
-rw-r--r--ext/tk/lib/tk/texttag.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/ext/tk/lib/tk/texttag.rb b/ext/tk/lib/tk/texttag.rb
index 561a027f08..17909bbfcf 100644
--- a/ext/tk/lib/tk/texttag.rb
+++ b/ext/tk/lib/tk/texttag.rb
@@ -49,6 +49,14 @@ class TkTextTag<TkObject
@id
end
+ def exist?
+ if ( tk_split_simplelist(_fromUTF8(tk_call_without_enc(@t.path, 'tag', 'names'))).find{|id| id == @id } )
+ true
+ else
+ false
+ end
+ end
+
def first
@id + '.first'
end
@@ -100,6 +108,10 @@ class TkTextTag<TkObject
end
def cget(key)
+ @t.tag_cget @id, key
+ end
+=begin
+ def cget(key)
case key.to_s
when 'text', 'label', 'show', 'data', 'file'
_fromUTF8(tk_call_without_enc(@t.path, 'tag', 'cget', @id, "-#{key}"))
@@ -121,6 +133,7 @@ class TkTextTag<TkObject
@id, "-#{key}")))
end
end
+=end
def configure(key, val=None)
@t.tag_configure @id, key, val