Class: Fox::FXTreeItem
- Inherits:
-
FXObject
- Object
- FXObject
- Fox::FXTreeItem
- Includes:
- Enumerable
- Defined in:
- rdoc-sources/FXTreeList.rb,
lib/fox16/core.rb,
lib/fox16/iterators.rb
Overview
Direct Known Subclasses
Instance Method Summary (collapse)
- - (Object) <=>(otherItem)
-
- (Object) above
Return a reference to the item that is "logically" above this item.
-
- (Object) below
Return a reference to the item that is "logically" below this item.
-
- (Boolean) childOf?(item)
Return true if this item is a descendant of item.
-
- (Object) closedIcon
Return a reference to the closed-state icon (an FXIcon instance) for this tree item, or nil if none was specified.
-
- (Object) create
Create this tree item.
-
- (Object) data
Return a reference to the user data for this tree item, or nil if no user data has been associated with this tree item.
-
- (Object) data=(dt)
Set the user data (a reference to any kind of object) for this tree item, or nil if no user data needs to be associated with this item.
-
- (Object) destroy
Destroy this tree item.
-
- (Object) detach
Detach this tree item.
-
- (Object) draggable=(dr)
Set this item's "draggable" state to true or false.
-
- (Boolean) draggable?
Returns true if this item is draggable.
-
- (Object) each
Calls block once for each child of this tree item, passing a reference to that child item as a parameter.
-
- (Object) enabled=(en)
Set this item's enabled state to true or false.
-
- (Boolean) enabled?
Returns true if this item is enabled.
-
- (Object) expanded=(ex)
Set this item's expanded state to true or false.
-
- (Boolean) expanded?
Returns true if this item is expanded.
-
- (Object) first
Return a reference to the first child item for this tree item, or nil if this tree item has no child items.
-
- (Object) getHeight(treeList)
Get the height of this item.
-
- (Object) getWidth(treeList)
Get the width of this item.
-
- (Boolean) hasFocus?
Returns true if this item has the focus.
-
- (Object) hasItems=(flag)
Change has items flag to true or false.
-
- (Boolean) hasItems?
Return true if this items has subitems, real or imagined.
-
- (FXTreeItem) initialize(text, openIcon = nil, closedIcon = nil, data = nil)
constructor
Return a new FXTreeItem instance, initialized with the specified text, open-state icon, closed-state icon and user data.
-
- (Object) last
Return a reference to the last child item for this tree item, or nil if this tree item has no child items.
-
- (Object) next
Return a reference to the next sibling item for this tree item, or nil if this is the last item in the parent item's list of child items.
-
- (Object) numChildren
Return the number of child items for this tree item.
-
- (Object) opened=(op)
Set this item's "opened" state to true or false.
-
- (Boolean) opened?
Returns true if this item is opened.
-
- (Object) openIcon
Return a reference to the opened-state icon (an FXIcon instance) for this tree item, or nil if none was specified.
-
- (Object) parent
Return a reference to the parent item for this tree item, or nil if this is a root-level item.
-
- (Boolean) parentOf?(item)
Return true if this item is an ancestor of item.
-
- (Object) prev
Return a reference to the previous sibling item for this tree item, or nil if this is the first item in the parent item's list of child items.
-
- (Object) selected=(sel)
Set this item's selected state to true or false.
-
- (Boolean) selected?
Returns true if this item is selected.
-
- (Object) setClosedIcon(ci, owned = false)
Set the closed-state icon (an FXIcon instance) for this tree item, or nil if no icon should be used.
-
- (Object) setFocus(focus)
Set the focus on this tree item (focus is either true or false).
-
- (Object) setOpenIcon(oi, owned = false)
Set the opened-state icon (an FXIcon instance) for this tree item, or nil if no icon should be used.
-
- (Object) text
Return the item text (a string) for this tree item.
-
- (Object) text=(txt)
Set the item text for this tree item.
-
- (Object) to_s
Returns the item's text.
Methods inherited from FXObject
#bind, #handle, #load, #save, subclasses
Constructor Details
- (FXTreeItem) initialize(text, openIcon = nil, closedIcon = nil, data = nil)
Return a new FXTreeItem instance, initialized with the specified text, open-state icon, closed-state icon and user data.
16 17 |
# File 'rdoc-sources/FXTreeList.rb', line 16 def initialize(text, openIcon=nil, closedIcon=nil, data=nil) # :yields: theItem end |
Instance Method Details
- (Object) <=>(otherItem)
16 17 18 |
# File 'lib/fox16/core.rb', line 16 def <=>(otherItem) text <=> otherItem.text end |
- (Object) above
Return a reference to the item that is "logically" above this item.
120 |
# File 'rdoc-sources/FXTreeList.rb', line 120 def above; end |
- (Object) below
Return a reference to the item that is "logically" below this item.
117 |
# File 'rdoc-sources/FXTreeList.rb', line 117 def below; end |
- (Boolean) childOf?(item)
Return true if this item is a descendant of item.
125 |
# File 'rdoc-sources/FXTreeList.rb', line 125 def childOf?(item); end |
- (Object) closedIcon
Return a reference to the closed-state icon (an FXIcon instance) for this tree item, or nil if none was specified.
38 |
# File 'rdoc-sources/FXTreeList.rb', line 38 def closedIcon; end |
- (Object) create
Create this tree item
144 |
# File 'rdoc-sources/FXTreeList.rb', line 144 def create; end |
- (Object) data
Return a reference to the user data for this tree item, or nil if no user data has been associated with this tree item.
46 |
# File 'rdoc-sources/FXTreeList.rb', line 46 def data; end |
- (Object) data=(dt)
Set the user data (a reference to any kind of object) for this tree item, or nil if no user data needs to be associated with this item.
50 |
# File 'rdoc-sources/FXTreeList.rb', line 50 def data=(dt); end |
- (Object) destroy
Destroy this tree item
150 |
# File 'rdoc-sources/FXTreeList.rb', line 150 def destroy; end |
- (Object) detach
Detach this tree item
147 |
# File 'rdoc-sources/FXTreeList.rb', line 147 def detach; end |
- (Object) draggable=(dr)
Set this item's "draggable" state to true or false.
83 |
# File 'rdoc-sources/FXTreeList.rb', line 83 def draggable=(dr); end |
- (Boolean) draggable?
Returns true if this item is draggable
86 |
# File 'rdoc-sources/FXTreeList.rb', line 86 def draggable? ; end |
- (Object) each
Calls block once for each child of this tree item, passing a reference to that child item as a parameter.
201 202 203 204 205 206 207 208 209 |
# File 'lib/fox16/iterators.rb', line 201 def each # :yields: aTreeItem current = first while current != nil next_current = current.next yield current current = next_current end self end |
- (Object) enabled=(en)
Set this item's enabled state to true or false.
77 |
# File 'rdoc-sources/FXTreeList.rb', line 77 def enabled=(en); end |
- (Boolean) enabled?
Returns true if this item is enabled
80 |
# File 'rdoc-sources/FXTreeList.rb', line 80 def enabled? ; end |
- (Object) expanded=(ex)
Set this item's expanded state to true or false.
71 |
# File 'rdoc-sources/FXTreeList.rb', line 71 def (ex); end |
- (Boolean) expanded?
Returns true if this item is expanded
74 |
# File 'rdoc-sources/FXTreeList.rb', line 74 def ; end |
- (Object) first
Return a reference to the first child item for this tree item, or nil if this tree item has no child items.
100 |
# File 'rdoc-sources/FXTreeList.rb', line 100 def first; end |
- (Object) getHeight(treeList)
Get the height of this item
141 |
# File 'rdoc-sources/FXTreeList.rb', line 141 def getHeight(treeList) ; end |
- (Object) getWidth(treeList)
Get the width of this item
138 |
# File 'rdoc-sources/FXTreeList.rb', line 138 def getWidth(treeList) ; end |
- (Boolean) hasFocus?
Returns true if this item has the focus
56 |
# File 'rdoc-sources/FXTreeList.rb', line 56 def hasFocus? ; end |
- (Object) hasItems=(flag)
Change has items flag to true or false.
92 |
# File 'rdoc-sources/FXTreeList.rb', line 92 def hasItems=(flag); end |
- (Boolean) hasItems?
Return true if this items has subitems, real or imagined.
89 |
# File 'rdoc-sources/FXTreeList.rb', line 89 def hasItems?; end |
- (Object) last
Return a reference to the last child item for this tree item, or nil if this tree item has no child items.
104 |
# File 'rdoc-sources/FXTreeList.rb', line 104 def last; end |
- (Object) next
Return a reference to the next sibling item for this tree item, or nil if this is the last item in the parent item's list of child items.
109 |
# File 'rdoc-sources/FXTreeList.rb', line 109 def next; end |
- (Object) numChildren
Return the number of child items for this tree item.
20 |
# File 'rdoc-sources/FXTreeList.rb', line 20 def numChildren; end |
- (Object) opened=(op)
Set this item's "opened" state to true or false.
65 |
# File 'rdoc-sources/FXTreeList.rb', line 65 def opened=(op); end |
- (Boolean) opened?
Returns true if this item is opened
68 |
# File 'rdoc-sources/FXTreeList.rb', line 68 def opened? ; end |
- (Object) openIcon
Return a reference to the opened-state icon (an FXIcon instance) for this tree item, or nil if none was specified.
30 |
# File 'rdoc-sources/FXTreeList.rb', line 30 def openIcon; end |
- (Object) parent
Return a reference to the parent item for this tree item, or nil if this is a root-level item.
96 |
# File 'rdoc-sources/FXTreeList.rb', line 96 def parent; end |
- (Boolean) parentOf?(item)
Return true if this item is an ancestor of item.
130 |
# File 'rdoc-sources/FXTreeList.rb', line 130 def parentOf?(item); end |
- (Object) prev
Return a reference to the previous sibling item for this tree item, or nil if this is the first item in the parent item's list of child items.
114 |
# File 'rdoc-sources/FXTreeList.rb', line 114 def prev; end |
- (Object) selected=(sel)
Set this item's selected state to true or false.
59 |
# File 'rdoc-sources/FXTreeList.rb', line 59 def selected=(sel); end |
- (Boolean) selected?
Returns true if this item is selected
62 |
# File 'rdoc-sources/FXTreeList.rb', line 62 def selected? ; end |
- (Object) setClosedIcon(ci, owned = false)
Set the closed-state icon (an FXIcon instance) for this tree item, or nil if no icon should be used.
42 |
# File 'rdoc-sources/FXTreeList.rb', line 42 def setClosedIcon(ci, owned=false); end |
- (Object) setFocus(focus)
Set the focus on this tree item (focus is either true or false)
53 |
# File 'rdoc-sources/FXTreeList.rb', line 53 def setFocus(focus) ; end |
- (Object) setOpenIcon(oi, owned = false)
Set the opened-state icon (an FXIcon instance) for this tree item, or nil if no icon should be used.
34 |
# File 'rdoc-sources/FXTreeList.rb', line 34 def setOpenIcon(oi, owned=false); end |
- (Object) text
Return the item text (a string) for this tree item.
23 |
# File 'rdoc-sources/FXTreeList.rb', line 23 def text; end |
- (Object) text=(txt)
Set the item text for this tree item.
26 |
# File 'rdoc-sources/FXTreeList.rb', line 26 def text=(txt); end |
- (Object) to_s
Returns the item's text
133 134 135 |
# File 'rdoc-sources/FXTreeList.rb', line 133 def to_s text end |