![]() |
Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members
![]() |
#include <FXList.h>
Inheritance diagram for FX::FXList:
Public Methods | |
FXList (FXComposite *p, FXint nvis, FXObject *tgt=NULL, FXSelector sel=0, FXuint opts=LIST_NORMAL, FXint x=0, FXint y=0, FXint w=0, FXint h=0) | |
Construct a list with nvis visible items; the list is initially empty. | |
virtual void | create () |
Create server-side resources. | |
virtual void | detach () |
Detach server-side resources. | |
virtual FXint | getDefaultWidth () |
Return default width. | |
virtual FXint | getDefaultHeight () |
Return default height. | |
virtual FXint | getContentWidth () |
Compute and return content width. | |
virtual FXint | getContentHeight () |
Return content height. | |
virtual void | recalc () |
Recalculate layout. | |
virtual FXbool | canFocus () const |
List widget can receive focus. | |
virtual void | setFocus () |
Move the focus to this window. | |
virtual void | killFocus () |
Remove the focus from this window. | |
FXint | getNumItems () const |
Return the number of items in the list. | |
FXint | getNumVisible () const |
Return number of visible items. | |
void | setNumVisible (FXint nvis) |
Change the number of visible items. | |
FXListItem * | getItem (FXint index) const |
Return the item at the given index. | |
FXint | setItem (FXint index, FXListItem *item, FXbool notify=FALSE) |
Replace the item with a [possibly subclassed] item. | |
FXint | setItem (FXint index, const FXString &text, FXIcon *icon=NULL, void *ptr=NULL, FXbool notify=FALSE) |
Replace items text, icon, and user-data pointer. | |
FXint | insertItem (FXint index, FXListItem *item, FXbool notify=FALSE) |
Insert a new [possibly subclassed] item at the give index. | |
FXint | insertItem (FXint index, const FXString &text, FXIcon *icon=NULL, void *ptr=NULL, FXbool notify=FALSE) |
Insert item at index with given text, icon, and user-data pointer. | |
FXint | appendItem (FXListItem *item, FXbool notify=FALSE) |
Append a [possibly subclassed] item to the list. | |
FXint | appendItem (const FXString &text, FXIcon *icon=NULL, void *ptr=NULL, FXbool notify=FALSE) |
Append new item with given text and optional icon, and user-data pointer. | |
FXint | prependItem (FXListItem *item, FXbool notify=FALSE) |
Prepend a [possibly subclassed] item to the list. | |
FXint | prependItem (const FXString &text, FXIcon *icon=NULL, void *ptr=NULL, FXbool notify=FALSE) |
Prepend new item with given text and optional icon, and user-data pointer. | |
void | removeItem (FXint index, FXbool notify=FALSE) |
Remove item from list. | |
void | clearItems (FXbool notify=FALSE) |
Remove all items from list. | |
FXint | getItemWidth (FXint index) const |
Return item width. | |
FXint | getItemHeight (FXint index) const |
Return item height. | |
FXint | getItemAt (FXint x, FXint y) const |
Return index of item at x,y, if any. | |
FXint | hitItem (FXint index, FXint x, FXint y) const |
Return item hit code: 0 no hit; 1 hit the icon; 2 hit the text. | |
FXint | findItem (const FXString &text, FXint start=-1, FXuint flags=SEARCH_FORWARD|SEARCH_WRAP) const |
void | makeItemVisible (FXint index) |
Scroll to bring item into view. | |
void | setItemText (FXint index, const FXString &text) |
Change item text. | |
FXString | getItemText (FXint index) const |
Return item text. | |
void | setItemIcon (FXint index, FXIcon *icon) |
Change item icon. | |
FXIcon * | getItemIcon (FXint index) const |
Return item icon, if any. | |
void | setItemData (FXint index, void *ptr) |
Change item user-data pointer. | |
void * | getItemData (FXint index) const |
Return item user-data pointer. | |
FXbool | isItemSelected (FXint index) const |
Return TRUE if item is selected. | |
FXbool | isItemCurrent (FXint index) const |
Return TRUE if item is current. | |
FXbool | isItemVisible (FXint index) const |
Return TRUE if item is visible. | |
FXbool | isItemEnabled (FXint index) const |
Return TRUE if item is enabled. | |
void | updateItem (FXint index) const |
Repaint item. | |
FXbool | enableItem (FXint index) |
Enable item. | |
FXbool | disableItem (FXint index) |
Disable item. | |
FXbool | selectItem (FXint index, FXbool notify=FALSE) |
Select item. | |
FXbool | deselectItem (FXint index, FXbool notify=FALSE) |
Deselect item. | |
FXbool | toggleItem (FXint index, FXbool notify=FALSE) |
Toggle item selection state. | |
void | setCurrentItem (FXint index, FXbool notify=FALSE) |
Change current item. | |
FXint | getCurrentItem () const |
Return current item, if any. | |
void | setAnchorItem (FXint index) |
Change anchor item. | |
FXint | getAnchorItem () const |
Return anchor item, if any. | |
FXint | getCursorItem () const |
Get item under the cursor, if any. | |
FXbool | extendSelection (FXint index, FXbool notify=FALSE) |
Extend selection from anchor item to index. | |
FXbool | killSelection (FXbool notify=FALSE) |
Deselect all items. | |
void | sortItems () |
Sort items using current sort function. | |
void | setFont (FXFont *fnt) |
Change text font. | |
FXFont * | getFont () const |
Return text font. | |
FXColor | getTextColor () const |
Return normal text color. | |
void | setTextColor (FXColor clr) |
Change normal text color. | |
FXColor | getSelBackColor () const |
Return selected text background. | |
void | setSelBackColor (FXColor clr) |
Change selected text background. | |
FXColor | getSelTextColor () const |
Return selected text color. | |
void | setSelTextColor (FXColor clr) |
Change selected text color. | |
FXListSortFunc | getSortFunc () const |
Return sort function. | |
void | setSortFunc (FXListSortFunc func) |
Change sort function. | |
FXuint | getListStyle () const |
Return list style. | |
void | setListStyle (FXuint style) |
Change list style. | |
void | setHelpText (const FXString &text) |
Set the status line help text for this list. | |
const FXString & | getHelpText () const |
Get the status line help text for this list. | |
virtual void | save (FXStream &store) const |
Save list to a stream. | |
virtual void | load (FXStream &store) |
Load list from a stream. | |
virtual | ~FXList () |
Destructor. | |
Static Public Methods | |
FXint | ascending (const FXListItem *a, const FXListItem *b) |
FXint | descending (const FXListItem *a, const FXListItem *b) |
See also:
|
Search items for item by name, starting from start item; the flags argument controls the search direction, and case sensitivity. |