27 #ifndef FXSCROLLAREA_H
83 FXTableItem& operator=(const FXTableItem&);
85 FXTableItem():icon(
NULL),data(NULL),state(0){}
95 SELECTED = 0x00000001,
97 DISABLED = 0x00000004,
98 DRAGGABLE = 0x00000008,
99 RESERVED1 = 0x00000010,
100 RESERVED2 = 0x00000020,
101 ICONOWNED = 0x00000040,
112 LBORDER = 0x00200000,
113 RBORDER = 0x00400000,
114 TBORDER = 0x00800000,
123 virtual void setText(
const FXString& txt);
126 virtual FXString getText()
const {
return label; }
132 virtual FXIcon* getIcon()
const {
return icon; }
135 void setData(
void* ptr){ data=ptr; }
138 void* getData()
const {
return data; }
141 virtual void setFocus(
FXbool focus);
144 FXbool hasFocus()
const {
return (state&FOCUS)!=0; }
147 virtual void setSelected(
FXbool selected);
150 FXbool isSelected()
const {
return (state&SELECTED)!=0; }
153 virtual void setEnabled(
FXbool enabled);
156 FXbool isEnabled()
const {
return (state&DISABLED)==0; }
159 virtual void setDraggable(
FXbool draggable);
162 FXbool isDraggable()
const {
return (state&DRAGGABLE)!=0; }
165 virtual void setJustify(
FXuint justify=RIGHT|CENTER_Y);
168 FXuint getJustify()
const {
return state&(RIGHT|LEFT|TOP|BOTTOM); }
171 virtual void setIconPosition(
FXuint mode);
174 FXuint getIconPosition()
const {
return state&(BEFORE|AFTER|ABOVE|BELOW); }
177 virtual void setBorders(
FXuint borders=0);
180 FXuint getBorders()
const {
return state&(LBORDER|RBORDER|TBORDER|BBORDER); }
192 virtual void setFromControl(
FXWindow *control);
201 virtual void create();
204 virtual void detach();
207 virtual void destroy();
210 virtual void save(
FXStream& store)
const;
221 class FXAPI FXComboTableItem :
public FXTableItem {
227 FXComboTableItem& operator=(const FXComboTableItem&);
242 void setSelections(
const FXString& strings);
245 const FXString& getSelections()
const {
return selections; }
312 FXint cellBorderWidth;
330 static const
FXchar csvTypeName[];
348 virtual
void updateRowNumbers(
FXint lo,
FXint hi);
455 ID_SELECT_COLUMN_INDEX,
491 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);
494 virtual FXint getDefaultWidth();
497 virtual FXint getDefaultHeight();
500 virtual FXint getContentWidth();
503 virtual FXint getContentHeight();
506 virtual void create();
509 virtual void detach();
512 virtual void layout();
515 virtual void recalc();
518 virtual bool canFocus()
const;
521 virtual void setFocus();
524 virtual void killFocus();
527 virtual void changeFocus(
FXWindow *child);
530 FXButton* getCornerButton()
const {
return cornerButton; }
533 FXHeader* getColumnHeader()
const {
return colHeader; }
536 FXHeader* getRowHeader()
const {
return rowHeader; }
539 void setVisibleRows(
FXint nvrows);
542 FXint getVisibleRows()
const {
return visiblerows; }
545 void setVisibleColumns(
FXint nvcols);
548 FXint getVisibleColumns()
const {
return visiblecols; }
551 FXbool isEditable()
const;
560 FXbool isHorzGridShown()
const {
return hgrid; }
566 FXbool isVertGridShown()
const {
return vgrid; }
569 FXint getNumRows()
const {
return nrows; }
572 FXint getNumColumns()
const {
return ncols; }
575 void setMarginTop(
FXint pt);
578 FXint getMarginTop()
const {
return margintop; }
581 void setMarginBottom(
FXint pb);
584 FXint getMarginBottom()
const {
return marginbottom; }
587 void setMarginLeft(
FXint pl);
590 FXint getMarginLeft()
const {
return marginleft; }
593 void setMarginRight(
FXint pr);
596 FXint getMarginRight()
const {
return marginright; }
612 virtual void cancelInput();
672 virtual void makePositionVisible(
FXint r,
FXint c);
686 FXuint getColumnHeaderMode()
const;
697 FXuint getRowHeaderMode()
const;
700 void setColumnHeaderFont(
FXFont* fnt);
703 FXFont* getColumnHeaderFont()
const;
706 void setRowHeaderFont(
FXFont* fnt);
709 FXFont* getRowHeaderFont()
const;
712 void setColumnHeaderHeight(
FXint h);
715 FXint getColumnHeaderHeight()
const;
718 void setRowHeaderWidth(
FXint w);
721 FXint getRowHeaderWidth()
const;
730 virtual void setColumnWidth(
FXint col,
FXint cwidth);
736 virtual void setRowHeight(
FXint row,
FXint rheight);
742 void setDefColumnWidth(
FXint cwidth);
745 FXint getDefColumnWidth()
const {
return defColWidth; }
748 void setDefRowHeight(
FXint rheight);
751 FXint getDefRowHeight()
const {
return defRowHeight; }
763 void fitColumnsToContents(
FXint col,
FXint nc=1);
766 void setColumnText(
FXint index,
const FXString& text);
769 FXString getColumnText(
FXint index)
const;
772 void setRowText(
FXint index,
const FXString& text);
775 FXString getRowText(
FXint index)
const;
778 void setColumnIcon(
FXint index,FXIcon* icon);
781 FXIcon* getColumnIcon(
FXint index)
const;
784 void setRowIcon(
FXint index,FXIcon* icon);
787 FXIcon* getRowIcon(
FXint index)
const;
790 void setColumnIconPosition(
FXint index,
FXuint mode);
915 FXint getCurrentRow()
const {
return current.row; }
918 FXint getCurrentColumn()
const {
return current.col; }
927 FXint getAnchorRow()
const {
return anchor.row; }
930 FXint getAnchorColumn()
const {
return anchor.col; }
933 FXint getSelStartRow()
const {
return selection.fm.row; }
936 FXint getSelStartColumn()
const {
return selection.fm.col; }
939 FXint getSelEndRow()
const {
return selection.to.row; }
942 FXint getSelEndColumn()
const {
return selection.to.col; }
954 FXbool isAnythingSelected()
const;
972 void setFont(FXFont* fnt);
975 FXFont* getFont()
const {
return font; }
978 FXColor getTextColor()
const {
return textColor; }
979 FXColor getBaseColor()
const {
return baseColor; }
980 FXColor getHiliteColor()
const {
return hiliteColor; }
981 FXColor getShadowColor()
const {
return shadowColor; }
982 FXColor getBorderColor()
const {
return borderColor; }
983 FXColor getSelBackColor()
const {
return selbackColor; }
984 FXColor getSelTextColor()
const {
return seltextColor; }
985 FXColor getGridColor()
const {
return gridColor; }
986 FXColor getStippleColor()
const {
return stippleColor; }
987 FXColor getCellBorderColor()
const {
return cellBorderColor; }
990 void setTextColor(
FXColor clr);
991 void setBaseColor(
FXColor clr);
992 void setHiliteColor(
FXColor clr);
993 void setShadowColor(
FXColor clr);
994 void setBorderColor(
FXColor clr);
995 void setSelBackColor(
FXColor clr);
996 void setSelTextColor(
FXColor clr);
997 void setGridColor(
FXColor clr);
998 void setStippleColor(
FXColor clr);
999 void setCellBorderColor(
FXColor clr);
1008 void setCellBorderWidth(
FXint borderwidth);
1011 FXint getCellBorderWidth()
const {
return cellBorderWidth; }
1014 void setTableStyle(
FXuint style);
1017 FXuint getTableStyle()
const;
1020 void setColumnRenumbering(
FXbool flag);
1023 FXbool getColumnRenumbering()
const;
1026 void setRowRenumbering(
FXbool flag);
1029 FXbool getRowRenumbering()
const;
1032 void setHelpText(
const FXString& text){ help=text; }
1033 const FXString& getHelpText()
const {
return help; }
1036 virtual void save(FXStream& store)
const;
1037 virtual void load(FXStream& store);
FXVec2d lo(const FXVec2d &a, const FXVec2d &b)
Definition: FXVec2d.h:174
Combobox Item.
Definition: FXTable.h:222
Renumber columns.
Definition: FXTable.h:60
Item in table.
Definition: FXTable.h:86
Width fixed.
Definition: FXWindow.h:58
char FXchar
Definition: fxdefs.h:387
#define TRUE
Definition: fxdefs.h:32
Base class for all windows.
Definition: FXWindow.h:115
FXint row
Definition: FXTable.h:68
Definition: FXWindow.h:241
unsigned int FXuint
Definition: fxdefs.h:396
Disallow row selections.
Definition: FXTable.h:58
FXuint FXSelector
Association key.
Definition: FXObject.h:53
Columns are resizable.
Definition: FXTable.h:55
#define FXAPI
Definition: fxdefs.h:122
FXuchar FXbool
Definition: fxdefs.h:393
Base composite.
Definition: FXComposite.h:35
Rows are resizable.
Definition: FXTable.h:56
The Table widget displays a table of items, each with a text and optional icon.
Definition: FXTable.h:283
#define NULL
Definition: fxdefs.h:41
FXuint FXColor
Definition: fxdefs.h:454
Range of table cells.
Definition: FXTable.h:74
A stream is a way to serialize data and objects into a byte stream.
Definition: FXStream.h:99
Disallow column selections.
Definition: FXTable.h:57
Abstract Device Context.
Definition: FXDC.h:191
int FXint
Definition: fxdefs.h:397
FXStipplePattern
Stipple/dither patterns.
Definition: FXDC.h:119
An Icon is an image with two additional server-side resources: a shape bitmap, which is used to mask ...
Definition: FXIcon.h:45
Table is NOT editable.
Definition: FXTable.h:59
FXVec2d hi(const FXVec2d &a, const FXVec2d &b)
Definition: FXVec2d.h:175
FXint col
Definition: FXTable.h:69
height fixed
Definition: FXWindow.h:59
#define FALSE
Definition: fxdefs.h:35
FXTablePos to
Definition: FXTable.h:76
FXTablePos fm
Definition: FXTable.h:75
Object is the base class for all objects in FOX; in order to receive messages from the user interface...
Definition: FXObject.h:166
unsigned char FXuchar
Definition: fxdefs.h:392
Renumber rows.
Definition: FXTable.h:61
Position in table.
Definition: FXTable.h:67
FXID FXDragType
Definition: fxdefs.h:461
Font class.
Definition: FXFont.h:142
#define FXDECLARE(classname)
Macro to set up class declaration.
Definition: FXObject.h:92
FXString provides essential string manipulation capabilities.
Definition: FXString.h:33