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

FXFoldingList.h

00001 /******************************************************************************** 00002 * * 00003 * F o l d i n g L i s t W i d g e t * 00004 * * 00005 ********************************************************************************* 00006 * Copyright (C) 1997,2004 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: FXFoldingList.h,v 1.16 2004/03/15 16:05:28 fox Exp $ * 00023 ********************************************************************************/ 00024 #ifndef FXFOLDINGLIST_H 00025 #define FXFOLDINGLIST_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 FXHeader; 00037 class FXFoldingList; 00038 00039 00040 /// Folding list styles 00041 enum { 00042 FOLDINGLIST_EXTENDEDSELECT = 0, /// Extended selection mode allows for drag-selection of ranges of items 00043 FOLDINGLIST_SINGLESELECT = 0x00100000, /// Single selection mode allows up to one item to be selected 00044 FOLDINGLIST_BROWSESELECT = 0x00200000, /// Browse selection mode enforces one single item to be selected at all times 00045 FOLDINGLIST_MULTIPLESELECT = 0x00300000, /// Multiple selection mode is used for selection of individual items 00046 FOLDINGLIST_AUTOSELECT = 0x00400000, /// Automatically select under cursor 00047 FOLDINGLIST_SHOWS_LINES = 0x00800000, /// Lines shown 00048 FOLDINGLIST_SHOWS_BOXES = 0x01000000, /// Boxes to expand shown 00049 FOLDINGLIST_ROOT_BOXES = 0x02000000, /// Display root boxes also 00050 FOLDINGLIST_NORMAL = FOLDINGLIST_EXTENDEDSELECT 00051 }; 00052 00053 00054 /// Tree list Item 00055 class FXAPI FXFoldingItem : public FXObject { 00056 FXDECLARE(FXFoldingItem) 00057 friend class FXFoldingList; 00058 friend class FXDirList; 00059 protected: 00060 FXFoldingItem *parent; 00061 FXFoldingItem *prev; 00062 FXFoldingItem *next; 00063 FXFoldingItem *first; 00064 FXFoldingItem *last; 00065 FXString label; 00066 FXIcon *openIcon; 00067 FXIcon *closedIcon; 00068 void *data; 00069 FXuint state; 00070 FXint x,y; 00071 protected: 00072 FXFoldingItem():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 FXFoldingList* list,FXDC& dc,FXint x,FXint y,FXint w,FXint h) const; 00074 virtual FXint hitItem(const FXFoldingList* list,FXint x,FXint y) const; 00075 protected: 00076 enum{ 00077 SELECTED = 1, 00078 FOCUS = 2, 00079 DISABLED = 4, 00080 OPENED = 8, 00081 EXPANDED = 16, 00082 HASITEMS = 32, 00083 DRAGGABLE = 64, 00084 OPENICONOWNED = 128, 00085 CLOSEDICONOWNED = 256 00086 }; 00087 public: 00088 00089 /// Constructor 00090 FXFoldingItem(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 FXFoldingItem* getParent() const { return parent; } 00094 00095 /// Get next sibling item 00096 FXFoldingItem* getNext() const { return next; } 00097 00098 /// Get previous sibling item 00099 FXFoldingItem* getPrev() const { return prev; } 00100 00101 /// Get first child item 00102 FXFoldingItem* getFirst() const { return first; } 00103 00104 /// Get las child item 00105 FXFoldingItem* getLast() const { return last; } 00106 00107 /// Get item below this one in list 00108 FXFoldingItem* getBelow() const; 00109 00110 /// Get item above this one in list 00111 FXFoldingItem* 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){ label=txt; } 00118 00119 /// Get item label 00120 const FXString& getText() const { return label; } 00121 00122 /// Change open icon 00123 virtual void setOpenIcon(FXIcon* icn){ openIcon=icn; } 00124 00125 /// Get open icon 00126 FXIcon* getOpenIcon() const { return openIcon; } 00127 00128 /// Change closed icon 00129 virtual void setClosedIcon(FXIcon* icn){ closedIcon=icn; } 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 /// Make open and or icon owned by the item 00177 virtual void setIconOwned(FXuint owned=(OPENICONOWNED|CLOSEDICONOWNED)); 00178 00179 /// Return open icon and closed icon ownership status 00180 FXuint isIconOwned() const { return (state&(OPENICONOWNED|CLOSEDICONOWNED)); } 00181 00182 /// Return TRUE if subitems, real or imagined 00183 FXbool hasItems() const { return (state&HASITEMS)!=0; } 00184 00185 /// Change has items flag 00186 void setHasItems(FXbool flag); 00187 00188 /// Return true if descendent of parent item 00189 FXbool isChildOf(const FXFoldingItem* item) const; 00190 00191 /// Return true if ancestor of child item 00192 FXbool isParentOf(const FXFoldingItem* item) const; 00193 00194 /// Return width of item as drawn in list 00195 virtual FXint getWidth(const FXFoldingList* list) const; 00196 00197 /// Return height of item as drawn in list 00198 virtual FXint getHeight(const FXFoldingList* list) const; 00199 00200 /// Create server-side resources 00201 virtual void create(); 00202 00203 /// Detach server-side resources 00204 virtual void detach(); 00205 00206 /// Destroy server-side resources 00207 virtual void destroy(); 00208 00209 /// Save to stream 00210 virtual void save(FXStream& store) const; 00211 00212 /// Load from stream 00213 virtual void load(FXStream& store); 00214 00215 /// Destroy item and free icons if owned 00216 virtual ~FXFoldingItem(); 00217 }; 00218 00219 00220 00221 /// Folding item collate function 00222 typedef FXint (*FXFoldingListSortFunc)(const FXFoldingItem*,const FXFoldingItem*); 00223 00224 00225 00226 /** 00227 * A Folding List Widget resembles a Tree list except that it supports a 00228 * header control to provide each item with multiple columns of text. 00229 * Subtrees can be collapsed or expanded by double-clicking on an item 00230 * or by clicking on the optional plus button in front of the item. 00231 * Each item may have a text and optional open-icon as well as a closed-icon. 00232 * The items may be connected by optional lines to show the hierarchical 00233 * relationship. 00234 * When an item's selected state changes, the folding list emits a SEL_SELECTED 00235 * or SEL_DESELECTED message. If an item is opened or closed, a message 00236 * of type SEL_OPENED or SEL_CLOSED is sent. When the subtree under an 00237 * item is expanded, a SEL_EXPANDED or SEL_COLLAPSED message is issued. 00238 * A change of the current item is signified by the SEL_CHANGED message. 00239 * In addition, the folding list sends SEL_COMMAND messages when the user 00240 * clicks on an item, and SEL_CLICKED, SEL_DOUBLECLICKED, and SEL_TRIPLECLICKED 00241 * when the user clicks once, twice, or thrice, respectively. 00242 * When items are added or removed, the folding list sends messages of the 00243 * type SEL_INSERTED or SEL_DELETED. 00244 * In each of these cases, a pointer to the item, if any, is passed in the 00245 * 3rd argument of the message. 00246 */ 00247 class FXAPI FXFoldingList : public FXScrollArea { 00248 FXDECLARE(FXFoldingList) 00249 protected: 00250 FXHeader *header; // Tree header 00251 FXFoldingItem *firstitem; // First root item 00252 FXFoldingItem *lastitem; // Last root item 00253 FXFoldingItem *anchoritem; // Selection anchor item 00254 FXFoldingItem *currentitem; // Current item 00255 FXFoldingItem *extentitem; // Selection extent 00256 FXFoldingItem *cursoritem; // Item under cursor 00257 FXFont *font; // Font 00258 FXFoldingListSortFunc sortfunc; // Item sort function 00259 FXColor textColor; // Text color 00260 FXColor selbackColor; // Selected background color 00261 FXColor seltextColor; // Selected text color 00262 FXColor lineColor; // Line color 00263 FXint treeWidth; // Tree width 00264 FXint treeHeight; // Tree height 00265 FXint visible; // Number of visible items 00266 FXint indent; // Parent to child indentation 00267 FXint grabx; // Grab point x 00268 FXint graby; // Grab point y 00269 FXString lookup; // Lookup string 00270 FXString help; // Help string 00271 FXbool state; // State of item 00272 protected: 00273 FXFoldingList(); 00274 virtual FXFoldingItem* createItem(const FXString& text,FXIcon* oi,FXIcon* ci,void* ptr); 00275 virtual void moveContents(FXint x,FXint y); 00276 void sort(FXFoldingItem*& f1,FXFoldingItem*& t1,FXFoldingItem*& f2,FXFoldingItem*& t2,int n); 00277 void mergesort(FXFoldingItem*& list); 00278 void recompute(); 00279 private: 00280 FXFoldingList(const FXFoldingList&); 00281 FXFoldingList& operator=(const FXFoldingList&); 00282 public: 00283 long onPaint(FXObject*,FXSelector,void*); 00284 long onEnter(FXObject*,FXSelector,void*); 00285 long onLeave(FXObject*,FXSelector,void*); 00286 long onUngrabbed(FXObject*,FXSelector,void*); 00287 long onMotion(FXObject*,FXSelector,void*); 00288 long onKeyPress(FXObject*,FXSelector,void*); 00289 long onKeyRelease(FXObject*,FXSelector,void*); 00290 long onLeftBtnPress(FXObject*,FXSelector,void*); 00291 long onLeftBtnRelease(FXObject*,FXSelector,void*); 00292 long onRightBtnPress(FXObject*,FXSelector,void*); 00293 long onRightBtnRelease(FXObject*,FXSelector,void*); 00294 long onHeaderChanged(FXObject*,FXSelector,void*); 00295 long onQueryTip(FXObject*,FXSelector,void*); 00296 long onQueryHelp(FXObject*,FXSelector,void*); 00297 long onTipTimer(FXObject*,FXSelector,void*); 00298 long onFocusIn(FXObject*,FXSelector,void*); 00299 long onFocusOut(FXObject*,FXSelector,void*); 00300 long onAutoScroll(FXObject*,FXSelector,void*); 00301 long onClicked(FXObject*,FXSelector,void*); 00302 long onDoubleClicked(FXObject*,FXSelector,void*); 00303 long onTripleClicked(FXObject*,FXSelector,void*); 00304 long onCommand(FXObject*,FXSelector,void*); 00305 long onLookupTimer(FXObject*,FXSelector,void*); 00306 public: 00307 static FXint ascending(const FXFoldingItem*,const FXFoldingItem*); 00308 static FXint descending(const FXFoldingItem*,const FXFoldingItem*); 00309 static FXint ascendingCase(const FXFoldingItem*,const FXFoldingItem*); 00310 static FXint descendingCase(const FXFoldingItem*,const FXFoldingItem*); 00311 public: 00312 enum { 00313 ID_LOOKUPTIMER=FXScrollArea::ID_LAST, 00314 ID_HEADER_CHANGE, 00315 ID_LAST 00316 }; 00317 public: 00318 00319 /// Construct a folding list; the folding list is initially empty 00320 FXFoldingList(FXComposite *p,FXObject* tgt=NULL,FXSelector sel=0,FXuint opts=FOLDINGLIST_NORMAL,FXint x=0,FXint y=0,FXint w=0,FXint h=0); 00321 00322 /// Create server-side resources 00323 virtual void create(); 00324 00325 /// Detach server-side resources 00326 virtual void detach(); 00327 00328 /// Perform layout 00329 virtual void layout(); 00330 00331 /// Return default width 00332 virtual FXint getDefaultWidth(); 00333 00334 /// Return default height 00335 virtual FXint getDefaultHeight(); 00336 00337 /// Compute and return content width 00338 virtual FXint getContentWidth(); 00339 00340 /// Return content height 00341 virtual FXint getContentHeight(); 00342 00343 /// Recalculate layout 00344 virtual void recalc(); 00345 00346 /// Tree list can receive focus 00347 virtual FXbool canFocus() const; 00348 00349 /// Move the focus to this window 00350 virtual void setFocus(); 00351 00352 /// Remove the focus from this window 00353 virtual void killFocus(); 00354 00355 /// Return header control 00356 FXHeader* getHeader() const { return header; } 00357 00358 /// Append header with given text and optional icon 00359 void appendHeader(const FXString& text,FXIcon *icon=NULL,FXint size=1); 00360 00361 /// Remove header at index 00362 void removeHeader(FXint index); 00363 00364 /// Change text of header at index 00365 void setHeaderText(FXint index,const FXString& text); 00366 00367 /// Return text of header at index 00368 FXString getHeaderText(FXint index) const; 00369 00370 /// Change icon of header at index 00371 void setHeaderIcon(FXint index,FXIcon *icon); 00372 00373 /// Return icon of header at index 00374 FXIcon* getHeaderIcon(FXint index) const; 00375 00376 /// Change size of header at index 00377 void setHeaderSize(FXint index,FXint size); 00378 00379 /// Return width of header at index 00380 FXint getHeaderSize(FXint index) const; 00381 00382 /// Return number of headers 00383 FXint getNumHeaders() const; 00384 00385 /// Return number of items 00386 FXint getNumItems() const; 00387 00388 /// Return number of visible items 00389 FXint getNumVisible() const { return visible; } 00390 00391 /// Change number of visible items 00392 void setNumVisible(FXint nvis); 00393 00394 /// Return first root item 00395 FXFoldingItem* getFirstItem() const { return firstitem; } 00396 00397 /// Return last root item 00398 FXFoldingItem* getLastItem() const { return lastitem; } 00399 00400 /// Prepend new [possibly subclassed] item as first child of p 00401 FXFoldingItem* addItemFirst(FXFoldingItem* p,FXFoldingItem* item,FXbool notify=FALSE); 00402 00403 /// Prepend new item with given text and optional icon, and user-data pointer as first child of p 00404 FXFoldingItem* addItemFirst(FXFoldingItem* p,const FXString& text,FXIcon* oi=NULL,FXIcon* ci=NULL,void* ptr=NULL,FXbool notify=FALSE); 00405 00406 /// Append new [possibly subclassed] item as last child of p 00407 FXFoldingItem* addItemLast(FXFoldingItem* p,FXFoldingItem* item,FXbool notify=FALSE); 00408 00409 /// Append new item with given text and optional icon, and user-data pointer as last child of p 00410 FXFoldingItem* addItemLast(FXFoldingItem* p,const FXString& text,FXIcon* oi=NULL,FXIcon* ci=NULL,void* ptr=NULL,FXbool notify=FALSE); 00411 00412 /// Append new [possibly subclassed] item after to other item 00413 FXFoldingItem* addItemAfter(FXFoldingItem* other,FXFoldingItem* item,FXbool notify=FALSE); 00414 00415 /// Append new item with given text and optional icon, and user-data pointer after to other item 00416 FXFoldingItem* addItemAfter(FXFoldingItem* other,const FXString& text,FXIcon* oi=NULL,FXIcon* ci=NULL,void* ptr=NULL,FXbool notify=FALSE); 00417 00418 /// Prepend new [possibly subclassed] item prior to other item 00419 FXFoldingItem* addItemBefore(FXFoldingItem* other,FXFoldingItem* item,FXbool notify=FALSE); 00420 00421 /// Prepend new item with given text and optional icon, and user-data pointer prior to other item 00422 FXFoldingItem* addItemBefore(FXFoldingItem* other,const FXString& text,FXIcon* oi=NULL,FXIcon* ci=NULL,void* ptr=NULL,FXbool notify=FALSE); 00423 00424 /// Reparent item under parent p 00425 void reparentItem(FXFoldingItem* item,FXFoldingItem* p); 00426 00427 // Move item before other 00428 FXFoldingItem* moveItemBefore(FXFoldingItem* other,FXFoldingItem* item); 00429 00430 // Move item after other 00431 FXFoldingItem* moveItemAfter(FXFoldingItem* other,FXFoldingItem* item); 00432 00433 /// Remove item 00434 void removeItem(FXFoldingItem* item,FXbool notify=FALSE); 00435 00436 /// Remove items in range [fm, to] inclusively 00437 void removeItems(FXFoldingItem* fm,FXFoldingItem* to,FXbool notify=FALSE); 00438 00439 /// Remove all items from list 00440 void clearItems(FXbool notify=FALSE); 00441 00442 /// Return item width 00443 FXint getItemWidth(const FXFoldingItem* item) const { return item->getWidth(this); } 00444 00445 /// Return item height 00446 FXint getItemHeight(const FXFoldingItem* item) const { return item->getHeight(this); } 00447 00448 /// Get item at x,y, if any 00449 FXFoldingItem* getItemAt(FXint x,FXint y) const; 00450 00451 /** 00452 * Search items for item by name, starting from start item; the 00453 * flags argument controls the search direction, and case sensitivity. 00454 */ 00455 FXFoldingItem* findItem(const FXString& text,FXFoldingItem* start=NULL,FXuint flags=SEARCH_FORWARD|SEARCH_WRAP) const; 00456 00457 /// Scroll to make item visible 00458 void makeItemVisible(FXFoldingItem* item); 00459 00460 /// Change item's text 00461 void setItemText(FXFoldingItem* item,const FXString& text); 00462 00463 /// Return item's text 00464 FXString getItemText(const FXFoldingItem* item) const; 00465 00466 /// Change item's open icon 00467 void setItemOpenIcon(FXFoldingItem* item,FXIcon* icon); 00468 00469 /// Return item's open icon 00470 FXIcon* getItemOpenIcon(const FXFoldingItem* item) const; 00471 00472 /// Chance item's closed icon 00473 void setItemClosedIcon(FXFoldingItem* item,FXIcon* icon); 00474 00475 /// Return item's closed icon 00476 FXIcon* getItemClosedIcon(const FXFoldingItem* item) const; 00477 00478 /// Change item user-data pointer 00479 void setItemData(FXFoldingItem* item,void* ptr) const; 00480 00481 /// Return item user-data pointer 00482 void* getItemData(const FXFoldingItem* item) const; 00483 00484 /// Return TRUE if item is selected 00485 FXbool isItemSelected(const FXFoldingItem* item) const; 00486 00487 /// Return TRUE if item is current 00488 FXbool isItemCurrent(const FXFoldingItem* item) const; 00489 00490 /// Return TRUE if item is visible 00491 FXbool isItemVisible(const FXFoldingItem* item) const; 00492 00493 /// Return TRUE if item opened 00494 FXbool isItemOpened(const FXFoldingItem* item) const; 00495 00496 /// Return TRUE if item expanded 00497 FXbool isItemExpanded(const FXFoldingItem* item) const; 00498 00499 /// Return TRUE if item is a leaf-item, i.e. has no children 00500 FXbool isItemLeaf(const FXFoldingItem* item) const; 00501 00502 /// Return TRUE if item is enabled 00503 FXbool isItemEnabled(const FXFoldingItem* item) const; 00504 00505 /// Return item hit code: 0 outside, 1 icon, 2 text, 3 box 00506 FXint hitItem(const FXFoldingItem* item,FXint x,FXint y) const; 00507 00508 /// Repaint item 00509 void updateItem(FXFoldingItem* item); 00510 00511 /// Enable item 00512 FXbool enableItem(FXFoldingItem* item); 00513 00514 /// Disable item 00515 FXbool disableItem(FXFoldingItem* item); 00516 00517 /// Select item 00518 FXbool selectItem(FXFoldingItem* item,FXbool notify=FALSE); 00519 00520 /// Deselect item 00521 FXbool deselectItem(FXFoldingItem* item,FXbool notify=FALSE); 00522 00523 /// Toggle item selection 00524 FXbool toggleItem(FXFoldingItem* item,FXbool notify=FALSE); 00525 00526 /// Extend selection from anchor item to item 00527 FXbool extendSelection(FXFoldingItem* item,FXbool notify=FALSE); 00528 00529 /// Deselect all items 00530 FXbool killSelection(FXbool notify=FALSE); 00531 00532 /// Open item 00533 FXbool openItem(FXFoldingItem* item,FXbool notify=FALSE); 00534 00535 /// Close item 00536 FXbool closeItem(FXFoldingItem* item,FXbool notify=FALSE); 00537 00538 /// Collapse tree 00539 FXbool collapseTree(FXFoldingItem* tree,FXbool notify=FALSE); 00540 00541 /// Expand tree 00542 FXbool expandTree(FXFoldingItem* tree,FXbool notify=FALSE); 00543 00544 /// Change current item 00545 void setCurrentItem(FXFoldingItem* item,FXbool notify=FALSE); 00546 00547 /// Return current item, if any 00548 FXFoldingItem* getCurrentItem() const { return currentitem; } 00549 00550 /// Change anchor item 00551 void setAnchorItem(FXFoldingItem* item); 00552 00553 /// Return anchor item, if any 00554 FXFoldingItem* getAnchorItem() const { return anchoritem; } 00555 00556 /// Return item under cursor, if any 00557 FXFoldingItem* getCursorItem() const { return cursoritem; } 00558 00559 /// Sort all items recursively 00560 void sortItems(); 00561 00562 /// Sort root items 00563 void sortRootItems(); 00564 00565 /// Sort children of item 00566 void sortChildItems(FXFoldingItem* item); 00567 00568 /// Return sort function 00569 FXFoldingListSortFunc getSortFunc() const { return sortfunc; } 00570 00571 /// Change sort function 00572 void setSortFunc(FXFoldingListSortFunc func){ sortfunc=func; } 00573 00574 /// Change text font 00575 void setFont(FXFont* fnt); 00576 00577 /// Return text font 00578 FXFont* getFont() const { return font; } 00579 00580 /// Change parent-child indent amount 00581 void setIndent(FXint in); 00582 00583 /// Return parent-child indent amount 00584 FXint getIndent() const { return indent; } 00585 00586 /// Return normal text color 00587 FXColor getTextColor() const { return textColor; } 00588 00589 /// Change normal text color 00590 void setTextColor(FXColor clr); 00591 00592 /// Return selected text background 00593 FXColor getSelBackColor() const { return selbackColor; } 00594 00595 /// Change selected text background 00596 void setSelBackColor(FXColor clr); 00597 00598 /// Return selected text color 00599 FXColor getSelTextColor() const { return seltextColor; } 00600 00601 /// Change selected text color 00602 void setSelTextColor(FXColor clr); 00603 00604 /// Return line color 00605 FXColor getLineColor() const { return lineColor; } 00606 00607 /// Change line color 00608 void setLineColor(FXColor clr); 00609 00610 /// Return list style 00611 FXuint getListStyle() const; 00612 00613 /// Change list style 00614 void setListStyle(FXuint style); 00615 00616 /// Set the status line help text for this list 00617 void setHelpText(const FXString& text); 00618 00619 /// Get the status line help text for this list 00620 FXString getHelpText() const { return help; } 00621 00622 /// Save object to a stream 00623 virtual void save(FXStream& store) const; 00624 00625 /// Load object from a stream 00626 virtual void load(FXStream& store); 00627 00628 /// Destructor 00629 virtual ~FXFoldingList(); 00630 }; 00631 00632 } 00633 00634 00635 #endif

Copyright © 1997-2004 Jeroen van der Zijp