FX::FXTreeItem Class Reference

#include <FXTreeList.h>

Inheritance diagram for FX::FXTreeItem:

Inheritance graph
[legend]

List of all members.


Detailed Description

Tree list Item.

Public Types

enum  {
  SELECTED, FOCUS, DISABLED, OPENED,
  EXPANDED, HASITEMS, DRAGGABLE, OPENICONOWNED,
  CLOSEDICONOWNED
}

Public Member Functions

 FXTreeItem (const FXString &text, FXIcon *oi=NULL, FXIcon *ci=NULL, void *ptr=NULL)
FXTreeItemgetParent () const
FXTreeItemgetNext () const
FXTreeItemgetPrev () const
FXTreeItemgetFirst () const
FXTreeItemgetLast () const
FXTreeItemgetBelow () const
FXTreeItemgetAbove () const
FXint getNumChildren () const
virtual void setText (const FXString &txt)
const FXStringgetText () const
virtual void setOpenIcon (FXIcon *icn, FXbool owned=FALSE)
FXIcongetOpenIcon () const
virtual void setClosedIcon (FXIcon *icn, FXbool owned=FALSE)
FXIcongetClosedIcon () const
void setData (void *ptr)
void * getData () const
virtual void setFocus (FXbool focus)
FXbool hasFocus () const
virtual void setSelected (FXbool selected)
FXbool isSelected () const
virtual void setOpened (FXbool opened)
FXbool isOpened () const
virtual void setExpanded (FXbool expanded)
FXbool isExpanded () const
virtual void setEnabled (FXbool enabled)
FXbool isEnabled () const
virtual void setDraggable (FXbool draggable)
FXbool isDraggable () const
FXbool hasItems () const
void setHasItems (FXbool flag)
FXbool isChildOf (const FXTreeItem *item) const
FXbool isParentOf (const FXTreeItem *item) const
virtual FXint getWidth (const FXTreeList *list) const
virtual FXint getHeight (const FXTreeList *list) const
virtual void create ()
virtual void detach ()
virtual void destroy ()
virtual void save (FXStream &store) const
virtual void load (FXStream &store)
virtual ~FXTreeItem ()
virtual long onDefault (FXObject *, FXSelector, void *)
const FXchar * getClassName () const
bool isMemberOf (const FXMetaClass *metaclass) const
virtual long tryHandle (FXObject *sender, FXSelector sel, void *ptr)
QTransString tr (const char *text, const char *hint=0)
virtual void * getPythonObject () const
virtual void decouplePythonObject () const

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
void * data
FXuint state
FXint x
FXint y

Friends

class FXTreeList
class FXDirList

Member Enumeration Documentation

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.


Constructor & Destructor Documentation

FX::FXTreeItem::FXTreeItem ( const FXString text,
FXIcon oi = NULL,
FXIcon ci = NULL,
void *  ptr = NULL 
) [inline]

Constructor.

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

Destroy item and free icons if owned.


Member Function Documentation

FXTreeItem* FX::FXTreeItem::getParent (  )  const [inline]

Get parent item.

FXTreeItem* FX::FXTreeItem::getNext (  )  const [inline]

Get next sibling item.

FXTreeItem* FX::FXTreeItem::getPrev (  )  const [inline]

Get previous sibling item.

FXTreeItem* FX::FXTreeItem::getFirst (  )  const [inline]

Get first child item.

FXTreeItem* FX::FXTreeItem::getLast (  )  const [inline]

Get las child item.

FXTreeItem* FX::FXTreeItem::getBelow (  )  const

Get item below this one in list.

FXTreeItem* FX::FXTreeItem::getAbove (  )  const

Get item above this one in list.

FXint FX::FXTreeItem::getNumChildren (  )  const

Get number of children of item.

virtual void FX::FXTreeItem::setText ( const FXString txt  )  [virtual]

Change item label.

const FXString& FX::FXTreeItem::getText (  )  const [inline]

Get item label.

virtual void FX::FXTreeItem::setOpenIcon ( FXIcon icn,
FXbool  owned = FALSE 
) [virtual]

Change open icon, deleting the old icon if it was owned.

FXIcon* FX::FXTreeItem::getOpenIcon (  )  const [inline]

Get open icon.

