In Files

  • tk/lib/tkextlib/tile/treeview.rb

Class/Module Index [+]

Quicksearch

Tk::Tile::Treeview::Tag

Constants

TagID_TBL
Tag_ID

Public Class Methods

id2obj(tree, id) click to toggle source
 
               # File tk/lib/tkextlib/tile/treeview.rb, line 954
def self.id2obj(tree, id)
  tpath = tree.path
  Tk::Tile::Treeview::Tag::TagID_TBL.mutex.synchronize{
    if Tk::Tile::Treeview::Tag::TagID_TBL[tpath]
      (Tk::Tile::Treeview::Tag::TagID_TBL[tpath][id])?                 Tk::Tile::Treeview::Tag::TagID_TBL[tpath][id]: id
    else
      id
    end
  }
end
            
new(tree, keys=nil) click to toggle source
 
               # File tk/lib/tkextlib/tile/treeview.rb, line 966
def initialize(tree, keys=nil)
  @parent = @t = tree
  @tpath = tree.path
  Tag_ID.mutex.synchronize{
    @path = @id = Tag_ID.join(TkCore::INTERP._ip_id_)
    Tag_ID[1].succ!
  }
  TagID_TBL.mutex.synchronize{
    TagID_TBL[@tpath] = {} unless TagID_TBL[@tpath]
    TagID_TBL[@tpath][@id] = self
  }
  if keys && keys != None
    tk_call_without_enc(@tpath, 'tag', 'configure', @id, *hash_kv(keys,true))
  end
end
            

Public Instance Methods

add(*items) click to toggle source
 
               # File tk/lib/tkextlib/tile/treeview.rb, line 994
def add(*items)
  @t.tag_add(@id, *items)
end
            
added?(item) click to toggle source
Alias for: tag_has?
bind(seq, *args) click to toggle source
 
               # File tk/lib/tkextlib/tile/treeview.rb, line 1002
def bind(seq, *args)
  if TkComm._callback_entry?(args[0]) || !block_given?
    cmd = args.shift
  else
    cmd = Proc.new
  end
  @t.tag_bind(@id, seq, cmd, *args)
  self
end
            
bind_append(seq, *args) click to toggle source
 
               # File tk/lib/tkextlib/tile/treeview.rb, line 1012
def bind_append(seq, *args)
  if TkComm._callback_entry?(args[0]) || !block_given?
    cmd = args.shift
  else
    cmd = Proc.new
  end
  @t.tag_bind_append(@id, seq, cmd, *args)
  self
end
            
bind_remove(seq) click to toggle source
 
               # File tk/lib/tkextlib/tile/treeview.rb, line 1022
def bind_remove(seq)
  @t.tag_bind_remove(@id, seq)
  self
end
            
bindinfo(seq=nil) click to toggle source
 
               # File tk/lib/tkextlib/tile/treeview.rb, line 1027
def bindinfo(seq=nil)
  @t.tag_bindinfo(@id, seq)
end
            
cget(option) click to toggle source
 
               # File tk/lib/tkextlib/tile/treeview.rb, line 1034
def cget(option)
  @t.tagcget(@id, option)
end
            
cget_strict(option) click to toggle source
 
               # File tk/lib/tkextlib/tile/treeview.rb, line 1037
def cget_strict(option)
  @t.tagcget_strict(@id, option)
end
            
cget_tkstring(option) click to toggle source
 
               # File tk/lib/tkextlib/tile/treeview.rb, line 1031
def cget_tkstring(option)
  @t.tagcget_tkstring(@id, option)
end
            
configinfo(key=nil) click to toggle source
 
               # File tk/lib/tkextlib/tile/treeview.rb, line 1046
def configinfo(key=nil)
  @t.tagconfiginfo(@id, key)
end
            
configure(key, value=None) click to toggle source
 
               # File tk/lib/tkextlib/tile/treeview.rb, line 1041
def configure(key, value=None)
  @t.tagconfigure(@id, key, value)
  self
end
            
current_configinfo(key=nil) click to toggle source
 
               # File tk/lib/tkextlib/tile/treeview.rb, line 1050
def current_configinfo(key=nil)
  @t.current_tagconfiginfo(@id, key)
end
            
id() click to toggle source
 
               # File tk/lib/tkextlib/tile/treeview.rb, line 981
def id
  @id
end
            
mutex() click to toggle source
 
               # File tk/lib/tkextlib/tile/treeview.rb, line 944
def mutex; @mutex; end
            
remove(*items) click to toggle source
 
               # File tk/lib/tkextlib/tile/treeview.rb, line 998
def remove(*items)
  @t.tag_remove(@id, *items)
end
            
tag_has() click to toggle source
 
               # File tk/lib/tkextlib/tile/treeview.rb, line 990
def tag_has
  @t.tag_has(@id)
end
            
tag_has?(item) click to toggle source
 
               # File tk/lib/tkextlib/tile/treeview.rb, line 985
def tag_has?(item)
  @t.tag_has?(@id, item)
end
            
Also aliased as: added?

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.