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

FX::FXTableItem Class Reference

Item in table. More...

#include <FXTable.h>

Inheritance diagram for FX::FXTableItem:
FX::FXObject FX::FXComboTableItem

Public Types

enum  {
  SELECTED = 0x00000001, FOCUS = 0x00000002, DISABLED = 0x00000004, DRAGGABLE = 0x00000008,
  RESERVED1 = 0x00000010, RESERVED2 = 0x00000020, ICONOWNED = 0x00000040, RIGHT = 0x00002000,
  LEFT = 0x00004000, CENTER_X = 0, TOP = 0x00008000, BOTTOM = 0x00010000,
  CENTER_Y = 0, BEFORE = 0x00020000, AFTER = 0x00040000, ABOVE = 0x00080000,
  BELOW = 0x00100000, LBORDER = 0x00200000, RBORDER = 0x00400000, TBORDER = 0x00800000,
  BBORDER = 0x01000000
}
 

Public Member Functions

 FXTableItem (const FXString &text, FXIcon *ic=nullptr, FXptr ptr=nullptr)
 Construct new table item.
 
virtual void setText (const FXString &txt)
 Change item's text label.
 
virtual FXString getText () const
 Return item's text label.
 
virtual void setIcon (FXIcon *icn, FXbool owned=false)
 Change item's icon, deleting the old icon if it was owned.
 
virtual FXIcongetIcon () const
 Return item's icon.
 
void setTipText (const FXString &text)
 Set the tool tip message for this item.
 
const FXStringgetTipText () const
 Get the tool tip message for this item.
 
void setData (FXptr ptr)
 Change item's user data.
 
FXptr getData () const
 Get item's 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 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.
 
virtual void setJustify (FXuint justify=RIGHT|CENTER_Y)
 Change item content justification.
 
FXuint getJustify () const
 Return item content justification.
 
virtual void setIconPosition (FXuint mode)
 Change item icon position.
 
FXuint getIconPosition () const
 Return item icon position.
 
virtual void setBorders (FXuint borders=0)
 Change item borders.
 
FXuint getBorders () const
 Return item borders.
 
virtual void setStipple (FXStipplePattern pattern)
 Change item background stipple.
 
FXStipplePattern getStipple () const
 Return item background stipple.
 
virtual FXWindowgetControlFor (FXTable *table)
 Create input control for editing this item.
 
virtual void setFromControl (FXWindow *control)
 Set value from input control.
 
virtual FXint getWidth (const FXTable *table) const
 Return width of item.
 
virtual FXint getHeight (const FXTable *table) const
 Return height of item.
 
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 ~FXTableItem ()
 Delete item and free icon 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

FXint textWidth (const FXTable *table) const
 
FXint textHeight (const FXTable *table) const
 
virtual void draw (const FXTable *table, FXDC &dc, FXint x, FXint y, FXint w, FXint h) const
 
virtual void drawBorders (const FXTable *table, FXDC &dc, FXint x, FXint y, FXint w, FXint h) const
 
virtual void drawContent (const FXTable *table, FXDC &dc, FXint x, FXint y, FXint w, FXint h) const
 
virtual void drawPattern (const FXTable *table, FXDC &dc, FXint x, FXint y, FXint w, FXint h) const
 
virtual void drawBackground (const FXTable *table, FXDC &dc, FXint x, FXint y, FXint w, FXint h) const
 

Protected Attributes

FXString label
 
FXString tip
 
FXIconicon
 
FXptr data
 
FXuint state
 

Friends

class FXTable
 

Detailed Description

Item in table.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
FOCUS 

Selected.

DISABLED 

Focus.

DRAGGABLE 

Disabled.

RESERVED1 

Draggable.

RESERVED2 

Reserved.

ICONOWNED 

Reserved.

RIGHT 

Icon owned by table item.

LEFT 

Align on right (default)

CENTER_X 

Align on left.

TOP 

Aling centered horizontally.

BOTTOM 

Align on top.

CENTER_Y 

Align on bottom.

BEFORE 

Aling centered vertically (default)

AFTER 

Icon before the text.

ABOVE 

Icon after the text.

BELOW 

Icon above the text.

LBORDER 

Icon below the text.

RBORDER 

Draw left border.

TBORDER 

Draw right border.

BBORDER 

Draw top border.


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

Copyright © 1997-2022 Jeroen van der Zijp