Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members
|
#include <FXTreeList.h>
Inheritance diagram for FX::FXTreeList:
Public Member Functions | |
FXTreeList (FXComposite *p, FXObject *tgt=NULL, FXSelector sel=0, FXuint opts=TREELIST_NORMAL, FXint x=0, FXint y=0, FXint w=0, FXint h=0) | |
virtual void | create () |
virtual void | detach () |
virtual void | layout () |
virtual FXint | getDefaultWidth () |
virtual FXint | getDefaultHeight () |
virtual FXint | getContentWidth () |
virtual FXint | getContentHeight () |
virtual void | recalc () |
virtual bool | canFocus () const |
virtual void | setFocus () |
virtual void | killFocus () |
FXint | getNumItems () const |
FXint | getNumVisible () const |
void | setNumVisible (FXint nvis) |
FXTreeItem * | getFirstItem () const |
FXTreeItem * | getLastItem () const |
FXint | fillItems (FXTreeItem *father, const FXchar **strings, FXIcon *oi=NULL, FXIcon *ci=NULL, void *ptr=NULL, FXbool notify=FALSE) |
FXint | fillItems (FXTreeItem *father, const FXString &strings, FXIcon *oi=NULL, FXIcon *ci=NULL, void *ptr=NULL, FXbool notify=FALSE) |
FXTreeItem * | insertItem (FXTreeItem *other, FXTreeItem *father, FXTreeItem *item, FXbool notify=FALSE) |
FXTreeItem * | insertItem (FXTreeItem *other, FXTreeItem *father, const FXString &text, FXIcon *oi=NULL, FXIcon *ci=NULL, void *ptr=NULL, FXbool notify=FALSE) |
FXTreeItem * | appendItem (FXTreeItem *father, FXTreeItem *item, FXbool notify=FALSE) |
FXTreeItem * | appendItem (FXTreeItem *father, const FXString &text, FXIcon *oi=NULL, FXIcon *ci=NULL, void *ptr=NULL, FXbool notify=FALSE) |
FXTreeItem * | prependItem (FXTreeItem *father, FXTreeItem *item, FXbool notify=FALSE) |
FXTreeItem * | prependItem (FXTreeItem *father, const FXString &text, FXIcon *oi=NULL, FXIcon *ci=NULL, void *ptr=NULL, FXbool notify=FALSE) |
FXTreeItem * | moveItem (FXTreeItem *other, FXTreeItem *father, FXTreeItem *item) |
FXTreeItem * | extractItem (FXTreeItem *item, FXbool notify=FALSE) |
void | removeItem (FXTreeItem *item, FXbool notify=FALSE) |
void | removeItems (FXTreeItem *fm, FXTreeItem *to, FXbool notify=FALSE) |
void | clearItems (FXbool notify=FALSE) |
FXint | getItemWidth (const FXTreeItem *item) const |
FXint | getItemHeight (const FXTreeItem *item) const |
virtual FXTreeItem * | getItemAt (FXint x, FXint y) const |
FXTreeItem * | findItem (const FXString &name, FXTreeItem *start=NULL, FXuint flags=SEARCH_FORWARD|SEARCH_WRAP) const |
FXTreeItem * | findItemByData (const void *ptr, FXTreeItem *start=NULL, FXuint flags=SEARCH_FORWARD|SEARCH_WRAP) const |
virtual void | makeItemVisible (FXTreeItem *item) |
void | setItemText (FXTreeItem *item, const FXString &text) |
FXString | getItemText (const FXTreeItem *item) const |
void | setItemOpenIcon (FXTreeItem *item, FXIcon *icon, FXbool owned=FALSE) |
FXIcon * | getItemOpenIcon (const FXTreeItem *item) const |
void | setItemClosedIcon (FXTreeItem *item, FXIcon *icon, FXbool owned=FALSE) |
FXIcon * | getItemClosedIcon (const FXTreeItem *item) const |
void | setItemData (FXTreeItem *item, void *ptr) const |
void * | getItemData (const FXTreeItem *item) const |
FXbool | isItemSelected (const FXTreeItem *item) const |
FXbool | isItemCurrent (const FXTreeItem *item) const |
FXbool | isItemVisible (const FXTreeItem *item) const |
FXbool | isItemOpened (const FXTreeItem *item) const |
FXbool | isItemExpanded (const FXTreeItem *item) const |
FXbool | isItemLeaf (const FXTreeItem *item) const |
FXbool | isItemEnabled (const FXTreeItem *item) const |
FXint | hitItem (const FXTreeItem *item, FXint x, FXint y) const |
void | updateItem (FXTreeItem *item) const |
virtual FXbool | enableItem (FXTreeItem *item) |
virtual FXbool | disableItem (FXTreeItem *item) |
virtual FXbool | selectItem (FXTreeItem *item, FXbool notify=FALSE) |
virtual FXbool | deselectItem (FXTreeItem *item, FXbool notify=FALSE) |
virtual FXbool | toggleItem (FXTreeItem *item, FXbool notify=FALSE) |
virtual FXbool | extendSelection (FXTreeItem *item, FXbool notify=FALSE) |
virtual FXbool | killSelection (FXbool notify=FALSE) |
virtual FXbool | openItem (FXTreeItem *item, FXbool notify=FALSE) |
virtual FXbool | closeItem (FXTreeItem *item, FXbool notify=FALSE) |
virtual FXbool | collapseTree (FXTreeItem *tree, FXbool notify=FALSE) |
virtual FXbool | expandTree (FXTreeItem *tree, FXbool notify=FALSE) |
virtual void | setCurrentItem (FXTreeItem *item, FXbool notify=FALSE) |
FXTreeItem * | getCurrentItem () const |
void | setAnchorItem (FXTreeItem *item) |
FXTreeItem * | getAnchorItem () const |
FXTreeItem * | getCursorItem () const |
void | sortItems () |
void | sortRootItems () |
void | sortChildItems (FXTreeItem *item) |
FXTreeListSortFunc | getSortFunc () const |
void | setSortFunc (FXTreeListSortFunc func) |
void | setFont (FXFont *fnt) |
FXFont * | getFont () const |
void | setIndent (FXint in) |
FXint | getIndent () const |
FXColor | getTextColor () const |
void | setTextColor (FXColor clr) |
FXColor | getSelBackColor () const |
void | setSelBackColor (FXColor clr) |
FXColor | getSelTextColor () const |
void | setSelTextColor (FXColor clr) |
FXColor | getLineColor () const |
void | setLineColor (FXColor clr) |
FXuint | getListStyle () const |
void | setListStyle (FXuint style) |
void | setHelpText (const FXString &text) |
const FXString & | getHelpText () const |
virtual void | save (FXStream &store) const |
virtual void | load (FXStream &store) |
virtual | ~FXTreeList () |
Static Public Member Functions | |
static FXint | ascending (const FXTreeItem *, const FXTreeItem *) |
static FXint | descending (const FXTreeItem *, const FXTreeItem *) |
static FXint | ascendingCase (const FXTreeItem *, const FXTreeItem *) |
static FXint | descendingCase (const FXTreeItem *, const FXTreeItem *) |
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.
See also:
|
Construct a new, initially empty tree list.
|
|
Destructor.
|
|
Reimplemented in FX::FXDirList. |
|
Reimplemented in FX::FXDirList. |
|
Reimplemented in FX::FXDirList. |
|
Reimplemented in FX::FXDirList. |
|
Create server-side resources.
Reimplemented from FX::FXComposite. Reimplemented in FX::FXDirList. |
|
Detach server-side resources.
Reimplemented from FX::FXComposite. Reimplemented in FX::FXDirList. |
|
Perform layout.
Reimplemented from FX::FXScrollArea. |
|
Return default width.
Reimplemented from FX::FXScrollArea. |
|
Return default height.
Reimplemented from FX::FXScrollArea. |
|
Compute and return content width.
Reimplemented from FX::FXScrollArea. |
|
Return content height.
Reimplemented from FX::FXScrollArea. |
|
Recalculate layout.
Reimplemented from FX::FXWindow. |
|
Tree list can receive focus.
Reimplemented from FX::FXWindow. |
|
Move the focus to this window.
Reimplemented from FX::FXWindow. |
|
Remove the focus from this window.
Reimplemented from FX::FXWindow. |
|
Return number of items.
|
|
Return number of visible items.
|
|
Change number of visible items.
|
|
Return first root item.
|
|
Return last root item.
|
|
Fill tree list by appending items from array of strings.
|
|
Fill tree list by appending items from newline separated strings.
|
|
Insert [possibly subclassed] item under father before other item.
|
|
Insert item with given text and optional icons, and user-data pointer under father before other item.
|
|
Append [possibly subclassed] item as last child of father.
|
|
Append item with given text and optional icons, and user-data pointer as last child of father.
|
|
Prepend [possibly subclassed] item as first child of father.
|
|
Prepend item with given text and optional icons, and user-data pointer as first child of father.
|
|
Move item under father before other item.
|
|
Extract item.
|
|
Remove item.
|
|
Remove items in range [fm, to] inclusively.
|
|
Remove all items from list.
|
|
Return item width.
|
|
Return item height.
|
|
Get item at x,y, if any.
|
|
Search items by name, beginning from item start. If the start item is NULL 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 NULL if no matching item is found. |
|
Search items by associated user data, beginning from item start. If the start item is NULL 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. |
|
Scroll to make item visible.
|
|
Change item's text.
|
|
Return item's text.
|
|
Change item's open icon.
|
|
Return item's open icon, deleting the old icon if it was owned.
|
|
Chance item's closed icon, deleting the old icon if it was owned.
|
|
Return item's closed icon.
|
|
Change item user-data pointer.
|
|
Return item user-data pointer.
|
|
Return TRUE if item is selected.
|
|
Return TRUE if item is current.
|
|
Return TRUE if item is visible.
|
|
Return TRUE if item opened.
|
|
Return TRUE if item expanded.
|
|
Return TRUE if item is a leaf-item, i.e. has no children.
|
|
Return TRUE if item is enabled.
|
|
Return item hit code: 0 outside, 1 icon, 2 text, 3 box.
|
|
Repaint item.
|
|
Enable item.
|
|
Disable item.
|
|
Select item.
|
|
Deselect item.
|
|
Toggle item selection.
|
|
Extend selection from anchor item to item.
|
|
Deselect all items.
|
|
Open item.
|
|
Close item.
|
|
Collapse tree.
Reimplemented in FX::FXDirList. |
|
Expand tree.
Reimplemented in FX::FXDirList. |
|
Change current item.
|
|
Return current item, if any.
|
|
Change anchor item.
|
|
Return anchor item, if any.
|
|
Return item under cursor, if any.
|
|
Sort all items recursively.
|
|
Sort root items.
|
|
Sort children of item.
|
|
Return sort function.
|
|
Change sort function.
|
|
Change text font.
|
|
Return text font.
|
|
Change parent-child indent amount.
|
|
Return parent-child indent amount.
|
|
Return normal text color.
|
|
Change normal text color.
|
|
Return selected text background.
|
|
Change selected text background.
|
|
Return selected text color.
|
|
Change selected text color.
|
|
Return line color.
|
|
Change line color.
|
|
Return list style.
|
|
Change list style.
|
|
Set the status line help text for this list.
|
|
Get the status line help text for this list.
|
|
Save object to a stream.
Reimplemented from FX::FXWindow. Reimplemented in FX::FXDirList. |
|
Load object from a stream.
Reimplemented from FX::FXWindow. Reimplemented in FX::FXDirList. |
Copyright © 1997-2005 Jeroen van der Zijp |