# File tk/lib/tkextlib/tktable/tktable.rb, line 138
def self.id2obj(table, id)
tpath = table.path
CellTagID_TBL.mutex.synchronize{
if CellTagID_TBL[tpath]
CellTagID_TBL[tpath][id]? CellTagID_TBL[tpath][id] : id
else
id
end
}
end
# File tk/lib/tkextlib/tktable/tktable.rb, line 149
def initialize(parent, keys=nil)
@parent = @t = parent
@tpath - parent.path
CellTag_ID.mutex.synchronize{
@path = @id = CellTag_ID.join(TkCore::INTERP._ip_id_)
CellTag_ID[1].succ!
}
CellTagID_TBL.mutex.synchronize{
CellTagID_TBL[@tpath] = {} unless CellTagID_TBL[@tpath]
CellTagID_TBL[@tpath][@id] = self
}
configure(keys) if keys
end
# File tk/lib/tkextlib/tktable/tktable.rb, line 183
def add_cell(*args)
@t.tag_cell(@id, *args)
end
# File tk/lib/tkextlib/tktable/tktable.rb, line 186
def add_col(*args)
@t.tag_col(@id, *args)
end
# File tk/lib/tkextlib/tktable/tktable.rb, line 189
def add_row(*args)
@t.tag_row(@id, *args)
end
# File tk/lib/tkextlib/tktable/tktable.rb, line 200
def cget(key)
@t.tag_cget(@id, key)
end
# File tk/lib/tkextlib/tktable/tktable.rb, line 203
def cget_strict(key)
@t.tag_cget_strict(@id, key)
end
# File tk/lib/tkextlib/tktable/tktable.rb, line 209
def configinfo(key=nil)
@t.tag_configinfo(@id, key)
end
# File tk/lib/tkextlib/tktable/tktable.rb, line 206
def configure(key, val=None)
@t.tag_configure(@id, key, val)
end
# File tk/lib/tkextlib/tktable/tktable.rb, line 212
def current_configinfo(key=nil)
@t.current_tag_configinfo(@id, key)
end
# File tk/lib/tkextlib/tktable/tktable.rb, line 167
def destroy
tk_call(@tpath, 'tag', 'delete', @id)
CellTagID_TBL.mutex.synchronize{
CellTagID_TBL[@tpath].delete(@id) if CellTagID_TBL[@tpath]
}
self
end
# File tk/lib/tkextlib/tktable/tktable.rb, line 176
def exist?
@t.tag_exist?(@id)
end
# File tk/lib/tkextlib/tktable/tktable.rb, line 179
def include?(idx)
@t.tag_include?(@id, idx)
end
# File tk/lib/tkextlib/tktable/tktable.rb, line 196
def lower(target=None)
@t.tag_lower(@id, target)
end
Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.
If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.
If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.
If you want to help improve the Ruby documentation, please visit Documenting-ruby.org.