// NULL (because the table has a type that the grid does not have in its
// registry), then the grid's default editor or renderer is used.
// NULL (because the table has a type that the grid does not have in its
// registry), then the grid's default editor or renderer is used.
// Split multi-line text up into an array of strings.
// Any existing contents of the string array are preserved.
//
// Split multi-line text up into an array of strings.
// Any existing contents of the string array are preserved.
//
void wxGrid::GetTextBoxSize( const wxDC& dc,
const wxArrayString& lines,
void wxGrid::GetTextBoxSize( const wxDC& dc,
const wxArrayString& lines,
{
return CoordToRowOrCol(y, m_defaultRowHeight,
m_minAcceptableRowHeight, m_rowBottoms, m_numRows, false);
}
{
return CoordToRowOrCol(y, m_defaultRowHeight,
m_minAcceptableRowHeight, m_rowBottoms, m_numRows, false);
}
{
wxRect rect( -1, -1, -1, -1 );
{
wxRect rect( -1, -1, -1, -1 );
{
wxCHECK_MSG( row >= 0 && row < m_numRows, 0, _T("invalid row index") );
return GetRowHeight(row);
}
{
wxCHECK_MSG( row >= 0 && row < m_numRows, 0, _T("invalid row index") );
return GetRowHeight(row);
}
// access to cell attributes
// ----------------------------------------------------------------------------
// access to cell attributes
// ----------------------------------------------------------------------------
{
wxGridCellAttr *attr = GetCellAttr(row, col);
wxColour colour = attr->GetBackgroundColour();
{
wxGridCellAttr *attr = GetCellAttr(row, col);
wxColour colour = attr->GetBackgroundColour();
{
wxGridCellAttr *attr = GetCellAttr(row, col);
wxColour colour = attr->GetTextColour();
{
wxGridCellAttr *attr = GetCellAttr(row, col);
wxColour colour = attr->GetTextColour();
{
wxGridCellAttr *attr = GetCellAttr(row, col);
wxFont font = attr->GetFont();
{
wxGridCellAttr *attr = GetCellAttr(row, col);
wxFont font = attr->GetFont();
-void wxGrid::GetCellAlignment( int row, int col, int *horiz, int *vert )
+void wxGrid::GetCellAlignment( int row, int col, int *horiz, int *vert ) const
{
wxGridCellAttr *attr = GetCellAttr(row, col);
attr->GetAlignment(horiz, vert);
attr->DecRef();
}
{
wxGridCellAttr *attr = GetCellAttr(row, col);
attr->GetAlignment(horiz, vert);
attr->DecRef();
}
{
wxGridCellAttr *attr = GetCellAttr(row, col);
bool allow = attr->GetOverflow();
{
wxGridCellAttr *attr = GetCellAttr(row, col);
bool allow = attr->GetOverflow();
-void wxGrid::GetCellSize( int row, int col, int *num_rows, int *num_cols )
+void wxGrid::GetCellSize( int row, int col, int *num_rows, int *num_cols ) const
{
wxGridCellAttr *attr = GetCellAttr(row, col);
attr->GetSize( num_rows, num_cols );
attr->DecRef();
}
{
wxGridCellAttr *attr = GetCellAttr(row, col);
attr->GetSize( num_rows, num_cols );
attr->DecRef();
}
{
wxGridCellAttr* attr = GetCellAttr(row, col);
wxGridCellRenderer* renderer = attr->GetRenderer(this, row, col);
{
wxGridCellAttr* attr = GetCellAttr(row, col);
wxGridCellRenderer* renderer = attr->GetRenderer(this, row, col);
{
wxGridCellAttr* attr = GetCellAttr(row, col);
wxGridCellEditor* editor = attr->GetEditor(this, row, col);
{
wxGridCellAttr* attr = GetCellAttr(row, col);
wxGridCellEditor* editor = attr->GetEditor(this, row, col);
// attribute support: cache, automatic provider creation, ...
// ----------------------------------------------------------------------------
// attribute support: cache, automatic provider creation, ...
// ----------------------------------------------------------------------------
- m_defaultColWidth = wxMax( width, m_minAcceptableColWidth );
+ // we dont allow zero default column width
+ m_defaultColWidth = wxMax( wxMax( width, m_minAcceptableColWidth ), 1 );
// in device coords clipped to the client size of the grid window.
//
wxRect wxGrid::BlockToDeviceRect( const wxGridCellCoords &topLeft,
// in device coords clipped to the client size of the grid window.
//
wxRect wxGrid::BlockToDeviceRect( const wxGridCellCoords &topLeft,