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

FX::FXHeader Class Reference

#include <FXHeader.h>

Inheritance diagram for FX::FXHeader:
FX::FXFrame FX::FXWindow FX::FXDrawable FX::FXId FX::FXObject

Public Member Functions

 FXHeader (FXComposite *p, FXObject *tgt=NULL, FXSelector sel=0, FXuint opts=HEADER_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 layout ()
 
FXint getNumItems () const
 
FXint getTotalSize () const
 
virtual FXint getDefaultWidth ()
 
virtual FXint getDefaultHeight ()
 
void setPosition (FXint pos)
 
FXint getPosition () const
 
FXint getItemAt (FXint coord) const
 
FXHeaderItemgetItem (FXint index) const
 
FXint setItem (FXint index, FXHeaderItem *item, FXbool notify=FALSE)
 
FXint setItem (FXint index, const FXString &text, FXIcon *icon=NULL, FXint size=0, void *ptr=NULL, FXbool notify=FALSE)
 
FXint fillItems (const FXchar **strings, FXIcon *icon=NULL, FXint size=0, void *ptr=NULL, FXbool notify=FALSE)
 
FXint fillItems (const FXString &strings, FXIcon *icon=NULL, FXint size=0, void *ptr=NULL, FXbool notify=FALSE)
 
FXint insertItem (FXint index, FXHeaderItem *item, FXbool notify=FALSE)
 
FXint insertItem (FXint index, const FXString &text, FXIcon *icon=NULL, FXint size=0, void *ptr=NULL, FXbool notify=FALSE)
 
FXint appendItem (FXHeaderItem *item, FXbool notify=FALSE)
 
FXint appendItem (const FXString &text, FXIcon *icon=NULL, FXint size=0, void *ptr=NULL, FXbool notify=FALSE)
 
FXint prependItem (FXHeaderItem *item, FXbool notify=FALSE)
 
FXint prependItem (const FXString &text, FXIcon *icon=NULL, FXint size=0, void *ptr=NULL, FXbool notify=FALSE)
 
FXHeaderItemextractItem (FXint index, FXbool notify=FALSE)
 
void removeItem (FXint index, FXbool notify=FALSE)
 
void clearItems (FXbool notify=FALSE)
 
void setItemText (FXint index, const FXString &text)
 
FXString getItemText (FXint index) const
 
void setItemIcon (FXint index, FXIcon *icon)
 
FXIcongetItemIcon (FXint index) const
 
void setItemSize (FXint index, FXint size)
 
FXint getItemSize (FXint index) const
 
FXint getItemOffset (FXint index) const
 
void setItemData (FXint index, void *ptr)
 
void * getItemData (FXint index) const
 
void setArrowDir (FXint index, FXbool dir=MAYBE)
 
FXbool getArrowDir (FXint index) const
 
void setItemJustify (FXint index, FXuint justify)
 
FXuint getItemJustify (FXint index) const
 
void setItemIconPosition (FXint index, FXuint mode)
 
FXuint getItemIconPosition (FXint index) const
 
void setItemPressed (FXint index, FXbool pressed=TRUE)
 
FXbool isItemPressed (FXint index) const
 
void makeItemVisible (FXint index)
 
void updateItem (FXint index) const
 
void setFont (FXFont *fnt)
 
FXFontgetFont () const
 
FXColor getTextColor () const
 
void setTextColor (FXColor clr)
 
void setHeaderStyle (FXuint style)
 
FXuint getHeaderStyle () const
 
void setHelpText (const FXString &text)
 
const FXStringgetHelpText () const
 
virtual void save (FXStream &store) const
 
virtual void load (FXStream &store)
 
virtual ~FXHeader ()
 
- Public Member Functions inherited from FX::FXFrame
 FXFrame (FXComposite *p, FXuint opts=FRAME_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)
 
void setFrameStyle (FXuint style)
 
FXuint getFrameStyle () const
 
FXint getBorderWidth () const
 
void setPadTop (FXint pt)
 
FXint getPadTop () const
 
void setPadBottom (FXint pb)
 
FXint getPadBottom () const
 
void setPadLeft (FXint pl)
 
FXint getPadLeft () const
 
void setPadRight (FXint pr)
 
FXint getPadRight () const
 
void setHiliteColor (FXColor clr)
 
FXColor getHiliteColor () const
 
void setShadowColor (FXColor clr)
 
FXColor getShadowColor () const
 
void setBorderColor (FXColor clr)
 
FXColor getBorderColor () const
 
void setBaseColor (FXColor clr)
 
FXColor getBaseColor () const
 
- Public Member Functions inherited from FX::FXWindow
 FXWindow (FXComposite *p, FXuint opts=0, FXint x=0, FXint y=0, FXint w=0, FXint h=0)
 
FXWindowgetParent () const
 
FXWindowgetOwner () const
 
FXWindowgetShell () const
 
FXWindowgetRoot () const
 
FXWindowgetNext () const
 
FXWindowgetPrev () const
 
FXWindowgetFirst () const
 
FXWindowgetLast () const
 
FXWindowgetFocus () const
 
void setKey (FXuint k)
 
FXuint getKey () const
 
void setTarget (FXObject *t)
 
FXObjectgetTarget () const
 
void setSelector (FXSelector sel)
 
FXSelector getSelector () const
 
FXint getX () const
 
FXint getY () const
 
virtual FXint getWidthForHeight (FXint givenheight)
 
virtual FXint getHeightForWidth (FXint givenwidth)
 
void setX (FXint x)
 
void setY (FXint y)
 
void setWidth (FXint w)
 
void setHeight (FXint h)
 
void setLayoutHints (FXuint lout)
 
FXuint getLayoutHints () const
 
FXAccelTablegetAccelTable () const
 
void setAccelTable (FXAccelTable *acceltable)
 
void addHotKey (FXHotKey code)
 
void remHotKey (FXHotKey code)
 
void setHelpTag (const FXString &text)
 
const FXStringgetHelpTag () const
 
bool isShell () const
 
bool isOwnerOf (const FXWindow *window) const
 
bool isChildOf (const FXWindow *window) const
 
bool containsChild (const FXWindow *child) const
 
FXWindowgetChildAt (FXint x, FXint y) const
 
FXint numChildren () const
 
FXint indexOfChild (const FXWindow *window) const
 
FXWindowchildAtIndex (FXint index) const
 
FXComposeContextgetComposeContext () const
 
void createComposeContext ()
 
void destroyComposeContext ()
 
void setDefaultCursor (FXCursor *cur)
 
FXCursorgetDefaultCursor () const
 
void setDragCursor (FXCursor *cur)
 
FXCursorgetDragCursor () const
 
FXint getCursorPosition (FXint &x, FXint &y, FXuint &buttons) const
 
FXint setCursorPosition (FXint x, FXint y)
 
bool isEnabled () const
 
bool isActive () const
 
virtual bool canFocus () const
 
bool hasFocus () const
 
bool inFocusChain () const
 
virtual void setFocus ()
 
virtual void killFocus ()
 
virtual void changeFocus (FXWindow *child)
 
virtual void setDefault (FXbool enable=TRUE)
 
bool isDefault () const
 
void setInitial (bool enable=true)
 
bool isInitial () const
 
virtual void enable ()
 
virtual void disable ()
 
virtual void attach (FXID w)
 
virtual void destroy ()
 
virtual void setShape (const FXRegion &region)
 
virtual void setShape (FXBitmap *bitmap)
 
virtual void setShape (FXIcon *icon)
 
virtual void clearShape ()
 
virtual void raise ()
 
virtual void lower ()
 
virtual void move (FXint x, FXint y)
 
virtual void resize (FXint w, FXint h)
 
virtual void position (FXint x, FXint y, FXint w, FXint h)
 
virtual void recalc ()
 
void forceRefresh ()
 
virtual void reparent (FXWindow *father, FXWindow *other=NULL)
 
void scroll (FXint x, FXint y, FXint w, FXint h, FXint dx, FXint dy) const
 
void update (FXint x, FXint y, FXint w, FXint h) const
 
void update () const
 
void repaint (FXint x, FXint y, FXint w, FXint h) const
 
void repaint () const
 
void grab ()
 
void ungrab ()
 
bool grabbed () const
 
void grabKeyboard ()
 
void ungrabKeyboard ()
 
bool grabbedKeyboard () const
 
virtual void show ()
 
virtual void hide ()
 
bool shown () const
 
virtual bool isComposite () const
 
bool underCursor () const
 
bool hasSelection () const
 
bool acquireSelection (const FXDragType *types, FXuint numtypes)
 
bool releaseSelection ()
 
bool hasClipboard () const
 
bool acquireClipboard (const FXDragType *types, FXuint numtypes)
 
bool releaseClipboard ()
 
virtual void dropEnable ()
 
virtual void dropDisable ()
 
bool isDropEnabled () const
 
bool isDragging () const
 
bool beginDrag (const FXDragType *types, FXuint numtypes)
 
bool handleDrag (FXint x, FXint y, FXDragAction action=DRAG_COPY)
 
FXDragAction endDrag (bool drop=true)
 
bool isDropTarget () const
 
void setDragRectangle (FXint x, FXint y, FXint w, FXint h, bool wantupdates=true) const
 
void clearDragRectangle () const
 
void acceptDrop (FXDragAction action=DRAG_ACCEPT) const
 
FXDragAction didAccept () const
 
void dropFinished (FXDragAction action=DRAG_REJECT) const
 
bool inquireDNDTypes (FXDNDOrigin origin, FXDragType *&types, FXuint &numtypes) const
 
bool offeredDNDType (FXDNDOrigin origin, FXDragType type) const
 
FXDragAction inquireDNDAction () const
 
bool setDNDData (FXDNDOrigin origin, FXDragType type, FXuchar *data, FXuint size) const
 
bool setDNDData (FXDNDOrigin origin, FXDragType type, const FXString &string) const
 
bool getDNDData (FXDNDOrigin origin, FXDragType type, FXuchar *&data, FXuint &size) const
 
bool getDNDData (FXDNDOrigin origin, FXDragType type, FXString &string) const
 
virtual bool contains (FXint parentx, FXint parenty) const
 
void translateCoordinatesFrom (FXint &tox, FXint &toy, const FXWindow *fromwindow, FXint fromx, FXint fromy) const
 
void translateCoordinatesTo (FXint &tox, FXint &toy, const FXWindow *towindow, FXint fromx, FXint fromy) const
 
virtual void setBackColor (FXColor clr)
 
FXColor getBackColor () const
 
virtual bool doesSaveUnder () const
 
virtual const FXchartr (const FXchar *message, const FXchar *hint=NULL) const
 
virtual ~FXWindow ()
 
- Public Member Functions inherited from FX::FXDrawable
FXint getWidth () const
 
FXint getHeight () const
 
FXVisualgetVisual () const
 
void setVisual (FXVisual *vis)
 
virtual ~FXDrawable ()
 
- Public Member Functions inherited from FX::FXId
FXAppgetApp () const
 
FXID id () const
 
void setUserData (void *ptr)
 
void * getUserData () const
 
virtual ~FXId ()
 
- Public Member Functions inherited from FX::FXObject
virtual long onDefault (FXObject *, FXSelector, void *)
 
const FXchargetClassName () const
 
bool isMemberOf (const FXMetaClass *metaclass) const
 
virtual long tryHandle (FXObject *sender, FXSelector sel, void *ptr)
 
virtual ~FXObject ()
 

Additional Inherited Members

- Public Types inherited from FX::FXWindow
enum  {
  ID_NONE,
  ID_HIDE,
  ID_SHOW,
  ID_TOGGLESHOWN,
  ID_LOWER,
  ID_RAISE,
  ID_DELETE,
  ID_DISABLE,
  ID_ENABLE,
  ID_TOGGLEENABLED,
  ID_UNCHECK,
  ID_CHECK,
  ID_UNKNOWN,
  ID_UPDATE,
  ID_AUTOSCROLL,
  ID_TIPTIMER,
  ID_HSCROLLED,
  ID_VSCROLLED,
  ID_SETVALUE,
  ID_SETINTVALUE,
  ID_SETREALVALUE,
  ID_SETSTRINGVALUE,
  ID_SETICONVALUE,
  ID_SETINTRANGE,
  ID_SETREALRANGE,
  ID_GETINTVALUE,
  ID_GETREALVALUE,
  ID_GETSTRINGVALUE,
  ID_GETICONVALUE,
  ID_GETINTRANGE,
  ID_GETREALRANGE,
  ID_SETHELPSTRING,
  ID_GETHELPSTRING,
  ID_SETTIPSTRING,
  ID_GETTIPSTRING,
  ID_QUERY_MENU,
  ID_HOTKEY,
  ID_ACCEL,
  ID_UNPOST,
  ID_POST,
  ID_MDI_TILEHORIZONTAL,
  ID_MDI_TILEVERTICAL,
  ID_MDI_CASCADE,
  ID_MDI_MAXIMIZE,
  ID_MDI_MINIMIZE,
  ID_MDI_RESTORE,
  ID_MDI_CLOSE,
  ID_MDI_WINDOW,
  ID_MDI_MENUWINDOW,
  ID_MDI_MENUMINIMIZE,
  ID_MDI_MENURESTORE,
  ID_MDI_MENUCLOSE,
  ID_MDI_NEXT,
  ID_MDI_PREV,
  ID_LAST
}
 
- Static Public Member Functions inherited from FX::FXWindow
static FXWindowcommonAncestor (FXWindow *a, FXWindow *b)
 
static bool before (const FXWindow *a, const FXWindow *b)
 
static bool after (const FXWindow *a, const FXWindow *b)
 
- Static Public Attributes inherited from FX::FXWindow
static FXDragType octetType
 
static FXDragType deleteType
 
static FXDragType textType
 
static FXDragType utf8Type
 
static FXDragType utf16Type
 
static FXDragType colorType
 
static FXDragType urilistType
 
static const FXDragType stringType
 
static const FXDragType imageType
 
static const FXchar octetTypeName []
 
static const FXchar deleteTypeName []
 
static const FXchar textTypeName []
 
static const FXchar colorTypeName []
 
static const FXchar urilistTypeName []
 
static const FXchar utf8TypeName []
 
static const FXchar utf16TypeName []
 

Detailed Description

Header control may be placed over a table or list to provide a resizable captions above a number of columns.

Each caption comprises a label and an optional icon; in addition, an arrow may be shown to indicate whether the items in that column are sorted, and if so, whether they are sorted in increasing or decreasing order. Each caption can be interactively resized. During the resizing, if the HEADER_TRACKING was specified, the header control sends a SEL_CHANGED message to its target, with the message data set to the caption number being resized, of the type FXint. If the HEADER_TRACKING was not specified the SEL_CHANGED message is sent at the end of the resizing operation. Clicking on a caption causes a message of type SEL_COMMAND to be sent to the target, with the message data set to the caption number being clicked. A single click on a split causes a message of type SEL_CLICKED to be sent to the target; a typical response to this message would be to adjust the size of the split to fit the contents displayed underneath it. The contents may be scrolled by calling setPosition().

See also:

Constructor & Destructor Documentation

FX::FXHeader::FXHeader ( FXComposite p,
FXObject tgt = NULL,
FXSelector  sel = 0,
FXuint  opts = HEADER_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 new header control.

virtual FX::FXHeader::~FXHeader ( )
virtual

Destructor.

Member Function Documentation

virtual void FX::FXHeader::create ( )
virtual

Create server-side resources.

Reimplemented from FX::FXWindow.

virtual void FX::FXHeader::detach ( )
virtual

Detach server-side resources.

Reimplemented from FX::FXWindow.

virtual void FX::FXHeader::layout ( )
virtual

Perform layout.

Reimplemented from FX::FXWindow.

FXint FX::FXHeader::getNumItems ( ) const
inline

Return number of items.

FXint FX::FXHeader::getTotalSize ( ) const

Return total size of all items.

virtual FXint FX::FXHeader::getDefaultWidth ( )
virtual

Return default width.

Reimplemented from FX::FXFrame.

virtual FXint FX::FXHeader::getDefaultHeight ( )
virtual

Return default height.

Reimplemented from FX::FXFrame.

void FX::FXHeader::setPosition ( FXint  pos)

Set the current position.

FXint FX::FXHeader::getPosition ( ) const
inline

Return the current position.

FXint FX::FXHeader::getItemAt ( FXint  coord) const

Return item-index given coordinate offset, or -1 if coordinate is before first item in header, or nitems if coordinate is after last item in header.

FXHeaderItem* FX::FXHeader::getItem ( FXint  index) const

Return item at given index.

FXint FX::FXHeader::setItem ( FXint  index,
FXHeaderItem item,
FXbool  notify = FALSE 
)

Replace the item with a [possibly subclassed] item.

FXint FX::FXHeader::setItem ( FXint  index,
const FXString text,
FXIcon icon = NULL,
FXint  size = 0,
void *  ptr = NULL,
FXbool  notify = FALSE 
)

Replace items text, icon, and user-data pointer.

FXint FX::FXHeader::fillItems ( const FXchar **  strings,
FXIcon icon = NULL,
FXint  size = 0,
void *  ptr = NULL,
FXbool  notify = FALSE 
)

Fill header by appending items from array of strings.

FXint FX::FXHeader::fillItems ( const FXString strings,
FXIcon icon = NULL,
FXint  size = 0,
void *  ptr = NULL,
FXbool  notify = FALSE 
)

Fill header by appending items from newline separated strings.

FXint FX::FXHeader::insertItem ( FXint  index,
FXHeaderItem item,
FXbool  notify = FALSE 
)

Insert a new [possibly subclassed] item at the give index.

FXint FX::FXHeader::insertItem ( FXint  index,
const FXString text,
FXIcon icon = NULL,
FXint  size = 0,
void *  ptr = NULL,
FXbool  notify = FALSE 
)

Insert item at index with given text, icon, and user-data pointer.

FXint FX::FXHeader::appendItem ( FXHeaderItem item,
FXbool  notify = FALSE 
)

Append a [possibly subclassed] item to the list.

FXint FX::FXHeader::appendItem ( const FXString text,
FXIcon icon = NULL,
FXint  size = 0,
void *  ptr = NULL,
FXbool  notify = FALSE 
)

Append new item with given text and optional icon, and user-data pointer.

FXint FX::FXHeader::prependItem ( FXHeaderItem item,
FXbool  notify = FALSE 
)

Prepend a [possibly subclassed] item to the list.

FXint FX::FXHeader::prependItem ( const FXString text,
FXIcon icon = NULL,
FXint  size = 0,
void *  ptr = NULL,
FXbool  notify = FALSE 
)

Prepend new item with given text and optional icon, and user-data pointer.

FXHeaderItem* FX::FXHeader::extractItem ( FXint  index,
FXbool  notify = FALSE 
)

Extract item from list.

void FX::FXHeader::removeItem ( FXint  index,
FXbool  notify = FALSE 
)

Remove item at index.

void FX::FXHeader::clearItems ( FXbool  notify = FALSE)

Remove all items.

void FX::FXHeader::setItemText ( FXint  index,
const FXString text 
)

Change text label for item at index.

FXString FX::FXHeader::getItemText ( FXint  index) const

Get text of item at index.

void FX::FXHeader::setItemIcon ( FXint  index,
FXIcon icon 
)

Change icon of item at index.

FXIcon* FX::FXHeader::getItemIcon ( FXint  index) const

Return icon of item at index.

void FX::FXHeader::setItemSize ( FXint  index,
FXint  size 
)

Change size of item at index.

FXint FX::FXHeader::getItemSize ( FXint  index) const

Return size of item at index.

FXint FX::FXHeader::getItemOffset ( FXint  index) const

Compute offset from the left side of item at index.

void FX::FXHeader::setItemData ( FXint  index,
void *  ptr 
)

Change data of item at index.

void* FX::FXHeader::getItemData ( FXint  index) const

Return data of item at index.

void FX::FXHeader::setArrowDir ( FXint  index,
FXbool  dir = MAYBE 
)

Change sort direction (FALSE, TRUE, MAYBE)

FXbool FX::FXHeader::getArrowDir ( FXint  index) const

Return sort direction (FALSE, TRUE, MAYBE)

void FX::FXHeader::setItemJustify ( FXint  index,
FXuint  justify 
)

Change item justification.

Horizontal justification is controlled by passing FXHeaderItem::RIGHT, FXHeaderItem::LEFT, or FXHeaderItem::CENTER_X. Vertical justification is controlled by FXHeaderItem::TOP, FXHeaderItem::BOTTOM, or FXHeaderItem::CENTER_Y. The default is a combination of FXHeaderItem::LEFT and FXHeaderItem::CENTER_Y.

FXuint FX::FXHeader::getItemJustify ( FXint  index) const

Return item justification.

void FX::FXHeader::setItemIconPosition ( FXint  index,
FXuint  mode 
)

Change relative position of icon and text of item.

Passing FXHeaderItem::BEFORE or FXHeaderItem::AFTER places the icon before or after the text, and passing FXHeaderItem::ABOVE or FXHeaderItem::BELOW places it above or below the text, respectively. The default of FXHeaderItem::BEFORE places the icon in front of the text.

FXuint FX::FXHeader::getItemIconPosition ( FXint  index) const

Return relative icon and text position.

void FX::FXHeader::setItemPressed ( FXint  index,
FXbool  pressed = TRUE 
)

Changed button item's pressed state.

FXbool FX::FXHeader::isItemPressed ( FXint  index) const

Return TRUE if button item is pressed in.

void FX::FXHeader::makeItemVisible ( FXint  index)

Scroll to make given item visible.

void FX::FXHeader::updateItem ( FXint  index) const

Repaint header at index.

void FX::FXHeader::setFont ( FXFont fnt)

Change text font.

FXFont* FX::FXHeader::getFont ( ) const
inline

return text font

FXColor FX::FXHeader::getTextColor ( ) const
inline

Return text color.

void FX::FXHeader::setTextColor ( FXColor  clr)

Change text color.

void FX::FXHeader::setHeaderStyle ( FXuint  style)

Set header style options.

FXuint FX::FXHeader::getHeaderStyle ( ) const

Get header style options.

void FX::FXHeader::setHelpText ( const FXString text)

Set the status line help text for this header.

const FXString& FX::FXHeader::getHelpText ( ) const
inline

Get the status line help text for this header.

virtual void FX::FXHeader::save ( FXStream store) const
virtual

Save header to a stream.

Reimplemented from FX::FXFrame.

virtual void FX::FXHeader::load ( FXStream store)
virtual

Load header from a stream.

Reimplemented from FX::FXFrame.

Copyright © 1997-2005 Jeroen van der Zijp