Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

FX::FXTreeListBox Class Reference

#include <FXTreeListBox.h>

Inheritance diagram for FX::FXTreeListBox:
FX::FXPacker FX::FXComposite FX::FXWindow FX::FXDrawable FX::FXId FX::FXObject FX::FXDirBox

List of all members.

Public Types

enum  {
  ID_TREE = FXPacker::ID_LAST,
  ID_FIELD,
  ID_LAST
}

Public Member Functions

 FXTreeListBox (FXComposite *p, FXObject *tgt=NULL, FXSelector sel=0, FXuint opts=FRAME_SUNKEN|FRAME_THICK|TREELISTBOX_NORMAL, FXint x=0, FXint y=0, FXint w=0, FXint h=0, FXint pl=DEFAULT_PAD, FXint pr=DEFAULT_PAD, FXint pt=DEFAULT_PAD, FXint pb=DEFAULT_PAD)
virtual void create ()
virtual void detach ()
virtual void destroy ()
virtual void layout ()
virtual void enable ()
virtual void disable ()
virtual FXint getDefaultWidth ()
virtual FXint getDefaultHeight ()
FXint getNumItems () const
FXint getNumVisible () const
void setNumVisible (FXint nvis)
FXTreeItemgetFirstItem () const
FXTreeItemgetLastItem () const
FXint fillItems (FXTreeItem *father, const FXchar **strings, FXIcon *oi=NULL, FXIcon *ci=NULL, void *ptr=NULL)
FXint fillItems (FXTreeItem *father, const FXString &strings, FXIcon *oi=NULL, FXIcon *ci=NULL, void *ptr=NULL)
FXTreeIteminsertItem (FXTreeItem *other, FXTreeItem *father, FXTreeItem *item)
FXTreeIteminsertItem (FXTreeItem *other, FXTreeItem *father, const FXString &text, FXIcon *oi=NULL, FXIcon *ci=NULL, void *ptr=NULL)
FXTreeItemappendItem (FXTreeItem *father, FXTreeItem *item)
FXTreeItemappendItem (FXTreeItem *father, const FXString &text, FXIcon *oi=NULL, FXIcon *ci=NULL, void *ptr=NULL)
FXTreeItemprependItem (FXTreeItem *father, FXTreeItem *item)
FXTreeItemprependItem (FXTreeItem *father, const FXString &text, FXIcon *oi=NULL, FXIcon *ci=NULL, void *ptr=NULL)
FXTreeItemmoveItem (FXTreeItem *other, FXTreeItem *father, FXTreeItem *item)
FXTreeItemextractItem (FXTreeItem *item)
void removeItem (FXTreeItem *item)
void removeItems (FXTreeItem *fm, FXTreeItem *to)
void clearItems ()
FXTreeItemfindItem (const FXString &text, FXTreeItem *start=NULL, FXuint flags=SEARCH_FORWARD|SEARCH_WRAP) const
FXTreeItemfindItemByData (const void *ptr, FXTreeItem *start=NULL, FXuint flags=SEARCH_FORWARD|SEARCH_WRAP) const
FXbool isItemCurrent (const FXTreeItem *item) const
FXbool isItemLeaf (const FXTreeItem *item) const
void sortRootItems ()
void sortItems ()
void sortChildItems (FXTreeItem *item)
virtual void setCurrentItem (FXTreeItem *item, FXbool notify=FALSE)
FXTreeItemgetCurrentItem () const
void setItemText (FXTreeItem *item, const FXString &text)
FXString getItemText (const FXTreeItem *item) const
void setItemOpenIcon (FXTreeItem *item, FXIcon *icon, FXbool owned=FALSE)
FXIcongetItemOpenIcon (const FXTreeItem *item) const
void setItemClosedIcon (FXTreeItem *item, FXIcon *icon, FXbool owned=FALSE)
FXIcongetItemClosedIcon (const FXTreeItem *item) const
void setItemData (FXTreeItem *item, void *ptr) const
void * getItemData (const FXTreeItem *item) const
FXTreeListSortFunc getSortFunc () const
void setSortFunc (FXTreeListSortFunc func)
FXbool isPaneShown () const
void setFont (FXFont *fnt)
FXFontgetFont () const
FXuint getListStyle () const
void setListStyle (FXuint style)
void setHelpText (const FXString &txt)
const FXStringgetHelpText () const
void setTipText (const FXString &txt)
const FXStringgetTipText () const
virtual void save (FXStream &store) const
virtual void load (FXStream &store)
virtual ~FXTreeListBox ()

Detailed Description

The Tree List Box behaves very much like a List Box, except that it supports a hierarchical, tree structured display of the items.

When an item is selected it issues a SEL_COMMAND message with the pointer to the item. While manipulating the tree list, it may send SEL_CHANGED messages to indicate which item the cursor is hovering over.

See also:


Member Enumeration Documentation

anonymous enum
Enumerator:
ID_TREE 
ID_FIELD 
ID_LAST 

Constructor & Destructor Documentation

FX::FXTreeListBox::FXTreeListBox ( FXComposite p,
FXObject tgt = NULL,
FXSelector  sel = 0,
FXuint  opts = FRAME_SUNKEN|FRAME_THICK|TREELISTBOX_NORMAL,
FXint  x = 0,
FXint  y = 0,
FXint  w = 0,
FXint  h = 0,
FXint  pl = DEFAULT_PAD,
FXint  pr = DEFAULT_PAD,
FXint  pt = DEFAULT_PAD,
FXint  pb = DEFAULT_PAD 
)

