![]() |
Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members
|
The Table widget displays a table of items, each with a text and optional icon. More...
#include <FXTable.h>
Public Types | |
| enum | { ID_HORZ_GRID = FXScrollArea::ID_LAST, ID_VERT_GRID, ID_TOGGLE_EDITABLE, ID_DELETE_COLUMN, ID_DELETE_ROW, ID_INSERT_COLUMN, ID_INSERT_ROW, ID_SELECT_COLUMN_INDEX, ID_SELECT_ROW_INDEX, ID_SELECT_COLUMN, ID_SELECT_ROW, ID_SELECT_CELL, ID_SELECT_ALL, ID_DESELECT_ALL, ID_MOVE_LEFT, ID_MOVE_RIGHT, ID_MOVE_UP, ID_MOVE_DOWN, ID_MOVE_HOME, ID_MOVE_END, ID_MOVE_TOP, ID_MOVE_BOTTOM, ID_MOVE_PAGEDOWN, ID_MOVE_PAGEUP, ID_START_INPUT, ID_CANCEL_INPUT, ID_ACCEPT_INPUT, ID_MARK, ID_EXTEND, ID_CUT_SEL, ID_COPY_SEL, ID_PASTE_SEL, ID_DELETE_SEL, ID_LAST } |
Public Member Functions | |
| long | onPaint (FXObject *, FXSelector, void *) |
| long | onEnter (FXObject *, FXSelector, void *) |
| long | onLeave (FXObject *, FXSelector, void *) |
| long | onFocusIn (FXObject *, FXSelector, void *) |
| long | onFocusOut (FXObject *, FXSelector, void *) |
| long | onMotion (FXObject *, FXSelector, void *) |
| long | onKeyPress (FXObject *, FXSelector, void *) |
| long | onKeyRelease (FXObject *, FXSelector, void *) |
| long | onLeftBtnPress (FXObject *, FXSelector, void *) |
| long | onLeftBtnRelease (FXObject *, FXSelector, void *) |
| long | onRightBtnPress (FXObject *, FXSelector, void *) |
| long | onRightBtnRelease (FXObject *, FXSelector, void *) |
| long | onUngrabbed (FXObject *, FXSelector, void *) |
| long | onSelectionLost (FXObject *, FXSelector, void *) |
| long | onSelectionGained (FXObject *, FXSelector, void *) |
| long | onSelectionRequest (FXObject *, FXSelector, void *ptr) |
| long | onClipboardLost (FXObject *, FXSelector, void *) |
| long | onClipboardGained (FXObject *, FXSelector, void *) |
| long | onClipboardRequest (FXObject *, FXSelector, void *) |
| long | onAutoScroll (FXObject *, FXSelector, void *) |
| long | onCommand (FXObject *, FXSelector, void *) |
| long | onClicked (FXObject *, FXSelector, void *) |
| long | onDoubleClicked (FXObject *, FXSelector, void *) |
| long | onTripleClicked (FXObject *, FXSelector, void *) |
| long | onQueryTip (FXObject *, FXSelector, void *) |
| long | onQueryHelp (FXObject *, FXSelector, void *) |
| long | onTipTimer (FXObject *, FXSelector, void *) |
| long | onCmdToggleEditable (FXObject *, FXSelector, void *) |
| long | onUpdToggleEditable (FXObject *, FXSelector, void *) |
| long | onCmdHorzGrid (FXObject *, FXSelector, void *) |
| long | onUpdHorzGrid (FXObject *, FXSelector, void *) |
| long | onCmdVertGrid (FXObject *, FXSelector, void *) |
| long | onUpdVertGrid (FXObject *, FXSelector, void *) |
| long | onCmdDeleteColumn (FXObject *, FXSelector, void *) |
| long | onUpdDeleteColumn (FXObject *, FXSelector, void *) |
| long | onCmdDeleteRow (FXObject *, FXSelector, void *) |
| long | onUpdDeleteRow (FXObject *, FXSelector, void *) |
| long | onCmdInsertColumn (FXObject *, FXSelector, void *) |
| long | onUpdInsertColumn (FXObject *, FXSelector, void *) |
| long | onCmdInsertRow (FXObject *, FXSelector, void *) |
| long | onUpdInsertRow (FXObject *, FXSelector, void *) |
| long | onCmdMoveRight (FXObject *, FXSelector, void *) |
| long | onCmdMoveLeft (FXObject *, FXSelector, void *) |
| long | onCmdMoveUp (FXObject *, FXSelector, void *) |
| long | onCmdMoveDown (FXObject *, FXSelector, void *) |
| long | onCmdMoveHome (FXObject *, FXSelector, void *) |
| long | onCmdMoveEnd (FXObject *, FXSelector, void *) |
| long | onCmdMoveTop (FXObject *, FXSelector, void *) |
| long | onCmdMoveBottom (FXObject *, FXSelector, void *) |
| long | onCmdMovePageDown (FXObject *, FXSelector, void *) |
| long | onCmdMovePageUp (FXObject *, FXSelector, void *) |
| long | onCmdMark (FXObject *, FXSelector, void *) |
| long | onCmdExtend (FXObject *, FXSelector, void *) |
| long | onUpdSelectCell (FXObject *, FXSelector, void *) |
| long | onCmdSelectCell (FXObject *, FXSelector, void *) |
| long | onUpdSelectRow (FXObject *, FXSelector, void *) |
| long | onCmdSelectRow (FXObject *, FXSelector, void *) |
| long | onUpdSelectColumn (FXObject *, FXSelector, void *) |
| long | onCmdSelectColumn (FXObject *, FXSelector, void *) |
| long | onCmdSelectRowIndex (FXObject *, FXSelector, void *) |
| long | onCmdSelectColumnIndex (FXObject *, FXSelector, void *) |
| long | onUpdSelectAll (FXObject *, FXSelector, void *) |
| long | onCmdSelectAll (FXObject *, FXSelector, void *) |
| long | onUpdDeselectAll (FXObject *, FXSelector, void *) |
| long | onCmdDeselectAll (FXObject *, FXSelector, void *) |
| long | onCmdCutSel (FXObject *, FXSelector, void *) |
| long | onCmdCopySel (FXObject *, FXSelector, void *) |
| long | onCmdDeleteSel (FXObject *, FXSelector, void *) |
| long | onCmdPasteSel (FXObject *, FXSelector, void *) |
| long | onUpdHaveSelection (FXObject *, FXSelector, void *) |
| long | onCmdStartInput (FXObject *, FXSelector, void *) |
| long | onUpdStartInput (FXObject *, FXSelector, void *) |
| long | onCmdAcceptInput (FXObject *, FXSelector, void *) |
| long | onUpdAcceptInput (FXObject *, FXSelector, void *) |
| long | onCmdCancelInput (FXObject *, FXSelector, void *) |
| FXTable (FXComposite *p, 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) | |
| Construct a new table. | |
| virtual FXint | getDefaultWidth () |
| Return default width. | |
| virtual FXint | getDefaultHeight () |
| Return default height. | |
| virtual FXint | getContentWidth () |
| Computes content width. | |
| virtual FXint | getContentHeight () |
| Computes content height. | |
| virtual FXint | getVisibleX () const |
| Return visible area x position. | |
| virtual FXint | getVisibleY () const |
| Return visible area y position. | |
| virtual FXint | getVisibleWidth () const |
| Return visible area width. | |
| virtual FXint | getVisibleHeight () const |
| Return visible area height. | |
| virtual void | create () |
| Create the server-side resources. | |
| virtual void | detach () |
| Detach the server-side resources. | |
| virtual void | layout () |
| Perform layout. | |
| virtual void | recalc () |
| Mark this window's layout as dirty. | |
| virtual FXbool | canFocus () const |
| Table widget can receive focus. | |
| virtual void | setFocus () |
| Move the focus to this window. | |
| virtual void | killFocus () |
| Remove the focus from this window. | |
| virtual void | changeFocus (FXWindow *child) |
| Notification that focus moved to new child. | |
| FXButton * | getCornerButton () const |
| Return button in the top/left corner. | |
| FXHeader * | getColumnHeader () const |
| Return column header control. | |
| FXHeader * | getRowHeader () const |
| Return row header control. | |
| void | setVisibleRows (FXint nvrows) |
| Change visible rows. | |
| FXint | getVisibleRows () const |
| return number of visible rows | |
| void | setVisibleColumns (FXint nvcols) |
| Change visible columns. | |
| FXint | getVisibleColumns () const |
| Return number of visible columns. | |
| FXbool | isEditable () const |
| Return true if table is editable. | |
| void | setEditable (FXbool edit=true) |
| Set editable flag. | |
| void | showHorzGrid (FXbool on=true) |
| Show or hide horizontal grid. | |
| FXbool | isHorzGridShown () const |
| Is horizontal grid shown. | |
| void | showVertGrid (FXbool on=true) |
| Show or hide vertical grid. | |
| FXbool | isVertGridShown () const |
| Is vertical grid shown. | |
| FXint | getNumRows () const |
| Get number of rows. | |
| FXint | getNumColumns () const |
| Get number of columns. | |
| void | setMarginTop (FXint pt) |
| Change top cell margin. | |
| FXint | getMarginTop () const |
| Return top cell margin. | |
| void | setMarginBottom (FXint pb) |
| Change bottom cell margin. | |
| FXint | getMarginBottom () const |
| Return bottom cell margin. | |
| void | setMarginLeft (FXint pl) |
| Change left cell margin. | |
| FXint | getMarginLeft () const |
| Return left cell margin. | |
| void | setMarginRight (FXint pr) |
| Change right cell margin. | |
| FXint | getMarginRight () const |
| Return right cell margin. | |
| virtual FXbool | startInput (FXint row, FXint col) |
| Start input mode for the cell at the given position. | |
| virtual FXbool | cancelInput () |
| Cancel input mode. | |
| virtual FXbool | acceptInput (FXbool notify=false) |
| End input mode and accept the new value from the control. | |
| FXint | colAtX (FXint x) const |
| Determine column containing x. | |
| FXint | rowAtY (FXint y) const |
| Determine row containing y. | |
| FXTableItem * | getItem (FXint row, FXint col) const |
| Return the item at the given index. | |
| void | setItem (FXint row, FXint col, FXTableItem *item, FXbool notify=false) |
| Replace the item with a [possibly subclassed] item. | |
| virtual void | setTableSize (FXint nr, FXint nc, FXbool notify=false) |
| Set the table size to nr rows and nc columns; all existing items will be removed. | |
| virtual void | insertRows (FXint row, FXint nr=1, FXbool notify=false) |
| Insert new row. | |
| virtual void | insertColumns (FXint col, FXint nc=1, FXbool notify=false) |
| Insert new column. | |
| virtual void | removeRows (FXint row, FXint nr=1, FXbool notify=false) |
| Remove rows of cells. | |
| virtual void | removeColumns (FXint col, FXint nc=1, FXbool notify=false) |
| Remove column of cells. | |
| virtual FXTableItem * | extractItem (FXint row, FXint col, FXbool notify=false) |
| Extract item from table. | |
| virtual void | removeItem (FXint row, FXint col, FXbool notify=false) |
| Clear single cell. | |
| virtual void | removeRange (FXint startrow, FXint endrow, FXint startcol, FXint endcol, FXbool notify=false) |
| Clear all cells in the given range. | |
| virtual void | clearItems (FXbool notify=false) |
| Remove all items from table. | |
| virtual void | makePositionVisible (FXint r, FXint c) |
| Scroll to make cell at r,c fully visible. | |
| FXbool | isItemVisible (FXint r, FXint c) const |
| Return true if item partially visible. | |
| void | setColumnHeaderMode (FXuint hint=LAYOUT_FIX_HEIGHT) |
| Change column header height mode to fixed or variable. | |
| FXuint | getColumnHeaderMode () const |
| Return column header height mode. | |
| void | setRowHeaderMode (FXuint hint=LAYOUT_FIX_WIDTH) |
| Change row header width mode to fixed or variable. | |
| FXuint | getRowHeaderMode () const |
| Return row header width mode. | |
| void | setColumnHeaderFont (FXFont *fnt) |
| Set column header font. | |
| FXFont * | getColumnHeaderFont () const |
| Return column header font. | |
| void | setRowHeaderFont (FXFont *fnt) |
| Set row header font. | |
| FXFont * | getRowHeaderFont () const |
| Return row header font. | |
| void | setColumnHeaderHeight (FXint h) |
| Change column header height. | |
| FXint | getColumnHeaderHeight () const |
| Return column header height. | |
| void | setRowHeaderWidth (FXint w) |
| Change row header width. | |
| FXint | getRowHeaderWidth () const |
| Return row header width. | |
| FXint | getColumnX (FXint col) const |
| Get X coordinate of column. | |
| FXint | getRowY (FXint row) const |
| Get Y coordinate of row. | |
| virtual void | setColumnWidth (FXint col, FXint cwidth) |
| Change column width. | |
| FXint | getColumnWidth (FXint col) const |
| Get column width. | |
| virtual void | setRowHeight (FXint row, FXint rheight) |
| Change row height. | |
| FXint | getRowHeight (FXint row) const |
| Get row height. | |
| void | setDefColumnWidth (FXint cwidth) |
| Change default column width. | |
| FXint | getDefColumnWidth () const |
| Get default column width. | |
| void | setDefRowHeight (FXint rheight) |
| Change default row height. | |
| FXint | getDefRowHeight () const |
| Get default row height. | |
| FXint | getMinRowHeight (FXint r) const |
| Return minimum row height. | |
| FXint | getMinColumnWidth (FXint c) const |
| Return minimum column width. | |
| void | fitRowsToContents (FXint row, FXint nr=1) |
| Fit row heights to contents. | |
| void | fitColumnsToContents (FXint col, FXint nc=1) |
| Fit column widths to contents. | |
| void | setColumnText (FXint index, const FXString &text) |
| Change column header text. | |
| FXString | getColumnText (FXint index) const |
| Return text of column header at index. | |
| void | setRowText (FXint index, const FXString &text) |
| Change row header text. | |
| FXString | getRowText (FXint index) const |
| Return text of row header at index. | |
| void | setColumnIcon (FXint index, FXIcon *icon) |
| Change column header icon. | |
| FXIcon * | getColumnIcon (FXint index) const |
| Return icon of column header at index. | |
| void | setRowIcon (FXint index, FXIcon *icon) |
| Change row header icon. | |
| FXIcon * | getRowIcon (FXint index) const |
| Return icon of row header at index. | |
| void | setColumnTipText (FXint index, const FXString &text) |
| Change column header tip text. | |
| FXString | getColumnTipText (FXint index) const |
| Return tip text of column header at index. | |
| void | setRowTipText (FXint index, const FXString &text) |
| Change row header tip text. | |
| FXString | getRowTipText (FXint index) const |
| Return tip text of row header at index. | |
| void | setColumnIconPosition (FXint index, FXuint m) |
| Change column header icon position, e.g. FXHeaderItem::BEFORE, etc. | |
| FXuint | getColumnIconPosition (FXint index) const |
| Return icon position of column header at index. | |
| void | setRowIconPosition (FXint index, FXuint m) |
| Change row header icon position, e.g. FXHeaderItem::BEFORE, etc. | |
| FXuint | getRowIconPosition (FXint index) const |
| Return icon position of row header at index. | |
| void | setColumnJustify (FXint index, FXuint justify) |
| Change column header justify, e.g. FXHeaderItem::RIGHT, etc. | |
| FXuint | getColumnJustify (FXint index) const |
| Return justify of column header at index. | |
| void | setRowJustify (FXint index, FXuint justify) |
| Change row header justify, e.g. FXHeaderItem::RIGHT, etc. | |
| FXuint | getRowJustify (FXint index) const |
| Return justify of row header at index. | |
| void | setItemText (FXint r, FXint c, const FXString &text, FXbool notify=false) |
| Modify cell text. | |
| FXString | getItemText (FXint r, FXint c) const |
| Return cell text. | |
| void | setItemIcon (FXint r, FXint c, FXIcon *icon, FXbool owned=false, FXbool notify=false) |
| Modify cell icon, deleting the old icon if it was owned. | |
| FXIcon * | getItemIcon (FXint r, FXint c) const |
| Return cell icon. | |
| void | setItemData (FXint r, FXint c, void *ptr) |
| Modify cell user-data. | |
| void * | getItemData (FXint r, FXint c) const |
| void | extractText (FXchar *&text, FXint &size, FXint startrow, FXint endrow, FXint startcol, FXint endcol, const FXchar *cs="\t", const FXchar *rs="\n") const |
| Extract cells from given range as text, each column separated by a string cs, and each row separated by a string rs. | |
| void | extractText (FXString &text, FXint startrow, FXint endrow, FXint startcol, FXint endcol, const FXchar *cs="\t", const FXchar *rs="\n") const |
| void | overlayText (FXint startrow, FXint endrow, FXint startcol, FXint endcol, const FXchar *text, FXint size, const FXchar *cs="\t,", const FXchar *rs="\n", FXbool notify=false) |
| Overlay text over given cell range; the text is interpreted as a number of columns separated by a character from the set cs, and a number of rows separated by a character from the set rs. | |
| void | overlayText (FXint startrow, FXint endrow, FXint startcol, FXint endcol, const FXString &text, const FXchar *cs="\t,", const FXchar *rs="\n", FXbool notify=false) |
| void | countText (FXint &nr, FXint &nc, const FXchar *text, FXint size, const FXchar *cs="\t,", const FXchar *rs="\n") const |
| Determine the number of rows and columns in a block of text where columns are separated by characters from the set cs, and rows are separated by characters from the set rs. | |
| void | countText (FXint &nr, FXint &nc, const FXString &text, const FXchar *cs="\t,", const FXchar *rs="\n") const |
| FXbool | isItemSpanning (FXint r, FXint c) const |
| Return true if its a spanning cell. | |
| void | updateRange (FXint sr, FXint er, FXint sc, FXint ec) const |
| Repaint cells between grid lines sr,er and grid lines sc,ec. | |
| void | updateItem (FXint r, FXint c) const |
| Repaint cell at r,c. | |
| virtual FXbool | enableItem (FXint r, FXint c) |
| Enable item. | |
| virtual FXbool | disableItem (FXint r, FXint c) |
| Disable item. | |
| FXbool | isItemEnabled (FXint r, FXint c) const |
| Is item enabled and editable. | |
| void | setItemJustify (FXint r, FXint c, FXuint justify) |
| Change item justification. | |
| FXuint | getItemJustify (FXint r, FXint c) const |
| Return item justification. | |
| void | setItemIconPosition (FXint r, FXint c, FXuint m) |
| Change relative position of icon and text of item. | |
| FXuint | getItemIconPosition (FXint r, FXint c) const |
| Return relative icon and text position. | |
| void | setItemBorders (FXint r, FXint c, FXuint borders) |
| Change item borders style. | |
| FXuint | getItemBorders (FXint r, FXint c) const |
| Return item border style. | |
| void | setItemStipple (FXint r, FXint c, FXStipplePattern pat) |
| Change item background stipple style. | |
| FXStipplePattern | getItemStipple (FXint r, FXint c) const |
| return item background stipple style | |
| virtual void | setCurrentItem (FXint r, FXint c, FXbool notify=false) |
| Change current item. | |
| FXint | getCurrentRow () const |
| Get row number of current item. | |
| FXint | getCurrentColumn () const |
| Get column number of current item. | |
| FXbool | isItemCurrent (FXint r, FXint c) const |
| Is item current. | |
| void | setAnchorItem (FXint r, FXint c) |
| Change anchor item. | |
| FXint | getAnchorRow () const |
| Get row number of anchor item. | |
| FXint | getAnchorColumn () const |
| Get column number of anchor item. | |
| FXint | getSelStartRow () const |
| Get selection start row; returns -1 if no selection. | |
| FXint | getSelStartColumn () const |
| Get selection start column; returns -1 if no selection. | |
| FXint | getSelEndRow () const |
| Get selection end row; returns -1 if no selection. | |
| FXint | getSelEndColumn () const |
| Get selection end column; returns -1 if no selection. | |
| FXbool | isItemSelected (FXint r, FXint c) const |
| Is cell selected. | |
| FXbool | isRowSelected (FXint r) const |
| Is row of cells selected. | |
| FXbool | isColumnSelected (FXint c) const |
| Is column selected. | |
| FXbool | isAnythingSelected () const |
| Is anything selected. | |
| virtual FXbool | selectRow (FXint row, FXbool notify=false) |
| Select a row. | |
| virtual FXbool | selectColumn (FXint col, FXbool notify=false) |
| Select a column. | |
| virtual FXbool | selectRange (FXint startrow, FXint endrow, FXint startcol, FXint endcol, FXbool notify=false) |
| Select range. | |
| virtual FXbool | extendSelection (FXint r, FXint c, FXbool notify=false) |
| Extend selection. | |
| virtual FXbool | killSelection (FXbool notify=false) |
| Kill selection. | |
| void | setFont (FXFont *fnt) |
| Change font. | |
| FXFont * | getFont () const |
| Return current font. | |
| FXColor | getTextColor () const |
| Obtain colors of various parts. | |
| FXColor | getBaseColor () const |
| FXColor | getHiliteColor () const |
| FXColor | getShadowColor () const |
| FXColor | getBorderColor () const |
| FXColor | getSelBackColor () const |
| FXColor | getSelTextColor () const |
| FXColor | getGridColor () const |
| FXColor | getStippleColor () const |
| FXColor | getCellBorderColor () const |
| void | setTextColor (FXColor clr) |
| Change colors of various parts. | |
| void | setBaseColor (FXColor clr) |
| void | setHiliteColor (FXColor clr) |
| void | setShadowColor (FXColor clr) |
| void | setBorderColor (FXColor clr) |
| void | setSelBackColor (FXColor clr) |
| void | setSelTextColor (FXColor clr) |
| void | setGridColor (FXColor clr) |
| void | setStippleColor (FXColor clr) |
| void | setCellBorderColor (FXColor clr) |
| void | setCellColor (FXint r, FXint c, FXColor clr) |
| Change cell background color for even/odd rows/columns. | |
| FXColor | getCellColor (FXint r, FXint c) const |
| Obtain cell background color for even/odd rows/columns. | |
| void | setCellBorderWidth (FXint borderwidth) |
| Change cell border width. | |
| FXint | getCellBorderWidth () const |
| Return cell border width. | |
| void | setTableStyle (FXuint style) |
| Change table style. | |
| FXuint | getTableStyle () const |
| Return table style. | |
| void | setColumnRenumbering (FXbool flag) |
| Set column renumbering. | |
| FXbool | getColumnRenumbering () const |
| Get column renumbering. | |
| void | setRowRenumbering (FXbool flag) |
| Set row renumbering. | |
| FXbool | getRowRenumbering () const |
| Get row renumbering. | |
| void | setHelpText (const FXString &text) |
| Change help text. | |
| const FXString & | getHelpText () const |
| virtual void | save (FXStream &store) const |
| Serialize. | |
| virtual void | load (FXStream &store) |
| Load from a stream. | |
Static Public Attributes | |
| static FXDragType | csvType |
| static const FXchar | csvTypeName [] |
Protected Types | |
| enum | { MOUSE_NONE, MOUSE_SCROLL, MOUSE_DRAG, MOUSE_SELECT } |
Protected Member Functions | |
| FXint | startRow (FXint row, FXint col) const |
| FXint | startCol (FXint row, FXint col) const |
| FXint | endRow (FXint row, FXint col) const |
| FXint | endCol (FXint row, FXint col) const |
| void | spanningRange (FXint &sr, FXint &er, FXint &sc, FXint &ec, FXint anchrow, FXint anchcol, FXint currow, FXint curcol) |
| virtual void | moveContents (FXint x, FXint y) |
| virtual void | drawCell (FXDC &dc, FXint sr, FXint er, FXint sc, FXint ec) |
| virtual void | drawRange (FXDC &dc, FXint rlo, FXint rhi, FXint clo, FXint chi) |
| virtual void | drawHGrid (FXDC &dc, FXint rlo, FXint rhi, FXint clo, FXint chi) |
| virtual void | drawVGrid (FXDC &dc, FXint rlo, FXint rhi, FXint clo, FXint chi) |
| virtual void | drawContents (FXDC &dc, FXint x, FXint y, FXint w, FXint h) |
| virtual FXTableItem * | createItem (const FXString &text, FXIcon *icon, void *ptr) |
| virtual FXWindow * | getControlForItem (FXint r, FXint c) |
| virtual void | setItemFromControl (FXint r, FXint c, FXWindow *control) |
| virtual void | updateColumnNumbers (FXint lo, FXint hi) |
| virtual void | updateRowNumbers (FXint lo, FXint hi) |
Protected Attributes | |
| FXHeader * | colHeader |
| FXHeader * | rowHeader |
| FXButton * | cornerButton |
| FXTableItem ** | cells |
| FXWindow * | editor |
| FXFont * | font |
| FXint | nrows |
| FXint | ncols |
| FXint | visiblerows |
| FXint | visiblecols |
| FXint | margintop |
| FXint | marginbottom |
| FXint | marginleft |
| FXint | marginright |
| FXColor | textColor |
| FXColor | baseColor |
| FXColor | hiliteColor |
| FXColor | shadowColor |
| FXColor | borderColor |
| FXColor | selbackColor |
| FXColor | seltextColor |
| FXColor | gridColor |
| FXColor | stippleColor |
| FXColor | cellBorderColor |
| FXint | cellBorderWidth |
| FXColor | cellBackColor [2][2] |
| FXint | defColWidth |
| FXint | defRowHeight |
| FXTablePos | current |
| FXTablePos | anchor |
| FXTableRange | input |
| FXTableRange | selection |
| FXString | clipped |
| FXbool | hgrid |
| FXbool | vgrid |
| FXuchar | mode |
| FXint | grabx |
| FXint | graby |
| FXint | rowcol |
| FXString | help |
The Table widget displays a table of items, each with a text and optional icon.
A column Header control provide captions for each column, and a row Header control provides captions for each row. Columns are resizable by means of the column Header control if the TABLE_COL_SIZABLE option is passed. Likewise, rows in the table are resizable if the TABLE_ROW_SIZABLE option is specified. An entire row (column) can be selected by clicking on the a button in the row (column) Header control. Passing TABLE_NO_COLSELECT disables column selection, and passing TABLE_NO_ROWSELECT disables column selection. When TABLE_COL_RENUMBER is specified, columns are automatically renumbered when columns are added or removed. Similarly, TABLE_ROW_RENUMBER will cause row numbers to be recalculated automatically when rows are added or removed. To disable editing of cells in the table, the TABLE_READONLY can be specified. Cells in the table may or may not have items in them. When populating a cell for the first time, an item will be automatically created if necessary. Thus, a cell in the table takes no space unless it has actual contents. Moreover, a contiguous, rectangular region of cells in the table may refer to one single item; in that case, the item will be stretched to cover all the cells in the region, and no grid lines will be drawn interior to the spanning item. The Table widget issues SEL_SELECTED or SEL_DESELECTED when cells are selected or deselected, respectively. The table position affected is passed along as the 3rd parameter of these messages. Whenever the current (focus) item is changed, a SEL_CHANGED message is sent with the new table position as a parameter. When items are added to the table, a SEL_INSERTED message is sent, with the table range of the newly added cells as the parameter in the message. When items are removed from the table, a SEL_DELETED message is sent prior to the removal of the items, and the table range of the removed cells is passed as a parameter. A SEL_REPLACED message is sent when the contents of a cell are changed, either through editing or by other means; the parameter is the range of affected cells. This message is sent prior to the change. SEL_CLICKED, SEL_DOUBLECLICKED, and SEL_TRIPLECLICKED messages are sent when a cell is clicked, double-clicked, or triple-clicked, respectively. A SEL_COMMAND is sent when an enabled item is clicked inside the table.
| FX::FXTable::FXTable | ( | FXComposite * | p, |
| 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 |
||
| ) |
Construct a new table.
The table is initially empty, and reports a default size based on the scroll areas's scrollbar placement policy.
| virtual FXbool FX::FXTable::acceptInput | ( | FXbool | notify = false | ) | [virtual] |
End input mode and accept the new value from the control.
The item in the cell will be set to the value from the control, and the control will be deleted. If true is passed, a SEL_REPLACED callback will be generated to signify to the target that this call has a new value. You can also accept the input by sending the table an ID_ACCEPT_INPUT message. Return true if the new value of the cell has been accepted.
| virtual FXbool FX::FXTable::cancelInput | ( | ) | [virtual] |
Cancel input mode.
The input control is immediately deleted and the cell will retain its old value. You can also cancel input mode by sending the table an ID_CANCEL_INPUT message. Return true if editing of the cell has been cancelled.
| FXint FX::FXTable::colAtX | ( | FXint | x | ) | const |
Determine column containing x.
Returns -1 if x left of first column, and ncols if x right of last column; otherwise, returns column in table containing x.
| void FX::FXTable::overlayText | ( | FXint | startrow, |
| FXint | endrow, | ||
| FXint | startcol, | ||
| FXint | endcol, | ||
| const FXchar * | text, | ||
| FXint | size, | ||
| const FXchar * | cs = "\t,", |
||
| const FXchar * | rs = "\n", |
||
| FXbool | notify = false |
||
| ) |
Overlay text over given cell range; the text is interpreted as a number of columns separated by a character from the set cs, and a number of rows separated by a character from the set rs.
Cells outside the given cell range are unaffected.
| FXint FX::FXTable::rowAtY | ( | FXint | y | ) | const |
Determine row containing y.
Returns -1 if y above first row, and nrows if y below last row; otherwise, returns row in table containing y.
| void FX::FXTable::setColumnHeaderMode | ( | FXuint | hint = LAYOUT_FIX_HEIGHT | ) |
Change column header height mode to fixed or variable.
In variable height mode, the column header will size to fit the contents in it. In fixed mode, the size is explicitly set using setColumnHeaderHeight(). The default is to determine the column header height based on the contents, using the LAYOUT_MIN_HEIGHT option.
| void FX::FXTable::setItemBorders | ( | FXint | r, |
| FXint | c, | ||
| FXuint | borders | ||
| ) |
Change item borders style.
Borders on each side of the item can be turned controlled individually using FXTableItem::LBORDER, FXTableItem::RBORDER, FXTableItem::TBORDER and FXTableItem::BBORDER.
| void FX::FXTable::setItemIconPosition | ( | FXint | r, |
| FXint | c, | ||
| FXuint | m | ||
| ) |
Change relative position of icon and text of item.
Passing FXTableItem::BEFORE or FXTableItem::AFTER places the icon before or after the text, and passing FXTableItem::ABOVE or FXTableItem::BELOW places it above or below the text, respectively. The default is 0 which places the text on top of the icon.
| void FX::FXTable::setItemJustify | ( | FXint | r, |
| FXint | c, | ||
| FXuint | justify | ||
| ) |
Change item justification.
Horizontal justification is controlled by passing FXTableItem::RIGHT, FXTableItem::LEFT, or FXTableItem::CENTER_X. Vertical justification is controlled by FXTableItem::TOP, FXTableItem::BOTTOM, or FXTableItem::CENTER_Y. The default is a combination of FXTableItem::RIGHT and FXTableItem::CENTER_Y.
| void FX::FXTable::setRowHeaderMode | ( | FXuint | hint = LAYOUT_FIX_WIDTH | ) |
Change row header width mode to fixed or variable.
In variable width mode, the row header will size to fit the contents in it. In fixed mode, the size is explicitly set using setRowHeaderWidth(). The default is to determine the column header height based on the contents, using the LAYOUT_MIN_WIDTH option.
| virtual FXbool FX::FXTable::startInput | ( | FXint | row, |
| FXint | col | ||
| ) | [virtual] |
Start input mode for the cell at the given position.
An input control is created which is used to edit the cell; it is filled by the original item's contents if the cell contained an item. You can enter input mode also by sending the table an ID_START_INPUT message. Return true if editing of the cell has been started.
|
|