From 067e9be6852644c258627eb745643f8efd711e60 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Sat, 23 Aug 2003 00:41:33 +0000 Subject: [PATCH] xti property extensions, style bits additions git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23127 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/button.cpp | 60 +++++++++++++++++++++++++++++++++++++++++--- src/msw/checkbox.cpp | 6 ++--- src/msw/choice.cpp | 6 ++--- src/msw/colour.cpp | 38 +++++++++++++++++++++++++--- src/msw/combobox.cpp | 8 +++--- src/msw/font.cpp | 14 +++++------ src/msw/frame.cpp | 2 +- src/msw/gauge95.cpp | 8 +++--- src/msw/listbox.cpp | 6 ++--- src/msw/notebook.cpp | 16 +++++------- src/msw/radiobut.cpp | 6 ++--- src/msw/scrolbar.cpp | 8 +++--- src/msw/slider95.cpp | 12 ++++----- src/msw/spinbutt.cpp | 6 ++--- src/msw/spinctrl.cpp | 8 +++--- src/msw/statbox.cpp | 2 +- src/msw/stattext.cpp | 2 +- src/msw/textctrl.cpp | 4 +-- src/msw/window.cpp | 28 +++++++++------------ 19 files changed, 159 insertions(+), 81 deletions(-) diff --git a/src/msw/button.cpp b/src/msw/button.cpp index 4510a0337e..8ee6217a77 100644 --- a/src/msw/button.cpp +++ b/src/msw/button.cpp @@ -47,13 +47,67 @@ // ---------------------------------------------------------------------------- #if wxUSE_EXTENDED_RTTI + +enum wxButtonStyleBits +{ + wxButtonExactFitBit = 0 , + wxButtonLeftBit = 6 , + wxButtonTopBit = 7 , + wxButtonRightBit = 8 , + wxButtonBottomBit = 9 , + +// wxNoFullRepaintOnResizeBit = 16 , +// wxPopUpWindowBit = 17 , + wxWantCharsBit = 18 , +// wxTabTraversalBit = 19 , + + wxTransparentWindowBit = 20 , + wxBorderNoneBit = 21 , +// wxClipChildrenBit = 22 , +// wxAlwaysShowScrollBarsBit = 23 , + + wxBorderStaticBit = 24 , + wxBorderSimpleBit = 25 , + wxBorderRaisedBit = 26 , + wxBorderSunkenBit = 27 , + + wxBorderDoubleBit = 28 , +// wxCaptionBit = 29 , +// wxClipSiblingsBit = 29 , // caption not used for non toplevel +// wxHScrolBit = 30 , +// wxVScrollBit = 31 , +} ; + +typedef wxFlags wxButtonStyleFlags ; + +WX_BEGIN_ENUM( wxButtonStyleBits) + WX_ENUM_MEMBER( wxButtonExactFitBit) + WX_ENUM_MEMBER( wxButtonLeftBit) + WX_ENUM_MEMBER( wxButtonTopBit) + WX_ENUM_MEMBER( wxButtonRightBit) + WX_ENUM_MEMBER( wxButtonBottomBit) + WX_ENUM_MEMBER( wxWantCharsBit) + WX_ENUM_MEMBER( wxTransparentWindowBit) + WX_ENUM_MEMBER( wxBorderNoneBit) + WX_ENUM_MEMBER( wxBorderStaticBit) + WX_ENUM_MEMBER( wxBorderSimpleBit) + WX_ENUM_MEMBER( wxBorderRaisedBit) + WX_ENUM_MEMBER( wxBorderSunkenBit) + WX_ENUM_MEMBER( wxBorderDoubleBit) +WX_END_ENUM( wxButtonStyleBits) + +WX_IMPLEMENT_SET_STREAMING( wxButtonStyleFlags , wxButtonStyleBits) + IMPLEMENT_DYNAMIC_CLASS_XTI(wxButton, wxControl,"wx/button.h") WX_BEGIN_PROPERTIES_TABLE(wxButton) - WX_DELEGATE( OnClick , wxEVT_COMMAND_BUTTON_CLICKED , wxCommandEvent ) + WX_DELEGATE( OnClick , wxEVT_COMMAND_BUTTON_CLICKED , wxCommandEvent , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) + + WX_PROPERTY( Font , wxFont , SetFont , GetFont , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) + WX_PROPERTY( Label, wxString , SetLabel, GetLabel, wxEmptyString, 0 /*flags*/ , wxT("Helpstring") , wxT("group") ) + + WX_PROPERTY_FLAGS( WindowStyle , wxButtonStyleFlags , long , SetWindowStyleFlag , GetWindowStyleFlag , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style - WX_PROPERTY( Font , wxFont , SetFont , GetFont , ) - WX_PROPERTY( Label,wxString, SetLabel, GetLabel, wxEmptyString ) WX_END_PROPERTIES_TABLE() WX_BEGIN_HANDLERS_TABLE(wxButton) diff --git a/src/msw/checkbox.cpp b/src/msw/checkbox.cpp index 16038179fd..0bcfdd6e85 100644 --- a/src/msw/checkbox.cpp +++ b/src/msw/checkbox.cpp @@ -53,9 +53,9 @@ 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 , GetFont , ) - WX_PROPERTY( Label,wxString, SetLabel, GetLabel, wxEmptyString ) - WX_PROPERTY( Value ,bool, SetValue, GetValue, ) + WX_PROPERTY( Font , wxFont , SetFont , GetFont , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) + WX_PROPERTY( Label,wxString, SetLabel, GetLabel, wxEmptyString , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) + WX_PROPERTY( Value ,bool, SetValue, GetValue, , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) WX_END_PROPERTIES_TABLE() WX_BEGIN_HANDLERS_TABLE(wxCheckBox) diff --git a/src/msw/choice.cpp b/src/msw/choice.cpp index a73387523f..3389cf3707 100644 --- a/src/msw/choice.cpp +++ b/src/msw/choice.cpp @@ -45,9 +45,9 @@ IMPLEMENT_DYNAMIC_CLASS_XTI(wxChoice, wxControl,"wx/checkbox.h") WX_BEGIN_PROPERTIES_TABLE(wxChoice) // TODO DELEGATES - WX_PROPERTY( Font , wxFont , SetFont , GetFont , ) - WX_PROPERTY_COLLECTION( Choices , wxArrayString , wxString , AppendString , GetStrings ) - WX_PROPERTY( Selection ,int, SetSelection, GetSelection, ) + WX_PROPERTY( Font , wxFont , SetFont , GetFont , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) + WX_PROPERTY_COLLECTION( Choices , wxArrayString , wxString , AppendString , GetStrings , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) + WX_PROPERTY( Selection ,int, SetSelection, GetSelection, , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) WX_END_PROPERTIES_TABLE() WX_BEGIN_HANDLERS_TABLE(wxChoice) diff --git a/src/msw/colour.cpp b/src/msw/colour.cpp index e1d9ee9c2d..1f99c2a348 100644 --- a/src/msw/colour.cpp +++ b/src/msw/colour.cpp @@ -26,12 +26,44 @@ #include #if wxUSE_EXTENDED_RTTI + +/* + +template<> void wxStringReadValue(const wxString &s , wxColour &data ) +{ + // copied from VS xrc + unsigned long tmp = 0; + + if (s.Length() != 7 || s[0u] != wxT('#') || + wxSscanf(s.c_str(), wxT("#%lX"), &tmp) != 1) + { + wxLogError(_("String To Colour : Incorrect colour specification : %s"), + s.c_str() ); + data = wxNullColour; + } + else + { + data = wxColour((unsigned char) ((tmp & 0xFF0000) >> 16) , + (unsigned char) ((tmp & 0x00FF00) >> 8), + (unsigned char) ((tmp & 0x0000FF))); + } +} + +template<> void wxStringWriteValue(wxString &s , const wxColour &data ) +{ + s = wxString::Format("#%2X%2X%2X", data.Red() , data.Green() , data.Blue() ) ; +} + +WX_CUSTOM_TYPE_INFO(wxColour) + +*/ + IMPLEMENT_DYNAMIC_CLASS_WITH_COPY_XTI( wxColour , wxObject , "wx/colour.h" ) WX_BEGIN_PROPERTIES_TABLE(wxColour) - WX_READONLY_PROPERTY( Red, unsigned char , Red , 0 ) - WX_READONLY_PROPERTY( Green, unsigned char , Green , 0 ) - WX_READONLY_PROPERTY( Blue, unsigned char , Blue , 0 ) + WX_READONLY_PROPERTY( Red, unsigned char , Red , 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) + WX_READONLY_PROPERTY( Green, unsigned char , Green , 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) + WX_READONLY_PROPERTY( Blue, unsigned char , Blue , 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) WX_END_PROPERTIES_TABLE() WX_CONSTRUCTOR_3( wxColour , unsigned char , Red , unsigned char , Green , unsigned char , Blue ) diff --git a/src/msw/combobox.cpp b/src/msw/combobox.cpp index ff22aac51d..671c78b6c5 100644 --- a/src/msw/combobox.cpp +++ b/src/msw/combobox.cpp @@ -58,10 +58,10 @@ IMPLEMENT_DYNAMIC_CLASS_XTI(wxComboBox, wxControl,"wx/combobox.h") WX_BEGIN_PROPERTIES_TABLE(wxComboBox) // TODO DELEGATES - WX_PROPERTY( Font , wxFont , SetFont , GetFont , ) - WX_PROPERTY_COLLECTION( Choices , wxArrayString , wxString , AppendString , GetStrings ) - WX_PROPERTY( Value ,wxString, SetValue, GetValue, ) - WX_PROPERTY( Selection ,int, SetSelection, GetSelection, ) + WX_PROPERTY( Font , wxFont , SetFont , GetFont , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) + WX_PROPERTY_COLLECTION( Choices , wxArrayString , wxString , AppendString , GetStrings , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) + WX_PROPERTY( Value ,wxString, SetValue, GetValue, , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) + WX_PROPERTY( Selection ,int, SetSelection, GetSelection, , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) WX_END_PROPERTIES_TABLE() WX_BEGIN_HANDLERS_TABLE(wxComboBox) diff --git a/src/msw/font.cpp b/src/msw/font.cpp index 02cd9c93da..24ef9f2d33 100644 --- a/src/msw/font.cpp +++ b/src/msw/font.cpp @@ -71,13 +71,13 @@ WX_END_ENUM( wxFontWeight ) IMPLEMENT_DYNAMIC_CLASS_WITH_COPY_XTI(wxFont, wxGDIObject,"wx/font.h") WX_BEGIN_PROPERTIES_TABLE(wxFont) - WX_PROPERTY( Size,int, SetPointSize, GetPointSize, 12 ) - WX_PROPERTY( Family, int , SetFamily, GetFamily, (int)wxDEFAULT ) // wxFontFamily - WX_PROPERTY( Style, int , SetStyle, GetStyle, (int)wxNORMAL ) // wxFontStyle - WX_PROPERTY( Weight, int , SetWeight, GetWeight, (int)wxNORMAL ) // wxFontWeight - WX_PROPERTY( Underlined, bool , SetUnderlined, GetUnderlined, false ) - WX_PROPERTY( Face, wxString , SetFaceName, GetFaceName, ) - WX_PROPERTY( Encoding, wxFontEncoding , SetEncoding, GetEncoding, wxFONTENCODING_DEFAULT ) + WX_PROPERTY( Size,int, SetPointSize, GetPointSize, 12 , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) + WX_PROPERTY( Family, int , SetFamily, GetFamily, (int)wxDEFAULT , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // wxFontFamily + WX_PROPERTY( Style, int , SetStyle, GetStyle, (int)wxNORMAL , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // wxFontStyle + WX_PROPERTY( Weight, int , SetWeight, GetWeight, (int)wxNORMAL , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // wxFontWeight + WX_PROPERTY( Underlined, bool , SetUnderlined, GetUnderlined, false , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) + WX_PROPERTY( Face, wxString , SetFaceName, GetFaceName, , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) + WX_PROPERTY( Encoding, wxFontEncoding , SetEncoding, GetEncoding, wxFONTENCODING_DEFAULT , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) WX_END_PROPERTIES_TABLE() WX_CONSTRUCTOR_6( wxFont , int , Size , int , Family , int , Style , int , Weight , bool , Underlined , wxString , Face ) diff --git a/src/msw/frame.cpp b/src/msw/frame.cpp index a05006325b..a7deab2b2c 100644 --- a/src/msw/frame.cpp +++ b/src/msw/frame.cpp @@ -83,7 +83,7 @@ END_EVENT_TABLE() IMPLEMENT_DYNAMIC_CLASS_XTI(wxFrame, wxTopLevelWindow,"wx/frame.h") WX_BEGIN_PROPERTIES_TABLE(wxFrame) - WX_PROPERTY( Title,wxString, SetTitle, GetTitle, wxEmptyString ) + WX_PROPERTY( Title,wxString, SetTitle, GetTitle, wxEmptyString , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) /* TODO PROPERTIES diff --git a/src/msw/gauge95.cpp b/src/msw/gauge95.cpp index 4862f9d249..3c7590fd1f 100644 --- a/src/msw/gauge95.cpp +++ b/src/msw/gauge95.cpp @@ -70,10 +70,10 @@ IMPLEMENT_DYNAMIC_CLASS_XTI(wxGauge, wxControl,"wx/gauge.h") WX_BEGIN_PROPERTIES_TABLE(wxGauge95) - WX_PROPERTY( Value , int , SetValue, GetValue, 0 ) - WX_PROPERTY( Range , int , SetRange, GetRange, 0 ) - WX_PROPERTY( ShadowWidth , int , SetShadowWidth, GetShadowWidth, 0 ) - WX_PROPERTY( BezelFace , int , SetBezelFace, GetBezelFace, 0 ) + WX_PROPERTY( Value , int , SetValue, GetValue, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) + WX_PROPERTY( Range , int , SetRange, GetRange, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) + WX_PROPERTY( ShadowWidth , int , SetShadowWidth, GetShadowWidth, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) + WX_PROPERTY( BezelFace , int , SetBezelFace, GetBezelFace, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) /* TODO PROPERTIES style wxGA_HORIZONTAL diff --git a/src/msw/listbox.cpp b/src/msw/listbox.cpp index 9b06a34e94..8a6382e8b0 100644 --- a/src/msw/listbox.cpp +++ b/src/msw/listbox.cpp @@ -52,9 +52,9 @@ IMPLEMENT_DYNAMIC_CLASS_XTI(wxListBox, wxControl,"wx/listbox.h") WX_BEGIN_PROPERTIES_TABLE(wxListBox) // TODO DELEGATES - WX_PROPERTY( Font , wxFont , SetFont , GetFont , ) - WX_PROPERTY_COLLECTION( Choices , wxArrayString , wxString , AppendString , GetStrings ) - WX_PROPERTY( Selection ,int, SetSelection, GetSelection, ) + WX_PROPERTY( Font , wxFont , SetFont , GetFont , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) + WX_PROPERTY_COLLECTION( Choices , wxArrayString , wxString , AppendString , GetStrings, 0 /*flags*/ , wxT("Helpstring") , wxT("group") ) + WX_PROPERTY( Selection ,int, SetSelection, GetSelection,, 0 /*flags*/ , wxT("Helpstring") , wxT("group") ) WX_END_PROPERTIES_TABLE() WX_BEGIN_HANDLERS_TABLE(wxListBox) diff --git a/src/msw/notebook.cpp b/src/msw/notebook.cpp index e0b47ea855..9e67f1c74c 100644 --- a/src/msw/notebook.cpp +++ b/src/msw/notebook.cpp @@ -121,11 +121,7 @@ END_EVENT_TABLE() IMPLEMENT_DYNAMIC_CLASS_XTI(wxNotebook, wxControl,"wx/notebook.h") IMPLEMENT_DYNAMIC_CLASS_XTI(wxNotebookPageInfo, wxObject , "wx/notebook.h" ) -template<> const wxTypeInfo* wxGetTypeInfo( wxNotebookPageInfoList * ) -{ - static wxCollectionTypeInfo s_typeInfo( (wxTypeInfo*) wxGetTypeInfo( (wxNotebookPageInfo **) NULL) ) ; - return &s_typeInfo ; -} +WX_COLLECTION_TYPE_INFO( wxNotebookPageInfo * , wxNotebookPageInfoList ) ; template<> void wxCollectionToVariantArray( wxNotebookPageInfoList const &theList, wxxVariantArray &value) { @@ -133,7 +129,7 @@ template<> void wxCollectionToVariantArray( wxNotebookPageInfoList const &theLis } WX_BEGIN_PROPERTIES_TABLE(wxNotebook) - WX_PROPERTY_COLLECTION( PageInfos , wxNotebookPageInfoList , wxNotebookPageInfo* , AddPageInfo , GetPageInfos ) + WX_PROPERTY_COLLECTION( PageInfos , wxNotebookPageInfoList , wxNotebookPageInfo* , AddPageInfo , GetPageInfos , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) /* notebookpage object @@ -152,10 +148,10 @@ WX_CONSTRUCTOR_4( wxNotebook , wxWindow* , Parent , wxWindowID , Id , wxPoint , WX_BEGIN_PROPERTIES_TABLE(wxNotebookPageInfo) - WX_READONLY_PROPERTY( Page , wxNotebookPage* , GetPage , ) - WX_READONLY_PROPERTY( Text , wxString , GetText , wxEmptyString ) - WX_READONLY_PROPERTY( Selected , bool , GetSelected , false ) - WX_READONLY_PROPERTY( ImageId , int , GetImageId , -1 ) + WX_READONLY_PROPERTY( Page , wxNotebookPage* , GetPage , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) + WX_READONLY_PROPERTY( Text , wxString , GetText , wxEmptyString , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) + WX_READONLY_PROPERTY( Selected , bool , GetSelected , false, 0 /*flags*/ , wxT("Helpstring") , wxT("group") ) + WX_READONLY_PROPERTY( ImageId , int , GetImageId , -1 , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) WX_END_PROPERTIES_TABLE() WX_BEGIN_HANDLERS_TABLE(wxNotebookPageInfo) diff --git a/src/msw/radiobut.cpp b/src/msw/radiobut.cpp index f733548853..2655bd2fcf 100644 --- a/src/msw/radiobut.cpp +++ b/src/msw/radiobut.cpp @@ -53,9 +53,9 @@ 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 , GetFont , ) - WX_PROPERTY( Label,wxString, SetLabel, GetLabel, wxEmptyString ) - WX_PROPERTY( Value ,bool, SetValue, GetValue, ) + WX_PROPERTY( Font , wxFont , SetFont , GetFont , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) + WX_PROPERTY( Label,wxString, SetLabel, GetLabel, wxEmptyString, 0 /*flags*/ , wxT("Helpstring") , wxT("group") ) + WX_PROPERTY( Value ,bool, SetValue, GetValue,, 0 /*flags*/ , wxT("Helpstring") , wxT("group") ) WX_END_PROPERTIES_TABLE() WX_BEGIN_HANDLERS_TABLE(wxRadioButton) diff --git a/src/msw/scrolbar.cpp b/src/msw/scrolbar.cpp index 0e1ed500c9..87d9ae9edd 100644 --- a/src/msw/scrolbar.cpp +++ b/src/msw/scrolbar.cpp @@ -33,10 +33,10 @@ 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_PROPERTY( ThumbPosition , int , SetThumbPosition, GetThumbPosition, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) + WX_PROPERTY( Range , int , SetRange, GetRange, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) + WX_PROPERTY( ThumbSize , int , SetThumbSize, GetThumbSize, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) + WX_PROPERTY( PageSize , int , SetPageSize, GetPageSize, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) WX_END_PROPERTIES_TABLE() WX_BEGIN_HANDLERS_TABLE(wxScrollBar) diff --git a/src/msw/slider95.cpp b/src/msw/slider95.cpp index 34dcbf13ae..fb0c122d46 100644 --- a/src/msw/slider95.cpp +++ b/src/msw/slider95.cpp @@ -41,12 +41,12 @@ 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_PROPERTY( Value , int , SetValue, GetValue , 0, 0 /*flags*/ , wxT("Helpstring") , wxT("group")) + WX_PROPERTY( Minimum , int , SetMin, GetMin, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) + WX_PROPERTY( Maximum , int , SetMax, GetMax, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) + WX_PROPERTY( PageSize , int , SetPageSize, GetLineSize, 1 , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) + WX_PROPERTY( LineSize , int , SetLineSize, GetLineSize, 1 , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) + WX_PROPERTY( ThumbLength , int , SetThumbLength, GetThumbLength, 1 , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) WX_END_PROPERTIES_TABLE() WX_BEGIN_HANDLERS_TABLE(wxSlider95) diff --git a/src/msw/spinbutt.cpp b/src/msw/spinbutt.cpp index 36de18694d..627d94fa4f 100644 --- a/src/msw/spinbutt.cpp +++ b/src/msw/spinbutt.cpp @@ -60,9 +60,9 @@ IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent, wxNotifyEvent) IMPLEMENT_DYNAMIC_CLASS_XTI(wxSpinButton, wxControl,"wx/spinbut.h") WX_BEGIN_PROPERTIES_TABLE(wxSpinButton) - WX_PROPERTY( Value , int , SetValue, GetValue, 0 ) - WX_PROPERTY( Min , int , SetMin, GetMin, 0 ) - WX_PROPERTY( Max , int , SetMax, GetMax, 0 ) + WX_PROPERTY( Value , int , SetValue, GetValue, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) + WX_PROPERTY( Min , int , SetMin, GetMin, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) + WX_PROPERTY( Max , int , SetMax, GetMax, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) /* TODO PROPERTIES style wxSP_VERTICAL | wxSP_ARROW_KEYS diff --git a/src/msw/spinctrl.cpp b/src/msw/spinctrl.cpp index c513eb07c9..f2d6ff3059 100644 --- a/src/msw/spinctrl.cpp +++ b/src/msw/spinctrl.cpp @@ -54,10 +54,10 @@ 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 ) + WX_PROPERTY( ValueString , wxString , SetValue , GetValue , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) ; + WX_PROPERTY( Value , int , SetValue, GetValue, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) + WX_PROPERTY( Min , int , SetMin, GetMin, 0, 0 /*flags*/ , wxT("Helpstring") , wxT("group") ) + WX_PROPERTY( Max , int , SetMax, GetMax, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) /* TODO PROPERTIES style wxSP_ARROW_KEYS diff --git a/src/msw/statbox.cpp b/src/msw/statbox.cpp index b10bb23508..2f99119dfb 100644 --- a/src/msw/statbox.cpp +++ b/src/msw/statbox.cpp @@ -47,7 +47,7 @@ IMPLEMENT_DYNAMIC_CLASS_XTI(wxStaticBox, wxControl,"wx/statbox.h") WX_BEGIN_PROPERTIES_TABLE(wxStaticBox) - WX_PROPERTY( Label,wxString, SetLabel, GetLabel, wxEmptyString ) + WX_PROPERTY( Label,wxString, SetLabel, GetLabel, wxEmptyString , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) /* TODO PROPERTIES : label diff --git a/src/msw/stattext.cpp b/src/msw/stattext.cpp index 83b4a28188..8965170619 100644 --- a/src/msw/stattext.cpp +++ b/src/msw/stattext.cpp @@ -36,7 +36,7 @@ IMPLEMENT_DYNAMIC_CLASS_XTI(wxStaticText, wxControl,"wx/stattext.h") WX_BEGIN_PROPERTIES_TABLE(wxStaticText) - WX_PROPERTY( Label,wxString, SetLabel, GetLabel, wxEmptyString ) + WX_PROPERTY( Label,wxString, SetLabel, GetLabel, wxEmptyString , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) WX_END_PROPERTIES_TABLE() WX_BEGIN_HANDLERS_TABLE(wxStaticText) diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index a26f012890..76099b7cf9 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -120,8 +120,8 @@ IMPLEMENT_DYNAMIC_CLASS(wxRichEditModule, wxModule) IMPLEMENT_DYNAMIC_CLASS_XTI(wxTextCtrl, wxControl,"wx/textctrl.h") WX_BEGIN_PROPERTIES_TABLE(wxTextCtrl) - WX_PROPERTY( Font , wxFont , SetFont , GetFont , ) - WX_PROPERTY( Value , wxString , SetValue, GetValue, wxEmptyString ) + WX_PROPERTY( Font , wxFont , SetFont , GetFont ,, 0 /*flags*/ , wxT("Helpstring") , wxT("group") ) + WX_PROPERTY( Value , wxString , SetValue, GetValue, wxEmptyString , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) WX_END_PROPERTIES_TABLE() WX_BEGIN_HANDLERS_TABLE(wxTextCtrl) diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 88ff43ef91..4b8c32fb00 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -235,11 +235,7 @@ IMPLEMENT_DYNAMIC_CLASS_XTI(wxWindow, wxWindowBase,"wx/window.h") // make wxWindowList known before the property is used -template<> const wxTypeInfo* wxGetTypeInfo( wxWindowList * ) -{ - static wxCollectionTypeInfo s_typeInfo( (wxTypeInfo*) wxGetTypeInfo( (wxWindow **) NULL) ) ; - return &s_typeInfo ; -} +WX_COLLECTION_TYPE_INFO( wxWindow* , wxWindowList ) ; template<> void wxCollectionToVariantArray( wxWindowList const &theList, wxxVariantArray &value) { @@ -249,23 +245,23 @@ template<> void wxCollectionToVariantArray( wxWindowList const &theList, wxxVari WX_BEGIN_PROPERTIES_TABLE(wxWindow) // Always constructor Properties first - WX_READONLY_PROPERTY( Parent,wxWindow*, GetParent, ) - WX_PROPERTY( Id,wxWindowID, SetId, GetId, -1 ) - 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 + WX_READONLY_PROPERTY( Parent,wxWindow*, GetParent, , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) + WX_PROPERTY( Id,wxWindowID, SetId, GetId, -1, 0 /*flags*/ , wxT("Helpstring") , wxT("group") ) + WX_PROPERTY( Position,wxPoint, SetPosition , GetPosition, wxPoint(-1,-1) , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // pos + WX_PROPERTY( Size,wxSize, SetSize, GetSize, wxSize(-1,-1) , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // size + WX_PROPERTY( WindowStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style // Then all relations of the object graph - WX_READONLY_PROPERTY_COLLECTION( Children , wxWindowList , wxWindowBase* , GetWindowChildren ) + WX_READONLY_PROPERTY_COLLECTION( Children , wxWindowList , wxWindowBase* , GetWindowChildren , wxPROP_OBJECT_GRAPH /*flags*/ , wxT("Helpstring") , wxT("group")) // and finally all other properties - WX_PROPERTY( ExtraStyle , long , SetExtraStyle , GetExtraStyle , ) // extstyle - WX_PROPERTY( BackgroundColour , wxColour , SetBackgroundColour , GetBackgroundColour , ) // bg - WX_PROPERTY( ForegroundColour , wxColour , SetForegroundColour , GetForegroundColour , ) // fg - WX_PROPERTY( Enabled , bool , Enable , IsEnabled , wxxVariant((bool)true) ) - WX_PROPERTY( Shown , bool , Show , IsShown , wxxVariant((bool)true) ) + WX_PROPERTY( ExtraStyle , long , SetExtraStyle , GetExtraStyle , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // extstyle + WX_PROPERTY( BackgroundColour , wxColour , SetBackgroundColour , GetBackgroundColour , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // bg + WX_PROPERTY( ForegroundColour , wxColour , SetForegroundColour , GetForegroundColour , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // fg + WX_PROPERTY( Enabled , bool , Enable , IsEnabled , wxxVariant((bool)true) , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) + WX_PROPERTY( Shown , bool , Show , IsShown , wxxVariant((bool)true) , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) #if 0 // possible property candidates (not in xrc) or not valid in all subclasses WX_PROPERTY( Title,wxString, SetTitle, GetTitle, wxT("") ) -- 2.45.2