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

FXTable.h

00001 /********************************************************************************
00002 *                                                                               *
00003 *                            T a b l e   W i d g e t                            *
00004 *                                                                               *
00005 *********************************************************************************
00006 * Copyright (C) 1999,2002 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: FXTable.h,v 1.79 2002/01/18 22:42:55 jeroen Exp $                        *
00023 ********************************************************************************/
00024 #ifndef FXTABLE_H
00025 #define FXTABLE_H
00026 
00027 #ifndef FXSCROLLAREA_H
00028 #include "FXScrollArea.h"
00029 #endif
00030 
00031 
00032 
00033 //////////////////////////////  UNDER DEVELOPMENT  //////////////////////////////
00034 
00035 struct FXTimer;
00036 class FXIcon;
00037 class FXFont;
00038 class FXTable;
00039 
00040 
00041 /// Default cell margin
00042 #define DEFAULT_MARGIN  2
00043 
00044 
00045 
00046 /// Table options
00047 enum {
00048   TABLE_COL_SIZABLE   = 0x00100000,   /// Columns are resizable
00049   TABLE_ROW_SIZABLE   = 0x00200000,   /// Rows are resizable
00050   TABLE_NO_COLSELECT  = 0x00400000,   /// Disallow column selections
00051   TABLE_NO_ROWSELECT  = 0x00800000    /// Disallow row selections
00052   };
00053 
00054 
00055 /// Position in table
00056 struct FXTablePos {
00057   FXint  row;
00058   FXint  col;
00059   };
00060 
00061 
00062 /// Range of table cells
00063 struct FXTableRange {
00064   FXTablePos fm;
00065   FXTablePos to;
00066   };
00067 
00068 
00069 /// Item in table
00070 class FXAPI FXTableItem : public FXObject {
00071   FXDECLARE(FXTableItem)
00072   friend class FXTable;
00073 protected:
00074   FXString    label;
00075   FXIcon*     icon;
00076   void       *data;
00077   FXuint      state;
00078 protected:
00079   FXTableItem():icon(NULL),data(NULL),state(0){}
00080   virtual void draw(const FXTable* table,FXDC& dc,FXint x,FXint y,FXint w,FXint h) const;
00081   virtual void drawButton(const FXTable* table,FXDC& dc,FXint x,FXint y,FXint w,FXint h) const;
00082   virtual void drawBorders(const FXTable* table,FXDC& dc,FXint x,FXint y,FXint w,FXint h) const;
00083   virtual void drawContent(const FXTable* table,FXDC& dc,FXint x,FXint y,FXint w,FXint h) const;
00084   virtual void drawPattern(const FXTable* table,FXDC& dc,FXint x,FXint y,FXint w,FXint h) const;
00085   virtual void drawBackground(const FXTable* table,FXDC& dc,FXint x,FXint y,FXint w,FXint h) const;
00086 protected:
00087   enum{
00088     SELECTED   = 0x00000001,
00089     FOCUS      = 0x00000002,
00090     DISABLED   = 0x00000004,
00091     DRAGGABLE  = 0x00000008,
00092     BUTTON     = 0x00000010,
00093     PRESSED    = 0x00000020,
00094     ICONOWNED  = 0x00000040
00095     };
00096 public:
00097   enum{
00098     RIGHT      = 0x00002000,      /// Align on right
00099     LEFT       = 0x00004000,      /// Align on left
00100     TOP        = 0x00008000,      /// Align on top
00101     BOTTOM     = 0x00010000,      /// Align on bottom
00102     BEFORE     = 0x00020000,      /// Icon before the text
00103     AFTER      = 0x00040000,      /// Icon after the text
00104     ABOVE      = 0x00080000,      /// Icon above the text
00105     BELOW      = 0x00100000,      /// Icon below the text
00106     LBORDER    = 0x00200000,      /// Draw left border
00107     RBORDER    = 0x00400000,      /// Draw right border
00108     TBORDER    = 0x00800000,      /// Draw top border
00109     BBORDER    = 0x01000000       /// Draw bottom border
00110     };
00111 public:
00112   FXTableItem(const FXString& text,FXIcon* ic=NULL,void* ptr=NULL):label(text),icon(ic),data(ptr),state(FXTableItem::RIGHT){}
00113   virtual void setText(const FXString& txt){ label=txt; }
00114   FXString getText() const { return label; }
00115   virtual void setIcon(FXIcon* icn){ icon=icn; }
00116   FXIcon* getIcon() const { return icon; }
00117   void setData(void* ptr){ data=ptr; }
00118   void* getData() const { return data; }
00119   virtual void setFocus(FXbool focus);
00120   FXbool hasFocus() const { return (state&FOCUS)!=0; }
00121   virtual void setSelected(FXbool selected);
00122   FXbool isSelected() const { return (state&SELECTED)!=0; }
00123   virtual void setEnabled(FXbool enabled);
00124   FXbool isEnabled() const { return (state&DISABLED)==0; }
00125   virtual void setDraggable(FXbool draggable);
00126   FXbool isDraggable() const { return (state&DRAGGABLE)!=0; }
00127   void setJustify(FXuint justify);
00128   FXuint getJustify() const { return state&(RIGHT|LEFT|TOP|BOTTOM); }
00129   void setIconPosition(FXuint mode);
00130   FXuint getIconPosition() const { return state&(BEFORE|AFTER|ABOVE|BELOW); }
00131   void setBorders(FXuint borders);
00132   FXuint getBorders() const { return state&(LBORDER|RBORDER|TBORDER|BBORDER); }
00133   void setStipple(FXStipplePattern pat);
00134   FXStipplePattern getStipple() const;
00135   void setButton(FXbool button);
00136   FXbool isButton() const { return (state&BUTTON)!=0; }
00137   void setPressed(FXbool pressed);
00138   FXbool isPressed() const { return (state&PRESSED)!=0; }
00139   virtual void setIconOwned(FXuint owned=ICONOWNED);
00140   FXuint isIconOwned() const { return (state&ICONOWNED); }
00141   virtual FXint getWidth(const FXTable* table) const;
00142   virtual FXint getHeight(const FXTable* table) const;
00143   virtual void create();
00144   virtual void detach();
00145   virtual void destroy();
00146   virtual void save(FXStream& store) const;
00147   virtual void load(FXStream& store);
00148   virtual ~FXTableItem();
00149   };
00150 
00151 
00152 
00153 /// Table Widget
00154 class FXAPI FXTable : public FXScrollArea {
00155   FXDECLARE(FXTable)
00156 protected:
00157   FXTableItem **cells;                  // Cells
00158   FXint        *col_x;                  // Vertical grid line positions
00159   FXint        *row_y;                  // Horizontal grid line positions
00160   FXFont       *font;                   // Font
00161   FXint         nrows;                  // Logically allocated rows
00162   FXint         ncols;                  // Logically allocated columns
00163   FXint         visiblerows;            // Visible rows
00164   FXint         visiblecols;            // Visible columns
00165   FXint         margintop;              // Margin top
00166   FXint         marginbottom;           // Margin bottom
00167   FXint         marginleft;             // Margin left
00168   FXint         marginright;            // Margin right
00169   FXColor       textColor;              // Normal text color
00170   FXColor       baseColor;              // Base color
00171   FXColor       hiliteColor;            // Highlight color
00172   FXColor       shadowColor;            // Shadow color
00173   FXColor       borderColor;            // Border color
00174   FXColor       selbackColor;           // Select background color
00175   FXColor       seltextColor;           // Select text color
00176   FXColor       gridColor;              // Grid line color
00177   FXColor       stippleColor;           // Stipple color
00178   FXColor       cellBorderColor;        // Cell border color
00179   FXint         cellBorderWidth;        // Cell border width
00180   FXColor       cellBackColor[2][2];    // Row/Column even/odd background color
00181   FXint         defColumnWidth;         // Default column width [if uniform columns]
00182   FXint         defRowHeight;           // Default row height [if uniform rows]
00183   FXint         leading_rows;           // Leading fixed rows
00184   FXint         leading_cols;           // Leading fixed columns
00185   FXint         scrolling_rows;         // Scrolling rows
00186   FXint         scrolling_cols;         // Scrolling columns
00187   FXint         trailing_rows;          // Trailing fixed rows
00188   FXint         trailing_cols;          // Trailing fixed columns
00189   FXint         scrollable_left;        // Left side of scrollable part of table
00190   FXint         scrollable_right;       // Right edge of scrollable part of table
00191   FXint         scrollable_top;         // Top side of scrollable part of table
00192   FXint         scrollable_bottom;      // Bottom side of scrollable part of table
00193   FXint         table_left;             // Left side of table
00194   FXint         table_right;            // Right edge of right side of table
00195   FXint         table_top;              // Top side of table
00196   FXint         table_bottom;           // Bottom side of bottom of table
00197   FXTableRange  selection;              // Selected cell range
00198   FXTablePos    current;                // Current position
00199   FXTablePos    anchor;                 // Anchor position
00200   FXTablePos    extent;                 // Extent position
00201   FXint         cellcursor;             // Cursor position in cell
00202   FXint         cellanchor;             // Anchor position in cell
00203   FXint         cellscroll;             // Scolled amount in cell
00204   FXbool        hgrid;                  // Horizontal grid lines shown
00205   FXbool        vgrid;                  // Vertical grid lines shown
00206   FXuchar       mode;                   // Mode we're in
00207   FXint         grabx;                  // Grab point x
00208   FXint         graby;                  // Grab point y
00209   FXint         rowcol;                 // Row or column being resized
00210   FXTimer      *blinker;                // Blink timer
00211   FXString      help;
00212 public:
00213   static FXDragType csvType;
00214   static const FXchar csvTypeName[];
00215 protected:
00216   FXTable();
00217   virtual void layout();
00218   void drawCursor(FXuint state);
00219   FXRectangle cellRect(FXint r,FXint c) const;
00220   virtual void drawCell(FXDC& dc,FXint xlo,FXint xhi,FXint ylo,FXint yhi,FXint xoff,FXint yoff,FXint sr,FXint er,FXint sc,FXint ec);
00221   virtual void drawRange(FXDC& dc,FXint xlo,FXint xhi,FXint ylo,FXint yhi,FXint xoff,FXint yoff,FXint rlo,FXint rhi,FXint clo,FXint chi);
00222   virtual FXTableItem* createItem(const FXString& text,FXIcon* icon,void* ptr);
00223   FXint startRow(FXint row,FXint col) const;
00224   FXint startCol(FXint row,FXint col) const;
00225   FXint endRow(FXint row,FXint col) const;
00226   FXint endCol(FXint row,FXint col) const;
00227   FXint nearestCol(FXint col,FXint x) const;
00228   FXint nearestRow(FXint row,FXint y) const;
00229 protected:
00230   enum {
00231     MOUSE_NONE,
00232     MOUSE_SCROLL,
00233     MOUSE_DRAG,
00234     MOUSE_SELECT,
00235     MOUSE_COL_SELECT,
00236     MOUSE_ROW_SELECT,
00237     MOUSE_COL_SIZE,
00238     MOUSE_ROW_SIZE
00239     };
00240 private:
00241   FXTable(const FXTable&);
00242   FXTable& operator=(const FXTable&);
00243 public:
00244   long onPaint(FXObject*,FXSelector,void*);
00245   long onFocusIn(FXObject*,FXSelector,void*);
00246   long onFocusOut(FXObject*,FXSelector,void*);
00247   long onMotion(FXObject*,FXSelector,void*);
00248   long onKeyPress(FXObject*,FXSelector,void*);
00249   long onKeyRelease(FXObject*,FXSelector,void*);
00250   long onLeftBtnPress(FXObject*,FXSelector,void*);
00251   long onLeftBtnRelease(FXObject*,FXSelector,void*);
00252   long onRightBtnPress(FXObject*,FXSelector,void*);
00253   long onRightBtnRelease(FXObject*,FXSelector,void*);
00254   long onUngrabbed(FXObject*,FXSelector,void*);
00255   long onBlink(FXObject*,FXSelector,void*);
00256   long onSelectionLost(FXObject*,FXSelector,void*);
00257   long onSelectionGained(FXObject*,FXSelector,void*);
00258   long onAutoScroll(FXObject*,FXSelector,void*);
00259   long onCommand(FXObject*,FXSelector,void*);
00260   long onClicked(FXObject*,FXSelector,void*);
00261   long onDoubleClicked(FXObject*,FXSelector,void*);
00262   long onTripleClicked(FXObject*,FXSelector,void*);
00263 
00264   // Visual characteristics
00265   long onCmdHorzGrid(FXObject*,FXSelector,void*);
00266   long onUpdHorzGrid(FXObject*,FXSelector,void*);
00267   long onCmdVertGrid(FXObject*,FXSelector,void*);
00268   long onUpdVertGrid(FXObject*,FXSelector,void*);
00269 
00270   // Row/Column manipulations
00271   long onCmdDeleteColumn(FXObject*,FXSelector,void*);
00272   long onUpdDeleteColumn(FXObject*,FXSelector,void*);
00273   long onCmdDeleteRow(FXObject*,FXSelector,void*);
00274   long onUpdDeleteRow(FXObject*,FXSelector,void*);
00275   long onCmdInsertColumn(FXObject*,FXSelector,void*);
00276   long onCmdInsertRow(FXObject*,FXSelector,void*);
00277 
00278   // Movement
00279   long onCmdMoveRight(FXObject*,FXSelector,void*);
00280   long onCmdMoveLeft(FXObject*,FXSelector,void*);
00281   long onCmdMoveUp(FXObject*,FXSelector,void*);
00282   long onCmdMoveDown(FXObject*,FXSelector,void*);
00283   long onCmdMoveHome(FXObject*,FXSelector,void*);
00284   long onCmdMoveEnd(FXObject*,FXSelector,void*);
00285   long onCmdMoveTop(FXObject*,FXSelector,void*);
00286   long onCmdMoveBottom(FXObject*,FXSelector,void*);
00287   long onCmdMovePageDown(FXObject*,FXSelector,void*);
00288   long onCmdMovePageUp(FXObject*,FXSelector,void*);
00289 
00290   // Mark and extend
00291   long onCmdMark(FXObject*,FXSelector,void*);
00292   long onCmdExtend(FXObject*,FXSelector,void*);
00293 
00294   // Changing Selection
00295   long onCmdSelectCell(FXObject*,FXSelector,void*);
00296   long onCmdSelectRow(FXObject*,FXSelector,void*);
00297   long onCmdSelectColumn(FXObject*,FXSelector,void*);
00298   long onCmdSelectAll(FXObject*,FXSelector,void*);
00299   long onCmdDeselectAll(FXObject*,FXSelector,void*);
00300 
00301 public:
00302 
00303   enum {
00304     ID_HORZ_GRID=FXScrollArea::ID_LAST,
00305     ID_VERT_GRID,
00306     ID_DELETE_COLUMN,
00307     ID_DELETE_ROW,
00308     ID_INSERT_COLUMN,
00309     ID_INSERT_ROW,
00310     ID_SELECT_COLUMN,
00311     ID_SELECT_ROW,
00312     ID_SELECT_CELL,
00313     ID_SELECT_ALL,
00314     ID_DESELECT_ALL,
00315     ID_MOVE_LEFT,
00316     ID_MOVE_RIGHT,
00317     ID_MOVE_UP,
00318     ID_MOVE_DOWN,
00319     ID_MOVE_HOME,
00320     ID_MOVE_END,
00321     ID_MOVE_TOP,
00322     ID_MOVE_BOTTOM,
00323     ID_MOVE_PAGEDOWN,
00324     ID_MOVE_PAGEUP,
00325     ID_MARK,
00326     ID_EXTEND,
00327     ID_CUT_SEL,
00328     ID_COPY_SEL,
00329     ID_PASTE_SEL,
00330     ID_BLINK,
00331     ID_LAST
00332     };
00333 
00334 public:
00335 
00336   /// Make new table with nr visible rows and nc visible columns; the table
00337   /// is initially empty, i.e. contains no cells (nrows=0, ncols=0)
00338   FXTable(FXComposite *p,FXint nr,FXint nc,FXObject* tgt=NULL,FXSelector sel=0,FXuint opts=0,FXint x=0,FXint y=0,FXint w=0,FXint h=0,FXint pl=DEFAULT_MARGIN,FXint pr=DEFAULT_MARGIN,FXint pt=DEFAULT_MARGIN,FXint pb=DEFAULT_MARGIN);
00339   virtual void create();
00340   virtual void detach();
00341   virtual void recalc();
00342 
00343   /// Table widget can receive focus
00344   virtual FXbool canFocus() const;
00345 
00346   /// Move the focus to this window
00347   virtual void setFocus();
00348 
00349   /// Remove the focus from this window
00350   virtual void killFocus();
00351 
00352   /// Change visible rows/columns
00353   void setVisibleRows(FXint nvrows);
00354   FXint getVisibleRows() const { return visiblerows; }
00355   void setVisibleCols(FXint nvcols);
00356   FXint getVisibleCols() const { return visiblecols; }
00357 
00358   /// Is horizontal grid shown
00359   FXbool isHorzGridShown() const { return hgrid; }
00360 
00361   /// Is vertical grid shown
00362   FXbool isVertGridShown() const { return vgrid; }
00363 
00364   /// Show or hide horizontal grid
00365   void showHorzGrid(FXbool on=TRUE);
00366 
00367   /// Show or hide vertical grid
00368   void showVertGrid(FXbool on=TRUE);
00369 
00370   /// Report default size, which is determined based on the
00371   /// visible rows/columns and the default width/height
00372   virtual FXint getDefaultWidth();
00373   virtual FXint getDefaultHeight();
00374 
00375   /// Compute content size
00376   virtual FXint getContentWidth();
00377   virtual FXint getContentHeight();
00378 
00379   /// Scroll contents
00380   virtual void moveContents(FXint x,FXint y);
00381 
00382   /// Resize the table content to nr rows and nc columns
00383   void setTableSize(FXint nr,FXint nc,FXbool notify=FALSE);
00384 
00385   /// Get number of rows
00386   FXint getNumRows() const { return nrows; }
00387 
00388   /// Get number of columns
00389   FXint getNumCols() const { return ncols; }
00390 
00391   /// Change cell margins
00392   void setMarginTop(FXint pt);
00393   FXint getMarginTop() const { return margintop; }
00394   void setMarginBottom(FXint pb);
00395   FXint getMarginBottom() const { return marginbottom; }
00396   void setMarginLeft(FXint pl);
00397   FXint getMarginLeft() const { return marginleft; }
00398   void setMarginRight(FXint pr);
00399   FXint getMarginRight() const { return marginright; }
00400 
00401   /// Change table style
00402   FXuint getTableStyle() const;
00403   void setTableStyle(FXuint style);
00404 
00405   /// Get/set leading rows
00406   virtual void setLeadingRows(FXint leadrows);
00407   FXint getLeadingRows() const { return leading_rows; }
00408 
00409   /// Get/set leading columns
00410   virtual void setLeadingCols(FXint leadcols);
00411   FXint getLeadingCols() const { return leading_cols; }
00412 
00413   /// Get/set trailing rows
00414   virtual void setTrailingRows(FXint trailrows);
00415   FXint getTrailingRows() const { return trailing_rows; }
00416 
00417   /// Get/set trailing columns
00418   virtual void setTrailingCols(FXint trailcols);
00419   FXint getTrailingCols() const { return trailing_cols; }
00420 
00421   /// Determine row containing y; returns -1 if y outside of table
00422   FXint rowAtY(FXint y) const;
00423 
00424   /// Determine column containing x; returns -1 if x outside of table
00425   FXint colAtX(FXint x) const;
00426 
00427   /// Return the item at the given index
00428   FXTableItem *getItem(FXint row,FXint col) const;
00429 
00430   /// Replace the item with a [possibly subclassed] item
00431   void setItem(FXint row,FXint col,FXTableItem* item);
00432 
00433   /// Insert new row
00434   virtual void insertRows(FXint row,FXint nr=1,FXbool notify=FALSE);
00435 
00436   /// Insert new column
00437   virtual void insertColumns(FXint col,FXint nc=1,FXbool notify=FALSE);
00438 
00439   /// Remove rows of cells
00440   virtual void removeRows(FXint row,FXint nr=1,FXbool notify=FALSE);
00441 
00442   /// Remove column of cells
00443   virtual void removeColumns(FXint col,FXint nc=1,FXbool notify=FALSE);
00444 
00445   /// Remove single cell
00446   virtual void removeItem(FXint row,FXint col,FXbool notify=FALSE);
00447 
00448   /// Scroll to make cell at r,c fully visible
00449   void makePositionVisible(FXint r,FXint c);
00450 
00451   /// Change column width
00452   void setColumnWidth(FXint col,FXint cwidth);
00453   FXint getColumnWidth(FXint col) const;
00454 
00455   /// Change row height
00456   void setRowHeight(FXint row,FXint rheight);
00457   FXint getRowHeight(FXint row) const;
00458 
00459   /// Change X coordinate of column c
00460   void setColumnX(FXint col,FXint x);
00461   FXint getColumnX(FXint col) const;
00462 
00463   /// Change Y coordinate of row r
00464   void setRowY(FXint row,FXint y);
00465   FXint getRowY(FXint row) const;
00466 
00467   /// Change default column width
00468   void setDefColumnWidth(FXint cwidth);
00469   FXint getDefColumnWidth() const { return defColumnWidth; }
00470 
00471   /// Change default row height
00472   void setDefRowHeight(FXint rheight);
00473   FXint getDefRowHeight() const { return defRowHeight; }
00474 
00475   /// Modify cell text
00476   void setItemText(FXint r,FXint c,const FXString& text);
00477   FXString getItemText(FXint r,FXint c) const;
00478 
00479   /// Modify cell icon
00480   void setItemIcon(FXint r,FXint c,FXIcon* icon);
00481   FXIcon* getItemIcon(FXint r,FXint c) const;
00482 
00483   /// Modify cell user-data
00484   void setItemData(FXint r,FXint c,void* ptr);
00485   void* getItemData(FXint r,FXint c) const;
00486 
00487   /// Is cell selected, current, visible, enabled
00488   FXbool isItemSelected(FXint r,FXint c) const;
00489   FXbool isItemCurrent(FXint r,FXint c) const;
00490   FXbool isItemVisible(FXint r,FXint c) const;
00491   FXbool isItemEnabled(FXint r,FXint c) const;
00492 
00493   /// Repaint cells between grid lines sr,er and grid lines sc,ec
00494   void updateRange(FXint sr,FXint er,FXint sc,FXint ec);
00495 
00496   /// Repaint cell at r,c
00497   void updateItem(FXint r,FXint c);
00498 
00499   /// Enable, disable, select, deselect, toggle cell
00500   FXbool enableItem(FXint r,FXint c);
00501   FXbool disableItem(FXint r,FXint c);
00502   FXbool selectItem(FXint r,FXint c,FXbool notify=FALSE);
00503   FXbool deselectItem(FXint r,FXint c,FXbool notify=FALSE);
00504   FXbool toggleItem(FXint r,FXint c,FXbool notify=FALSE);
00505 
00506   /// Change current cell
00507   void setCurrentItem(FXint r,FXint c,FXbool notify=FALSE);
00508   FXint getCurrentRow() const { return current.row; }
00509   FXint getCurrentColumn() const { return current.col; }
00510 
00511   /// Change anchored cell
00512   void setAnchorItem(FXint r,FXint c);
00513   FXint getAnchorRow() const { return anchor.row; }
00514   FXint getAnchorColumn() const { return anchor.col; }
00515 
00516   /// Select range
00517   FXbool selectRange(FXint sr,FXint er,FXint sc,FXint ec,FXbool notify=FALSE);
00518 
00519   /// Extend selection
00520   FXbool extendSelection(FXint r,FXint c,FXbool notify=FALSE);
00521 
00522   /// Kill selection
00523   FXbool killSelection(FXbool notify=FALSE);
00524 
00525   /// Change font
00526   void setFont(FXFont* fnt);
00527   FXFont* getFont() const { return font; }
00528 
00529   /// Obtain colors of various parts
00530   FXColor getTextColor() const { return textColor; }
00531   FXColor getBaseColor() const { return baseColor; }
00532   FXColor getHiliteColor() const { return hiliteColor; }
00533   FXColor getShadowColor() const { return shadowColor; }
00534   FXColor getBorderColor() const { return borderColor; }
00535   FXColor getSelBackColor() const { return selbackColor; }
00536   FXColor getSelTextColor() const { return seltextColor; }
00537   FXColor getGridColor() const { return gridColor; }
00538   FXColor getStippleColor() const { return stippleColor; }
00539   FXColor getCellBorderColor() const { return cellBorderColor; }
00540 
00541   /// Change colors of various parts
00542   void setTextColor(FXColor clr);
00543   void setBaseColor(FXColor clr);
00544   void setHiliteColor(FXColor clr);
00545   void setShadowColor(FXColor clr);
00546   void setBorderColor(FXColor clr);
00547   void setSelBackColor(FXColor clr);
00548   void setSelTextColor(FXColor clr);
00549   void setGridColor(FXColor clr);
00550   void setStippleColor(FXColor clr);
00551   void setCellBorderColor(FXColor clr);
00552 
00553   /// Change cell background color for even/odd rows/columns
00554   void setCellColor(FXint r,FXint c,FXColor clr);
00555 
00556   /// Obtain cell background color for even/odd rows/columns
00557   FXColor getCellColor(FXint r,FXint c) const;
00558 
00559   /// Change cell border width
00560   void setCellBorderWidth(FXint borderwidth);
00561 
00562   /// Return cell border width
00563   FXint getCellBorderWidth() const { return cellBorderWidth; }
00564 
00565   /// Change help text
00566   void setHelpText(const FXString& text);
00567   FXString getHelpText() const { return help; }
00568 
00569   /// Serialize
00570   virtual void save(FXStream& store) const;
00571   virtual void load(FXStream& store);
00572 
00573   virtual ~FXTable();
00574   };
00575 
00576 
00577 
00578 #endif