![]() |
Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members
![]() |
#include <FXHeader.h>
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 |
FXHeaderItem * | getItem (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) |
FXHeaderItem * | extractItem (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) |
FXIcon * | getItemIcon (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) |
FXFont * | getFont () const |
FXColor | getTextColor () const |
void | setTextColor (FXColor clr) |
void | setHeaderStyle (FXuint style) |
FXuint | getHeaderStyle () const |
void | setHelpText (const FXString &text) |
const FXString & | getHelpText () const |
virtual void | save (FXStream &store) const |
virtual void | load (FXStream &store) |
virtual | ~FXHeader () |
![]() | |
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 |
![]() | |
FXWindow (FXComposite *p, FXuint opts=0, FXint x=0, FXint y=0, FXint w=0, FXint h=0) | |
FXWindow * | getParent () const |
FXWindow * | getOwner () const |
FXWindow * | getShell () const |
FXWindow * | getRoot () const |
FXWindow * | getNext () const |
FXWindow * | getPrev () const |
FXWindow * | getFirst () const |
FXWindow * | getLast () const |
FXWindow * | getFocus () const |
void | setKey (FXuint k) |
FXuint | getKey () const |
void | setTarget (FXObject *t) |
FXObject * | getTarget () 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 |
FXAccelTable * | getAccelTable () const |
void | setAccelTable (FXAccelTable *acceltable) |
void | addHotKey (FXHotKey code) |
void | remHotKey (FXHotKey code) |
void | setHelpTag (const FXString &text) |
const FXString & | getHelpTag () const |
bool | isShell () const |
bool | isOwnerOf (const FXWindow *window) const |
bool | isChildOf (const FXWindow *window) const |
bool | containsChild (const FXWindow *child) const |
FXWindow * | getChildAt (FXint x, FXint y) const |
FXint | numChildren () const |
FXint | indexOfChild (const FXWindow *window) const |
FXWindow * | childAtIndex (FXint index) const |
FXComposeContext * | getComposeContext () const |
void | createComposeContext () |
void | destroyComposeContext () |
void | setDefaultCursor (FXCursor *cur) |
FXCursor * | getDefaultCursor () const |
void | setDragCursor (FXCursor *cur) |
FXCursor * | getDragCursor () 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 ®ion) |
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 FXchar * | tr (const FXchar *message, const FXchar *hint=NULL) const |
virtual | ~FXWindow () |
![]() | |
FXint | getWidth () const |
FXint | getHeight () const |
FXVisual * | getVisual () const |
void | setVisual (FXVisual *vis) |
virtual | ~FXDrawable () |
![]() | |
FXApp * | getApp () const |
FXID | id () const |
void | setUserData (void *ptr) |
void * | getUserData () const |
virtual | ~FXId () |
![]() | |
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) |
virtual | ~FXObject () |
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:
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 |
Destructor.
|
virtual |
Create server-side resources.
Reimplemented from FX::FXWindow.
|
virtual |
Detach server-side resources.
Reimplemented from FX::FXWindow.
|
virtual |
Perform layout.
Reimplemented from FX::FXWindow.
|
inline |
Return number of items.
FXint FX::FXHeader::getTotalSize | ( | ) | const |
Return total size of all items.
|
virtual |
Return default width.
Reimplemented from FX::FXFrame.
|
virtual |
Return default height.
Reimplemented from FX::FXFrame.
void FX::FXHeader::setPosition | ( | FXint | pos | ) |
Set the current position.
|
inline |
Return the current position.
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.
Change text label for item at index.
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.
Change sort direction (FALSE, TRUE, MAYBE)
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.
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.
Return relative icon and text position.
Changed button item's pressed state.
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.
|
inline |
return text font
|
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.
|
inline |
Get the status line help text for this header.
|
virtual |
Save header to a stream.
Reimplemented from FX::FXFrame.
|
virtual |
Load header from a stream.
Reimplemented from FX::FXFrame.
![]() |