// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#include "wx/defs.h"
-
#ifndef __WXGRID_H__
#define __WXGRID_H__
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma interface "grid.h"
-#endif
-
#include "wx/hashmap.h"
#include "wx/panel.h"
#include "wx/scrolwin.h"
protected:
// set the text colours before drawing
- void SetTextColoursAndFont(wxGrid& grid,
- wxGridCellAttr& attr,
+ void SetTextColoursAndFont(const wxGrid& grid,
+ const wxGridCellAttr& attr,
wxDC& dc,
bool isSelected);
// calc the string extent for given string/font
- wxSize DoGetBestSize(wxGridCellAttr& attr,
+ wxSize DoGetBestSize(const wxGridCellAttr& attr,
wxDC& dc,
const wxString& text);
};
{ return new wxGridCellNumberRenderer; }
protected:
- wxString GetString(wxGrid& grid, int row, int col);
+ wxString GetString(const wxGrid& grid, int row, int col);
};
class WXDLLIMPEXP_ADV wxGridCellFloatRenderer : public wxGridCellStringRenderer
virtual wxGridCellRenderer *Clone() const;
protected:
- wxString GetString(wxGrid& grid, int row, int col);
+ wxString GetString(const wxGrid& grid, int row, int col);
private:
// formatting parameters
bool HasEditor() const { return m_editor != NULL; }
bool HasReadWriteMode() const { return m_isReadOnly != Unset; }
bool HasOverflowMode() const { return m_overflow != UnsetOverflow; }
+ bool HasSize() const { return m_sizeRows != 1 || m_sizeCols != 1; }
const wxColour& GetTextColour() const;
const wxColour& GetBackgroundColour() const;
//
void StringToLines( const wxString& value, wxArrayString& lines );
- void GetTextBoxSize( wxDC& dc,
+ void GetTextBoxSize( const wxDC& dc,
const wxArrayString& lines,
long *width, long *height );