class Tk::TkTable::CellTag
Constants
- CellTagID_TBL
- CellTag_ID
Public Class Methods
id2obj(table, id)
click to toggle source
# File lib/tkextlib/tktable/tktable.rb, line 145 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
new(parent, keys=nil)
click to toggle source
# File lib/tkextlib/tktable/tktable.rb, line 156 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
Public Instance Methods
add_cell(*args)
click to toggle source
# File lib/tkextlib/tktable/tktable.rb, line 190 def add_cell(*args) @t.tag_cell(@id, *args) end
add_col(*args)
click to toggle source
# File lib/tkextlib/tktable/tktable.rb, line 193 def add_col(*args) @t.tag_col(@id, *args) end
add_row(*args)
click to toggle source
# File lib/tkextlib/tktable/tktable.rb, line 196 def add_row(*args) @t.tag_row(@id, *args) end
cget(key)
click to toggle source
# File lib/tkextlib/tktable/tktable.rb, line 210 def cget(key) @t.tag_cget(@id, key) end
cget_strict(key)
click to toggle source
# File lib/tkextlib/tktable/tktable.rb, line 213 def cget_strict(key) @t.tag_cget_strict(@id, key) end
cget_tkstring(key)
click to toggle source
# File lib/tkextlib/tktable/tktable.rb, line 207 def cget_tkstring(key) @t.tag_cget_tkstring(@id, key) end
configinfo(key=nil)
click to toggle source
# File lib/tkextlib/tktable/tktable.rb, line 219 def configinfo(key=nil) @t.tag_configinfo(@id, key) end
configure(key, val=None)
click to toggle source
# File lib/tkextlib/tktable/tktable.rb, line 216 def configure(key, val=None) @t.tag_configure(@id, key, val) end
current_configinfo(key=nil)
click to toggle source
# File lib/tkextlib/tktable/tktable.rb, line 222 def current_configinfo(key=nil) @t.current_tag_configinfo(@id, key) end
destroy()
click to toggle source
# File lib/tkextlib/tktable/tktable.rb, line 174 def destroy tk_call(@tpath, 'tag', 'delete', @id) CellTagID_TBL.mutex.synchronize{ CellTagID_TBL[@tpath].delete(@id) if CellTagID_TBL[@tpath] } self end
Also aliased as: delete
exist?()
click to toggle source
# File lib/tkextlib/tktable/tktable.rb, line 183 def exist? @t.tag_exist?(@id) end
id()
click to toggle source
# File lib/tkextlib/tktable/tktable.rb, line 170 def id @id end
include?(idx)
click to toggle source
# File lib/tkextlib/tktable/tktable.rb, line 186 def include?(idx) @t.tag_include?(@id, idx) end
lower(target=None)
click to toggle source
# File lib/tkextlib/tktable/tktable.rb, line 203 def lower(target=None) @t.tag_lower(@id, target) end
mutex()
click to toggle source
# File lib/tkextlib/tktable/tktable.rb, line 137 def mutex; @mutex; end
raise(target=None)
click to toggle source
# File lib/tkextlib/tktable/tktable.rb, line 200 def raise(target=None) @t.tag_raise(@id, target) end