Class Fox::FXTreeItem
In: rdoc-sources/FXTreeList.rb
Parent: FXObject

Each item in an FXTreeList is an instance of FXTreeItem.

A tree item can contain zero or more child items, and those items are arranged as a linked list. The FXTreeItem#first method returns the a reference to the first child item, if any, and the FXTreeItem#last method returns a reference to the last child item.

Methods

above   below   childOf?   closedIcon   create   data   data=   destroy   detach   draggable=   draggable?   enabled=   enabled?   expanded=   expanded?   first   getHeight   getWidth   hasFocus?   hasItems=   hasItems?   last   new   next   numChildren   openIcon   opened=   opened?   parent   parentOf?   prev   selected=   selected?   setClosedIcon   setFocus   setOpenIcon   text   text=   to_s  

Public Class methods

Return a new FXTreeItem instance, initialized with the specified text, open-state icon, closed-state icon and user data.

Public Instance methods

Return a reference to the item that is "logically" above this item.

Return a reference to the item that is "logically" below this item.

Return true if this item is a descendant of item.

Return a reference to the closed-state icon (an FXIcon instance) for this tree item, or nil if none was specified.

Create this tree item

Return a reference to the user data for this tree item, or nil if no user data has been associated with this tree item.

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.

Destroy this tree item

Detach this tree item

Set this item‘s "draggable" state to true or false.

Returns true if this item is draggable

Set this item‘s enabled state to true or false.

Returns true if this item is enabled

Set this item‘s expanded state to true or false.

Returns true if this item is expanded

Return a reference to the first child item for this tree item, or nil if this tree item has no child items.

Get the height of this item

Get the width of this item

Returns true if this item has the focus

Change has items flag to true or false.

Return true if this items has subitems, real or imagined.

Return a reference to the last child item for this tree item, or nil if this tree item has no child items.

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.

Return the number of child items for this tree item.

Return a reference to the opened-state icon (an FXIcon instance) for this tree item, or nil if none was specified.

Set this item‘s "opened" state to true or false.

Returns true if this item is opened

Return a reference to the parent item for this tree item, or nil if this is a root-level item.

Return true if this item is an ancestor of item.

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.

Set this item‘s selected state to true or false.

Returns true if this item is selected

Set the closed-state icon (an FXIcon instance) for this tree item, or nil if no icon should be used.

Set the focus on this tree item (focus is either true or false)

Set the opened-state icon (an FXIcon instance) for this tree item, or nil if no icon should be used.

Return the item text (a string) for this tree item.

Set the item text for this tree item.

Returns the item‘s text

[Validate]