+ (MCCListtree *) listtree
Default constructor
- (id<MUIListtreeEntry>) active
Setting this attribute will move the cursor on the defined tree node, if it is visible. If the node is in an opened tree the listview is scrolling into the visible area. Setting MUIV_Listtree_Actice_Off will vanish the cursor.
If this attribute is read it returns the active tree node. The result is MUIV_Listtree_Actice_Off if there is no active entry.
SPECIAL VALUES MUIA_Listtree_Active_Off
NOTIFICATIONS Now you can create a notification on MUIA_Listtree_Active. The TriggerValue is the active tree node.
- (OBArray *) children
All root level entries
- (OBArray *) childrenOf:(id<MUIListtreeEntry>)list
Children of a given parent
- (LONG) columns
Returns the number of (total) columns in this listtree
- (BOOL) containsObject:(id)object
Checks if an identical object is part of the tree - the object is identified by its isEqual method
- (ULONG) count
Count of root level entries
- (ULONG) count:(id<MUIListtreeEntry>)list
- (ULONG) countAll:(id<MUIListtreeEntry>)list
Recursive count
- (LONG) doubleClick
A doubleclick opens a node if it was closed, it is closed if the node was open. You have to set the column which should do this.
Normally only the column number is set here, but there are special values:
MUIV_Listtree_DoubleClick_Off: A doubleclick is not handled.
MUIV_Listtree_DoubleClick_All: All columns reacts on a doubleclick.
MUIV_Listtree_DoubleClick_Tree Only a doubleclick on the defined tree column is recognized.
SPECIAL VALUES MUIA_Listtree_DoubleClick_Off MUIA_Listtree_DoubleClick_All MUIA_Listtree_DoubleClick_Tree
NOTIFICATIONS The TriggerValue of the notification is the tree node you have doubleclicked, you can get() MUIA_Listtree_DoubleClick for the column number. The struct 'MUIS_Listtree_TreeNode'is used for trigger.
The notification is done on leaves and on node columns, which are not set in MUIA_Listtree_DoubleClick.
- (void) dragAndDropArrangedObject:(id<MUIListtreeEntry>)object toIndex:(ULONG)index
Overload in order to be notified of object being moved within its parent node
- (void) dragAndDropMovedObject:(id<MUIListtreeEntry>)object fromNode:(id<MUIListtreeEntry>)oldRoot toNode:(id<MUIListtreeEntry>)newRoot atIndex:(ULONG)index
Overload in order to be notified of object being moved between nodes old/newRoot will be nil when referencing the tree root
- (LONG) dragDropSort
Setting this attribute to FALSE will disable the ability to sort the list tree by drag&drop.
- (BOOL) emptyNodes
Setting this attribute to TRUE will display all empty nodes as leaves, this means no list indicator is shown. Nevertheless the entry is handled like a node.
- (kMCCListtreeInsertFlags) flagsOf:(id<MUIListtreeEntry>)object
- (OBString *) format
Same as MUIA_List_Format, but one column is reserved for the tree indicators and the names of the nodes.
For further detailed information see MUIA_List_Format!
- (id<MUIListtreeEntry>) getParent:(id<MUIListtreeEntry>)object
- (BOOL) insert:(id<MUIListtreeEntry>)object
NOTE: the MUIListtreeEntry objects MUST be unique - that is, if you plan to insert 2 objects that have the same visual representation WHEREEVER into the listtree, their isEqual must not return YES. By default OBObject's hash/isEqual are based on pointer, so unless you've overloaded those methods, everything is fine assuming instance pointers are unique
- (BOOL) insert:(id<MUIListtreeEntry>)object afterNode:(id<MUIListtreeEntry>)previous
- (BOOL) insert:(id<MUIListtreeEntry>)object afterNode:(id<MUIListtreeEntry>)previous flags:(kMCCListtreeInsertFlags)flags
- (BOOL) insert:(id<MUIListtreeEntry>)object beforeNode:(id<MUIListtreeEntry>)previous
NOTE: the item is inserted into the list the 'previous' object belongs to
- (BOOL) insert:(id<MUIListtreeEntry>)object beforeNode:(id<MUIListtreeEntry>)previous flags:(kMCCListtreeInsertFlags)flags
- (BOOL) insert:(id<MUIListtreeEntry>)object flags:(kMCCListtreeInsertFlags)flags
- (BOOL) insert:(id<MUIListtreeEntry>)object intoList:(id<MUIListtreeEntry>)list
- (BOOL) insert:(id<MUIListtreeEntry>)object intoList:(id<MUIListtreeEntry>)list flags:(kMCCListtreeInsertFlags)flags
- (BOOL) list:(id<MUIListtreeEntry>)list containsObject:(id)object
- (void) listClosed:(id<MUIListtreeEntry>)list
- (void) listWillOpen:(id<MUIListtreeEntry>)list
Overload to modify/create list contents on demang
- (BOOL) multiSelect
- (void) noNotifySetActive:(id<MUIListtreeEntry>)active
- (void) noNotifySetDoubleClick:(LONG)doubleclick
- (void) noNotifySetDragDropSort:(LONG)dragdropsort
- (void) noNotifySetEmptyNodes:(BOOL)emptynodes
- (void) noNotifySetFormat:(OBString *)format
- (void) noNotifySetMultiSelect:(BOOL)multiselect
- (void) noNotifySetQuiet:(BOOL)quiet
- (void) noNotifySetTitle:(BOOL)title
- (void) noNotifySetTreeColumn:(BOOL)treecolumn
- (id) objectIdenticalTo:(id)object
- (void) redraw:(id<MUIListtreeEntry>)object
- (void) redrawActive
- (void) redrawAll
- (void) remove:(id<MUIListtreeEntry>)object
- (void) removeAllObjects
- (void) removeAllObjectsInList:(id<MUIListtreeEntry>)list
- (OBArray *) selectedObjects
- (void) setActive:(id<MUIListtreeEntry>)active
- (void) setDoubleClick:(LONG)doubleclick
- (void) setDragDropSort:(LONG)dragdropsort
- (void) setEmptyNodes:(BOOL)emptynodes
- (void) setFormat:(OBString *)format
- (void) setMultiSelect:(BOOL)multiselect
- (void) setOpen:(BOOL)open list:(id<MUIListtreeEntry>)list
- (void) setQuiet:(BOOL)quiet
If you add/remove lots of entries to/from a listtree, this will cause lots of screen action and slow down the operation. Setting MUIA_Listtree_Quiet to TRUE will temporarily prevent the listtree from being refreshed, this refresh will take place only once when you set it back to FALSE again.
Do not use MUIA_List_Quiet here!
- (void) setTitle:(BOOL)title
- (void) setTitles:(OBArray *)titles
- (void) setTreeColumn:(BOOL)treecolumn
- (BOOL) title
Specify a title for the current listtree.
For detailed information see MUIA_List_Title!
BUGS The title should not be a string as for single column listviews. This attribute can only be set to TRUE or FALSE.
- (OBArray *) titles
Array of OBStrings for each column title
- (BOOL) treeColumn
Specify the column of the list tree, the node indicator and the name of the node are displayed in.