Hosted by
|
To tell the truth - CoolGrid not finished and I have long list what todo.
Features:
- Modern implementations on Grid Control
- A lot of capabilities.
- Very flexible.
- Text,Edit,ComboBox - List,ComboBox - ready to use types of cell, you can easy add
your own cell.
- Implements sparse matrix for storing cells. This allows unlimited grid size.
ToDo:
A lot of features.
See examples how to use it.
Public functions:
TCoolGrid(TWindow* parent,int id,LPCTSTR title,int x, int y, int w, int h,TModule*
module = 0);
virtual ~TCoolGrid();
// Iterators that takes action class
TColumn* FirstThat(TColCondOperator& test);
TColumn* LastThat(TColCondOperator& test);
void ForEach(TColActionOperator& action);
TCell* FirstThat(TCellCondOperator& test);
TCell* LastThat(TCellCondOperator& test);
void ForEach(TCellActionOperator& action);
// High level functions
void SetCell(const TCellPos& pos, TCell& cell);
void RemoveCell(const TCellPos& pos);
void SetGridDim(uint cols, uint rows, int col_width=-1, int row_width=-1);
uint GetColCount()
uint GetRowCount()
void SetRowHeight(uint loc, uint height);
uint GetRowHeight(uint loc);
void SetColumnWidth(uint loc, uint width);
uint GetColumnWidth(uint loc);
bool SetFocusCell(const TCellPos& pos);
TCell* GetCell(const TCellPos& pos);
TCellPos Point2Pos(const TPoint& point);
void GetCellRect(const TCellPos& pos, TRect& rect);
void SetInPlaceEdit(TInPlaceEdit* edit);
TInPlaceEdit* GetInPlaceEdit()
void SetColumnEdit(int column, TInPlaceEdit* edit);
TInPlaceEdit* GetColumnEdit(int column);
void SetFont(const TFont& font);
TFont* GetFont()
void SetBoldFont(const TFont& font);
TFont* GetBoldFont()
void EnableVertHeader(bool enable=true);
bool IsVertHeader()
void EnableHorizHeader(bool enable=true);
bool IsHorizHeader()
TCellFunctor& GetCellBuilder()
TColFunctor& GetColBuilder()
void SetCellBuilder(TCellFunctor& func)
void SetColBuilder(TColFunctor& func)
void ShowInplaceEdit(uint key);
int GetHeaderWidth()
int GetHeaderHeight()
void SetHeaderWidth(int width)
void SetHeaderHeight(int height)
|