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() ) ; \
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
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") )
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"))
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()
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"))
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"))
// 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)
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
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") )
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()
}
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"))
}
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
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()
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") )
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"))
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"))
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"))
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"))
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"))
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()
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"))