]> git.saurik.com Git - wxWidgets.git/commitdiff
support for RTTI
authorStefan Csomor <csomor@advancedconcepts.ch>
Thu, 21 Aug 2003 06:33:51 +0000 (06:33 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Thu, 21 Aug 2003 06:33:51 +0000 (06:33 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23061 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/calctrl.cpp
src/generic/dirctrlg.cpp
src/generic/grid.cpp

index 8a4b397da29758bda2ade6f6fe2b725d93affb37..6bda1091048b93d0878c90f6ce2f5c06e00cb2c5 100644 (file)
@@ -104,7 +104,20 @@ BEGIN_EVENT_TABLE(wxYearSpinCtrl, wxSpinCtrl)
     EVT_SPINCTRL(-1, wxYearSpinCtrl::OnYearChange)
 END_EVENT_TABLE()
 
+#if wxUSE_EXTENDED_RTTI
+IMPLEMENT_DYNAMIC_CLASS_XTI(wxCalendarCtrl, wxControl,"wx/calctrl.h")
+
+WX_BEGIN_PROPERTIES_TABLE(wxCalendarCtrl)
+       WX_PROPERTY( Date,wxDateTime, SetDate , GetDate, )
+WX_END_PROPERTIES_TABLE()
+
+WX_BEGIN_HANDLERS_TABLE(wxCalendarCtrl)
+WX_END_HANDLERS_TABLE()
+
+WX_CONSTRUCTOR_6( wxCalendarCtrl , wxWindow* , Parent , wxWindowID , Id , wxDateTime , Date , wxPoint , Position , wxSize , Size , long , WindowStyle ) 
+#else
 IMPLEMENT_DYNAMIC_CLASS(wxCalendarCtrl, wxControl)
+#endif
 IMPLEMENT_DYNAMIC_CLASS(wxCalendarEvent, wxCommandEvent)
 
 // ----------------------------------------------------------------------------
index 45e2d8f4cef83d1d3191f86d74af94037210722e..c017d9f6d74cdc5324aed86834fd59942ebd4dd2 100644 (file)
@@ -428,14 +428,24 @@ bool wxDirItemData::HasFiles(const wxString& WXUNUSED(spec)) const
 // wxGenericDirCtrl
 //-----------------------------------------------------------------------------
 
-IMPLEMENT_DYNAMIC_CLASS(wxGenericDirCtrl, wxControl)
 
-/*
-TODO PROPERTIES
-       defaultfolder string
-       filter string
-       (long) defaultfilter)
-*/
+#if wxUSE_EXTENDED_RTTI
+IMPLEMENT_DYNAMIC_CLASS_XTI(wxGenericDirCtrl, wxControl,"wx/dirctrl.h")
+
+WX_BEGIN_PROPERTIES_TABLE(wxGenericDirCtrl)
+       WX_PROPERTY( DefaultPath , wxString , SetDefaultPath , GetDefaultPath  , )
+       WX_PROPERTY( Filter , wxString , SetFilter , GetFilter  , )
+       WX_PROPERTY( DefaultFilter , int , SetFilterIndex, GetFilterIndex, )
+WX_END_PROPERTIES_TABLE()
+
+WX_BEGIN_HANDLERS_TABLE(wxGenericDirCtrl)
+WX_END_HANDLERS_TABLE()
+
+WX_CONSTRUCTOR_8( wxGenericDirCtrl , wxWindow* , Parent , wxWindowID , Id , wxString , DefaultPath , 
+                 wxPoint , Position , wxSize , Size , long , WindowStyle , wxString , Filter , int , DefaultFilter ) 
+#else
+IMPLEMENT_DYNAMIC_CLASS(wxGenericDirCtrl, wxControl)
+#endif
 
 BEGIN_EVENT_TABLE(wxGenericDirCtrl, wxControl)
   EVT_TREE_ITEM_EXPANDING     (-1, wxGenericDirCtrl::OnExpandItem)
index 8cdd9eecb85603461b58750b5a74527db541e7f8..a02049efd309fcf081894015ffdd9d337e45aa8a 100644 (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 (à 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 );