In Files

  • tk/lib/tkextlib/treectrl/tktreectrl.rb

Class/Module Index [+]

Quicksearch

Tk::TreeCtrl::Style

Public Class Methods

id2obj(tree, id) click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2095
def self.id2obj(tree, id)
  tpath = tree.path
  return id unless Tk::TreeCtrl::Style::TreeCtrlStyleID_TBL[tpath]
  Tk::TreeCtrl::Style::TreeCtrlStyleID_TBL[tpath][id]? \
               Tk::TreeCtrl::Style::TreeCtrlStyleID_TBL[tpath][id] : id
end
            
new(parent, keys=nil) click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2102
def initialize(parent, keys=nil)
  @tree = parent
  @tpath = parent.path
  @path = @id = 
    Tk::TreeCtrl::Style::TreeCtrlStyleID.join(TkCore::INTERP._ip_id_)
  unless Tk::TreeCtrl::Style::TreeCtrlStyleID_TBL[@tpath]
    Tk::TreeCtrl::Style::TreeCtrlStyleID_TBL[@tpath] = {} 
  end
  Tk::TreeCtrl::Style::TreeCtrlStyleID_TBL[@tpath][@id] = self
  Tk::TreeCtrl::Style::TreeCtrlStyleID[1].succ!

  @tree.style_create(@id, keys)
end
            

Public Instance Methods

cget(opt) click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2124
def cget(opt)
  @tree.style_cget(@id, opt)
end
            
configinfo(*args) click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2132
def configinfo(*args)
  @tree.style_configinfo(@id, *args)
end
            
configure(*args) click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2128
def configure(*args)
  @tree.style_configure(@id, *args)
end
            
current_configinfo(*args) click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2136
def current_configinfo(*args)
  @tree.current_style_configinfo(@id, *args)
end
            
delete() click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2140
def delete
  @tree.style_delete(@id)
  self
end
            
elements(*elems) click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2145
def elements(*elems)
  if elems.empty?
    @tree.style_elements(@id)
  else
    @tree.style_elements(@id, *elems)
    self
  end
end
            
id() click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2116
def id
  @id
end
            
layout(elem, keys=None) click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2154
def layout(elem, keys=None)
  if keys && keys != None && keys.kind_of?(Hash)
    @tree.style_layout(@id, elem, keys)
    self
  else
    @tree.style_layout(@id, elem, keys)
  end
end
            
to_s() click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2120
def to_s
  @id.dup
end