virtual void FX::FXTreeItem::setClosedIcon ( FXIcon icn,
FXbool  owned = FALSE 
) [virtual]

Change closed icon, deleting the old icon if it was owned.

FXIcon* FX::FXTreeItem::getClosedIcon (  )  const [inline]

Get closed icon.

void FX::FXTreeItem::setData ( void *  ptr  )  [inline]

Change item user data.

void* FX::FXTreeItem::getData (  )  const [inline]

Get item user data.

virtual void FX::FXTreeItem::setFocus ( FXbool  focus  )  [virtual]

Make item draw as focused.

FXbool FX::FXTreeItem::hasFocus (  )  const [inline]

Return true if item has focus.

virtual void FX::FXTreeItem::setSelected ( FXbool  selected  )  [virtual]

Select item.

FXbool FX::FXTreeItem::isSelected (  )  const [inline]

Return true if this item is selected.

virtual void FX::FXTreeItem::setOpened ( FXbool  opened  )  [virtual]

Make item show as open.

FXbool FX::FXTreeItem::isOpened (  )  const [inline]

Return true if this item is open.

virtual void FX::FXTreeItem::setExpanded ( FXbool  expanded  )  [virtual]

Expand or collapse item.

FXbool FX::FXTreeItem::isExpanded (  )  const [inline]

Return true if this item is expanded into sub items.

virtual void FX::FXTreeItem::setEnabled ( FXbool  enabled  )  [virtual]

Enable or disable item.

FXbool FX::FXTreeItem::isEnabled (  )  const [inline]

Return true if this item is enabled.

virtual void FX::FXTreeItem::setDraggable ( FXbool  draggable  )  [virtual]

Make item draggable.

FXbool FX::FXTreeItem::isDraggable (  )  const [inline]

Return true if this item is draggable.

FXbool FX::FXTreeItem::hasItems (  )  const [inline]

Return TRUE if subitems, real or imagined.

void FX::FXTreeItem::setHasItems ( FXbool  flag  ) 

Change has items flag.

FXbool FX::FXTreeItem::isChildOf ( const FXTreeItem item  )  const

Return true if descendent of parent item.

FXbool FX::FXTreeItem::isParentOf ( const FXTreeItem item  )  const

Return true if ancestor of child item.

virtual FXint FX::FXTreeItem::getWidth ( const FXTreeList list  )  const [virtual]

Return width of item as drawn in list.

Referenced by FX::FXTreeList::getItemWidth().

virtual FXint FX::FXTreeItem::getHeight ( const FXTreeList list  )  const [virtual]

Return height of item as drawn in list.

Referenced by FX::FXTreeList::getItemHeight().

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

Create server-side resources.

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

Detach server-side resources.

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

Destroy server-side resources.

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

Save to stream.

Reimplemented from FX::FXObject.

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

Load from stream.

Reimplemented from FX::FXObject.

virtual long FX::FXObject::onDefault ( FXObject ,
FXSelector  ,
void *   
) [virtual, inherited]

Called for unhandled messages.

Reimplemented in FX::FXDelegator, FX::FXGLViewer, FX::FXMDIChild, and FX::FXMDIClient.

const FXchar* FX::FXObject::getClassName (  )  const [inherited]

Get class name of some object.

bool FX::FXObject::isMemberOf ( const FXMetaClass metaclass  )  const [inherited]

Check if object is member of metaclass.

virtual long FX::FXObject::tryHandle ( FXObject sender,
FXSelector  sel,
void *  ptr 
) [virtual, inherited]

Try handle message safely.

QTransString FX::FXObject::tr ( const char *  text,
const char *  hint = 0 
) [inherited]

Returns a human translated version of the text to the locale language (warning: uses a virtual method call, so can't use before construction)

virtual void* FX::FXObject::getPythonObject (  )  const [inline, virtual, inherited]

Returns the python object representing this instance (if created in python).

virtual void FX::FXObject::decouplePythonObject (  )  const [inline, virtual, inherited]

Causes decoupling of python object from this object (deletes self).


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

(C) 2002-2008 Niall Douglas. Some parts (C) to assorted authors.
Generated on Fri Jun 13 22:23:53 2008 for TnFOX by doxygen v1.5.6