support for RTTI

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23061 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2003-08-21 06:33:51 +00:00
parent c90b8250d9
commit b0a877ec93
3 changed files with 78 additions and 7 deletions

View File

@@ -3759,7 +3759,23 @@ static int CoordToRowOrCol(int coord, int defaultDist, int minDist,
m_rowBottoms, m_numRows, TRUE)
/////////////////////////////////////////////////////////////////////
#if wxUSE_EXTENDED_RTTI
IMPLEMENT_DYNAMIC_CLASS_XTI(wxGrid, wxScrolledWindow,"wx/grid.h")
WX_BEGIN_PROPERTIES_TABLE(wxGrid)
WX_END_PROPERTIES_TABLE()
WX_BEGIN_HANDLERS_TABLE(wxGrid)
WX_END_HANDLERS_TABLE()
WX_CONSTRUCTOR_5( wxGrid , wxWindow* , Parent , wxWindowID , Id , wxPoint , Position , wxSize , Size , long , WindowStyle )
/*
TODO : Expose more information of a list's layout etc. via appropriate objects (<28> la NotebookPageInfo)
*/
#else
IMPLEMENT_DYNAMIC_CLASS( wxGrid, wxScrolledWindow )
#endif
BEGIN_EVENT_TABLE( wxGrid, wxScrolledWindow )
EVT_PAINT( wxGrid::OnPaint )
@@ -3769,6 +3785,16 @@ BEGIN_EVENT_TABLE( wxGrid, wxScrolledWindow )
EVT_ERASE_BACKGROUND( wxGrid::OnEraseBackground )
END_EVENT_TABLE()
wxGrid::wxGrid()
{
// in order to make sure that a size event is not
// trigerred in a unfinished state
m_cornerLabelWin = NULL ;
m_rowLabelWin = NULL ;
m_colLabelWin = NULL ;
m_gridWin = NULL ;
}
wxGrid::wxGrid( wxWindow *parent,
wxWindowID id,
const wxPoint& pos,
@@ -3782,6 +3808,23 @@ wxGrid::wxGrid( wxWindow *parent,
Create();
}
bool wxGrid::Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos, const wxSize& size,
long style, const wxString& name)
{
if (!wxScrolledWindow::Create(parent, id, pos, size,
style | wxWANTS_CHARS , name))
return FALSE;
m_colMinWidths =GRID_HASH_SIZE ;
m_rowMinHeights = GRID_HASH_SIZE ;
Create() ;
return TRUE;
}
wxGrid::~wxGrid()
{
@@ -4191,6 +4234,11 @@ void wxGrid::CalcDimensions()
void wxGrid::CalcWindowSizes()
{
// escape if the window is has not been fully created yet
if ( m_cornerLabelWin == NULL )
return ;
int cw, ch;
GetClientSize( &cw, &ch );