- protected:
- bool m_created;
-
- wxGridWindow *m_gridWin;
- wxGridRowLabelWindow *m_rowLabelWin;
- wxGridColLabelWindow *m_colLabelWin;
- wxGridCornerLabelWindow *m_cornerLabelWin;
-
- wxBoxSizer *m_mainSizer;
- wxBoxSizer *m_topSizer;
- wxBoxSizer *m_middleSizer;
-
- wxGridTableBase *m_table;
-
- int m_left;
- int m_top;
- int m_right;
- int m_bottom;
-
- int m_numRows;
- int m_numCols;
-
- wxGridCellCoords m_currentCellCoords;
- bool m_currentCellHighlighted;
-
- wxGridCellCoords m_selectedTopLeft;
- wxGridCellCoords m_selectedBottomRight;
-
- int m_defaultRowHeight;
- wxArrayInt m_rowHeights;
- wxArrayInt m_rowBottoms;
-
- int m_defaultColWidth;
- wxArrayInt m_colWidths;
- wxArrayInt m_colRights;
-
- int m_rowLabelWidth;
- int m_colLabelHeight;
-
- wxColour m_labelBackgroundColour;
- wxColour m_labelTextColour;
- wxFont m_labelFont;
-
- int m_rowLabelHorizAlign;
- int m_rowLabelVertAlign;
- int m_colLabelHorizAlign;
- int m_colLabelVertAlign;
-
- bool m_defaultRowLabelValues;
- bool m_defaultColLabelValues;
-
- wxColour m_gridLineColour;
- bool m_gridLinesEnabled;
-
- wxFont m_defaultCellFont;
-
- wxGridCellCoordsArray m_cellsExposed;
- wxArrayInt m_rowsExposed;
- wxArrayInt m_colsExposed;
- wxArrayInt m_rowLabelsExposed;
- wxArrayInt m_colLabelsExposed;
-
- bool m_inOnKeyDown;
- int m_batchCount;
-
- int m_cursorMode;
- enum { WXGRID_CURSOR_DEFAULT,
- WXGRID_CURSOR_SELECT_CELL,
- WXGRID_CURSOR_RESIZE_ROW,
- WXGRID_CURSOR_RESIZE_COL,
- WXGRID_CURSOR_SELECT_ROW,
- WXGRID_CURSOR_SELECT_COL
- };
-
- int m_dragLastPos;
- int m_dragRowOrCol;
- bool m_isDragging;
-
- wxGridCellCoords m_selectionStart;
-
- wxCursor m_rowResizeCursor;
- wxCursor m_colResizeCursor;
-
- bool m_editable; // applies to whole grid
- int m_editCtrlType; // for current cell
- wxWindow* m_cellEditCtrl;
- bool m_cellEditCtrlEnabled;
- wxWindow* m_topEditCtrl;
- bool m_topEditCtrlEnabled;
-
-
- void Create();
- void Init();
- void CalcDimensions();
- bool Redimension( wxGridTableMessage& );
-
-
- bool SendEvent( const wxEventType,
- int row, int col,
- wxMouseEvent& );
-
- bool SendEvent( const wxEventType,
- int row, int col );
-
-
- void OnPaint( wxPaintEvent& );
- void OnSize( wxSizeEvent& );
- void OnKeyDown( wxKeyEvent& );
-
-
- void SetCurrentCell( const wxGridCellCoords& coords );
- void SetCurrentCell( int row, int col )
- { SetCurrentCell( wxGridCellCoords(row, col) ); }
-
-
- // ------ functions to get/send data (see also public functions)
- //
- bool GetModelValues();
- bool SetModelValues();
-
-
- ////////////////////// Public section ////////////////////
-
- public: