From ffca575c83935a6382d2d471c4692928d26ac5fe Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Wed, 27 Aug 2003 18:42:14 +0000 Subject: [PATCH] WX_EVENT_PROPERTY instead of WX_DELEGATE git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23264 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/xti.h | 4 +-- src/generic/calctrl.cpp | 2 +- src/msw/button.cpp | 2 +- src/msw/checkbox.cpp | 2 +- src/msw/checklst.cpp | 2 +- src/msw/choice.cpp | 2 +- src/msw/combobox.cpp | 4 +-- src/msw/dialog.cpp | 62 ++++++++++++++++++++++++++++++++++++----- src/msw/frame.cpp | 2 +- src/msw/listbox.cpp | 4 +-- src/msw/listctrl.cpp | 2 +- src/msw/menu.cpp | 2 +- src/msw/notebook.cpp | 4 +-- src/msw/radiobox.cpp | 2 +- src/msw/radiobut.cpp | 2 +- src/msw/scrolbar.cpp | 2 +- src/msw/slider95.cpp | 4 +-- src/msw/spinbutt.cpp | 2 +- src/msw/spinctrl.cpp | 8 +++--- src/msw/textctrl.cpp | 4 +-- src/msw/treectrl.cpp | 4 +-- src/msw/window.cpp | 6 ++-- 22 files changed, 88 insertions(+), 40 deletions(-) diff --git a/include/wx/xti.h b/include/wx/xti.h index 35ea60033d..166502080a 100644 --- a/include/wx/xti.h +++ b/include/wx/xti.h @@ -1132,11 +1132,11 @@ WX_DECLARE_STRING_HASH_MAP_WITH_DECL( wxPropertyInfo* , wxPropertyInfoMap , clas static wxPropertyInfo _propertyInfo##pname( first ,class_t::GetClassInfoStatic() , wxT(#pname) , typeid(colltype).name() ,typeid(addelemtype).name() ,&_accessor##pname , flags , help , group ) ; -#define WX_DELEGATE( name , eventType , eventClass ) \ +#define WX_EVENT_PROPERTY( name , eventType , eventClass ) \ static wxDelegateTypeInfo _typeInfo##name( eventType , CLASSINFO( eventClass ) ) ; \ static wxPropertyInfo _propertyInfo##name( first ,class_t::GetClassInfoStatic() , wxT(#name) , &_typeInfo##name , NULL , wxxVariant() ) ; \ -#define WX_DELEGATE_RANGE( name , eventType , lastEventType , eventClass ) \ +#define WX_EVENT_RANGE_PROPERTY( name , eventType , lastEventType , eventClass ) \ static wxDelegateTypeInfo _typeInfo##name( eventType , lastEventType , CLASSINFO( eventClass ) ) ; \ static wxPropertyInfo _propertyInfo##name( first , class_t::GetClassInfoStatic() , wxT(#name) , &_typeInfo##name , NULL , wxxVariant() ) ; \ diff --git a/src/generic/calctrl.cpp b/src/generic/calctrl.cpp index 757847fbaf..4216fc954c 100644 --- a/src/generic/calctrl.cpp +++ b/src/generic/calctrl.cpp @@ -148,7 +148,7 @@ WX_END_FLAGS( wxCalendarCtrlStyle ) IMPLEMENT_DYNAMIC_CLASS_XTI(wxCalendarCtrl, wxControl,"wx/calctrl.h") WX_BEGIN_PROPERTIES_TABLE(wxCalendarCtrl) - WX_DELEGATE_RANGE( OnUpdated , wxEVT_CALENDAR_SEL_CHANGED , wxEVT_CALENDAR_WEEKDAY_CLICKED , wxCalendarEvent ) + WX_EVENT_RANGE_PROPERTY( Updated , wxEVT_CALENDAR_SEL_CHANGED , wxEVT_CALENDAR_WEEKDAY_CLICKED , wxCalendarEvent ) WX_HIDE_PROPERTY( Children ) WX_PROPERTY( Date,wxDateTime, SetDate , GetDate, , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) WX_PROPERTY_FLAGS( WindowStyle , wxCalendarCtrlStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style diff --git a/src/msw/button.cpp b/src/msw/button.cpp index 948d1c76b8..9279b66c00 100644 --- a/src/msw/button.cpp +++ b/src/msw/button.cpp @@ -88,7 +88,7 @@ WX_END_FLAGS( wxButtonStyle ) IMPLEMENT_DYNAMIC_CLASS_XTI(wxButton, wxControl,"wx/button.h") WX_BEGIN_PROPERTIES_TABLE(wxButton) - WX_DELEGATE( OnClick , wxEVT_COMMAND_BUTTON_CLICKED , wxCommandEvent) + WX_EVENT_PROPERTY( Click , wxEVT_COMMAND_BUTTON_CLICKED , wxCommandEvent) WX_PROPERTY( Font , wxFont , SetFont , GetFont , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) WX_PROPERTY( Label, wxString , SetLabel, GetLabel, wxString(), 0 /*flags*/ , wxT("Helpstring") , wxT("group") ) diff --git a/src/msw/checkbox.cpp b/src/msw/checkbox.cpp index 6c3c6eafda..252bd5220f 100644 --- a/src/msw/checkbox.cpp +++ b/src/msw/checkbox.cpp @@ -83,7 +83,7 @@ WX_END_FLAGS( wxCheckBoxStyle ) IMPLEMENT_DYNAMIC_CLASS_XTI(wxCheckBox, wxControl,"wx/checkbox.h") WX_BEGIN_PROPERTIES_TABLE(wxCheckBox) - WX_DELEGATE( OnClick , wxEVT_COMMAND_CHECKBOX_CLICKED , wxCommandEvent ) + WX_EVENT_PROPERTY( Click , wxEVT_COMMAND_CHECKBOX_CLICKED , wxCommandEvent ) WX_PROPERTY( Font , wxFont , SetFont , GetFont , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) WX_PROPERTY( Label,wxString, SetLabel, GetLabel, wxString() , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) diff --git a/src/msw/checklst.cpp b/src/msw/checklst.cpp index 6c843f7009..566cd71f9b 100644 --- a/src/msw/checklst.cpp +++ b/src/msw/checklst.cpp @@ -112,7 +112,7 @@ WX_END_FLAGS( wxCheckListBoxStyle ) IMPLEMENT_DYNAMIC_CLASS_XTI(wxCheckListBox, wxListBox,"wx/checklst.h") WX_BEGIN_PROPERTIES_TABLE(wxCheckListBox) - WX_DELEGATE( OnToggle , wxEVT_COMMAND_CHECKLISTBOX_TOGGLED , wxCommandEvent ) + WX_EVENT_PROPERTY( Toggle , wxEVT_COMMAND_CHECKLISTBOX_TOGGLED , wxCommandEvent ) WX_PROPERTY_FLAGS( WindowStyle , wxCheckListBoxStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style WX_END_PROPERTIES_TABLE() diff --git a/src/msw/choice.cpp b/src/msw/choice.cpp index 6d0d18243b..73cd8a13dd 100644 --- a/src/msw/choice.cpp +++ b/src/msw/choice.cpp @@ -76,7 +76,7 @@ WX_END_FLAGS( wxChoiceStyle ) IMPLEMENT_DYNAMIC_CLASS_XTI(wxChoice, wxControl,"wx/choice.h") WX_BEGIN_PROPERTIES_TABLE(wxChoice) - WX_DELEGATE( OnSelect , wxEVT_COMMAND_CHOICE_SELECTED , wxCommandEvent ) + WX_EVENT_PROPERTY( Select , wxEVT_COMMAND_CHOICE_SELECTED , wxCommandEvent ) 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")) diff --git a/src/msw/combobox.cpp b/src/msw/combobox.cpp index 00f1314ae2..e265d37391 100644 --- a/src/msw/combobox.cpp +++ b/src/msw/combobox.cpp @@ -94,8 +94,8 @@ WX_END_FLAGS( wxComboBoxStyle ) IMPLEMENT_DYNAMIC_CLASS_XTI(wxComboBox, wxControl,"wx/combobox.h") WX_BEGIN_PROPERTIES_TABLE(wxComboBox) - WX_DELEGATE( OnSelect , wxEVT_COMMAND_COMBOBOX_SELECTED , wxCommandEvent ) - WX_DELEGATE( OnTextEnter , wxEVT_COMMAND_TEXT_ENTER , wxCommandEvent ) + WX_EVENT_PROPERTY( Select , wxEVT_COMMAND_COMBOBOX_SELECTED , wxCommandEvent ) + WX_EVENT_PROPERTY( TextEnter , wxEVT_COMMAND_TEXT_ENTER , wxCommandEvent ) // TODO DELEGATES WX_PROPERTY( Font , wxFont , SetFont , GetFont , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) diff --git a/src/msw/dialog.cpp b/src/msw/dialog.cpp index b7ccfaf0d6..d0f9d78dfd 100644 --- a/src/msw/dialog.cpp +++ b/src/msw/dialog.cpp @@ -68,14 +68,62 @@ static wxWindowList wxModalDialogs; // wxWin macros // ---------------------------------------------------------------------------- -IMPLEMENT_DYNAMIC_CLASS(wxDialog, wxTopLevelWindow) - -/* - TODO PROPERTIES +#if wxUSE_EXTENDED_RTTI +WX_DEFINE_FLAGS( wxDialogStyle ) + +WX_BEGIN_FLAGS( wxDialogStyle ) + // new style border flags, we put them first to + // use them for streaming out + WX_FLAGS_MEMBER(wxBORDER_SIMPLE) + WX_FLAGS_MEMBER(wxBORDER_SUNKEN) + WX_FLAGS_MEMBER(wxBORDER_DOUBLE) + WX_FLAGS_MEMBER(wxBORDER_RAISED) + WX_FLAGS_MEMBER(wxBORDER_STATIC) + WX_FLAGS_MEMBER(wxBORDER_NONE) + + // old style border flags + WX_FLAGS_MEMBER(wxSIMPLE_BORDER) + WX_FLAGS_MEMBER(wxSUNKEN_BORDER) + WX_FLAGS_MEMBER(wxDOUBLE_BORDER) + WX_FLAGS_MEMBER(wxRAISED_BORDER) + WX_FLAGS_MEMBER(wxSTATIC_BORDER) + WX_FLAGS_MEMBER(wxNO_BORDER) + + // standard window styles + WX_FLAGS_MEMBER(wxTAB_TRAVERSAL) + WX_FLAGS_MEMBER(wxCLIP_CHILDREN) + + // dialog styles + WX_FLAGS_MEMBER(wxDIALOG_MODAL) + WX_FLAGS_MEMBER(wxDIALOG_MODELESS) + WX_FLAGS_MEMBER(wxNO_3D) + WX_FLAGS_MEMBER(wxWS_EX_VALIDATE_RECURSIVELY) + WX_FLAGS_MEMBER(wxSTAY_ON_TOP) + WX_FLAGS_MEMBER(wxCAPTION) + WX_FLAGS_MEMBER(wxTHICK_FRAME) + WX_FLAGS_MEMBER(wxSYSTEM_MENU) + WX_FLAGS_MEMBER(wxRESIZE_BORDER) + WX_FLAGS_MEMBER(wxRESIZE_BOX) + WX_FLAGS_MEMBER(wxCLOSE_BOX) + WX_FLAGS_MEMBER(wxMAXIMIZE_BOX) + WX_FLAGS_MEMBER(wxMINIMIZE_BOX) +WX_END_FLAGS( wxDialogStyle ) + +IMPLEMENT_DYNAMIC_CLASS_XTI(wxDialog, wxTopLevelWindow,"wx/dialog.h") + +WX_BEGIN_PROPERTIES_TABLE(wxDialog) + WX_PROPERTY( Title,wxString, SetTitle, GetTitle, wxString() , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) + WX_PROPERTY_FLAGS( WindowStyle , wxDialogStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style +WX_END_PROPERTIES_TABLE() + +WX_BEGIN_HANDLERS_TABLE(wxDialog) +WX_END_HANDLERS_TABLE() + +WX_CONSTRUCTOR_6( wxDialog , wxWindow* , Parent , wxWindowID , Id , wxString , Title , wxPoint , Position , wxSize , Size , long , WindowStyle) - style (wxDEFAULT_DIALOG_STYLE) - centered (bool, false ) -*/ +#else +IMPLEMENT_DYNAMIC_CLASS(wxDialog, wxTopLevelWindow) +#endif BEGIN_EVENT_TABLE(wxDialog, wxDialogBase) EVT_BUTTON(wxID_OK, wxDialog::OnOK) diff --git a/src/msw/frame.cpp b/src/msw/frame.cpp index b9bd4090b7..64e7a9d85e 100644 --- a/src/msw/frame.cpp +++ b/src/msw/frame.cpp @@ -131,7 +131,7 @@ WX_END_FLAGS( wxFrameStyle ) IMPLEMENT_DYNAMIC_CLASS_XTI(wxFrame, wxTopLevelWindow,"wx/frame.h") WX_BEGIN_PROPERTIES_TABLE(wxFrame) - WX_DELEGATE( OnMenu , wxEVT_COMMAND_MENU_SELECTED , wxCommandEvent) + WX_EVENT_PROPERTY( Menu , wxEVT_COMMAND_MENU_SELECTED , wxCommandEvent) WX_PROPERTY( Title,wxString, SetTitle, GetTitle, wxString() , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) WX_PROPERTY_FLAGS( WindowStyle , wxFrameStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style diff --git a/src/msw/listbox.cpp b/src/msw/listbox.cpp index 1e18452643..503f55bc3a 100644 --- a/src/msw/listbox.cpp +++ b/src/msw/listbox.cpp @@ -91,8 +91,8 @@ WX_END_FLAGS( wxListBoxStyle ) IMPLEMENT_DYNAMIC_CLASS_XTI(wxListBox, wxControl,"wx/listbox.h") WX_BEGIN_PROPERTIES_TABLE(wxListBox) - WX_DELEGATE( OnSelect , wxEVT_COMMAND_LISTBOX_SELECTED , wxCommandEvent ) - WX_DELEGATE( OnDoubleClick , wxEVT_COMMAND_LISTBOX_DOUBLECLICKED , wxCommandEvent ) + WX_EVENT_PROPERTY( Select , wxEVT_COMMAND_LISTBOX_SELECTED , wxCommandEvent ) + WX_EVENT_PROPERTY( DoubleClick , wxEVT_COMMAND_LISTBOX_DOUBLECLICKED , wxCommandEvent ) 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") ) diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp index e40225b1c0..4b38fc9819 100644 --- a/src/msw/listctrl.cpp +++ b/src/msw/listctrl.cpp @@ -264,7 +264,7 @@ WX_END_FLAGS( wxListCtrlStyle ) IMPLEMENT_DYNAMIC_CLASS_XTI(wxListCtrl, wxControl,"wx/listctrl.h") WX_BEGIN_PROPERTIES_TABLE(wxListCtrl) - WX_DELEGATE( OnTextUpdated , wxEVT_COMMAND_TEXT_UPDATED , wxCommandEvent ) + WX_EVENT_PROPERTY( TextUpdated , wxEVT_COMMAND_TEXT_UPDATED , wxCommandEvent ) WX_PROPERTY_FLAGS( WindowStyle , wxListCtrlStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style WX_END_PROPERTIES_TABLE() diff --git a/src/msw/menu.cpp b/src/msw/menu.cpp index ece5953e23..0c106abb05 100644 --- a/src/msw/menu.cpp +++ b/src/msw/menu.cpp @@ -134,7 +134,7 @@ template<> void wxCollectionToVariantArray( wxMenuItemList const &theList, wxxVa } WX_BEGIN_PROPERTIES_TABLE(wxMenu) - WX_DELEGATE( OnSelect , wxEVT_COMMAND_MENU_SELECTED , wxCommandEvent) + WX_EVENT_PROPERTY( Select , wxEVT_COMMAND_MENU_SELECTED , wxCommandEvent) WX_PROPERTY( Title, wxString , SetTitle, GetTitle, wxString(), 0 /*flags*/ , wxT("Helpstring") , wxT("group") ) WX_READONLY_PROPERTY_FLAGS( MenuStyle , wxMenuStyle , long , GetStyle , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style WX_PROPERTY_COLLECTION( MenuItems , wxMenuItemList , wxMenuItem* , Append , GetMenuItems , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) diff --git a/src/msw/notebook.cpp b/src/msw/notebook.cpp index caa85a7269..372e442059 100644 --- a/src/msw/notebook.cpp +++ b/src/msw/notebook.cpp @@ -165,8 +165,8 @@ template<> void wxCollectionToVariantArray( wxNotebookPageInfoList const &theLis } WX_BEGIN_PROPERTIES_TABLE(wxNotebook) - WX_DELEGATE( OnPageChanging , wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING , wxNotebookEvent ) - WX_DELEGATE( OnPageChanged , wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED , wxNotebookEvent ) + WX_EVENT_PROPERTY( PageChanging , wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING , wxNotebookEvent ) + WX_EVENT_PROPERTY( PageChanged , wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED , wxNotebookEvent ) WX_PROPERTY_COLLECTION( PageInfos , wxNotebookPageInfoList , wxNotebookPageInfo* , AddPageInfo , GetPageInfos , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) WX_PROPERTY_FLAGS( WindowStyle , wxNotebookStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style diff --git a/src/msw/radiobox.cpp b/src/msw/radiobox.cpp index 4fc11d862c..7c7d922839 100644 --- a/src/msw/radiobox.cpp +++ b/src/msw/radiobox.cpp @@ -89,7 +89,7 @@ WX_END_FLAGS( wxRadioBoxStyle ) IMPLEMENT_DYNAMIC_CLASS_XTI(wxRadioBox, wxControl,"wx/radiobox.h") WX_BEGIN_PROPERTIES_TABLE(wxRadioBox) - WX_DELEGATE( OnSelect , wxEVT_COMMAND_RADIOBOX_SELECTED , wxCommandEvent ) + WX_EVENT_PROPERTY( Select , wxEVT_COMMAND_RADIOBOX_SELECTED , wxCommandEvent ) WX_PROPERTY_FLAGS( WindowStyle , wxRadioBoxStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style WX_END_PROPERTIES_TABLE() diff --git a/src/msw/radiobut.cpp b/src/msw/radiobut.cpp index 6ea82634aa..b7f727a367 100644 --- a/src/msw/radiobut.cpp +++ b/src/msw/radiobut.cpp @@ -86,7 +86,7 @@ WX_END_FLAGS( wxRadioButtonStyle ) IMPLEMENT_DYNAMIC_CLASS_XTI(wxRadioButton, wxControl,"wx/radiobut.h") WX_BEGIN_PROPERTIES_TABLE(wxRadioButton) - WX_DELEGATE( OnClick , wxEVT_COMMAND_RADIOBUTTON_SELECTED , wxCommandEvent ) + WX_EVENT_PROPERTY( Click , wxEVT_COMMAND_RADIOBUTTON_SELECTED , wxCommandEvent ) WX_PROPERTY( Font , wxFont , SetFont , GetFont , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) WX_PROPERTY( Label,wxString, SetLabel, GetLabel, wxString(), 0 /*flags*/ , wxT("Helpstring") , wxT("group") ) WX_PROPERTY( Value ,bool, SetValue, GetValue,, 0 /*flags*/ , wxT("Helpstring") , wxT("group") ) diff --git a/src/msw/scrolbar.cpp b/src/msw/scrolbar.cpp index aa0847ee14..745fce820a 100644 --- a/src/msw/scrolbar.cpp +++ b/src/msw/scrolbar.cpp @@ -68,7 +68,7 @@ WX_END_FLAGS( wxScrollBarStyle ) IMPLEMENT_DYNAMIC_CLASS_XTI(wxScrollBar, wxControl,"wx/scrolbar.h") WX_BEGIN_PROPERTIES_TABLE(wxScrollBar) - WX_DELEGATE_RANGE( OnScroll , wxEVT_SCROLL_TOP , wxEVT_SCROLL_ENDSCROLL , wxScrollEvent ) + WX_EVENT_RANGE_PROPERTY( Scroll , wxEVT_SCROLL_TOP , wxEVT_SCROLL_ENDSCROLL , wxScrollEvent ) 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")) diff --git a/src/msw/slider95.cpp b/src/msw/slider95.cpp index 0f1726f0da..6d1ef94111 100644 --- a/src/msw/slider95.cpp +++ b/src/msw/slider95.cpp @@ -84,8 +84,8 @@ WX_END_FLAGS( wxSliderStyle ) IMPLEMENT_DYNAMIC_CLASS_XTI(wxSlider95, wxControl,"wx/scrolbar.h") WX_BEGIN_PROPERTIES_TABLE(wxSlider95) - WX_DELEGATE_RANGE( OnScroll , wxEVT_SCROLL_TOP , wxEVT_SCROLL_ENDSCROLL , wxScrollEvent ) - WX_DELEGATE( OnUpdated , wxEVT_COMMAND_SLIDER_UPDATED , wxCommandEvent ) + WX_EVENT_RANGE_PROPERTY( Scroll , wxEVT_SCROLL_TOP , wxEVT_SCROLL_ENDSCROLL , wxScrollEvent ) + WX_EVENT_PROPERTY( Updated , wxEVT_COMMAND_SLIDER_UPDATED , wxCommandEvent ) 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")) diff --git a/src/msw/spinbutt.cpp b/src/msw/spinbutt.cpp index 9e739763d2..46754d240f 100644 --- a/src/msw/spinbutt.cpp +++ b/src/msw/spinbutt.cpp @@ -97,7 +97,7 @@ WX_END_FLAGS( wxSpinButtonStyle ) IMPLEMENT_DYNAMIC_CLASS_XTI(wxSpinButton, wxControl,"wx/spinbut.h") WX_BEGIN_PROPERTIES_TABLE(wxSpinButton) - WX_DELEGATE_RANGE( OnSpin , wxEVT_SCROLL_TOP , wxEVT_SCROLL_ENDSCROLL , wxSpinEvent ) + WX_EVENT_RANGE_PROPERTY( Spin , wxEVT_SCROLL_TOP , wxEVT_SCROLL_ENDSCROLL , wxSpinEvent ) 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")) diff --git a/src/msw/spinctrl.cpp b/src/msw/spinctrl.cpp index 1a5a8b1f12..f8a77a7fc0 100644 --- a/src/msw/spinctrl.cpp +++ b/src/msw/spinctrl.cpp @@ -91,10 +91,10 @@ WX_END_FLAGS( wxSpinCtrlStyle ) IMPLEMENT_DYNAMIC_CLASS_XTI(wxSpinCtrl, wxControl,"wx/spinbut.h") WX_BEGIN_PROPERTIES_TABLE(wxSpinCtrl) - WX_DELEGATE_RANGE( OnSpin , wxEVT_SCROLL_TOP , wxEVT_SCROLL_ENDSCROLL , wxSpinEvent ) - WX_DELEGATE( OnUpdated , wxEVT_COMMAND_SPINCTRL_UPDATED , wxCommandEvent ) - WX_DELEGATE( OnTextUpdated , wxEVT_COMMAND_TEXT_UPDATED , wxCommandEvent ) - WX_DELEGATE( OnTextEnter , wxEVT_COMMAND_TEXT_ENTER , wxCommandEvent ) + WX_EVENT_RANGE_PROPERTY( Spin , wxEVT_SCROLL_TOP , wxEVT_SCROLL_ENDSCROLL , wxSpinEvent ) + WX_EVENT_PROPERTY( Updated , wxEVT_COMMAND_SPINCTRL_UPDATED , wxCommandEvent ) + WX_EVENT_PROPERTY( TextUpdated , wxEVT_COMMAND_TEXT_UPDATED , wxCommandEvent ) + WX_EVENT_PROPERTY( TextEnter , wxEVT_COMMAND_TEXT_ENTER , wxCommandEvent ) 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")) diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index ef301f96b9..36b2717034 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -169,8 +169,8 @@ WX_END_FLAGS( wxTextCtrlStyle ) IMPLEMENT_DYNAMIC_CLASS_XTI(wxTextCtrl, wxControl,"wx/textctrl.h") WX_BEGIN_PROPERTIES_TABLE(wxTextCtrl) - WX_DELEGATE( OnTextUpdated , wxEVT_COMMAND_TEXT_UPDATED , wxCommandEvent ) - WX_DELEGATE( OnTextEnter , wxEVT_COMMAND_TEXT_ENTER , wxCommandEvent ) + WX_EVENT_PROPERTY( TextUpdated , wxEVT_COMMAND_TEXT_UPDATED , wxCommandEvent ) + WX_EVENT_PROPERTY( TextEnter , wxEVT_COMMAND_TEXT_ENTER , wxCommandEvent ) WX_PROPERTY( Font , wxFont , SetFont , GetFont ,, 0 /*flags*/ , wxT("Helpstring") , wxT("group") ) WX_PROPERTY( Value , wxString , SetValue, GetValue, wxString() , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) diff --git a/src/msw/treectrl.cpp b/src/msw/treectrl.cpp index 9ecd6aebf1..d18f109ad9 100644 --- a/src/msw/treectrl.cpp +++ b/src/msw/treectrl.cpp @@ -521,8 +521,8 @@ WX_END_FLAGS( wxTreeCtrlStyle ) IMPLEMENT_DYNAMIC_CLASS_XTI(wxTreeCtrl, wxControl,"wx/treectrl.h") WX_BEGIN_PROPERTIES_TABLE(wxTreeCtrl) - WX_DELEGATE( OnTextUpdated , wxEVT_COMMAND_TEXT_UPDATED , wxCommandEvent ) - WX_DELEGATE_RANGE( OnTreeEvent , wxEVT_COMMAND_TREE_BEGIN_DRAG , wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK , wxTreeEvent ) + WX_EVENT_PROPERTY( TextUpdated , wxEVT_COMMAND_TEXT_UPDATED , wxCommandEvent ) + WX_EVENT_RANGE_PROPERTY( TreeEvent , wxEVT_COMMAND_TREE_BEGIN_DRAG , wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK , wxTreeEvent ) WX_PROPERTY_FLAGS( WindowStyle , wxTreeCtrlStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style WX_END_PROPERTIES_TABLE() diff --git a/src/msw/window.cpp b/src/msw/window.cpp index baf19c19f3..e49dbd0082 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -287,9 +287,9 @@ WX_BEGIN_FLAGS( wxWindowStyle ) WX_END_FLAGS( wxWindowStyle ) WX_BEGIN_PROPERTIES_TABLE(wxWindow) - WX_DELEGATE( OnClose , wxEVT_CLOSE_WINDOW , wxCloseEvent) - WX_DELEGATE( OnCreate , wxEVT_CREATE , wxWindowCreateEvent ) - WX_DELEGATE( OnDestroy , wxEVT_DESTROY , wxWindowDestroyEvent ) + WX_EVENT_PROPERTY( Close , wxEVT_CLOSE_WINDOW , wxCloseEvent) + WX_EVENT_PROPERTY( Create , wxEVT_CREATE , wxWindowCreateEvent ) + WX_EVENT_PROPERTY( Destroy , wxEVT_DESTROY , wxWindowDestroyEvent ) // Always constructor Properties first WX_READONLY_PROPERTY( Parent,wxWindow*, GetParent, , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) -- 2.45.2