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