diff --git a/src/msw/button.cpp b/src/msw/button.cpp index 3f5cd007c8..74ebcbbf31 100644 --- a/src/msw/button.cpp +++ b/src/msw/button.cpp @@ -52,7 +52,7 @@ IMPLEMENT_DYNAMIC_CLASS_XTI(wxButton, wxControl,"wx/button.h") WX_BEGIN_PROPERTIES_TABLE(wxButton) WX_DELEGATE( OnClick , wxEVT_COMMAND_BUTTON_CLICKED , wxCommandEvent ) - WX_PROPERTY( Font , wxFont , SetFont , GetWindowFont , ) + WX_PROPERTY( Font , wxFont , SetFont , GetFont , ) WX_PROPERTY( Label,wxString, SetLabel, GetLabel, wxT("") ) WX_END_PROPERTIES_TABLE() diff --git a/src/msw/checkbox.cpp b/src/msw/checkbox.cpp index 426f7d8786..3ea8e1b867 100644 --- a/src/msw/checkbox.cpp +++ b/src/msw/checkbox.cpp @@ -53,7 +53,7 @@ IMPLEMENT_DYNAMIC_CLASS_XTI(wxCheckBox, wxControl,"wx/checkbox.h") WX_BEGIN_PROPERTIES_TABLE(wxCheckBox) WX_DELEGATE( OnClick , wxEVT_COMMAND_CHECKBOX_CLICKED , wxCommandEvent ) - WX_PROPERTY( Font , wxFont , SetFont , GetWindowFont , ) + WX_PROPERTY( Font , wxFont , SetFont , GetFont , ) WX_PROPERTY( Label,wxString, SetLabel, GetLabel, wxT("") ) WX_PROPERTY( Value ,bool, SetValue, GetValue, ) WX_END_PROPERTIES_TABLE() diff --git a/src/msw/choice.cpp b/src/msw/choice.cpp index 46c09070d8..a73387523f 100644 --- a/src/msw/choice.cpp +++ b/src/msw/choice.cpp @@ -45,7 +45,7 @@ IMPLEMENT_DYNAMIC_CLASS_XTI(wxChoice, wxControl,"wx/checkbox.h") WX_BEGIN_PROPERTIES_TABLE(wxChoice) // TODO DELEGATES - WX_PROPERTY( Font , wxFont , SetFont , GetWindowFont , ) + WX_PROPERTY( Font , wxFont , SetFont , GetFont , ) WX_PROPERTY_COLLECTION( Choices , wxArrayString , wxString , AppendString , GetStrings ) WX_PROPERTY( Selection ,int, SetSelection, GetSelection, ) WX_END_PROPERTIES_TABLE() diff --git a/src/msw/combobox.cpp b/src/msw/combobox.cpp index 06aefa8f64..db4773dffb 100644 --- a/src/msw/combobox.cpp +++ b/src/msw/combobox.cpp @@ -58,7 +58,7 @@ IMPLEMENT_DYNAMIC_CLASS_XTI(wxComboBox, wxControl,"wx/combobox.h") WX_BEGIN_PROPERTIES_TABLE(wxComboBox) // TODO DELEGATES - WX_PROPERTY( Font , wxFont , SetFont , GetWindowFont , ) + WX_PROPERTY( Font , wxFont , SetFont , GetFont , ) WX_PROPERTY_COLLECTION( Choices , wxArrayString , wxString , AppendString , GetStrings ) WX_PROPERTY( Value ,wxString, SetValue, GetValue, ) WX_PROPERTY( Selection ,int, SetSelectionLine, GetSelection, ) diff --git a/src/msw/gauge95.cpp b/src/msw/gauge95.cpp index 4299f2948e..4862f9d249 100644 --- a/src/msw/gauge95.cpp +++ b/src/msw/gauge95.cpp @@ -67,7 +67,7 @@ // ---------------------------------------------------------------------------- #if wxUSE_EXTENDED_RTTI -IMPLEMENT_DYNAMIC_CLASS_XTI(wxGauge95, wxControl,"wx/gauge.h") +IMPLEMENT_DYNAMIC_CLASS_XTI(wxGauge, wxControl,"wx/gauge.h") WX_BEGIN_PROPERTIES_TABLE(wxGauge95) WX_PROPERTY( Value , int , SetValue, GetValue, 0 ) diff --git a/src/msw/listbox.cpp b/src/msw/listbox.cpp index f081fc8c67..f317e83e14 100644 --- a/src/msw/listbox.cpp +++ b/src/msw/listbox.cpp @@ -52,7 +52,7 @@ IMPLEMENT_DYNAMIC_CLASS_XTI(wxListBox, wxControl,"wx/listbox.h") WX_BEGIN_PROPERTIES_TABLE(wxListBox) // TODO DELEGATES - WX_PROPERTY( Font , wxFont , SetFont , GetWindowFont , ) + WX_PROPERTY( Font , wxFont , SetFont , GetFont , ) WX_PROPERTY_COLLECTION( Choices , wxArrayString , wxString , AppendString , GetStrings ) WX_PROPERTY( Selection ,int, SetSelectionLine, GetSelection, ) WX_END_PROPERTIES_TABLE() diff --git a/src/msw/notebook.cpp b/src/msw/notebook.cpp index d9f975ef40..e30355370b 100644 --- a/src/msw/notebook.cpp +++ b/src/msw/notebook.cpp @@ -127,6 +127,11 @@ template<> const wxTypeInfo* wxGetTypeInfo( wxNotebookPageInfoList * ) return &s_typeInfo ; } +template<> void wxCollectionToVariantArray( wxNotebookPageInfoList const &theList, wxxVariantArray &value) +{ + wxListCollectionToVariantArray( theList , value ) ; +} + WX_BEGIN_PROPERTIES_TABLE(wxNotebook) WX_PROPERTY_COLLECTION( PageInfos , wxNotebookPageInfoList , wxNotebookPageInfo* , AddPageInfo , GetPageInfos ) /* @@ -158,11 +163,6 @@ WX_END_HANDLERS_TABLE() WX_CONSTRUCTOR_4( wxNotebookPageInfo , wxNotebookPage* , Page , wxString , Text , bool , Selected , int , ImageId ) -template<> void wxCollectionToVariantArray( wxNotebookPageInfoList const &theList, wxxVariantArray &value) -{ - wxListCollectionToVariantArray( theList , value ) ; -} - #else IMPLEMENT_DYNAMIC_CLASS(wxNotebook, wxControl) IMPLEMENT_DYNAMIC_CLASS(wxNotebookPageInfo, wxObject ) diff --git a/src/msw/radiobut.cpp b/src/msw/radiobut.cpp index 1919617648..690f37a6eb 100644 --- a/src/msw/radiobut.cpp +++ b/src/msw/radiobut.cpp @@ -53,7 +53,7 @@ IMPLEMENT_DYNAMIC_CLASS_XTI(wxRadioButton, wxControl,"wx/radiobut.h") WX_BEGIN_PROPERTIES_TABLE(wxRadioButton) WX_DELEGATE( OnClick , wxEVT_COMMAND_RADIOBUTTON_SELECTED , wxCommandEvent ) - WX_PROPERTY( Font , wxFont , SetFont , GetWindowFont , ) + WX_PROPERTY( Font , wxFont , SetFont , GetFont , ) WX_PROPERTY( Label,wxString, SetLabel, GetLabel, wxT("") ) WX_PROPERTY( Value ,bool, SetValue, GetValue, ) WX_END_PROPERTIES_TABLE() diff --git a/src/msw/scrolbar.cpp b/src/msw/scrolbar.cpp index 7eaa272adb..0e1ed500c9 100644 --- a/src/msw/scrolbar.cpp +++ b/src/msw/scrolbar.cpp @@ -29,16 +29,23 @@ #include "wx/scrolbar.h" #include "wx/msw/private.h" +#if wxUSE_EXTENDED_RTTI +IMPLEMENT_DYNAMIC_CLASS_XTI(wxScrollBar, wxControl,"wx/scrolbar.h") + +WX_BEGIN_PROPERTIES_TABLE(wxScrollBar) + WX_PROPERTY( ThumbPosition , int , SetThumbPosition, GetThumbPosition, 0 ) + WX_PROPERTY( Range , int , SetRange, GetRange, 0 ) + WX_PROPERTY( ThumbSize , int , SetThumbSize, GetThumbSize, 0 ) + WX_PROPERTY( PageSize , int , SetPageSize, GetPageSize, 0 ) +WX_END_PROPERTIES_TABLE() + +WX_BEGIN_HANDLERS_TABLE(wxScrollBar) +WX_END_HANDLERS_TABLE() + +WX_CONSTRUCTOR_5( wxScrollBar , wxWindow* , Parent , wxWindowID , Id , wxPoint , Position , wxSize , Size , long , WindowStyle ) +#else IMPLEMENT_DYNAMIC_CLASS(wxScrollBar, wxControl) - -/* - TODO PROPERTIES - value (long,0) - thumbsize(long,1) - range( long , 10 ) - pagesize( long , 1) -*/ - +#endif // Scrollbar bool wxScrollBar::Create(wxWindow *parent, wxWindowID id, @@ -273,7 +280,7 @@ int wxScrollBar::GetThumbPosition(void) const wxZeroMemory(scrollInfo); scrollInfo.cbSize = sizeof(SCROLLINFO); scrollInfo.fMask = SIF_POS; - + if ( !::GetScrollInfo(GetHwnd(), SB_CTL, &scrollInfo) ) { wxLogLastError(_T("GetScrollInfo")); diff --git a/src/msw/slider95.cpp b/src/msw/slider95.cpp index 041527b0b1..34dcbf13ae 100644 --- a/src/msw/slider95.cpp +++ b/src/msw/slider95.cpp @@ -37,20 +37,26 @@ #include #endif -IMPLEMENT_DYNAMIC_CLASS(wxSlider95, wxControl) +#if wxUSE_EXTENDED_RTTI +IMPLEMENT_DYNAMIC_CLASS_XTI(wxSlider95, wxControl,"wx/scrolbar.h") + +WX_BEGIN_PROPERTIES_TABLE(wxSlider95) + WX_PROPERTY( Value , int , SetValue, GetValue , 0) + WX_PROPERTY( Minimum , int , SetMin, GetMin, 0 ) + WX_PROPERTY( Maximum , int , SetMax, GetMax, 0 ) + WX_PROPERTY( PageSize , int , SetPageSize, GetLineSize, 1 ) + WX_PROPERTY( LineSize , int , SetLineSize, GetLineSize, 1 ) + WX_PROPERTY( ThumbLength , int , SetThumbLength, GetThumbLength, 1 ) +WX_END_PROPERTIES_TABLE() + +WX_BEGIN_HANDLERS_TABLE(wxSlider95) +WX_END_HANDLERS_TABLE() + +WX_CONSTRUCTOR_8( wxSlider95 , wxWindow* , Parent , wxWindowID , Id , int , Value , int , Minimum , int , Maximum , wxPoint , Position , wxSize , Size , long , WindowStyle ) +#else +IMPLEMENT_DYNAMIC_CLASS(wxSlider95, wxControl) +#endif -/* - TODO PROPERTIES - value wxSL_DEFAULT_VALUE - min wxSL_DEFAULT_MIN - max wxSL_DEFAULT_MAX - tickfreq (long , 0 ) - pagesize ( long ) - linesize (long) - thumg (long) - tick (long) - selmin / selmax (long) -*/ // Slider wxSlider95::wxSlider95() { diff --git a/src/msw/spinctrl.cpp b/src/msw/spinctrl.cpp index f6aa2f460e..c513eb07c9 100644 --- a/src/msw/spinctrl.cpp +++ b/src/msw/spinctrl.cpp @@ -50,10 +50,11 @@ // macros // ---------------------------------------------------------------------------- -#if 0 // wxUSE_EXTENDED_RTTI +#if wxUSE_EXTENDED_RTTI IMPLEMENT_DYNAMIC_CLASS_XTI(wxSpinCtrl, wxControl,"wx/spinbut.h") WX_BEGIN_PROPERTIES_TABLE(wxSpinCtrl) + WX_PROPERTY( ValueString , wxString , SetValue , GetValue , ) ; WX_PROPERTY( Value , int , SetValue, GetValue, 0 ) WX_PROPERTY( Min , int , SetMin, GetMin, 0 ) WX_PROPERTY( Max , int , SetMax, GetMax, 0 ) @@ -66,7 +67,7 @@ WX_END_PROPERTIES_TABLE() WX_BEGIN_HANDLERS_TABLE(wxSpinCtrl) WX_END_HANDLERS_TABLE() -WX_CONSTRUCTOR_5( wxSpinCtrl , wxWindow* , Parent , wxWindowID , Id , wxPoint , Position , wxSize , Size , long , WindowStyle ) +WX_CONSTRUCTOR_6( wxSpinCtrl , wxWindow* , Parent , wxWindowID , Id , wxString , ValueString , wxPoint , Position , wxSize , Size , long , WindowStyle ) #else IMPLEMENT_DYNAMIC_CLASS(wxSpinCtrl, wxControl) #endif diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index 9127559181..a26f012890 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -120,7 +120,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxRichEditModule, wxModule) IMPLEMENT_DYNAMIC_CLASS_XTI(wxTextCtrl, wxControl,"wx/textctrl.h") WX_BEGIN_PROPERTIES_TABLE(wxTextCtrl) - WX_PROPERTY( Font , wxFont , SetFont , GetWindowFont , ) + WX_PROPERTY( Font , wxFont , SetFont , GetFont , ) WX_PROPERTY( Value , wxString , SetValue, GetValue, wxEmptyString ) WX_END_PROPERTIES_TABLE() diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 8e8603fcb6..88ff43ef91 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -251,9 +251,9 @@ WX_BEGIN_PROPERTIES_TABLE(wxWindow) WX_READONLY_PROPERTY( Parent,wxWindow*, GetParent, ) WX_PROPERTY( Id,wxWindowID, SetId, GetId, -1 ) - WX_PROPERTY( Position,wxPoint, SetWindowPosition , GetWindowPosition, wxPoint(-1,-1) ) // pos - WX_PROPERTY( Size,wxSize, SetWindowSize, GetWindowSize, wxSize(-1,-1) ) // size - WX_PROPERTY( WindowStyle , long , SetWindowStyle , GetWindowStyle , ) // style + WX_PROPERTY( Position,wxPoint, SetPosition , GetPosition, wxPoint(-1,-1) ) // pos + WX_PROPERTY( Size,wxSize, SetSize, GetSize, wxSize(-1,-1) ) // size + WX_PROPERTY( WindowStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , ) // style // Then all relations of the object graph