![]() |
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 () |
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 FX::FXHeader::~FXHeader | ( | ) | [virtual] |
Destructor.
virtual void FX::FXHeader::create | ( | ) | [virtual] |
virtual void FX::FXHeader::detach | ( | ) | [virtual] |
virtual void FX::FXHeader::layout | ( | ) | [virtual] |
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] |
virtual FXint FX::FXHeader::getDefaultHeight | ( | ) | [virtual] |
void FX::FXHeader::setPosition | ( | FXint | pos | ) |
Set the current position.
FXint FX::FXHeader::getPosition | ( | ) | const [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.
void FX::FXHeader::clearItems | ( | FXbool | notify = FALSE |
) |
Remove all items.
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.
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] |
virtual void FX::FXHeader::load | ( | FXStream & | store | ) | [virtual] |
![]() |