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

FX::FXTreeItem Class Reference

Tree list Item. More...

#include <FXTreeList.h>

Inheritance diagram for FX::FXTreeItem:
FX::FXObject FX::FXDirItem

Public Types

enum  {
  SELECTED = 1, FOCUS = 2, DISABLED = 4, OPENED = 8,
  EXPANDED = 16, HASITEMS = 32, DRAGGABLE = 64, OPENICONOWNED = 128,
  CLOSEDICONOWNED = 256
}
 

Public Member Functions

 FXTreeItem (const FXString &text, FXIcon *oi=nullptr, FXIcon *ci=nullptr, FXptr ptr=nullptr)
 Constructor.
 
FXTreeItemgetParent () const
 Get parent item.
 
FXTreeItemgetNext () const
 Get next sibling item.
 
FXTreeItemgetPrev () const
 Get previous sibling item.
 
FXTreeItemgetFirst () const
 Get first child item.
 
FXTreeItemgetLast () const
 Get last child item.
 
FXTreeItemgetBelow () const
 Get item below this one in list.
 
FXTreeItemgetAbove () const
 Get item above this one in list.
 
FXint getNumChildren () const
 Get number of children of item.
 
virtual void setText (const FXString &txt)
 Change item label.
 
const FXStringgetText () const
 Get item label.
 
virtual void setOpenIcon (FXIcon *icn, FXbool owned=false)
 Change open icon, deleting the old icon if it was owned.
 
FXIcongetOpenIcon () const
 Get open icon.
 
virtual void setClosedIcon (FXIcon *icn, FXbool owned=false)
 Change closed icon, deleting the old icon if it was owned.
 
FXIcongetClosedIcon () const
 Get closed icon.
 
void setData (FXptr ptr)
 Change item user data.
 
FXptr getData () const
 Get item user data.
 
virtual void setFocus (FXbool focus)
 Make item draw as focused.
 
FXbool hasFocus () const
 Return true if item has focus.
 
virtual void setSelected (FXbool selected)
 Select item.
 
FXbool isSelected () const
 Return true if this item is selected.
 
virtual void setOpened (FXbool opened)
 Make item show as open.
 
FXbool isOpened () const
 Return true if this item is open.
 
virtual void setExpanded (FXbool expanded)
 Expand or collapse item.
 
FXbool isExpanded () const
 Return true if this item is expanded into sub items.
 
virtual void setEnabled (FXbool enabled)
 Enable or disable item.
 
FXbool isEnabled () const
 Return true if this item is enabled.
 
virtual void setDraggable (FXbool draggable)
 Make item draggable.
 
FXbool isDraggable () const
 Return true if this item is draggable.
 
FXbool hasItems () const
 Return true if subitems, real or imagined.
 
void setHasItems (FXbool flag)
 Change has items flag.
 
FXbool isChildOf (const FXTreeItem *item) const
 Return true if descendent of parent item.
 
FXbool isParentOf (const FXTreeItem *item) const
 Return true if ancestor of child item.
 
virtual FXString getTipText () const
 Return tip text.
 
virtual FXint getWidth (const FXTreeList *list) const
 Return width of item as drawn in list.
 
virtual FXint getHeight (const FXTreeList *list) const
 Return height of item as drawn in list.
 
virtual void create ()
 Create server-side resources.
 
virtual void detach ()
 Detach server-side resources.
 
virtual void destroy ()
 Destroy server-side resources.
 
virtual void save (FXStream &store) const
 Save to stream.
 
virtual void load (FXStream &store)
 Load from stream.
 
virtual ~FXTreeItem ()
 Destroy item and free icons if owned.
 
- Public Member Functions inherited from FX::FXObject
const FXchar * getClassName () const
 Get class name of some object.
 
FXbool isMemberOf (const FXMetaClass *metaclass) const
 Check if object is member of metaclass.
 
virtual long tryHandle (FXObject *sender, FXSelector sel, void *ptr)
 Try handle message safely, catching certain exceptions.
 
virtual long onDefault (FXObject *, FXSelector, void *)
 Called for unhandled messages.
 
virtual ~FXObject ()
 Virtual destructor.
 

Protected Member Functions

virtual void draw (const FXTreeList *list, FXDC &dc, FXint x, FXint y, FXint w, FXint h) const
 
virtual FXint hitItem (const FXTreeList *list, FXint x, FXint y) const
 

Protected Attributes

FXTreeItemparent
 
FXTreeItemprev
 
FXTreeItemnext
 
FXTreeItemfirst
 
FXTreeItemlast
 
FXString label
 
FXIconopenIcon
 
FXIconclosedIcon
 
FXptr data
 
FXuint state
 
FXint x
 
FXint y
 

Friends

class FXTreeList
 
class FXDirList
 

Detailed Description

Tree list Item.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
FOCUS 

Selected.

DISABLED 

Focus.

OPENED 

Disabled.

EXPANDED 

Opened.

HASITEMS 

Expanded.

DRAGGABLE 

Has virtual subitems.

OPENICONOWNED 

Draggable.

CLOSEDICONOWNED 

Open icon owned by item.


The documentation for this class was generated from the following file:

Copyright © 1997-2022 Jeroen van der Zijp