Add wxGridCellRenderer::GetMaxBestSize()
This is another optimization, useful for the renderers that are used with the values of a fixed form or part of a limited set, as it is much faster to compute the best size for all values of the set rather than computing them for all the cells in the column.
This commit is contained in:
@@ -141,6 +141,10 @@ public:
|
||||
wxDC& dc,
|
||||
int row, int col) wxOVERRIDE;
|
||||
|
||||
virtual wxSize GetMaxBestSize(wxGrid& grid,
|
||||
wxGridCellAttr& attr,
|
||||
wxDC& dc) wxOVERRIDE;
|
||||
|
||||
virtual wxGridCellRenderer *Clone() const wxOVERRIDE
|
||||
{ return new wxGridCellBoolRenderer; }
|
||||
};
|
||||
@@ -175,6 +179,10 @@ public:
|
||||
wxDC& dc,
|
||||
int row, int col) wxOVERRIDE;
|
||||
|
||||
virtual wxSize GetMaxBestSize(wxGrid& grid,
|
||||
wxGridCellAttr& attr,
|
||||
wxDC& dc) wxOVERRIDE;
|
||||
|
||||
virtual wxGridCellRenderer *Clone() const wxOVERRIDE;
|
||||
|
||||
// output strptime()-like format string
|
||||
@@ -232,6 +240,10 @@ public:
|
||||
wxDC& dc,
|
||||
int row, int col) wxOVERRIDE;
|
||||
|
||||
virtual wxSize GetMaxBestSize(wxGrid& grid,
|
||||
wxGridCellAttr& attr,
|
||||
wxDC& dc) wxOVERRIDE;
|
||||
|
||||
virtual wxGridCellRenderer *Clone() const wxOVERRIDE;
|
||||
|
||||
// parameters string format is "item1[,item2[...,itemN]]" where itemN will
|
||||
|
Reference in New Issue
Block a user