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

FXTreeList.h

00001 /******************************************************************************** 00002 * * 00003 * T r e e L i s t W i d g e t * 00004 * * 00005 ********************************************************************************* 00006 * Copyright (C) 1997,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: FXTreeList.h,v 1.94 2005/02/06 17:20:00 fox Exp $ * 00023 ********************************************************************************/ 00024 #ifndef FXTREELIST_H 00025 #define FXTREELIST_H 00026 00027 #ifndef FXSCROLLAREA_H 00028 #include "FXScrollArea.h" 00029 #endif 00030 00031 namespace FX { 00032 00033 00034 class FXIcon; 00035 class FXFont; 00036 class FXTreeList; 00037 class FXDirList; 00038 00039 00040 /// Tree list styles 00041 enum { 00042 TREELIST_EXTENDEDSELECT = 0, /// Extended selection mode allows for drag-selection of ranges of items 00043 TREELIST_SINGLESELECT = 0x00100000, /// Single selection mode allows up to one item to be selected 00044 TREELIST_BROWSESELECT = 0x00200000, /// Browse selection mode enforces one single item to be selected at all times 00045 TREELIST_MULTIPLESELECT = 0x00300000, /// Multiple selection mode is used for selection of individual items 00046 TREELIST_AUTOSELECT = 0x00400000, /// Automatically select under cursor 00047 TREELIST_SHOWS_LINES = 0x00800000, /// Lines shown 00048 TREELIST_SHOWS_BOXES = 0x01000000, /// Boxes to expand shown 00049 TREELIST_ROOT_BOXES = 0x02000000, /// Display root boxes also 00050 TREELIST_NORMAL = TREELIST_EXTENDEDSELECT 00051 }; 00052 00053 00054 /// Tree list Item 00055 class FXAPI FXTreeItem : public FXObject { 00056 FXDECLARE(FXTreeItem) 00057 friend class FXTreeList; 00058 friend class FXDirList; 00059 protected: 00060 FXTreeItem *parent; // Parent item 00061 FXTreeItem *prev; // Previous item 00062 FXTreeItem *next; // Next item 00063 FXTreeItem *first; // First child item 00064 FXTreeItem *last; // Last child item 00065 FXString label; // Text of item 00066 FXIcon *openIcon; // Icon of item 00067 FXIcon *closedIcon; // Icon of item 00068 void *data; // Item user data pointer 00069 FXuint state; // Item state flags 00070 FXint x,y; 00071 protected: 00072 FXTreeItem():parent(NULL),prev(NULL),next(NULL),first(NULL),last(NULL),openIcon(NULL),closedIcon(NULL),data(NULL),state(0),x(0),y(0){} 00073 virtual void draw(const FXTreeList* list,FXDC& dc,FXint x,FXint y,FXint w,FXint h) const; 00074 virtual FXint hitItem(const FXTreeList* list,FXint x,FXint y) const; 00075 public: 00076 enum{ 00077 SELECTED = 1, /// Selected 00078 FOCUS = 2, /// Focus 00079 DISABLED = 4, /// Disabled 00080 OPENED = 8, /// Opened 00081 EXPANDED = 16, /// Expanded 00082 HASITEMS = 32, /// Has virtual subitems 00083 DRAGGABLE = 64, /// Draggable 00084 OPENICONOWNED = 128, /// Open icon owned by item 00085 CLOSEDICONOWNED = 256 /// Close icon owned by item 00086 }; 00087 public: 00088 00089 /// Constructor 00090 FXTreeItem(const FXString& text,FXIcon* oi=NULL,FXIcon* ci=NULL,void* ptr=NULL):parent(NULL),prev(NULL),next(NULL),first(NULL),last(NULL),label(text),openIcon(oi),closedIcon(ci),data(ptr),state(0),x(0),y(0){} 00091 00092 /// Get parent item 00093 FXTreeItem* getParent() const { return parent; } 00094 00095 /// Get next sibling item 00096 FXTreeItem* getNext() const { return next; } 00097 00098 /// Get previous sibling item 00099 FXTreeItem* getPrev() const { return prev; } 00100 00101 /// Get first child item 00102 FXTreeItem* getFirst() const { return first; } 00103 00104 /// Get las child item 00105 FXTreeItem* getLast() const { return last; } 00106 00107 /// Get item below this one in list 00108 FXTreeItem* getBelow() const; 00109 00110 /// Get item above this one in list 00111 FXTreeItem* getAbove() const; 00112 00113 /// Get number of children of item 00114 FXint getNumChildren() const; 00115 00116 /// Change item label 00117 virtual void setText(const FXString& txt); 00118 00119 /// Get item label 00120 const FXString& getText() const { return label; } 00121 00122 /// Change open icon, deleting the old icon if it was owned 00123 virtual void setOpenIcon(FXIcon* icn,FXbool owned=FALSE); 00124 00125 /// Get open icon 00126 FXIcon* getOpenIcon() const { return openIcon; } 00127 00128 /// Change closed icon, deleting the old icon if it was owned 00129 virtual void setClosedIcon(FXIcon* icn,FXbool owned=FALSE); 00130 00131 /// Get closed icon 00132 FXIcon* getClosedIcon() const { return closedIcon; } 00133 00134 /// Change item user data 00135 void setData(void* ptr){ data=ptr; } 00136 00137 /// Get item user data 00138 void* getData() const { return data; } 00139 00140 /// Make item draw as focused 00141 virtual void setFocus(FXbool focus); 00142 00143 /// Return true if item has focus 00144 FXbool hasFocus() const { return (state&FOCUS)!=0; } 00145 00146 /// Select item 00147 virtual void setSelected(FXbool selected); 00148 00149 /// Return true if this item is selected 00150 FXbool isSelected() const { return (state&SELECTED)!=0; } 00151 00152 /// Make item show as open 00153 virtual void setOpened(FXbool opened); 00154 00155 /// Return true if this item is open 00156 FXbool isOpened() const { return (state&OPENED)!=0; } 00157 00158 /// Expand or collapse item 00159 virtual void setExpanded(FXbool expanded); 00160 00161 /// Return true if this item is expanded into sub items 00162 FXbool isExpanded() const { return (state&EXPANDED)!=0; } 00163 00164 /// Enable or disable item 00165 virtual void setEnabled(FXbool enabled); 00166 00167 /// Return true if this item is enabled 00168 FXbool isEnabled() const { return (state&DISABLED)==0; } 00169 00170 /// Make item draggable 00171 virtual void setDraggable(FXbool draggable); 00172 00173 /// Return true if this item is draggable 00174 FXbool isDraggable() const { return (state&DRAGGABLE)!=0; } 00175 00176 /// Return TRUE if subitems, real or imagined 00177 FXbool hasItems() const { return (state&HASITEMS)!=0; } 00178 00179 /// Change has items flag 00180 void setHasItems(FXbool flag); 00181 00182 /// Return true if descendent of parent item 00183 FXbool isChildOf(const FXTreeItem* item) const; 00184 00185 /// Return true if ancestor of child item 00186 FXbool isParentOf(const FXTreeItem* item) const; 00187 00188 /// Return width of item as drawn in list 00189 virtual FXint getWidth(const FXTreeList* list) const; 00190 00191 /// Return height of item as drawn in list 00192 virtual FXint getHeight(const FXTreeList* list) const; 00193 00194 /// Create server-side resources 00195 virtual void create(); 00196 00197 /// Detach server-side resources 00198 virtual void detach(); 00199 00200 /// Destroy server-side resources 00201 virtual void destroy(); 00202 00203 /// Save to stream 00204 virtual void save(FXStream& store) const; 00205 00206 /// Load from stream 00207 virtual void load(FXStream& store); 00208 00209 /// Destroy item and free icons if owned 00210 virtual ~FXTreeItem(); 00211 }; 00212 00213 00214 00215 /// Tree item collate function 00216 typedef FXint (*FXTreeListSortFunc)(const FXTreeItem*,const FXTreeItem*); 00217 00218 00219 00220 /** 00221 * A Tree List Widget organizes items in a hierarchical, tree-like fashion. 00222 * Subtrees can be collapsed or expanded by double-clicking on an item 00223 * or by clicking on the optional plus button in front of the item. 00224 * Each item may have a text and optional open-icon as well as a closed-icon. 00225 * The items may be connected by optional lines to show the hierarchical 00226 * relationship. 00227 * When an item's selected state changes, the treelist emits a SEL_SELECTED 00228 * or SEL_DESELECTED message. If an item is opened or closed, a message 00229 * of type SEL_OPENED or SEL_CLOSED is sent. When the subtree under an 00230 * item is expanded, a SEL_EXPANDED or SEL_COLLAPSED message is issued. 00231 * A change of the current item is signified by the SEL_CHANGED message. 00232 * In addition, the tree list sends SEL_COMMAND messages when the user 00233 * clicks on an item, and SEL_CLICKED, SEL_DOUBLECLICKED, and SEL_TRIPLECLICKED 00234 * when the user clicks once, twice, or thrice, respectively. 00235 * When items are added or removed, the tree list sends messages of the 00236 * type SEL_INSERTED or SEL_DELETED. 00237 * In each of these cases, a pointer to the item, if any, is passed in the 00238 * 3rd argument of the message. 00239 */ 00240 class FXAPI FXTreeList : public FXScrollArea { 00241 FXDECLARE(FXTreeList) 00242 protected: 00243 FXTreeItem *firstitem; // First root item 00244 FXTreeItem *lastitem; // Last root item 00245 FXTreeItem *anchoritem; // Selection anchor item 00246 FXTreeItem *currentitem; // Current item 00247 FXTreeItem *extentitem; // Selection extent 00248 FXTreeItem *cursoritem; // Item under cursor 00249 FXFont *font; // Font 00250 FXTreeListSortFunc sortfunc; // Item sort function 00251 FXColor textColor; // Text color 00252 FXColor selbackColor; // Selected background color 00253 FXColor seltextColor; // Selected text color 00254 FXColor lineColor; // Line color 00255 FXint treeWidth; // Tree width 00256 FXint treeHeight; // Tree height 00257 FXint visible; // Number of visible items 00258 FXint indent; // Parent to child indentation 00259 FXint grabx; // Grab point x 00260 FXint graby; // Grab point y 00261 FXString lookup; // Lookup string 00262 FXString tip; 00263 FXString help; // Help string 00264 FXbool state; // State of item 00265 protected: 00266 FXTreeList(); 00267 virtual FXTreeItem* createItem(const FXString& text,FXIcon* oi,FXIcon* ci,void* ptr); 00268 void sort(FXTreeItem*& f1,FXTreeItem*& t1,FXTreeItem*& f2,FXTreeItem*& t2,int n); 00269 void recompute(); 00270 private: 00271 FXTreeList(const FXTreeList&); 00272 FXTreeList& operator=(const FXTreeList&); 00273 public: 00274 long onPaint(FXObject*,FXSelector,void*); 00275 long onEnter(FXObject*,FXSelector,void*); 00276 long onLeave(FXObject*,FXSelector,void*); 00277 long onUngrabbed(FXObject*,FXSelector,void*); 00278 long onMotion(FXObject*,FXSelector,void*); 00279 long onKeyPress(FXObject*,FXSelector,void*); 00280 long onKeyRelease(FXObject*,FXSelector,void*); 00281 long onLeftBtnPress(FXObject*,FXSelector,void*); 00282 long onLeftBtnRelease(FXObject*,FXSelector,void*); 00283 long onRightBtnPress(FXObject*,FXSelector,void*); 00284 long onRightBtnRelease(FXObject*,FXSelector,void*); 00285 long onQueryTip(FXObject*,FXSelector,void*); 00286 long onQueryHelp(FXObject*,FXSelector,void*); 00287 long onTipTimer(FXObject*,FXSelector,void*); 00288 long onFocusIn(FXObject*,FXSelector,void*); 00289 long onFocusOut(FXObject*,FXSelector,void*); 00290 long onAutoScroll(FXObject*,FXSelector,void*); 00291 long onClicked(FXObject*,FXSelector,void*); 00292 long onDoubleClicked(FXObject*,FXSelector,void*); 00293 long onTripleClicked(FXObject*,FXSelector,void*); 00294 long onCommand(FXObject*,FXSelector,void*); 00295 long onLookupTimer(FXObject*,FXSelector,void*); 00296 public: 00297 static FXint ascending(const FXTreeItem*,const FXTreeItem*); 00298 static FXint descending(const FXTreeItem*,const FXTreeItem*); 00299 static FXint ascendingCase(const FXTreeItem*,const FXTreeItem*); 00300 static FXint descendingCase(const FXTreeItem*,const FXTreeItem*); 00301 public: 00302 enum { 00303 ID_LOOKUPTIMER=FXScrollArea::ID_LAST, 00304 ID_LAST 00305 }; 00306 public: 00307 00308 /// Construct a new, initially empty tree list 00309 FXTreeList(FXComposite *p,FXObject* tgt=NULL,FXSelector sel=0,FXuint opts=TREELIST_NORMAL,FXint x=0,FXint y=0,FXint w=0,FXint h=0); 00310 00311 /// Create server-side resources 00312 virtual void create(); 00313 00314 /// Detach server-side resources 00315 virtual void detach(); 00316 00317 /// Perform layout 00318 virtual void layout(); 00319 00320 /// Return default width 00321 virtual FXint getDefaultWidth(); 00322 00323 /// Return default height 00324 virtual FXint getDefaultHeight(); 00325 00326 /// Compute and return content width 00327 virtual FXint getContentWidth(); 00328 00329 /// Return content height 00330 virtual FXint getContentHeight(); 00331 00332 /// Recalculate layout 00333 virtual void recalc(); 00334 00335 /// Tree list can receive focus 00336 virtual FXbool canFocus() const; 00337 00338 /// Move the focus to this window 00339 virtual void setFocus(); 00340 00341 /// Remove the focus from this window 00342 virtual void killFocus(); 00343 00344 /// Return number of items 00345 FXint getNumItems() const; 00346 00347 /// Return number of visible items 00348 FXint getNumVisible() const { return visible; } 00349 00350 /// Change number of visible items 00351 void setNumVisible(FXint nvis); 00352 00353 /// Return first root item 00354 FXTreeItem* getFirstItem() const { return firstitem; } 00355 00356 /// Return last root item 00357 FXTreeItem* getLastItem() const { return lastitem; } 00358 00359 /// Fill tree list by appending items from array of strings 00360 FXint fillItems(FXTreeItem* father,const FXchar** strings,FXIcon* oi=NULL,FXIcon* ci=NULL,void* ptr=NULL,FXbool notify=FALSE); 00361 00362 /// Fill tree list by appending items from newline separated strings 00363 FXint fillItems(FXTreeItem* father,const FXString& strings,FXIcon* oi=NULL,FXIcon* ci=NULL,void* ptr=NULL,FXbool notify=FALSE); 00364 00365 /// Insert [possibly subclassed] item under father before other item 00366 FXTreeItem* insertItem(FXTreeItem* other,FXTreeItem* father,FXTreeItem* item,FXbool notify=FALSE); 00367 00368 /// Insert item with given text and optional icons, and user-data pointer under father before other item 00369 FXTreeItem* insertItem(FXTreeItem* other,FXTreeItem* father,const FXString& text,FXIcon* oi=NULL,FXIcon* ci=NULL,void* ptr=NULL,FXbool notify=FALSE); 00370 00371 /// Append [possibly subclassed] item as last child of father 00372 FXTreeItem* appendItem(FXTreeItem* father,FXTreeItem* item,FXbool notify=FALSE); 00373 00374 /// Append item with given text and optional icons, and user-data pointer as last child of father 00375 FXTreeItem* appendItem(FXTreeItem* father,const FXString& text,FXIcon* oi=NULL,FXIcon* ci=NULL,void* ptr=NULL,FXbool notify=FALSE); 00376 00377 /// Prepend [possibly subclassed] item as first child of father 00378 FXTreeItem* prependItem(FXTreeItem* father,FXTreeItem* item,FXbool notify=FALSE); 00379 00380 /// Prepend item with given text and optional icons, and user-data pointer as first child of father 00381 FXTreeItem* prependItem(FXTreeItem* father,const FXString& text,FXIcon* oi=NULL,FXIcon* ci=NULL,void* ptr=NULL,FXbool notify=FALSE); 00382 00383 /// Move item under father before other item 00384 FXTreeItem *moveItem(FXTreeItem* other,FXTreeItem* father,FXTreeItem* item); 00385 00386 /// Remove item 00387 void removeItem(FXTreeItem* item,FXbool notify=FALSE); 00388 00389 /// Remove items in range [fm, to] inclusively 00390 void removeItems(FXTreeItem* fm,FXTreeItem* to,FXbool notify=FALSE); 00391 00392 /// Remove all items from list 00393 void clearItems(FXbool notify=FALSE); 00394 00395 /// Return item width 00396 FXint getItemWidth(const FXTreeItem* item) const { return item->getWidth(this); } 00397 00398 /// Return item height 00399 FXint getItemHeight(const FXTreeItem* item) const { return item->getHeight(this); } 00400 00401 /// Get item at x,y, if any 00402 virtual FXTreeItem* getItemAt(FXint x,FXint y) const; 00403 00404 /** 00405 * Search items by name, beginning from item start. If the start item 00406 * is NULL the search will start at the first, top-most item in the list. 00407 * Flags may be SEARCH_FORWARD or SEARCH_BACKWARD to control the search 00408 * direction; this can be combined with SEARCH_NOWRAP or SEARCH_WRAP 00409 * to control whether the search wraps at the start or end of the list. 00410 * The option SEARCH_IGNORECASE causes a case-insensitive match. Finally, 00411 * passing SEARCH_PREFIX causes searching for a prefix of the item name. 00412 * Return NULL if no matching item is found. 00413 */ 00414 FXTreeItem* findItem(const FXString& name,FXTreeItem* start=NULL,FXuint flags=SEARCH_FORWARD|SEARCH_WRAP) const; 00415 00416 /** 00417 * Search items by associated user data, beginning from item start. If the 00418 * start item is NULL the search will start at the first, top-most item 00419 * in the list. Flags may be SEARCH_FORWARD or SEARCH_BACKWARD to control 00420 * the search direction; this can be combined with SEARCH_NOWRAP or SEARCH_WRAP 00421 * to control whether the search wraps at the start or end of the list. 00422 * The option SEARCH_IGNORECASE causes a case-insensitive match. Finally, 00423 * passing SEARCH_PREFIX causes searching for a prefix of the item name. 00424 * Return NULL if no matching item is found. 00425 */ 00426 FXTreeItem* findItemByData(const void *ptr,FXTreeItem* start=NULL,FXuint flags=SEARCH_FORWARD|SEARCH_WRAP) const; 00427 00428 /// Scroll to make item visible 00429 virtual void makeItemVisible(FXTreeItem* item); 00430 00431 /// Change item's text 00432 void setItemText(FXTreeItem* item,const FXString& text); 00433 00434 /// Return item's text 00435 FXString getItemText(const FXTreeItem* item) const; 00436 00437 /// Change item's open icon 00438 void setItemOpenIcon(FXTreeItem* item,FXIcon* icon,FXbool owned=FALSE); 00439 00440 /// Return item's open icon, deleting the old icon if it was owned 00441 FXIcon* getItemOpenIcon(const FXTreeItem* item) const; 00442 00443 /// Chance item's closed icon, deleting the old icon if it was owned 00444 void setItemClosedIcon(FXTreeItem* item,FXIcon* icon,FXbool owned=FALSE); 00445 00446 /// Return item's closed icon 00447 FXIcon* getItemClosedIcon(const FXTreeItem* item) const; 00448 00449 /// Change item user-data pointer 00450 void setItemData(FXTreeItem* item,void* ptr) const; 00451 00452 /// Return item user-data pointer 00453 void* getItemData(const FXTreeItem* item) const; 00454 00455 /// Return TRUE if item is selected 00456 FXbool isItemSelected(const FXTreeItem* item) const; 00457 00458 /// Return TRUE if item is current 00459 FXbool isItemCurrent(const FXTreeItem* item) const; 00460 00461 /// Return TRUE if item is visible 00462 FXbool isItemVisible(const FXTreeItem* item) const; 00463 00464 /// Return TRUE if item opened 00465 FXbool isItemOpened(const FXTreeItem* item) const; 00466 00467 /// Return TRUE if item expanded 00468 FXbool isItemExpanded(const FXTreeItem* item) const; 00469 00470 /// Return TRUE if item is a leaf-item, i.e. has no children 00471 FXbool isItemLeaf(const FXTreeItem* item) const; 00472 00473 /// Return TRUE if item is enabled 00474 FXbool isItemEnabled(const FXTreeItem* item) const; 00475 00476 /// Return item hit code: 0 outside, 1 icon, 2 text, 3 box 00477 FXint hitItem(const FXTreeItem* item,FXint x,FXint y) const; 00478 00479 /// Repaint item 00480 void updateItem(FXTreeItem* item) const; 00481 00482 /// Enable item 00483 virtual FXbool enableItem(FXTreeItem* item); 00484 00485 /// Disable item 00486 virtual FXbool disableItem(FXTreeItem* item); 00487 00488 /// Select item 00489 virtual FXbool selectItem(FXTreeItem* item,FXbool notify=FALSE); 00490 00491 /// Deselect item 00492 virtual FXbool deselectItem(FXTreeItem* item,FXbool notify=FALSE); 00493 00494 /// Toggle item selection 00495 virtual FXbool toggleItem(FXTreeItem* item,FXbool notify=FALSE); 00496 00497 /// Extend selection from anchor item to item 00498 virtual FXbool extendSelection(FXTreeItem* item,FXbool notify=FALSE); 00499 00500 /// Deselect all items 00501 virtual FXbool killSelection(FXbool notify=FALSE); 00502 00503 /// Open item 00504 virtual FXbool openItem(FXTreeItem* item,FXbool notify=FALSE); 00505 00506 /// Close item 00507 virtual FXbool closeItem(FXTreeItem* item,FXbool notify=FALSE); 00508 00509 /// Collapse tree 00510 virtual FXbool collapseTree(FXTreeItem* tree,FXbool notify=FALSE); 00511 00512 /// Expand tree 00513 virtual FXbool expandTree(FXTreeItem* tree,FXbool notify=FALSE); 00514 00515 /// Change current item 00516 virtual void setCurrentItem(FXTreeItem* item,FXbool notify=FALSE); 00517 00518 /// Return current item, if any 00519 FXTreeItem* getCurrentItem() const { return currentitem; } 00520 00521 /// Change anchor item 00522 void setAnchorItem(FXTreeItem* item); 00523 00524 /// Return anchor item, if any 00525 FXTreeItem* getAnchorItem() const { return anchoritem; } 00526 00527 /// Return item under cursor, if any 00528 FXTreeItem* getCursorItem() const { return cursoritem; } 00529 00530 /// Sort all items recursively 00531 void sortItems(); 00532 00533 /// Sort root items 00534 void sortRootItems(); 00535 00536 /// Sort children of item 00537 void sortChildItems(FXTreeItem* item); 00538 00539 /// Return sort function 00540 FXTreeListSortFunc getSortFunc() const { return sortfunc; } 00541 00542 /// Change sort function 00543 void setSortFunc(FXTreeListSortFunc func){ sortfunc=func; } 00544 00545 /// Change text font 00546 void setFont(FXFont* fnt); 00547 00548 /// Return text font 00549 FXFont* getFont() const { return font; } 00550 00551 /// Change parent-child indent amount 00552 void setIndent(FXint in); 00553 00554 /// Return parent-child indent amount 00555 FXint getIndent() const { return indent; } 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 /// Return line color 00576 FXColor getLineColor() const { return lineColor; } 00577 00578 /// Change line color 00579 void setLineColor(FXColor clr); 00580 00581 /// Return list style 00582 FXuint getListStyle() const; 00583 00584 /// Change list style 00585 void setListStyle(FXuint style); 00586 00587 /// Set the status line help text for this list 00588 void setHelpText(const FXString& text); 00589 00590 /// Get the status line help text for this list 00591 const FXString& getHelpText() const { return help; } 00592 00593 /// Save object to a stream 00594 virtual void save(FXStream& store) const; 00595 00596 /// Load object from a stream 00597 virtual void load(FXStream& store); 00598 00599 /// Destructor 00600 virtual ~FXTreeList(); 00601 }; 00602 00603 } 00604 00605 #endif

Copyright © 1997-2005 Jeroen van der Zijp