Class: Fox::FXTreeList
- Inherits:
-
FXScrollArea
- Object
- FXObject
- FXId
- FXDrawable
- FXWindow
- FXComposite
- FXScrollArea
- Fox::FXTreeList
- Includes:
- Enumerable
- Defined in:
- rdoc-sources/FXTreeList.rb,
lib/fox16/core.rb,
lib/fox16/iterators.rb
Overview
A Tree List Widget organizes items in a hierarchical, tree-like fashion. Subtrees can be collapsed or expanded by double-clicking on an item or by clicking on the optional plus button in front of the item. Each item may have a text and optional open-icon as well as a closed-icon. The items may be connected by optional lines to show the hierarchical relationship. When an item’s selected state changes, the treelist emits a SEL_SELECTED or SEL_DESELECTED message. If an item is opened or closed, a message of type SEL_OPENED or SEL_CLOSED is sent. When the subtree under an item is expanded, a SEL_EXPANDED or SEL_COLLAPSED message is issued. A change of the current item is signified by the SEL_CHANGED message. In addition, the tree list sends SEL_COMMAND messages when the user clicks on an item, and SEL_CLICKED, SEL_DOUBLECLICKED, and SEL_TRIPLECLICKED when the user clicks once, twice, or thrice, respectively. When items are added or removed, the tree list sends messages of the type SEL_INSERTED or SEL_DELETED. In each of these cases, a pointer to the item, if any, is passed in the 3rd argument of the message.
Events
The following messages are sent by FXTreeList to its target:
SEL_KEYPRESS
-
sent when a key goes down; the message data is an FXEvent instance.
SEL_KEYRELEASE
-
sent when a key goes up; the message data is an FXEvent instance.
SEL_LEFTBUTTONPRESS
-
sent when the left mouse button goes down; the message data is an FXEvent instance.
SEL_LEFTBUTTONRELEASE
-
sent when the left mouse button goes up; the message data is an FXEvent instance.
SEL_RIGHTBUTTONPRESS
-
sent when the right mouse button goes down; the message data is an FXEvent instance.
SEL_RIGHTBUTTONRELEASE
-
sent when the right mouse button goes up; the message data is an FXEvent instance.
SEL_COMMAND
-
sent when a list item is clicked on; the message data is a reference to the item (an FXTreeItem instance).
SEL_CLICKED
-
sent when the left mouse button is single-clicked in the list; the message data is a reference to the item clicked (an FXTreeItem instance) or
nil
if no item was clicked. SEL_DOUBLECLICKED
-
sent when the left mouse button is double-clicked in the list; the message data is a reference to the item clicked (an FXTreeItem instance) or
nil
if no item was clicked. SEL_TRIPLECLICKED
-
sent when the left mouse button is triple-clicked in the list; the message data is a reference to the item clicked (an FXTreeItem instance) or
nil
if no item was clicked. SEL_OPENED
-
sent when an item is opened; the message data is a reference to the item (an FXTreeItem instance).
SEL_CLOSED
-
sent when an item is closed; the message data is a reference to the item (an FXTreeItem instance).
SEL_EXPANDED
-
sent when a sub-tree is expanded; the message data is a reference to the root item for the sub-tree (an FXTreeItem instance).
SEL_COLLAPSED
-
sent when a sub-tree is collapsed; the message data is a reference to the root item for the sub-tree (an FXTreeItem instance).
SEL_SELECTED
-
sent when an item is selected; the message data is a reference to the item (an FXTreeItem instance).
SEL_DESELECTED
-
sent when an item is deselected; the message data is a reference to the item (an FXTreeItem instance).
SEL_CHANGED
-
sent when the current item changes; the message data is a reference to the current item (an FXTreeItem instance).
SEL_INSERTED
-
sent after an item is added to the list; the message data is a reference to the item (an FXTreeItem instance).
SEL_DELETED
-
sent before an item is removed from the list; the message data is a reference to the item (an FXTreeItem instance).
Tree list styles
TREELIST_EXTENDEDSELECT
-
Extended selection mode allows for drag-selection of ranges of items
TREELIST_SINGLESELECT
-
Single selection mode allows up to one item to be selected
TREELIST_BROWSESELECT
-
Browse selection mode enforces one single item to be selected at all times
TREELIST_MULTIPLESELECT
-
Multiple selection mode is used for selection of individual items
TREELIST_AUTOSELECT
-
Automatically select under cursor
TREELIST_SHOWS_LINES
-
Lines shown
TREELIST_SHOWS_BOXES
-
Boxes to expand shown
TREELIST_ROOT_BOXES
-
Display root boxes also
TREELIST_NORMAL
-
same as
TREELIST_EXTENDEDLIST
Direct Known Subclasses
Instance Attribute Summary collapse
-
#anchorItem ⇒ Object
Anchor item, if any FXTreeItem.
-
#currentItem ⇒ Object
Current item, if any FXTreeItem.
-
#cursorItem ⇒ Object
readonly
Item under the cursor, if any FXTreeItem.
-
#firstItem ⇒ Object
readonly
First root-level item FXTreeItem.
-
#font ⇒ Object
Text font FXFont.
-
#helpText ⇒ Object
Status line help text for this list [String].
-
#indent ⇒ Object
Parent-child indent amount, in pixels [Integer].
-
#lastItem ⇒ Object
readonly
Last root-level item FXTreeItem.
-
#lineColor ⇒ Object
Line color FXColor.
-
#listStyle ⇒ Object
List style [Integer].
-
#numItems ⇒ Object
readonly
Number of items [Integer].
-
#numVisible ⇒ Object
Number of visible items [Integer].
-
#selBackColor ⇒ Object
Selected text background color FXColor.
-
#selTextColor ⇒ Object
Selected text color FXColor.
-
#textColor ⇒ Object
Normal text color FXColor.
Attributes inherited from FXScrollArea
#contentHeight, #contentWidth, #horizontalScrollBar, #scrollStyle, #verticalScrollBar, #viewportHeight, #viewportWidth, #xPosition, #yPosition
Attributes inherited from FXWindow
#accelTable, #backColor, #defaultCursor, #dragCursor, #focus, #key, #last, #layoutHints, #next, #numChildren, #owner, #parent, #prev, #root, #selector, #shell, #target, #x, #y
Attributes inherited from FXDrawable
Attributes inherited from FXId
Instance Method Summary collapse
-
#addItemAfter(other, *args) ⇒ Object
:nodoc:.
-
#addItemBefore(other, *args) ⇒ Object
:nodoc:.
-
#addItemFirst(*args) ⇒ Object
:nodoc:.
-
#addItemLast(*args) ⇒ Object
:nodoc:.
-
#appendItem(father, text, oi = nil, ci = nil, ptr = nil, notify = false) ⇒ Object
Append item with given text and optional icons, and user-data pointer as last child of father.
-
#clearItems(notify = false) ⇒ Object
Remove all items from the list.
-
#closeItem(item, notify = false) ⇒ Object
Set this item’s state to closed.
-
#collapseTree(tree, notify = false) ⇒ Object
Collapse sub-tree rooted at tree.
-
#deselectItem(item, notify = false) ⇒ Object
Deselect item.
-
#disableItem(item) ⇒ Object
Disable item.
-
#each ⇒ Object
Calls block once for each root-level tree item, passing a reference to that item as a parameter.
-
#enableItem(item) ⇒ Object
Enable item.
-
#expandTree(tree, notify = false) ⇒ Object
Expand sub-tree rooted at tree.
-
#extendSelection(item, notify = false) ⇒ Object
Extend selection from anchor item to item.
-
#extractItem(item, notify = false) ⇒ Object
Extract item from list and return a reference to the item.
-
#fillItems(father, strings, oi = nil, ci = nil, ptr = nil, notify = false) ⇒ Object
Fill tree list by appending items from array of strings and return the number of items added.
-
#findItem(text, start = nil, flags = SEARCH_FORWARD|SEARCH_WRAP) ⇒ Object
Search items by text, beginning from item start (an FXTreeItem instance).
-
#findItemByData(data, start = nil, flags = SEARCH_FORWARD|SEARCH_WRAP) ⇒ Object
Search items by associated user data, beginning from item start (an FXTreeItem instance).
-
#first ⇒ Object
Override Enumerable#first with FXWindow#first for backwards compatibility.
-
#getItemAt(x, y) ⇒ Object
Return a reference to the tree item at (x, y), if any.
-
#getItemClosedIcon(item) ⇒ Object
Return item’s closed icon.
-
#getItemData(item) ⇒ Object
Return item’s user data.
-
#getItemHeight(item) ⇒ Object
Return item height.
-
#getItemOpenIcon(item) ⇒ Object
Return item’s open icon.
-
#getItemText(item) ⇒ Object
Return item’s text.
-
#getItemWidth(item) ⇒ Object
Return item width.
-
#hitItem(item, x, y) ⇒ Object
Return item hit code: 0 outside, 1 icon, 2 text, 3 box.
-
#initialize(p, target = nil, selector = 0, opts = TREELIST_NORMAL, x = 0, y = 0, width = 0, height = 0) ⇒ FXTreeList
constructor
Construct a new, initially empty tree list.
-
#insertItem(other, father, text, oi = nil, ci = nil, ptr = nil, notify = false) ⇒ Object
Insert item with given text and optional icons, and user-data pointer under father before other item.
-
#itemCurrent?(item) ⇒ Boolean
Return
true
if item is current. -
#itemEnabled?(item) ⇒ Boolean
Return
true
if item is enabled. -
#itemExpanded?(item) ⇒ Boolean
Return
true
if item expanded. -
#itemLeaf?(item) ⇒ Boolean
Return
true
if item is a leaf-item, i.e. -
#itemOpened?(item) ⇒ Boolean
Return
true
if item opened. -
#itemSelected?(item) ⇒ Boolean
Return
true
if item is selected. -
#itemVisible?(item) ⇒ Boolean
Return
true
if item is visible. -
#killSelection(notify = false) ⇒ Object
Deselect all items.
-
#makeItemVisible(item) ⇒ Object
Scroll the list to make item visible.
-
#moveItem(other, father, item) ⇒ Object
Move item under father before other item and return a reference to item.
-
#moveItemAfter(other, item) ⇒ Object
:nodoc:.
-
#moveItemBefore(other, item) ⇒ Object
:nodoc:.
-
#openItem(item, notify = false) ⇒ Object
Set this item’s state to opened.
-
#prependItem(father, text, oi = nil, ci = nil, ptr = nil, notify = false) ⇒ Object
Prepend item with given text and optional icons, and user-data pointer as first child of father.
-
#removeItem(item, notify = false) ⇒ Object
Remove item.
-
#removeItems(fromItem, toItem, notify = false) ⇒ Object
Remove items in range [fromItem, toItem] inclusively.
-
#reparentItem(item, father) ⇒ Object
:nodoc:.
-
#selectItem(item, notify = false) ⇒ Object
Select item.
-
#setCurrentItem(item, notify = false) ⇒ Object
Change current item.
-
#setItemClosedIcon(item, closedIcon, owned = false) ⇒ Object
Change item’s closed icon, deleting the old icon if it’s owned.
-
#setItemData(item, data) ⇒ Object
Change item’s user data.
-
#setItemOpenIcon(item, openIcon, owned = false) ⇒ Object
Change item’s open icon, deleting the old icon if it’s owned.
-
#setItemText(item, text) ⇒ Object
Change item’s text.
-
#sortChildItems(item) ⇒ Object
Sort children of item.
-
#sortItems ⇒ Object
Sort all items recursively.
-
#sortRootItems ⇒ Object
Sort root items.
-
#toggleItem(item, notify = false) ⇒ Object
Toggle item selection.
-
#updateItem(item) ⇒ Object
Repaint item.
Methods inherited from FXScrollArea
#horizontalScrollable?, #position, #scrollCorner, #setPosition, #verticalScrollable?
Methods inherited from FXComposite
#maxChildHeight, #maxChildWidth
Methods inherited from FXWindow
#acceptDrop, #acquireClipboard, #acquireSelection, #active?, #addHotKey, after?, #after?, before?, #before?, #beginDrag, #canFocus?, #changeFocus, #childAtIndex, #childOf?, #children, #clearDragRectangle, #clearShape, colorType, colorTypeName, commonAncestor, #composeContext, #composite?, #contains?, #containsChild?, #create, #createComposeContext, #cursorPosition, #default?, #defaultHeight, #defaultWidth, deleteType, deleteTypeName, #destroy, #destroyComposeContext, #detach, #didAccept, #disable, #doesSaveUnder?, #dragging?, #dropDisable, #dropEnable, #dropEnabled?, #dropFinished, #dropTarget?, #each_child, #each_child_recursive, #enable, #enabled?, #endDrag, #forceRefresh, #getChildAt, #getDNDData, #getHeightForWidth, #getWidthForHeight, #grab, #grabKeyboard, #grabbed?, #grabbedKeyboard?, #handleDrag, #hasClipboard?, #hasFocus?, #hasSelection?, #height, #height=, #hide, imageType, #inFocusChain?, #indexOfChild, #initial?, #inquireDNDAction, #inquireDNDTypes, #killFocus, #layout, #linkAfter, #linkBefore, #lower, #move, octetType, octetTypeName, #offeredDNDType?, #position, #raiseWindow, #recalc, #releaseClipboard, #releaseSelection, #remHotKey, #removeChild, #repaint, #reparent, #resize, #scroll, #setCursorPosition, #setDNDData, #setDefault, #setDragRectangle, #setFocus, #setInitial, #setShape, #shell?, #show, #shown?, stringType, textType, textTypeName, #tr, #translateCoordinatesFrom, #translateCoordinatesTo, #underCursor?, #ungrab, #ungrabKeyboard, #update, urilistType, urilistTypeName, utf16Type, utf16TypeName, utf8Type, utf8TypeName, #visible=, #width, #width=
Methods included from Responder2
Methods inherited from FXDrawable
Methods inherited from FXId
#create, #created?, #destroy, #detach, #runOnUiThread
Methods inherited from FXObject
#bind, #handle, #load, #save, subclasses
Constructor Details
#initialize(p, target = nil, selector = 0, opts = TREELIST_NORMAL, x = 0, y = 0, width = 0, height = 0) ⇒ FXTreeList
Construct a new, initially empty tree list.
Parameters:
p
-
the parent window for this tree list Fox::FXComposite
target
-
the message target, if any, for this tree list Fox::FXObject
selector
-
the message identifier for this tree list [Integer]
opts
-
tree list options [Integer]
x
-
initial x-position [Integer]
y
-
initial y-position [Integer]
width
-
initial width [Integer]
height
-
initial height [Integer]
270 271 |
# File 'rdoc-sources/FXTreeList.rb', line 270 def initialize(p, target=nil, selector=0, opts=TREELIST_NORMAL, x=0, y=0, width=0, height=0) # :yields: theTreeList end |
Instance Attribute Details
#anchorItem ⇒ Object
Anchor item, if any Fox::FXTreeItem
227 228 229 |
# File 'rdoc-sources/FXTreeList.rb', line 227 def anchorItem @anchorItem end |
#currentItem ⇒ Object
Current item, if any Fox::FXTreeItem
224 225 226 |
# File 'rdoc-sources/FXTreeList.rb', line 224 def currentItem @currentItem end |
#cursorItem ⇒ Object (readonly)
Item under the cursor, if any Fox::FXTreeItem
230 231 232 |
# File 'rdoc-sources/FXTreeList.rb', line 230 def cursorItem @cursorItem end |
#firstItem ⇒ Object (readonly)
First root-level item Fox::FXTreeItem
218 219 220 |
# File 'rdoc-sources/FXTreeList.rb', line 218 def firstItem @firstItem end |
#font ⇒ Object
Text font Fox::FXFont
233 234 235 |
# File 'rdoc-sources/FXTreeList.rb', line 233 def font @font end |
#helpText ⇒ Object
Status line help text for this list [String]
254 255 256 |
# File 'rdoc-sources/FXTreeList.rb', line 254 def helpText @helpText end |
#indent ⇒ Object
Parent-child indent amount, in pixels [Integer]
236 237 238 |
# File 'rdoc-sources/FXTreeList.rb', line 236 def indent @indent end |
#lastItem ⇒ Object (readonly)
Last root-level item Fox::FXTreeItem
221 222 223 |
# File 'rdoc-sources/FXTreeList.rb', line 221 def lastItem @lastItem end |
#lineColor ⇒ Object
Line color Fox::FXColor
248 249 250 |
# File 'rdoc-sources/FXTreeList.rb', line 248 def lineColor @lineColor end |
#listStyle ⇒ Object
List style [Integer]
251 252 253 |
# File 'rdoc-sources/FXTreeList.rb', line 251 def listStyle @listStyle end |
#numItems ⇒ Object (readonly)
Number of items [Integer]
212 213 214 |
# File 'rdoc-sources/FXTreeList.rb', line 212 def numItems @numItems end |
#numVisible ⇒ Object
Number of visible items [Integer]
215 216 217 |
# File 'rdoc-sources/FXTreeList.rb', line 215 def numVisible @numVisible end |
#selBackColor ⇒ Object
Selected text background color Fox::FXColor
242 243 244 |
# File 'rdoc-sources/FXTreeList.rb', line 242 def selBackColor @selBackColor end |
#selTextColor ⇒ Object
Selected text color Fox::FXColor
245 246 247 |
# File 'rdoc-sources/FXTreeList.rb', line 245 def selTextColor @selTextColor end |
#textColor ⇒ Object
Normal text color Fox::FXColor
239 240 241 |
# File 'rdoc-sources/FXTreeList.rb', line 239 def textColor @textColor end |
Instance Method Details
#addItemAfter(other, *args) ⇒ Object
:nodoc:
32 33 34 35 |
# File 'lib/fox16/core.rb', line 32 def addItemAfter(other, *args) # :nodoc: warn "addItemAfter() is deprecated; use insertItem() instead" insertItem(other.next, other.parent, *args) end |
#addItemBefore(other, *args) ⇒ Object
:nodoc:
37 38 39 40 |
# File 'lib/fox16/core.rb', line 37 def addItemBefore(other, *args) # :nodoc: warn "addItemBefore() is deprecated; use insertItem() instead" insertItem(other, other.parent, *args) end |
#addItemFirst(*args) ⇒ Object
:nodoc:
22 23 24 25 |
# File 'lib/fox16/core.rb', line 22 def addItemFirst(*args) # :nodoc: warn "addItemFirst() is deprecated; use prependItem() instead" prependItem(*args) end |
#addItemLast(*args) ⇒ Object
:nodoc:
27 28 29 30 |
# File 'lib/fox16/core.rb', line 27 def addItemLast(*args) # :nodoc: warn "addItemLast() is deprecated; use appendItem() instead" appendItem(*args) end |
#appendItem(father, text, oi = nil, ci = nil, ptr = nil, notify = false) ⇒ Object
Append item with given text and optional icons, and user-data pointer as last child of father. Returns a reference to the newly added item (an FXTreeItem instance). If notify is true
, a SEL_INSERTED
message is sent to the list’s message target after the item is added.
297 |
# File 'rdoc-sources/FXTreeList.rb', line 297 def appendItem(father, item, notify=false); end |
#clearItems(notify = false) ⇒ Object
Remove all items from the list. If notify is true
, a SEL_DELETED
message is sent to the list’s message target before each item is removed.
344 |
# File 'rdoc-sources/FXTreeList.rb', line 344 def clearItems(notify=false); end |
#closeItem(item, notify = false) ⇒ Object
Set this item’s state to closed. The primary result of this change is that the item’s icon will change to its “closed” icon. This is different from the #collapseTree method, which actually collapses part of the tree list, making some items invisible. If notify is true
, a SEL_CLOSED
message is sent to the list’s message target after the item is closed.
473 |
# File 'rdoc-sources/FXTreeList.rb', line 473 def closeItem(item, notify=false); end |
#collapseTree(tree, notify = false) ⇒ Object
Collapse sub-tree rooted at tree. If notify is true
, a SEL_COLLAPSED
message is sent to the list’s message target after the sub-tree is collapsed.
478 |
# File 'rdoc-sources/FXTreeList.rb', line 478 def collapseTree(tree, notify=false); end |
#deselectItem(item, notify = false) ⇒ Object
Deselect item. If notify is true
, a SEL_DESELECTED
message is sent to the list’s message target after the item is deselected.
448 |
# File 'rdoc-sources/FXTreeList.rb', line 448 def deselectItem(item, notify=false); end |
#disableItem(item) ⇒ Object
Disable item
438 |
# File 'rdoc-sources/FXTreeList.rb', line 438 def disableItem(item); end |
#each ⇒ Object
Calls block once for each root-level tree item, passing a reference to that item as a parameter.
227 228 229 230 231 232 233 234 235 |
# File 'lib/fox16/iterators.rb', line 227 def each # :yields: aTreeItem current = firstItem while current != nil next_current = current.next yield current current = next_current end self end |
#enableItem(item) ⇒ Object
Enable item
435 |
# File 'rdoc-sources/FXTreeList.rb', line 435 def enableItem(item); end |
#expandTree(tree, notify = false) ⇒ Object
Expand sub-tree rooted at tree. If notify is true
, a SEL_EXPANDED
message is sent to the list’s message target after the sub-tree is expanded.
483 |
# File 'rdoc-sources/FXTreeList.rb', line 483 def (tree, notify=false); end |
#extendSelection(item, notify = false) ⇒ Object
Extend selection from anchor item to item. If notify is true
, a series of SEL_SELECTED
and SEL_DESELECTED
messages may be sent to the list’s message target, indicating the changes.
497 |
# File 'rdoc-sources/FXTreeList.rb', line 497 def extendSelection(item, notify=false); end |
#extractItem(item, notify = false) ⇒ Object
Extract item from list and return a reference to the item. If notify is true
and the extraction causes the list’s current item to change, a SEL_CHANGED
message is sent to the list’s message target before the item is extracted from the list.
329 |
# File 'rdoc-sources/FXTreeList.rb', line 329 def extractItem(item, notify=false); end |
#fillItems(father, strings, oi = nil, ci = nil, ptr = nil, notify = false) ⇒ Object
Fill tree list by appending items from array of strings and return the number of items added. If notify is true
, a SEL_INSERTED
message is sent to the list’s message target after each item is added.
279 |
# File 'rdoc-sources/FXTreeList.rb', line 279 def fillItems(father, strings, oi=nil, ci=nil, ptr=nil, notify=false); end |
#findItem(text, start = nil, flags = SEARCH_FORWARD|SEARCH_WRAP) ⇒ Object
Search items by text, beginning from item start (an FXTreeItem instance). If the start item is nil
, the search will start at the first, top-most item in the list. Flags may be SEARCH_FORWARD
or SEARCH_BACKWARD
to control the search direction; this can be combined with SEARCH_NOWRAP
or SEARCH_WRAP
to control whether the search wraps at the start or end of the list. The option SEARCH_IGNORECASE
causes a case-insensitive match. Finally, passing SEARCH_PREFIX
causes searching for a prefix of the item name. Return nil
if no matching item is found.
366 |
# File 'rdoc-sources/FXTreeList.rb', line 366 def findItem(text, start=nil, flags=SEARCH_FORWARD|SEARCH_WRAP); end |
#findItemByData(data, start = nil, flags = SEARCH_FORWARD|SEARCH_WRAP) ⇒ Object
Search items by associated user data, beginning from item start (an FXTreeItem instance). If the start item is nil
the search will start at the first, top-most item in the list. Flags may be SEARCH_FORWARD
or SEARCH_BACKWARD
to control the search direction; this can be combined with SEARCH_NOWRAP
or SEARCH_WRAP
to control whether the search wraps at the start or end of the list. Return nil
if no matching item is found.
378 |
# File 'rdoc-sources/FXTreeList.rb', line 378 def findItemByData(data, start=nil, flags=SEARCH_FORWARD|SEARCH_WRAP); end |
#first ⇒ Object
Override Enumerable#first with FXWindow#first for backwards compatibility.
219 220 221 |
# File 'lib/fox16/iterators.rb', line 219 def first getFirst end |
#getItemAt(x, y) ⇒ Object
Return a reference to the tree item at (x, y), if any.
353 |
# File 'rdoc-sources/FXTreeList.rb', line 353 def getItemAt(x, y); end |
#getItemClosedIcon(item) ⇒ Object
Return item’s closed icon
399 |
# File 'rdoc-sources/FXTreeList.rb', line 399 def getItemClosedIcon(item); end |
#getItemData(item) ⇒ Object
Return item’s user data
405 |
# File 'rdoc-sources/FXTreeList.rb', line 405 def getItemData(item); end |
#getItemHeight(item) ⇒ Object
Return item height
350 |
# File 'rdoc-sources/FXTreeList.rb', line 350 def getItemHeight(item); end |
#getItemOpenIcon(item) ⇒ Object
Return item’s open icon
393 |
# File 'rdoc-sources/FXTreeList.rb', line 393 def getItemOpenIcon(item); end |
#getItemText(item) ⇒ Object
Return item’s text
387 |
# File 'rdoc-sources/FXTreeList.rb', line 387 def getItemText(item); end |
#getItemWidth(item) ⇒ Object
Return item width
347 |
# File 'rdoc-sources/FXTreeList.rb', line 347 def getItemWidth(item); end |
#hitItem(item, x, y) ⇒ Object
Return item hit code: 0 outside, 1 icon, 2 text, 3 box
429 |
# File 'rdoc-sources/FXTreeList.rb', line 429 def hitItem(item, x, y); end |
#insertItem(other, father, text, oi = nil, ci = nil, ptr = nil, notify = false) ⇒ Object
Insert item with given text and optional icons, and user-data pointer under father before other item. Returns a reference to the newly added item (an FXTreeItem instance). If notify is true
, a SEL_INSERTED
message is sent to the list’s message target after the item is added.
285 |
# File 'rdoc-sources/FXTreeList.rb', line 285 def insertItem(other, father, item, notify=false); end |
#itemCurrent?(item) ⇒ Boolean
Return true
if item is current
411 |
# File 'rdoc-sources/FXTreeList.rb', line 411 def itemCurrent?(item); end |
#itemEnabled?(item) ⇒ Boolean
Return true
if item is enabled
426 |
# File 'rdoc-sources/FXTreeList.rb', line 426 def itemEnabled?(item); end |
#itemExpanded?(item) ⇒ Boolean
Return true
if item expanded
420 |
# File 'rdoc-sources/FXTreeList.rb', line 420 def itemExpanded?(item); end |
#itemLeaf?(item) ⇒ Boolean
Return true
if item is a leaf-item, i.e. has no children
423 |
# File 'rdoc-sources/FXTreeList.rb', line 423 def itemLeaf?(item); end |
#itemOpened?(item) ⇒ Boolean
Return true
if item opened
417 |
# File 'rdoc-sources/FXTreeList.rb', line 417 def itemOpened?(item); end |
#itemSelected?(item) ⇒ Boolean
Return true
if item is selected
408 |
# File 'rdoc-sources/FXTreeList.rb', line 408 def itemSelected?(item); end |
#itemVisible?(item) ⇒ Boolean
Return true
if item is visible
414 |
# File 'rdoc-sources/FXTreeList.rb', line 414 def itemVisible?(item); end |
#killSelection(notify = false) ⇒ Object
Deselect all items. If notify is true
, SEL_DESELECTED
messages will be sent to the list’s message target indicating the affected items.
502 |
# File 'rdoc-sources/FXTreeList.rb', line 502 def killSelection(notify=false); end |
#makeItemVisible(item) ⇒ Object
Scroll the list to make item visible
381 |
# File 'rdoc-sources/FXTreeList.rb', line 381 def makeItemVisible(item); end |
#moveItem(other, father, item) ⇒ Object
Move item under father before other item and return a reference to item.
321 |
# File 'rdoc-sources/FXTreeList.rb', line 321 def moveItem(other, father, item); end |
#moveItemAfter(other, item) ⇒ Object
:nodoc:
52 53 54 55 |
# File 'lib/fox16/core.rb', line 52 def moveItemAfter(other, item) # :nodoc: warn "moveItemAfter() is deprecated; use moveItem() instead" moveItem(other.next, other.parent, item) end |
#moveItemBefore(other, item) ⇒ Object
:nodoc:
47 48 49 50 |
# File 'lib/fox16/core.rb', line 47 def moveItemBefore(other, item) # :nodoc: warn "moveItemBefore() is deprecated; use moveItem() instead" moveItem(other, other.parent, item) end |
#openItem(item, notify = false) ⇒ Object
Set this item’s state to opened. The primary result of this change is that the item’s icon will change to its “open” icon. This is different from the #expandTree method, which actually collapses part of the tree list, making some items invisible. If notify is true
, a SEL_OPENED
message is sent to the list’s message target after the item is opened.
463 |
# File 'rdoc-sources/FXTreeList.rb', line 463 def openItem(item, notify=false); end |
#prependItem(father, text, oi = nil, ci = nil, ptr = nil, notify = false) ⇒ Object
Prepend item with given text and optional icons, and user-data pointer as first child of father. Returns a reference to the newly added item (an FXTreeItem instance). If notify is true
, a SEL_INSERTED
message is sent to the list’s message target after the item is added.
309 |
# File 'rdoc-sources/FXTreeList.rb', line 309 def prependItem(father, item, notify=false); end |
#removeItem(item, notify = false) ⇒ Object
Remove item. If notify is true
, a SEL_DELETED
message is sent to the list’s message target before the item is removed.
334 |
# File 'rdoc-sources/FXTreeList.rb', line 334 def removeItem(item, notify=false); end |
#removeItems(fromItem, toItem, notify = false) ⇒ Object
Remove items in range [fromItem, toItem] inclusively. If notify is true
, a SEL_DELETED
message is sent to the list’s message target before each item is removed.
339 |
# File 'rdoc-sources/FXTreeList.rb', line 339 def removeItems(fromItem, toItem, notify=false); end |
#reparentItem(item, father) ⇒ Object
:nodoc:
42 43 44 45 |
# File 'lib/fox16/core.rb', line 42 def reparentItem(item, father) # :nodoc: warn "reparentItem() is deprecated; use moveItem() instead" moveItem(nil, father, item) end |
#selectItem(item, notify = false) ⇒ Object
Select item. If notify is true
, a SEL_SELECTED
message is sent to the list’s message target after the item is selected.
443 |
# File 'rdoc-sources/FXTreeList.rb', line 443 def selectItem(item, notify=false); end |
#setCurrentItem(item, notify = false) ⇒ Object
Change current item. If there is already a current item, that item is first closed. After item is set as the tree list’s current item, it is opened and selected. If notify is true
, a SEL_CHANGED
message is sent to the list’s message target after the current item changes.
492 |
# File 'rdoc-sources/FXTreeList.rb', line 492 def setCurrentItem(item, notify=false); end |
#setItemClosedIcon(item, closedIcon, owned = false) ⇒ Object
Change item’s closed icon, deleting the old icon if it’s owned
396 |
# File 'rdoc-sources/FXTreeList.rb', line 396 def setItemClosedIcon(item, closedIcon, owned=false); end |
#setItemData(item, data) ⇒ Object
Change item’s user data
402 |
# File 'rdoc-sources/FXTreeList.rb', line 402 def setItemData(item, data); end |
#setItemOpenIcon(item, openIcon, owned = false) ⇒ Object
Change item’s open icon, deleting the old icon if it’s owned
390 |
# File 'rdoc-sources/FXTreeList.rb', line 390 def setItemOpenIcon(item, openIcon, owned=false); end |
#setItemText(item, text) ⇒ Object
Change item’s text
384 |
# File 'rdoc-sources/FXTreeList.rb', line 384 def setItemText(item, text); end |
#sortChildItems(item) ⇒ Object
Sort children of item
511 |
# File 'rdoc-sources/FXTreeList.rb', line 511 def sortChildItems(item); end |
#sortItems ⇒ Object
Sort all items recursively.
508 |
# File 'rdoc-sources/FXTreeList.rb', line 508 def sortItems(); end |
#sortRootItems ⇒ Object
Sort root items.
505 |
# File 'rdoc-sources/FXTreeList.rb', line 505 def sortRootItems(); end |
#toggleItem(item, notify = false) ⇒ Object
Toggle item selection. If notify is true
, a SEL_SELECTED
or SEL_DESELECTED
message is sent to the list’s message target to indicate the change.
453 |
# File 'rdoc-sources/FXTreeList.rb', line 453 def toggleItem(item, notify=false); end |
#updateItem(item) ⇒ Object
Repaint item
432 |
# File 'rdoc-sources/FXTreeList.rb', line 432 def updateItem(item); end |