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

FX::FXListItem Class Reference

List item. More...

#include <FXList.h>

Inheritance diagram for FX::FXListItem:

FX::FXObject FX::FXColorItem List of all members.

Public Types

enum  {
  SELECTED = 1,
  FOCUS = 2,
  DISABLED = 4,
  DRAGGABLE = 8,
  ICONOWNED = 16
}

Public Member Functions

 FXListItem (const FXString &text, FXIcon *ic=NULL, void *ptr=NULL)
virtual void setText (const FXString &txt)
const FXStringgetText () const
virtual void setIcon (FXIcon *icn, FXbool owned=FALSE)
FXIcongetIcon () 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 setEnabled (FXbool enabled)
FXbool isEnabled () const
virtual void setDraggable (FXbool draggable)
FXbool isDraggable () const
virtual FXint getWidth (const FXList *list) const
virtual FXint getHeight (const FXList *list) const
virtual void create ()
virtual void detach ()
virtual void destroy ()
virtual void save (FXStream &store) const
virtual void load (FXStream &store)
virtual ~FXListItem ()

Friends

class FXList

Detailed Description

List item.

See also:


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
SELECTED  Selected.
FOCUS  Focus.
DISABLED  Disabled.
DRAGGABLE  Draggable.
ICONOWNED  Icon owned by item.


Constructor & Destructor Documentation

FX::FXListItem::FXListItem const FXString text,
FXIcon ic = NULL,
void *  ptr = NULL
[inline]
 

Construct new item with given text, icon, and user-data.

virtual FX::FXListItem::~FXListItem  )  [virtual]
 

Destroy item and free icons if owned.


Member Function Documentation

virtual void FX::FXListItem::setText const FXString txt  )  [virtual]
 

Change item's text label.

const FXString& FX::FXListItem::getText  )  const [inline]
 

Return item's text label.

virtual void FX::FXListItem::setIcon FXIcon icn,
FXbool  owned = FALSE
[virtual]
 

Change item's icon, deleting the old icon if it was owned.

FXIcon* FX::FXListItem::getIcon  )  const [inline]
 

Return item's icon.

void FX::FXListItem::setData void *  ptr  )  [inline]
 

Change item's user data.

void* FX::FXListItem::getData  )  const [inline]
 

Get item's user data.

virtual void FX::FXListItem::setFocus FXbool  focus  )  [virtual]
 

Make item draw as focused.

FXbool FX::FXListItem::hasFocus  )  const [inline]
 

Return true if item has focus.

virtual void FX::FXListItem::setSelected FXbool  selected  )  [virtual]
 

Select item.

FXbool FX::FXListItem::isSelected  )  const [inline]
 

Return true if this item is selected.

virtual void FX::FXListItem::setEnabled FXbool  enabled  )  [virtual]
 

Enable or disable item.

FXbool FX::FXListItem::isEnabled  )  const [inline]
 

Return true if this item is enabled.

virtual void FX::FXListItem::setDraggable FXbool  draggable  )  [virtual]
 

Make item draggable.

FXbool FX::FXListItem::isDraggable  )  const [inline]
 

Return true if this item is draggable.

virtual FXint FX::FXListItem::getWidth const FXList list  )  const [virtual]
 

Return width of item as drawn in list.

Reimplemented in FX::FXColorItem.

virtual FXint FX::FXListItem::getHeight const FXList list  )  const [virtual]
 

Return height of item as drawn in list.

Reimplemented in FX::FXColorItem.

virtual void FX::FXListItem::create  )  [virtual]
 

Create server-side resources.

virtual void FX::FXListItem::detach  )  [virtual]
 

Detach server-side resources.

virtual void FX::FXListItem::destroy  )  [virtual]
 

Destroy server-side resources.

virtual void FX::FXListItem::save FXStream store  )  const [virtual]
 

Save to stream.

Reimplemented from FX::FXObject.

virtual void FX::FXListItem::load FXStream store  )  [virtual]
 

Load from stream.

Reimplemented from FX::FXObject.


Friends And Related Function Documentation

friend class FXList [friend]
 

Copyright © 1997-2005 Jeroen van der Zijp