Class: VRTreeview::VRTreeviewItem

Inherits:
Object
  • Object
show all
Defined in:
lib/vr/vrtvitem.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#hitemObject (readonly)

Returns the value of attribute hitem.



61
62
63
# File 'lib/vr/vrtvitem.rb', line 61

def hitem
  @hitem
end

#treeviewObject (readonly)

Returns the value of attribute treeview.



60
61
62
# File 'lib/vr/vrtvitem.rb', line 60

def treeview
  @treeview
end

Instance Method Details

#eachChildObject



94
95
96
97
98
99
100
# File 'lib/vr/vrtvitem.rb', line 94

def eachChild
  r = firstChild
  while r.hitem do
    yield r 
    r = r.nextSibling
  end
end

#firstChildObject



87
88
89
# File 'lib/vr/vrtvitem.rb', line 87

def firstChild
  VRTreeviewItem.new( @treeview,@treeview.getChildOf(@hitem) )
end

#insertChildAfter(item, text, lparam = 0) ⇒ Object



79
80
81
# File 'lib/vr/vrtvitem.rb', line 79

def insertChildAfter(item,text,lparam=0)
  _vr_addChild(item.hitem,text,lparam)
end

#insertChildFirst(text, lparam = 0) ⇒ Object



73
74
75
# File 'lib/vr/vrtvitem.rb', line 73

def insertChildFirst(text,lparam=0)
  _vr_addChild(WConst::TVI_FIRST,text,lparam)
end

#insertChildLast(text, lparam = 0) ⇒ Object Also known as: addChild



76
77
78
# File 'lib/vr/vrtvitem.rb', line 76

def insertChildLast(text,lparam=0)
  _vr_addChild(WConst::TVI_LAST,text,lparam)
end

#nextSiblingObject



90
91
92
# File 'lib/vr/vrtvitem.rb', line 90

def nextSibling
  VRTreeviewItem.new( @treeview,@treeview.getNextSiblingOf(@hitem) )
end

#parentObject



84
85
86
# File 'lib/vr/vrtvitem.rb', line 84

def parent
  VRTreeviewItem.new( @treeview,@treeview.getParentOf(@hitem) )
end