Construct tree list box.

virtual FX::FXTreeListBox::~FXTreeListBox ( ) [virtual]

Destructor.


Member Function Documentation

virtual void FX::FXTreeListBox::create ( ) [virtual]

Create server-side resources.

Reimplemented from FX::FXComposite.

Reimplemented in FX::FXDirBox.

virtual void FX::FXTreeListBox::detach ( ) [virtual]

Detach server-side resources.

Reimplemented from FX::FXComposite.

Reimplemented in FX::FXDirBox.

virtual void FX::FXTreeListBox::destroy ( ) [virtual]

Destroy server-side resources.

Reimplemented from FX::FXComposite.

Reimplemented in FX::FXDirBox.

virtual void FX::FXTreeListBox::layout ( ) [virtual]

Perform layout.

Reimplemented from FX::FXPacker.

virtual void FX::FXTreeListBox::enable ( ) [virtual]

Enable widget.

Reimplemented from FX::FXWindow.

virtual void FX::FXTreeListBox::disable ( ) [virtual]

Disable widget.

Reimplemented from FX::FXWindow.

Return default with.

Reimplemented from FX::FXPacker.

Return default height.

Reimplemented from FX::FXPacker.

Return number of items.

Return number of visible items.

Set number of visible items to determine default height.

Return first top-level item.

Return last top-level item.

FXint FX::FXTreeListBox::fillItems ( FXTreeItem father,
const FXchar **  strings,
FXIcon oi = NULL,
FXIcon ci = NULL,
void *  ptr = NULL 
)

Fill tree list box by appending items from array of strings.

FXint FX::FXTreeListBox::fillItems ( FXTreeItem father,
const FXString strings,
FXIcon oi = NULL,
FXIcon ci = NULL,
void *  ptr = NULL 
)

Fill tree list box by appending items from newline separated strings.

Insert [possibly subclassed] item under father before other item.

FXTreeItem* FX::FXTreeListBox::insertItem ( FXTreeItem other,
FXTreeItem father,
const FXString text,
FXIcon oi = NULL,
FXIcon ci = NULL,
void *  ptr = NULL 
)

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.

FXTreeItem* FX::FXTreeListBox::appendItem ( FXTreeItem father,
const FXString text,
FXIcon oi = NULL,
FXIcon ci = NULL,
void *  ptr = NULL 
)

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.

FXTreeItem* FX::FXTreeListBox::prependItem ( FXTreeItem father,
const FXString text,
FXIcon oi = NULL,
FXIcon ci = NULL,
void *  ptr = NULL 
)

Prepend item with given text and optional icons, and user-data pointer as first child of father.

FXTreeItem* FX::FXTreeListBox::moveItem ( FXTreeItem other,
FXTreeItem father,
FXTreeItem item 
)

Move item under father before other item.

Remove item.

Remove all items in range [fm...to].

Remove all items from list.

FXTreeItem* FX::FXTreeListBox::findItem ( const FXString text,
FXTreeItem start = NULL,
FXuint  flags = SEARCH_FORWARD|SEARCH_WRAP 
) const

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.

FXTreeItem* FX::FXTreeListBox::findItemByData ( const void *  ptr,
FXTreeItem start = NULL,
FXuint  flags = SEARCH_FORWARD|SEARCH_WRAP 
) const

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.

Return TRUE if item is the current item.

Return TRUE if item is leaf-item, i.e. has no children.

Sort the toplevel items with the sort function.

Sort all items recursively.

Sort child items of item.

virtual void FX::FXTreeListBox::setCurrentItem ( FXTreeItem item,
FXbool  notify = FALSE 
) [virtual]

Change current item.

Return current item.

void FX::FXTreeListBox::setItemText ( FXTreeItem item,
const FXString text 
)

Change item label.

Return item label.

void FX::FXTreeListBox::setItemOpenIcon ( FXTreeItem item,
FXIcon icon,
FXbool  owned = FALSE 
)

Change item's open icon, delete old one if it was owned.

Return item's open icon.

void FX::FXTreeListBox::setItemClosedIcon ( FXTreeItem item,
FXIcon icon,
FXbool  owned = FALSE 
)

Change item's closed icon, delete old one if it was owned.

Return item's closed icon.

void FX::FXTreeListBox::setItemData ( FXTreeItem item,
void *  ptr 
) const

Change item's user data.

void* FX::FXTreeListBox::getItemData ( const FXTreeItem item) const

Return item's user data.

Return item sort function.

Change item sort function.

Is the pane shown.

Change font.

Return font.

Return list style.

Change list style.

Change help text.

Return help text.

void FX::FXTreeListBox::setTipText ( const FXString txt)

Change tip text.

Return tip text.

virtual void FX::FXTreeListBox::save ( FXStream store) const [virtual]

Save object to a stream.

Reimplemented from FX::FXPacker.

Reimplemented in FX::FXDirBox.

virtual void FX::FXTreeListBox::load ( FXStream store) [virtual]

Load object from a stream.

Reimplemented from FX::FXPacker.

Reimplemented in FX::FXDirBox.

Copyright © 1997-2005 Jeroen van der Zijp