diff options
author | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-12-17 07:31:51 +0000 |
---|---|---|
committer | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-12-17 07:31:51 +0000 |
commit | cb2349d653e70e77e189ae6ef8b11b26c50b4261 (patch) | |
tree | 82ea520263e3492c6eedccba2ab2dfaac161d5fd /ext/tk/lib/tk/textmark.rb | |
parent | 3da93dd84287874fdefe439384efcc3d56d1c07f (diff) |
* ext/tk/lib/tk.rb: fix bug on setting up system encoding
* ext/tk/lib/tk/event.rb: fix error on require process
* ext/tk/lib/font.rb: fix abnormal termination error on Windows
* ext/tk/lib/tk/virtevent.rb: TkVirtualEvent::PreDefVirtEvent.new()
accepts event-sequence arguments
* ext/tk/lib/text.rb: fail to dump embedded images
* ext/tk/lib/text.rb: tag_nextrange and tag_prevrange returns wrong
types of values
* ext/tk/lib/texttag.rb: nextrange and prevrange returns wrong types of values
* ext/tk/lib/text.rb: add TkText::IndexModMethods module and
TkText::IndexString class to treat text index modifiers
* ext/tk/lib/texttag.rb: use TkText::IndexModMethods module
* ext/tk/lib/textmark.rb: ditto
* ext/tk/lib/textimage.rb: ditto
* ext/tk/lib/textwindow.rb: ditto
* ext/tk/lib/textimage.rb: wrong gravity of text mark for embedded image
* ext/tk/lib/textwindow.rb: wrong gravity of text mark for embedded window
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/lib/tk/textmark.rb')
-rw-r--r-- | ext/tk/lib/tk/textmark.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/ext/tk/lib/tk/textmark.rb b/ext/tk/lib/tk/textmark.rb index fbe57a4cc3..9dff764eca 100644 --- a/ext/tk/lib/tk/textmark.rb +++ b/ext/tk/lib/tk/textmark.rb @@ -5,6 +5,8 @@ require 'tk' require 'tk/text' class TkTextMark<TkObject + include TkText::IndexModMethods + TMarkID_TBL = TkCore::INTERP.create_table Tk_TextMark_ID = ['mark'.freeze, '00000'.taint].freeze @@ -23,7 +25,7 @@ class TkTextMark<TkObject @parent = @t = parent @tpath = parent.path # @path = @id = Tk_TextMark_ID.join('') - @path = @id = Tk_TextMark_ID.join(TkCore::INTERP._ip_id_) + @path = @id = Tk_TextMark_ID.join(TkCore::INTERP._ip_id_).freeze TMarkID_TBL[@id] = self TMarkID_TBL[@tpath] = {} unless TMarkID_TBL[@tpath] TMarkID_TBL[@tpath][@id] = self @@ -34,7 +36,7 @@ class TkTextMark<TkObject end def id - @id + TkText::IndexString.new(@id) end def exist? @@ -46,10 +48,10 @@ class TkTextMark<TkObject end def +(mod) - @id + ' + ' + mod + TkText::IndexString.new(@id + ' + ' + mod) end def -(mod) - @id + ' - ' + mod + TkText::IndexString.new(@id + ' - ' + mod) end def set(where) |