![]() |
Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members
![]() |
00001 /******************************************************************************** 00002 * * 00003 * I c o n L i s t W i d g e t * 00004 * * 00005 ********************************************************************************* 00006 * Copyright (C) 1999,2009 by Jeroen van der Zijp. All Rights Reserved. * 00007 ********************************************************************************* 00008 * This library is free software; you can redistribute it and/or modify * 00009 * it under the terms of the GNU Lesser General Public License as published by * 00010 * the Free Software Foundation; either version 3 of the License, or * 00011 * (at your option) any later version. * 00012 * * 00013 * This library is distributed in the hope that it will be useful, * 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00016 * GNU Lesser General Public License for more details. * 00017 * * 00018 * You should have received a copy of the GNU Lesser General Public License * 00019 * along with this program. If not, see <http://www.gnu.org/licenses/> * 00020 ********************************************************************************* 00021 * $Id: FXIconList.h,v 1.120 2009/01/06 13:07:25 fox Exp $ * 00022 ********************************************************************************/ 00023 #ifndef FXICONLIST_H 00024 #define FXICONLIST_H 00025 00026 #ifndef FXSCROLLAREA_H 00027 #include "FXScrollArea.h" 00028 #endif 00029 00030 namespace FX { 00031 00032 00033 /// Icon list styles 00034 enum { 00035 ICONLIST_EXTENDEDSELECT = 0, /// Extended selection mode 00036 ICONLIST_SINGLESELECT = 0x00100000, /// At most one selected item 00037 ICONLIST_BROWSESELECT = 0x00200000, /// Always exactly one selected item 00038 ICONLIST_MULTIPLESELECT = 0x00300000, /// Multiple selection mode 00039 ICONLIST_AUTOSIZE = 0x00400000, /// Automatically size item spacing 00040 ICONLIST_DETAILED = 0, /// List mode 00041 ICONLIST_MINI_ICONS = 0x00800000, /// Mini Icon mode 00042 ICONLIST_BIG_ICONS = 0x01000000, /// Big Icon mode 00043 ICONLIST_ROWS = 0, /// Row-wise mode 00044 ICONLIST_COLUMNS = 0x02000000, /// Column-wise mode 00045 ICONLIST_NORMAL = ICONLIST_EXTENDEDSELECT 00046 }; 00047 00048 00049 class FXIcon; 00050 class FXHeader; 00051 class FXFont; 00052 class FXIconList; 00053 class FXFileList; 00054 00055 00056 /// Icon item 00057 class FXAPI FXIconItem : public FXObject { 00058 FXDECLARE(FXIconItem) 00059 friend class FXIconList; 00060 friend class FXFileList; 00061 protected: 00062 FXString label; // Text of item 00063 FXIcon *bigIcon; // Big icon shown in big icon mode 00064 FXIcon *miniIcon; // Mini icon shown in mini icon mode 00065 void *data; // User data pointer 00066 FXuint state; // State flags 00067 private: 00068 FXIconItem(const FXIconItem&); 00069 FXIconItem& operator=(const FXIconItem&); 00070 protected: 00071 FXIconItem():bigIcon(NULL),miniIcon(NULL),data(NULL),state(0){} 00072 virtual void draw(const FXIconList* list,FXDC& dc,FXint x,FXint y,FXint w,FXint h) const; 00073 virtual FXint hitItem(const FXIconList* list,FXint rx,FXint ry,FXint rw=1,FXint rh=1) const; 00074 protected: 00075 virtual void drawBigIcon(const FXIconList* list,FXDC& dc,FXint x,FXint y,FXint w,FXint h) const; 00076 virtual void drawMiniIcon(const FXIconList* list,FXDC& dc,FXint x,FXint y,FXint w,FXint h) const; 00077 virtual void drawDetails(const FXIconList* list,FXDC& dc,FXint x,FXint y,FXint w,FXint h) const; 00078 public: 00079 enum { 00080 SELECTED = 1, /// Selected 00081 FOCUS = 2, /// Focus 00082 DISABLED = 4, /// Disabled 00083 DRAGGABLE = 8, /// Draggable 00084 BIGICONOWNED = 16, /// Big icon owned by item 00085 MINIICONOWNED = 32 /// Mini icon owned by item 00086 }; 00087 public: 00088 00089 /// Construct new item with given text, icons, and user-data 00090 FXIconItem(const FXString& text,FXIcon* bi=NULL,FXIcon* mi=NULL,void* ptr=NULL):label(text),bigIcon(bi),miniIcon(mi),data(ptr),state(0){} 00091 00092 /// Change item's text label 00093 virtual void setText(const FXString& txt); 00094 00095 /// Return item's text label 00096 const FXString& getText() const { return label; } 00097 00098 /// Change item's big icon, deleting the old icon if it was owned 00099 virtual void setBigIcon(FXIcon* icn,FXbool owned=false); 00100 00101 /// Return item's big icon 00102 FXIcon* getBigIcon() const { return bigIcon; } 00103 00104 /// Change item's mini icon, deleting the old icon if it was owned 00105 virtual void setMiniIcon(FXIcon* icn,FXbool owned=false); 00106 00107 /// Return item's mini icon 00108 FXIcon* getMiniIcon() const { return miniIcon; } 00109 00110 /// Change item's user data 00111 void setData(void* ptr){ data=ptr; } 00112 00113 /// Get item's user data 00114 void* getData() const { return data; } 00115 00116 /// Make item draw as focused 00117 virtual void setFocus(FXbool focus); 00118 00119 /// Return true if item has focus 00120 FXbool hasFocus() const { return (state&FOCUS)!=0; } 00121 00122 /// Select item 00123 virtual void setSelected(FXbool selected); 00124 00125 /// Return true if this item is selected 00126 FXbool isSelected() const { return (state&SELECTED)!=0; } 00127 00128 /// Enable or disable item 00129 virtual void setEnabled(FXbool enabled); 00130 00131 /// Return true if this item is enabled 00132 FXbool isEnabled() const { return (state&DISABLED)==0; } 00133 00134 /// Make item draggable 00135 virtual void setDraggable(FXbool draggable); 00136 00137 /// Return true if this item is draggable 00138 FXbool isDraggable() const { return (state&DRAGGABLE)!=0; } 00139 00140 /// Return width of item as drawn in list 00141 virtual FXint getWidth(const FXIconList* list) const; 00142 00143 /// Return height of item as drawn in list 00144 virtual FXint getHeight(const FXIconList* list) const; 00145 00146 /// Create server-side resources 00147 virtual void create(); 00148 00149 /// Detach server-side resources 00150 virtual void detach(); 00151 00152 /// Destroy server-side resources 00153 virtual void destroy(); 00154 00155 /// Save to stream 00156 virtual void save(FXStream& store) const; 00157 00158 /// Load from stream 00159 virtual void load(FXStream& store); 00160 00161 /// Destroy item and free icons if owned 00162 virtual ~FXIconItem(); 00163 }; 00164 00165 00166 /// Icon item collate function 00167 typedef FXint (*FXIconListSortFunc)(const FXIconItem*,const FXIconItem*); 00168 00169 00170 /// List of FXIconItem's 00171 typedef FXObjectListOf<FXIconItem> FXIconItemList; 00172 00173 00174 /** 00175 * A Icon List Widget displays a list of items, each with a text and 00176 * optional icon. Icon List can display its items in essentially three 00177 * different ways; in big-icon mode, the bigger of the two icons is used 00178 * for each item, and the text is placed underneath the icon. In mini- 00179 * icon mode, the icons are listed in rows and columns, with the smaller 00180 * icon preceding the text. Finally, in detail mode the icons are listed 00181 * in a single column, and all fields of the text are shown under a 00182 * header control with one button for each subfield. 00183 * When an item's selected state changes, the icon list sends 00184 * a SEL_SELECTED or SEL_DESELECTED message. A change of the current 00185 * item is signified by the SEL_CHANGED message. 00186 * The icon list sends SEL_COMMAND messages when the user clicks on an item, 00187 * and SEL_CLICKED, SEL_DOUBLECLICKED, and SEL_TRIPLECLICKED when the user 00188 * clicks once, twice, or thrice, respectively. 00189 * When items are added, replaced, or removed, the icon list sends messages 00190 * of the type SEL_INSERTED, SEL_REPLACED, or SEL_DELETED. 00191 * In each of these cases, the index to the item, if any, is passed in the 00192 * 3rd argument of the message. 00193 * The text in each item is a string separated by tabs for each column; 00194 * in mini- or big-icon mode, only the text before the first tab is shown. 00195 * In detail-mode, the text before the first tab is shown in the first column, 00196 * the text between the first and second tab is shown in the second column, 00197 * and so on. 00198 */ 00199 class FXAPI FXIconList : public FXScrollArea { 00200 FXDECLARE(FXIconList) 00201 protected: 00202 FXHeader *header; // Header control 00203 FXIconItemList items; // Item list 00204 FXint nrows; // Number of rows 00205 FXint ncols; // Number of columns 00206 FXint anchor; // Anchor item 00207 FXint current; // Current item 00208 FXint extent; // Extent item 00209 FXint cursor; // Cursor item 00210 FXint viewable; // Visible item 00211 FXFont *font; // Font 00212 FXIconListSortFunc sortfunc; // Item sort function 00213 FXColor textColor; // Text color 00214 FXColor selbackColor; // Selected back color 00215 FXColor seltextColor; // Selected text color 00216 FXint itemSpace; // Space for item label 00217 FXint itemWidth; // Item width 00218 FXint itemHeight; // Item height 00219 FXint anchorx; // Rectangular selection 00220 FXint anchory; 00221 FXint currentx; 00222 FXint currenty; 00223 FXint grabx; // Grab point x 00224 FXint graby; // Grab point y 00225 FXString lookup; // Lookup string 00226 FXString help; // Help text 00227 FXbool state; // State of item 00228 protected: 00229 FXIconList(); 00230 void recompute(); 00231 void startLasso(FXint ax,FXint ay); 00232 void updateLasso(FXint cx,FXint cy); 00233 void endLasso(); 00234 void getrowscols(FXint& nr,FXint& nc,FXint w,FXint h) const; 00235 void lassoChanged(FXint ox,FXint oy,FXint ow,FXint oh,FXint nx,FXint ny,FXint nw,FXint nh,FXbool notify); 00236 virtual void moveContents(FXint x,FXint y); 00237 virtual FXIconItem *createItem(const FXString& text,FXIcon *big,FXIcon* mini,void* ptr); 00238 static FXint compareSection(const FXchar *p,const FXchar* q,FXint s); 00239 static FXint compareSectionCase(const FXchar *p,const FXchar* q,FXint s); 00240 private: 00241 FXIconList(const FXIconList&); 00242 FXIconList &operator=(const FXIconList&); 00243 public: 00244 long onPaint(FXObject*,FXSelector,void*); 00245 long onEnter(FXObject*,FXSelector,void*); 00246 long onLeave(FXObject*,FXSelector,void*); 00247 long onUngrabbed(FXObject*,FXSelector,void*); 00248 long onKeyPress(FXObject*,FXSelector,void*); 00249 long onKeyRelease(FXObject*,FXSelector,void*); 00250 long onLeftBtnPress(FXObject*,FXSelector,void*); 00251 long onLeftBtnRelease(FXObject*,FXSelector,void*); 00252 long onRightBtnPress(FXObject*,FXSelector,void*); 00253 long onRightBtnRelease(FXObject*,FXSelector,void*); 00254 long onMotion(FXObject*,FXSelector,void*); 00255 long onQueryTip(FXObject*,FXSelector,void*); 00256 long onQueryHelp(FXObject*,FXSelector,void*); 00257 long onTipTimer(FXObject*,FXSelector,void*); 00258 long onCmdSelectAll(FXObject*,FXSelector,void*); 00259 long onCmdDeselectAll(FXObject*,FXSelector,void*); 00260 long onCmdSelectInverse(FXObject*,FXSelector,void*); 00261 long onCmdArrangeByRows(FXObject*,FXSelector,void*); 00262 long onUpdArrangeByRows(FXObject*,FXSelector,void*); 00263 long onCmdArrangeByColumns(FXObject*,FXSelector,void*); 00264 long onUpdArrangeByColumns(FXObject*,FXSelector,void*); 00265 long onCmdShowDetails(FXObject*,FXSelector,void*); 00266 long onUpdShowDetails(FXObject*,FXSelector,void*); 00267 long onCmdShowBigIcons(FXObject*,FXSelector,void*); 00268 long onUpdShowBigIcons(FXObject*,FXSelector,void*); 00269 long onCmdShowMiniIcons(FXObject*,FXSelector,void*); 00270 long onUpdShowMiniIcons(FXObject*,FXSelector,void*); 00271 long onChgHeader(FXObject*,FXSelector,void*); 00272 long onClkHeader(FXObject*,FXSelector,void*); 00273 long onFocusIn(FXObject*,FXSelector,void*); 00274 long onFocusOut(FXObject*,FXSelector,void*); 00275 long onClicked(FXObject*,FXSelector,void*); 00276 long onDoubleClicked(FXObject*,FXSelector,void*); 00277 long onTripleClicked(FXObject*,FXSelector,void*); 00278 long onCommand(FXObject*,FXSelector,void*); 00279 long onAutoScroll(FXObject*,FXSelector,void*); 00280 long onLookupTimer(FXObject*,FXSelector,void*); 00281 long onCmdSetValue(FXObject*,FXSelector,void*); 00282 long onCmdGetIntValue(FXObject*,FXSelector,void*); 00283 long onCmdSetIntValue(FXObject*,FXSelector,void*); 00284 public: 00285 static FXint ascending(const FXIconItem* a,const FXIconItem* b); 00286 static FXint descending(const FXIconItem* a,const FXIconItem* b); 00287 static FXint ascendingCase(const FXIconItem* a,const FXIconItem* b); 00288 static FXint descendingCase(const FXIconItem* a,const FXIconItem* b); 00289 public: 00290 enum { 00291 ID_LOOKUPTIMER=FXScrollArea::ID_LAST, 00292 ID_HEADER, 00293 ID_SHOW_DETAILS, 00294 ID_SHOW_MINI_ICONS, 00295 ID_SHOW_BIG_ICONS, 00296 ID_ARRANGE_BY_ROWS, 00297 ID_ARRANGE_BY_COLUMNS, 00298 ID_SELECT_ALL, 00299 ID_DESELECT_ALL, 00300 ID_SELECT_INVERSE, 00301 ID_LAST 00302 }; 00303 public: 00304 00305 /// Construct icon list with no items in it initially 00306 FXIconList(FXComposite *p,FXObject* tgt=NULL,FXSelector sel=0,FXuint opts=ICONLIST_NORMAL,FXint x=0,FXint y=0,FXint w=0,FXint h=0); 00307 00308 /// Create server-side resources 00309 virtual void create(); 00310 00311 /// Detach server-side resources 00312 virtual void detach(); 00313 00314 /// Recalculate layout 00315 virtual void recalc(); 00316 00317 /// Perform layout 00318 virtual void layout(); 00319 00320 /// Return visible area y position 00321 virtual FXint getVisibleY() const; 00322 00323 /// Return visible area height 00324 virtual FXint getVisibleHeight() const; 00325 00326 /// Compute and return content width 00327 virtual FXint getContentWidth(); 00328 00329 /// Return content height 00330 virtual FXint getContentHeight(); 00331 00332 /// Icon list can receive focus 00333 virtual FXbool canFocus() const; 00334 00335 /// Move the focus to this window 00336 virtual void setFocus(); 00337 00338 /// Remove the focus from this window 00339 virtual void killFocus(); 00340 00341 /// Resize this window to the specified width and height 00342 virtual void resize(FXint w,FXint h); 00343 00344 /// Move and resize this window in the parent's coordinates 00345 virtual void position(FXint x,FXint y,FXint w,FXint h); 00346 00347 /// Return number of items 00348 FXint getNumItems() const { return items.no(); } 00349 00350 /// Return number of rows 00351 FXint getNumRows() const { return nrows; } 00352 00353 /// Return number of columns 00354 FXint getNumCols() const { return ncols; } 00355 00356 /// Return header control 00357 FXHeader* getHeader() const { return header; } 00358 00359 /// Set headers from array of strings 00360 void setHeaders(const FXchar** strings,FXint size=1); 00361 00362 /// Set headers from newline separated strings 00363 void setHeaders(const FXString& strings,FXint size=1); 00364 00365 /// Append header with given text and optional icon 00366 void appendHeader(const FXString& text,FXIcon *icon=NULL,FXint size=1); 00367 00368 /// Remove header at index 00369 void removeHeader(FXint index); 00370 00371 /// Change text of header at index 00372 void setHeaderText(FXint index,const FXString& text); 00373 00374 /// Return text of header at index 00375 FXString getHeaderText(FXint index) const; 00376 00377 /// Change icon of header at index 00378 void setHeaderIcon(FXint index,FXIcon *icon); 00379 00380 /// Return icon of header at index 00381 FXIcon* getHeaderIcon(FXint index) const; 00382 00383 /// Change size of header at index 00384 void setHeaderSize(FXint index,FXint size); 00385 00386 /// Return width of header at index 00387 FXint getHeaderSize(FXint index) const; 00388 00389 /// Return number of headers 00390 FXint getNumHeaders() const; 00391 00392 /// Return the item at the given index 00393 FXIconItem *getItem(FXint index) const; 00394 00395 /// Replace the item with a [possibly subclassed] item 00396 FXint setItem(FXint index,FXIconItem* item,FXbool notify=false); 00397 00398 /// Replace items text, icons, and user-data pointer 00399 FXint setItem(FXint index,const FXString& text,FXIcon *big=NULL,FXIcon* mini=NULL,void* ptr=NULL,FXbool notify=false); 00400 00401 /// Fill list by appending items from array of strings 00402 FXint fillItems(const FXchar** strings,FXIcon *big=NULL,FXIcon* mini=NULL,void* ptr=NULL,FXbool notify=false); 00403 00404 /// Fill list by appending items from newline separated strings 00405 FXint fillItems(const FXString& strings,FXIcon *big=NULL,FXIcon* mini=NULL,void* ptr=NULL,FXbool notify=false); 00406 00407 /// Insert a new [possibly subclassed] item at the give index 00408 FXint insertItem(FXint index,FXIconItem* item,FXbool notify=false); 00409 00410 /// Insert item at index with given text, icons, and user-data pointer 00411 FXint insertItem(FXint index,const FXString& text,FXIcon *big=NULL,FXIcon* mini=NULL,void* ptr=NULL,FXbool notify=false); 00412 00413 /// Append a [possibly subclassed] item to the end of the list 00414 FXint appendItem(FXIconItem* item,FXbool notify=false); 00415 00416 /// Append new item with given text and optional icons, and user-data pointer 00417 FXint appendItem(const FXString& text,FXIcon *big=NULL,FXIcon* mini=NULL,void* ptr=NULL,FXbool notify=false); 00418 00419 /// Prepend a [possibly subclassed] item to the end of the list 00420 FXint prependItem(FXIconItem* item,FXbool notify=false); 00421 00422 /// Prepend new item with given text and optional icons, and user-data pointer 00423 FXint prependItem(const FXString& text,FXIcon *big=NULL,FXIcon* mini=NULL,void* ptr=NULL,FXbool notify=false); 00424 00425 /// Move item from oldindex to newindex 00426 FXint moveItem(FXint newindex,FXint oldindex,FXbool notify=false); 00427 00428 /// Extract item from list 00429 FXIconItem* extractItem(FXint index,FXbool notify=false); 00430 00431 /// Remove item from list 00432 void removeItem(FXint index,FXbool notify=false); 00433 00434 /// Remove all items from list 00435 void clearItems(FXbool notify=false); 00436 00437 /// Return item width 00438 FXint getItemWidth() const { return itemWidth; } 00439 00440 /// Return item height 00441 FXint getItemHeight() const { return itemHeight; } 00442 00443 /// Return index of item at x,y, or -1 if none 00444 virtual FXint getItemAt(FXint x,FXint y) const; 00445 00446 /** 00447 * Search items by name, beginning from item start. If the start 00448 * item is -1 the search will start at the first item in the list. 00449 * Flags may be SEARCH_FORWARD or SEARCH_BACKWARD to control the 00450 * search direction; this can be combined with SEARCH_NOWRAP or SEARCH_WRAP 00451 * to control whether the search wraps at the start or end of the list. 00452 * The option SEARCH_IGNORECASE causes a case-insensitive match. Finally, 00453 * passing SEARCH_PREFIX causes searching for a prefix of the item name. 00454 * Return -1 if no matching item is found. 00455 */ 00456 FXint findItem(const FXString& text,FXint start=-1,FXuint flags=SEARCH_FORWARD|SEARCH_WRAP) const; 00457 00458 /** 00459 * Search items by associated user data, beginning from item start. If the 00460 * start item is -1 the search will start at the first item in the list. 00461 * Flags may be SEARCH_FORWARD or SEARCH_BACKWARD to control the 00462 * search direction; this can be combined with SEARCH_NOWRAP or SEARCH_WRAP 00463 * to control whether the search wraps at the start or end of the list. 00464 */ 00465 FXint findItemByData(const void *ptr,FXint start=-1,FXuint flags=SEARCH_FORWARD|SEARCH_WRAP) const; 00466 00467 /// Scroll to make item at index visible 00468 virtual void makeItemVisible(FXint index); 00469 00470 /// Change item text 00471 void setItemText(FXint index,const FXString& text); 00472 00473 /// Return item text 00474 FXString getItemText(FXint index) const; 00475 00476 /// Change item big icon 00477 void setItemBigIcon(FXint index,FXIcon* icon,FXbool owned=false); 00478 00479 /// Return big icon of item at index 00480 FXIcon* getItemBigIcon(FXint index) const; 00481 00482 /// Change item mini icon 00483 void setItemMiniIcon(FXint index,FXIcon* icon,FXbool owned=false); 00484 00485 /// Return mini icon of item at index 00486 FXIcon* getItemMiniIcon(FXint index) const; 00487 00488 /// Change item user-data pointer 00489 void setItemData(FXint index,void* ptr); 00490 00491 /// Return item user-data pointer 00492 void* getItemData(FXint index) const; 00493 00494 /// Return true if item at index is selected 00495 FXbool isItemSelected(FXint index) const; 00496 00497 /// Return true if item at index is current 00498 FXbool isItemCurrent(FXint index) const; 00499 00500 /// Return true if item at index is visible 00501 FXbool isItemVisible(FXint index) const; 00502 00503 /// Return true if item at index is enabled 00504 FXbool isItemEnabled(FXint index) const; 00505 00506 /// Return item hit code: 0 outside, 1 icon, 2 text 00507 FXint hitItem(FXint index,FXint x,FXint y,FXint ww=1,FXint hh=1) const; 00508 00509 /// Repaint item at index 00510 void updateItem(FXint index) const; 00511 00512 /// Enable item at index 00513 virtual FXbool enableItem(FXint index); 00514 00515 /// Disable item at index 00516 virtual FXbool disableItem(FXint index); 00517 00518 /// Select item at index 00519 virtual FXbool selectItem(FXint index,FXbool notify=false); 00520 00521 /// Deselect item at index 00522 virtual FXbool deselectItem(FXint index,FXbool notify=false); 00523 00524 /// Toggle item at index 00525 virtual FXbool toggleItem(FXint index,FXbool notify=false); 00526 00527 /// Select items in rectangle 00528 virtual FXbool selectInRectangle(FXint x,FXint y,FXint w,FXint h,FXbool notify=false); 00529 00530 /// Extend selection from anchor index to index 00531 virtual FXbool extendSelection(FXint index,FXbool notify=false); 00532 00533 /// Deselect all items 00534 virtual FXbool killSelection(FXbool notify=false); 00535 00536 /// Change current item index 00537 virtual void setCurrentItem(FXint index,FXbool notify=false); 00538 00539 /// Return current item index, or -1 if none 00540 FXint getCurrentItem() const { return current; } 00541 00542 /// Change anchor item index 00543 void setAnchorItem(FXint index); 00544 00545 /// Return anchor item index, or -1 if none 00546 FXint getAnchorItem() const { return anchor; } 00547 00548 /// Return index of item under cursor, or -1 if none 00549 FXint getCursorItem() const { return cursor; } 00550 00551 /// Sort items 00552 void sortItems(); 00553 00554 /// Return sort function 00555 FXIconListSortFunc getSortFunc() const { return sortfunc; } 00556 00557 /// Change sort function 00558 void setSortFunc(FXIconListSortFunc func){ sortfunc=func; } 00559 00560 /// Change text font 00561 void setFont(FXFont* fnt); 00562 00563 /// Return text font 00564 FXFont* getFont() const { return font; } 00565 00566 /// Return normal text color 00567 FXColor getTextColor() const { return textColor; } 00568 00569 /// Change normal text color 00570 void setTextColor(FXColor clr); 00571 00572 /// Return selected text background 00573 FXColor getSelBackColor() const { return selbackColor; } 00574 00575 /// Change selected text background 00576 void setSelBackColor(FXColor clr); 00577 00578 /// Return selected text color 00579 FXColor getSelTextColor() const { return seltextColor; } 00580 00581 /// Change selected text color 00582 void setSelTextColor(FXColor clr); 00583 00584 /// Change maximum item space for each item 00585 void setItemSpace(FXint s); 00586 00587 /// Return maximum item space 00588 FXint getItemSpace() const { return itemSpace; } 00589 00590 /// Get the current icon list style 00591 FXuint getListStyle() const; 00592 00593 /// Set the current icon list style. 00594 void setListStyle(FXuint style); 00595 00596 /// Set the status line help text for this widget 00597 void setHelpText(const FXString& text); 00598 00599 /// Get the status line help text for this widget 00600 const FXString& getHelpText() const { return help; } 00601 00602 /// Save list to a stream 00603 virtual void save(FXStream& store) const; 00604 00605 /// Load list from a stream 00606 virtual void load(FXStream& store); 00607 00608 /// Destructor 00609 virtual ~FXIconList(); 00610 }; 00611 00612 } 00613 00614 #endif
![]() |