Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

FXIconList.h

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

Copyright © 1997-2005 Jeroen van der Zijp