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