From ce7fe42e848cc0c9058dae906c3a7bded50681e6 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 25 Apr 2013 10:11:03 +0000 Subject: [PATCH] Provide shorter synonyms for wxEVT_XXX constants. Use the same short names as are used by the event table macros for the event type constants themselves. This makes them much more comfortable to use, e.g. Bind(wxEVT_BUTTON) compared to Bind(wxEVT_COMMAND_BUTTON_CLICKED). The old long names are still kept for backwards compatibility and shouldn't be removed as it doesn't really cost anything to continue providing them, but all new event types should only use the short versions. Closes #10661. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73850 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- demos/forty/playerdg.cpp | 2 +- docs/changes.txt | 4 + include/wx/aui/auibar.h | 47 +++--- include/wx/aui/auibook.h | 138 +++++++++------- include/wx/bookctrl.h | 12 +- include/wx/choicebk.h | 12 +- include/wx/clrpicker.h | 9 +- include/wx/collpane.h | 9 +- include/wx/dataview.h | 65 +++++--- include/wx/docview.h | 2 +- include/wx/event.h | 165 +++++++++++--------- include/wx/fdrepdlg.h | 27 ++-- include/wx/filepicker.h | 20 ++- include/wx/fontpicker.h | 9 +- include/wx/generic/dirctrlg.h | 11 +- include/wx/generic/filepickerg.h | 11 +- include/wx/generic/headerctrlg.h | 2 +- include/wx/generic/splitter.h | 23 ++- include/wx/headerctrl.h | 43 +++-- include/wx/html/htmlwin.h | 19 ++- include/wx/hyperlink.h | 8 +- include/wx/listbase.h | 72 ++++++--- include/wx/listbook.h | 12 +- include/wx/motif/checkbox.h | 4 +- include/wx/motif/tglbtn.h | 2 +- include/wx/msw/checklst.h | 2 +- include/wx/notebook.h | 14 +- include/wx/osx/fontdlg.h | 14 +- include/wx/osx/treectrl.h | 72 +++++---- include/wx/propgrid/editors.h | 2 +- include/wx/propgrid/property.h | 2 +- include/wx/propgrid/propgrid.h | 2 +- include/wx/propgrid/props.h | 2 +- include/wx/ribbon/bar.h | 83 +++++----- include/wx/ribbon/buttonbar.h | 20 ++- include/wx/ribbon/gallery.h | 25 +-- include/wx/ribbon/panel.h | 11 +- include/wx/ribbon/toolbar.h | 20 ++- include/wx/richtext/richtextborderspage.h | 2 +- include/wx/richtext/richtextbulletspage.h | 28 ++-- include/wx/richtext/richtextctrl.h | 151 ++++++++++-------- include/wx/richtext/richtextfontpage.h | 22 +-- include/wx/richtext/richtextindentspage.h | 24 +-- include/wx/richtext/richtextliststylepage.h | 52 +++--- include/wx/richtext/richtextsizepage.h | 4 +- include/wx/richtext/richtextstyledlg.h | 18 +-- include/wx/richtext/richtextsymboldlg.h | 10 +- include/wx/richtext/richtexttabspage.h | 8 +- include/wx/simplebook.h | 4 +- include/wx/spinctrl.h | 12 +- include/wx/splitter.h | 8 +- include/wx/srchctrl.h | 12 +- include/wx/textctrl.h | 22 ++- include/wx/textentry.h | 6 +- include/wx/tglbtn.h | 7 +- include/wx/toolbook.h | 12 +- include/wx/treebase.h | 75 ++++++--- include/wx/treebook.h | 22 ++- include/wx/treectrl.h | 4 +- include/wx/treelist.h | 13 +- include/wx/vlbox.h | 2 +- include/wx/webview.h | 32 ++-- interface/wx/aui/auibar.h | 10 +- interface/wx/aui/auibook.h | 60 +++---- interface/wx/bmpbuttn.h | 2 +- interface/wx/bmpcbox.h | 8 +- interface/wx/button.h | 2 +- interface/wx/checkbox.h | 6 +- interface/wx/checklst.h | 4 +- interface/wx/choice.h | 2 +- interface/wx/choicebk.h | 8 +- interface/wx/clrpicker.h | 2 +- interface/wx/collpane.h | 2 +- interface/wx/combo.h | 16 +- interface/wx/combobox.h | 20 +-- interface/wx/dataview.h | 132 ++++++++-------- interface/wx/defs.h | 2 +- interface/wx/dirctrl.h | 2 +- interface/wx/event.h | 100 ++++++------ interface/wx/fdrepdlg.h | 10 +- interface/wx/filepicker.h | 4 +- interface/wx/fontpicker.h | 2 +- interface/wx/headerctrl.h | 26 +-- interface/wx/html/htmlwin.h | 6 +- interface/wx/htmllbox.h | 4 +- interface/wx/hyperlink.h | 2 +- interface/wx/listbook.h | 8 +- interface/wx/listbox.h | 4 +- interface/wx/listctrl.h | 88 +++++------ interface/wx/menu.h | 2 +- interface/wx/menuitem.h | 4 +- interface/wx/notebook.h | 8 +- interface/wx/odcombo.h | 2 +- interface/wx/propgrid/editors.h | 4 +- interface/wx/propgrid/property.h | 2 +- interface/wx/radiobox.h | 2 +- interface/wx/radiobut.h | 4 +- interface/wx/richtext/richtextctrl.h | 50 +++--- interface/wx/simplebook.h | 4 +- interface/wx/slider.h | 2 +- interface/wx/spinctrl.h | 10 +- interface/wx/splitter.h | 42 ++--- interface/wx/srchctrl.h | 6 +- interface/wx/textctrl.h | 14 +- interface/wx/textentry.h | 8 +- interface/wx/tglbtn.h | 6 +- interface/wx/toolbar.h | 14 +- interface/wx/toolbook.h | 8 +- interface/wx/toplevel.h | 2 +- interface/wx/treebook.h | 16 +- interface/wx/treectrl.h | 86 +++++----- interface/wx/treelist.h | 32 ++-- interface/wx/webview.h | 40 ++--- samples/combo/combo.cpp | 6 +- samples/dataview/dataview.cpp | 30 ++-- samples/dialogs/dialogs.cpp | 22 +-- samples/dnd/dnd.cpp | 2 +- samples/docview/doc.cpp | 2 +- samples/event/event.cpp | 26 +-- samples/fswatcher/fswatcher.cpp | 16 +- samples/keyboard/keyboard.cpp | 18 +-- samples/layout/layout.cpp | 4 +- samples/mediaplayer/mediaplayer.cpp | 44 +++--- samples/notebook/notebook.cpp | 24 +-- samples/ownerdrw/ownerdrw.cpp | 2 +- samples/preferences/preferences.cpp | 10 +- samples/propgrid/propgrid.cpp | 2 +- samples/regtest/regtest.cpp | 4 +- samples/ribbon/ribbondemo.cpp | 2 +- samples/scroll/scroll.cpp | 6 +- samples/webview/webview.cpp | 94 +++++------ samples/widgets/bmpcombobox.cpp | 2 +- samples/widgets/combobox.cpp | 2 +- samples/widgets/odcombobox.cpp | 2 +- samples/widgets/searchctrl.cpp | 2 +- samples/widgets/statbmp.cpp | 4 +- samples/widgets/static.cpp | 6 +- samples/widgets/widgets.h | 4 +- samples/wrapsizer/wrapsizer.cpp | 2 +- samples/xrc/myframe.cpp | 2 +- samples/xrc/objrefdlg.cpp | 6 +- src/aui/auibar.cpp | 28 ++-- src/aui/auibook.cpp | 106 ++++++------- src/aui/tabart.cpp | 2 +- src/cocoa/bmpbuttn.mm | 2 +- src/cocoa/button.mm | 2 +- src/cocoa/checkbox.mm | 2 +- src/cocoa/choice.mm | 2 +- src/cocoa/combobox.mm | 6 +- src/cocoa/notebook.mm | 4 +- src/cocoa/radiobox.mm | 2 +- src/cocoa/radiobut.mm | 2 +- src/cocoa/toolbar.mm | 2 +- src/common/btncmn.cpp | 2 +- src/common/checkboxcmn.cpp | 2 +- src/common/checklstcmn.cpp | 2 +- src/common/choiccmn.cpp | 2 +- src/common/clrpickercmn.cpp | 4 +- src/common/combocmn.cpp | 14 +- src/common/datavcmn.cpp | 44 +++--- src/common/dlgcmn.cpp | 2 +- src/common/event.cpp | 48 +++--- src/common/fddlgcmn.cpp | 20 +-- src/common/filepickercmn.cpp | 4 +- src/common/fontpickercmn.cpp | 4 +- src/common/framecmn.cpp | 2 +- src/common/headerctrlcmn.cpp | 26 +-- src/common/hyperlnkcmn.cpp | 2 +- src/common/lboxcmn.cpp | 6 +- src/common/listctrlcmn.cpp | 42 ++--- src/common/menucmn.cpp | 4 +- src/common/nbkbase.cpp | 12 +- src/common/pickerbase.cpp | 2 +- src/common/prntbase.cpp | 2 +- src/common/radiobtncmn.cpp | 2 +- src/common/radiocmn.cpp | 2 +- src/common/slidercmn.cpp | 2 +- src/common/spinctrlcmn.cpp | 10 +- src/common/srchcmn.cpp | 4 +- src/common/tbarbase.cpp | 6 +- src/common/textcmn.cpp | 14 +- src/common/textentrycmn.cpp | 4 +- src/common/treebase.cpp | 48 +++--- src/common/webview.cpp | 12 +- src/common/wincmn.cpp | 4 +- src/generic/aboutdlgg.cpp | 2 +- src/generic/buttonbar.cpp | 2 +- src/generic/calctrlg.cpp | 6 +- src/generic/choicbkg.cpp | 8 +- src/generic/clrpickerg.cpp | 2 +- src/generic/collpaneg.cpp | 2 +- src/generic/datavgen.cpp | 38 ++--- src/generic/dirctrlg.cpp | 4 +- src/generic/editlbox.cpp | 4 +- src/generic/fdrepdlg.cpp | 10 +- src/generic/filepickerg.cpp | 2 +- src/generic/fontpickerg.cpp | 2 +- src/generic/headerctrlg.cpp | 26 +-- src/generic/hyperlinkg.cpp | 2 +- src/generic/listbkg.cpp | 8 +- src/generic/listctrl.cpp | 54 +++---- src/generic/mdig.cpp | 4 +- src/generic/notebook.cpp | 4 +- src/generic/odcombo.cpp | 2 +- src/generic/spinctlg.cpp | 4 +- src/generic/splitter.cpp | 20 +-- src/generic/srchctlg.cpp | 8 +- src/generic/toolbkg.cpp | 8 +- src/generic/treebkg.cpp | 16 +- src/generic/treectlg.cpp | 52 +++--- src/generic/treelist.cpp | 16 +- src/generic/vlbox.cpp | 4 +- src/gtk/button.cpp | 2 +- src/gtk/checkbox.cpp | 2 +- src/gtk/checklst.cpp | 2 +- src/gtk/choice.cpp | 2 +- src/gtk/collpane.cpp | 2 +- src/gtk/combobox.cpp | 12 +- src/gtk/dataview.cpp | 36 ++--- src/gtk/filepicker.cpp | 6 +- src/gtk/infobar.cpp | 2 +- src/gtk/listbox.cpp | 4 +- src/gtk/radiobox.cpp | 2 +- src/gtk/radiobut.cpp | 2 +- src/gtk/slider.cpp | 2 +- src/gtk/spinctrl.cpp | 10 +- src/gtk/textctrl.cpp | 2 +- src/gtk/textentry.cpp | 10 +- src/gtk/tglbtn.cpp | 4 +- src/gtk/toolbar.cpp | 2 +- src/gtk/webview_webkit.cpp | 12 +- src/gtk/window.cpp | 4 +- src/gtk1/bmpbuttn.cpp | 2 +- src/gtk1/button.cpp | 2 +- src/gtk1/checkbox.cpp | 2 +- src/gtk1/choice.cpp | 2 +- src/gtk1/combobox.cpp | 14 +- src/gtk1/dialog.cpp | 2 +- src/gtk1/fontdlg.cpp | 4 +- src/gtk1/listbox.cpp | 14 +- src/gtk1/menu.cpp | 2 +- src/gtk1/radiobox.cpp | 2 +- src/gtk1/radiobut.cpp | 2 +- src/gtk1/scrolbar.cpp | 2 +- src/gtk1/slider.cpp | 2 +- src/gtk1/spinctrl.cpp | 8 +- src/gtk1/textctrl.cpp | 8 +- src/gtk1/tglbtn.cpp | 4 +- src/gtk1/window.cpp | 4 +- src/html/htmlwin.cpp | 12 +- src/motif/button.cpp | 2 +- src/motif/checkbox.cpp | 2 +- src/motif/checklst.cpp | 2 +- src/motif/choice.cpp | 2 +- src/motif/combobox.cpp | 4 +- src/motif/combobox_native.cpp | 4 +- src/motif/listbox.cpp | 4 +- src/motif/menuitem.cpp | 2 +- src/motif/radiobox.cpp | 2 +- src/motif/radiobut.cpp | 4 +- src/motif/slider.cpp | 2 +- src/motif/textctrl.cpp | 4 +- src/motif/window.cpp | 4 +- src/msw/button.cpp | 2 +- src/msw/checkbox.cpp | 2 +- src/msw/choice.cpp | 4 +- src/msw/combobox.cpp | 14 +- src/msw/dialog.cpp | 2 +- src/msw/fdrepdlg.cpp | 8 +- src/msw/headerctrl.cpp | 28 ++-- src/msw/listbox.cpp | 4 +- src/msw/listctrl.cpp | 54 +++---- src/msw/mdi.cpp | 2 +- src/msw/notebook.cpp | 4 +- src/msw/radiobox.cpp | 4 +- src/msw/radiobut.cpp | 2 +- src/msw/slider.cpp | 2 +- src/msw/spinctrl.cpp | 6 +- src/msw/textctrl.cpp | 4 +- src/msw/textentry.cpp | 2 +- src/msw/tglbtn.cpp | 4 +- src/msw/toolbar.cpp | 2 +- src/msw/treectrl.cpp | 136 ++++++++-------- src/msw/webview_ie.cpp | 16 +- src/msw/wince/checklst.cpp | 4 +- src/msw/wince/choicece.cpp | 4 +- src/msw/wince/menuce.cpp | 2 +- src/msw/wince/tbarwce.cpp | 2 +- src/msw/wince/textctrlce.cpp | 8 +- src/msw/window.cpp | 10 +- src/os2/button.cpp | 2 +- src/os2/checkbox.cpp | 2 +- src/os2/checklst.cpp | 2 +- src/os2/choice.cpp | 2 +- src/os2/combobox.cpp | 4 +- src/os2/listbox.cpp | 4 +- src/os2/listctrl.cpp | 10 +- src/os2/notebook.cpp | 4 +- src/os2/radiobox.cpp | 2 +- src/os2/radiobut.cpp | 2 +- src/os2/slider.cpp | 2 +- src/os2/spinctrl.cpp | 6 +- src/os2/textctrl.cpp | 4 +- src/os2/tglbtn.cpp | 4 +- src/os2/treectrl.cpp | 20 +-- src/os2/window.cpp | 2 +- src/osx/button_osx.cpp | 4 +- src/osx/carbon/app.cpp | 4 +- src/osx/carbon/combobox.cpp | 10 +- src/osx/carbon/combobxc.cpp | 12 +- src/osx/carbon/dataview.cpp | 30 ++-- src/osx/carbon/fontdlg.cpp | 16 +- src/osx/carbon/listbox.cpp | 4 +- src/osx/carbon/listctrl_mac.cpp | 40 ++--- src/osx/carbon/taskbar.cpp | 2 +- src/osx/checkbox_osx.cpp | 2 +- src/osx/checklst_osx.cpp | 2 +- src/osx/choice_osx.cpp | 2 +- src/osx/cocoa/combobox.mm | 4 +- src/osx/cocoa/dataview.mm | 36 ++--- src/osx/cocoa/filedlg.mm | 2 +- src/osx/cocoa/listbox.mm | 2 +- src/osx/cocoa/preferences.mm | 2 +- src/osx/cocoa/textctrl.mm | 6 +- src/osx/cocoa/window.mm | 4 +- src/osx/combobox_osx.cpp | 2 +- src/osx/dataview_osx.cpp | 6 +- src/osx/iphone/textctrl.mm | 4 +- src/osx/iphone/window.mm | 2 +- src/osx/listbox_osx.cpp | 4 +- src/osx/menu_osx.cpp | 2 +- src/osx/notebook_osx.cpp | 4 +- src/osx/radiobox_osx.cpp | 4 +- src/osx/radiobut_osx.cpp | 2 +- src/osx/slider_osx.cpp | 2 +- src/osx/srchctrl_osx.cpp | 4 +- src/osx/textctrl_osx.cpp | 12 +- src/osx/tglbtn_osx.cpp | 4 +- src/osx/webview_webkit.mm | 14 +- src/osx/window_osx.cpp | 4 +- src/propgrid/advprops.cpp | 2 +- src/propgrid/editors.cpp | 10 +- src/propgrid/manager.cpp | 12 +- src/propgrid/propgrid.cpp | 20 +-- src/propgrid/props.cpp | 10 +- src/ribbon/bar.cpp | 34 ++-- src/ribbon/buttonbar.cpp | 8 +- src/ribbon/gallery.cpp | 16 +- src/ribbon/panel.cpp | 4 +- src/ribbon/toolbar.cpp | 8 +- src/richtext/richtextborderspage.cpp | 2 +- src/richtext/richtextbuffer.cpp | 20 +-- src/richtext/richtextbulletspage.cpp | 28 ++-- src/richtext/richtextctrl.cpp | 64 ++++---- src/richtext/richtextfontpage.cpp | 26 +-- src/richtext/richtextformatdlg.cpp | 2 +- src/richtext/richtextimagedlg.cpp | 4 +- src/richtext/richtextindentspage.cpp | 24 +-- src/richtext/richtextliststylepage.cpp | 52 +++--- src/richtext/richtextsizepage.cpp | 4 +- src/richtext/richtextstyledlg.cpp | 18 +-- src/richtext/richtextsymboldlg.cpp | 6 +- src/richtext/richtexttabspage.cpp | 8 +- src/stc/stc.cpp | 2 +- src/univ/button.cpp | 2 +- src/univ/checkbox.cpp | 2 +- src/univ/checklst.cpp | 2 +- src/univ/choice.cpp | 2 +- src/univ/combobox.cpp | 2 +- src/univ/dialog.cpp | 2 +- src/univ/listbox.cpp | 4 +- src/univ/radiobox.cpp | 4 +- src/univ/radiobut.cpp | 2 +- src/univ/slider.cpp | 2 +- src/univ/textctrl.cpp | 4 +- src/univ/tglbtn.cpp | 4 +- src/univ/winuniv.cpp | 6 +- src/x11/textctrl.cpp | 2 +- tests/controls/bitmaptogglebuttontest.cpp | 4 +- tests/controls/buttontest.cpp | 4 +- tests/controls/checkboxtest.cpp | 2 +- tests/controls/checklistboxtest.cpp | 2 +- tests/controls/choicebooktest.cpp | 4 +- tests/controls/comboboxtest.cpp | 4 +- tests/controls/hyperlinkctrltest.cpp | 2 +- tests/controls/listbasetest.cpp | 20 +-- tests/controls/listbooktest.cpp | 4 +- tests/controls/listboxtest.cpp | 8 +- tests/controls/listctrltest.cpp | 10 +- tests/controls/notebooktest.cpp | 4 +- tests/controls/ownerdrawncomboboxtest.cpp | 4 +- tests/controls/radiobuttontest.cpp | 4 +- tests/controls/richtextctrltest.cpp | 20 +-- tests/controls/spinctrldbltest.cpp | 2 +- tests/controls/spinctrltest.cpp | 6 +- tests/controls/textctrltest.cpp | 14 +- tests/controls/textentrytest.cpp | 4 +- tests/controls/togglebuttontest.cpp | 4 +- tests/controls/toolbooktest.cpp | 4 +- tests/controls/treebooktest.cpp | 4 +- tests/controls/treectrltest.cpp | 26 +-- tests/controls/webtest.cpp | 3 +- tests/html/htmlwindow.cpp | 4 +- tests/menu/menu.cpp | 4 +- utils/screenshotgen/src/guiframe.cpp | 20 +-- 405 files changed, 2715 insertions(+), 2421 deletions(-) diff --git a/demos/forty/playerdg.cpp b/demos/forty/playerdg.cpp index b1b1f71e07..82cf4da6e8 100644 --- a/demos/forty/playerdg.cpp +++ b/demos/forty/playerdg.cpp @@ -102,7 +102,7 @@ void PlayerSelectionDialog::OnCloseWindow(wxCloseEvent& WXUNUSED(event)) void PlayerSelectionDialog::SelectCallback(wxCommandEvent& event) { - if (event.GetEventType() == wxEVT_COMMAND_LISTBOX_SELECTED) + if (event.GetEventType() == wxEVT_LISTBOX) { // if (event.IsSelection()) m_textField->SetValue(event.GetString()); diff --git a/docs/changes.txt b/docs/changes.txt index 147ad8a039..f53582277b 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -550,6 +550,10 @@ INCOMPATIBLE CHANGES SINCE 2.9.4: All: +- Provide short synonyms using the same name as event table macros for the + event type constants to make using Bind() less verbose. E.g. + wxEVT_COMMAND_MENU_SELECTED is now wxEVT_MENU (but the old name remains + available for compatibility) (Catalin Raceanu). - Add wxEvtHandler::CallAfter() method for asynchronous method calls. - Add support for symlinks to wxFileName (David Hart). - Add wxDIR_NO_FOLLOW flag for wxDir traversal (David Hart). diff --git a/include/wx/aui/auibar.h b/include/wx/aui/auibar.h index d3ecc3fef8..066ff62f45 100644 --- a/include/wx/aui/auibar.h +++ b/include/wx/aui/auibar.h @@ -704,11 +704,11 @@ private: #ifndef SWIG -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN, wxAuiToolBarEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUITOOLBAR_OVERFLOW_CLICK, wxAuiToolBarEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUITOOLBAR_RIGHT_CLICK, wxAuiToolBarEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUITOOLBAR_MIDDLE_CLICK, wxAuiToolBarEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUITOOLBAR_BEGIN_DRAG, wxAuiToolBarEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI, wxEVT_AUITOOLBAR_TOOL_DROPDOWN, wxAuiToolBarEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI, wxEVT_AUITOOLBAR_OVERFLOW_CLICK, wxAuiToolBarEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI, wxEVT_AUITOOLBAR_RIGHT_CLICK, wxAuiToolBarEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI, wxEVT_AUITOOLBAR_MIDDLE_CLICK, wxAuiToolBarEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI, wxEVT_AUITOOLBAR_BEGIN_DRAG, wxAuiToolBarEvent ); typedef void (wxEvtHandler::*wxAuiToolBarEventFunction)(wxAuiToolBarEvent&); @@ -716,34 +716,41 @@ typedef void (wxEvtHandler::*wxAuiToolBarEventFunction)(wxAuiToolBarEvent&); wxEVENT_HANDLER_CAST(wxAuiToolBarEventFunction, func) #define EVT_AUITOOLBAR_TOOL_DROPDOWN(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN, winid, wxAuiToolBarEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_AUITOOLBAR_TOOL_DROPDOWN, winid, wxAuiToolBarEventHandler(fn)) #define EVT_AUITOOLBAR_OVERFLOW_CLICK(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_AUITOOLBAR_OVERFLOW_CLICK, winid, wxAuiToolBarEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_AUITOOLBAR_OVERFLOW_CLICK, winid, wxAuiToolBarEventHandler(fn)) #define EVT_AUITOOLBAR_RIGHT_CLICK(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_AUITOOLBAR_RIGHT_CLICK, winid, wxAuiToolBarEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_AUITOOLBAR_RIGHT_CLICK, winid, wxAuiToolBarEventHandler(fn)) #define EVT_AUITOOLBAR_MIDDLE_CLICK(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_AUITOOLBAR_MIDDLE_CLICK, winid, wxAuiToolBarEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_AUITOOLBAR_MIDDLE_CLICK, winid, wxAuiToolBarEventHandler(fn)) #define EVT_AUITOOLBAR_BEGIN_DRAG(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_AUITOOLBAR_BEGIN_DRAG, winid, wxAuiToolBarEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_AUITOOLBAR_BEGIN_DRAG, winid, wxAuiToolBarEventHandler(fn)) #else // wxpython/swig event work -%constant wxEventType wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN; -%constant wxEventType wxEVT_COMMAND_AUITOOLBAR_OVERFLOW_CLICK; -%constant wxEventType wxEVT_COMMAND_AUITOOLBAR_RIGHT_CLICK; -%constant wxEventType wxEVT_COMMAND_AUITOOLBAR_MIDDLE_CLICK; -%constant wxEventType wxEVT_COMMAND_AUITOOLBAR_BEGIN_DRAG; +%constant wxEventType wxEVT_AUITOOLBAR_TOOL_DROPDOWN; +%constant wxEventType wxEVT_AUITOOLBAR_OVERFLOW_CLICK; +%constant wxEventType wxEVT_AUITOOLBAR_RIGHT_CLICK; +%constant wxEventType wxEVT_AUITOOLBAR_MIDDLE_CLICK; +%constant wxEventType wxEVT_AUITOOLBAR_BEGIN_DRAG; %pythoncode { - EVT_AUITOOLBAR_TOOL_DROPDOWN = wx.PyEventBinder( wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN, 1 ) - EVT_AUITOOLBAR_OVERFLOW_CLICK = wx.PyEventBinder( wxEVT_COMMAND_AUITOOLBAR_OVERFLOW_CLICK, 1 ) - EVT_AUITOOLBAR_RIGHT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_AUITOOLBAR_RIGHT_CLICK, 1 ) - EVT_AUITOOLBAR_MIDDLE_CLICK = wx.PyEventBinder( wxEVT_COMMAND_AUITOOLBAR_MIDDLE_CLICK, 1 ) - EVT_AUITOOLBAR_BEGIN_DRAG = wx.PyEventBinder( wxEVT_COMMAND_AUITOOLBAR_BEGIN_DRAG, 1 ) + EVT_AUITOOLBAR_TOOL_DROPDOWN = wx.PyEventBinder( wxEVT_AUITOOLBAR_TOOL_DROPDOWN, 1 ) + EVT_AUITOOLBAR_OVERFLOW_CLICK = wx.PyEventBinder( wxEVT_AUITOOLBAR_OVERFLOW_CLICK, 1 ) + EVT_AUITOOLBAR_RIGHT_CLICK = wx.PyEventBinder( wxEVT_AUITOOLBAR_RIGHT_CLICK, 1 ) + EVT_AUITOOLBAR_MIDDLE_CLICK = wx.PyEventBinder( wxEVT_AUITOOLBAR_MIDDLE_CLICK, 1 ) + EVT_AUITOOLBAR_BEGIN_DRAG = wx.PyEventBinder( wxEVT_AUITOOLBAR_BEGIN_DRAG, 1 ) } #endif // SWIG +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN wxEVT_AUITOOLBAR_TOOL_DROPDOWN +#define wxEVT_COMMAND_AUITOOLBAR_OVERFLOW_CLICK wxEVT_AUITOOLBAR_OVERFLOW_CLICK +#define wxEVT_COMMAND_AUITOOLBAR_RIGHT_CLICK wxEVT_AUITOOLBAR_RIGHT_CLICK +#define wxEVT_COMMAND_AUITOOLBAR_MIDDLE_CLICK wxEVT_AUITOOLBAR_MIDDLE_CLICK +#define wxEVT_COMMAND_AUITOOLBAR_BEGIN_DRAG wxEVT_AUITOOLBAR_BEGIN_DRAG + #endif // wxUSE_AUI #endif // _WX_AUIBAR_H_ diff --git a/include/wx/aui/auibook.h b/include/wx/aui/auibook.h index d42d784c5d..17b3fdae9f 100644 --- a/include/wx/aui/auibook.h +++ b/include/wx/aui/auibook.h @@ -444,21 +444,21 @@ protected: #ifndef SWIG -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, wxAuiNotebookEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, wxAuiNotebookEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING, wxAuiNotebookEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSED, wxAuiNotebookEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_BUTTON, wxAuiNotebookEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG, wxAuiNotebookEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_END_DRAG, wxAuiNotebookEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION, wxAuiNotebookEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_ALLOW_DND, wxAuiNotebookEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN, wxAuiNotebookEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP, wxAuiNotebookEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN, wxAuiNotebookEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP, wxAuiNotebookEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_DRAG_DONE, wxAuiNotebookEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK, wxAuiNotebookEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_AUINOTEBOOK_PAGE_CLOSE, wxAuiNotebookEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_AUINOTEBOOK_PAGE_CHANGED, wxAuiNotebookEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_AUINOTEBOOK_PAGE_CHANGING, wxAuiNotebookEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_AUINOTEBOOK_PAGE_CLOSED, wxAuiNotebookEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_AUINOTEBOOK_BUTTON, wxAuiNotebookEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_AUINOTEBOOK_BEGIN_DRAG, wxAuiNotebookEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_AUINOTEBOOK_END_DRAG, wxAuiNotebookEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_AUINOTEBOOK_DRAG_MOTION, wxAuiNotebookEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_AUINOTEBOOK_ALLOW_DND, wxAuiNotebookEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_AUINOTEBOOK_TAB_MIDDLE_DOWN, wxAuiNotebookEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_AUINOTEBOOK_TAB_MIDDLE_UP, wxAuiNotebookEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_AUINOTEBOOK_TAB_RIGHT_DOWN, wxAuiNotebookEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_AUINOTEBOOK_TAB_RIGHT_UP, wxAuiNotebookEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_AUINOTEBOOK_DRAG_DONE, wxAuiNotebookEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_AUINOTEBOOK_BG_DCLICK, wxAuiNotebookEvent); typedef void (wxEvtHandler::*wxAuiNotebookEventFunction)(wxAuiNotebookEvent&); @@ -466,73 +466,91 @@ typedef void (wxEvtHandler::*wxAuiNotebookEventFunction)(wxAuiNotebookEvent&); wxEVENT_HANDLER_CAST(wxAuiNotebookEventFunction, func) #define EVT_AUINOTEBOOK_PAGE_CLOSE(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, winid, wxAuiNotebookEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_AUINOTEBOOK_PAGE_CLOSE, winid, wxAuiNotebookEventHandler(fn)) #define EVT_AUINOTEBOOK_PAGE_CLOSED(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSED, winid, wxAuiNotebookEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_AUINOTEBOOK_PAGE_CLOSED, winid, wxAuiNotebookEventHandler(fn)) #define EVT_AUINOTEBOOK_PAGE_CHANGED(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, winid, wxAuiNotebookEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_AUINOTEBOOK_PAGE_CHANGED, winid, wxAuiNotebookEventHandler(fn)) #define EVT_AUINOTEBOOK_PAGE_CHANGING(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING, winid, wxAuiNotebookEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_AUINOTEBOOK_PAGE_CHANGING, winid, wxAuiNotebookEventHandler(fn)) #define EVT_AUINOTEBOOK_BUTTON(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_BUTTON, winid, wxAuiNotebookEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_AUINOTEBOOK_BUTTON, winid, wxAuiNotebookEventHandler(fn)) #define EVT_AUINOTEBOOK_BEGIN_DRAG(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG, winid, wxAuiNotebookEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_AUINOTEBOOK_BEGIN_DRAG, winid, wxAuiNotebookEventHandler(fn)) #define EVT_AUINOTEBOOK_END_DRAG(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_END_DRAG, winid, wxAuiNotebookEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_AUINOTEBOOK_END_DRAG, winid, wxAuiNotebookEventHandler(fn)) #define EVT_AUINOTEBOOK_DRAG_MOTION(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION, winid, wxAuiNotebookEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_AUINOTEBOOK_DRAG_MOTION, winid, wxAuiNotebookEventHandler(fn)) #define EVT_AUINOTEBOOK_ALLOW_DND(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_ALLOW_DND, winid, wxAuiNotebookEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_AUINOTEBOOK_ALLOW_DND, winid, wxAuiNotebookEventHandler(fn)) #define EVT_AUINOTEBOOK_DRAG_DONE(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_DRAG_DONE, winid, wxAuiNotebookEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_AUINOTEBOOK_DRAG_DONE, winid, wxAuiNotebookEventHandler(fn)) #define EVT_AUINOTEBOOK_TAB_MIDDLE_DOWN(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN, winid, wxAuiNotebookEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_AUINOTEBOOK_TAB_MIDDLE_DOWN, winid, wxAuiNotebookEventHandler(fn)) #define EVT_AUINOTEBOOK_TAB_MIDDLE_UP(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP, winid, wxAuiNotebookEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_AUINOTEBOOK_TAB_MIDDLE_UP, winid, wxAuiNotebookEventHandler(fn)) #define EVT_AUINOTEBOOK_TAB_RIGHT_DOWN(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN, winid, wxAuiNotebookEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_AUINOTEBOOK_TAB_RIGHT_DOWN, winid, wxAuiNotebookEventHandler(fn)) #define EVT_AUINOTEBOOK_TAB_RIGHT_UP(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP, winid, wxAuiNotebookEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_AUINOTEBOOK_TAB_RIGHT_UP, winid, wxAuiNotebookEventHandler(fn)) #define EVT_AUINOTEBOOK_BG_DCLICK(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK, winid, wxAuiNotebookEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_AUINOTEBOOK_BG_DCLICK, winid, wxAuiNotebookEventHandler(fn)) #else // wxpython/swig event work -%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE; -%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSED; -%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED; -%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING; -%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_BUTTON; -%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG; -%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_END_DRAG; -%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION; -%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_ALLOW_DND; -%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_DRAG_DONE; -%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN; -%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP; -%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN; -%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP; -%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK; +%constant wxEventType wxEVT_AUINOTEBOOK_PAGE_CLOSE; +%constant wxEventType wxEVT_AUINOTEBOOK_PAGE_CLOSED; +%constant wxEventType wxEVT_AUINOTEBOOK_PAGE_CHANGED; +%constant wxEventType wxEVT_AUINOTEBOOK_PAGE_CHANGING; +%constant wxEventType wxEVT_AUINOTEBOOK_BUTTON; +%constant wxEventType wxEVT_AUINOTEBOOK_BEGIN_DRAG; +%constant wxEventType wxEVT_AUINOTEBOOK_END_DRAG; +%constant wxEventType wxEVT_AUINOTEBOOK_DRAG_MOTION; +%constant wxEventType wxEVT_AUINOTEBOOK_ALLOW_DND; +%constant wxEventType wxEVT_AUINOTEBOOK_DRAG_DONE; +%constant wxEventType wxEVT_AUINOTEBOOK_TAB_MIDDLE_DOWN; +%constant wxEventType wxEVT_AUINOTEBOOK_TAB_MIDDLE_UP; +%constant wxEventType wxEVT_AUINOTEBOOK_TAB_RIGHT_DOWN; +%constant wxEventType wxEVT_AUINOTEBOOK_TAB_RIGHT_UP; +%constant wxEventType wxEVT_AUINOTEBOOK_BG_DCLICK; %pythoncode { - EVT_AUINOTEBOOK_PAGE_CLOSE = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, 1 ) - EVT_AUINOTEBOOK_PAGE_CLOSED = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSED, 1 ) - EVT_AUINOTEBOOK_PAGE_CHANGED = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, 1 ) - EVT_AUINOTEBOOK_PAGE_CHANGING = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING, 1 ) - EVT_AUINOTEBOOK_BUTTON = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_BUTTON, 1 ) - EVT_AUINOTEBOOK_BEGIN_DRAG = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG, 1 ) - EVT_AUINOTEBOOK_END_DRAG = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_END_DRAG, 1 ) - EVT_AUINOTEBOOK_DRAG_MOTION = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION, 1 ) - EVT_AUINOTEBOOK_ALLOW_DND = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_ALLOW_DND, 1 ) - EVT_AUINOTEBOOK_DRAG_DONE = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_DRAG_DONE, 1 ) - EVT__AUINOTEBOOK_TAB_MIDDLE_DOWN = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN, 1 ) - EVT__AUINOTEBOOK_TAB_MIDDLE_UP = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP, 1 ) - EVT__AUINOTEBOOK_TAB_RIGHT_DOWN = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN, 1 ) - EVT__AUINOTEBOOK_TAB_RIGHT_UP = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP, 1 ) - EVT_AUINOTEBOOK_BG_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK, 1 ) + EVT_AUINOTEBOOK_PAGE_CLOSE = wx.PyEventBinder( wxEVT_AUINOTEBOOK_PAGE_CLOSE, 1 ) + EVT_AUINOTEBOOK_PAGE_CLOSED = wx.PyEventBinder( wxEVT_AUINOTEBOOK_PAGE_CLOSED, 1 ) + EVT_AUINOTEBOOK_PAGE_CHANGED = wx.PyEventBinder( wxEVT_AUINOTEBOOK_PAGE_CHANGED, 1 ) + EVT_AUINOTEBOOK_PAGE_CHANGING = wx.PyEventBinder( wxEVT_AUINOTEBOOK_PAGE_CHANGING, 1 ) + EVT_AUINOTEBOOK_BUTTON = wx.PyEventBinder( wxEVT_AUINOTEBOOK_BUTTON, 1 ) + EVT_AUINOTEBOOK_BEGIN_DRAG = wx.PyEventBinder( wxEVT_AUINOTEBOOK_BEGIN_DRAG, 1 ) + EVT_AUINOTEBOOK_END_DRAG = wx.PyEventBinder( wxEVT_AUINOTEBOOK_END_DRAG, 1 ) + EVT_AUINOTEBOOK_DRAG_MOTION = wx.PyEventBinder( wxEVT_AUINOTEBOOK_DRAG_MOTION, 1 ) + EVT_AUINOTEBOOK_ALLOW_DND = wx.PyEventBinder( wxEVT_AUINOTEBOOK_ALLOW_DND, 1 ) + EVT_AUINOTEBOOK_DRAG_DONE = wx.PyEventBinder( wxEVT_AUINOTEBOOK_DRAG_DONE, 1 ) + EVT__AUINOTEBOOK_TAB_MIDDLE_DOWN = wx.PyEventBinder( wxEVT_AUINOTEBOOK_TAB_MIDDLE_DOWN, 1 ) + EVT__AUINOTEBOOK_TAB_MIDDLE_UP = wx.PyEventBinder( wxEVT_AUINOTEBOOK_TAB_MIDDLE_UP, 1 ) + EVT__AUINOTEBOOK_TAB_RIGHT_DOWN = wx.PyEventBinder( wxEVT_AUINOTEBOOK_TAB_RIGHT_DOWN, 1 ) + EVT__AUINOTEBOOK_TAB_RIGHT_UP = wx.PyEventBinder( wxEVT_AUINOTEBOOK_TAB_RIGHT_UP, 1 ) + EVT_AUINOTEBOOK_BG_DCLICK = wx.PyEventBinder( wxEVT_AUINOTEBOOK_BG_DCLICK, 1 ) } #endif +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE wxEVT_AUINOTEBOOK_PAGE_CLOSE +#define wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSED wxEVT_AUINOTEBOOK_PAGE_CLOSED +#define wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED wxEVT_AUINOTEBOOK_PAGE_CHANGED +#define wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING wxEVT_AUINOTEBOOK_PAGE_CHANGING +#define wxEVT_COMMAND_AUINOTEBOOK_BUTTON wxEVT_AUINOTEBOOK_BUTTON +#define wxEVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG wxEVT_AUINOTEBOOK_BEGIN_DRAG +#define wxEVT_COMMAND_AUINOTEBOOK_END_DRAG wxEVT_AUINOTEBOOK_END_DRAG +#define wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION wxEVT_AUINOTEBOOK_DRAG_MOTION +#define wxEVT_COMMAND_AUINOTEBOOK_ALLOW_DND wxEVT_AUINOTEBOOK_ALLOW_DND +#define wxEVT_COMMAND_AUINOTEBOOK_DRAG_DONE wxEVT_AUINOTEBOOK_DRAG_DONE +#define wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN wxEVT_AUINOTEBOOK_TAB_MIDDLE_DOWN +#define wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP wxEVT_AUINOTEBOOK_TAB_MIDDLE_UP +#define wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN wxEVT_AUINOTEBOOK_TAB_RIGHT_DOWN +#define wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP wxEVT_AUINOTEBOOK_TAB_RIGHT_UP +#define wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK wxEVT_AUINOTEBOOK_BG_DCLICK +#define wxEVT_COMMAND_AUINOTEBOOK_CANCEL_DRAG wxEVT_AUINOTEBOOK_CANCEL_DRAG + #endif // wxUSE_AUI #endif // _WX_AUINOTEBOOK_H_ diff --git a/include/wx/bookctrl.h b/include/wx/bookctrl.h index cd2929eb5a..d1065dbde5 100644 --- a/include/wx/bookctrl.h +++ b/include/wx/bookctrl.h @@ -407,20 +407,24 @@ typedef void (wxEvtHandler::*wxBookCtrlEventFunction)(wxBookCtrlEvent&); // dedicated to majority of desktops #include "wx/notebook.h" #define wxBookCtrl wxNotebook - #define wxEVT_COMMAND_BOOKCTRL_PAGE_CHANGED wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED - #define wxEVT_COMMAND_BOOKCTRL_PAGE_CHANGING wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING + #define wxEVT_BOOKCTRL_PAGE_CHANGED wxEVT_NOTEBOOK_PAGE_CHANGED + #define wxEVT_BOOKCTRL_PAGE_CHANGING wxEVT_NOTEBOOK_PAGE_CHANGING #define EVT_BOOKCTRL_PAGE_CHANGED(id, fn) EVT_NOTEBOOK_PAGE_CHANGED(id, fn) #define EVT_BOOKCTRL_PAGE_CHANGING(id, fn) EVT_NOTEBOOK_PAGE_CHANGING(id, fn) #else // dedicated to Smartphones #include "wx/choicebk.h" #define wxBookCtrl wxChoicebook - #define wxEVT_COMMAND_BOOKCTRL_PAGE_CHANGED wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED - #define wxEVT_COMMAND_BOOKCTRL_PAGE_CHANGING wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING + #define wxEVT_BOOKCTRL_PAGE_CHANGED wxEVT_CHOICEBOOK_PAGE_CHANGED + #define wxEVT_BOOKCTRL_PAGE_CHANGING wxEVT_CHOICEBOOK_PAGE_CHANGING #define EVT_BOOKCTRL_PAGE_CHANGED(id, fn) EVT_CHOICEBOOK_PAGE_CHANGED(id, fn) #define EVT_BOOKCTRL_PAGE_CHANGING(id, fn) EVT_CHOICEBOOK_PAGE_CHANGING(id, fn) #endif +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_BOOKCTRL_PAGE_CHANGED wxEVT_BOOKCTRL_PAGE_CHANGED +#define wxEVT_COMMAND_BOOKCTRL_PAGE_CHANGING wxEVT_BOOKCTRL_PAGE_CHANGING + #if WXWIN_COMPATIBILITY_2_6 #define wxBC_TOP wxBK_TOP #define wxBC_BOTTOM wxBK_BOTTOM diff --git a/include/wx/choicebk.h b/include/wx/choicebk.h index 6c9f7d4980..cbdd5ff61e 100644 --- a/include/wx/choicebk.h +++ b/include/wx/choicebk.h @@ -22,8 +22,8 @@ class WXDLLIMPEXP_FWD_CORE wxChoice; -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED, wxBookCtrlEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING, wxBookCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_CHOICEBOOK_PAGE_CHANGED, wxBookCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_CHOICEBOOK_PAGE_CHANGING, wxBookCtrlEvent ); // wxChoicebook flags #define wxCHB_DEFAULT wxBK_DEFAULT @@ -117,10 +117,14 @@ typedef wxBookCtrlEventFunction wxChoicebookEventFunction; #define wxChoicebookEventHandler(func) wxBookCtrlEventHandler(func) #define EVT_CHOICEBOOK_PAGE_CHANGED(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED, winid, wxBookCtrlEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_CHOICEBOOK_PAGE_CHANGED, winid, wxBookCtrlEventHandler(fn)) #define EVT_CHOICEBOOK_PAGE_CHANGING(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING, winid, wxBookCtrlEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_CHOICEBOOK_PAGE_CHANGING, winid, wxBookCtrlEventHandler(fn)) + +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED wxEVT_CHOICEBOOK_PAGE_CHANGED +#define wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING wxEVT_CHOICEBOOK_PAGE_CHANGING #endif // wxUSE_CHOICEBOOK diff --git a/include/wx/clrpicker.h b/include/wx/clrpicker.h index 9228596daa..572b7299f3 100644 --- a/include/wx/clrpicker.h +++ b/include/wx/clrpicker.h @@ -156,14 +156,14 @@ private: // wxColourPickerEvent: used by wxColourPickerCtrl only // ---------------------------------------------------------------------------- -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_COLOURPICKER_CHANGED, wxColourPickerEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COLOURPICKER_CHANGED, wxColourPickerEvent ); class WXDLLIMPEXP_CORE wxColourPickerEvent : public wxCommandEvent { public: wxColourPickerEvent() {} wxColourPickerEvent(wxObject *generator, int id, const wxColour &col) - : wxCommandEvent(wxEVT_COMMAND_COLOURPICKER_CHANGED, id), + : wxCommandEvent(wxEVT_COLOURPICKER_CHANGED, id), m_colour(col) { SetEventObject(generator); @@ -192,9 +192,12 @@ typedef void (wxEvtHandler::*wxColourPickerEventFunction)(wxColourPickerEvent&); wxEVENT_HANDLER_CAST(wxColourPickerEventFunction, func) #define EVT_COLOURPICKER_CHANGED(id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_COLOURPICKER_CHANGED, id, wxColourPickerEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_COLOURPICKER_CHANGED, id, wxColourPickerEventHandler(fn)) +// old wxEVT_COMMAND_* constant +#define wxEVT_COMMAND_COLOURPICKER_CHANGED wxEVT_COLOURPICKER_CHANGED + #endif // wxUSE_COLOURPICKERCTRL #endif // _WX_CLRPICKER_H_BASE_ diff --git a/include/wx/collpane.h b/include/wx/collpane.h index 2d97a0b6b5..337000e640 100644 --- a/include/wx/collpane.h +++ b/include/wx/collpane.h @@ -53,14 +53,14 @@ public: class WXDLLIMPEXP_FWD_CORE wxCollapsiblePaneEvent; -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_COLLPANE_CHANGED, wxCollapsiblePaneEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COLLAPSIBLEPANE_CHANGED, wxCollapsiblePaneEvent ); class WXDLLIMPEXP_CORE wxCollapsiblePaneEvent : public wxCommandEvent { public: wxCollapsiblePaneEvent() {} wxCollapsiblePaneEvent(wxObject *generator, int id, bool collapsed) - : wxCommandEvent(wxEVT_COMMAND_COLLPANE_CHANGED, id), + : wxCommandEvent(wxEVT_COLLAPSIBLEPANE_CHANGED, id), m_bCollapsed(collapsed) { SetEventObject(generator); @@ -89,7 +89,7 @@ typedef void (wxEvtHandler::*wxCollapsiblePaneEventFunction)(wxCollapsiblePaneEv wxEVENT_HANDLER_CAST(wxCollapsiblePaneEventFunction, func) #define EVT_COLLAPSIBLEPANE_CHANGED(id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_COLLPANE_CHANGED, id, wxCollapsiblePaneEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_COLLAPSIBLEPANE_CHANGED, id, wxCollapsiblePaneEventHandler(fn)) #if defined(__WXGTK20__) && !defined(__WXUNIVERSAL__) @@ -101,6 +101,9 @@ typedef void (wxEvtHandler::*wxCollapsiblePaneEventFunction)(wxCollapsiblePaneEv #define wxCollapsiblePane wxGenericCollapsiblePane #endif +// old wxEVT_COMMAND_* constant +#define wxEVT_COMMAND_COLLPANE_CHANGED wxEVT_COLLAPSIBLEPANE_CHANGED + #endif // wxUSE_COLLPANE #endif // _WX_COLLAPSABLE_PANE_H_BASE_ diff --git a/include/wx/dataview.h b/include/wx/dataview.h index b4855509bb..01ff2e2485 100644 --- a/include/wx/dataview.h +++ b/include/wx/dataview.h @@ -800,7 +800,7 @@ public: const wxVariant &GetValue() const { return m_value; } void SetValue( const wxVariant &value ) { m_value = value; } - // for wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_DONE only + // for wxEVT_DATAVIEW_ITEM_EDITING_DONE only bool IsEditCancelled() const { return m_editCancelled; } void SetEditCanceled(bool editCancelled) { m_editCancelled = editCancelled; } @@ -812,7 +812,7 @@ public: wxPoint GetPosition() const { return m_pos; } void SetPosition( int x, int y ) { m_pos.x = x; m_pos.y = y; } - // For wxEVT_COMMAND_DATAVIEW_CACHE_HINT + // For wxEVT_DATAVIEW_CACHE_HINT int GetCacheFrom() const { return m_cacheFrom; } int GetCacheTo() const { return m_cacheTo; } void SetCache(int from, int to) { m_cacheFrom = from; m_cacheTo = to; } @@ -864,30 +864,30 @@ private: DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxDataViewEvent) }; -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, wxDataViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_SELECTION_CHANGED, wxDataViewEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, wxDataViewEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ITEM_COLLAPSED, wxDataViewEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ITEM_EXPANDED, wxDataViewEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ITEM_COLLAPSING, wxDataViewEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ITEM_EXPANDING, wxDataViewEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ITEM_START_EDITING, wxDataViewEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_STARTED, wxDataViewEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_DONE, wxDataViewEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED, wxDataViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_ITEM_ACTIVATED, wxDataViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_ITEM_COLLAPSED, wxDataViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_ITEM_EXPANDED, wxDataViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_ITEM_COLLAPSING, wxDataViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_ITEM_EXPANDING, wxDataViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_ITEM_START_EDITING, wxDataViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_ITEM_EDITING_STARTED, wxDataViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_ITEM_EDITING_DONE, wxDataViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_ITEM_VALUE_CHANGED, wxDataViewEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ITEM_CONTEXT_MENU, wxDataViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_ITEM_CONTEXT_MENU, wxDataViewEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_CLICK, wxDataViewEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK, wxDataViewEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_COLUMN_SORTED, wxDataViewEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_COLUMN_REORDERED, wxDataViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_COLUMN_HEADER_CLICK, wxDataViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICKED, wxDataViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_COLUMN_SORTED, wxDataViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_COLUMN_REORDERED, wxDataViewEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_CACHE_HINT, wxDataViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_CACHE_HINT, wxDataViewEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ITEM_BEGIN_DRAG, wxDataViewEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ITEM_DROP_POSSIBLE, wxDataViewEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ITEM_DROP, wxDataViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_ITEM_BEGIN_DRAG, wxDataViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_ITEM_DROP_POSSIBLE, wxDataViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_ITEM_DROP, wxDataViewEvent ); typedef void (wxEvtHandler::*wxDataViewEventFunction)(wxDataViewEvent&); @@ -895,7 +895,7 @@ typedef void (wxEvtHandler::*wxDataViewEventFunction)(wxDataViewEvent&); wxEVENT_HANDLER_CAST(wxDataViewEventFunction, func) #define wx__DECLARE_DATAVIEWEVT(evt, id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_DATAVIEW_ ## evt, id, wxDataViewEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_DATAVIEW_ ## evt, id, wxDataViewEventHandler(fn)) #define EVT_DATAVIEW_SELECTION_CHANGED(id, fn) wx__DECLARE_DATAVIEWEVT(SELECTION_CHANGED, id, fn) @@ -1324,6 +1324,27 @@ private: DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxDataViewTreeCtrl) }; +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED wxEVT_DATAVIEW_SELECTION_CHANGED +#define wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED wxEVT_DATAVIEW_ITEM_ACTIVATED +#define wxEVT_COMMAND_DATAVIEW_ITEM_COLLAPSED wxEVT_DATAVIEW_ITEM_COLLAPSED +#define wxEVT_COMMAND_DATAVIEW_ITEM_EXPANDED wxEVT_DATAVIEW_ITEM_EXPANDED +#define wxEVT_COMMAND_DATAVIEW_ITEM_COLLAPSING wxEVT_DATAVIEW_ITEM_COLLAPSING +#define wxEVT_COMMAND_DATAVIEW_ITEM_EXPANDING wxEVT_DATAVIEW_ITEM_EXPANDING +#define wxEVT_COMMAND_DATAVIEW_ITEM_START_EDITING wxEVT_DATAVIEW_ITEM_START_EDITING +#define wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_STARTED wxEVT_DATAVIEW_ITEM_EDITING_STARTED +#define wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_DONE wxEVT_DATAVIEW_ITEM_EDITING_DONE +#define wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED wxEVT_DATAVIEW_ITEM_VALUE_CHANGED +#define wxEVT_COMMAND_DATAVIEW_ITEM_CONTEXT_MENU wxEVT_DATAVIEW_ITEM_CONTEXT_MENU +#define wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_CLICK wxEVT_DATAVIEW_COLUMN_HEADER_CLICK +#define wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK wxEVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICKED +#define wxEVT_COMMAND_DATAVIEW_COLUMN_SORTED wxEVT_DATAVIEW_COLUMN_SORTED +#define wxEVT_COMMAND_DATAVIEW_COLUMN_REORDERED wxEVT_DATAVIEW_COLUMN_REORDERED +#define wxEVT_COMMAND_DATAVIEW_CACHE_HINT wxEVT_DATAVIEW_CACHE_HINT +#define wxEVT_COMMAND_DATAVIEW_ITEM_BEGIN_DRAG wxEVT_DATAVIEW_ITEM_BEGIN_DRAG +#define wxEVT_COMMAND_DATAVIEW_ITEM_DROP_POSSIBLE wxEVT_DATAVIEW_ITEM_DROP_POSSIBLE +#define wxEVT_COMMAND_DATAVIEW_ITEM_DROP wxEVT_DATAVIEW_ITEM_DROP + #endif // wxUSE_DATAVIEWCTRL #endif diff --git a/include/wx/docview.h b/include/wx/docview.h index 3b06cb0826..660c7db336 100644 --- a/include/wx/docview.h +++ b/include/wx/docview.h @@ -873,7 +873,7 @@ public: if ( !BaseFrame::Create(frame, id, title, pos, size, style, name) ) return false; - this->Connect(wxID_EXIT, wxEVT_COMMAND_MENU_SELECTED, + this->Connect(wxID_EXIT, wxEVT_MENU, wxCommandEventHandler(wxDocParentFrameAny::OnExit)); this->Connect(wxEVT_CLOSE_WINDOW, wxCloseEventHandler(wxDocParentFrameAny::OnCloseWindow)); diff --git a/include/wx/event.h b/include/wx/event.h index 5aad5c465f..0aaa2414ef 100644 --- a/include/wx/event.h +++ b/include/wx/event.h @@ -669,26 +669,26 @@ class WXDLLIMPEXP_FWD_CORE wxHelpEvent; // Command events -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, wxCommandEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_SLIDER_UPDATED, wxCommandEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEvent); - -// wxEVT_COMMAND_SCROLLBAR_UPDATED is deprecated, use wxEVT_SCROLL... events -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_SCROLLBAR_UPDATED, wxCommandEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_VLBOX_SELECTED, wxCommandEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_TOOL_RCLICKED, wxCommandEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_TOOL_DROPDOWN_CLICKED, wxCommandEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_TOOL_ENTER, wxCommandEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_COMBOBOX_DROPDOWN, wxCommandEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_COMBOBOX_CLOSEUP, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_BUTTON, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_CHECKBOX, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_CHOICE, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_LISTBOX, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_LISTBOX_DCLICK, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_CHECKLISTBOX, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_MENU, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SLIDER, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_RADIOBOX, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_RADIOBUTTON, wxCommandEvent); + +// wxEVT_SCROLLBAR is deprecated, use wxEVT_SCROLL... events +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SCROLLBAR, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_VLBOX, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMBOBOX, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_TOOL_RCLICKED, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_TOOL_DROPDOWN, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_TOOL_ENTER, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMBOBOX_DROPDOWN, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMBOBOX_CLOSEUP, wxCommandEvent); // Thread and asynchronous method call events wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_BASE, wxEVT_THREAD, wxThreadEvent); @@ -811,9 +811,9 @@ wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_MOVE_END, wxMoveEvent); wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_HIBERNATE, wxActivateEvent); // Clipboard events -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_TEXT_COPY, wxClipboardTextEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_TEXT_CUT, wxClipboardTextEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_TEXT_PASTE, wxClipboardTextEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_TEXT_COPY, wxClipboardTextEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_TEXT_CUT, wxClipboardTextEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_TEXT_PASTE, wxClipboardTextEvent); // Generic command events // Note: a click is a higher-level event than button down/up @@ -830,7 +830,7 @@ wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_HELP, wxHelpEvent); wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_DETAILED_HELP, wxHelpEvent); // these 2 events are the same -#define wxEVT_COMMAND_TOOL_CLICKED wxEVT_COMMAND_MENU_SELECTED +#define wxEVT_TOOL wxEVT_MENU // ---------------------------------------------------------------------------- // Compatibility @@ -840,7 +840,7 @@ wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_DETAILED_HELP, wxHelpEvent); // wx/textctrl.h in all ports [yet], so declare it here as well // // still, any new code using it should include wx/textctrl.h explicitly -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_TEXT_UPDATED, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_TEXT, wxCommandEvent); // ---------------------------------------------------------------------------- @@ -1439,21 +1439,21 @@ private: // Item or menu event class /* - wxEVT_COMMAND_BUTTON_CLICKED - wxEVT_COMMAND_CHECKBOX_CLICKED - wxEVT_COMMAND_CHOICE_SELECTED - wxEVT_COMMAND_LISTBOX_SELECTED - wxEVT_COMMAND_LISTBOX_DOUBLECLICKED - wxEVT_COMMAND_TEXT_UPDATED - wxEVT_COMMAND_TEXT_ENTER - wxEVT_COMMAND_MENU_SELECTED - wxEVT_COMMAND_SLIDER_UPDATED - wxEVT_COMMAND_RADIOBOX_SELECTED - wxEVT_COMMAND_RADIOBUTTON_SELECTED - wxEVT_COMMAND_SCROLLBAR_UPDATED - wxEVT_COMMAND_VLBOX_SELECTED - wxEVT_COMMAND_COMBOBOX_SELECTED - wxEVT_COMMAND_TOGGLEBUTTON_CLICKED + wxEVT_BUTTON + wxEVT_CHECKBOX + wxEVT_CHOICE + wxEVT_LISTBOX + wxEVT_LISTBOX_DCLICK + wxEVT_TEXT + wxEVT_TEXT_ENTER + wxEVT_MENU + wxEVT_SLIDER + wxEVT_RADIOBOX + wxEVT_RADIOBUTTON + wxEVT_SCROLLBAR + wxEVT_VLBOX + wxEVT_COMBOBOX + wxEVT_TOGGLEBUTTON */ class WXDLLIMPEXP_CORE wxCommandEvent : public wxEvent, @@ -2973,9 +2973,9 @@ private: // NOTE : under windows these events are *NOT* generated automatically // for a Rich Edit text control. /* -wxEVT_COMMAND_TEXT_COPY -wxEVT_COMMAND_TEXT_CUT -wxEVT_COMMAND_TEXT_PASTE +wxEVT_TEXT_COPY +wxEVT_TEXT_CUT +wxEVT_TEXT_PASTE */ class WXDLLIMPEXP_CORE wxClipboardTextEvent : public wxCommandEvent @@ -4214,33 +4214,33 @@ typedef void (wxEvtHandler::*wxClipboardTextEventFunction)(wxClipboardTextEvent& #endif // WXWIN_COMPATIBILITY_2_6 // Convenience macros for commonly-used commands -#define EVT_CHECKBOX(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_CHECKBOX_CLICKED, winid, wxCommandEventHandler(func)) -#define EVT_CHOICE(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_CHOICE_SELECTED, winid, wxCommandEventHandler(func)) -#define EVT_LISTBOX(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_LISTBOX_SELECTED, winid, wxCommandEventHandler(func)) -#define EVT_LISTBOX_DCLICK(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, winid, wxCommandEventHandler(func)) -#define EVT_MENU(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_MENU_SELECTED, winid, wxCommandEventHandler(func)) -#define EVT_MENU_RANGE(id1, id2, func) wx__DECLARE_EVT2(wxEVT_COMMAND_MENU_SELECTED, id1, id2, wxCommandEventHandler(func)) +#define EVT_CHECKBOX(winid, func) wx__DECLARE_EVT1(wxEVT_CHECKBOX, winid, wxCommandEventHandler(func)) +#define EVT_CHOICE(winid, func) wx__DECLARE_EVT1(wxEVT_CHOICE, winid, wxCommandEventHandler(func)) +#define EVT_LISTBOX(winid, func) wx__DECLARE_EVT1(wxEVT_LISTBOX, winid, wxCommandEventHandler(func)) +#define EVT_LISTBOX_DCLICK(winid, func) wx__DECLARE_EVT1(wxEVT_LISTBOX_DCLICK, winid, wxCommandEventHandler(func)) +#define EVT_MENU(winid, func) wx__DECLARE_EVT1(wxEVT_MENU, winid, wxCommandEventHandler(func)) +#define EVT_MENU_RANGE(id1, id2, func) wx__DECLARE_EVT2(wxEVT_MENU, id1, id2, wxCommandEventHandler(func)) #if defined(__SMARTPHONE__) # define EVT_BUTTON(winid, func) EVT_MENU(winid, func) #else -# define EVT_BUTTON(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_BUTTON_CLICKED, winid, wxCommandEventHandler(func)) +# define EVT_BUTTON(winid, func) wx__DECLARE_EVT1(wxEVT_BUTTON, winid, wxCommandEventHandler(func)) #endif -#define EVT_SLIDER(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_SLIDER_UPDATED, winid, wxCommandEventHandler(func)) -#define EVT_RADIOBOX(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_RADIOBOX_SELECTED, winid, wxCommandEventHandler(func)) -#define EVT_RADIOBUTTON(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_RADIOBUTTON_SELECTED, winid, wxCommandEventHandler(func)) +#define EVT_SLIDER(winid, func) wx__DECLARE_EVT1(wxEVT_SLIDER, winid, wxCommandEventHandler(func)) +#define EVT_RADIOBOX(winid, func) wx__DECLARE_EVT1(wxEVT_RADIOBOX, winid, wxCommandEventHandler(func)) +#define EVT_RADIOBUTTON(winid, func) wx__DECLARE_EVT1(wxEVT_RADIOBUTTON, winid, wxCommandEventHandler(func)) // EVT_SCROLLBAR is now obsolete since we use EVT_COMMAND_SCROLL... events -#define EVT_SCROLLBAR(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_SCROLLBAR_UPDATED, winid, wxCommandEventHandler(func)) -#define EVT_VLBOX(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_VLBOX_SELECTED, winid, wxCommandEventHandler(func)) -#define EVT_COMBOBOX(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_COMBOBOX_SELECTED, winid, wxCommandEventHandler(func)) -#define EVT_TOOL(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_TOOL_CLICKED, winid, wxCommandEventHandler(func)) -#define EVT_TOOL_DROPDOWN(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_TOOL_DROPDOWN_CLICKED, winid, wxCommandEventHandler(func)) -#define EVT_TOOL_RANGE(id1, id2, func) wx__DECLARE_EVT2(wxEVT_COMMAND_TOOL_CLICKED, id1, id2, wxCommandEventHandler(func)) -#define EVT_TOOL_RCLICKED(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_TOOL_RCLICKED, winid, wxCommandEventHandler(func)) -#define EVT_TOOL_RCLICKED_RANGE(id1, id2, func) wx__DECLARE_EVT2(wxEVT_COMMAND_TOOL_RCLICKED, id1, id2, wxCommandEventHandler(func)) -#define EVT_TOOL_ENTER(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_TOOL_ENTER, winid, wxCommandEventHandler(func)) -#define EVT_CHECKLISTBOX(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, winid, wxCommandEventHandler(func)) -#define EVT_COMBOBOX_DROPDOWN(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_COMBOBOX_DROPDOWN, winid, wxCommandEventHandler(func)) -#define EVT_COMBOBOX_CLOSEUP(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_COMBOBOX_CLOSEUP, winid, wxCommandEventHandler(func)) +#define EVT_SCROLLBAR(winid, func) wx__DECLARE_EVT1(wxEVT_SCROLLBAR, winid, wxCommandEventHandler(func)) +#define EVT_VLBOX(winid, func) wx__DECLARE_EVT1(wxEVT_VLBOX, winid, wxCommandEventHandler(func)) +#define EVT_COMBOBOX(winid, func) wx__DECLARE_EVT1(wxEVT_COMBOBOX, winid, wxCommandEventHandler(func)) +#define EVT_TOOL(winid, func) wx__DECLARE_EVT1(wxEVT_TOOL, winid, wxCommandEventHandler(func)) +#define EVT_TOOL_DROPDOWN(winid, func) wx__DECLARE_EVT1(wxEVT_TOOL_DROPDOWN, winid, wxCommandEventHandler(func)) +#define EVT_TOOL_RANGE(id1, id2, func) wx__DECLARE_EVT2(wxEVT_TOOL, id1, id2, wxCommandEventHandler(func)) +#define EVT_TOOL_RCLICKED(winid, func) wx__DECLARE_EVT1(wxEVT_TOOL_RCLICKED, winid, wxCommandEventHandler(func)) +#define EVT_TOOL_RCLICKED_RANGE(id1, id2, func) wx__DECLARE_EVT2(wxEVT_TOOL_RCLICKED, id1, id2, wxCommandEventHandler(func)) +#define EVT_TOOL_ENTER(winid, func) wx__DECLARE_EVT1(wxEVT_TOOL_ENTER, winid, wxCommandEventHandler(func)) +#define EVT_CHECKLISTBOX(winid, func) wx__DECLARE_EVT1(wxEVT_CHECKLISTBOX, winid, wxCommandEventHandler(func)) +#define EVT_COMBOBOX_DROPDOWN(winid, func) wx__DECLARE_EVT1(wxEVT_COMBOBOX_DROPDOWN, winid, wxCommandEventHandler(func)) +#define EVT_COMBOBOX_CLOSEUP(winid, func) wx__DECLARE_EVT1(wxEVT_COMBOBOX_CLOSEUP, winid, wxCommandEventHandler(func)) // Generic command events #define EVT_COMMAND_LEFT_CLICK(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_LEFT_CLICK, winid, wxCommandEventHandler(func)) @@ -4283,14 +4283,12 @@ typedef void (wxEvtHandler::*wxClipboardTextEventFunction)(wxClipboardTextEvent& #define EVT_COMMAND_CONTEXT_MENU(winid, func) wx__DECLARE_EVT1(wxEVT_CONTEXT_MENU, winid, wxContextMenuEventHandler(func)) // Clipboard text Events -#define EVT_TEXT_CUT(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_TEXT_CUT, winid, wxClipboardTextEventHandler(func)) -#define EVT_TEXT_COPY(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_TEXT_COPY, winid, wxClipboardTextEventHandler(func)) -#define EVT_TEXT_PASTE(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_TEXT_PASTE, winid, wxClipboardTextEventHandler(func)) +#define EVT_TEXT_CUT(winid, func) wx__DECLARE_EVT1(wxEVT_TEXT_CUT, winid, wxClipboardTextEventHandler(func)) +#define EVT_TEXT_COPY(winid, func) wx__DECLARE_EVT1(wxEVT_TEXT_COPY, winid, wxClipboardTextEventHandler(func)) +#define EVT_TEXT_PASTE(winid, func) wx__DECLARE_EVT1(wxEVT_TEXT_PASTE, winid, wxClipboardTextEventHandler(func)) // Thread events #define EVT_THREAD(id, func) wx__DECLARE_EVT1(wxEVT_THREAD, id, wxThreadEventHandler(func)) -// alias for backward compatibility with 2.9.0: -#define wxEVT_COMMAND_THREAD wxEVT_THREAD // ---------------------------------------------------------------------------- // Helper functions @@ -4374,4 +4372,31 @@ WXDLLIMPEXP_CORE wxWindow* wxFindFocusDescendant(wxWindow* ancestor); #define DEFINE_EVENT_TYPE(name) const wxEventType name = wxNewEventType(); #define DEFINE_LOCAL_EVENT_TYPE(name) DEFINE_EVENT_TYPE(name) +// alias for backward compatibility with 2.9.0: +#define wxEVT_COMMAND_THREAD wxEVT_THREAD +// other old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_BUTTON_CLICKED wxEVT_BUTTON +#define wxEVT_COMMAND_CHECKBOX_CLICKED wxEVT_CHECKBOX +#define wxEVT_COMMAND_CHOICE_SELECTED wxEVT_CHOICE +#define wxEVT_COMMAND_LISTBOX_SELECTED wxEVT_LISTBOX +#define wxEVT_COMMAND_LISTBOX_DOUBLECLICKED wxEVT_LISTBOX_DCLICK +#define wxEVT_COMMAND_CHECKLISTBOX_TOGGLED wxEVT_CHECKLISTBOX +#define wxEVT_COMMAND_MENU_SELECTED wxEVT_MENU +#define wxEVT_COMMAND_TOOL_CLICKED wxEVT_TOOL +#define wxEVT_COMMAND_SLIDER_UPDATED wxEVT_SLIDER +#define wxEVT_COMMAND_RADIOBOX_SELECTED wxEVT_RADIOBOX +#define wxEVT_COMMAND_RADIOBUTTON_SELECTED wxEVT_RADIOBUTTON +#define wxEVT_COMMAND_SCROLLBAR_UPDATED wxEVT_SCROLLBAR +#define wxEVT_COMMAND_VLBOX_SELECTED wxEVT_VLBOX +#define wxEVT_COMMAND_COMBOBOX_SELECTED wxEVT_COMBOBOX +#define wxEVT_COMMAND_TOOL_RCLICKED wxEVT_TOOL_RCLICKED +#define wxEVT_COMMAND_TOOL_DROPDOWN_CLICKED wxEVT_TOOL_DROPDOWN +#define wxEVT_COMMAND_TOOL_ENTER wxEVT_TOOL_ENTER +#define wxEVT_COMMAND_COMBOBOX_DROPDOWN wxEVT_COMBOBOX_DROPDOWN +#define wxEVT_COMMAND_COMBOBOX_CLOSEUP wxEVT_COMBOBOX_CLOSEUP +#define wxEVT_COMMAND_TEXT_COPY wxEVT_TEXT_COPY +#define wxEVT_COMMAND_TEXT_CUT wxEVT_TEXT_CUT +#define wxEVT_COMMAND_TEXT_PASTE wxEVT_TEXT_PASTE +#define wxEVT_COMMAND_TEXT_UPDATED wxEVT_TEXT + #endif // _WX_EVENT_H_ diff --git a/include/wx/fdrepdlg.h b/include/wx/fdrepdlg.h index 90f0adb8d9..40c51e9add 100644 --- a/include/wx/fdrepdlg.h +++ b/include/wx/fdrepdlg.h @@ -165,11 +165,11 @@ private: DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxFindDialogEvent) }; -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_FIND, wxFindDialogEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_FIND_NEXT, wxFindDialogEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_FIND_REPLACE, wxFindDialogEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_FIND_REPLACE_ALL, wxFindDialogEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_FIND_CLOSE, wxFindDialogEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_FIND, wxFindDialogEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_FIND_NEXT, wxFindDialogEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_FIND_REPLACE, wxFindDialogEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_FIND_REPLACE_ALL, wxFindDialogEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_FIND_CLOSE, wxFindDialogEvent ); typedef void (wxEvtHandler::*wxFindDialogEventFunction)(wxFindDialogEvent&); @@ -177,19 +177,26 @@ typedef void (wxEvtHandler::*wxFindDialogEventFunction)(wxFindDialogEvent&); wxEVENT_HANDLER_CAST(wxFindDialogEventFunction, func) #define EVT_FIND(id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_FIND, id, wxFindDialogEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_FIND, id, wxFindDialogEventHandler(fn)) #define EVT_FIND_NEXT(id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_FIND_NEXT, id, wxFindDialogEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_FIND_NEXT, id, wxFindDialogEventHandler(fn)) #define EVT_FIND_REPLACE(id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_FIND_REPLACE, id, wxFindDialogEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_FIND_REPLACE, id, wxFindDialogEventHandler(fn)) #define EVT_FIND_REPLACE_ALL(id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_FIND_REPLACE_ALL, id, wxFindDialogEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_FIND_REPLACE_ALL, id, wxFindDialogEventHandler(fn)) #define EVT_FIND_CLOSE(id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_FIND_CLOSE, id, wxFindDialogEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_FIND_CLOSE, id, wxFindDialogEventHandler(fn)) + +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_FIND wxEVT_FIND +#define wxEVT_COMMAND_FIND_NEXT wxEVT_FIND_NEXT +#define wxEVT_COMMAND_FIND_REPLACE wxEVT_FIND_REPLACE +#define wxEVT_COMMAND_FIND_REPLACE_ALL wxEVT_FIND_REPLACE_ALL +#define wxEVT_COMMAND_FIND_CLOSE wxEVT_FIND_CLOSE #endif // wxUSE_FINDREPLDLG diff --git a/include/wx/filepicker.h b/include/wx/filepicker.h index fdc19f50c3..771ad2e55e 100644 --- a/include/wx/filepicker.h +++ b/include/wx/filepicker.h @@ -59,8 +59,8 @@ private: DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxFileDirPickerEvent) }; -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_FILEPICKER_CHANGED, wxFileDirPickerEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_FILEPICKER_CHANGED, wxFileDirPickerEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_DIRPICKER_CHANGED, wxFileDirPickerEvent ); // ---------------------------------------------------------------------------- // event types and macros @@ -72,9 +72,9 @@ typedef void (wxEvtHandler::*wxFileDirPickerEventFunction)(wxFileDirPickerEvent& wxEVENT_HANDLER_CAST(wxFileDirPickerEventFunction, func) #define EVT_FILEPICKER_CHANGED(id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_FILEPICKER_CHANGED, id, wxFileDirPickerEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_FILEPICKER_CHANGED, id, wxFileDirPickerEventHandler(fn)) #define EVT_DIRPICKER_CHANGED(id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_DIRPICKER_CHANGED, id, wxFileDirPickerEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_DIRPICKER_CHANGED, id, wxFileDirPickerEventHandler(fn)) // ---------------------------------------------------------------------------- // wxFileDirPickerWidgetBase: a generic abstract interface which must be @@ -274,11 +274,11 @@ public: // overrides { return HasFlag(wxFLP_CHANGE_DIR); } wxEventType GetEventType() const - { return wxEVT_COMMAND_FILEPICKER_CHANGED; } + { return wxEVT_FILEPICKER_CHANGED; } virtual void DoConnect( wxControl *sender, wxFileDirPickerCtrlBase *eventSink ) { - sender->Connect( wxEVT_COMMAND_FILEPICKER_CHANGED, + sender->Connect( wxEVT_FILEPICKER_CHANGED, wxFileDirPickerEventHandler( wxFileDirPickerCtrlBase::OnFileDirChange ), NULL, eventSink ); } @@ -374,11 +374,11 @@ public: // overrides { return HasFlag(wxDIRP_CHANGE_DIR); } wxEventType GetEventType() const - { return wxEVT_COMMAND_DIRPICKER_CHANGED; } + { return wxEVT_DIRPICKER_CHANGED; } virtual void DoConnect( wxControl *sender, wxFileDirPickerCtrlBase *eventSink ) { - sender->Connect( wxEVT_COMMAND_DIRPICKER_CHANGED, + sender->Connect( wxEVT_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( wxFileDirPickerCtrlBase::OnFileDirChange ), NULL, eventSink ); } @@ -413,5 +413,9 @@ private: #endif // wxUSE_DIRPICKERCTRL +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_FILEPICKER_CHANGED wxEVT_FILEPICKER_CHANGED +#define wxEVT_COMMAND_DIRPICKER_CHANGED wxEVT_DIRPICKER_CHANGED + #endif // _WX_FILEDIRPICKER_H_BASE_ diff --git a/include/wx/fontpicker.h b/include/wx/fontpicker.h index d08b9e850d..cc08e8613c 100644 --- a/include/wx/fontpicker.h +++ b/include/wx/fontpicker.h @@ -175,14 +175,14 @@ private: // wxFontPickerEvent: used by wxFontPickerCtrl only // ---------------------------------------------------------------------------- -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_FONTPICKER_CHANGED, wxFontPickerEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_FONTPICKER_CHANGED, wxFontPickerEvent ); class WXDLLIMPEXP_CORE wxFontPickerEvent : public wxCommandEvent { public: wxFontPickerEvent() {} wxFontPickerEvent(wxObject *generator, int id, const wxFont &f) - : wxCommandEvent(wxEVT_COMMAND_FONTPICKER_CHANGED, id), + : wxCommandEvent(wxEVT_FONTPICKER_CHANGED, id), m_font(f) { SetEventObject(generator); @@ -210,7 +210,10 @@ typedef void (wxEvtHandler::*wxFontPickerEventFunction)(wxFontPickerEvent&); wxEVENT_HANDLER_CAST(wxFontPickerEventFunction, func) #define EVT_FONTPICKER_CHANGED(id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_FONTPICKER_CHANGED, id, wxFontPickerEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_FONTPICKER_CHANGED, id, wxFontPickerEventHandler(fn)) + +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_FONTPICKER_CHANGED wxEVT_FONTPICKER_CHANGED #endif // wxUSE_FONTPICKERCTRL diff --git a/include/wx/generic/dirctrlg.h b/include/wx/generic/dirctrlg.h index 815ff2554b..de3e380522 100644 --- a/include/wx/generic/dirctrlg.h +++ b/include/wx/generic/dirctrlg.h @@ -209,12 +209,10 @@ private: wxDECLARE_NO_COPY_CLASS(wxGenericDirCtrl); }; -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_DIRCTRL_CHANGED, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_DIRCTRL_CHANGED, wxTreeEvent ); -#define wx__DECLARE_DIRCTRL_EVT(evt, id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_DIRCTRL_ ## evt, id, wxTreeEventHandler(fn)) - -#define EVT_DIRCTRL_CHANGED(id, fn) wx__DECLARE_DIRCTRL_EVT(CHANGED, id, fn) +#define EVT_DIRCTRL_CHANGED(id, fn) \ + wx__DECLARE_EVT1(wxEVT_DIRCTRL_CHANGED, id, wxTreeEventHandler(fn)) //----------------------------------------------------------------------------- // wxDirFilterListCtrl @@ -308,5 +306,8 @@ extern WXDLLIMPEXP_DATA_CORE(wxFileIconsTable *) wxTheFileIconsTable; #endif // wxUSE_DIRDLG || wxUSE_FILEDLG || wxUSE_FILECTRL +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_DIRCTRL_CHANGED wxEVT_DIRCTRL_CHANGED + #endif // _WX_DIRCTRLG_H_ diff --git a/include/wx/generic/filepickerg.h b/include/wx/generic/filepickerg.h index 9e18e495a2..679c8546f5 100644 --- a/include/wx/generic/filepickerg.h +++ b/include/wx/generic/filepickerg.h @@ -17,8 +17,8 @@ #include "wx/dirdlg.h" -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_FILEPICKER_CHANGED, wxFileDirPickerEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_DIRPICKER_CHANGED, wxFileDirPickerEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_FILEPICKER_CHANGED, wxFileDirPickerEvent ); //----------------------------------------------------------------------------- @@ -148,7 +148,7 @@ public: // overridable virtual wxDialog *CreateDialog(); wxEventType GetEventType() const - { return wxEVT_COMMAND_FILEPICKER_CHANGED; } + { return wxEVT_FILEPICKER_CHANGED; } protected: void UpdateDialogPath(wxDialog *p) @@ -203,7 +203,7 @@ public: // overridable virtual wxDialog *CreateDialog(); wxEventType GetEventType() const - { return wxEVT_COMMAND_DIRPICKER_CHANGED; } + { return wxEVT_DIRPICKER_CHANGED; } protected: void UpdateDialogPath(wxDialog *p) @@ -215,5 +215,8 @@ private: DECLARE_DYNAMIC_CLASS(wxGenericDirButton) }; +// old wxEVT_COMMAND_* constants +//#define wxEVT_COMMAND_DIRPICKER_CHANGED wxEVT_DIRPICKER_CHANGED +//#define wxEVT_COMMAND_FILEPICKER_CHANGED wxEVT_FILEPICKER_CHANGED #endif // _WX_FILEDIRPICKER_H_ diff --git a/include/wx/generic/headerctrlg.h b/include/wx/generic/headerctrlg.h index db2fa2ec72..3d6a4b9322 100644 --- a/include/wx/generic/headerctrlg.h +++ b/include/wx/generic/headerctrlg.h @@ -117,7 +117,7 @@ private: // start (if m_colBeingResized is -1) or continue resizing the column // - // this generates wxEVT_COMMAND_HEADER_BEGIN_RESIZE/RESIZING events and can + // this generates wxEVT_HEADER_BEGIN_RESIZE/RESIZING events and can // cancel the operation if the user handler decides so void StartOrContinueResizing(unsigned int col, int xPhysical); diff --git a/include/wx/generic/splitter.h b/include/wx/generic/splitter.h index 39d9aed8c8..ad319e44df 100644 --- a/include/wx/generic/splitter.h +++ b/include/wx/generic/splitter.h @@ -334,16 +334,16 @@ public: // all void SetSashPosition(int pos) { - wxASSERT( GetEventType() == wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED - || GetEventType() == wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING); + wxASSERT( GetEventType() == wxEVT_SPLITTER_SASH_POS_CHANGED + || GetEventType() == wxEVT_SPLITTER_SASH_POS_CHANGING); m_data.pos = pos; } int GetSashPosition() const { - wxASSERT( GetEventType() == wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED - || GetEventType() == wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING); + wxASSERT( GetEventType() == wxEVT_SPLITTER_SASH_POS_CHANGED + || GetEventType() == wxEVT_SPLITTER_SASH_POS_CHANGING); return m_data.pos; } @@ -351,7 +351,7 @@ public: // UNSPLIT event methods wxWindow *GetWindowBeingRemoved() const { - wxASSERT( GetEventType() == wxEVT_COMMAND_SPLITTER_UNSPLIT ); + wxASSERT( GetEventType() == wxEVT_SPLITTER_UNSPLIT ); return m_data.win; } @@ -359,14 +359,14 @@ public: // DCLICK event methods int GetX() const { - wxASSERT( GetEventType() == wxEVT_COMMAND_SPLITTER_DOUBLECLICKED ); + wxASSERT( GetEventType() == wxEVT_SPLITTER_DOUBLECLICKED ); return m_data.pt.x; } int GetY() const { - wxASSERT( GetEventType() == wxEVT_COMMAND_SPLITTER_DOUBLECLICKED ); + wxASSERT( GetEventType() == wxEVT_SPLITTER_DOUBLECLICKED ); return m_data.pt.y; } @@ -396,7 +396,7 @@ typedef void (wxEvtHandler::*wxSplitterEventFunction)(wxSplitterEvent&); wxEVENT_HANDLER_CAST(wxSplitterEventFunction, func) #define wx__DECLARE_SPLITTEREVT(evt, id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_SPLITTER_ ## evt, id, wxSplitterEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_SPLITTER_ ## evt, id, wxSplitterEventHandler(fn)) #define EVT_SPLITTER_SASH_POS_CHANGED(id, fn) \ wx__DECLARE_SPLITTEREVT(SASH_POS_CHANGED, id, fn) @@ -410,4 +410,11 @@ typedef void (wxEvtHandler::*wxSplitterEventFunction)(wxSplitterEvent&); #define EVT_SPLITTER_UNSPLIT(id, fn) \ wx__DECLARE_SPLITTEREVT(UNSPLIT, id, fn) + +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED wxEVT_SPLITTER_SASH_POS_CHANGED +#define wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING wxEVT_SPLITTER_SASH_POS_CHANGING +#define wxEVT_COMMAND_SPLITTER_DOUBLECLICKED wxEVT_SPLITTER_DOUBLECLICKED +#define wxEVT_COMMAND_SPLITTER_UNSPLIT wxEVT_SPLITTER_UNSPLIT + #endif // _WX_GENERIC_SPLITTER_H_ diff --git a/include/wx/headerctrl.h b/include/wx/headerctrl.h index 31373bb1c3..10c49e181e 100644 --- a/include/wx/headerctrl.h +++ b/include/wx/headerctrl.h @@ -423,24 +423,24 @@ private: }; -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_HEADER_CLICK, wxHeaderCtrlEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_HEADER_RIGHT_CLICK, wxHeaderCtrlEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_HEADER_MIDDLE_CLICK, wxHeaderCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_HEADER_CLICK, wxHeaderCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_HEADER_RIGHT_CLICK, wxHeaderCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_HEADER_MIDDLE_CLICK, wxHeaderCtrlEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_HEADER_DCLICK, wxHeaderCtrlEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_HEADER_RIGHT_DCLICK, wxHeaderCtrlEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_HEADER_MIDDLE_DCLICK, wxHeaderCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_HEADER_DCLICK, wxHeaderCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_HEADER_RIGHT_DCLICK, wxHeaderCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_HEADER_MIDDLE_DCLICK, wxHeaderCtrlEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_HEADER_SEPARATOR_DCLICK, wxHeaderCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_HEADER_SEPARATOR_DCLICK, wxHeaderCtrlEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_HEADER_BEGIN_RESIZE, wxHeaderCtrlEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_HEADER_RESIZING, wxHeaderCtrlEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_HEADER_END_RESIZE, wxHeaderCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_HEADER_BEGIN_RESIZE, wxHeaderCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_HEADER_RESIZING, wxHeaderCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_HEADER_END_RESIZE, wxHeaderCtrlEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_HEADER_BEGIN_REORDER, wxHeaderCtrlEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_HEADER_END_REORDER, wxHeaderCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_HEADER_BEGIN_REORDER, wxHeaderCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_HEADER_END_REORDER, wxHeaderCtrlEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_HEADER_DRAGGING_CANCELLED, wxHeaderCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_HEADER_DRAGGING_CANCELLED, wxHeaderCtrlEvent ); typedef void (wxEvtHandler::*wxHeaderCtrlEventFunction)(wxHeaderCtrlEvent&); @@ -448,7 +448,7 @@ typedef void (wxEvtHandler::*wxHeaderCtrlEventFunction)(wxHeaderCtrlEvent&); wxEVENT_HANDLER_CAST(wxHeaderCtrlEventFunction, func) #define wx__DECLARE_HEADER_EVT(evt, id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_HEADER_ ## evt, id, wxHeaderCtrlEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_HEADER_ ## evt, id, wxHeaderCtrlEventHandler(fn)) #define EVT_HEADER_CLICK(id, fn) wx__DECLARE_HEADER_EVT(CLICK, id, fn) #define EVT_HEADER_RIGHT_CLICK(id, fn) wx__DECLARE_HEADER_EVT(RIGHT_CLICK, id, fn) @@ -469,6 +469,21 @@ typedef void (wxEvtHandler::*wxHeaderCtrlEventFunction)(wxHeaderCtrlEvent&); #define EVT_HEADER_DRAGGING_CANCELLED(id, fn) wx__DECLARE_HEADER_EVT(DRAGGING_CANCELLED, id, fn) +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_HEADER_CLICK wxEVT_HEADER_CLICK +#define wxEVT_COMMAND_HEADER_RIGHT_CLICK wxEVT_HEADER_RIGHT_CLICK +#define wxEVT_COMMAND_HEADER_MIDDLE_CLICK wxEVT_HEADER_MIDDLE_CLICK +#define wxEVT_COMMAND_HEADER_DCLICK wxEVT_HEADER_DCLICK +#define wxEVT_COMMAND_HEADER_RIGHT_DCLICK wxEVT_HEADER_RIGHT_DCLICK +#define wxEVT_COMMAND_HEADER_MIDDLE_DCLICK wxEVT_HEADER_MIDDLE_DCLICK +#define wxEVT_COMMAND_HEADER_SEPARATOR_DCLICK wxEVT_HEADER_SEPARATOR_DCLICK +#define wxEVT_COMMAND_HEADER_BEGIN_RESIZE wxEVT_HEADER_BEGIN_RESIZE +#define wxEVT_COMMAND_HEADER_RESIZING wxEVT_HEADER_RESIZING +#define wxEVT_COMMAND_HEADER_END_RESIZE wxEVT_HEADER_END_RESIZE +#define wxEVT_COMMAND_HEADER_BEGIN_REORDER wxEVT_HEADER_BEGIN_REORDER +#define wxEVT_COMMAND_HEADER_END_REORDER wxEVT_HEADER_END_REORDER +#define wxEVT_COMMAND_HEADER_DRAGGING_CANCELLED wxEVT_HEADER_DRAGGING_CANCELLED + #endif // wxUSE_HEADERCTRL #endif // _WX_HEADERCTRL_H_ diff --git a/include/wx/html/htmlwin.h b/include/wx/html/htmlwin.h index b95e7d6267..8e0c7ca987 100644 --- a/include/wx/html/htmlwin.h +++ b/include/wx/html/htmlwin.h @@ -560,9 +560,9 @@ private: class WXDLLIMPEXP_FWD_HTML wxHtmlCellEvent; -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_HTML, wxEVT_COMMAND_HTML_CELL_CLICKED, wxHtmlCellEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_HTML, wxEVT_COMMAND_HTML_CELL_HOVER, wxHtmlCellEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_HTML, wxEVT_COMMAND_HTML_LINK_CLICKED, wxHtmlLinkEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_HTML, wxEVT_HTML_CELL_CLICKED, wxHtmlCellEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_HTML, wxEVT_HTML_CELL_HOVER, wxHtmlCellEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_HTML, wxEVT_HTML_LINK_CLICKED, wxHtmlLinkEvent ); /*! @@ -615,7 +615,7 @@ class WXDLLIMPEXP_HTML wxHtmlLinkEvent : public wxCommandEvent public: wxHtmlLinkEvent() {} wxHtmlLinkEvent(int id, const wxHtmlLinkInfo &linkinfo) - : wxCommandEvent(wxEVT_COMMAND_HTML_LINK_CLICKED, id) + : wxCommandEvent(wxEVT_HTML_LINK_CLICKED, id) { m_linkInfo = linkinfo; } @@ -641,13 +641,18 @@ typedef void (wxEvtHandler::*wxHtmlLinkEventFunction)(wxHtmlLinkEvent&); wxEVENT_HANDLER_CAST(wxHtmlLinkEventFunction, func) #define EVT_HTML_CELL_CLICKED(id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_HTML_CELL_CLICKED, id, wxHtmlCellEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_HTML_CELL_CLICKED, id, wxHtmlCellEventHandler(fn)) #define EVT_HTML_CELL_HOVER(id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_HTML_CELL_HOVER, id, wxHtmlCellEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_HTML_CELL_HOVER, id, wxHtmlCellEventHandler(fn)) #define EVT_HTML_LINK_CLICKED(id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_HTML_LINK_CLICKED, id, wxHtmlLinkEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_HTML_LINK_CLICKED, id, wxHtmlLinkEventHandler(fn)) +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_HTML_CELL_CLICKED wxEVT_HTML_CELL_CLICKED +#define wxEVT_COMMAND_HTML_CELL_HOVER wxEVT_HTML_CELL_HOVER +#define wxEVT_COMMAND_HTML_LINK_CLICKED wxEVT_HTML_LINK_CLICKED + #endif // wxUSE_HTML #endif // _WX_HTMLWIN_H_ diff --git a/include/wx/hyperlink.h b/include/wx/hyperlink.h index 7ff25b3f4e..969a6864d7 100644 --- a/include/wx/hyperlink.h +++ b/include/wx/hyperlink.h @@ -88,7 +88,7 @@ public: class WXDLLIMPEXP_FWD_ADV wxHyperlinkEvent; -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_HYPERLINK, wxHyperlinkEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_HYPERLINK, wxHyperlinkEvent ); // // An event fired when the user clicks on the label in a hyperlink control. @@ -99,7 +99,7 @@ class WXDLLIMPEXP_ADV wxHyperlinkEvent : public wxCommandEvent public: wxHyperlinkEvent() {} wxHyperlinkEvent(wxObject *generator, wxWindowID id, const wxString& url) - : wxCommandEvent(wxEVT_COMMAND_HYPERLINK, id), + : wxCommandEvent(wxEVT_HYPERLINK, id), m_url(url) { SetEventObject(generator); @@ -132,7 +132,7 @@ typedef void (wxEvtHandler::*wxHyperlinkEventFunction)(wxHyperlinkEvent&); wxEVENT_HANDLER_CAST(wxHyperlinkEventFunction, func) #define EVT_HYPERLINK(id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_HYPERLINK, id, wxHyperlinkEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_HYPERLINK, id, wxHyperlinkEventHandler(fn)) #if defined(__WXGTK210__) && !defined(__WXUNIVERSAL__) @@ -166,6 +166,8 @@ typedef void (wxEvtHandler::*wxHyperlinkEventFunction)(wxHyperlinkEvent&); }; #endif +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_HYPERLINK wxEVT_HYPERLINK #endif // wxUSE_HYPERLINKCTRL diff --git a/include/wx/listbase.h b/include/wx/listbase.h index 0bbb2bc4a5..078f7361d6 100644 --- a/include/wx/listbase.h +++ b/include/wx/listbase.h @@ -515,11 +515,11 @@ public: long GetMask() const { return m_item.m_mask; } const wxListItem& GetItem() const { return m_item; } - // for wxEVT_COMMAND_LIST_CACHE_HINT only + // for wxEVT_LIST_CACHE_HINT only long GetCacheFrom() const { return m_oldItemIndex; } long GetCacheTo() const { return m_itemIndex; } - // was label editing canceled? (for wxEVT_COMMAND_LIST_END_LABEL_EDIT only) + // was label editing canceled? (for wxEVT_LIST_END_LABEL_EDIT only) bool IsEditCancelled() const { return m_editCancelled; } void SetEditCanceled(bool editCancelled) { m_editCancelled = editCancelled; } @@ -527,7 +527,7 @@ public: //protected: -- not for backwards compatibility int m_code; - long m_oldItemIndex; // only for wxEVT_COMMAND_LIST_CACHE_HINT + long m_oldItemIndex; // only for wxEVT_LIST_CACHE_HINT long m_itemIndex; int m_col; wxPoint m_pointDrag; @@ -545,27 +545,27 @@ private: // wxListCtrl event macros // ---------------------------------------------------------------------------- -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_LIST_BEGIN_DRAG, wxListEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_LIST_BEGIN_RDRAG, wxListEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT, wxListEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_LIST_END_LABEL_EDIT, wxListEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_LIST_DELETE_ITEM, wxListEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS, wxListEvent ); - -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_LIST_KEY_DOWN, wxListEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_LIST_INSERT_ITEM, wxListEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_LIST_COL_CLICK, wxListEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK, wxListEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK, wxListEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_LIST_CACHE_HINT, wxListEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_LIST_COL_RIGHT_CLICK, wxListEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_LIST_COL_BEGIN_DRAG, wxListEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_LIST_COL_DRAGGING, wxListEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_LIST_COL_END_DRAG, wxListEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_LIST_ITEM_FOCUSED, wxListEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LIST_BEGIN_DRAG, wxListEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LIST_BEGIN_RDRAG, wxListEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LIST_BEGIN_LABEL_EDIT, wxListEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LIST_END_LABEL_EDIT, wxListEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LIST_DELETE_ITEM, wxListEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LIST_DELETE_ALL_ITEMS, wxListEvent ); + +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LIST_ITEM_SELECTED, wxListEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LIST_ITEM_DESELECTED, wxListEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LIST_KEY_DOWN, wxListEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LIST_INSERT_ITEM, wxListEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LIST_COL_CLICK, wxListEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LIST_ITEM_RIGHT_CLICK, wxListEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LIST_ITEM_MIDDLE_CLICK, wxListEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LIST_ITEM_ACTIVATED, wxListEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LIST_CACHE_HINT, wxListEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LIST_COL_RIGHT_CLICK, wxListEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LIST_COL_BEGIN_DRAG, wxListEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LIST_COL_DRAGGING, wxListEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LIST_COL_END_DRAG, wxListEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LIST_ITEM_FOCUSED, wxListEvent ); typedef void (wxEvtHandler::*wxListEventFunction)(wxListEvent&); @@ -573,7 +573,7 @@ typedef void (wxEvtHandler::*wxListEventFunction)(wxListEvent&); wxEVENT_HANDLER_CAST(wxListEventFunction, func) #define wx__DECLARE_LISTEVT(evt, id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_LIST_ ## evt, id, wxListEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_LIST_ ## evt, id, wxListEventHandler(fn)) #define EVT_LIST_BEGIN_DRAG(id, fn) wx__DECLARE_LISTEVT(BEGIN_DRAG, id, fn) #define EVT_LIST_BEGIN_RDRAG(id, fn) wx__DECLARE_LISTEVT(BEGIN_RDRAG, id, fn) @@ -599,6 +599,28 @@ typedef void (wxEvtHandler::*wxListEventFunction)(wxListEvent&); #define EVT_LIST_CACHE_HINT(id, fn) wx__DECLARE_LISTEVT(CACHE_HINT, id, fn) +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_LIST_BEGIN_DRAG wxEVT_LIST_BEGIN_DRAG +#define wxEVT_COMMAND_LIST_BEGIN_RDRAG wxEVT_LIST_BEGIN_RDRAG +#define wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT wxEVT_LIST_BEGIN_LABEL_EDIT +#define wxEVT_COMMAND_LIST_END_LABEL_EDIT wxEVT_LIST_END_LABEL_EDIT +#define wxEVT_COMMAND_LIST_DELETE_ITEM wxEVT_LIST_DELETE_ITEM +#define wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS wxEVT_LIST_DELETE_ALL_ITEMS +#define wxEVT_COMMAND_LIST_ITEM_SELECTED wxEVT_LIST_ITEM_SELECTED +#define wxEVT_COMMAND_LIST_ITEM_DESELECTED wxEVT_LIST_ITEM_DESELECTED +#define wxEVT_COMMAND_LIST_KEY_DOWN wxEVT_LIST_KEY_DOWN +#define wxEVT_COMMAND_LIST_INSERT_ITEM wxEVT_LIST_INSERT_ITEM +#define wxEVT_COMMAND_LIST_COL_CLICK wxEVT_LIST_COL_CLICK +#define wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK wxEVT_LIST_ITEM_RIGHT_CLICK +#define wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK wxEVT_LIST_ITEM_MIDDLE_CLICK +#define wxEVT_COMMAND_LIST_ITEM_ACTIVATED wxEVT_LIST_ITEM_ACTIVATED +#define wxEVT_COMMAND_LIST_CACHE_HINT wxEVT_LIST_CACHE_HINT +#define wxEVT_COMMAND_LIST_COL_RIGHT_CLICK wxEVT_LIST_COL_RIGHT_CLICK +#define wxEVT_COMMAND_LIST_COL_BEGIN_DRAG wxEVT_LIST_COL_BEGIN_DRAG +#define wxEVT_COMMAND_LIST_COL_DRAGGING wxEVT_LIST_COL_DRAGGING +#define wxEVT_COMMAND_LIST_COL_END_DRAG wxEVT_LIST_COL_END_DRAG +#define wxEVT_COMMAND_LIST_ITEM_FOCUSED wxEVT_LIST_ITEM_FOCUSED + #endif // _WX_LISTCTRL_H_BASE_ diff --git a/include/wx/listbook.h b/include/wx/listbook.h index 8d7651b4ac..50c345adaa 100644 --- a/include/wx/listbook.h +++ b/include/wx/listbook.h @@ -22,8 +22,8 @@ class WXDLLIMPEXP_FWD_CORE wxListView; class WXDLLIMPEXP_FWD_CORE wxListEvent; -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_LISTBOOK_PAGE_CHANGED, wxBookCtrlEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_LISTBOOK_PAGE_CHANGING, wxBookCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LISTBOOK_PAGE_CHANGED, wxBookCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LISTBOOK_PAGE_CHANGING, wxBookCtrlEvent ); // wxListbook flags #define wxLB_DEFAULT wxBK_DEFAULT @@ -116,10 +116,14 @@ typedef wxBookCtrlEventFunction wxListbookEventFunction; #define wxListbookEventHandler(func) wxBookCtrlEventHandler(func) #define EVT_LISTBOOK_PAGE_CHANGED(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_LISTBOOK_PAGE_CHANGED, winid, wxBookCtrlEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_LISTBOOK_PAGE_CHANGED, winid, wxBookCtrlEventHandler(fn)) #define EVT_LISTBOOK_PAGE_CHANGING(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_LISTBOOK_PAGE_CHANGING, winid, wxBookCtrlEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_LISTBOOK_PAGE_CHANGING, winid, wxBookCtrlEventHandler(fn)) + +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_LISTBOOK_PAGE_CHANGED wxEVT_LISTBOOK_PAGE_CHANGED +#define wxEVT_COMMAND_LISTBOOK_PAGE_CHANGING wxEVT_LISTBOOK_PAGE_CHANGING #endif // wxUSE_LISTBOOK diff --git a/include/wx/motif/checkbox.h b/include/wx/motif/checkbox.h index 8676ef2fdd..d8c33323d3 100644 --- a/include/wx/motif/checkbox.h +++ b/include/wx/motif/checkbox.h @@ -45,7 +45,7 @@ private: // common part of all constructors void Init() { - m_evtType = wxEVT_COMMAND_CHECKBOX_CLICKED; + m_evtType = wxEVT_CHECKBOX; } virtual void DoSet3StateValue(wxCheckBoxState state); @@ -54,7 +54,7 @@ private: // public for the callback public: - // either exEVT_COMMAND_CHECKBOX_CLICKED or ..._TOGGLEBUTTON_CLICKED + // either wxEVT_CHECKBOX or ..._TOGGLEBUTTON wxEventType m_evtType; }; diff --git a/include/wx/motif/tglbtn.h b/include/wx/motif/tglbtn.h index b35aa1b5ce..b0af6483bb 100644 --- a/include/wx/motif/tglbtn.h +++ b/include/wx/motif/tglbtn.h @@ -47,7 +47,7 @@ private: // common part of all constructors void Init() { - m_evtType = wxEVT_COMMAND_TOGGLEBUTTON_CLICKED; + m_evtType = wxEVT_TOGGLEBUTTON; } }; diff --git a/include/wx/msw/checklst.h b/include/wx/msw/checklst.h index 31601d86bf..49ff9a8a5b 100644 --- a/include/wx/msw/checklst.h +++ b/include/wx/msw/checklst.h @@ -73,7 +73,7 @@ protected: // send an "item checked" event void SendEvent(unsigned int uiIndex) { - wxCommandEvent event(wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, GetId()); + wxCommandEvent event(wxEVT_CHECKLISTBOX, GetId()); event.SetInt(uiIndex); event.SetEventObject(this); event.SetString(GetString(uiIndex)); diff --git a/include/wx/notebook.h b/include/wx/notebook.h index 2311156392..647ba0df0a 100644 --- a/include/wx/notebook.h +++ b/include/wx/notebook.h @@ -132,7 +132,7 @@ public: virtual wxColour GetThemeBackgroundColour() const { return wxNullColour; } - // send wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING/ED events + // send wxEVT_NOTEBOOK_PAGE_CHANGING/ED events // returns false if the change to nPage is vetoed by the program bool SendPageChangingEvent(int nPage); @@ -169,14 +169,14 @@ protected: typedef wxBookCtrlEventFunction wxNotebookEventFunction; #define wxNotebookEventHandler(func) wxBookCtrlEventHandler(func) -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxBookCtrlEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, wxBookCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_NOTEBOOK_PAGE_CHANGED, wxBookCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_NOTEBOOK_PAGE_CHANGING, wxBookCtrlEvent ); #define EVT_NOTEBOOK_PAGE_CHANGED(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, winid, wxBookCtrlEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_NOTEBOOK_PAGE_CHANGED, winid, wxBookCtrlEventHandler(fn)) #define EVT_NOTEBOOK_PAGE_CHANGING(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, winid, wxBookCtrlEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_NOTEBOOK_PAGE_CHANGING, winid, wxBookCtrlEventHandler(fn)) // ---------------------------------------------------------------------------- // wxNotebook class itself @@ -200,6 +200,10 @@ wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING #include "wx/os2/notebook.h" #endif +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED wxEVT_NOTEBOOK_PAGE_CHANGED +#define wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING wxEVT_NOTEBOOK_PAGE_CHANGING + #endif // wxUSE_NOTEBOOK #endif diff --git a/include/wx/osx/fontdlg.h b/include/wx/osx/fontdlg.h index 0eaa515064..78df5dba9b 100644 --- a/include/wx/osx/fontdlg.h +++ b/include/wx/osx/fontdlg.h @@ -124,25 +124,25 @@ public: /// Respond to colour change void OnColourChanged(wxCommandEvent& event); - /// wxEVT_COMMAND_LISTBOX_SELECTED event handler for wxID_FONTDIALOG_FACENAME + /// wxEVT_LISTBOX event handler for wxID_FONTDIALOG_FACENAME void OnFontdialogFacenameSelected( wxCommandEvent& event ); - /// wxEVT_COMMAND_SPINCTRL_UPDATED event handler for wxID_FONTDIALOG_FONTSIZE + /// wxEVT_SPINCTRL event handler for wxID_FONTDIALOG_FONTSIZE void OnFontdialogFontsizeUpdated( wxSpinEvent& event ); - /// wxEVT_COMMAND_TEXT_UPDATED event handler for wxID_FONTDIALOG_FONTSIZE + /// wxEVT_TEXT event handler for wxID_FONTDIALOG_FONTSIZE void OnFontdialogFontsizeTextUpdated( wxCommandEvent& event ); - /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for wxID_FONTDIALOG_BOLD + /// wxEVT_CHECKBOX event handler for wxID_FONTDIALOG_BOLD void OnFontdialogBoldClick( wxCommandEvent& event ); - /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for wxID_FONTDIALOG_ITALIC + /// wxEVT_CHECKBOX event handler for wxID_FONTDIALOG_ITALIC void OnFontdialogItalicClick( wxCommandEvent& event ); - /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for wxID_FONTDIALOG_UNDERLINED + /// wxEVT_CHECKBOX event handler for wxID_FONTDIALOG_UNDERLINED void OnFontdialogUnderlinedClick( wxCommandEvent& event ); - /// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK + /// wxEVT_BUTTON event handler for wxID_OK void OnOkClick( wxCommandEvent& event ); /// Should we show tooltips? diff --git a/include/wx/osx/treectrl.h b/include/wx/osx/treectrl.h index acf069cb5f..f41511bce0 100644 --- a/include/wx/osx/treectrl.h +++ b/include/wx/osx/treectrl.h @@ -236,20 +236,20 @@ protected: }; /* - wxEVT_COMMAND_TREE_BEGIN_DRAG, - wxEVT_COMMAND_TREE_BEGIN_RDRAG, - wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, - wxEVT_COMMAND_TREE_END_LABEL_EDIT, - wxEVT_COMMAND_TREE_DELETE_ITEM, - wxEVT_COMMAND_TREE_GET_INFO, - wxEVT_COMMAND_TREE_SET_INFO, - wxEVT_COMMAND_TREE_ITEM_EXPANDED, - wxEVT_COMMAND_TREE_ITEM_EXPANDING, - wxEVT_COMMAND_TREE_ITEM_COLLAPSED, - wxEVT_COMMAND_TREE_ITEM_COLLAPSING, - wxEVT_COMMAND_TREE_SEL_CHANGED, - wxEVT_COMMAND_TREE_SEL_CHANGING, - wxEVT_COMMAND_TREE_KEY_DOWN + wxEVT_TREE_BEGIN_DRAG, + wxEVT_TREE_BEGIN_RDRAG, + wxEVT_TREE_BEGIN_LABEL_EDIT, + wxEVT_TREE_END_LABEL_EDIT, + wxEVT_TREE_DELETE_ITEM, + wxEVT_TREE_GET_INFO, + wxEVT_TREE_SET_INFO, + wxEVT_TREE_ITEM_EXPANDED, + wxEVT_TREE_ITEM_EXPANDING, + wxEVT_TREE_ITEM_COLLAPSED, + wxEVT_TREE_ITEM_COLLAPSING, + wxEVT_TREE_SEL_CHANGED, + wxEVT_TREE_SEL_CHANGING, + wxEVT_TREE_KEY_DOWN */ class WXDLLIMPEXP_CORE wxTreeEvent: public wxCommandEvent @@ -272,20 +272,36 @@ public: typedef void (wxEvtHandler::*wxTreeEventFunction)(wxTreeEvent&); -#define EVT_TREE_BEGIN_DRAG(id, fn) { wxEVT_COMMAND_TREE_BEGIN_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_BEGIN_RDRAG(id, fn) { wxEVT_COMMAND_TREE_BEGIN_RDRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_BEGIN_LABEL_EDIT(id, fn) { wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_END_LABEL_EDIT(id, fn) { wxEVT_COMMAND_TREE_END_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_DELETE_ITEM(id, fn) { wxEVT_COMMAND_TREE_DELETE_ITEM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_GET_INFO(id, fn) { wxEVT_COMMAND_TREE_GET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_SET_INFO(id, fn) { wxEVT_COMMAND_TREE_SET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_ITEM_EXPANDED(id, fn) { wxEVT_COMMAND_TREE_ITEM_EXPANDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_ITEM_EXPANDING(id, fn) { wxEVT_COMMAND_TREE_ITEM_EXPANDING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_ITEM_COLLAPSED(id, fn) { wxEVT_COMMAND_TREE_ITEM_COLLAPSED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_ITEM_COLLAPSING(id, fn) { wxEVT_COMMAND_TREE_ITEM_COLLAPSING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_SEL_CHANGED(id, fn) { wxEVT_COMMAND_TREE_SEL_CHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_SEL_CHANGING(id, fn) { wxEVT_COMMAND_TREE_SEL_CHANGING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_KEY_DOWN(id, fn) { wxEVT_COMMAND_TREE_KEY_DOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, +#define EVT_TREE_BEGIN_DRAG(id, fn) { wxEVT_TREE_BEGIN_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, +#define EVT_TREE_BEGIN_RDRAG(id, fn) { wxEVT_TREE_BEGIN_RDRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, +#define EVT_TREE_BEGIN_LABEL_EDIT(id, fn) { wxEVT_TREE_BEGIN_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, +#define EVT_TREE_END_LABEL_EDIT(id, fn) { wxEVT_TREE_END_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, +#define EVT_TREE_DELETE_ITEM(id, fn) { wxEVT_TREE_DELETE_ITEM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, +#define EVT_TREE_GET_INFO(id, fn) { wxEVT_TREE_GET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, +#define EVT_TREE_SET_INFO(id, fn) { wxEVT_TREE_SET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, +#define EVT_TREE_ITEM_EXPANDED(id, fn) { wxEVT_TREE_ITEM_EXPANDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, +#define EVT_TREE_ITEM_EXPANDING(id, fn) { wxEVT_TREE_ITEM_EXPANDING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, +#define EVT_TREE_ITEM_COLLAPSED(id, fn) { wxEVT_TREE_ITEM_COLLAPSED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, +#define EVT_TREE_ITEM_COLLAPSING(id, fn) { wxEVT_TREE_ITEM_COLLAPSING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, +#define EVT_TREE_SEL_CHANGED(id, fn) { wxEVT_TREE_SEL_CHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, +#define EVT_TREE_SEL_CHANGING(id, fn) { wxEVT_TREE_SEL_CHANGING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, +#define EVT_TREE_KEY_DOWN(id, fn) { wxEVT_TREE_KEY_DOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, + +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_TREE_BEGIN_DRAG wxEVT_TREE_BEGIN_DRAG +#define wxEVT_COMMAND_TREE_BEGIN_RDRAG wxEVT_TREE_BEGIN_RDRAG +#define wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT wxEVT_TREE_BEGIN_LABEL_EDIT +#define wxEVT_COMMAND_TREE_END_LABEL_EDIT wxEVT_TREE_END_LABEL_EDIT +#define wxEVT_COMMAND_TREE_DELETE_ITEM wxEVT_TREE_DELETE_ITEM +#define wxEVT_COMMAND_TREE_GET_INFO wxEVT_TREE_GET_INFO +#define wxEVT_COMMAND_TREE_SET_INFO wxEVT_TREE_SET_INFO +#define wxEVT_COMMAND_TREE_ITEM_EXPANDED wxEVT_TREE_ITEM_EXPANDED +#define wxEVT_COMMAND_TREE_ITEM_EXPANDING wxEVT_TREE_ITEM_EXPANDING +#define wxEVT_COMMAND_TREE_ITEM_COLLAPSED wxEVT_TREE_ITEM_COLLAPSED +#define wxEVT_COMMAND_TREE_ITEM_COLLAPSING wxEVT_TREE_ITEM_COLLAPSING +#define wxEVT_COMMAND_TREE_SEL_CHANGED wxEVT_TREE_SEL_CHANGED +#define wxEVT_COMMAND_TREE_SEL_CHANGING wxEVT_TREE_SEL_CHANGING +#define wxEVT_COMMAND_TREE_KEY_DOWN wxEVT_TREE_KEY_DOWN #endif // _WX_TREECTRL_H_ diff --git a/include/wx/propgrid/editors.h b/include/wx/propgrid/editors.h index d9ab664eba..1512871f44 100644 --- a/include/wx/propgrid/editors.h +++ b/include/wx/propgrid/editors.h @@ -149,7 +149,7 @@ public: (see wxPGProperty::OnEvent for more information). @remarks wxPropertyGrid will automatically unfocus the editor when - wxEVT_COMMAND_TEXT_ENTER is received and when it results in + wxEVT_TEXT_ENTER is received and when it results in property value being modified. This happens regardless of editor type (ie. behaviour is same for any wxTextCtrl and wxComboBox based editor). diff --git a/include/wx/propgrid/property.h b/include/wx/propgrid/property.h index 5bae8cc4af..f7364c14a0 100644 --- a/include/wx/propgrid/property.h +++ b/include/wx/propgrid/property.h @@ -1293,7 +1293,7 @@ public: button press events of TextCtrlAndButton class, can be handled here. Also, if custom handling for regular events is desired, then that can also be done (for example, wxSystemColourProperty custom handles - wxEVT_COMMAND_CHOICE_SELECTED to display colour picker dialog when + wxEVT_CHOICE to display colour picker dialog when 'custom' selection is made). If the event causes value to be changed, SetValueInEvent() diff --git a/include/wx/propgrid/propgrid.h b/include/wx/propgrid/propgrid.h index 96bd76b787..6b0458ee78 100644 --- a/include/wx/propgrid/propgrid.h +++ b/include/wx/propgrid/propgrid.h @@ -1609,7 +1609,7 @@ public: */ bool IsMainButtonEvent( const wxEvent& event ) { - return (event.GetEventType() == wxEVT_COMMAND_BUTTON_CLICKED) + return (event.GetEventType() == wxEVT_BUTTON) && (m_wndSecId == event.GetId()); } diff --git a/include/wx/propgrid/props.h b/include/wx/propgrid/props.h index 5d5528e44a..99c279f7a8 100644 --- a/include/wx/propgrid/props.h +++ b/include/wx/propgrid/props.h @@ -838,7 +838,7 @@ PROPNAME::~PROPNAME() { } \ bool PROPNAME::OnEvent( wxPropertyGrid* propgrid, \ wxWindow* primary, wxEvent& event ) \ { \ - if ( event.GetEventType() == wxEVT_COMMAND_BUTTON_CLICKED ) \ + if ( event.GetEventType() == wxEVT_BUTTON ) \ return OnButtonClick(propgrid,primary,(const wxChar*) CUSTBUTTXT); \ return false; \ } diff --git a/include/wx/ribbon/bar.h b/include/wx/ribbon/bar.h index 8eac8e0771..aea15c1eba 100644 --- a/include/wx/ribbon/bar.h +++ b/include/wx/ribbon/bar.h @@ -221,15 +221,15 @@ protected: #ifndef SWIG -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_COMMAND_RIBBONBAR_PAGE_CHANGED, wxRibbonBarEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_COMMAND_RIBBONBAR_PAGE_CHANGING, wxRibbonBarEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_COMMAND_RIBBONBAR_TAB_MIDDLE_DOWN, wxRibbonBarEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_COMMAND_RIBBONBAR_TAB_MIDDLE_UP, wxRibbonBarEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_COMMAND_RIBBONBAR_TAB_RIGHT_DOWN, wxRibbonBarEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_COMMAND_RIBBONBAR_TAB_RIGHT_UP, wxRibbonBarEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_COMMAND_RIBBONBAR_TAB_LEFT_DCLICK, wxRibbonBarEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_COMMAND_RIBBONBAR_TOGGLED, wxRibbonBarEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_COMMAND_RIBBONBAR_HELP_CLICKED, wxRibbonBarEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_RIBBONBAR_PAGE_CHANGED, wxRibbonBarEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_RIBBONBAR_PAGE_CHANGING, wxRibbonBarEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_RIBBONBAR_TAB_MIDDLE_DOWN, wxRibbonBarEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_RIBBONBAR_TAB_MIDDLE_UP, wxRibbonBarEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_RIBBONBAR_TAB_RIGHT_DOWN, wxRibbonBarEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_RIBBONBAR_TAB_RIGHT_UP, wxRibbonBarEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_RIBBONBAR_TAB_LEFT_DCLICK, wxRibbonBarEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_RIBBONBAR_TOGGLED, wxRibbonBarEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_RIBBONBAR_HELP_CLICK, wxRibbonBarEvent); typedef void (wxEvtHandler::*wxRibbonBarEventFunction)(wxRibbonBarEvent&); @@ -237,49 +237,60 @@ typedef void (wxEvtHandler::*wxRibbonBarEventFunction)(wxRibbonBarEvent&); wxEVENT_HANDLER_CAST(wxRibbonBarEventFunction, func) #define EVT_RIBBONBAR_PAGE_CHANGED(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_RIBBONBAR_PAGE_CHANGED, winid, wxRibbonBarEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_RIBBONBAR_PAGE_CHANGED, winid, wxRibbonBarEventHandler(fn)) #define EVT_RIBBONBAR_PAGE_CHANGING(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_RIBBONBAR_PAGE_CHANGING, winid, wxRibbonBarEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_RIBBONBAR_PAGE_CHANGING, winid, wxRibbonBarEventHandler(fn)) #define EVT_RIBBONBAR_TAB_MIDDLE_DOWN(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_RIBBONBAR_TAB_MIDDLE_DOWN, winid, wxRibbonBarEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_RIBBONBAR_TAB_MIDDLE_DOWN, winid, wxRibbonBarEventHandler(fn)) #define EVT_RIBBONBAR_TAB_MIDDLE_UP(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_RIBBONBAR_TAB_MIDDLE_UP, winid, wxRibbonBarEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_RIBBONBAR_TAB_MIDDLE_UP, winid, wxRibbonBarEventHandler(fn)) #define EVT_RIBBONBAR_TAB_RIGHT_DOWN(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_RIBBONBAR_TAB_RIGHT_DOWN, winid, wxRibbonBarEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_RIBBONBAR_TAB_RIGHT_DOWN, winid, wxRibbonBarEventHandler(fn)) #define EVT_RIBBONBAR_TAB_RIGHT_UP(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_RIBBONBAR_TAB_RIGHT_UP, winid, wxRibbonBarEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_RIBBONBAR_TAB_RIGHT_UP, winid, wxRibbonBarEventHandler(fn)) #define EVT_RIBBONBAR_TAB_LEFT_DCLICK(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_RIBBONBAR_TAB_LEFT_DCLICK, winid, wxRibbonBarEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_RIBBONBAR_TAB_LEFT_DCLICK, winid, wxRibbonBarEventHandler(fn)) #define EVT_RIBBONBAR_TOGGLED(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_RIBBONBAR_TOGGLED, winid, wxRibbonBarEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_RIBBONBAR_TOGGLED, winid, wxRibbonBarEventHandler(fn)) #define EVT_RIBBONBAR_HELP_CLICK(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_RIBBONBAR_HELP_CLICKED, winid, wxRibbonBarEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_RIBBONBAR_HELP_CLICK, winid, wxRibbonBarEventHandler(fn)) #else // wxpython/swig event work -%constant wxEventType wxEVT_COMMAND_RIBBONBAR_PAGE_CHANGED; -%constant wxEventType wxEVT_COMMAND_RIBBONBAR_PAGE_CHANGING; -%constant wxEventType wxEVT_COMMAND_RIBBONBAR_TAB_MIDDLE_DOWN; -%constant wxEventType wxEVT_COMMAND_RIBBONBAR_TAB_MIDDLE_UP; -%constant wxEventType wxEVT_COMMAND_RIBBONBAR_TAB_RIGHT_DOWN; -%constant wxEventType wxEVT_COMMAND_RIBBONBAR_TAB_RIGHT_UP; -%constant wxEventType wxEVT_COMMAND_RIBBONBAR_TAB_LEFT_DCLICK; -%constant wxEventType wxEVT_COMMAND_RIBBONBAR_TOGGLED; -%constant wxEventType wxEVT_COMMAND_RIBBONBAR_HELP_CLICKED; +%constant wxEventType wxEVT_RIBBONBAR_PAGE_CHANGED; +%constant wxEventType wxEVT_RIBBONBAR_PAGE_CHANGING; +%constant wxEventType wxEVT_RIBBONBAR_TAB_MIDDLE_DOWN; +%constant wxEventType wxEVT_RIBBONBAR_TAB_MIDDLE_UP; +%constant wxEventType wxEVT_RIBBONBAR_TAB_RIGHT_DOWN; +%constant wxEventType wxEVT_RIBBONBAR_TAB_RIGHT_UP; +%constant wxEventType wxEVT_RIBBONBAR_TAB_LEFT_DCLICK; +%constant wxEventType wxEVT_RIBBONBAR_TOGGLED; +%constant wxEventType wxEVT_RIBBONBAR_HELP_CLICK; %pythoncode { - EVT_RIBBONBAR_PAGE_CHANGED = wx.PyEventBinder( wxEVT_COMMAND_RIBBONBAR_PAGE_CHANGED, 1 ) - EVT_RIBBONBAR_PAGE_CHANGING = wx.PyEventBinder( wxEVT_COMMAND_RIBBONBAR_PAGE_CHANGING, 1 ) - EVT_RIBBONBAR_TAB_MIDDLE_DOWN = wx.PyEventBinder( wxEVT_COMMAND_RIBBONBAR_TAB_MIDDLE_DOWN, 1 ) - EVT_RIBBONBAR_TAB_MIDDLE_UP = wx.PyEventBinder( wxEVT_COMMAND_RIBBONBAR_TAB_MIDDLE_UP, 1 ) - EVT_RIBBONBAR_TAB_RIGHT_DOWN = wx.PyEventBinder( wxEVT_COMMAND_RIBBONBAR_TAB_RIGHT_DOWN, 1 ) - EVT_RIBBONBAR_TAB_RIGHT_UP = wx.PyEventBinder( wxEVT_COMMAND_RIBBONBAR_TAB_RIGHT_UP, 1 ) - EVT_RIBBONBAR_TAB_LEFT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_RIBBONBAR_TAB_LEFT_DCLICK, 1 ) - EVT_RIBBONBAR_TOGGLED = wx.PyEventBinder( wxEVT_COMMAND_RIBBONBAR_TOGGLED, 1 ) - EVT_RIBBONBAR_HELP_CLICK = wx.PyEventBinder( wxEVT_COMMAND_RIBBONBAR_HELP_CLICKED, 1 ) + EVT_RIBBONBAR_PAGE_CHANGED = wx.PyEventBinder( wxEVT_RIBBONBAR_PAGE_CHANGED, 1 ) + EVT_RIBBONBAR_PAGE_CHANGING = wx.PyEventBinder( wxEVT_RIBBONBAR_PAGE_CHANGING, 1 ) + EVT_RIBBONBAR_TAB_MIDDLE_DOWN = wx.PyEventBinder( wxEVT_RIBBONBAR_TAB_MIDDLE_DOWN, 1 ) + EVT_RIBBONBAR_TAB_MIDDLE_UP = wx.PyEventBinder( wxEVT_RIBBONBAR_TAB_MIDDLE_UP, 1 ) + EVT_RIBBONBAR_TAB_RIGHT_DOWN = wx.PyEventBinder( wxEVT_RIBBONBAR_TAB_RIGHT_DOWN, 1 ) + EVT_RIBBONBAR_TAB_RIGHT_UP = wx.PyEventBinder( wxEVT_RIBBONBAR_TAB_RIGHT_UP, 1 ) + EVT_RIBBONBAR_TAB_LEFT_DCLICK = wx.PyEventBinder( wxEVT_RIBBONBAR_TAB_LEFT_DCLICK, 1 ) + EVT_RIBBONBAR_TOGGLED = wx.PyEventBinder( wxEVT_RIBBONBAR_TOGGLED, 1 ) + EVT_RIBBONBAR_HELP_CLICK = wx.PyEventBinder( wxEVT_RIBBONBAR_HELP_CLICK, 1 ) } #endif +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_RIBBONBAR_PAGE_CHANGED wxEVT_RIBBONBAR_PAGE_CHANGED +#define wxEVT_COMMAND_RIBBONBAR_PAGE_CHANGING wxEVT_RIBBONBAR_PAGE_CHANGING +#define wxEVT_COMMAND_RIBBONBAR_TAB_MIDDLE_DOWN wxEVT_RIBBONBAR_TAB_MIDDLE_DOWN +#define wxEVT_COMMAND_RIBBONBAR_TAB_MIDDLE_UP wxEVT_RIBBONBAR_TAB_MIDDLE_UP +#define wxEVT_COMMAND_RIBBONBAR_TAB_RIGHT_DOWN wxEVT_RIBBONBAR_TAB_RIGHT_DOWN +#define wxEVT_COMMAND_RIBBONBAR_TAB_RIGHT_UP wxEVT_RIBBONBAR_TAB_RIGHT_UP +#define wxEVT_COMMAND_RIBBONBAR_TAB_LEFT_DCLICK wxEVT_RIBBONBAR_TAB_LEFT_DCLICK +#define wxEVT_COMMAND_RIBBONBAR_TOGGLED wxEVT_RIBBONBAR_TOGGLED +#define wxEVT_COMMAND_RIBBONBAR_HELP_CLICKED wxEVT_RIBBONBAR_HELP_CLICK + #endif // wxUSE_RIBBON #endif // _WX_RIBBON_BAR_H_ diff --git a/include/wx/ribbon/buttonbar.h b/include/wx/ribbon/buttonbar.h index 38957d7c5c..2a9ef8a0b6 100644 --- a/include/wx/ribbon/buttonbar.h +++ b/include/wx/ribbon/buttonbar.h @@ -236,8 +236,8 @@ private: #ifndef SWIG -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_COMMAND_RIBBONBUTTON_DROPDOWN_CLICKED, wxRibbonButtonBarEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_RIBBONBUTTONBAR_CLICKED, wxRibbonButtonBarEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_RIBBONBUTTONBAR_DROPDOWN_CLICKED, wxRibbonButtonBarEvent); typedef void (wxEvtHandler::*wxRibbonButtonBarEventFunction)(wxRibbonButtonBarEvent&); @@ -245,21 +245,25 @@ typedef void (wxEvtHandler::*wxRibbonButtonBarEventFunction)(wxRibbonButtonBarEv wxEVENT_HANDLER_CAST(wxRibbonButtonBarEventFunction, func) #define EVT_RIBBONBUTTONBAR_CLICKED(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_RIBBONBUTTON_CLICKED, winid, wxRibbonButtonBarEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_RIBBONBUTTONBAR_CLICKED, winid, wxRibbonButtonBarEventHandler(fn)) #define EVT_RIBBONBUTTONBAR_DROPDOWN_CLICKED(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_RIBBONBUTTON_DROPDOWN_CLICKED, winid, wxRibbonButtonBarEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_RIBBONBUTTONBAR_DROPDOWN_CLICKED, winid, wxRibbonButtonBarEventHandler(fn)) #else // wxpython/swig event work -%constant wxEventType wxEVT_COMMAND_RIBBONBUTTON_CLICKED; -%constant wxEventType wxEVT_COMMAND_RIBBONBUTTON_DROPDOWN_CLICKED; +%constant wxEventType wxEVT_RIBBONBUTTONBAR_CLICKED; +%constant wxEventType wxEVT_RIBBONBUTTONBAR_DROPDOWN_CLICKED; %pythoncode { - EVT_RIBBONBUTTONBAR_CLICKED = wx.PyEventBinder( wxEVT_COMMAND_RIBBONBUTTON_CLICKED, 1 ) - EVT_RIBBONBUTTONBAR_DROPDOWN_CLICKED = wx.PyEventBinder( wxEVT_COMMAND_RIBBONBUTTON_DROPDOWN_CLICKED, 1 ) + EVT_RIBBONBUTTONBAR_CLICKED = wx.PyEventBinder( wxEVT_RIBBONBUTTONBAR_CLICKED, 1 ) + EVT_RIBBONBUTTONBAR_DROPDOWN_CLICKED = wx.PyEventBinder( wxEVT_RIBBONBUTTONBAR_DROPDOWN_CLICKED, 1 ) } #endif +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_RIBBONBUTTON_CLICKED wxEVT_RIBBONBUTTONBAR_CLICKED +#define wxEVT_COMMAND_RIBBONBUTTON_DROPDOWN_CLICKED wxEVT_RIBBONBUTTONBAR_DROPDOWN_CLICKED + #endif // wxUSE_RIBBON #endif // _WX_RIBBON_BUTTON_BAR_H_ diff --git a/include/wx/ribbon/gallery.h b/include/wx/ribbon/gallery.h index 5e59de37a4..08cd76b0aa 100644 --- a/include/wx/ribbon/gallery.h +++ b/include/wx/ribbon/gallery.h @@ -160,9 +160,9 @@ private: #ifndef SWIG -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_COMMAND_RIBBONGALLERY_HOVER_CHANGED, wxRibbonGalleryEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_COMMAND_RIBBONGALLERY_SELECTED, wxRibbonGalleryEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_COMMAND_RIBBONGALLERY_CLICKED, wxRibbonGalleryEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_RIBBONGALLERY_HOVER_CHANGED, wxRibbonGalleryEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_RIBBONGALLERY_SELECTED, wxRibbonGalleryEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_RIBBONGALLERY_CLICKED, wxRibbonGalleryEvent); typedef void (wxEvtHandler::*wxRibbonGalleryEventFunction)(wxRibbonGalleryEvent&); @@ -170,23 +170,28 @@ typedef void (wxEvtHandler::*wxRibbonGalleryEventFunction)(wxRibbonGalleryEvent& wxEVENT_HANDLER_CAST(wxRibbonGalleryEventFunction, func) #define EVT_RIBBONGALLERY_HOVER_CHANGED(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_RIBBONGALLERY_HOVER_CHANGED, winid, wxRibbonGalleryEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_RIBBONGALLERY_HOVER_CHANGED, winid, wxRibbonGalleryEventHandler(fn)) #define EVT_RIBBONGALLERY_SELECTED(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_RIBBONGALLERY_SELECTED, winid, wxRibbonGalleryEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_RIBBONGALLERY_SELECTED, winid, wxRibbonGalleryEventHandler(fn)) #define EVT_RIBBONGALLERY_CLICKED(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_RIBBONGALLERY_CLICKED, winid, wxRibbonGalleryEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_RIBBONGALLERY_CLICKED, winid, wxRibbonGalleryEventHandler(fn)) #else // wxpython/swig event work -%constant wxEventType wxEVT_COMMAND_RIBBONGALLERY_HOVER_CHANGED; -%constant wxEventType wxEVT_COMMAND_RIBBONGALLERY_SELECTED; +%constant wxEventType wxEVT_RIBBONGALLERY_HOVER_CHANGED; +%constant wxEventType wxEVT_RIBBONGALLERY_SELECTED; %pythoncode { - EVT_RIBBONGALLERY_HOVER_CHANGED = wx.PyEventBinder( wxEVT_COMMAND_RIBBONGALLERY_HOVER_CHANGED, 1 ) - EVT_RIBBONGALLERY_SELECTED = wx.PyEventBinder( wxEVT_COMMAND_RIBBONGALLERY_SELECTED, 1 ) + EVT_RIBBONGALLERY_HOVER_CHANGED = wx.PyEventBinder( wxEVT_RIBBONGALLERY_HOVER_CHANGED, 1 ) + EVT_RIBBONGALLERY_SELECTED = wx.PyEventBinder( wxEVT_RIBBONGALLERY_SELECTED, 1 ) } #endif // SWIG +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_RIBBONGALLERY_HOVER_CHANGED wxEVT_RIBBONGALLERY_HOVER_CHANGED +#define wxEVT_COMMAND_RIBBONGALLERY_SELECTED wxEVT_RIBBONGALLERY_SELECTED +#define wxEVT_COMMAND_RIBBONGALLERY_CLICKED wxEVT_RIBBONGALLERY_CLICKED + #endif // wxUSE_RIBBON #endif // _WX_RIBBON_GALLERY_H_ diff --git a/include/wx/ribbon/panel.h b/include/wx/ribbon/panel.h index 27bb78ea30..a081bd6032 100644 --- a/include/wx/ribbon/panel.h +++ b/include/wx/ribbon/panel.h @@ -173,7 +173,7 @@ private: #ifndef SWIG -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_COMMAND_RIBBONPANEL_EXTBUTTON_ACTIVATED, wxRibbonPanelEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_RIBBONPANEL_EXTBUTTON_ACTIVATED, wxRibbonPanelEvent); typedef void (wxEvtHandler::*wxRibbonPanelEventFunction)(wxRibbonPanelEvent&); @@ -181,17 +181,20 @@ typedef void (wxEvtHandler::*wxRibbonPanelEventFunction)(wxRibbonPanelEvent&); wxEVENT_HANDLER_CAST(wxRibbonPanelEventFunction, func) #define EVT_RIBBONPANEL_EXTBUTTON_ACTIVATED(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_RIBBONPANEL_EXTBUTTON_ACTIVATED, winid, wxRibbonPanelEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_RIBBONPANEL_EXTBUTTON_ACTIVATED, winid, wxRibbonPanelEventHandler(fn)) #else // wxpython/swig event work -%constant wxEventType wxEVT_COMMAND_RIBBONPANEL_ACTIVATED; +%constant wxEventType wxEVT_RIBBONPANEL_EXTBUTTON_ACTIVATED; %pythoncode { - EVT_RIBBONPANEL_EXTBUTTON_ACTIVATED = wx.PyEventBinder( wxEVT_COMMAND_RIBBONPANEL_EXTBUTTON_ACTIVATED, 1 ) + EVT_RIBBONPANEL_EXTBUTTON_ACTIVATED = wx.PyEventBinder( wxEVT_RIBBONPANEL_EXTBUTTON_ACTIVATED, 1 ) } #endif +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_RIBBONPANEL_EXTBUTTON_ACTIVATED wxEVT_RIBBONPANEL_EXTBUTTON_ACTIVATED + #endif // wxUSE_RIBBON #endif // _WX_RIBBON_PANEL_H_ diff --git a/include/wx/ribbon/toolbar.h b/include/wx/ribbon/toolbar.h index da6c2624b7..5d788af3a8 100644 --- a/include/wx/ribbon/toolbar.h +++ b/include/wx/ribbon/toolbar.h @@ -231,8 +231,8 @@ private: #ifndef SWIG -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_COMMAND_RIBBONTOOL_CLICKED, wxRibbonToolBarEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_COMMAND_RIBBONTOOL_DROPDOWN_CLICKED, wxRibbonToolBarEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_RIBBONTOOLBAR_CLICKED, wxRibbonToolBarEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_RIBBONTOOLBAR_DROPDOWN_CLICKED, wxRibbonToolBarEvent); typedef void (wxEvtHandler::*wxRibbonToolBarEventFunction)(wxRibbonToolBarEvent&); @@ -240,21 +240,25 @@ typedef void (wxEvtHandler::*wxRibbonToolBarEventFunction)(wxRibbonToolBarEvent& wxEVENT_HANDLER_CAST(wxRibbonToolBarEventFunction, func) #define EVT_RIBBONTOOLBAR_CLICKED(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_RIBBONTOOL_CLICKED, winid, wxRibbonToolBarEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_RIBBONTOOLBAR_CLICKED, winid, wxRibbonToolBarEventHandler(fn)) #define EVT_RIBBONTOOLBAR_DROPDOWN_CLICKED(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_RIBBONTOOL_DROPDOWN_CLICKED, winid, wxRibbonToolBarEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_RIBBONTOOLBAR_DROPDOWN_CLICKED, winid, wxRibbonToolBarEventHandler(fn)) #else // wxpython/swig event work -%constant wxEventType wxEVT_COMMAND_RIBBONTOOL_CLICKED; -%constant wxEventType wxEVT_COMMAND_RIBBONTOOL_DROPDOWN_CLICKED; +%constant wxEventType wxEVT_RIBBONTOOLBAR_CLICKED; +%constant wxEventType wxEVT_RIBBONTOOLBAR_DROPDOWN_CLICKED; %pythoncode { - EVT_RIBBONTOOLBAR_CLICKED = wx.PyEventBinder( wxEVT_COMMAND_RIBBONTOOL_CLICKED, 1 ) - EVT_RIBBONTOOLBAR_DROPDOWN_CLICKED = wx.PyEventBinder( wxEVT_COMMAND_RIBBONTOOL_DROPDOWN_CLICKED, 1 ) + EVT_RIBBONTOOLBAR_CLICKED = wx.PyEventBinder( wxEVT_RIBBONTOOLBAR_CLICKED, 1 ) + EVT_RIBBONTOOLBAR_DROPDOWN_CLICKED = wx.PyEventBinder( wxEVT_RIBBONTOOLBAR_DROPDOWN_CLICKED, 1 ) } #endif +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_RIBBONTOOL_CLICKED wxEVT_RIBBONTOOLBAR_CLICKED +#define wxEVT_COMMAND_RIBBONTOOL_DROPDOWN_CLICKED wxEVT_RIBBONTOOLBAR_DROPDOWN_CLICKED + #endif // wxUSE_RIBBON #endif // _WX_RIBBON_TOOLBAR_H_ diff --git a/include/wx/richtext/richtextborderspage.h b/include/wx/richtext/richtextborderspage.h index 2bd0f3bedc..d47a863bcd 100644 --- a/include/wx/richtext/richtextborderspage.h +++ b/include/wx/richtext/richtextborderspage.h @@ -94,7 +94,7 @@ public: ////@begin wxRichTextBordersPage event handler declarations - /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXT_BORDER_LEFT_CHECKBOX + /// wxEVT_CHECKBOX event handler for ID_RICHTEXT_BORDER_LEFT_CHECKBOX void OnRichtextBorderCheckboxClick( wxCommandEvent& event ); /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_BORDER_LEFT diff --git a/include/wx/richtext/richtextbulletspage.h b/include/wx/richtext/richtextbulletspage.h index 88ea4eba2d..d3c13778d9 100644 --- a/include/wx/richtext/richtextbulletspage.h +++ b/include/wx/richtext/richtextbulletspage.h @@ -85,52 +85,52 @@ public: ////@begin wxRichTextBulletsPage event handler declarations - /// wxEVT_COMMAND_LISTBOX_SELECTED event handler for ID_RICHTEXTBULLETSPAGE_STYLELISTBOX + /// wxEVT_LISTBOX event handler for ID_RICHTEXTBULLETSPAGE_STYLELISTBOX void OnStylelistboxSelected( wxCommandEvent& event ); - /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXTBULLETSPAGE_PERIODCTRL + /// wxEVT_CHECKBOX event handler for ID_RICHTEXTBULLETSPAGE_PERIODCTRL void OnPeriodctrlClick( wxCommandEvent& event ); /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_PERIODCTRL void OnPeriodctrlUpdate( wxUpdateUIEvent& event ); - /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXTBULLETSPAGE_PARENTHESESCTRL + /// wxEVT_CHECKBOX event handler for ID_RICHTEXTBULLETSPAGE_PARENTHESESCTRL void OnParenthesesctrlClick( wxCommandEvent& event ); /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_PARENTHESESCTRL void OnParenthesesctrlUpdate( wxUpdateUIEvent& event ); - /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXTBULLETSPAGE_RIGHTPARENTHESISCTRL + /// wxEVT_CHECKBOX event handler for ID_RICHTEXTBULLETSPAGE_RIGHTPARENTHESISCTRL void OnRightParenthesisCtrlClick( wxCommandEvent& event ); /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_RIGHTPARENTHESISCTRL void OnRightParenthesisCtrlUpdate( wxUpdateUIEvent& event ); - /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTBULLETSPAGE_BULLETALIGNMENTCTRL + /// wxEVT_COMBOBOX event handler for ID_RICHTEXTBULLETSPAGE_BULLETALIGNMENTCTRL void OnBulletAlignmentCtrlSelected( wxCommandEvent& event ); /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLSTATIC void OnSymbolstaticUpdate( wxUpdateUIEvent& event ); - /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL + /// wxEVT_COMBOBOX event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL void OnSymbolctrlSelected( wxCommandEvent& event ); - /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL + /// wxEVT_TEXT event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL void OnSymbolctrlUpdated( wxCommandEvent& event ); /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL void OnSymbolctrlUpdate( wxUpdateUIEvent& event ); - /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXTBULLETSPAGE_CHOOSE_SYMBOL + /// wxEVT_BUTTON event handler for ID_RICHTEXTBULLETSPAGE_CHOOSE_SYMBOL void OnChooseSymbolClick( wxCommandEvent& event ); /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_CHOOSE_SYMBOL void OnChooseSymbolUpdate( wxUpdateUIEvent& event ); - /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLFONTCTRL + /// wxEVT_COMBOBOX event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLFONTCTRL void OnSymbolfontctrlSelected( wxCommandEvent& event ); - /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLFONTCTRL + /// wxEVT_TEXT event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLFONTCTRL void OnSymbolfontctrlUpdated( wxCommandEvent& event ); /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLFONTCTRL @@ -139,10 +139,10 @@ public: /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_NAMESTATIC void OnNamestaticUpdate( wxUpdateUIEvent& event ); - /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTBULLETSPAGE_NAMECTRL + /// wxEVT_COMBOBOX event handler for ID_RICHTEXTBULLETSPAGE_NAMECTRL void OnNamectrlSelected( wxCommandEvent& event ); - /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTBULLETSPAGE_NAMECTRL + /// wxEVT_TEXT event handler for ID_RICHTEXTBULLETSPAGE_NAMECTRL void OnNamectrlUpdated( wxCommandEvent& event ); /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_NAMECTRL @@ -151,7 +151,7 @@ public: /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_NUMBERSTATIC void OnNumberstaticUpdate( wxUpdateUIEvent& event ); - /// wxEVT_COMMAND_SPINCTRL_UPDATED event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL + /// wxEVT_SPINCTRL event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL void OnNumberctrlUpdated( wxSpinEvent& event ); /// wxEVT_SCROLL_LINEUP event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL @@ -160,7 +160,7 @@ public: /// wxEVT_SCROLL_LINEDOWN event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL void OnNumberctrlDown( wxSpinEvent& event ); - /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL + /// wxEVT_TEXT event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL void OnNumberctrlTextUpdated( wxCommandEvent& event ); /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL diff --git a/include/wx/richtext/richtextctrl.h b/include/wx/richtext/richtextctrl.h index 364f62a68d..88c6f66387 100644 --- a/include/wx/richtext/richtextctrl.h +++ b/include/wx/richtext/richtextctrl.h @@ -191,8 +191,8 @@ public: wxRichTextCtrl sends notification events: see wxRichTextEvent. - It also sends the standard wxTextCtrl events @c wxEVT_COMMAND_TEXT_ENTER and - @c wxEVT_COMMAND_TEXT_UPDATED, and wxTextUrlEvent when URL content is clicked. + It also sends the standard wxTextCtrl events @c wxEVT_TEXT_ENTER and + @c wxEVT_TEXT, and wxTextUrlEvent when URL content is clicked. For more information, see the @ref overview_richtextctrl. @@ -2354,66 +2354,63 @@ protected: @beginEventTable{wxRichTextEvent} @event{EVT_RICHTEXT_LEFT_CLICK(id, func)} - Process a @c wxEVT_COMMAND_RICHTEXT_LEFT_CLICK event, generated when the user + Process a @c wxEVT_RICHTEXT_LEFT_CLICK event, generated when the user releases the left mouse button over an object. @event{EVT_RICHTEXT_RIGHT_CLICK(id, func)} - Process a @c wxEVT_COMMAND_RICHTEXT_RIGHT_CLICK event, generated when the user + Process a @c wxEVT_RICHTEXT_RIGHT_CLICK event, generated when the user releases the right mouse button over an object. @event{EVT_RICHTEXT_MIDDLE_CLICK(id, func)} - Process a @c wxEVT_COMMAND_RICHTEXT_MIDDLE_CLICK event, generated when the user + Process a @c wxEVT_RICHTEXT_MIDDLE_CLICK event, generated when the user releases the middle mouse button over an object. @event{EVT_RICHTEXT_LEFT_DCLICK(id, func)} - Process a @c wxEVT_COMMAND_RICHTEXT_LEFT_DCLICK event, generated when the user + Process a @c wxEVT_RICHTEXT_LEFT_DCLICK event, generated when the user double-clicks an object. @event{EVT_RICHTEXT_RETURN(id, func)} - Process a @c wxEVT_COMMAND_RICHTEXT_RETURN event, generated when the user + Process a @c wxEVT_RICHTEXT_RETURN event, generated when the user presses the return key. Valid event functions: GetFlags, GetPosition. @event{EVT_RICHTEXT_CHARACTER(id, func)} - Process a @c wxEVT_COMMAND_RICHTEXT_CHARACTER event, generated when the user + Process a @c wxEVT_RICHTEXT_CHARACTER event, generated when the user presses a character key. Valid event functions: GetFlags, GetPosition, GetCharacter. @event{EVT_RICHTEXT_DELETE(id, func)} - Process a @c wxEVT_COMMAND_RICHTEXT_DELETE event, generated when the user + Process a @c wxEVT_RICHTEXT_DELETE event, generated when the user presses the backspace or delete key. Valid event functions: GetFlags, GetPosition. - @event{EVT_RICHTEXT_RETURN(id, func)} - Process a @c wxEVT_COMMAND_RICHTEXT_RETURN event, generated when the user - presses the return key. Valid event functions: GetFlags, GetPosition. @event{EVT_RICHTEXT_STYLE_CHANGED(id, func)} - Process a @c wxEVT_COMMAND_RICHTEXT_STYLE_CHANGED event, generated when + Process a @c wxEVT_RICHTEXT_STYLE_CHANGED event, generated when styling has been applied to the control. Valid event functions: GetPosition, GetRange. @event{EVT_RICHTEXT_STYLESHEET_CHANGED(id, func)} - Process a @c wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGING event, generated + Process a @c wxEVT_RICHTEXT_STYLESHEET_CHANGING event, generated when the control's stylesheet has changed, for example the user added, edited or deleted a style. Valid event functions: GetRange, GetPosition. @event{EVT_RICHTEXT_STYLESHEET_REPLACING(id, func)} - Process a @c wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACING event, generated + Process a @c wxEVT_RICHTEXT_STYLESHEET_REPLACING event, generated when the control's stylesheet is about to be replaced, for example when a file is loaded into the control. Valid event functions: Veto, GetOldStyleSheet, GetNewStyleSheet. @event{EVT_RICHTEXT_STYLESHEET_REPLACED(id, func)} - Process a @c wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACED event, generated + Process a @c wxEVT_RICHTEXT_STYLESHEET_REPLACED event, generated when the control's stylesheet has been replaced, for example when a file is loaded into the control. Valid event functions: GetOldStyleSheet, GetNewStyleSheet. @event{EVT_RICHTEXT_PROPERTIES_CHANGED(id, func)} - Process a @c wxEVT_COMMAND_RICHTEXT_PROPERTIES_CHANGED event, generated when + Process a @c wxEVT_RICHTEXT_PROPERTIES_CHANGED event, generated when properties have been applied to the control. Valid event functions: GetPosition, GetRange. @event{EVT_RICHTEXT_CONTENT_INSERTED(id, func)} - Process a @c wxEVT_COMMAND_RICHTEXT_CONTENT_INSERTED event, generated when + Process a @c wxEVT_RICHTEXT_CONTENT_INSERTED event, generated when content has been inserted into the control. Valid event functions: GetPosition, GetRange. @event{EVT_RICHTEXT_CONTENT_DELETED(id, func)} - Process a @c wxEVT_COMMAND_RICHTEXT_CONTENT_DELETED event, generated when + Process a @c wxEVT_RICHTEXT_CONTENT_DELETED event, generated when content has been deleted from the control. Valid event functions: GetPosition, GetRange. @event{EVT_RICHTEXT_BUFFER_RESET(id, func)} - Process a @c wxEVT_COMMAND_RICHTEXT_BUFFER_RESET event, generated when the + Process a @c wxEVT_RICHTEXT_BUFFER_RESET event, generated when the buffer has been reset by deleting all content. You can use this to set a default style for the first new paragraph. @event{EVT_RICHTEXT_SELECTION_CHANGED(id, func)} - Process a @c wxEVT_COMMAND_RICHTEXT_SELECTION_CHANGED event, generated when the + Process a @c wxEVT_RICHTEXT_SELECTION_CHANGED event, generated when the selection range has changed. @event{EVT_RICHTEXT_FOCUS_OBJECT_CHANGED(id, func)} - Process a @c wxEVT_COMMAND_RICHTEXT_FOCUS_OBJECT_CHANGED event, generated when the + Process a @c wxEVT_RICHTEXT_FOCUS_OBJECT_CHANGED event, generated when the current focus object has changed. @endEventTable @@ -2475,8 +2472,8 @@ public: /** Returns the old style sheet. - Can be used in a @c wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGING or - @c wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGED event handler. + Can be used in a @c wxEVT_RICHTEXT_STYLESHEET_CHANGING or + @c wxEVT_RICHTEXT_STYLESHEET_CHANGED event handler. */ wxRichTextStyleSheet* GetOldStyleSheet() const { return m_oldStyleSheet; } @@ -2488,8 +2485,8 @@ public: /** Returns the new style sheet. - Can be used in a @c wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGING or - @c wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGED event handler. + Can be used in a @c wxEVT_RICHTEXT_STYLESHEET_CHANGING or + @c wxEVT_RICHTEXT_STYLESHEET_CHANGED event handler. */ wxRichTextStyleSheet* GetNewStyleSheet() const { return m_newStyleSheet; } @@ -2509,7 +2506,7 @@ public: void SetRange(const wxRichTextRange& range) { m_range = range; } /** - Returns the character pressed, within a @c wxEVT_COMMAND_RICHTEXT_CHARACTER event. + Returns the character pressed, within a @c wxEVT_RICHTEXT_CHARACTER event. */ wxChar GetCharacter() const { return m_char; } @@ -2557,52 +2554,72 @@ private: /*! * wxRichTextCtrl events */ -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_RICHTEXT, wxEVT_COMMAND_RICHTEXT_LEFT_CLICK, wxRichTextEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_RICHTEXT, wxEVT_COMMAND_RICHTEXT_RIGHT_CLICK, wxRichTextEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_RICHTEXT, wxEVT_COMMAND_RICHTEXT_MIDDLE_CLICK, wxRichTextEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_RICHTEXT, wxEVT_COMMAND_RICHTEXT_LEFT_DCLICK, wxRichTextEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_RICHTEXT, wxEVT_COMMAND_RICHTEXT_RETURN, wxRichTextEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_RICHTEXT, wxEVT_COMMAND_RICHTEXT_CHARACTER, wxRichTextEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_RICHTEXT, wxEVT_COMMAND_RICHTEXT_DELETE, wxRichTextEvent ); - -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_RICHTEXT, wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGING, wxRichTextEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_RICHTEXT, wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGED, wxRichTextEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_RICHTEXT, wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACING, wxRichTextEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_RICHTEXT, wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACED, wxRichTextEvent ); - -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_RICHTEXT, wxEVT_COMMAND_RICHTEXT_CONTENT_INSERTED, wxRichTextEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_RICHTEXT, wxEVT_COMMAND_RICHTEXT_CONTENT_DELETED, wxRichTextEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_RICHTEXT, wxEVT_COMMAND_RICHTEXT_STYLE_CHANGED, wxRichTextEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_RICHTEXT, wxEVT_COMMAND_RICHTEXT_PROPERTIES_CHANGED, wxRichTextEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_RICHTEXT, wxEVT_COMMAND_RICHTEXT_SELECTION_CHANGED, wxRichTextEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_RICHTEXT, wxEVT_COMMAND_RICHTEXT_BUFFER_RESET, wxRichTextEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_RICHTEXT, wxEVT_COMMAND_RICHTEXT_FOCUS_OBJECT_CHANGED, wxRichTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_RICHTEXT, wxEVT_RICHTEXT_LEFT_CLICK, wxRichTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_RICHTEXT, wxEVT_RICHTEXT_RIGHT_CLICK, wxRichTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_RICHTEXT, wxEVT_RICHTEXT_MIDDLE_CLICK, wxRichTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_RICHTEXT, wxEVT_RICHTEXT_LEFT_DCLICK, wxRichTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_RICHTEXT, wxEVT_RICHTEXT_RETURN, wxRichTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_RICHTEXT, wxEVT_RICHTEXT_CHARACTER, wxRichTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_RICHTEXT, wxEVT_RICHTEXT_DELETE, wxRichTextEvent ); + +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_RICHTEXT, wxEVT_RICHTEXT_STYLESHEET_CHANGING, wxRichTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_RICHTEXT, wxEVT_RICHTEXT_STYLESHEET_CHANGED, wxRichTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_RICHTEXT, wxEVT_RICHTEXT_STYLESHEET_REPLACING, wxRichTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_RICHTEXT, wxEVT_RICHTEXT_STYLESHEET_REPLACED, wxRichTextEvent ); + +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_RICHTEXT, wxEVT_RICHTEXT_CONTENT_INSERTED, wxRichTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_RICHTEXT, wxEVT_RICHTEXT_CONTENT_DELETED, wxRichTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_RICHTEXT, wxEVT_RICHTEXT_STYLE_CHANGED, wxRichTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_RICHTEXT, wxEVT_RICHTEXT_PROPERTIES_CHANGED, wxRichTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_RICHTEXT, wxEVT_RICHTEXT_SELECTION_CHANGED, wxRichTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_RICHTEXT, wxEVT_RICHTEXT_BUFFER_RESET, wxRichTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_RICHTEXT, wxEVT_RICHTEXT_FOCUS_OBJECT_CHANGED, wxRichTextEvent ); typedef void (wxEvtHandler::*wxRichTextEventFunction)(wxRichTextEvent&); #define wxRichTextEventHandler(func) \ wxEVENT_HANDLER_CAST(wxRichTextEventFunction, func) -#define EVT_RICHTEXT_LEFT_CLICK(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RICHTEXT_LEFT_CLICK, id, -1, wxRichTextEventHandler( fn ), NULL ), -#define EVT_RICHTEXT_RIGHT_CLICK(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RICHTEXT_RIGHT_CLICK, id, -1, wxRichTextEventHandler( fn ), NULL ), -#define EVT_RICHTEXT_MIDDLE_CLICK(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RICHTEXT_MIDDLE_CLICK, id, -1, wxRichTextEventHandler( fn ), NULL ), -#define EVT_RICHTEXT_LEFT_DCLICK(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RICHTEXT_LEFT_DCLICK, id, -1, wxRichTextEventHandler( fn ), NULL ), -#define EVT_RICHTEXT_RETURN(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RICHTEXT_RETURN, id, -1, wxRichTextEventHandler( fn ), NULL ), -#define EVT_RICHTEXT_CHARACTER(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RICHTEXT_CHARACTER, id, -1, wxRichTextEventHandler( fn ), NULL ), -#define EVT_RICHTEXT_DELETE(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RICHTEXT_DELETE, id, -1, wxRichTextEventHandler( fn ), NULL ), - -#define EVT_RICHTEXT_STYLESHEET_CHANGING(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGING, id, -1, wxRichTextEventHandler( fn ), NULL ), -#define EVT_RICHTEXT_STYLESHEET_CHANGED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGED, id, -1, wxRichTextEventHandler( fn ), NULL ), -#define EVT_RICHTEXT_STYLESHEET_REPLACING(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACING, id, -1, wxRichTextEventHandler( fn ), NULL ), -#define EVT_RICHTEXT_STYLESHEET_REPLACED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACED, id, -1, wxRichTextEventHandler( fn ), NULL ), - -#define EVT_RICHTEXT_CONTENT_INSERTED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RICHTEXT_CONTENT_INSERTED, id, -1, wxRichTextEventHandler( fn ), NULL ), -#define EVT_RICHTEXT_CONTENT_DELETED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RICHTEXT_CONTENT_DELETED, id, -1, wxRichTextEventHandler( fn ), NULL ), -#define EVT_RICHTEXT_STYLE_CHANGED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RICHTEXT_STYLE_CHANGED, id, -1, wxRichTextEventHandler( fn ), NULL ), -#define EVT_RICHTEXT_PROPERTIES_CHANGED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RICHTEXT_PROPERTIES_CHANGED, id, -1, wxRichTextEventHandler( fn ), NULL ), -#define EVT_RICHTEXT_SELECTION_CHANGED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RICHTEXT_SELECTION_CHANGED, id, -1, wxRichTextEventHandler( fn ), NULL ), -#define EVT_RICHTEXT_BUFFER_RESET(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RICHTEXT_BUFFER_RESET, id, -1, wxRichTextEventHandler( fn ), NULL ), -#define EVT_RICHTEXT_FOCUS_OBJECT_CHANGED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RICHTEXT_FOCUS_OBJECT_CHANGED, id, -1, wxRichTextEventHandler( fn ), NULL ), +#define EVT_RICHTEXT_LEFT_CLICK(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_RICHTEXT_LEFT_CLICK, id, -1, wxRichTextEventHandler( fn ), NULL ), +#define EVT_RICHTEXT_RIGHT_CLICK(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_RICHTEXT_RIGHT_CLICK, id, -1, wxRichTextEventHandler( fn ), NULL ), +#define EVT_RICHTEXT_MIDDLE_CLICK(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_RICHTEXT_MIDDLE_CLICK, id, -1, wxRichTextEventHandler( fn ), NULL ), +#define EVT_RICHTEXT_LEFT_DCLICK(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_RICHTEXT_LEFT_DCLICK, id, -1, wxRichTextEventHandler( fn ), NULL ), +#define EVT_RICHTEXT_RETURN(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_RICHTEXT_RETURN, id, -1, wxRichTextEventHandler( fn ), NULL ), +#define EVT_RICHTEXT_CHARACTER(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_RICHTEXT_CHARACTER, id, -1, wxRichTextEventHandler( fn ), NULL ), +#define EVT_RICHTEXT_DELETE(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_RICHTEXT_DELETE, id, -1, wxRichTextEventHandler( fn ), NULL ), + +#define EVT_RICHTEXT_STYLESHEET_CHANGING(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_RICHTEXT_STYLESHEET_CHANGING, id, -1, wxRichTextEventHandler( fn ), NULL ), +#define EVT_RICHTEXT_STYLESHEET_CHANGED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_RICHTEXT_STYLESHEET_CHANGED, id, -1, wxRichTextEventHandler( fn ), NULL ), +#define EVT_RICHTEXT_STYLESHEET_REPLACING(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_RICHTEXT_STYLESHEET_REPLACING, id, -1, wxRichTextEventHandler( fn ), NULL ), +#define EVT_RICHTEXT_STYLESHEET_REPLACED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_RICHTEXT_STYLESHEET_REPLACED, id, -1, wxRichTextEventHandler( fn ), NULL ), + +#define EVT_RICHTEXT_CONTENT_INSERTED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_RICHTEXT_CONTENT_INSERTED, id, -1, wxRichTextEventHandler( fn ), NULL ), +#define EVT_RICHTEXT_CONTENT_DELETED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_RICHTEXT_CONTENT_DELETED, id, -1, wxRichTextEventHandler( fn ), NULL ), +#define EVT_RICHTEXT_STYLE_CHANGED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_RICHTEXT_STYLE_CHANGED, id, -1, wxRichTextEventHandler( fn ), NULL ), +#define EVT_RICHTEXT_PROPERTIES_CHANGED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_RICHTEXT_PROPERTIES_CHANGED, id, -1, wxRichTextEventHandler( fn ), NULL ), +#define EVT_RICHTEXT_SELECTION_CHANGED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_RICHTEXT_SELECTION_CHANGED, id, -1, wxRichTextEventHandler( fn ), NULL ), +#define EVT_RICHTEXT_BUFFER_RESET(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_RICHTEXT_BUFFER_RESET, id, -1, wxRichTextEventHandler( fn ), NULL ), +#define EVT_RICHTEXT_FOCUS_OBJECT_CHANGED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_RICHTEXT_FOCUS_OBJECT_CHANGED, id, -1, wxRichTextEventHandler( fn ), NULL ), + +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_RICHTEXT_LEFT_CLICK wxEVT_RICHTEXT_LEFT_CLICK +#define wxEVT_COMMAND_RICHTEXT_RIGHT_CLICK wxEVT_RICHTEXT_RIGHT_CLICK +#define wxEVT_COMMAND_RICHTEXT_MIDDLE_CLICK wxEVT_RICHTEXT_MIDDLE_CLICK +#define wxEVT_COMMAND_RICHTEXT_LEFT_DCLICK wxEVT_RICHTEXT_LEFT_DCLICK +#define wxEVT_COMMAND_RICHTEXT_RETURN wxEVT_RICHTEXT_RETURN +#define wxEVT_COMMAND_RICHTEXT_CHARACTER wxEVT_RICHTEXT_CHARACTER +#define wxEVT_COMMAND_RICHTEXT_DELETE wxEVT_RICHTEXT_DELETE +#define wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGING wxEVT_RICHTEXT_STYLESHEET_CHANGING +#define wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGED wxEVT_RICHTEXT_STYLESHEET_CHANGED +#define wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACING wxEVT_RICHTEXT_STYLESHEET_REPLACING +#define wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACED wxEVT_RICHTEXT_STYLESHEET_REPLACED +#define wxEVT_COMMAND_RICHTEXT_CONTENT_INSERTED wxEVT_RICHTEXT_CONTENT_INSERTED +#define wxEVT_COMMAND_RICHTEXT_CONTENT_DELETED wxEVT_RICHTEXT_CONTENT_DELETED +#define wxEVT_COMMAND_RICHTEXT_STYLE_CHANGED wxEVT_RICHTEXT_STYLE_CHANGED +#define wxEVT_COMMAND_RICHTEXT_PROPERTIES_CHANGED wxEVT_RICHTEXT_PROPERTIES_CHANGED +#define wxEVT_COMMAND_RICHTEXT_SELECTION_CHANGED wxEVT_RICHTEXT_SELECTION_CHANGED +#define wxEVT_COMMAND_RICHTEXT_BUFFER_RESET wxEVT_RICHTEXT_BUFFER_RESET +#define wxEVT_COMMAND_RICHTEXT_FOCUS_OBJECT_CHANGED wxEVT_RICHTEXT_FOCUS_OBJECT_CHANGED #endif // wxUSE_RICHTEXT diff --git a/include/wx/richtext/richtextfontpage.h b/include/wx/richtext/richtextfontpage.h index 087f0ad9f6..0b1bb45aae 100644 --- a/include/wx/richtext/richtextfontpage.h +++ b/include/wx/richtext/richtextfontpage.h @@ -88,10 +88,10 @@ public: /// wxEVT_IDLE event handler for ID_RICHTEXTFONTPAGE void OnIdle( wxIdleEvent& event ); - /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTFONTPAGE_FACETEXTCTRL + /// wxEVT_TEXT event handler for ID_RICHTEXTFONTPAGE_FACETEXTCTRL void OnFaceTextCtrlUpdated( wxCommandEvent& event ); - /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTFONTPAGE_SIZETEXTCTRL + /// wxEVT_TEXT event handler for ID_RICHTEXTFONTPAGE_SIZETEXTCTRL void OnSizeTextCtrlUpdated( wxCommandEvent& event ); /// wxEVT_SCROLL_LINEUP event handler for ID_RICHTEXTFONTPAGE_SPINBUTTONS @@ -100,31 +100,31 @@ public: /// wxEVT_SCROLL_LINEDOWN event handler for ID_RICHTEXTFONTPAGE_SPINBUTTONS void OnRichtextfontpageSpinbuttonsDown( wxSpinEvent& event ); - /// wxEVT_COMMAND_CHOICE_SELECTED event handler for ID_RICHTEXTFONTPAGE_SIZE_UNITS + /// wxEVT_CHOICE event handler for ID_RICHTEXTFONTPAGE_SIZE_UNITS void OnRichtextfontpageSizeUnitsSelected( wxCommandEvent& event ); - /// wxEVT_COMMAND_LISTBOX_SELECTED event handler for ID_RICHTEXTFONTPAGE_SIZELISTBOX + /// wxEVT_LISTBOX event handler for ID_RICHTEXTFONTPAGE_SIZELISTBOX void OnSizeListBoxSelected( wxCommandEvent& event ); - /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTFONTPAGE_STYLECTRL + /// wxEVT_COMBOBOX event handler for ID_RICHTEXTFONTPAGE_STYLECTRL void OnStyleCtrlSelected( wxCommandEvent& event ); - /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTFONTPAGE_WEIGHTCTRL + /// wxEVT_COMBOBOX event handler for ID_RICHTEXTFONTPAGE_WEIGHTCTRL void OnWeightCtrlSelected( wxCommandEvent& event ); - /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTFONTPAGE_UNDERLINING_CTRL + /// wxEVT_COMBOBOX event handler for ID_RICHTEXTFONTPAGE_UNDERLINING_CTRL void OnUnderliningCtrlSelected( wxCommandEvent& event ); - /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXTFONTPAGE_STRIKETHROUGHCTRL + /// wxEVT_CHECKBOX event handler for ID_RICHTEXTFONTPAGE_STRIKETHROUGHCTRL void OnStrikethroughctrlClick( wxCommandEvent& event ); - /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXTFONTPAGE_CAPSCTRL + /// wxEVT_CHECKBOX event handler for ID_RICHTEXTFONTPAGE_CAPSCTRL void OnCapsctrlClick( wxCommandEvent& event ); - /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXTFONTPAGE_SUPERSCRIPT + /// wxEVT_CHECKBOX event handler for ID_RICHTEXTFONTPAGE_SUPERSCRIPT void OnRichtextfontpageSuperscriptClick( wxCommandEvent& event ); - /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXTFONTPAGE_SUBSCRIPT + /// wxEVT_CHECKBOX event handler for ID_RICHTEXTFONTPAGE_SUBSCRIPT void OnRichtextfontpageSubscriptClick( wxCommandEvent& event ); ////@end wxRichTextFontPage event handler declarations diff --git a/include/wx/richtext/richtextindentspage.h b/include/wx/richtext/richtextindentspage.h index eaebc469a4..cbd0ca8ee2 100644 --- a/include/wx/richtext/richtextindentspage.h +++ b/include/wx/richtext/richtextindentspage.h @@ -78,40 +78,40 @@ public: ////@begin wxRichTextIndentsSpacingPage event handler declarations - /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_LEFT + /// wxEVT_RADIOBUTTON event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_LEFT void OnAlignmentLeftSelected( wxCommandEvent& event ); - /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_RIGHT + /// wxEVT_RADIOBUTTON event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_RIGHT void OnAlignmentRightSelected( wxCommandEvent& event ); - /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_JUSTIFIED + /// wxEVT_RADIOBUTTON event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_JUSTIFIED void OnAlignmentJustifiedSelected( wxCommandEvent& event ); - /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_CENTRED + /// wxEVT_RADIOBUTTON event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_CENTRED void OnAlignmentCentredSelected( wxCommandEvent& event ); - /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_INDETERMINATE + /// wxEVT_RADIOBUTTON event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_INDETERMINATE void OnAlignmentIndeterminateSelected( wxCommandEvent& event ); - /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_LEFT + /// wxEVT_TEXT event handler for ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_LEFT void OnIndentLeftUpdated( wxCommandEvent& event ); - /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_LEFT_FIRST + /// wxEVT_TEXT event handler for ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_LEFT_FIRST void OnIndentLeftFirstUpdated( wxCommandEvent& event ); - /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_RIGHT + /// wxEVT_TEXT event handler for ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_RIGHT void OnIndentRightUpdated( wxCommandEvent& event ); - /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_OUTLINELEVEL + /// wxEVT_COMBOBOX event handler for ID_RICHTEXTINDENTSSPACINGPAGE_OUTLINELEVEL void OnRichtextOutlinelevelSelected( wxCommandEvent& event ); - /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_BEFORE + /// wxEVT_TEXT event handler for ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_BEFORE void OnSpacingBeforeUpdated( wxCommandEvent& event ); - /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_AFTER + /// wxEVT_TEXT event handler for ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_AFTER void OnSpacingAfterUpdated( wxCommandEvent& event ); - /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_LINE + /// wxEVT_COMBOBOX event handler for ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_LINE void OnSpacingLineSelected( wxCommandEvent& event ); ////@end wxRichTextIndentsSpacingPage event handler declarations diff --git a/include/wx/richtext/richtextliststylepage.h b/include/wx/richtext/richtextliststylepage.h index 4eedafa1cb..43502116ff 100644 --- a/include/wx/richtext/richtextliststylepage.h +++ b/include/wx/richtext/richtextliststylepage.h @@ -87,7 +87,7 @@ public: ////@begin wxRichTextListStylePage event handler declarations - /// wxEVT_COMMAND_SPINCTRL_UPDATED event handler for ID_RICHTEXTLISTSTYLEPAGE_LEVEL + /// wxEVT_SPINCTRL event handler for ID_RICHTEXTLISTSTYLEPAGE_LEVEL void OnLevelUpdated( wxSpinEvent& event ); /// wxEVT_SCROLL_LINEUP event handler for ID_RICHTEXTLISTSTYLEPAGE_LEVEL @@ -96,61 +96,61 @@ public: /// wxEVT_SCROLL_LINEDOWN event handler for ID_RICHTEXTLISTSTYLEPAGE_LEVEL void OnLevelDown( wxSpinEvent& event ); - /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTLISTSTYLEPAGE_LEVEL + /// wxEVT_TEXT event handler for ID_RICHTEXTLISTSTYLEPAGE_LEVEL void OnLevelTextUpdated( wxCommandEvent& event ); /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_LEVEL void OnLevelUIUpdate( wxUpdateUIEvent& event ); - /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXTLISTSTYLEPAGE_CHOOSE_FONT + /// wxEVT_BUTTON event handler for ID_RICHTEXTLISTSTYLEPAGE_CHOOSE_FONT void OnChooseFontClick( wxCommandEvent& event ); - /// wxEVT_COMMAND_LISTBOX_SELECTED event handler for ID_RICHTEXTLISTSTYLEPAGE_STYLELISTBOX + /// wxEVT_LISTBOX event handler for ID_RICHTEXTLISTSTYLEPAGE_STYLELISTBOX void OnStylelistboxSelected( wxCommandEvent& event ); - /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXTLISTSTYLEPAGE_PERIODCTRL + /// wxEVT_CHECKBOX event handler for ID_RICHTEXTLISTSTYLEPAGE_PERIODCTRL void OnPeriodctrlClick( wxCommandEvent& event ); /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_PERIODCTRL void OnPeriodctrlUpdate( wxUpdateUIEvent& event ); - /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXTLISTSTYLEPAGE_PARENTHESESCTRL + /// wxEVT_CHECKBOX event handler for ID_RICHTEXTLISTSTYLEPAGE_PARENTHESESCTRL void OnParenthesesctrlClick( wxCommandEvent& event ); /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_PARENTHESESCTRL void OnParenthesesctrlUpdate( wxUpdateUIEvent& event ); - /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXTLISTSTYLEPAGE_RIGHTPARENTHESISCTRL + /// wxEVT_CHECKBOX event handler for ID_RICHTEXTLISTSTYLEPAGE_RIGHTPARENTHESISCTRL void OnRightParenthesisCtrlClick( wxCommandEvent& event ); /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_RIGHTPARENTHESISCTRL void OnRightParenthesisCtrlUpdate( wxUpdateUIEvent& event ); - /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTLISTSTYLEPAGE_BULLETALIGNMENTCTRL + /// wxEVT_COMBOBOX event handler for ID_RICHTEXTLISTSTYLEPAGE_BULLETALIGNMENTCTRL void OnBulletAlignmentCtrlSelected( wxCommandEvent& event ); /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_SYMBOLSTATIC void OnSymbolstaticUpdate( wxUpdateUIEvent& event ); - /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTLISTSTYLEPAGE_SYMBOLCTRL + /// wxEVT_COMBOBOX event handler for ID_RICHTEXTLISTSTYLEPAGE_SYMBOLCTRL void OnSymbolctrlSelected( wxCommandEvent& event ); - /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTLISTSTYLEPAGE_SYMBOLCTRL + /// wxEVT_TEXT event handler for ID_RICHTEXTLISTSTYLEPAGE_SYMBOLCTRL void OnSymbolctrlUpdated( wxCommandEvent& event ); /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_SYMBOLCTRL void OnSymbolctrlUIUpdate( wxUpdateUIEvent& event ); - /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXTLISTSTYLEPAGE_CHOOSE_SYMBOL + /// wxEVT_BUTTON event handler for ID_RICHTEXTLISTSTYLEPAGE_CHOOSE_SYMBOL void OnChooseSymbolClick( wxCommandEvent& event ); /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_CHOOSE_SYMBOL void OnChooseSymbolUpdate( wxUpdateUIEvent& event ); - /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTLISTSTYLEPAGE_SYMBOLFONTCTRL + /// wxEVT_COMBOBOX event handler for ID_RICHTEXTLISTSTYLEPAGE_SYMBOLFONTCTRL void OnSymbolfontctrlSelected( wxCommandEvent& event ); - /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTLISTSTYLEPAGE_SYMBOLFONTCTRL + /// wxEVT_TEXT event handler for ID_RICHTEXTLISTSTYLEPAGE_SYMBOLFONTCTRL void OnSymbolfontctrlUpdated( wxCommandEvent& event ); /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_SYMBOLFONTCTRL @@ -159,46 +159,46 @@ public: /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_NAMESTATIC void OnNamestaticUpdate( wxUpdateUIEvent& event ); - /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTLISTSTYLEPAGE_NAMECTRL + /// wxEVT_COMBOBOX event handler for ID_RICHTEXTLISTSTYLEPAGE_NAMECTRL void OnNamectrlSelected( wxCommandEvent& event ); - /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTLISTSTYLEPAGE_NAMECTRL + /// wxEVT_TEXT event handler for ID_RICHTEXTLISTSTYLEPAGE_NAMECTRL void OnNamectrlUpdated( wxCommandEvent& event ); /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_NAMECTRL void OnNamectrlUIUpdate( wxUpdateUIEvent& event ); - /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTLISTSTYLEPAGE_ALIGNLEFT + /// wxEVT_RADIOBUTTON event handler for ID_RICHTEXTLISTSTYLEPAGE_ALIGNLEFT void OnRichtextliststylepageAlignleftSelected( wxCommandEvent& event ); - /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTLISTSTYLEPAGE_ALIGNRIGHT + /// wxEVT_RADIOBUTTON event handler for ID_RICHTEXTLISTSTYLEPAGE_ALIGNRIGHT void OnRichtextliststylepageAlignrightSelected( wxCommandEvent& event ); - /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTLISTSTYLEPAGE_JUSTIFIED + /// wxEVT_RADIOBUTTON event handler for ID_RICHTEXTLISTSTYLEPAGE_JUSTIFIED void OnRichtextliststylepageJustifiedSelected( wxCommandEvent& event ); - /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTLISTSTYLEPAGE_CENTERED + /// wxEVT_RADIOBUTTON event handler for ID_RICHTEXTLISTSTYLEPAGE_CENTERED void OnRichtextliststylepageCenteredSelected( wxCommandEvent& event ); - /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTLISTSTYLEPAGE_ALIGNINDETERMINATE + /// wxEVT_RADIOBUTTON event handler for ID_RICHTEXTLISTSTYLEPAGE_ALIGNINDETERMINATE void OnRichtextliststylepageAlignindeterminateSelected( wxCommandEvent& event ); - /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTLISTSTYLEPAGE_INDENTLEFT + /// wxEVT_TEXT event handler for ID_RICHTEXTLISTSTYLEPAGE_INDENTLEFT void OnIndentLeftUpdated( wxCommandEvent& event ); - /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTLISTSTYLEPAGE_INDENTFIRSTLINE + /// wxEVT_TEXT event handler for ID_RICHTEXTLISTSTYLEPAGE_INDENTFIRSTLINE void OnIndentFirstLineUpdated( wxCommandEvent& event ); - /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTLISTSTYLEPAGE_INDENTRIGHT + /// wxEVT_TEXT event handler for ID_RICHTEXTLISTSTYLEPAGE_INDENTRIGHT void OnIndentRightUpdated( wxCommandEvent& event ); - /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTLISTSTYLEPAGE_SPACINGBEFORE + /// wxEVT_TEXT event handler for ID_RICHTEXTLISTSTYLEPAGE_SPACINGBEFORE void OnSpacingBeforeUpdated( wxCommandEvent& event ); - /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTLISTSTYLEPAGE_SPACINGAFTER + /// wxEVT_TEXT event handler for ID_RICHTEXTLISTSTYLEPAGE_SPACINGAFTER void OnSpacingAfterUpdated( wxCommandEvent& event ); - /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTLISTSTYLEPAGE_LINESPACING + /// wxEVT_COMBOBOX event handler for ID_RICHTEXTLISTSTYLEPAGE_LINESPACING void OnLineSpacingSelected( wxCommandEvent& event ); ////@end wxRichTextListStylePage event handler declarations diff --git a/include/wx/richtext/richtextsizepage.h b/include/wx/richtext/richtextsizepage.h index dfba99fd6a..8f3ca6a1b0 100644 --- a/include/wx/richtext/richtextsizepage.h +++ b/include/wx/richtext/richtextsizepage.h @@ -157,10 +157,10 @@ public: /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_BOTTOM_UNITS void OnRichtextBottomUnitsUpdate( wxUpdateUIEvent& event ); - /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXT_PARA_UP + /// wxEVT_BUTTON event handler for ID_RICHTEXT_PARA_UP void OnRichtextParaUpClick( wxCommandEvent& event ); - /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXT_PARA_DOWN + /// wxEVT_BUTTON event handler for ID_RICHTEXT_PARA_DOWN void OnRichtextParaDownClick( wxCommandEvent& event ); ////@end wxRichTextSizePage event handler declarations diff --git a/include/wx/richtext/richtextstyledlg.h b/include/wx/richtext/richtextstyledlg.h index 9ca4c994e1..45256ba6d8 100644 --- a/include/wx/richtext/richtextstyledlg.h +++ b/include/wx/richtext/richtextstyledlg.h @@ -143,55 +143,55 @@ public: ////@begin wxRichTextStyleOrganiserDialog event handler declarations - /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXTSTYLEORGANISERDIALOG_NEW_CHAR + /// wxEVT_BUTTON event handler for ID_RICHTEXTSTYLEORGANISERDIALOG_NEW_CHAR void OnNewCharClick( wxCommandEvent& event ); /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTSTYLEORGANISERDIALOG_NEW_CHAR void OnNewCharUpdate( wxUpdateUIEvent& event ); - /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXTSTYLEORGANISERDIALOG_NEW_PARA + /// wxEVT_BUTTON event handler for ID_RICHTEXTSTYLEORGANISERDIALOG_NEW_PARA void OnNewParaClick( wxCommandEvent& event ); /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTSTYLEORGANISERDIALOG_NEW_PARA void OnNewParaUpdate( wxUpdateUIEvent& event ); - /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXTSTYLEORGANISERDIALOG_NEW_LIST + /// wxEVT_BUTTON event handler for ID_RICHTEXTSTYLEORGANISERDIALOG_NEW_LIST void OnNewListClick( wxCommandEvent& event ); /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTSTYLEORGANISERDIALOG_NEW_LIST void OnNewListUpdate( wxUpdateUIEvent& event ); - /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXTSTYLEORGANISERDIALOG_NEW_BOX + /// wxEVT_BUTTON event handler for ID_RICHTEXTSTYLEORGANISERDIALOG_NEW_BOX void OnNewBoxClick( wxCommandEvent& event ); /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTSTYLEORGANISERDIALOG_NEW_BOX void OnNewBoxUpdate( wxUpdateUIEvent& event ); - /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXTSTYLEORGANISERDIALOG_APPLY + /// wxEVT_BUTTON event handler for ID_RICHTEXTSTYLEORGANISERDIALOG_APPLY void OnApplyClick( wxCommandEvent& event ); /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTSTYLEORGANISERDIALOG_APPLY void OnApplyUpdate( wxUpdateUIEvent& event ); - /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXTSTYLEORGANISERDIALOG_RENAME + /// wxEVT_BUTTON event handler for ID_RICHTEXTSTYLEORGANISERDIALOG_RENAME void OnRenameClick( wxCommandEvent& event ); /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTSTYLEORGANISERDIALOG_RENAME void OnRenameUpdate( wxUpdateUIEvent& event ); - /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXTSTYLEORGANISERDIALOG_EDIT + /// wxEVT_BUTTON event handler for ID_RICHTEXTSTYLEORGANISERDIALOG_EDIT void OnEditClick( wxCommandEvent& event ); /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTSTYLEORGANISERDIALOG_EDIT void OnEditUpdate( wxUpdateUIEvent& event ); - /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXTSTYLEORGANISERDIALOG_DELETE + /// wxEVT_BUTTON event handler for ID_RICHTEXTSTYLEORGANISERDIALOG_DELETE void OnDeleteClick( wxCommandEvent& event ); /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTSTYLEORGANISERDIALOG_DELETE void OnDeleteUpdate( wxUpdateUIEvent& event ); - /// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_HELP + /// wxEVT_BUTTON event handler for wxID_HELP void OnHelpClick( wxCommandEvent& event ); ////@end wxRichTextStyleOrganiserDialog event handler declarations diff --git a/include/wx/richtext/richtextsymboldlg.h b/include/wx/richtext/richtextsymboldlg.h index 61526ad827..a5946bf7d2 100644 --- a/include/wx/richtext/richtextsymboldlg.h +++ b/include/wx/richtext/richtextsymboldlg.h @@ -108,11 +108,11 @@ public: ////@begin wxSymbolPickerDialog event handler declarations - /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_SYMBOLPICKERDIALOG_FONT + /// wxEVT_COMBOBOX event handler for ID_SYMBOLPICKERDIALOG_FONT void OnFontCtrlSelected( wxCommandEvent& event ); #if defined(__UNICODE__) - /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_SYMBOLPICKERDIALOG_SUBSET + /// wxEVT_COMBOBOX event handler for ID_SYMBOLPICKERDIALOG_SUBSET void OnSubsetSelected( wxCommandEvent& event ); /// wxEVT_UPDATE_UI event handler for ID_SYMBOLPICKERDIALOG_SUBSET @@ -120,14 +120,14 @@ public: #endif #if defined(__UNICODE__) - /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_SYMBOLPICKERDIALOG_FROM + /// wxEVT_COMBOBOX event handler for ID_SYMBOLPICKERDIALOG_FROM void OnFromUnicodeSelected( wxCommandEvent& event ); #endif /// wxEVT_UPDATE_UI event handler for wxID_OK void OnOkUpdate( wxUpdateUIEvent& event ); - /// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_HELP + /// wxEVT_BUTTON event handler for wxID_HELP void OnHelpClick( wxCommandEvent& event ); /// wxEVT_UPDATE_UI event handler for wxID_HELP @@ -309,7 +309,7 @@ protected: // common part of all ctors void Init(); - // send the wxEVT_COMMAND_LISTBOX_SELECTED event + // send the wxEVT_LISTBOX event void SendSelectedEvent(); // change the current item (in single selection listbox it also implicitly diff --git a/include/wx/richtext/richtexttabspage.h b/include/wx/richtext/richtexttabspage.h index 1495c664df..2384cdb89f 100644 --- a/include/wx/richtext/richtexttabspage.h +++ b/include/wx/richtext/richtexttabspage.h @@ -76,22 +76,22 @@ public: ////@begin wxRichTextTabsPage event handler declarations - /// wxEVT_COMMAND_LISTBOX_SELECTED event handler for ID_RICHTEXTTABSPAGE_TABLIST + /// wxEVT_LISTBOX event handler for ID_RICHTEXTTABSPAGE_TABLIST void OnTablistSelected( wxCommandEvent& event ); - /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXTTABSPAGE_NEW_TAB + /// wxEVT_BUTTON event handler for ID_RICHTEXTTABSPAGE_NEW_TAB void OnNewTabClick( wxCommandEvent& event ); /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTTABSPAGE_NEW_TAB void OnNewTabUpdate( wxUpdateUIEvent& event ); - /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXTTABSPAGE_DELETE_TAB + /// wxEVT_BUTTON event handler for ID_RICHTEXTTABSPAGE_DELETE_TAB void OnDeleteTabClick( wxCommandEvent& event ); /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTTABSPAGE_DELETE_TAB void OnDeleteTabUpdate( wxUpdateUIEvent& event ); - /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXTTABSPAGE_DELETE_ALL_TABS + /// wxEVT_BUTTON event handler for ID_RICHTEXTTABSPAGE_DELETE_ALL_TABS void OnDeleteAllTabsClick( wxCommandEvent& event ); /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTTABSPAGE_DELETE_ALL_TABS diff --git a/include/wx/simplebook.h b/include/wx/simplebook.h index e99f44d370..9b6474b0c4 100644 --- a/include/wx/simplebook.h +++ b/include/wx/simplebook.h @@ -145,13 +145,13 @@ protected: virtual wxBookCtrlEvent* CreatePageChangingEvent() const { - return new wxBookCtrlEvent(wxEVT_COMMAND_BOOKCTRL_PAGE_CHANGING, + return new wxBookCtrlEvent(wxEVT_BOOKCTRL_PAGE_CHANGING, GetId()); } virtual void MakeChangedEvent(wxBookCtrlEvent& event) { - event.SetEventType(wxEVT_COMMAND_BOOKCTRL_PAGE_CHANGED); + event.SetEventType(wxEVT_BOOKCTRL_PAGE_CHANGED); } virtual wxWindow *DoRemovePage(size_t page) diff --git a/include/wx/spinctrl.h b/include/wx/spinctrl.h index cf93212a66..d63d13ce62 100644 --- a/include/wx/spinctrl.h +++ b/include/wx/spinctrl.h @@ -21,8 +21,8 @@ // Events class WXDLLIMPEXP_FWD_CORE wxSpinDoubleEvent; -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_SPINCTRL_UPDATED, wxSpinEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_SPINCTRLDOUBLE_UPDATED, wxSpinDoubleEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SPINCTRL, wxSpinEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SPINCTRLDOUBLE, wxSpinDoubleEvent); // ---------------------------------------------------------------------------- // A spin ctrl is a text control with a spin button which is usually used to @@ -104,10 +104,10 @@ typedef void (wxEvtHandler::*wxSpinDoubleEventFunction)(wxSpinDoubleEvent&); // macros for handling spinctrl events #define EVT_SPINCTRL(id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_SPINCTRL_UPDATED, id, wxSpinEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_SPINCTRL, id, wxSpinEventHandler(fn)) #define EVT_SPINCTRLDOUBLE(id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_SPINCTRLDOUBLE_UPDATED, id, wxSpinDoubleEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_SPINCTRLDOUBLE, id, wxSpinDoubleEventHandler(fn)) // ---------------------------------------------------------------------------- // include the platform-dependent class implementation @@ -147,6 +147,10 @@ extern wxString wxSpinCtrlFormatAsHex(long val, long maxVal); } // namespace wxPrivate +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_SPINCTRL_UPDATED wxEVT_SPINCTRL +#define wxEVT_COMMAND_SPINCTRLDOUBLE_UPDATED wxEVT_SPINCTRLDOUBLE + #endif // wxUSE_SPINCTRL #endif // _WX_SPINCTRL_H_ diff --git a/include/wx/splitter.h b/include/wx/splitter.h index 3318247695..123f433b47 100644 --- a/include/wx/splitter.h +++ b/include/wx/splitter.h @@ -37,10 +37,10 @@ class WXDLLIMPEXP_FWD_CORE wxSplitterEvent; -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED, wxSplitterEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING, wxSplitterEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_SPLITTER_DOUBLECLICKED, wxSplitterEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_SPLITTER_UNSPLIT, wxSplitterEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_SPLITTER_SASH_POS_CHANGED, wxSplitterEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_SPLITTER_SASH_POS_CHANGING, wxSplitterEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_SPLITTER_DOUBLECLICKED, wxSplitterEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_SPLITTER_UNSPLIT, wxSplitterEvent ); #include "wx/generic/splitter.h" diff --git a/include/wx/srchctrl.h b/include/wx/srchctrl.h index 2cdccbd3b5..acb7b4796e 100644 --- a/include/wx/srchctrl.h +++ b/include/wx/srchctrl.h @@ -42,8 +42,8 @@ extern WXDLLIMPEXP_DATA_CORE(const char) wxSearchCtrlNameStr[]; -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_SEARCHCTRL_CANCEL_BTN, wxCommandEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_SEARCHCTRL_SEARCH_BTN, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SEARCHCTRL_CANCEL_BTN, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SEARCHCTRL_SEARCH_BTN, wxCommandEvent); // ---------------------------------------------------------------------------- // a search ctrl is a text control with a search button and a cancel button @@ -89,10 +89,14 @@ private: // ---------------------------------------------------------------------------- #define EVT_SEARCHCTRL_CANCEL_BTN(id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_SEARCHCTRL_CANCEL_BTN, id, wxCommandEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_SEARCHCTRL_CANCEL_BTN, id, wxCommandEventHandler(fn)) #define EVT_SEARCHCTRL_SEARCH_BTN(id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_SEARCHCTRL_SEARCH_BTN, id, wxCommandEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_SEARCHCTRL_SEARCH_BTN, id, wxCommandEventHandler(fn)) + +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_SEARCHCTRL_CANCEL_BTN wxEVT_SEARCHCTRL_CANCEL_BTN +#define wxEVT_COMMAND_SEARCHCTRL_SEARCH_BTN wxEVT_SEARCHCTRL_SEARCH_BTN #endif // wxUSE_SEARCHCTRL diff --git a/include/wx/textctrl.h b/include/wx/textctrl.h index d4780cc987..5004587399 100644 --- a/include/wx/textctrl.h +++ b/include/wx/textctrl.h @@ -802,17 +802,17 @@ protected: class WXDLLIMPEXP_FWD_CORE wxTextUrlEvent; -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_TEXT_UPDATED, wxCommandEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_TEXT_ENTER, wxCommandEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_TEXT_URL, wxTextUrlEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_TEXT_MAXLEN, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_TEXT, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_TEXT_ENTER, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_TEXT_URL, wxTextUrlEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_TEXT_MAXLEN, wxCommandEvent); class WXDLLIMPEXP_CORE wxTextUrlEvent : public wxCommandEvent { public: wxTextUrlEvent(int winid, const wxMouseEvent& evtMouse, long start, long end) - : wxCommandEvent(wxEVT_COMMAND_TEXT_URL, winid), + : wxCommandEvent(wxEVT_TEXT_URL, winid), m_evtMouse(evtMouse), m_start(start), m_end(end) { } wxTextUrlEvent(const wxTextUrlEvent& event) @@ -855,12 +855,12 @@ typedef void (wxEvtHandler::*wxTextUrlEventFunction)(wxTextUrlEvent&); wxEVENT_HANDLER_CAST(wxTextUrlEventFunction, func) #define wx__DECLARE_TEXTEVT(evt, id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_TEXT_ ## evt, id, wxTextEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_TEXT_ ## evt, id, wxTextEventHandler(fn)) #define wx__DECLARE_TEXTURLEVT(evt, id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_TEXT_ ## evt, id, wxTextUrlEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_TEXT_ ## evt, id, wxTextUrlEventHandler(fn)) -#define EVT_TEXT(id, fn) wx__DECLARE_TEXTEVT(UPDATED, id, fn) +#define EVT_TEXT(id, fn) wx__DECLARE_EVT1(wxEVT_TEXT, id, wxTextEventHandler(fn)) #define EVT_TEXT_ENTER(id, fn) wx__DECLARE_TEXTEVT(ENTER, id, fn) #define EVT_TEXT_URL(id, fn) wx__DECLARE_TEXTURLEVT(URL, id, fn) #define EVT_TEXT_MAXLEN(id, fn) wx__DECLARE_TEXTEVT(MAXLEN, id, fn) @@ -909,6 +909,12 @@ private: #endif // wxHAS_TEXT_WINDOW_STREAM +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_TEXT_UPDATED wxEVT_TEXT +#define wxEVT_COMMAND_TEXT_ENTER wxEVT_TEXT_ENTER +#define wxEVT_COMMAND_TEXT_URL wxEVT_TEXT_URL +#define wxEVT_COMMAND_TEXT_MAXLEN wxEVT_TEXT_MAXLEN + #endif // wxUSE_TEXTCTRL #endif diff --git a/include/wx/textentry.h b/include/wx/textentry.h index fc315b632f..84e40ad5e6 100644 --- a/include/wx/textentry.h +++ b/include/wx/textentry.h @@ -173,20 +173,20 @@ public: // implementation only // ------------------- - // generate the wxEVT_COMMAND_TEXT_UPDATED event for GetEditableWindow(), + // generate the wxEVT_TEXT event for GetEditableWindow(), // like SetValue() does and return true if the event was processed // // NB: this is public for wxRichTextCtrl use only right now, do not call it static bool SendTextUpdatedEvent(wxWindow *win); - // generate the wxEVT_COMMAND_TEXT_UPDATED event for this window + // generate the wxEVT_TEXT event for this window bool SendTextUpdatedEvent() { return SendTextUpdatedEvent(GetEditableWindow()); } - // generate the wxEVT_COMMAND_TEXT_UPDATED event for this window if the + // generate the wxEVT_TEXT event for this window if the // events are not currently disabled void SendTextUpdatedEventIfAllowed() { diff --git a/include/wx/tglbtn.h b/include/wx/tglbtn.h index 14630c3bde..55cd6e1f7b 100644 --- a/include/wx/tglbtn.h +++ b/include/wx/tglbtn.h @@ -22,7 +22,7 @@ extern WXDLLIMPEXP_DATA_CORE(const char) wxCheckBoxNameStr[]; -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TOGGLEBUTTON, wxCommandEvent ); // ---------------------------------------------------------------------------- // wxToggleButtonBase @@ -72,7 +72,7 @@ protected: #define EVT_TOGGLEBUTTON(id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, id, wxCommandEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_TOGGLEBUTTON, id, wxCommandEventHandler(fn)) #if defined(__WXUNIVERSAL__) #include "wx/univ/tglbtn.h" @@ -93,6 +93,9 @@ protected: #include "wx/os2/tglbtn.h" #endif +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_TOGGLEBUTTON_CLICKED wxEVT_TOGGLEBUTTON + #endif // wxUSE_TOGGLEBTN #endif // _WX_TOGGLEBUTTON_H_BASE_ diff --git a/include/wx/toolbook.h b/include/wx/toolbook.h index 86d50d57b6..ab3e71abe1 100644 --- a/include/wx/toolbook.h +++ b/include/wx/toolbook.h @@ -22,8 +22,8 @@ class WXDLLIMPEXP_FWD_CORE wxToolBarBase; class WXDLLIMPEXP_FWD_CORE wxCommandEvent; -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TOOLBOOK_PAGE_CHANGED, wxBookCtrlEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TOOLBOOK_PAGE_CHANGING, wxBookCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TOOLBOOK_PAGE_CHANGED, wxBookCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TOOLBOOK_PAGE_CHANGING, wxBookCtrlEvent ); // Use wxButtonToolBar @@ -135,10 +135,14 @@ typedef wxBookCtrlEventFunction wxToolbookEventFunction; #define EVT_TOOLBOOK_PAGE_CHANGED(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_TOOLBOOK_PAGE_CHANGED, winid, wxBookCtrlEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_TOOLBOOK_PAGE_CHANGED, winid, wxBookCtrlEventHandler(fn)) #define EVT_TOOLBOOK_PAGE_CHANGING(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_TOOLBOOK_PAGE_CHANGING, winid, wxBookCtrlEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_TOOLBOOK_PAGE_CHANGING, winid, wxBookCtrlEventHandler(fn)) + +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_TOOLBOOK_PAGE_CHANGED wxEVT_TOOLBOOK_PAGE_CHANGED +#define wxEVT_COMMAND_TOOLBOOK_PAGE_CHANGING wxEVT_TOOLBOOK_PAGE_CHANGING #endif // wxUSE_TOOLBOOK diff --git a/include/wx/treebase.h b/include/wx/treebase.h index 4a6063c2f6..98808c1823 100644 --- a/include/wx/treebase.h +++ b/include/wx/treebase.h @@ -257,21 +257,21 @@ public: // accessors // get the item on which the operation was performed or the newly - // selected item for wxEVT_COMMAND_TREE_SEL_CHANGED/ING events + // selected item for wxEVT_TREE_SEL_CHANGED/ING events wxTreeItemId GetItem() const { return m_item; } void SetItem(const wxTreeItemId& item) { m_item = item; } - // for wxEVT_COMMAND_TREE_SEL_CHANGED/ING events, get the previously + // for wxEVT_TREE_SEL_CHANGED/ING events, get the previously // selected item wxTreeItemId GetOldItem() const { return m_itemOld; } void SetOldItem(const wxTreeItemId& item) { m_itemOld = item; } // the point where the mouse was when the drag operation started (for - // wxEVT_COMMAND_TREE_BEGIN_(R)DRAG events only) or click position + // wxEVT_TREE_BEGIN_(R)DRAG events only) or click position wxPoint GetPoint() const { return m_pointDrag; } void SetPoint(const wxPoint& pt) { m_pointDrag = pt; } - // keyboard data (for wxEVT_COMMAND_TREE_KEY_DOWN only) + // keyboard data (for wxEVT_TREE_KEY_DOWN only) const wxKeyEvent& GetKeyEvent() const { return m_evtKey; } int GetKeyCode() const { return m_evtKey.GetKeyCode(); } void SetKeyEvent(const wxKeyEvent& evt) { m_evtKey = evt; } @@ -309,33 +309,33 @@ typedef void (wxEvtHandler::*wxTreeEventFunction)(wxTreeEvent&); // tree control events and macros for handling them // ---------------------------------------------------------------------------- -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TREE_BEGIN_DRAG, wxTreeEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TREE_BEGIN_RDRAG, wxTreeEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, wxTreeEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TREE_END_LABEL_EDIT, wxTreeEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TREE_DELETE_ITEM, wxTreeEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TREE_GET_INFO, wxTreeEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TREE_SET_INFO, wxTreeEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TREE_ITEM_EXPANDED, wxTreeEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TREE_ITEM_EXPANDING, wxTreeEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TREE_ITEM_COLLAPSED, wxTreeEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TREE_ITEM_COLLAPSING, wxTreeEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TREE_SEL_CHANGED, wxTreeEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TREE_SEL_CHANGING, wxTreeEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TREE_KEY_DOWN, wxTreeEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TREE_ITEM_ACTIVATED, wxTreeEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK, wxTreeEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK, wxTreeEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TREE_END_DRAG, wxTreeEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK, wxTreeEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TREE_ITEM_GETTOOLTIP, wxTreeEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TREE_ITEM_MENU, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_BEGIN_DRAG, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_BEGIN_RDRAG, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_BEGIN_LABEL_EDIT, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_END_LABEL_EDIT, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_DELETE_ITEM, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_GET_INFO, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_SET_INFO, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_ITEM_EXPANDED, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_ITEM_EXPANDING, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_ITEM_COLLAPSED, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_ITEM_COLLAPSING, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_SEL_CHANGED, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_SEL_CHANGING, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_KEY_DOWN, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_ITEM_ACTIVATED, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_ITEM_RIGHT_CLICK, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_ITEM_MIDDLE_CLICK, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_END_DRAG, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_STATE_IMAGE_CLICK, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_ITEM_GETTOOLTIP, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_ITEM_MENU, wxTreeEvent ); #define wxTreeEventHandler(func) \ wxEVENT_HANDLER_CAST(wxTreeEventFunction, func) #define wx__DECLARE_TREEEVT(evt, id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_TREE_ ## evt, id, wxTreeEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_TREE_ ## evt, id, wxTreeEventHandler(fn)) // GetItem() returns the item being dragged, GetPoint() the mouse coords // @@ -396,6 +396,29 @@ wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TREE_ITEM_MENU, wxTree // GetItem() is the item for which the tooltip is being requested #define EVT_TREE_ITEM_GETTOOLTIP(id, fn) wx__DECLARE_TREEEVT(ITEM_GETTOOLTIP, id, fn) +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_TREE_BEGIN_DRAG wxEVT_TREE_BEGIN_DRAG +#define wxEVT_COMMAND_TREE_BEGIN_RDRAG wxEVT_TREE_BEGIN_RDRAG +#define wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT wxEVT_TREE_BEGIN_LABEL_EDIT +#define wxEVT_COMMAND_TREE_END_LABEL_EDIT wxEVT_TREE_END_LABEL_EDIT +#define wxEVT_COMMAND_TREE_DELETE_ITEM wxEVT_TREE_DELETE_ITEM +#define wxEVT_COMMAND_TREE_GET_INFO wxEVT_TREE_GET_INFO +#define wxEVT_COMMAND_TREE_SET_INFO wxEVT_TREE_SET_INFO +#define wxEVT_COMMAND_TREE_ITEM_EXPANDED wxEVT_TREE_ITEM_EXPANDED +#define wxEVT_COMMAND_TREE_ITEM_EXPANDING wxEVT_TREE_ITEM_EXPANDING +#define wxEVT_COMMAND_TREE_ITEM_COLLAPSED wxEVT_TREE_ITEM_COLLAPSED +#define wxEVT_COMMAND_TREE_ITEM_COLLAPSING wxEVT_TREE_ITEM_COLLAPSING +#define wxEVT_COMMAND_TREE_SEL_CHANGED wxEVT_TREE_SEL_CHANGED +#define wxEVT_COMMAND_TREE_SEL_CHANGING wxEVT_TREE_SEL_CHANGING +#define wxEVT_COMMAND_TREE_KEY_DOWN wxEVT_TREE_KEY_DOWN +#define wxEVT_COMMAND_TREE_ITEM_ACTIVATED wxEVT_TREE_ITEM_ACTIVATED +#define wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK wxEVT_TREE_ITEM_RIGHT_CLICK +#define wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK wxEVT_TREE_ITEM_MIDDLE_CLICK +#define wxEVT_COMMAND_TREE_END_DRAG wxEVT_TREE_END_DRAG +#define wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK wxEVT_TREE_STATE_IMAGE_CLICK +#define wxEVT_COMMAND_TREE_ITEM_GETTOOLTIP wxEVT_TREE_ITEM_GETTOOLTIP +#define wxEVT_COMMAND_TREE_ITEM_MENU wxEVT_TREE_ITEM_MENU + #endif // wxUSE_TREECTRL #endif // _WX_TREEBASE_H_ diff --git a/include/wx/treebook.h b/include/wx/treebook.h index 784a9f1dd3..a22a72a2b0 100644 --- a/include/wx/treebook.h +++ b/include/wx/treebook.h @@ -235,22 +235,28 @@ typedef wxBookCtrlEventFunction wxTreebookEventFunction; #define wxTreebookEventHandler(func) wxBookCtrlEventHandler(func) -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TREEBOOK_PAGE_CHANGED, wxBookCtrlEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TREEBOOK_PAGE_CHANGING, wxBookCtrlEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TREEBOOK_NODE_COLLAPSED, wxBookCtrlEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TREEBOOK_NODE_EXPANDED, wxBookCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREEBOOK_PAGE_CHANGED, wxBookCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREEBOOK_PAGE_CHANGING, wxBookCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREEBOOK_NODE_COLLAPSED, wxBookCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREEBOOK_NODE_EXPANDED, wxBookCtrlEvent ); #define EVT_TREEBOOK_PAGE_CHANGED(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_TREEBOOK_PAGE_CHANGED, winid, wxBookCtrlEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_TREEBOOK_PAGE_CHANGED, winid, wxBookCtrlEventHandler(fn)) #define EVT_TREEBOOK_PAGE_CHANGING(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_TREEBOOK_PAGE_CHANGING, winid, wxBookCtrlEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_TREEBOOK_PAGE_CHANGING, winid, wxBookCtrlEventHandler(fn)) #define EVT_TREEBOOK_NODE_COLLAPSED(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_TREEBOOK_NODE_COLLAPSED, winid, wxBookCtrlEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_TREEBOOK_NODE_COLLAPSED, winid, wxBookCtrlEventHandler(fn)) #define EVT_TREEBOOK_NODE_EXPANDED(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_TREEBOOK_NODE_EXPANDED, winid, wxBookCtrlEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_TREEBOOK_NODE_EXPANDED, winid, wxBookCtrlEventHandler(fn)) + +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_TREEBOOK_PAGE_CHANGED wxEVT_TREEBOOK_PAGE_CHANGED +#define wxEVT_COMMAND_TREEBOOK_PAGE_CHANGING wxEVT_TREEBOOK_PAGE_CHANGING +#define wxEVT_COMMAND_TREEBOOK_NODE_COLLAPSED wxEVT_TREEBOOK_NODE_COLLAPSED +#define wxEVT_COMMAND_TREEBOOK_NODE_EXPANDED wxEVT_TREEBOOK_NODE_EXPANDED #endif // wxUSE_TREEBOOK diff --git a/include/wx/treectrl.h b/include/wx/treectrl.h index c23920964e..6e7a75aae6 100644 --- a/include/wx/treectrl.h +++ b/include/wx/treectrl.h @@ -289,10 +289,10 @@ public: // delete this item and associated data if any virtual void Delete(const wxTreeItemId& item) = 0; // delete all children (but don't delete the item itself) - // NB: this won't send wxEVT_COMMAND_TREE_ITEM_DELETED events + // NB: this won't send wxEVT_TREE_ITEM_DELETED events virtual void DeleteChildren(const wxTreeItemId& item) = 0; // delete all items from the tree - // NB: this won't send wxEVT_COMMAND_TREE_ITEM_DELETED events + // NB: this won't send wxEVT_TREE_ITEM_DELETED events virtual void DeleteAllItems() = 0; // expand this item diff --git a/include/wx/treelist.h b/include/wx/treelist.h index 382be23b3a..3fa1cdaabe 100644 --- a/include/wx/treelist.h +++ b/include/wx/treelist.h @@ -526,11 +526,11 @@ typedef void (wxEvtHandler::*wxTreeListEventFunction)(wxTreeListEvent&); wxEVENT_HANDLER_CAST(wxTreeListEventFunction, func) #define wxEVT_TREELIST_GENERIC(name, id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_TREELIST_##name, id, wxTreeListEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_TREELIST_##name, id, wxTreeListEventHandler(fn)) #define wxDECLARE_TREELIST_EVENT(name) \ wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, \ - wxEVT_COMMAND_TREELIST_##name, \ + wxEVT_TREELIST_##name, \ wxTreeListEvent) wxDECLARE_TREELIST_EVENT(SELECTION_CHANGED); @@ -563,6 +563,15 @@ wxDECLARE_TREELIST_EVENT(COLUMN_SORTED); #undef wxDECLARE_TREELIST_EVENT +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_TREELIST_SELECTION_CHANGED wxEVT_TREELIST_SELECTION_CHANGED +#define wxEVT_COMMAND_TREELIST_ITEM_EXPANDING wxEVT_TREELIST_ITEM_EXPANDING +#define wxEVT_COMMAND_TREELIST_ITEM_EXPANDED wxEVT_TREELIST_ITEM_EXPANDED +#define wxEVT_COMMAND_TREELIST_ITEM_CHECKED wxEVT_TREELIST_ITEM_CHECKED +#define wxEVT_COMMAND_TREELIST_ITEM_ACTIVATED wxEVT_TREELIST_ITEM_ACTIVATED +#define wxEVT_COMMAND_TREELIST_ITEM_CONTEXT_MENU wxEVT_TREELIST_ITEM_CONTEXT_MENU +#define wxEVT_COMMAND_TREELIST_COLUMN_SORTED wxEVT_TREELIST_COLUMN_SORTED + #endif // wxUSE_TREELISTCTRL #endif // _WX_TREELIST_H_ diff --git a/include/wx/vlbox.h b/include/wx/vlbox.h index 96ab2bde6f..7c55474b1f 100644 --- a/include/wx/vlbox.h +++ b/include/wx/vlbox.h @@ -247,7 +247,7 @@ protected: // common part of all ctors void Init(); - // send the wxEVT_COMMAND_LISTBOX_SELECTED event + // send the wxEVT_LISTBOX event void SendSelectedEvent(); virtual void InitEvent(wxCommandEvent& event, int n); diff --git a/include/wx/webview.h b/include/wx/webview.h index c6e8b200cf..f7b6be6ce7 100644 --- a/include/wx/webview.h +++ b/include/wx/webview.h @@ -255,12 +255,12 @@ private: wxDECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxWebViewEvent); }; -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_WEBVIEW, wxEVT_COMMAND_WEBVIEW_NAVIGATING, wxWebViewEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_WEBVIEW, wxEVT_COMMAND_WEBVIEW_NAVIGATED, wxWebViewEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_WEBVIEW, wxEVT_COMMAND_WEBVIEW_LOADED, wxWebViewEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_WEBVIEW, wxEVT_COMMAND_WEBVIEW_ERROR, wxWebViewEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_WEBVIEW, wxEVT_COMMAND_WEBVIEW_NEWWINDOW, wxWebViewEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_WEBVIEW, wxEVT_COMMAND_WEBVIEW_TITLE_CHANGED, wxWebViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_WEBVIEW, wxEVT_WEBVIEW_NAVIGATING, wxWebViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_WEBVIEW, wxEVT_WEBVIEW_NAVIGATED, wxWebViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_WEBVIEW, wxEVT_WEBVIEW_LOADED, wxWebViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_WEBVIEW, wxEVT_WEBVIEW_ERROR, wxWebViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_WEBVIEW, wxEVT_WEBVIEW_NEWWINDOW, wxWebViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_WEBVIEW, wxEVT_WEBVIEW_TITLE_CHANGED, wxWebViewEvent ); typedef void (wxEvtHandler::*wxWebViewEventFunction) (wxWebViewEvent&); @@ -269,29 +269,37 @@ typedef void (wxEvtHandler::*wxWebViewEventFunction) wxEVENT_HANDLER_CAST(wxWebViewEventFunction, func) #define EVT_WEBVIEW_NAVIGATING(id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_WEBVIEW_NAVIGATING, id, \ + wx__DECLARE_EVT1(wxEVT_WEBVIEW_NAVIGATING, id, \ wxWebViewEventHandler(fn)) #define EVT_WEBVIEW_NAVIGATED(id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_WEBVIEW_NAVIGATED, id, \ + wx__DECLARE_EVT1(wxEVT_WEBVIEW_NAVIGATED, id, \ wxWebViewEventHandler(fn)) #define EVT_WEBVIEW_LOADED(id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_WEBVIEW_LOADED, id, \ + wx__DECLARE_EVT1(wxEVT_WEBVIEW_LOADED, id, \ wxWebViewEventHandler(fn)) #define EVT_WEBVIEW_ERROR(id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_WEBVIEW_ERROR, id, \ + wx__DECLARE_EVT1(wxEVT_WEBVIEW_ERROR, id, \ wxWebViewEventHandler(fn)) #define EVT_WEBVIEW_NEWWINDOW(id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_WEBVIEW_NEWWINDOW, id, \ + wx__DECLARE_EVT1(wxEVT_WEBVIEW_NEWWINDOW, id, \ wxWebViewEventHandler(fn)) #define EVT_WEBVIEW_TITLE_CHANGED(id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_WEBVIEW_TITLE_CHANGED, id, \ + wx__DECLARE_EVT1(wxEVT_WEBVIEW_TITLE_CHANGED, id, \ wxWebViewEventHandler(fn)) +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_WEBVIEW_NAVIGATING wxEVT_WEBVIEW_NAVIGATING +#define wxEVT_COMMAND_WEBVIEW_NAVIGATED wxEVT_WEBVIEW_NAVIGATED +#define wxEVT_COMMAND_WEBVIEW_LOADED wxEVT_WEBVIEW_LOADED +#define wxEVT_COMMAND_WEBVIEW_ERROR wxEVT_WEBVIEW_ERROR +#define wxEVT_COMMAND_WEBVIEW_NEWWINDOW wxEVT_WEBVIEW_NEWWINDOW +#define wxEVT_COMMAND_WEBVIEW_TITLE_CHANGED wxEVT_WEBVIEW_TITLE_CHANGED + #endif // wxUSE_WEBVIEW #endif // _WX_WEBVIEW_H_ diff --git a/interface/wx/aui/auibar.h b/interface/wx/aui/auibar.h index 05220e4798..17c5e7b5cb 100644 --- a/interface/wx/aui/auibar.h +++ b/interface/wx/aui/auibar.h @@ -601,15 +601,15 @@ public: @beginEventEmissionTable{wxAuiToolBarEvent} @event{EVT_AUITOOLBAR_TOOL_DROPDOWN(id, func)} - Process a wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN event + Process a wxEVT_AUITOOLBAR_TOOL_DROPDOWN event @event{EVT_AUITOOLBAR_OVERFLOW_CLICK(id, func)} - Process a wxEVT_COMMAND_AUITOOLBAR_OVERFLOW_CLICK event + Process a wxEVT_AUITOOLBAR_OVERFLOW_CLICK event @event{EVT_AUITOOLBAR_RIGHT_CLICK(id, func)} - Process a wxEVT_COMMAND_AUITOOLBAR_RIGHT_CLICK event + Process a wxEVT_AUITOOLBAR_RIGHT_CLICK event @event{EVT_AUITOOLBAR_MIDDLE_CLICK(id, func)} - Process a wxEVT_COMMAND_AUITOOLBAR_MIDDLE_CLICK event + Process a wxEVT_AUITOOLBAR_MIDDLE_CLICK event @event{EVT_AUITOOLBAR_BEGIN_DRAG(id, func)} - Process a wxEVT_COMMAND_AUITOOLBAR_BEGIN_DRAG event + Process a wxEVT_AUITOOLBAR_BEGIN_DRAG event @endEventTable @library{wxaui} diff --git a/interface/wx/aui/auibook.h b/interface/wx/aui/auibook.h index 5253ea3a4a..e7ddd5aebc 100644 --- a/interface/wx/aui/auibook.h +++ b/interface/wx/aui/auibook.h @@ -58,35 +58,35 @@ @beginEventEmissionTable{wxAuiNotebookEvent} @event{EVT_AUINOTEBOOK_PAGE_CLOSE(id, func)} - A page is about to be closed. Processes a @c wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE event. + A page is about to be closed. Processes a @c wxEVT_AUINOTEBOOK_PAGE_CLOSE event. @event{EVT_AUINOTEBOOK_PAGE_CLOSED(winid, fn)} - A page has been closed. Processes a @c wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSED event. + A page has been closed. Processes a @c wxEVT_AUINOTEBOOK_PAGE_CLOSED event. @event{EVT_AUINOTEBOOK_PAGE_CHANGED(id, func)} - The page selection was changed. Processes a @c wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED event. + The page selection was changed. Processes a @c wxEVT_AUINOTEBOOK_PAGE_CHANGED event. @event{EVT_AUINOTEBOOK_PAGE_CHANGING(id, func)} - The page selection is about to be changed. Processes a @c wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING event. This event can be vetoed. + The page selection is about to be changed. Processes a @c wxEVT_AUINOTEBOOK_PAGE_CHANGING event. This event can be vetoed. @event{EVT_AUINOTEBOOK_BUTTON(id, func)} - The window list button has been pressed. Processes a @c wxEVT_COMMAND_AUINOTEBOOK_BUTTON event. + The window list button has been pressed. Processes a @c wxEVT_AUINOTEBOOK_BUTTON event. @event{EVT_AUINOTEBOOK_BEGIN_DRAG(id, func)} - Dragging is about to begin. Processes a @c wxEVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG event. + Dragging is about to begin. Processes a @c wxEVT_AUINOTEBOOK_BEGIN_DRAG event. @event{EVT_AUINOTEBOOK_END_DRAG(id, func)} - Dragging has ended. Processes a @c wxEVT_COMMAND_AUINOTEBOOK_END_DRAG event. + Dragging has ended. Processes a @c wxEVT_AUINOTEBOOK_END_DRAG event. @event{EVT_AUINOTEBOOK_DRAG_MOTION(id, func)} - Emitted during a drag and drop operation. Processes a @c wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION event. + Emitted during a drag and drop operation. Processes a @c wxEVT_AUINOTEBOOK_DRAG_MOTION event. @event{EVT_AUINOTEBOOK_ALLOW_DND(id, func)} - Whether to allow a tab to be dropped. Processes a @c wxEVT_COMMAND_AUINOTEBOOK_ALLOW_DND event. This event must be specially allowed. + Whether to allow a tab to be dropped. Processes a @c wxEVT_AUINOTEBOOK_ALLOW_DND event. This event must be specially allowed. @event{EVT_AUINOTEBOOK_DRAG_DONE(winid, fn)} - Notify that the tab has been dragged. Processes a @c wxEVT_COMMAND_AUINOTEBOOK_DRAG_DONE event. + Notify that the tab has been dragged. Processes a @c wxEVT_AUINOTEBOOK_DRAG_DONE event. @event{EVT_AUINOTEBOOK_TAB_MIDDLE_DOWN(winid, fn)} - The middle mouse button is pressed on a tab. Processes a @c wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN event. + The middle mouse button is pressed on a tab. Processes a @c wxEVT_AUINOTEBOOK_TAB_MIDDLE_DOWN event. @event{EVT_AUINOTEBOOK_TAB_MIDDLE_UP(winid, fn)} - The middle mouse button is released on a tab. Processes a @c wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP event. + The middle mouse button is released on a tab. Processes a @c wxEVT_AUINOTEBOOK_TAB_MIDDLE_UP event. @event{EVT_AUINOTEBOOK_TAB_RIGHT_DOWN(winid, fn)} - The right mouse button is pressed on a tab. Processes a @c wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN event. + The right mouse button is pressed on a tab. Processes a @c wxEVT_AUINOTEBOOK_TAB_RIGHT_DOWN event. @event{EVT_AUINOTEBOOK_TAB_RIGHT_UP(winid, fn)} - The right mouse button is released on a tab. Processes a @c wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP event. + The right mouse button is released on a tab. Processes a @c wxEVT_AUINOTEBOOK_TAB_RIGHT_UP event. @event{EVT_AUINOTEBOOK_BG_DCLICK(winid, fn)} - Double clicked on the tabs background area. Processes a @c wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK event. + Double clicked on the tabs background area. Processes a @c wxEVT_AUINOTEBOOK_BG_DCLICK event. @endEventTable @library{wxaui} @@ -602,35 +602,35 @@ public: @beginEventEmissionTable{wxAuiNotebookEvent} @event{EVT_AUINOTEBOOK_PAGE_CLOSE(id, func)} - A page is about to be closed. Processes a @c wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE event. + A page is about to be closed. Processes a @c wxEVT_AUINOTEBOOK_PAGE_CLOSE event. @event{EVT_AUINOTEBOOK_PAGE_CLOSED(winid, fn)} - A page has been closed. Processes a @c wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSED event. + A page has been closed. Processes a @c wxEVT_AUINOTEBOOK_PAGE_CLOSED event. @event{EVT_AUINOTEBOOK_PAGE_CHANGED(id, func)} - The page selection was changed. Processes a @c wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED event. + The page selection was changed. Processes a @c wxEVT_AUINOTEBOOK_PAGE_CHANGED event. @event{EVT_AUINOTEBOOK_PAGE_CHANGING(id, func)} - The page selection is about to be changed. Processes a @c wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING event. This event can be vetoed. + The page selection is about to be changed. Processes a @c wxEVT_AUINOTEBOOK_PAGE_CHANGING event. This event can be vetoed. @event{EVT_AUINOTEBOOK_BUTTON(id, func)} - The window list button has been pressed. Processes a @c wxEVT_COMMAND_AUINOTEBOOK_BUTTON event. + The window list button has been pressed. Processes a @c wxEVT_AUINOTEBOOK_BUTTON event. @event{EVT_AUINOTEBOOK_BEGIN_DRAG(id, func)} - Dragging is about to begin. Processes a @c wxEVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG event. + Dragging is about to begin. Processes a @c wxEVT_AUINOTEBOOK_BEGIN_DRAG event. @event{EVT_AUINOTEBOOK_END_DRAG(id, func)} - Dragging has ended. Processes a @c wxEVT_COMMAND_AUINOTEBOOK_END_DRAG event. + Dragging has ended. Processes a @c wxEVT_AUINOTEBOOK_END_DRAG event. @event{EVT_AUINOTEBOOK_DRAG_MOTION(id, func)} - Emitted during a drag and drop operation. Processes a @c wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION event. + Emitted during a drag and drop operation. Processes a @c wxEVT_AUINOTEBOOK_DRAG_MOTION event. @event{EVT_AUINOTEBOOK_ALLOW_DND(id, func)} - Whether to allow a tab to be dropped. Processes a @c wxEVT_COMMAND_AUINOTEBOOK_ALLOW_DND event. This event must be specially allowed. + Whether to allow a tab to be dropped. Processes a @c wxEVT_AUINOTEBOOK_ALLOW_DND event. This event must be specially allowed. @event{EVT_AUINOTEBOOK_DRAG_DONE(winid, fn)} - Notify that the tab has been dragged. Processes a @c wxEVT_COMMAND_AUINOTEBOOK_DRAG_DONE event. + Notify that the tab has been dragged. Processes a @c wxEVT_AUINOTEBOOK_DRAG_DONE event. @event{EVT_AUINOTEBOOK_TAB_MIDDLE_DOWN(winid, fn)} - The middle mouse button is pressed on a tab. Processes a @c wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN event. + The middle mouse button is pressed on a tab. Processes a @c wxEVT_AUINOTEBOOK_TAB_MIDDLE_DOWN event. @event{EVT_AUINOTEBOOK_TAB_MIDDLE_UP(winid, fn)} - The middle mouse button is released on a tab. Processes a @c wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP event. + The middle mouse button is released on a tab. Processes a @c wxEVT_AUINOTEBOOK_TAB_MIDDLE_UP event. @event{EVT_AUINOTEBOOK_TAB_RIGHT_DOWN(winid, fn)} - The right mouse button is pressed on a tab. Processes a @c wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN event. + The right mouse button is pressed on a tab. Processes a @c wxEVT_AUINOTEBOOK_TAB_RIGHT_DOWN event. @event{EVT_AUINOTEBOOK_TAB_RIGHT_UP(winid, fn)} - The right mouse button is released on a tab. Processes a @c wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP event. + The right mouse button is released on a tab. Processes a @c wxEVT_AUINOTEBOOK_TAB_RIGHT_UP event. @event{EVT_AUINOTEBOOK_BG_DCLICK(winid, fn)} - Double clicked on the tabs background area. Processes a @c wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK event. + Double clicked on the tabs background area. Processes a @c wxEVT_AUINOTEBOOK_BG_DCLICK event. @endEventTable @library{wxaui} diff --git a/interface/wx/bmpbuttn.h b/interface/wx/bmpbuttn.h index 6d7ab08b68..8a95888271 100644 --- a/interface/wx/bmpbuttn.h +++ b/interface/wx/bmpbuttn.h @@ -33,7 +33,7 @@ @beginEventEmissionTable{wxCommandEvent} @event{EVT_BUTTON(id, func)} - Process a @c wxEVT_COMMAND_BUTTON_CLICKED event, when the button is clicked. + Process a @c wxEVT_BUTTON event, when the button is clicked. @endEventTable @library{wxcore} diff --git a/interface/wx/bmpcbox.h b/interface/wx/bmpcbox.h index 3a44644343..573487538a 100644 --- a/interface/wx/bmpcbox.h +++ b/interface/wx/bmpcbox.h @@ -28,7 +28,7 @@ @style{wxCB_SORT} Sorts the entries in the list alphabetically. @style{wxTE_PROCESS_ENTER} - The control will generate the event wxEVT_COMMAND_TEXT_ENTER + The control will generate the event wxEVT_TEXT_ENTER (otherwise pressing Enter key is either processed internally by the control or used for navigation between dialog controls). Windows only. @@ -38,12 +38,12 @@ @beginEventEmissionTable{wxCommandEvent} @event{EVT_COMBOBOX(id, func)} - Process a @c wxEVT_COMMAND_COMBOBOX_SELECTED event, when an item on + Process a @c wxEVT_COMBOBOX event, when an item on the list is selected. @event{EVT_TEXT(id, func)} - Process a @c wxEVT_COMMAND_TEXT_UPDATED event, when the combobox text changes. + Process a @c wxEVT_TEXT event, when the combobox text changes. @event{EVT_TEXT_ENTER(id, func)} - Process a @c wxEVT_COMMAND_TEXT_ENTER event, when RETURN is pressed in + Process a @c wxEVT_TEXT_ENTER event, when RETURN is pressed in the combobox. @endEventTable diff --git a/interface/wx/button.h b/interface/wx/button.h index 9be66609d8..7c91ca1dc3 100644 --- a/interface/wx/button.h +++ b/interface/wx/button.h @@ -95,7 +95,7 @@ @beginEventEmissionTable{wxCommandEvent} @event{EVT_BUTTON(id, func)} - Process a @c wxEVT_COMMAND_BUTTON_CLICKED event, when the button is clicked. + Process a @c wxEVT_BUTTON event, when the button is clicked. @endEventTable @library{wxcore} diff --git a/interface/wx/checkbox.h b/interface/wx/checkbox.h index 60d8135c02..999e49fd9e 100644 --- a/interface/wx/checkbox.h +++ b/interface/wx/checkbox.h @@ -63,7 +63,7 @@ enum wxCheckBoxState @beginEventEmissionTable{wxCommandEvent} @event{EVT_CHECKBOX(id, func)} - Process a @c wxEVT_COMMAND_CHECKBOX_CLICKED event, when the checkbox + Process a @c wxEVT_CHECKBOX event, when the checkbox is clicked. @endEventTable @@ -170,7 +170,7 @@ public: /** Sets the checkbox to the given state. This does not cause a - @c wxEVT_COMMAND_CHECKBOX_CLICKED event to get emitted. + @c wxEVT_CHECKBOX event to get emitted. @param state If @true, the check is on, otherwise it is off. @@ -179,7 +179,7 @@ public: /** Sets the checkbox to the given state. This does not cause a - @c wxEVT_COMMAND_CHECKBOX_CLICKED event to get emitted. + @c wxEVT_CHECKBOX event to get emitted. Asserts when the checkbox is a 2-state checkbox and setting the state to wxCHK_UNDETERMINED. diff --git a/interface/wx/checklst.h b/interface/wx/checklst.h index 9689955c6b..10e3b02597 100644 --- a/interface/wx/checklst.h +++ b/interface/wx/checklst.h @@ -17,7 +17,7 @@ @beginEventEmissionTable{wxCommandEvent} @event{EVT_CHECKLISTBOX(id, func)} - Process a @c wxEVT_COMMAND_CHECKLISTBOX_TOGGLED event, when an item in + Process a @c wxEVT_CHECKLISTBOX event, when an item in the check list box is checked or unchecked. wxCommandEvent::GetInt() will contain the index of the item that was checked or unchecked. wxCommandEvent::IsChecked() is not valid! Use wxCheckListBox::IsChecked() @@ -135,7 +135,7 @@ public: /** Checks the given item. Note that calling this method does not result in - a @c wxEVT_COMMAND_CHECKLISTBOX_TOGGLE event being emitted. + a @c wxEVT_CHECKLISTBOX event being emitted. @param item Index of item to check. diff --git a/interface/wx/choice.h b/interface/wx/choice.h index 50cd202753..01ee0b9cb6 100644 --- a/interface/wx/choice.h +++ b/interface/wx/choice.h @@ -20,7 +20,7 @@ @beginEventEmissionTable{wxCommandEvent} @event{EVT_CHOICE(id, func)} - Process a @c wxEVT_COMMAND_CHOICE_SELECTED event, when an item on the + Process a @c wxEVT_CHOICE event, when an item on the list is selected. @endEventTable diff --git a/interface/wx/choicebk.h b/interface/wx/choicebk.h index ce4aae42c9..4565a06764 100644 --- a/interface/wx/choicebk.h +++ b/interface/wx/choicebk.h @@ -15,8 +15,8 @@ #define wxCHB_RIGHT wxBK_RIGHT #define wxCHB_ALIGN_MASK wxBK_ALIGN_MASK -wxEventType wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED; -wxEventType wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING; +wxEventType wxEVT_CHOICEBOOK_PAGE_CHANGED; +wxEventType wxEVT_CHOICEBOOK_PAGE_CHANGING; /** @class wxChoicebook @@ -50,10 +50,10 @@ wxEventType wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING; @beginEventEmissionTable{wxBookCtrlEvent} @event{EVT_CHOICEBOOK_PAGE_CHANGED(id, func)} The page selection was changed. - Processes a @c wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED event. + Processes a @c wxEVT_CHOICEBOOK_PAGE_CHANGED event. @event{EVT_CHOICEBOOK_PAGE_CHANGING(id, func)} The page selection is about to be changed. - Processes a @c wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING event. + Processes a @c wxEVT_CHOICEBOOK_PAGE_CHANGING event. This event can be vetoed (using wxNotifyEvent::Veto()). @endEventTable diff --git a/interface/wx/clrpicker.h b/interface/wx/clrpicker.h index e6cfa8e515..7389afabf0 100644 --- a/interface/wx/clrpicker.h +++ b/interface/wx/clrpicker.h @@ -10,7 +10,7 @@ #define wxCLRP_DEFAULT_STYLE 0 #define wxCLRP_SHOW_LABEL 0x0008 -wxEventType wxEVT_COMMAND_COLOURPICKER_CHANGED; +wxEventType wxEVT_COLOURPICKER_CHANGED; /** diff --git a/interface/wx/collpane.h b/interface/wx/collpane.h index 57f1ccc388..40e9d25090 100644 --- a/interface/wx/collpane.h +++ b/interface/wx/collpane.h @@ -44,7 +44,7 @@ public: void SetCollapsed(bool collapsed); }; -wxEventType wxEVT_COMMAND_COLLPANE_CHANGED; +wxEventType wxEVT_COLLAPSIBLEPANE_CHANGED; /** @class wxCollapsiblePane diff --git a/interface/wx/combo.h b/interface/wx/combo.h index 2238961d63..af5381eed4 100644 --- a/interface/wx/combo.h +++ b/interface/wx/combo.h @@ -330,7 +330,7 @@ struct wxComboCtrlFeatures @style{wxCB_SORT} Sorts the entries in the list alphabetically. @style{wxTE_PROCESS_ENTER} - The control will generate the event @c wxEVT_COMMAND_TEXT_ENTER + The control will generate the event @c wxEVT_TEXT_ENTER (otherwise pressing Enter key is either processed internally by the control or used for navigation between dialog controls). Windows only. @@ -345,15 +345,15 @@ struct wxComboCtrlFeatures @beginEventEmissionTable{wxCommandEvent} @event{EVT_TEXT(id, func)} - Process a @c wxEVT_COMMAND_TEXT_UPDATED event, when the text changes. + Process a @c wxEVT_TEXT event, when the text changes. @event{EVT_TEXT_ENTER(id, func)} - Process a @c wxEVT_COMMAND_TEXT_ENTER event, when RETURN is pressed in + Process a @c wxEVT_TEXT_ENTER event, when RETURN is pressed in the combo control. @event{EVT_COMBOBOX_DROPDOWN(id, func)} - Process a @c wxEVT_COMMAND_COMBOBOX_DROPDOWN event, which is generated + Process a @c wxEVT_COMBOBOX_DROPDOWN event, which is generated when the popup window is shown (drops down). @event{EVT_COMBOBOX_CLOSEUP(id, func)} - Process a @c wxEVT_COMMAND_COMBOBOX_CLOSEUP event, which is generated + Process a @c wxEVT_COMBOBOX_CLOSEUP event, which is generated when the popup window of the combo control disappears (closes up). You should avoid adding or deleting items in this event. @endEventTable @@ -438,7 +438,7 @@ public: Dismisses the popup window. Notice that calling this function will generate a - @c wxEVT_COMMAND_COMBOBOX_CLOSEUP event. + @c wxEVT_COMBOBOX_CLOSEUP event. @since 2.9.2 */ @@ -609,7 +609,7 @@ public: @param generateEvent Set this to @true in order to generate - @c wxEVT_COMMAND_COMBOBOX_CLOSEUP event. + @c wxEVT_COMBOBOX_CLOSEUP event. @deprecated Use Dismiss() instead. */ @@ -652,7 +652,7 @@ public: Shows the popup portion of the combo control. Notice that calling this function will generate a - @c wxEVT_COMMAND_COMBOBOX_DROPDOWN event. + @c wxEVT_COMBOBOX_DROPDOWN event. @since 2.9.2 */ diff --git a/interface/wx/combobox.h b/interface/wx/combobox.h index aaf7894177..7e10877077 100644 --- a/interface/wx/combobox.h +++ b/interface/wx/combobox.h @@ -41,7 +41,7 @@ @style{wxCB_SORT} Sorts the entries in the list alphabetically. @style{wxTE_PROCESS_ENTER} - The control will generate the event @c wxEVT_COMMAND_TEXT_ENTER + The control will generate the event @c wxEVT_TEXT_ENTER (otherwise pressing Enter key is either processed internally by the control or used for navigation between dialog controls). Windows only. @@ -49,26 +49,26 @@ @beginEventEmissionTable{wxCommandEvent} @event{EVT_COMBOBOX(id, func)} - Process a @c wxEVT_COMMAND_COMBOBOX_SELECTED event, when an item on + Process a @c wxEVT_COMBOBOX event, when an item on the list is selected. Note that calling GetValue() returns the new value of selection. @event{EVT_TEXT(id, func)} - Process a @c wxEVT_COMMAND_TEXT_UPDATED event, when the combobox text + Process a @c wxEVT_TEXT event, when the combobox text changes. @event{EVT_TEXT_ENTER(id, func)} - Process a @c wxEVT_COMMAND_TEXT_ENTER event, when RETURN is pressed in + Process a @c wxEVT_TEXT_ENTER event, when RETURN is pressed in the combobox (notice that the combobox must have been created with wxTE_PROCESS_ENTER style to receive this event). @event{EVT_COMBOBOX_DROPDOWN(id, func)} - Process a @c wxEVT_COMMAND_COMBOBOX_DROPDOWN event, which is generated + Process a @c wxEVT_COMBOBOX_DROPDOWN event, which is generated when the list box part of the combo box is shown (drops down). Notice that this event is currently only supported by wxMSW and wxGTK with GTK+ 2.10 or later. @event{EVT_COMBOBOX_CLOSEUP(id, func)} - Process a @c wxEVT_COMMAND_COMBOBOX_CLOSEUP event, which is generated + Process a @c wxEVT_COMBOBOX_CLOSEUP event, which is generated when the list box of the combo box disappears (closes up). This event is only generated for the same platforms as - @c wxEVT_COMMAND_COMBOBOX_DROPDOWN above. Also note that only wxMSW + @c wxEVT_COMBOBOX_DROPDOWN above. Also note that only wxMSW supports adding or deleting items in this event. @endEventTable @@ -255,7 +255,7 @@ public: /** Sets the text for the combobox text field. - Notice that this method will generate a @c wxEVT_COMMAND_TEXT_UPDATED + Notice that this method will generate a @c wxEVT_TEXT event, use wxTextEntry::ChangeValue() if this is undesirable. @note For a combobox with @c wxCB_READONLY style the string must be in @@ -273,7 +273,7 @@ public: Currently this method is implemented in wxMSW, wxGTK and wxOSX/Cocoa. Notice that calling this function will generate a - @c wxEVT_COMMAND_COMBOBOX_DROPDOWN event except under wxOSX where + @c wxEVT_COMBOBOX_DROPDOWN event except under wxOSX where generation of this event is not supported at all. @since 2.9.1 @@ -286,7 +286,7 @@ public: Currently this method is implemented in wxMSW, wxGTK and wxOSX/Cocoa. Notice that calling this function will generate a - @c wxEVT_COMMAND_COMBOBOX_CLOSEUP event except under wxOSX where + @c wxEVT_COMBOBOX_CLOSEUP event except under wxOSX where generation of this event is not supported at all. @since 2.9.1 diff --git a/interface/wx/dataview.h b/interface/wx/dataview.h index 4f0057d2c8..b4f4abb924 100644 --- a/interface/wx/dataview.h +++ b/interface/wx/dataview.h @@ -769,29 +769,29 @@ public: // events -wxEventType wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED; - -wxEventType wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED; -wxEventType wxEVT_COMMAND_DATAVIEW_ITEM_COLLAPSING; -wxEventType wxEVT_COMMAND_DATAVIEW_ITEM_COLLAPSED; -wxEventType wxEVT_COMMAND_DATAVIEW_ITEM_EXPANDING; -wxEventType wxEVT_COMMAND_DATAVIEW_ITEM_EXPANDED; -wxEventType wxEVT_COMMAND_DATAVIEW_ITEM_START_EDITING; -wxEventType wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_STARTED; -wxEventType wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_DONE; -wxEventType wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED; - -wxEventType wxEVT_COMMAND_DATAVIEW_ITEM_CONTEXT_MENU; - -wxEventType wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_CLICK; -wxEventType wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK; -wxEventType wxEVT_COMMAND_DATAVIEW_COLUMN_SORTED; -wxEventType wxEVT_COMMAND_DATAVIEW_COLUMN_REORDERED; -wxEventType wxEVT_COMMAND_DATAVIEW_CACHE_HINT; - -wxEventType wxEVT_COMMAND_DATAVIEW_ITEM_BEGIN_DRAG; -wxEventType wxEVT_COMMAND_DATAVIEW_ITEM_DROP_POSSIBLE; -wxEventType wxEVT_COMMAND_DATAVIEW_ITEM_DROP; +wxEventType wxEVT_DATAVIEW_SELECTION_CHANGED; + +wxEventType wxEVT_DATAVIEW_ITEM_ACTIVATED; +wxEventType wxEVT_DATAVIEW_ITEM_COLLAPSING; +wxEventType wxEVT_DATAVIEW_ITEM_COLLAPSED; +wxEventType wxEVT_DATAVIEW_ITEM_EXPANDING; +wxEventType wxEVT_DATAVIEW_ITEM_EXPANDED; +wxEventType wxEVT_DATAVIEW_ITEM_START_EDITING; +wxEventType wxEVT_DATAVIEW_ITEM_EDITING_STARTED; +wxEventType wxEVT_DATAVIEW_ITEM_EDITING_DONE; +wxEventType wxEVT_DATAVIEW_ITEM_VALUE_CHANGED; + +wxEventType wxEVT_DATAVIEW_ITEM_CONTEXT_MENU; + +wxEventType wxEVT_DATAVIEW_COLUMN_HEADER_CLICK; +wxEventType wxEVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICKED; +wxEventType wxEVT_DATAVIEW_COLUMN_SORTED; +wxEventType wxEVT_DATAVIEW_COLUMN_REORDERED; +wxEventType wxEVT_DATAVIEW_CACHE_HINT; + +wxEventType wxEVT_DATAVIEW_ITEM_BEGIN_DRAG; +wxEventType wxEVT_DATAVIEW_ITEM_DROP_POSSIBLE; +wxEventType wxEVT_DATAVIEW_ITEM_DROP; /** @class wxDataViewCtrl @@ -844,51 +844,51 @@ wxEventType wxEVT_COMMAND_DATAVIEW_ITEM_DROP; @beginEventEmissionTable{wxDataViewEvent} @event{EVT_DATAVIEW_SELECTION_CHANGED(id, func)} - Process a @c wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED event. + Process a @c wxEVT_DATAVIEW_SELECTION_CHANGED event. @event{EVT_DATAVIEW_ITEM_ACTIVATED(id, func)} - Process a @c wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED event. This event + Process a @c wxEVT_DATAVIEW_ITEM_ACTIVATED event. This event is triggered by double clicking an item or pressing some special key (usually "Enter") when it is focused. @event{EVT_DATAVIEW_ITEM_START_EDITING(id, func)} - Process a @c wxEVT_COMMAND_DATAVIEW_ITEM_START_EDITING event. This + Process a @c wxEVT_DATAVIEW_ITEM_START_EDITING event. This event can be vetoed in order to prevent editing on an item by item basis. @event{EVT_DATAVIEW_ITEM_EDITING_STARTED(id, func)} - Process a @c wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_STARTED event. + Process a @c wxEVT_DATAVIEW_ITEM_EDITING_STARTED event. @event{EVT_DATAVIEW_ITEM_EDITING_DONE(id, func)} - Process a @c wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_DONE event. + Process a @c wxEVT_DATAVIEW_ITEM_EDITING_DONE event. @event{EVT_DATAVIEW_ITEM_COLLAPSING(id, func)} - Process a @c wxEVT_COMMAND_DATAVIEW_ITEM_COLLAPSING event. + Process a @c wxEVT_DATAVIEW_ITEM_COLLAPSING event. @event{EVT_DATAVIEW_ITEM_COLLAPSED(id, func)} - Process a @c wxEVT_COMMAND_DATAVIEW_ITEM_COLLAPSED event. + Process a @c wxEVT_DATAVIEW_ITEM_COLLAPSED event. @event{EVT_DATAVIEW_ITEM_EXPANDING(id, func)} - Process a @c wxEVT_COMMAND_DATAVIEW_ITEM_EXPANDING event. + Process a @c wxEVT_DATAVIEW_ITEM_EXPANDING event. @event{EVT_DATAVIEW_ITEM_EXPANDED(id, func)} - Process a @c wxEVT_COMMAND_DATAVIEW_ITEM_EXPANDED event. + Process a @c wxEVT_DATAVIEW_ITEM_EXPANDED event. @event{EVT_DATAVIEW_ITEM_VALUE_CHANGED(id, func)} - Process a @c wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED event. + Process a @c wxEVT_DATAVIEW_ITEM_VALUE_CHANGED event. @event{EVT_DATAVIEW_ITEM_CONTEXT_MENU(id, func)} - Process a @c wxEVT_COMMAND_DATAVIEW_ITEM_CONTEXT_MENU event + Process a @c wxEVT_DATAVIEW_ITEM_CONTEXT_MENU event generated when the user right clicks inside the control. Notice that this menu is generated even if the click didn't occur on any valid item, in this case wxDataViewEvent::GetItem() simply returns an invalid item. @event{EVT_DATAVIEW_COLUMN_HEADER_CLICK(id, func)} - Process a @c wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_CLICK event. + Process a @c wxEVT_DATAVIEW_COLUMN_HEADER_CLICK event. @event{EVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK(id, func)} - Process a @c wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK event. + Process a @c wxEVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICKED event. Notice that currently this event is not generated in the native OS X versions of the control. @event{EVT_DATAVIEW_COLUMN_SORTED(id, func)} - Process a @c wxEVT_COMMAND_DATAVIEW_COLUMN_SORTED event. + Process a @c wxEVT_DATAVIEW_COLUMN_SORTED event. @event{EVT_DATAVIEW_COLUMN_REORDERED(id, func)} - Process a @c wxEVT_COMMAND_DATAVIEW_COLUMN_REORDERED event. + Process a @c wxEVT_DATAVIEW_COLUMN_REORDERED event. @event{EVT_DATAVIEW_ITEM_BEGIN_DRAG(id, func)} - Process a @c wxEVT_COMMAND_DATAVIEW_ITEM_BEGIN_DRAG event. + Process a @c wxEVT_DATAVIEW_ITEM_BEGIN_DRAG event. @event{EVT_DATAVIEW_ITEM_DROP_POSSIBLE(id, func)} - Process a @c wxEVT_COMMAND_DATAVIEW_ITEM_DROP_POSSIBLE event. + Process a @c wxEVT_DATAVIEW_ITEM_DROP_POSSIBLE event. @event{EVT_DATAVIEW_ITEM_DROP(id, func)} - Process a @c wxEVT_COMMAND_DATAVIEW_ITEM_DROP event. + Process a @c wxEVT_DATAVIEW_ITEM_DROP event. @endEventTable Notice that this control doesn't allow to process generic mouse events such @@ -1635,7 +1635,7 @@ enum wxDataViewCellMode mouse click. @note Do not confuse this with item activation in wxDataViewCtrl - and the wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED event. That one is + and the wxEVT_DATAVIEW_ITEM_ACTIVATED event. That one is used for activating the item (or, to put it differently, the entire row) similarly to analogous messages in wxTreeCtrl and wxListCtrl, and the effect differs (play a song, open a file @@ -2087,7 +2087,7 @@ public: @since 2.9.3 @note Do not confuse this method with item activation in wxDataViewCtrl - and the wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED event. That one is + and the wxEVT_DATAVIEW_ITEM_ACTIVATED event. That one is used for activating the item (or, to put it differently, the entire row) similarly to analogous messages in wxTreeCtrl and wxListCtrl, and the effect differs (play a song, open a file @@ -3232,43 +3232,43 @@ public: @beginEventTable{wxDataViewEvent} @event{EVT_DATAVIEW_SELECTION_CHANGED(id, func)} - Process a @c wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED event. + Process a @c wxEVT_DATAVIEW_SELECTION_CHANGED event. @event{EVT_DATAVIEW_ITEM_ACTIVATED(id, func)} - Process a @c wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED event. + Process a @c wxEVT_DATAVIEW_ITEM_ACTIVATED event. @event{EVT_DATAVIEW_ITEM_EDITING_STARTED(id, func)} - Process a @c wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_STARTED event. + Process a @c wxEVT_DATAVIEW_ITEM_EDITING_STARTED event. @event{EVT_DATAVIEW_ITEM_EDITING_DONE(id, func)} - Process a @c wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_DONE event. + Process a @c wxEVT_DATAVIEW_ITEM_EDITING_DONE event. @event{EVT_DATAVIEW_ITEM_COLLAPSING(id, func)} - Process a @c wxEVT_COMMAND_DATAVIEW_ITEM_COLLAPSING event. + Process a @c wxEVT_DATAVIEW_ITEM_COLLAPSING event. @event{EVT_DATAVIEW_ITEM_COLLAPSED(id, func)} - Process a @c wxEVT_COMMAND_DATAVIEW_ITEM_COLLAPSED event. + Process a @c wxEVT_DATAVIEW_ITEM_COLLAPSED event. @event{EVT_DATAVIEW_ITEM_EXPANDING(id, func)} - Process a @c wxEVT_COMMAND_DATAVIEW_ITEM_EXPANDING event. + Process a @c wxEVT_DATAVIEW_ITEM_EXPANDING event. @event{EVT_DATAVIEW_ITEM_EXPANDED(id, func)} - Process a @c wxEVT_COMMAND_DATAVIEW_ITEM_EXPANDED event. + Process a @c wxEVT_DATAVIEW_ITEM_EXPANDED event. @event{EVT_DATAVIEW_ITEM_VALUE_CHANGED(id, func)} - Process a @c wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED event. + Process a @c wxEVT_DATAVIEW_ITEM_VALUE_CHANGED event. @event{EVT_DATAVIEW_ITEM_CONTEXT_MENU(id, func)} - Process a @c wxEVT_COMMAND_DATAVIEW_ITEM_CONTEXT_MENU event. + Process a @c wxEVT_DATAVIEW_ITEM_CONTEXT_MENU event. @event{EVT_DATAVIEW_COLUMN_HEADER_CLICK(id, func)} - Process a @c wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_CLICK event. + Process a @c wxEVT_DATAVIEW_COLUMN_HEADER_CLICK event. @event{EVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK(id, func)} - Process a @c wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_RIGHT_CLICKED event. + Process a @c wxEVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICKED event. @event{EVT_DATAVIEW_COLUMN_SORTED(id, func)} - Process a @c wxEVT_COMMAND_DATAVIEW_COLUMN_SORTED event. + Process a @c wxEVT_DATAVIEW_COLUMN_SORTED event. @event{EVT_DATAVIEW_COLUMN_REORDERED(id, func)} - Process a @c wxEVT_COMMAND_DATAVIEW_COLUMN_REORDERED event. + Process a @c wxEVT_DATAVIEW_COLUMN_REORDERED event. Currently this even is only generated when using the native OSX version. @event{EVT_DATAVIEW_ITEM_BEGIN_DRAG(id, func)} - Process a @c wxEVT_COMMAND_DATAVIEW_ITEM_BEGIN_DRAG event. + Process a @c wxEVT_DATAVIEW_ITEM_BEGIN_DRAG event. @event{EVT_DATAVIEW_ITEM_DROP_POSSIBLE(id, func)} - Process a @c wxEVT_COMMAND_DATAVIEW_ITEM_DROP_POSSIBLE event. + Process a @c wxEVT_DATAVIEW_ITEM_DROP_POSSIBLE event. @event{EVT_DATAVIEW_ITEM_DROP(id, func)} - Process a @c wxEVT_COMMAND_DATAVIEW_ITEM_DROP event. + Process a @c wxEVT_DATAVIEW_ITEM_DROP event. @event{EVT_DATAVIEW_CACHE_HINT(id, func)} - Process a @c wxEVT_COMMAND_DATAVIEW_CACHE_HINT event. + Process a @c wxEVT_DATAVIEW_CACHE_HINT event. @endEventTable @library{wxadv} @@ -3312,14 +3312,14 @@ public: /** Can be used to determine whether the new value is going to be accepted - in wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_DONE handler. + in wxEVT_DATAVIEW_ITEM_EDITING_DONE handler. Returns @true if editing the item was cancelled or if the user tried to enter an invalid value (refused by wxDataViewRenderer::Validate()). If this method returns @false, it means that the value in the model is about to be changed to the new one. - Notice that wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_DONE event handler can + Notice that wxEVT_DATAVIEW_ITEM_EDITING_DONE event handler can call wxNotifyEvent::Veto() to prevent this from happening. Currently support for setting this field and for vetoing the change is @@ -3373,7 +3373,7 @@ public: /** Specify the kind of the drag operation to perform. - This method can be used inside a wxEVT_COMMAND_DATAVIEW_ITEM_BEGIN_DRAG + This method can be used inside a wxEVT_DATAVIEW_ITEM_BEGIN_DRAG handler in order to configure the drag operation. Valid values are ::wxDrag_CopyOnly (default), ::wxDrag_AllowMove (allow the data to be moved) and ::wxDrag_DefaultMove. @@ -3392,8 +3392,8 @@ public: Returns the effect the user requested to happen to the dropped data. This function can be used inside - wxEVT_COMMAND_DATAVIEW_ITEM_DROP_POSSIBLE and - wxEVT_COMMAND_DATAVIEW_ITEM_DROP handlers and returns whether the user + wxEVT_DATAVIEW_ITEM_DROP_POSSIBLE and + wxEVT_DATAVIEW_ITEM_DROP handlers and returns whether the user is trying to copy (the return value is ::wxDragCopy) or move (if the return value is ::wxDragMove) the data. diff --git a/interface/wx/defs.h b/interface/wx/defs.h index 1c7ea5e95d..a3859ee3e3 100644 --- a/interface/wx/defs.h +++ b/interface/wx/defs.h @@ -777,7 +777,7 @@ enum wxItemKind /** Normal tool button with a dropdown arrow next to it. Clicking the - dropdown arrow sends a @c wxEVT_COMMAND_TOOL_DROPDOWN_CLICKED event and may + dropdown arrow sends a @c wxEVT_TOOL_DROPDOWN event and may also display the menu previously associated with the item with wxToolBar::SetDropdownMenu(). Currently this type of tools is supported under MSW and GTK. diff --git a/interface/wx/dirctrl.h b/interface/wx/dirctrl.h index e650643106..c694b9718a 100644 --- a/interface/wx/dirctrl.h +++ b/interface/wx/dirctrl.h @@ -53,7 +53,7 @@ enum @appearance{genericdirctrl} @event{EVT_DIRCTRL_CHANGED(id, func)} Selected directory has changed. - Processes a @c wxEVT_COMMAND_DIRCTRL_CHANGED event type. + Processes a @c wxEVT_DIRCTRL_CHANGED event type. Notice that this event is generated even for the changes done by the program itself and not only those done by the user. @since 2.9.5 diff --git a/interface/wx/event.h b/interface/wx/event.h index 4ad8d1bcf1..f56d4b2435 100644 --- a/interface/wx/event.h +++ b/interface/wx/event.h @@ -113,7 +113,7 @@ public: this event. @param eventType The unique type of event, e.g. @c wxEVT_PAINT, @c wxEVT_SIZE or - @c wxEVT_COMMAND_BUTTON_CLICKED. + @c wxEVT_BUTTON. */ wxEvent(int id = 0, wxEventType eventType = wxEVT_NULL); @@ -144,7 +144,7 @@ public: wxObject* GetEventObject() const; /** - Returns the identifier of the given event type, such as @c wxEVT_COMMAND_BUTTON_CLICKED. + Returns the identifier of the given event type, such as @c wxEVT_BUTTON. */ wxEventType GetEventType() const; @@ -775,7 +775,7 @@ public: Example: @code frame->Connect( wxID_EXIT, - wxEVT_COMMAND_MENU_SELECTED, + wxEVT_MENU, wxCommandEventHandler(MyFrame::OnQuit) ); @endcode @@ -1905,59 +1905,59 @@ public: Process a command for a range of window identifiers, supplying the minimum and maximum window identifiers, command event identifier, and member function. @event{EVT_BUTTON(id, func)} - Process a @c wxEVT_COMMAND_BUTTON_CLICKED command, which is generated by a wxButton control. + Process a @c wxEVT_BUTTON command, which is generated by a wxButton control. @event{EVT_CHECKBOX(id, func)} - Process a @c wxEVT_COMMAND_CHECKBOX_CLICKED command, which is generated by a wxCheckBox control. + Process a @c wxEVT_CHECKBOX command, which is generated by a wxCheckBox control. @event{EVT_CHOICE(id, func)} - Process a @c wxEVT_COMMAND_CHOICE_SELECTED command, which is generated by a wxChoice control. + Process a @c wxEVT_CHOICE command, which is generated by a wxChoice control. @event{EVT_COMBOBOX(id, func)} - Process a @c wxEVT_COMMAND_COMBOBOX_SELECTED command, which is generated by a wxComboBox control. + Process a @c wxEVT_COMBOBOX command, which is generated by a wxComboBox control. @event{EVT_LISTBOX(id, func)} - Process a @c wxEVT_COMMAND_LISTBOX_SELECTED command, which is generated by a wxListBox control. + Process a @c wxEVT_LISTBOX command, which is generated by a wxListBox control. @event{EVT_LISTBOX_DCLICK(id, func)} - Process a @c wxEVT_COMMAND_LISTBOX_DOUBLECLICKED command, which is generated by a wxListBox control. + Process a @c wxEVT_LISTBOX_DCLICK command, which is generated by a wxListBox control. @event{EVT_CHECKLISTBOX(id, func)} - Process a @c wxEVT_COMMAND_CHECKLISTBOX_TOGGLED command, which is generated by a wxCheckListBox control. + Process a @c wxEVT_CHECKLISTBOX command, which is generated by a wxCheckListBox control. @event{EVT_MENU(id, func)} - Process a @c wxEVT_COMMAND_MENU_SELECTED command, which is generated by a menu item. + Process a @c wxEVT_MENU command, which is generated by a menu item. @event{EVT_MENU_RANGE(id1, id2, func)} - Process a @c wxEVT_COMMAND_MENU_RANGE command, which is generated by a range of menu items. + Process a @c wxEVT_MENU command, which is generated by a range of menu items. @event{EVT_CONTEXT_MENU(func)} Process the event generated when the user has requested a popup menu to appear by pressing a special keyboard key (under Windows) or by right clicking the mouse. @event{EVT_RADIOBOX(id, func)} - Process a @c wxEVT_COMMAND_RADIOBOX_SELECTED command, which is generated by a wxRadioBox control. + Process a @c wxEVT_RADIOBOX command, which is generated by a wxRadioBox control. @event{EVT_RADIOBUTTON(id, func)} - Process a @c wxEVT_COMMAND_RADIOBUTTON_SELECTED command, which is generated by a wxRadioButton control. + Process a @c wxEVT_RADIOBUTTON command, which is generated by a wxRadioButton control. @event{EVT_SCROLLBAR(id, func)} - Process a @c wxEVT_COMMAND_SCROLLBAR_UPDATED command, which is generated by a wxScrollBar + Process a @c wxEVT_SCROLLBAR command, which is generated by a wxScrollBar control. This is provided for compatibility only; more specific scrollbar event macros should be used instead (see wxScrollEvent). @event{EVT_SLIDER(id, func)} - Process a @c wxEVT_COMMAND_SLIDER_UPDATED command, which is generated by a wxSlider control. + Process a @c wxEVT_SLIDER command, which is generated by a wxSlider control. @event{EVT_TEXT(id, func)} - Process a @c wxEVT_COMMAND_TEXT_UPDATED command, which is generated by a wxTextCtrl control. + Process a @c wxEVT_TEXT command, which is generated by a wxTextCtrl control. @event{EVT_TEXT_ENTER(id, func)} - Process a @c wxEVT_COMMAND_TEXT_ENTER command, which is generated by a wxTextCtrl control. + Process a @c wxEVT_TEXT_ENTER command, which is generated by a wxTextCtrl control. Note that you must use wxTE_PROCESS_ENTER flag when creating the control if you want it to generate such events. @event{EVT_TEXT_MAXLEN(id, func)} - Process a @c wxEVT_COMMAND_TEXT_MAXLEN command, which is generated by a wxTextCtrl control + Process a @c wxEVT_TEXT_MAXLEN command, which is generated by a wxTextCtrl control when the user tries to enter more characters into it than the limit previously set with SetMaxLength(). @event{EVT_TOGGLEBUTTON(id, func)} - Process a @c wxEVT_COMMAND_TOGGLEBUTTON_CLICKED event. + Process a @c wxEVT_TOGGLEBUTTON event. @event{EVT_TOOL(id, func)} - Process a @c wxEVT_COMMAND_TOOL_CLICKED event (a synonym for @c wxEVT_COMMAND_MENU_SELECTED). + Process a @c wxEVT_TOOL event (a synonym for @c wxEVT_MENU). Pass the id of the tool. @event{EVT_TOOL_RANGE(id1, id2, func)} - Process a @c wxEVT_COMMAND_TOOL_CLICKED event for a range of identifiers. Pass the ids of the tools. + Process a @c wxEVT_TOOL event for a range of identifiers. Pass the ids of the tools. @event{EVT_TOOL_RCLICKED(id, func)} - Process a @c wxEVT_COMMAND_TOOL_RCLICKED event. Pass the id of the tool. (Not available on wxOSX.) + Process a @c wxEVT_TOOL_RCLICKED event. Pass the id of the tool. (Not available on wxOSX.) @event{EVT_TOOL_RCLICKED_RANGE(id1, id2, func)} - Process a @c wxEVT_COMMAND_TOOL_RCLICKED event for a range of ids. Pass the ids of the tools. (Not available on wxOSX.) + Process a @c wxEVT_TOOL_RCLICKED event for a range of ids. Pass the ids of the tools. (Not available on wxOSX.) @event{EVT_TOOL_ENTER(id, func)} - Process a @c wxEVT_COMMAND_TOOL_ENTER event. Pass the id of the toolbar itself. + Process a @c wxEVT_TOOL_ENTER event. Pass the id of the toolbar itself. The value of wxCommandEvent::GetSelection() is the tool id, or -1 if the mouse cursor has moved off a tool. (Not available on wxOSX.) @event{EVT_COMMAND_LEFT_CLICK(id, func)} @@ -2451,8 +2451,8 @@ public: wxTextCtrl but other windows can generate these events as well) when its content gets copied or cut to, or pasted from the clipboard. - There are three types of corresponding events @c wxEVT_COMMAND_TEXT_COPY, - @c wxEVT_COMMAND_TEXT_CUT and @c wxEVT_COMMAND_TEXT_PASTE. + There are three types of corresponding events @c wxEVT_TEXT_COPY, + @c wxEVT_TEXT_CUT and @c wxEVT_TEXT_PASTE. If any of these events is processed (without being skipped) by an event handler, the corresponding operation doesn't take place which allows to @@ -4405,7 +4405,7 @@ wxEventType wxNewEventType(); This is mostly used by wxWidgets internally, e.g. @code - wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEvent) + wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_BUTTON, wxCommandEvent) @endcode */ #define wxDECLARE_EXPORTED_EVENT( expdecl, name, cls ) \ @@ -4547,24 +4547,24 @@ void wxQueueEvent(wxEvtHandler* dest, wxEvent *event); #if wxUSE_GUI -wxEventType wxEVT_COMMAND_BUTTON_CLICKED; -wxEventType wxEVT_COMMAND_CHECKBOX_CLICKED; -wxEventType wxEVT_COMMAND_CHOICE_SELECTED; -wxEventType wxEVT_COMMAND_LISTBOX_SELECTED; -wxEventType wxEVT_COMMAND_LISTBOX_DOUBLECLICKED; -wxEventType wxEVT_COMMAND_CHECKLISTBOX_TOGGLED; -wxEventType wxEVT_COMMAND_MENU_SELECTED; -wxEventType wxEVT_COMMAND_SLIDER_UPDATED; -wxEventType wxEVT_COMMAND_RADIOBOX_SELECTED; -wxEventType wxEVT_COMMAND_RADIOBUTTON_SELECTED; -wxEventType wxEVT_COMMAND_SCROLLBAR_UPDATED; -wxEventType wxEVT_COMMAND_VLBOX_SELECTED; -wxEventType wxEVT_COMMAND_COMBOBOX_SELECTED; -wxEventType wxEVT_COMMAND_TOOL_RCLICKED; -wxEventType wxEVT_COMMAND_TOOL_DROPDOWN_CLICKED; -wxEventType wxEVT_COMMAND_TOOL_ENTER; -wxEventType wxEVT_COMMAND_COMBOBOX_DROPDOWN; -wxEventType wxEVT_COMMAND_COMBOBOX_CLOSEUP; +wxEventType wxEVT_BUTTON; +wxEventType wxEVT_CHECKBOX; +wxEventType wxEVT_CHOICE; +wxEventType wxEVT_LISTBOX; +wxEventType wxEVT_LISTBOX_DCLICK; +wxEventType wxEVT_CHECKLISTBOX; +wxEventType wxEVT_MENU; +wxEventType wxEVT_SLIDER; +wxEventType wxEVT_RADIOBOX; +wxEventType wxEVT_RADIOBUTTON; +wxEventType wxEVT_SCROLLBAR; +wxEventType wxEVT_VLBOX; +wxEventType wxEVT_COMBOBOX; +wxEventType wxEVT_TOOL_RCLICKED; +wxEventType wxEVT_TOOL_DROPDOWN; +wxEventType wxEVT_TOOL_ENTER; +wxEventType wxEVT_COMBOBOX_DROPDOWN; +wxEventType wxEVT_COMBOBOX_CLOSEUP; wxEventType wxEVT_THREAD; wxEventType wxEVT_LEFT_DOWN; wxEventType wxEVT_LEFT_UP; @@ -4653,9 +4653,9 @@ wxEventType wxEVT_MOVING; wxEventType wxEVT_MOVE_START; wxEventType wxEVT_MOVE_END; wxEventType wxEVT_HIBERNATE; -wxEventType wxEVT_COMMAND_TEXT_COPY; -wxEventType wxEVT_COMMAND_TEXT_CUT; -wxEventType wxEVT_COMMAND_TEXT_PASTE; +wxEventType wxEVT_TEXT_COPY; +wxEventType wxEVT_TEXT_CUT; +wxEventType wxEVT_TEXT_PASTE; wxEventType wxEVT_COMMAND_LEFT_CLICK; wxEventType wxEVT_COMMAND_LEFT_DCLICK; wxEventType wxEVT_COMMAND_RIGHT_CLICK; @@ -4665,7 +4665,7 @@ wxEventType wxEVT_COMMAND_KILL_FOCUS; wxEventType wxEVT_COMMAND_ENTER; wxEventType wxEVT_HELP; wxEventType wxEVT_DETAILED_HELP; -wxEventType wxEVT_COMMAND_TOOL_CLICKED; +wxEventType wxEVT_TOOL; wxEventType wxEVT_WINDOW_MODAL_DIALOG_CLOSED; #endif // wxUSE_GUI diff --git a/interface/wx/fdrepdlg.h b/interface/wx/fdrepdlg.h index fa9d16c4ac..3999cac248 100644 --- a/interface/wx/fdrepdlg.h +++ b/interface/wx/fdrepdlg.h @@ -95,11 +95,11 @@ public: const wxString& GetReplaceString() const; }; -wxEventType wxEVT_COMMAND_FIND; -wxEventType wxEVT_COMMAND_FIND_NEXT; -wxEventType wxEVT_COMMAND_FIND_REPLACE; -wxEventType wxEVT_COMMAND_FIND_REPLACE_ALL; -wxEventType wxEVT_COMMAND_FIND_CLOSE; +wxEventType wxEVT_FIND; +wxEventType wxEVT_FIND_NEXT; +wxEventType wxEVT_FIND_REPLACE; +wxEventType wxEVT_FIND_REPLACE_ALL; +wxEventType wxEVT_FIND_CLOSE; diff --git a/interface/wx/filepicker.h b/interface/wx/filepicker.h index ac57732ed8..de2f816fa3 100644 --- a/interface/wx/filepicker.h +++ b/interface/wx/filepicker.h @@ -21,8 +21,8 @@ #define wxDIRP_USE_TEXTCTRL (wxPB_USE_TEXTCTRL) #define wxDIRP_DEFAULT_STYLE (wxDIRP_DIR_MUST_EXIST) -wxEventType wxEVT_COMMAND_FILEPICKER_CHANGED; -wxEventType wxEVT_COMMAND_DIRPICKER_CHANGED; +wxEventType wxEVT_FILEPICKER_CHANGED; +wxEventType wxEVT_DIRPICKER_CHANGED; /** diff --git a/interface/wx/fontpicker.h b/interface/wx/fontpicker.h index 664331b02e..b0db89b181 100644 --- a/interface/wx/fontpicker.h +++ b/interface/wx/fontpicker.h @@ -13,7 +13,7 @@ #define wxFNTP_USE_TEXTCTRL (wxPB_USE_TEXTCTRL) #define wxFNTP_DEFAULT_STYLE (wxFNTP_FONTDESC_AS_LABEL|wxFNTP_USEFONT_FOR_LABEL) -wxEventType wxEVT_COMMAND_FONTPICKER_CHANGED; +wxEventType wxEVT_FONTPICKER_CHANGED; /** diff --git a/interface/wx/headerctrl.h b/interface/wx/headerctrl.h index 0edeb4ba24..0903bd6049 100644 --- a/interface/wx/headerctrl.h +++ b/interface/wx/headerctrl.h @@ -708,16 +708,16 @@ public: -wxEventType wxEVT_COMMAND_HEADER_CLICK; -wxEventType wxEVT_COMMAND_HEADER_RIGHT_CLICK; -wxEventType wxEVT_COMMAND_HEADER_MIDDLE_CLICK; -wxEventType wxEVT_COMMAND_HEADER_DCLICK; -wxEventType wxEVT_COMMAND_HEADER_RIGHT_DCLICK; -wxEventType wxEVT_COMMAND_HEADER_MIDDLE_DCLICK; -wxEventType wxEVT_COMMAND_HEADER_SEPARATOR_DCLICK; -wxEventType wxEVT_COMMAND_HEADER_BEGIN_RESIZE; -wxEventType wxEVT_COMMAND_HEADER_RESIZING; -wxEventType wxEVT_COMMAND_HEADER_END_RESIZE; -wxEventType wxEVT_COMMAND_HEADER_BEGIN_REORDER; -wxEventType wxEVT_COMMAND_HEADER_END_REORDER; -wxEventType wxEVT_COMMAND_HEADER_DRAGGING_CANCELLED; +wxEventType wxEVT_HEADER_CLICK; +wxEventType wxEVT_HEADER_RIGHT_CLICK; +wxEventType wxEVT_HEADER_MIDDLE_CLICK; +wxEventType wxEVT_HEADER_DCLICK; +wxEventType wxEVT_HEADER_RIGHT_DCLICK; +wxEventType wxEVT_HEADER_MIDDLE_DCLICK; +wxEventType wxEVT_HEADER_SEPARATOR_DCLICK; +wxEventType wxEVT_HEADER_BEGIN_RESIZE; +wxEventType wxEVT_HEADER_RESIZING; +wxEventType wxEVT_HEADER_END_RESIZE; +wxEventType wxEVT_HEADER_BEGIN_REORDER; +wxEventType wxEVT_HEADER_END_REORDER; +wxEventType wxEVT_HEADER_DRAGGING_CANCELLED; diff --git a/interface/wx/html/htmlwin.h b/interface/wx/html/htmlwin.h index 4b6d970e64..0c1b5c597f 100644 --- a/interface/wx/html/htmlwin.h +++ b/interface/wx/html/htmlwin.h @@ -511,9 +511,9 @@ protected: -wxEventType wxEVT_COMMAND_HTML_CELL_CLICKED; -wxEventType wxEVT_COMMAND_HTML_CELL_HOVER; -wxEventType wxEVT_COMMAND_HTML_LINK_CLICKED; +wxEventType wxEVT_HTML_CELL_CLICKED; +wxEventType wxEVT_HTML_CELL_HOVER; +wxEventType wxEVT_HTML_LINK_CLICKED; /** diff --git a/interface/wx/htmllbox.h b/interface/wx/htmllbox.h index b013e11446..7202313423 100644 --- a/interface/wx/htmllbox.h +++ b/interface/wx/htmllbox.h @@ -182,10 +182,10 @@ protected: @beginEventEmissionTable @event{EVT_LISTBOX(id, func)} - Process a @c wxEVT_COMMAND_LISTBOX_SELECTED event, when an item on the list + Process a @c wxEVT_LISTBOX event, when an item on the list is selected. See wxCommandEvent. @event{EVT_LISTBOX_DCLICK(id, func)} - Process a @c wxEVT_COMMAND_LISTBOX_DOUBLECLICKED event, when the listbox is + Process a @c wxEVT_LISTBOX_DCLICK event, when the listbox is double-clicked. See wxCommandEvent. @event{EVT_HTML_CELL_CLICKED(id, func)} A wxHtmlCell was clicked. See wxHtmlCellEvent. diff --git a/interface/wx/hyperlink.h b/interface/wx/hyperlink.h index 43ece1b659..633f27d842 100644 --- a/interface/wx/hyperlink.h +++ b/interface/wx/hyperlink.h @@ -45,7 +45,7 @@ public: }; -wxEventType wxEVT_COMMAND_HYPERLINK; +wxEventType wxEVT_HYPERLINK; /** @class wxHyperlinkCtrl diff --git a/interface/wx/listbook.h b/interface/wx/listbook.h index 5219482fed..860bf93236 100644 --- a/interface/wx/listbook.h +++ b/interface/wx/listbook.h @@ -14,8 +14,8 @@ #define wxLB_RIGHT wxBK_RIGHT #define wxLB_ALIGN_MASK wxBK_ALIGN_MASK -wxEventType wxEVT_COMMAND_LISTBOOK_PAGE_CHANGED; -wxEventType wxEVT_COMMAND_LISTBOOK_PAGE_CHANGING; +wxEventType wxEVT_LISTBOOK_PAGE_CHANGED; +wxEventType wxEVT_LISTBOOK_PAGE_CHANGING; /** @class wxListbook @@ -48,10 +48,10 @@ wxEventType wxEVT_COMMAND_LISTBOOK_PAGE_CHANGING; @beginEventEmissionTable{wxBookCtrlEvent} @event{EVT_LISTBOOK_PAGE_CHANGED(id, func)} The page selection was changed. - Processes a @c wxEVT_COMMAND_LISTBOOK_PAGE_CHANGED event. + Processes a @c wxEVT_LISTBOOK_PAGE_CHANGED event. @event{EVT_LISTBOOK_PAGE_CHANGING(id, func)} The page selection is about to be changed. - Processes a @c wxEVT_COMMAND_LISTBOOK_PAGE_CHANGING event. + Processes a @c wxEVT_LISTBOOK_PAGE_CHANGING event. This event can be vetoed. @endEventTable diff --git a/interface/wx/listbox.h b/interface/wx/listbox.h index 538223e6f4..4f559e706f 100644 --- a/interface/wx/listbox.h +++ b/interface/wx/listbox.h @@ -58,10 +58,10 @@ @beginEventEmissionTable{wxCommandEvent} @event{EVT_LISTBOX(id, func)} - Process a @c wxEVT_COMMAND_LISTBOX_SELECTED event, when an item on the + Process a @c wxEVT_LISTBOX event, when an item on the list is selected or the selection changes. @event{EVT_LISTBOX_DCLICK(id, func)} - Process a @c wxEVT_COMMAND_LISTBOX_DOUBLECLICKED event, when the listbox + Process a @c wxEVT_LISTBOX_DCLICK event, when the listbox is double-clicked. @endEventTable diff --git a/interface/wx/listctrl.h b/interface/wx/listctrl.h index 5b955e12c4..9ad91f4590 100644 --- a/interface/wx/listctrl.h +++ b/interface/wx/listctrl.h @@ -203,65 +203,65 @@ enum @beginEventEmissionTable{wxListEvent} @event{EVT_LIST_BEGIN_DRAG(id, func)} Begin dragging with the left mouse button. - Processes a @c wxEVT_COMMAND_LIST_BEGIN_DRAG event type. + Processes a @c wxEVT_LIST_BEGIN_DRAG event type. @event{EVT_LIST_BEGIN_RDRAG(id, func)} Begin dragging with the right mouse button. - Processes a @c wxEVT_COMMAND_LIST_BEGIN_RDRAG event type. + Processes a @c wxEVT_LIST_BEGIN_RDRAG event type. @event{EVT_BEGIN_LABEL_EDIT(id, func)} Begin editing a label. This can be prevented by calling Veto(). - Processes a @c wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT event type. + Processes a @c wxEVT_LIST_BEGIN_LABEL_EDIT event type. @event{EVT_LIST_END_LABEL_EDIT(id, func)} Finish editing a label. This can be prevented by calling Veto(). - Processes a @c wxEVT_COMMAND_LIST_END_LABEL_EDIT event type. + Processes a @c wxEVT_LIST_END_LABEL_EDIT event type. @event{EVT_LIST_DELETE_ITEM(id, func)} An item was deleted. - Processes a @c wxEVT_COMMAND_LIST_DELETE_ITEM event type. + Processes a @c wxEVT_LIST_DELETE_ITEM event type. @event{EVT_LIST_DELETE_ALL_ITEMS(id, func)} All items were deleted. - Processes a @c wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS event type. + Processes a @c wxEVT_LIST_DELETE_ALL_ITEMS event type. @event{EVT_LIST_ITEM_SELECTED(id, func)} The item has been selected. - Processes a @c wxEVT_COMMAND_LIST_ITEM_SELECTED event type. + Processes a @c wxEVT_LIST_ITEM_SELECTED event type. @event{EVT_LIST_ITEM_DESELECTED(id, func)} The item has been deselected. - Processes a @c wxEVT_COMMAND_LIST_ITEM_DESELECTED event type. + Processes a @c wxEVT_LIST_ITEM_DESELECTED event type. @event{EVT_LIST_ITEM_ACTIVATED(id, func)} The item has been activated (ENTER or double click). - Processes a @c wxEVT_COMMAND_LIST_ITEM_ACTIVATED event type. + Processes a @c wxEVT_LIST_ITEM_ACTIVATED event type. @event{EVT_LIST_ITEM_FOCUSED(id, func)} The currently focused item has changed. - Processes a @c wxEVT_COMMAND_LIST_ITEM_FOCUSED event type. + Processes a @c wxEVT_LIST_ITEM_FOCUSED event type. @event{EVT_LIST_ITEM_MIDDLE_CLICK(id, func)} The middle mouse button has been clicked on an item. This is only supported by the generic control. - Processes a @c wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK event type. + Processes a @c wxEVT_LIST_ITEM_MIDDLE_CLICK event type. @event{EVT_LIST_ITEM_RIGHT_CLICK(id, func)} The right mouse button has been clicked on an item. - Processes a @c wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK event type. + Processes a @c wxEVT_LIST_ITEM_RIGHT_CLICK event type. @event{EVT_LIST_KEY_DOWN(id, func)} A key has been pressed. - Processes a @c wxEVT_COMMAND_LIST_KEY_DOWN event type. + Processes a @c wxEVT_LIST_KEY_DOWN event type. @event{EVT_LIST_INSERT_ITEM(id, func)} An item has been inserted. - Processes a @c wxEVT_COMMAND_LIST_INSERT_ITEM event type. + Processes a @c wxEVT_LIST_INSERT_ITEM event type. @event{EVT_LIST_COL_CLICK(id, func)} A column (m_col) has been left-clicked. - Processes a @c wxEVT_COMMAND_LIST_COL_CLICK event type. + Processes a @c wxEVT_LIST_COL_CLICK event type. @event{EVT_LIST_COL_RIGHT_CLICK(id, func)} A column (m_col) has been right-clicked. - Processes a @c wxEVT_COMMAND_LIST_COL_RIGHT_CLICK event type. + Processes a @c wxEVT_LIST_COL_RIGHT_CLICK event type. @event{EVT_LIST_COL_BEGIN_DRAG(id, func)} The user started resizing a column - can be vetoed. - Processes a @c wxEVT_COMMAND_LIST_COL_BEGIN_DRAG event type. + Processes a @c wxEVT_LIST_COL_BEGIN_DRAG event type. @event{EVT_LIST_COL_DRAGGING(id, func)} The divider between columns is being dragged. - Processes a @c wxEVT_COMMAND_LIST_COL_DRAGGING event type. + Processes a @c wxEVT_LIST_COL_DRAGGING event type. @event{EVT_LIST_COL_END_DRAG(id, func)} A column has been resized by the user. - Processes a @c wxEVT_COMMAND_LIST_COL_END_DRAG event type. + Processes a @c wxEVT_LIST_COL_END_DRAG event type. @event{EVT_LIST_CACHE_HINT(id, func)} Prepare cache for a virtual list control. - Processes a @c wxEVT_COMMAND_LIST_CACHE_HINT event type. + Processes a @c wxEVT_LIST_CACHE_HINT event type. @endEventTable @@ -350,7 +350,7 @@ public: /** Deletes all items and all columns. - @note This sends an event of type @c wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS + @note This sends an event of type @c wxEVT_LIST_DELETE_ALL_ITEMS under all platforms. */ void ClearAll(); @@ -368,10 +368,10 @@ public: /** Deletes all items in the list control. - This function does @e not send the @c wxEVT_COMMAND_LIST_DELETE_ITEM + This function does @e not send the @c wxEVT_LIST_DELETE_ITEM event because deleting many items from the control would be too slow then (unlike wxListCtrl::DeleteItem) but it does send the special @c - wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS event if the control was not empty. + wxEVT_LIST_DELETE_ALL_ITEMS event if the control was not empty. If it was already empty, nothing is done and no event is sent. @return @true if the items were successfully deleted or if the control @@ -387,7 +387,7 @@ public: /** Deletes the specified item. - This function sends the @c wxEVT_COMMAND_LIST_DELETE_ITEM event for the + This function sends the @c wxEVT_LIST_DELETE_ITEM event for the item being deleted. @see DeleteAllItems() @@ -1426,26 +1426,26 @@ public: }; -wxEventType wxEVT_COMMAND_LIST_BEGIN_DRAG; -wxEventType wxEVT_COMMAND_LIST_BEGIN_RDRAG; -wxEventType wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT; -wxEventType wxEVT_COMMAND_LIST_END_LABEL_EDIT; -wxEventType wxEVT_COMMAND_LIST_DELETE_ITEM; -wxEventType wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS; -wxEventType wxEVT_COMMAND_LIST_ITEM_SELECTED; -wxEventType wxEVT_COMMAND_LIST_ITEM_DESELECTED; -wxEventType wxEVT_COMMAND_LIST_KEY_DOWN; -wxEventType wxEVT_COMMAND_LIST_INSERT_ITEM; -wxEventType wxEVT_COMMAND_LIST_COL_CLICK; -wxEventType wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK; -wxEventType wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK; -wxEventType wxEVT_COMMAND_LIST_ITEM_ACTIVATED; -wxEventType wxEVT_COMMAND_LIST_CACHE_HINT; -wxEventType wxEVT_COMMAND_LIST_COL_RIGHT_CLICK; -wxEventType wxEVT_COMMAND_LIST_COL_BEGIN_DRAG; -wxEventType wxEVT_COMMAND_LIST_COL_DRAGGING; -wxEventType wxEVT_COMMAND_LIST_COL_END_DRAG; -wxEventType wxEVT_COMMAND_LIST_ITEM_FOCUSED; +wxEventType wxEVT_LIST_BEGIN_DRAG; +wxEventType wxEVT_LIST_BEGIN_RDRAG; +wxEventType wxEVT_LIST_BEGIN_LABEL_EDIT; +wxEventType wxEVT_LIST_END_LABEL_EDIT; +wxEventType wxEVT_LIST_DELETE_ITEM; +wxEventType wxEVT_LIST_DELETE_ALL_ITEMS; +wxEventType wxEVT_LIST_ITEM_SELECTED; +wxEventType wxEVT_LIST_ITEM_DESELECTED; +wxEventType wxEVT_LIST_KEY_DOWN; +wxEventType wxEVT_LIST_INSERT_ITEM; +wxEventType wxEVT_LIST_COL_CLICK; +wxEventType wxEVT_LIST_ITEM_RIGHT_CLICK; +wxEventType wxEVT_LIST_ITEM_MIDDLE_CLICK; +wxEventType wxEVT_LIST_ITEM_ACTIVATED; +wxEventType wxEVT_LIST_CACHE_HINT; +wxEventType wxEVT_LIST_COL_RIGHT_CLICK; +wxEventType wxEVT_LIST_COL_BEGIN_DRAG; +wxEventType wxEVT_LIST_COL_DRAGGING; +wxEventType wxEVT_LIST_COL_END_DRAG; +wxEventType wxEVT_LIST_ITEM_FOCUSED; /** diff --git a/interface/wx/menu.h b/interface/wx/menu.h index 5dedfe9290..a6b5cbe0d9 100644 --- a/interface/wx/menu.h +++ b/interface/wx/menu.h @@ -474,7 +474,7 @@ public: If the menu is part of a menubar, then wxMenuBar event processing is used. With a popup menu (see wxWindow::PopupMenu), there is a variety of ways to - handle a menu selection event (@c wxEVT_COMMAND_MENU_SELECTED): + handle a menu selection event (@c wxEVT_MENU): - Provide @c EVT_MENU handlers in the window which pops up the menu, or in an ancestor of that window (the simplest method); - Derive a new class from wxMenu and define event table entries using the @c EVT_MENU macro; diff --git a/interface/wx/menuitem.h b/interface/wx/menuitem.h index 6b103a3c1a..d659f74801 100644 --- a/interface/wx/menuitem.h +++ b/interface/wx/menuitem.h @@ -19,10 +19,10 @@ @beginEventEmissionTable{wxCommandEvent,wxMenuEvent} @event{EVT_MENU(id, func)} - Process a @c wxEVT_COMMAND_MENU_SELECTED command, which is generated by a menu item. + Process a @c wxEVT_MENU command, which is generated by a menu item. This type of event is sent as wxCommandEvent. @event{EVT_MENU_RANGE(id1, id2, func)} - Process a @c wxEVT_COMMAND_MENU_RANGE command, which is generated by a range of menu items. + Process a @c wxEVT_MENU command, which is generated by a range of menu items. This type of event is sent as wxCommandEvent. @event{EVT_MENU_OPEN(func)} A menu is about to be opened. On Windows, this is only sent once for each diff --git a/interface/wx/notebook.h b/interface/wx/notebook.h index 9abb37ba47..0202a7596c 100644 --- a/interface/wx/notebook.h +++ b/interface/wx/notebook.h @@ -26,8 +26,8 @@ enum #define wxNB_NOPAGETHEME 0x0400 #define wxNB_FLAT 0x0800 -wxEventType wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED; -wxEventType wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING; +wxEventType wxEVT_NOTEBOOK_PAGE_CHANGED; +wxEventType wxEVT_NOTEBOOK_PAGE_CHANGING; /** @@ -69,10 +69,10 @@ wxEventType wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING; @beginEventEmissionTable{wxBookCtrlEvent} @event{EVT_NOTEBOOK_PAGE_CHANGED(id, func)} The page selection was changed. - Processes a @c wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED event. + Processes a @c wxEVT_NOTEBOOK_PAGE_CHANGED event. @event{EVT_NOTEBOOK_PAGE_CHANGING(id, func)} The page selection is about to be changed. - Processes a @c wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING event. + Processes a @c wxEVT_NOTEBOOK_PAGE_CHANGING event. This event can be vetoed. @endEventTable diff --git a/interface/wx/odcombo.h b/interface/wx/odcombo.h index abd24fc6b6..0e639178c5 100644 --- a/interface/wx/odcombo.h +++ b/interface/wx/odcombo.h @@ -68,7 +68,7 @@ enum @beginEventEmissionTable{wxCommandEvent} @event{EVT_COMBOBOX(id, func)} - Process a wxEVT_COMMAND_COMBOBOX_SELECTED event, when an item on + Process a wxEVT_COMBOBOX event, when an item on the list is selected. Note that calling GetValue() returns the new value of selection. @endEventTable diff --git a/interface/wx/propgrid/editors.h b/interface/wx/propgrid/editors.h index 8f563a05d7..835b0b94e7 100644 --- a/interface/wx/propgrid/editors.h +++ b/interface/wx/propgrid/editors.h @@ -94,7 +94,7 @@ public: (see wxPGProperty::OnEvent() for more information). @remarks wxPropertyGrid will automatically unfocus the editor when - @c wxEVT_COMMAND_TEXT_ENTER is received and when it results in + @c wxEVT_TEXT_ENTER is received and when it results in property value being modified. This happens regardless of editor type (ie. behaviour is same for any wxTextCtrl and wxComboBox based editor). @@ -236,7 +236,7 @@ public: wxWindow* ctrl, wxEvent& event ) const { - if ( event.GetEventType() == wxEVT_COMMAND_BUTTON_CLICKED ) + if ( event.GetEventType() == wxEVT_BUTTON ) { wxPGMultiButton* buttons = (wxPGMultiButton*) propGrid->GetEditorControlSecondary(); diff --git a/interface/wx/propgrid/property.h b/interface/wx/propgrid/property.h index b3a77c6965..506bfaa942 100644 --- a/interface/wx/propgrid/property.h +++ b/interface/wx/propgrid/property.h @@ -869,7 +869,7 @@ public: usually processes most events. Some, such as button press events of TextCtrlAndButton class, can be handled here. Also, if custom handling for regular events is desired, then that can also be done (for example, - wxSystemColourProperty custom handles @c wxEVT_COMMAND_CHOICE_SELECTED + wxSystemColourProperty custom handles @c wxEVT_CHOICE to display colour picker dialog when 'custom' selection is made). If the event causes value to be changed, SetValueInEvent() should be called diff --git a/interface/wx/radiobox.h b/interface/wx/radiobox.h index d588c3a9c5..fe5f106f6d 100644 --- a/interface/wx/radiobox.h +++ b/interface/wx/radiobox.h @@ -23,7 +23,7 @@ @beginEventEmissionTable{wxCommandEvent} @event{EVT_RADIOBOX(id, func)} - Process a @c wxEVT_COMMAND_RADIOBOX_SELECTED event, when a radiobutton + Process a @c wxEVT_RADIOBOX event, when a radiobutton is clicked. @endEventTable diff --git a/interface/wx/radiobut.h b/interface/wx/radiobut.h index 1c8b839b18..36be096fa6 100644 --- a/interface/wx/radiobut.h +++ b/interface/wx/radiobut.h @@ -29,7 +29,7 @@ @beginEventEmissionTable{wxCommandEvent} @event{EVT_RADIOBUTTON(id, func)} - Process a @c wxEVT_COMMAND_RADIOBUTTON_SELECTED event, when the + Process a @c wxEVT_RADIOBUTTON event, when the radiobutton is clicked. @endEventTable @@ -103,7 +103,7 @@ public: /** Sets the radio button to checked or unchecked status. This does not cause a - @c wxEVT_COMMAND_RADIOBUTTON_SELECTED event to get emitted. + @c wxEVT_RADIOBUTTON event to get emitted. If the radio button belongs to a radio group exactly one button in the group may be checked and so this method can be only called with @a diff --git a/interface/wx/richtext/richtextctrl.h b/interface/wx/richtext/richtextctrl.h index 34d7c76e24..f5125810dd 100644 --- a/interface/wx/richtext/richtextctrl.h +++ b/interface/wx/richtext/richtextctrl.h @@ -167,8 +167,8 @@ public: wxRichTextCtrl sends notification events: see wxRichTextEvent. - It also sends the standard wxTextCtrl events @c wxEVT_COMMAND_TEXT_ENTER and - @c wxEVT_COMMAND_TEXT_UPDATED, and wxTextUrlEvent when URL content is clicked. + It also sends the standard wxTextCtrl events @c wxEVT_TEXT_ENTER and + @c wxEVT_TEXT, and wxTextUrlEvent when URL content is clicked. For more information, see the @ref overview_richtextctrl. @@ -2265,66 +2265,66 @@ protected: @beginEventTable{wxRichTextEvent} @event{EVT_RICHTEXT_LEFT_CLICK(id, func)} - Process a @c wxEVT_COMMAND_RICHTEXT_LEFT_CLICK event, generated when the user + Process a @c wxEVT_RICHTEXT_LEFT_CLICK event, generated when the user releases the left mouse button over an object. @event{EVT_RICHTEXT_RIGHT_CLICK(id, func)} - Process a @c wxEVT_COMMAND_RICHTEXT_RIGHT_CLICK event, generated when the user + Process a @c wxEVT_RICHTEXT_RIGHT_CLICK event, generated when the user releases the right mouse button over an object. @event{EVT_RICHTEXT_MIDDLE_CLICK(id, func)} - Process a @c wxEVT_COMMAND_RICHTEXT_MIDDLE_CLICK event, generated when the user + Process a @c wxEVT_RICHTEXT_MIDDLE_CLICK event, generated when the user releases the middle mouse button over an object. @event{EVT_RICHTEXT_LEFT_DCLICK(id, func)} - Process a @c wxEVT_COMMAND_RICHTEXT_LEFT_DCLICK event, generated when the user + Process a @c wxEVT_RICHTEXT_LEFT_DCLICK event, generated when the user double-clicks an object. @event{EVT_RICHTEXT_RETURN(id, func)} - Process a @c wxEVT_COMMAND_RICHTEXT_RETURN event, generated when the user + Process a @c wxEVT_RICHTEXT_RETURN event, generated when the user presses the return key. Valid event functions: GetFlags, GetPosition. @event{EVT_RICHTEXT_CHARACTER(id, func)} - Process a @c wxEVT_COMMAND_RICHTEXT_CHARACTER event, generated when the user + Process a @c wxEVT_RICHTEXT_CHARACTER event, generated when the user presses a character key. Valid event functions: GetFlags, GetPosition, GetCharacter. @event{EVT_RICHTEXT_DELETE(id, func)} - Process a @c wxEVT_COMMAND_RICHTEXT_DELETE event, generated when the user + Process a @c wxEVT_RICHTEXT_DELETE event, generated when the user presses the backspace or delete key. Valid event functions: GetFlags, GetPosition. @event{EVT_RICHTEXT_RETURN(id, func)} - Process a @c wxEVT_COMMAND_RICHTEXT_RETURN event, generated when the user + Process a @c wxEVT_RICHTEXT_RETURN event, generated when the user presses the return key. Valid event functions: GetFlags, GetPosition. @event{EVT_RICHTEXT_STYLE_CHANGED(id, func)} - Process a @c wxEVT_COMMAND_RICHTEXT_STYLE_CHANGED event, generated when + Process a @c wxEVT_RICHTEXT_STYLE_CHANGED event, generated when styling has been applied to the control. Valid event functions: GetPosition, GetRange. @event{EVT_RICHTEXT_STYLESHEET_CHANGED(id, func)} - Process a @c wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGING event, generated + Process a @c wxEVT_RICHTEXT_STYLESHEET_CHANGING event, generated when the control's stylesheet has changed, for example the user added, edited or deleted a style. Valid event functions: GetRange, GetPosition. @event{EVT_RICHTEXT_STYLESHEET_REPLACING(id, func)} - Process a @c wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACING event, generated + Process a @c wxEVT_RICHTEXT_STYLESHEET_REPLACING event, generated when the control's stylesheet is about to be replaced, for example when a file is loaded into the control. Valid event functions: Veto, GetOldStyleSheet, GetNewStyleSheet. @event{EVT_RICHTEXT_STYLESHEET_REPLACED(id, func)} - Process a @c wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACED event, generated + Process a @c wxEVT_RICHTEXT_STYLESHEET_REPLACED event, generated when the control's stylesheet has been replaced, for example when a file is loaded into the control. Valid event functions: GetOldStyleSheet, GetNewStyleSheet. @event{EVT_RICHTEXT_PROPERTIES_CHANGED(id, func)} - Process a @c wxEVT_COMMAND_RICHTEXT_PROPERTIES_CHANGED event, generated when + Process a @c wxEVT_RICHTEXT_PROPERTIES_CHANGED event, generated when properties have been applied to the control. Valid event functions: GetPosition, GetRange. @event{EVT_RICHTEXT_CONTENT_INSERTED(id, func)} - Process a @c wxEVT_COMMAND_RICHTEXT_CONTENT_INSERTED event, generated when + Process a @c wxEVT_RICHTEXT_CONTENT_INSERTED event, generated when content has been inserted into the control. Valid event functions: GetPosition, GetRange. @event{EVT_RICHTEXT_CONTENT_DELETED(id, func)} - Process a @c wxEVT_COMMAND_RICHTEXT_CONTENT_DELETED event, generated when + Process a @c wxEVT_RICHTEXT_CONTENT_DELETED event, generated when content has been deleted from the control. Valid event functions: GetPosition, GetRange. @event{EVT_RICHTEXT_BUFFER_RESET(id, func)} - Process a @c wxEVT_COMMAND_RICHTEXT_BUFFER_RESET event, generated when the + Process a @c wxEVT_RICHTEXT_BUFFER_RESET event, generated when the buffer has been reset by deleting all content. You can use this to set a default style for the first new paragraph. @event{EVT_RICHTEXT_SELECTION_CHANGED(id, func)} - Process a @c wxEVT_COMMAND_RICHTEXT_SELECTION_CHANGED event, generated when the + Process a @c wxEVT_RICHTEXT_SELECTION_CHANGED event, generated when the selection range has changed. @event{EVT_RICHTEXT_FOCUS_OBJECT_CHANGED(id, func)} - Process a @c wxEVT_COMMAND_RICHTEXT_FOCUS_OBJECT_CHANGED event, generated when the + Process a @c wxEVT_RICHTEXT_FOCUS_OBJECT_CHANGED event, generated when the current focus object has changed. @endEventTable @@ -2386,8 +2386,8 @@ public: /** Returns the old style sheet. - Can be used in a @c wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGING or - @c wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGED event handler. + Can be used in a @c wxEVT_RICHTEXT_STYLESHEET_CHANGING or + @c wxEVT_RICHTEXT_STYLESHEET_CHANGED event handler. */ wxRichTextStyleSheet* GetOldStyleSheet() const { return m_oldStyleSheet; } @@ -2399,8 +2399,8 @@ public: /** Returns the new style sheet. - Can be used in a @c wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGING or - @c wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGED event handler. + Can be used in a @c wxEVT_RICHTEXT_STYLESHEET_CHANGING or + @c wxEVT_RICHTEXT_STYLESHEET_CHANGED event handler. */ wxRichTextStyleSheet* GetNewStyleSheet() const { return m_newStyleSheet; } @@ -2420,7 +2420,7 @@ public: void SetRange(const wxRichTextRange& range) { m_range = range; } /** - Returns the character pressed, within a @c wxEVT_COMMAND_RICHTEXT_CHARACTER event. + Returns the character pressed, within a @c wxEVT_RICHTEXT_CHARACTER event. */ wxChar GetCharacter() const { return m_char; } diff --git a/interface/wx/simplebook.h b/interface/wx/simplebook.h index 2fe9c5f67c..7291c129d6 100644 --- a/interface/wx/simplebook.h +++ b/interface/wx/simplebook.h @@ -27,8 +27,8 @@ appearance of its own. There are also no special events, this class reuses - @c wxEVT_COMMAND_BOOKCTRL_PAGE_CHANGING and @c - wxEVT_COMMAND_BOOKCTRL_PAGE_CHANGED events for the events it generates if + @c wxEVT_BOOKCTRL_PAGE_CHANGING and @c + wxEVT_BOOKCTRL_PAGE_CHANGED events for the events it generates if the program calls SetSelection(). @library{none} diff --git a/interface/wx/slider.h b/interface/wx/slider.h index 761b459905..eaf88adb7e 100644 --- a/interface/wx/slider.h +++ b/interface/wx/slider.h @@ -117,7 +117,7 @@ @event{EVT_COMMAND_SCROLL_CHANGED(func)} Process @c wxEVT_SCROLL_CHANGED end of scrolling events (MSW only). @event{EVT_SLIDER(id, func)} - Process @c wxEVT_COMMAND_SLIDER_UPDATED which is generated after any + Process @c wxEVT_SLIDER which is generated after any change of wxSlider position in addition to one of the events above. @endEventTable diff --git a/interface/wx/spinctrl.h b/interface/wx/spinctrl.h index 2889f63480..c254407445 100644 --- a/interface/wx/spinctrl.h +++ b/interface/wx/spinctrl.h @@ -17,7 +17,7 @@ @style{wxSP_WRAP} The value wraps at the minimum and maximum. @style{wxTE_PROCESS_ENTER} - Indicates that the control should generate @c wxEVT_COMMAND_TEXT_ENTER + Indicates that the control should generate @c wxEVT_TEXT_ENTER events. Using this style will prevent the user from using the Enter key for dialog navigation (e.g. activating the default button in the dialog) under MSW. @@ -33,7 +33,7 @@ @beginEventEmissionTable{wxSpinEvent} @event{EVT_SPINCTRL(id, func)} - Process a wxEVT_COMMAND_SPINCTRL_UPDATED event, which is generated + Process a wxEVT_SPINCTRL event, which is generated whenever the numeric value of the spin control is updated. @endEventTable @@ -164,7 +164,7 @@ public: Notice that calling this method may change the value of the control if it's not inside the new valid range, e.g. it will become @a minVal if - it is less than it now. However no @c wxEVT_COMMAND_SPINCTRL_UPDATED + it is less than it now. However no @c wxEVT_SPINCTRL event is generated, even if it the value does change. */ void SetRange(int minVal, int maxVal); @@ -373,5 +373,5 @@ public: void SetValue(double value); }; -wxEventType wxEVT_COMMAND_SPINCTRL_UPDATED; -wxEventType wxEVT_COMMAND_SPINCTRLDOUBLE_UPDATED; +wxEventType wxEVT_SPINCTRL; +wxEventType wxEVT_SPINCTRLDOUBLE; diff --git a/interface/wx/splitter.h b/interface/wx/splitter.h index 0338f0a4ff..2c74ab511a 100644 --- a/interface/wx/splitter.h +++ b/interface/wx/splitter.h @@ -68,17 +68,17 @@ enum The sash position is in the process of being changed. May be used to modify the position of the tracking bar to properly reflect the position that would be set if the drag were to be completed - at this point. Processes a @c wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING event. + at this point. Processes a @c wxEVT_SPLITTER_SASH_POS_CHANGING event. @event{EVT_SPLITTER_SASH_POS_CHANGED(id, func)} The sash position was changed. May be used to modify the sash position before it is set, or to prevent the change from taking place. - Processes a @c wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED event. + Processes a @c wxEVT_SPLITTER_SASH_POS_CHANGED event. @event{EVT_SPLITTER_UNSPLIT(id, func)} - The splitter has been just unsplit. Processes a @c wxEVT_COMMAND_SPLITTER_UNSPLIT event. + The splitter has been just unsplit. Processes a @c wxEVT_SPLITTER_UNSPLIT event. @event{EVT_SPLITTER_DCLICK(id, func)} The sash was double clicked. The default behaviour is to unsplit the window when this happens (unless the minimum pane size has been set - to a value greater than zero). Processes a @c wxEVT_COMMAND_SPLITTER_DOUBLECLICKED event. + to a value greater than zero). Processes a @c wxEVT_SPLITTER_DOUBLECLICKED event. @endEventTable @@ -475,17 +475,17 @@ public: The sash position is in the process of being changed. May be used to modify the position of the tracking bar to properly reflect the position that would be set if the drag were to be completed - at this point. Processes a @c wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING event. + at this point. Processes a @c wxEVT_SPLITTER_SASH_POS_CHANGING event. @event{EVT_SPLITTER_SASH_POS_CHANGED(id, func)} The sash position was changed. May be used to modify the sash position before it is set, or to prevent the change from taking place. - Processes a @c wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED event. + Processes a @c wxEVT_SPLITTER_SASH_POS_CHANGED event. @event{EVT_SPLITTER_UNSPLIT(id, func)} - The splitter has been just unsplit. Processes a @c wxEVT_COMMAND_SPLITTER_UNSPLIT event. + The splitter has been just unsplit. Processes a @c wxEVT_SPLITTER_UNSPLIT event. @event{EVT_SPLITTER_DCLICK(id, func)} The sash was double clicked. The default behaviour is to unsplit the window when this happens (unless the minimum pane size has been set - to a value greater than zero). Processes a @c wxEVT_COMMAND_SPLITTER_DOUBLECLICKED event. + to a value greater than zero). Processes a @c wxEVT_SPLITTER_DOUBLECLICKED event. @endEventTable @library{wxcore} @@ -506,8 +506,8 @@ public: Returns the new sash position. May only be called while processing - @c wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING and - @c wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED events. + @c wxEVT_SPLITTER_SASH_POS_CHANGING and + @c wxEVT_SPLITTER_SASH_POS_CHANGED events. */ int GetSashPosition() const; @@ -516,7 +516,7 @@ public: is unsplit. May only be called while processing - @c wxEVT_COMMAND_SPLITTER_UNSPLIT events. + @c wxEVT_SPLITTER_UNSPLIT events. */ wxWindow* GetWindowBeingRemoved() const; @@ -524,7 +524,7 @@ public: Returns the x coordinate of the double-click point. May only be called while processing - @c wxEVT_COMMAND_SPLITTER_DOUBLECLICKED events. + @c wxEVT_SPLITTER_DOUBLECLICKED events. */ int GetX() const; @@ -532,21 +532,21 @@ public: Returns the y coordinate of the double-click point. May only be called while processing - @c wxEVT_COMMAND_SPLITTER_DOUBLECLICKED events. + @c wxEVT_SPLITTER_DOUBLECLICKED events. */ int GetY() const; /** - In the case of @c wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED events, + In the case of @c wxEVT_SPLITTER_SASH_POS_CHANGED events, sets the new sash position. - In the case of @c wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING events, + In the case of @c wxEVT_SPLITTER_SASH_POS_CHANGING events, sets the new tracking bar position so visual feedback during dragging will represent that change that will actually take place. Set to -1 from the event handler code to prevent repositioning. May only be called while processing - @c wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING and - @c wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED events. + @c wxEVT_SPLITTER_SASH_POS_CHANGING and + @c wxEVT_SPLITTER_SASH_POS_CHANGED events. @param pos New sash position. @@ -555,7 +555,7 @@ public: }; -wxEventType wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED; -wxEventType wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING; -wxEventType wxEVT_COMMAND_SPLITTER_DOUBLECLICKED; -wxEventType wxEVT_COMMAND_SPLITTER_UNSPLIT; +wxEventType wxEVT_SPLITTER_SASH_POS_CHANGED; +wxEventType wxEVT_SPLITTER_SASH_POS_CHANGING; +wxEventType wxEVT_SPLITTER_DOUBLECLICKED; +wxEventType wxEVT_SPLITTER_UNSPLIT; diff --git a/interface/wx/srchctrl.h b/interface/wx/srchctrl.h index ee2b0b7df4..a29762df6c 100644 --- a/interface/wx/srchctrl.h +++ b/interface/wx/srchctrl.h @@ -14,7 +14,7 @@ @beginStyleTable @style{wxTE_PROCESS_ENTER} - The control will generate the event @c wxEVT_COMMAND_TEXT_ENTER + The control will generate the event @c wxEVT_TEXT_ENTER (otherwise pressing Enter key is either processed internally by the control or used for navigation between dialog controls). @style{wxTE_PROCESS_TAB} @@ -167,5 +167,5 @@ public: }; -wxEventType wxEVT_COMMAND_SEARCHCTRL_CANCEL_BTN; -wxEventType wxEVT_COMMAND_SEARCHCTRL_SEARCH_BTN; +wxEventType wxEVT_SEARCHCTRL_CANCEL_BTN; +wxEventType wxEVT_SEARCHCTRL_SEARCH_BTN; diff --git a/interface/wx/textctrl.h b/interface/wx/textctrl.h index 6a88243edb..98dd83dd97 100644 --- a/interface/wx/textctrl.h +++ b/interface/wx/textctrl.h @@ -938,7 +938,7 @@ public: @beginStyleTable @style{wxTE_PROCESS_ENTER} - The control will generate the event @c wxEVT_COMMAND_TEXT_ENTER + The control will generate the event @c wxEVT_TEXT_ENTER (otherwise pressing Enter key is either processed internally by the control or used for navigation between dialog controls). @style{wxTE_PROCESS_TAB} @@ -1133,14 +1133,14 @@ public: @beginEventEmissionTable{wxCommandEvent} @event{EVT_TEXT(id, func)} - Respond to a @c wxEVT_COMMAND_TEXT_UPDATED event, generated when the text + Respond to a @c wxEVT_TEXT event, generated when the text changes. Notice that this event will be sent when the text controls contents changes -- whether this is due to user input or comes from the program itself (for example, if wxTextCtrl::SetValue() is called); see wxTextCtrl::ChangeValue() for a function which does not send this event. This event is however not sent during the control creation. @event{EVT_TEXT_ENTER(id, func)} - Respond to a @c wxEVT_COMMAND_TEXT_ENTER event, generated when enter is + Respond to a @c wxEVT_TEXT_ENTER event, generated when enter is pressed in a text control which must have wxTE_PROCESS_ENTER style for this event to be generated. @event{EVT_TEXT_URL(id, func)} @@ -1557,10 +1557,10 @@ public: -wxEventType wxEVT_COMMAND_TEXT_UPDATED; -wxEventType wxEVT_COMMAND_TEXT_ENTER; -wxEventType wxEVT_COMMAND_TEXT_URL; -wxEventType wxEVT_COMMAND_TEXT_MAXLEN; +wxEventType wxEVT_TEXT; +wxEventType wxEVT_TEXT_ENTER; +wxEventType wxEVT_TEXT_URL; +wxEventType wxEVT_TEXT_MAXLEN; class wxTextUrlEvent : public wxCommandEvent diff --git a/interface/wx/textentry.h b/interface/wx/textentry.h index a1dccfe863..193e47ef51 100644 --- a/interface/wx/textentry.h +++ b/interface/wx/textentry.h @@ -180,7 +180,7 @@ public: The insertion point is set to the start of the control (i.e. position 0) by this function. - This functions does not generate the @c wxEVT_COMMAND_TEXT_UPDATED + This functions does not generate the @c wxEVT_TEXT event but otherwise is identical to SetValue(). See @ref overview_events_prog for more information. @@ -196,7 +196,7 @@ public: /** Clears the text in the control. - Note that this function will generate a @c wxEVT_COMMAND_TEXT_UPDATED + Note that this function will generate a @c wxEVT_TEXT event, i.e. its effect is identical to calling @c SetValue(""). */ virtual void Clear(); @@ -401,7 +401,7 @@ public: and the user may enter as much text as the underlying native text control widget supports (typically at least 32Kb). If the user tries to enter more characters into the text control when it - already is filled up to the maximal length, a @c wxEVT_COMMAND_TEXT_MAXLEN + already is filled up to the maximal length, a @c wxEVT_TEXT_MAXLEN event is sent to notify the program about it (giving it the possibility to show an explanatory message, for example) and the extra input is discarded. @@ -524,7 +524,7 @@ public: 0) by this function. Note that, unlike most other functions changing the controls values, - this function generates a @c wxEVT_COMMAND_TEXT_UPDATED event. To avoid + this function generates a @c wxEVT_TEXT event. To avoid this you can use ChangeValue() instead. @param value diff --git a/interface/wx/tglbtn.h b/interface/wx/tglbtn.h index a5e7632a9d..672836ebc0 100644 --- a/interface/wx/tglbtn.h +++ b/interface/wx/tglbtn.h @@ -7,7 +7,7 @@ ///////////////////////////////////////////////////////////////////////////// -wxEventType wxEVT_COMMAND_TOGGLEBUTTON_CLICKED; +wxEventType wxEVT_TOGGLEBUTTON; /** @class wxToggleButton @@ -21,7 +21,7 @@ wxEventType wxEVT_COMMAND_TOGGLEBUTTON_CLICKED; @beginEventEmissionTable{wxCommandEvent} @event{EVT_TOGGLEBUTTON(id, func)} - Handles a wxEVT_COMMAND_TOGGLEBUTTON_CLICKED event. + Handles a wxEVT_TOGGLEBUTTON event. @endEventTable @library{wxcore} @@ -121,7 +121,7 @@ public: @beginEventEmissionTable{wxCommandEvent} @event{EVT_TOGGLEBUTTON(id, func)} - Handles a wxEVT_COMMAND_TOGGLEBUTTON_CLICKED event. + Handles a wxEVT_TOGGLEBUTTON event. @endEventTable @library{wxcore} diff --git a/interface/wx/toolbar.h b/interface/wx/toolbar.h index c94cb9c985..014a77f009 100644 --- a/interface/wx/toolbar.h +++ b/interface/wx/toolbar.h @@ -230,27 +230,27 @@ public: @beginEventEmissionTable{wxCommandEvent} @event{EVT_TOOL(id, func)} - Process a @c wxEVT_COMMAND_TOOL_CLICKED event (a synonym for @c - wxEVT_COMMAND_MENU_SELECTED). Pass the id of the tool. + Process a @c wxEVT_TOOL event (a synonym for @c + wxEVT_MENU). Pass the id of the tool. @event{EVT_MENU(id, func)} The same as EVT_TOOL(). @event{EVT_TOOL_RANGE(id1, id2, func)} - Process a @c wxEVT_COMMAND_TOOL_CLICKED event for a range of + Process a @c wxEVT_TOOL event for a range of identifiers. Pass the ids of the tools. @event{EVT_MENU_RANGE(id1, id2, func)} The same as EVT_TOOL_RANGE(). @event{EVT_TOOL_RCLICKED(id, func)} - Process a @c wxEVT_COMMAND_TOOL_RCLICKED event. Pass the id of the + Process a @c wxEVT_TOOL_RCLICKED event. Pass the id of the tool. (Not available on wxOSX.) @event{EVT_TOOL_RCLICKED_RANGE(id1, id2, func)} - Process a @c wxEVT_COMMAND_TOOL_RCLICKED event for a range of ids. Pass + Process a @c wxEVT_TOOL_RCLICKED event for a range of ids. Pass the ids of the tools. (Not available on wxOSX.) @event{EVT_TOOL_ENTER(id, func)} - Process a @c wxEVT_COMMAND_TOOL_ENTER event. Pass the id of the toolbar + Process a @c wxEVT_TOOL_ENTER event. Pass the id of the toolbar itself. The value of wxCommandEvent::GetSelection() is the tool id, or -1 if the mouse cursor has moved off a tool. (Not available on wxOSX.) @event{EVT_TOOL_DROPDOWN(id, func)} - Process a @c wxEVT_COMMAND_TOOL_DROPDOWN_CLICKED event. If unhandled, + Process a @c wxEVT_TOOL_DROPDOWN event. If unhandled, displays the default dropdown menu set using wxToolBar::SetDropdownMenu(). @endEventTable diff --git a/interface/wx/toolbook.h b/interface/wx/toolbook.h index 630f8eca54..67266e1bdd 100644 --- a/interface/wx/toolbook.h +++ b/interface/wx/toolbook.h @@ -9,8 +9,8 @@ #define wxTBK_BUTTONBAR 0x0100 #define wxTBK_HORZ_LAYOUT 0x8000 -wxEventType wxEVT_COMMAND_TOOLBOOK_PAGE_CHANGED; -wxEventType wxEVT_COMMAND_TOOLBOOK_PAGE_CHANGING; +wxEventType wxEVT_TOOLBOOK_PAGE_CHANGED; +wxEventType wxEVT_TOOLBOOK_PAGE_CHANGING; /** @@ -40,10 +40,10 @@ wxEventType wxEVT_COMMAND_TOOLBOOK_PAGE_CHANGING; @beginEventEmissionTable{wxBookCtrlEvent} @event{EVT_TOOLBOOK_PAGE_CHANGED(id, func)} The page selection was changed. - Processes a @c wxEVT_COMMAND_TOOLBOOK_PAGE_CHANGED event. + Processes a @c wxEVT_TOOLBOOK_PAGE_CHANGED event. @event{EVT_TOOLBOOK_PAGE_CHANGING(id, func)} The page selection is about to be changed. - Processes a @c wxEVT_COMMAND_TOOLBOOK_PAGE_CHANGING event. + Processes a @c wxEVT_TOOLBOOK_PAGE_CHANGING event. This event can be vetoed (using wxNotifyEvent::Veto()). @endEventTable diff --git a/interface/wx/toplevel.h b/interface/wx/toplevel.h index 4cfa892bb7..5ed806380b 100644 --- a/interface/wx/toplevel.h +++ b/interface/wx/toplevel.h @@ -275,7 +275,7 @@ public: Returns a wxMenu pointer representing the system menu of the window under MSW. The returned wxMenu may be used, if non-@c NULL, to add - extra items to the system menu. The usual @c wxEVT_COMMAND_MENU_SELECTED + extra items to the system menu. The usual @c wxEVT_MENU events (that can be processed using @c EVT_MENU event table macro) will then be generated for them. All the other wxMenu methods may be used as well but notice that they won't allow you to access any standard system diff --git a/interface/wx/treebook.h b/interface/wx/treebook.h index 776b2afca3..56d5a1e577 100644 --- a/interface/wx/treebook.h +++ b/interface/wx/treebook.h @@ -7,10 +7,10 @@ ///////////////////////////////////////////////////////////////////////////// -wxEventType wxEVT_COMMAND_TREEBOOK_PAGE_CHANGED; -wxEventType wxEVT_COMMAND_TREEBOOK_PAGE_CHANGING; -wxEventType wxEVT_COMMAND_TREEBOOK_NODE_COLLAPSED; -wxEventType wxEVT_COMMAND_TREEBOOK_NODE_EXPANDED; +wxEventType wxEVT_TREEBOOK_PAGE_CHANGED; +wxEventType wxEVT_TREEBOOK_PAGE_CHANGING; +wxEventType wxEVT_TREEBOOK_NODE_COLLAPSED; +wxEventType wxEVT_TREEBOOK_NODE_EXPANDED; /** @class wxTreebook @@ -30,17 +30,17 @@ wxEventType wxEVT_COMMAND_TREEBOOK_NODE_EXPANDED; @beginEventEmissionTable{wxBookCtrlEvent} @event{EVT_TREEBOOK_PAGE_CHANGED(id, func)} The page selection was changed. - Processes a @c wxEVT_COMMAND_TREEBOOK_PAGE_CHANGED event. + Processes a @c wxEVT_TREEBOOK_PAGE_CHANGED event. @event{EVT_TREEBOOK_PAGE_CHANGING(id, func)} The page selection is about to be changed. - Processes a @c wxEVT_COMMAND_TREEBOOK_PAGE_CHANGING event. + Processes a @c wxEVT_TREEBOOK_PAGE_CHANGING event. This event can be @ref wxNotifyEvent::Veto() "vetoed". @event{EVT_TREEBOOK_NODE_COLLAPSED(id, func)} The page node is going to be collapsed. - Processes a @c wxEVT_COMMAND_TREEBOOK_NODE_COLLAPSED event. + Processes a @c wxEVT_TREEBOOK_NODE_COLLAPSED event. @event{EVT_TREEBOOK_NODE_EXPANDED(id, func)} The page node is going to be expanded. - Processes a @c wxEVT_COMMAND_TREEBOOK_NODE_EXPANDED event. + Processes a @c wxEVT_TREEBOOK_NODE_EXPANDED event. @endEventTable @library{wxcore} diff --git a/interface/wx/treectrl.h b/interface/wx/treectrl.h index 0ab6c0a247..58ce8ade7d 100644 --- a/interface/wx/treectrl.h +++ b/interface/wx/treectrl.h @@ -73,73 +73,73 @@ Begin dragging with the left mouse button. If you want to enable left-dragging you need to intercept this event and explicitly call wxTreeEvent::Allow(), as it's vetoed by default. - Processes a @c wxEVT_COMMAND_TREE_BEGIN_DRAG event type. + Processes a @c wxEVT_TREE_BEGIN_DRAG event type. @event{EVT_TREE_BEGIN_RDRAG(id, func)} Begin dragging with the right mouse button. If you want to enable right-dragging you need to intercept this event and explicitly call wxTreeEvent::Allow(), as it's vetoed by default. - Processes a @c wxEVT_COMMAND_TREE_BEGIN_RDRAG event type. + Processes a @c wxEVT_TREE_BEGIN_RDRAG event type. @event{EVT_TREE_END_DRAG(id, func)} End dragging with the left or right mouse button. - Processes a @c wxEVT_COMMAND_TREE_END_DRAG event type. + Processes a @c wxEVT_TREE_END_DRAG event type. @event{EVT_TREE_BEGIN_LABEL_EDIT(id, func)} Begin editing a label. This can be prevented by calling Veto(). - Processes a @c wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT event type. + Processes a @c wxEVT_TREE_BEGIN_LABEL_EDIT event type. @event{EVT_TREE_END_LABEL_EDIT(id, func)} Finish editing a label. This can be prevented by calling Veto(). - Processes a @c wxEVT_COMMAND_TREE_END_LABEL_EDIT event type. + Processes a @c wxEVT_TREE_END_LABEL_EDIT event type. @event{EVT_TREE_DELETE_ITEM(id, func)} An item was deleted. - Processes a @c wxEVT_COMMAND_TREE_DELETE_ITEM event type. + Processes a @c wxEVT_TREE_DELETE_ITEM event type. @event{EVT_TREE_GET_INFO(id, func)} Request information from the application. - Processes a @c wxEVT_COMMAND_TREE_GET_INFO event type. + Processes a @c wxEVT_TREE_GET_INFO event type. @event{EVT_TREE_SET_INFO(id, func)} Information is being supplied. - Processes a @c wxEVT_COMMAND_TREE_SET_INFO event type. + Processes a @c wxEVT_TREE_SET_INFO event type. @event{EVT_TREE_ITEM_ACTIVATED(id, func)} The item has been activated, i.e. chosen by double clicking it with mouse or from keyboard. - Processes a @c wxEVT_COMMAND_TREE_ITEM_ACTIVATED event type. + Processes a @c wxEVT_TREE_ITEM_ACTIVATED event type. @event{EVT_TREE_ITEM_COLLAPSED(id, func)} The item has been collapsed. - Processes a @c wxEVT_COMMAND_TREE_ITEM_COLLAPSED event type. + Processes a @c wxEVT_TREE_ITEM_COLLAPSED event type. @event{EVT_TREE_ITEM_COLLAPSING(id, func)} The item is being collapsed. This can be prevented by calling Veto(). - Processes a @c wxEVT_COMMAND_TREE_ITEM_COLLAPSING event type. + Processes a @c wxEVT_TREE_ITEM_COLLAPSING event type. @event{EVT_TREE_ITEM_EXPANDED(id, func)} The item has been expanded. - Processes a @c wxEVT_COMMAND_TREE_ITEM_EXPANDED event type. + Processes a @c wxEVT_TREE_ITEM_EXPANDED event type. @event{EVT_TREE_ITEM_EXPANDING(id, func)} The item is being expanded. This can be prevented by calling Veto(). - Processes a @c wxEVT_COMMAND_TREE_ITEM_EXPANDING event type. + Processes a @c wxEVT_TREE_ITEM_EXPANDING event type. @event{EVT_TREE_ITEM_RIGHT_CLICK(id, func)} The user has clicked the item with the right mouse button. - Processes a @c wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK event type. + Processes a @c wxEVT_TREE_ITEM_RIGHT_CLICK event type. @event{EVT_TREE_ITEM_MIDDLE_CLICK(id, func)} The user has clicked the item with the middle mouse button. This is only supported by the generic control. - Processes a @c wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK event type. + Processes a @c wxEVT_TREE_ITEM_MIDDLE_CLICK event type. @event{EVT_TREE_SEL_CHANGED(id, func)} Selection has changed. - Processes a @c wxEVT_COMMAND_TREE_SEL_CHANGED event type. + Processes a @c wxEVT_TREE_SEL_CHANGED event type. @event{EVT_TREE_SEL_CHANGING(id, func)} Selection is changing. This can be prevented by calling Veto(). - Processes a @c wxEVT_COMMAND_TREE_SEL_CHANGING event type. + Processes a @c wxEVT_TREE_SEL_CHANGING event type. @event{EVT_TREE_KEY_DOWN(id, func)} A key has been pressed. - Processes a @c wxEVT_COMMAND_TREE_KEY_DOWN event type. + Processes a @c wxEVT_TREE_KEY_DOWN event type. @event{EVT_TREE_ITEM_GETTOOLTIP(id, func)} The opportunity to set the item tooltip is being given to the application (call wxTreeEvent::SetToolTip). Windows only. - Processes a @c wxEVT_COMMAND_TREE_ITEM_GETTOOLTIP event type. + Processes a @c wxEVT_TREE_ITEM_GETTOOLTIP event type. @event{EVT_TREE_ITEM_MENU(id, func)} The context menu for the selected item has been requested, either by a right click or by using the menu key. - Processes a @c wxEVT_COMMAND_TREE_ITEM_MENU event type. + Processes a @c wxEVT_TREE_ITEM_MENU event type. @event{EVT_TREE_STATE_IMAGE_CLICK(id, func)} The state image has been clicked. - Processes a @c wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK event type. + Processes a @c wxEVT_TREE_STATE_IMAGE_CLICK event type. @endEventTable @@ -795,7 +795,7 @@ public: currently selected item if the value of @a select is @false. Notice that calling this method will generate - @c wxEVT_COMMAND_TREE_SEL_CHANGING and @c wxEVT_COMMAND_TREE_SEL_CHANGED + @c wxEVT_TREE_SEL_CHANGING and @c wxEVT_TREE_SEL_CHANGED events and that the change could be vetoed by the former event handler. */ virtual void SelectItem(const wxTreeItemId& item, bool select = true); @@ -1120,25 +1120,25 @@ public: }; -wxEventType wxEVT_COMMAND_TREE_BEGIN_DRAG; -wxEventType wxEVT_COMMAND_TREE_BEGIN_RDRAG; -wxEventType wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT; -wxEventType wxEVT_COMMAND_TREE_END_LABEL_EDIT; -wxEventType wxEVT_COMMAND_TREE_DELETE_ITEM; -wxEventType wxEVT_COMMAND_TREE_GET_INFO; -wxEventType wxEVT_COMMAND_TREE_SET_INFO; -wxEventType wxEVT_COMMAND_TREE_ITEM_EXPANDED; -wxEventType wxEVT_COMMAND_TREE_ITEM_EXPANDING; -wxEventType wxEVT_COMMAND_TREE_ITEM_COLLAPSED; -wxEventType wxEVT_COMMAND_TREE_ITEM_COLLAPSING; -wxEventType wxEVT_COMMAND_TREE_SEL_CHANGED; -wxEventType wxEVT_COMMAND_TREE_SEL_CHANGING; -wxEventType wxEVT_COMMAND_TREE_KEY_DOWN; -wxEventType wxEVT_COMMAND_TREE_ITEM_ACTIVATED; -wxEventType wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK; -wxEventType wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK; -wxEventType wxEVT_COMMAND_TREE_END_DRAG; -wxEventType wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK; -wxEventType wxEVT_COMMAND_TREE_ITEM_GETTOOLTIP; -wxEventType wxEVT_COMMAND_TREE_ITEM_MENU; +wxEventType wxEVT_TREE_BEGIN_DRAG; +wxEventType wxEVT_TREE_BEGIN_RDRAG; +wxEventType wxEVT_TREE_BEGIN_LABEL_EDIT; +wxEventType wxEVT_TREE_END_LABEL_EDIT; +wxEventType wxEVT_TREE_DELETE_ITEM; +wxEventType wxEVT_TREE_GET_INFO; +wxEventType wxEVT_TREE_SET_INFO; +wxEventType wxEVT_TREE_ITEM_EXPANDED; +wxEventType wxEVT_TREE_ITEM_EXPANDING; +wxEventType wxEVT_TREE_ITEM_COLLAPSED; +wxEventType wxEVT_TREE_ITEM_COLLAPSING; +wxEventType wxEVT_TREE_SEL_CHANGED; +wxEventType wxEVT_TREE_SEL_CHANGING; +wxEventType wxEVT_TREE_KEY_DOWN; +wxEventType wxEVT_TREE_ITEM_ACTIVATED; +wxEventType wxEVT_TREE_ITEM_RIGHT_CLICK; +wxEventType wxEVT_TREE_ITEM_MIDDLE_CLICK; +wxEventType wxEVT_TREE_END_DRAG; +wxEventType wxEVT_TREE_STATE_IMAGE_CLICK; +wxEventType wxEVT_TREE_ITEM_GETTOOLTIP; +wxEventType wxEVT_TREE_ITEM_MENU; diff --git a/interface/wx/treelist.h b/interface/wx/treelist.h index f170e793f7..888bf9d5b9 100644 --- a/interface/wx/treelist.h +++ b/interface/wx/treelist.h @@ -219,7 +219,7 @@ extern const wxTreeListItem wxTLI_LAST; @beginEventTable{wxTreeListEvent} @event{EVT_TREELIST_SELECTION_CHANGED(id, func)} - Process @c wxEVT_COMMAND_TREELIST_SELECTION_CHANGED event and notifies + Process @c wxEVT_TREELIST_SELECTION_CHANGED event and notifies about the selection change in the control. In the single selection case the item indicated by the event has been selected and previously selected item, if any, was deselected. In multiple selection case, the @@ -228,26 +228,26 @@ extern const wxTreeListItem wxTLI_LAST; could have changed as well, use wxTreeListCtrl::GetSelections() to retrieve the new selection if necessary. @event{EVT_TREELIST_ITEM_EXPANDING(id, func)} - Process @c wxEVT_COMMAND_TREELIST_ITEM_EXPANDING event notifying about + Process @c wxEVT_TREELIST_ITEM_EXPANDING event notifying about the given branch being expanded. This event is sent before the expansion occurs and can be vetoed to prevent it from happening. @event{EVT_TREELIST_ITEM_EXPANDED(id, func)} - Process @c wxEVT_COMMAND_TREELIST_ITEM_EXPANDED event notifying about + Process @c wxEVT_TREELIST_ITEM_EXPANDED event notifying about the expansion of the given branch. This event is sent after the expansion occurs and can't be vetoed. @event{EVT_TREELIST_ITEM_CHECKED(id, func)} - Process @c wxEVT_COMMAND_TREELIST_ITEM_CHECKED event notifying about + Process @c wxEVT_TREELIST_ITEM_CHECKED event notifying about the user checking or unchecking the item. You can use wxTreeListCtrl::GetCheckedState() to retrieve the new item state and wxTreeListEvent::GetOldCheckedState() to get the previous one. @event{EVT_TREELIST_ITEM_ACTIVATED(id, func)} - Process @c wxEVT_COMMAND_TREELIST_ITEM_ACTIVATED event notifying about + Process @c wxEVT_TREELIST_ITEM_ACTIVATED event notifying about the user double clicking the item or activating it from keyboard. @event{EVT_TREELIST_ITEM_CONTEXT_MENU(id, func)} - Process @c wxEVT_COMMAND_TREELIST_ITEM_CONTEXT_MENU event indicating + Process @c wxEVT_TREELIST_ITEM_CONTEXT_MENU event indicating that the popup menu for the given item should be displayed. @event{EVT_TREELIST_COLUMN_SORTED(id, func)} - Process @c wxEVT_COMMAND_TREELIST_COLUMN_SORTED event indicating that + Process @c wxEVT_TREELIST_COLUMN_SORTED event indicating that the control contents has just been resorted using the specified column. The event doesn't carry the sort direction, use GetSortColumn() method if you need to know it. @@ -909,7 +909,7 @@ public: /** Return the previous state of the item checkbox. - This method can be used with @c wxEVT_COMMAND_TREELIST_ITEM_CHECKED + This method can be used with @c wxEVT_TREELIST_ITEM_CHECKED events only. Notice that the new state of the item can be retrieved using @@ -920,7 +920,7 @@ public: /** Return the column affected by the event. - This is currently only used with @c wxEVT_COMMAND_TREELIST_COLUMN_SORTED + This is currently only used with @c wxEVT_TREELIST_COLUMN_SORTED event. */ unsigned GetColumn() const; @@ -937,10 +937,10 @@ public: wxEVENT_HANDLER_CAST(wxTreeListEventFunction, func) -wxEventType wxEVT_COMMAND_TREELIST_SELECTION_CHANGED; -wxEventType wxEVT_COMMAND_TREELIST_ITEM_EXPANDING; -wxEventType wxEVT_COMMAND_TREELIST_ITEM_EXPANDED; -wxEventType wxEVT_COMMAND_TREELIST_ITEM_CHECKED; -wxEventType wxEVT_COMMAND_TREELIST_ITEM_ACTIVATED; -wxEventType wxEVT_COMMAND_TREELIST_ITEM_CONTEXT_MENU; -wxEventType wxEVT_COMMAND_TREELIST_COLUMN_SORTED; +wxEventType wxEVT_TREELIST_SELECTION_CHANGED; +wxEventType wxEVT_TREELIST_ITEM_EXPANDING; +wxEventType wxEVT_TREELIST_ITEM_EXPANDED; +wxEventType wxEVT_TREELIST_ITEM_CHECKED; +wxEventType wxEVT_TREELIST_ITEM_ACTIVATED; +wxEventType wxEVT_TREELIST_ITEM_CONTEXT_MENU; +wxEventType wxEVT_TREELIST_COLUMN_SORTED; diff --git a/interface/wx/webview.h b/interface/wx/webview.h index 9d275863d8..5e48cf127a 100644 --- a/interface/wx/webview.h +++ b/interface/wx/webview.h @@ -244,9 +244,9 @@ public: immediately and perform their work in the background. This includes functions such as LoadURL() and Reload(). To receive notification of the progress and completion of these functions you need to handle the events - that are provided. Specifically @c wxEVT_COMMAND_WEBVIEW_LOADED notifies + that are provided. Specifically @c wxEVT_WEBVIEW_LOADED notifies when the page or a sub-frame has finished loading and - @c wxEVT_COMMAND_WEBVIEW_ERROR notifies that an error has occurred. + @c wxEVT_WEBVIEW_ERROR notifies that an error has occurred. @section vfs Virtual File Systems and Custom Schemes @@ -266,31 +266,31 @@ public: @beginEventEmissionTable{wxWebViewEvent} @event{EVT_WEBVIEW_NAVIGATING(id, func)} - Process a @c wxEVT_COMMAND_WEBVIEW_NAVIGATING event, generated before trying + Process a @c wxEVT_WEBVIEW_NAVIGATING event, generated before trying to get a resource. This event may be vetoed to prevent navigating to this resource. Note that if the displayed HTML document has several frames, one such event will be generated per frame. @event{EVT_WEBVIEW_NAVIGATED(id, func)} - Process a @c wxEVT_COMMAND_WEBVIEW_NAVIGATED event generated after it was + Process a @c wxEVT_WEBVIEW_NAVIGATED event generated after it was confirmed that a resource would be requested. This event may not be vetoed. Note that if the displayed HTML document has several frames, one such event will be generated per frame. @event{EVT_WEBVIEW_LOADED(id, func)} - Process a @c wxEVT_COMMAND_WEBVIEW_LOADED event generated when the document + Process a @c wxEVT_WEBVIEW_LOADED event generated when the document is fully loaded and displayed. Note that if the displayed HTML document has several frames, one such event will be generated per frame. @event{EVT_WEBVIEW_ERROR(id, func)} - Process a @c wxEVT_COMMAND_WEBVIEW_ERROR event generated when a navigation + Process a @c wxEVT_WEBVIEW_ERROR event generated when a navigation error occurs. The integer associated with this event will be a wxWebNavigationError item. The string associated with this event may contain a backend-specific more precise error message/code. @event{EVT_WEBVIEW_NEWWINDOW(id, func)} - Process a @c wxEVT_COMMAND_WEBVIEW_NEWWINDOW event, generated when a new + Process a @c wxEVT_WEBVIEW_NEWWINDOW event, generated when a new window is created. You must handle this event if you want anything to happen, for example to load the page in a new window or tab. @event{EVT_WEBVIEW_TITLE_CHANGED(id, func)} - Process a @c wxEVT_COMMAND_WEBVIEW_TITLE_CHANGED event, generated when + Process a @c wxEVT_WEBVIEW_TITLE_CHANGED event, generated when the page title changes. Use GetString to get the title. @endEventTable @@ -738,31 +738,31 @@ public: @beginEventEmissionTable{wxWebViewEvent} @event{EVT_WEBVIEW_NAVIGATING(id, func)} - Process a @c wxEVT_COMMAND_WEBVIEW_NAVIGATING event, generated before trying + Process a @c wxEVT_WEBVIEW_NAVIGATING event, generated before trying to get a resource. This event may be vetoed to prevent navigating to this resource. Note that if the displayed HTML document has several frames, one such event will be generated per frame. @event{EVT_WEBVIEW_NAVIGATED(id, func)} - Process a @c wxEVT_COMMAND_WEBVIEW_NAVIGATED event generated after it was + Process a @c wxEVT_WEBVIEW_NAVIGATED event generated after it was confirmed that a resource would be requested. This event may not be vetoed. Note that if the displayed HTML document has several frames, one such event will be generated per frame. @event{EVT_WEBVIEW_LOADED(id, func)} - Process a @c wxEVT_COMMAND_WEBVIEW_LOADED event generated when the document + Process a @c wxEVT_WEBVIEW_LOADED event generated when the document is fully loaded and displayed. Note that if the displayed HTML document has several frames, one such event will be generated per frame. @event{EVT_WEBVIEW_ERROR(id, func)} - Process a @c wxEVT_COMMAND_WEBVIEW_ERROR event generated when a navigation + Process a @c wxEVT_WEBVIEW_ERROR event generated when a navigation error occurs. The integer associated with this event will be a wxWebNavigationError item. The string associated with this event may contain a backend-specific more precise error message/code. @event{EVT_WEBVIEW_NEWWINDOW(id, func)} - Process a @c wxEVT_COMMAND_WEBVIEW_NEWWINDOW event, generated when a new + Process a @c wxEVT_WEBVIEW_NEWWINDOW event, generated when a new window is created. You must handle this event if you want anything to happen, for example to load the page in a new window or tab. @event{EVT_WEBVIEW_TITLE_CHANGED(id, func)} - Process a @c wxEVT_COMMAND_WEBVIEW_TITLE_CHANGED event, generated when + Process a @c wxEVT_WEBVIEW_TITLE_CHANGED event, generated when the page title changes. Use GetString to get the title. @endEventTable @@ -793,9 +793,9 @@ public: }; -wxEventType wxEVT_COMMAND_WEBVIEW_NAVIGATING; -wxEventType wxEVT_COMMAND_WEBVIEW_NAVIGATED; -wxEventType wxEVT_COMMAND_WEBVIEW_LOADED; -wxEventType wxEVT_COMMAND_WEBVIEW_ERROR; -wxEventType wxEVT_COMMAND_WEBVIEW_NEWWINDOW; -wxEventType wxEVT_COMMAND_WEBVIEW_TITLE_CHANGED; +wxEventType wxEVT_WEBVIEW_NAVIGATING; +wxEventType wxEVT_WEBVIEW_NAVIGATED; +wxEventType wxEVT_WEBVIEW_LOADED; +wxEventType wxEVT_WEBVIEW_ERROR; +wxEventType wxEVT_WEBVIEW_NEWWINDOW; +wxEventType wxEVT_WEBVIEW_TITLE_CHANGED; diff --git a/samples/combo/combo.cpp b/samples/combo/combo.cpp index 057277c474..ac8eba0143 100644 --- a/samples/combo/combo.cpp +++ b/samples/combo/combo.cpp @@ -939,15 +939,15 @@ void MyFrame::OnComboBoxUpdate( wxCommandEvent& event ) if ( !event.GetEventObject()->IsKindOf(CLASSINFO(wxComboCtrl)) ) return; - if ( event.GetEventType() == wxEVT_COMMAND_COMBOBOX_SELECTED ) + if ( event.GetEventType() == wxEVT_COMBOBOX ) { wxLogDebug(wxT("EVT_COMBOBOX(id=%i,selection=%i)"),event.GetId(),event.GetSelection()); } - else if ( event.GetEventType() == wxEVT_COMMAND_TEXT_UPDATED ) + else if ( event.GetEventType() == wxEVT_TEXT ) { wxLogDebug(wxT("EVT_TEXT(id=%i,string=\"%s\")"),event.GetId(),event.GetString().c_str()); } - else if ( event.GetEventType() == wxEVT_COMMAND_TEXT_ENTER ) + else if ( event.GetEventType() == wxEVT_TEXT_ENTER ) { wxLogDebug("EVT_TEXT_ENTER(id=%i,string=\"%s\")", event.GetId(), event.GetString().c_str()); diff --git a/samples/dataview/dataview.cpp b/samples/dataview/dataview.cpp index 8c0a7428f1..e7f608e88c 100644 --- a/samples/dataview/dataview.cpp +++ b/samples/dataview/dataview.cpp @@ -979,7 +979,7 @@ void MyFrame::OnValueChanged( wxDataViewEvent &event ) void MyFrame::OnActivated( wxDataViewEvent &event ) { wxString title = m_music_model->GetTitle( event.GetItem() ); - wxLogMessage( "wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, Item: %s", title ); + wxLogMessage( "wxEVT_DATAVIEW_ITEM_ACTIVATED, Item: %s", title ); if (m_ctrl[0]->IsExpanded( event.GetItem() )) { @@ -993,13 +993,13 @@ void MyFrame::OnSelectionChanged( wxDataViewEvent &event ) if (title.empty()) title = "None"; - wxLogMessage( "wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, First selected Item: %s", title ); + wxLogMessage( "wxEVT_DATAVIEW_SELECTION_CHANGED, First selected Item: %s", title ); } void MyFrame::OnExpanding( wxDataViewEvent &event ) { wxString title = m_music_model->GetTitle( event.GetItem() ); - wxLogMessage( "wxEVT_COMMAND_DATAVIEW_ITEM_EXPANDING, Item: %s", title ); + wxLogMessage( "wxEVT_DATAVIEW_ITEM_EXPANDING, Item: %s", title ); } @@ -1010,47 +1010,47 @@ void MyFrame::OnStartEditing( wxDataViewEvent &event ) { event.Veto(); - wxLogMessage( "wxEVT_COMMAND_DATAVIEW_ITEM_START_EDITING vetoed. Artist: %s", artist ); + wxLogMessage( "wxEVT_DATAVIEW_ITEM_START_EDITING vetoed. Artist: %s", artist ); } else - wxLogMessage( "wxEVT_COMMAND_DATAVIEW_ITEM_START_EDITING not vetoed. Artist: %s", artist ); + wxLogMessage( "wxEVT_DATAVIEW_ITEM_START_EDITING not vetoed. Artist: %s", artist ); } void MyFrame::OnEditingStarted( wxDataViewEvent &event ) { wxString title = m_music_model->GetTitle( event.GetItem() ); - wxLogMessage( "wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_STARTED, Item: %s", title ); + wxLogMessage( "wxEVT_DATAVIEW_ITEM_EDITING_STARTED, Item: %s", title ); } void MyFrame::OnEditingDone( wxDataViewEvent &event ) { wxString title = m_music_model->GetTitle( event.GetItem() ); - wxLogMessage( "wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_DONE, Item: %s", title ); + wxLogMessage( "wxEVT_DATAVIEW_ITEM_EDITING_DONE, Item: %s", title ); } void MyFrame::OnExpanded( wxDataViewEvent &event ) { wxString title = m_music_model->GetTitle( event.GetItem() ); - wxLogMessage( "wxEVT_COMMAND_DATAVIEW_ITEM_EXPANDED, Item: %s", title ); + wxLogMessage( "wxEVT_DATAVIEW_ITEM_EXPANDED, Item: %s", title ); } void MyFrame::OnCollapsing( wxDataViewEvent &event ) { wxString title = m_music_model->GetTitle( event.GetItem() ); - wxLogMessage( "wxEVT_COMMAND_DATAVIEW_ITEM_COLLAPSING, Item: %s", title ); + wxLogMessage( "wxEVT_DATAVIEW_ITEM_COLLAPSING, Item: %s", title ); } void MyFrame::OnCollapsed( wxDataViewEvent &event ) { wxString title = m_music_model->GetTitle( event.GetItem() ); - wxLogMessage( "wxEVT_COMMAND_DATAVIEW_ITEM_COLLAPSED, Item: %s", title ); + wxLogMessage( "wxEVT_DATAVIEW_ITEM_COLLAPSED, Item: %s", title ); } void MyFrame::OnContextMenu( wxDataViewEvent &event ) { wxString title = m_music_model->GetTitle( event.GetItem() ); - wxLogMessage( "wxEVT_COMMAND_DATAVIEW_ITEM_CONTEXT_MENU, Item: %s", title ); + wxLogMessage( "wxEVT_DATAVIEW_ITEM_CONTEXT_MENU, Item: %s", title ); wxMenu menu; menu.Append( 1, "menuitem 1" ); @@ -1068,7 +1068,7 @@ void MyFrame::OnAttrHeaderClick( wxDataViewEvent &event ) int pos = m_ctrl[1]->GetColumnPosition( event.GetDataViewColumn() ); - wxLogMessage( "wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_CLICK, Column position: %d", pos ); + wxLogMessage( "wxEVT_DATAVIEW_COLUMN_HEADER_CLICK, Column position: %d", pos ); wxLogMessage( "Column title: %s Column width: %d", event.GetDataViewColumn()->GetTitle(), event.GetDataViewColumn()->GetWidth() ); } @@ -1080,7 +1080,7 @@ void MyFrame::OnHeaderClick( wxDataViewEvent &event ) int pos = m_ctrl[0]->GetColumnPosition( event.GetDataViewColumn() ); - wxLogMessage( "wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_CLICK, Column position: %d", pos ); + wxLogMessage( "wxEVT_DATAVIEW_COLUMN_HEADER_CLICK, Column position: %d", pos ); wxLogMessage( "Column width: %d", event.GetDataViewColumn()->GetWidth() ); } @@ -1088,14 +1088,14 @@ void MyFrame::OnHeaderRightClick( wxDataViewEvent &event ) { int pos = m_ctrl[0]->GetColumnPosition( event.GetDataViewColumn() ); - wxLogMessage( "wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK, Column position: %d", pos ); + wxLogMessage( "wxEVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICKED, Column position: %d", pos ); } void MyFrame::OnSorted( wxDataViewEvent &event ) { int pos = m_ctrl[0]->GetColumnPosition( event.GetDataViewColumn() ); - wxLogMessage( "wxEVT_COMMAND_DATAVIEW_COLUMN_SORTED, Column position: %d", pos ); + wxLogMessage( "wxEVT_DATAVIEW_COLUMN_SORTED, Column position: %d", pos ); } void MyFrame::OnDataViewChar(wxKeyEvent& event) diff --git a/samples/dialogs/dialogs.cpp b/samples/dialogs/dialogs.cpp index 0adb60f99f..7cc3287cef 100644 --- a/samples/dialogs/dialogs.cpp +++ b/samples/dialogs/dialogs.cpp @@ -624,7 +624,7 @@ MyFrame::MyFrame(const wxString& title) m_infoBarAdvanced->AddButton(wxID_UNDO); m_infoBarAdvanced->AddButton(wxID_REDO); - m_infoBarAdvanced->Connect(wxID_REDO, wxEVT_COMMAND_BUTTON_CLICKED, + m_infoBarAdvanced->Connect(wxID_REDO, wxEVT_BUTTON, wxCommandEventHandler(MyFrame::OnInfoBarRedo), NULL, this); @@ -671,7 +671,7 @@ MyFrame::MyFrame(const wxString& title) static const int DIALOGS_SYSTEM_ABOUT = 0x4010; menu->Append(DIALOGS_SYSTEM_ABOUT, "&About"); - Connect(DIALOGS_SYSTEM_ABOUT, wxEVT_COMMAND_MENU_SELECTED, + Connect(DIALOGS_SYSTEM_ABOUT, wxEVT_MENU, wxCommandEventHandler(MyFrame::ShowSimpleAboutDialog)); } #endif // __WXMSW__ @@ -1345,7 +1345,7 @@ MyExtraPanel::MyExtraPanel(wxWindow *parent) m_btn = new wxButton(this, -1, wxT("Custom Button")); m_btn->Enable(false); m_cb = new wxCheckBox(this, -1, wxT("Enable Custom Button")); - m_cb->Connect(wxID_ANY, wxEVT_COMMAND_CHECKBOX_CLICKED, + m_cb->Connect(wxID_ANY, wxEVT_CHECKBOX, wxCommandEventHandler(MyExtraPanel::OnCheckBox), NULL, this); wxBoxSizer *sizerTop = new wxBoxSizer(wxHORIZONTAL); sizerTop->Add(m_cb, wxSizerFlags().Centre().Border()); @@ -1886,7 +1886,7 @@ public: // And connect the event handlers. btnShowText->Connect ( - wxEVT_COMMAND_BUTTON_CLICKED, + wxEVT_BUTTON, wxCommandEventHandler(RichTipDialog::OnShowTipForText), NULL, this @@ -1894,7 +1894,7 @@ public: btnShowBtn->Connect ( - wxEVT_COMMAND_BUTTON_CLICKED, + wxEVT_BUTTON, wxCommandEventHandler(RichTipDialog::OnShowTipForBtn), NULL, this @@ -2399,23 +2399,23 @@ void MyFrame::OnFindDialog(wxFindDialogEvent& event) { wxEventType type = event.GetEventType(); - if ( type == wxEVT_COMMAND_FIND || type == wxEVT_COMMAND_FIND_NEXT ) + if ( type == wxEVT_FIND || type == wxEVT_FIND_NEXT ) { wxLogMessage(wxT("Find %s'%s' (flags: %s)"), - type == wxEVT_COMMAND_FIND_NEXT ? wxT("next ") : wxT(""), + type == wxEVT_FIND_NEXT ? wxT("next ") : wxT(""), event.GetFindString().c_str(), DecodeFindDialogEventFlags(event.GetFlags()).c_str()); } - else if ( type == wxEVT_COMMAND_FIND_REPLACE || - type == wxEVT_COMMAND_FIND_REPLACE_ALL ) + else if ( type == wxEVT_FIND_REPLACE || + type == wxEVT_FIND_REPLACE_ALL ) { wxLogMessage(wxT("Replace %s'%s' with '%s' (flags: %s)"), - type == wxEVT_COMMAND_FIND_REPLACE_ALL ? wxT("all ") : wxT(""), + type == wxEVT_FIND_REPLACE_ALL ? wxT("all ") : wxT(""), event.GetFindString().c_str(), event.GetReplaceString().c_str(), DecodeFindDialogEventFlags(event.GetFlags()).c_str()); } - else if ( type == wxEVT_COMMAND_FIND_CLOSE ) + else if ( type == wxEVT_FIND_CLOSE ) { wxFindReplaceDialog *dlg = event.GetDialog(); diff --git a/samples/dnd/dnd.cpp b/samples/dnd/dnd.cpp index 2109640761..7987e5fab0 100644 --- a/samples/dnd/dnd.cpp +++ b/samples/dnd/dnd.cpp @@ -1022,7 +1022,7 @@ DnDFrame::DnDFrame() m_ctrlDir->Connect ( wxID_ANY, - wxEVT_COMMAND_TREE_BEGIN_DRAG, + wxEVT_TREE_BEGIN_DRAG, wxTreeEventHandler(DnDFrame::OnBeginDrag), NULL, this diff --git a/samples/docview/doc.cpp b/samples/docview/doc.cpp index e093d82ae3..efdbf8adf7 100644 --- a/samples/docview/doc.cpp +++ b/samples/docview/doc.cpp @@ -196,7 +196,7 @@ bool wxTextDocument::OnCreate(const wxString& path, long flags) // when it's modified GetTextCtrl()->Connect ( - wxEVT_COMMAND_TEXT_UPDATED, + wxEVT_TEXT, wxCommandEventHandler(wxTextDocument::OnTextChange), NULL, this diff --git a/samples/event/event.cpp b/samples/event/event.cpp index 072241989a..747d79a462 100644 --- a/samples/event/event.cpp +++ b/samples/event/event.cpp @@ -92,7 +92,7 @@ public: : wxButton(parent, BUTTON_ID, label) { // Add a dynamic handler for this button event to button itself - Connect(wxEVT_COMMAND_BUTTON_CLICKED, + Connect(wxEVT_BUTTON, wxCommandEventHandler(MyEvtTestButton::OnClickDynamicHandler)); } @@ -304,7 +304,7 @@ bool MyApp::OnInit() frame->Show(true); // Add a dynamic handler at the application level for the test button - Connect(MyEvtTestButton::BUTTON_ID, wxEVT_COMMAND_BUTTON_CLICKED, + Connect(MyEvtTestButton::BUTTON_ID, wxEVT_BUTTON, wxCommandEventHandler(MyApp::OnClickDynamicHandlerApp)); // success: wxApp::OnRun() will be called which will enter the main message @@ -316,7 +316,7 @@ bool MyApp::OnInit() // This is always the first to handle an event ! int MyApp::FilterEvent(wxEvent& event) { - if ( event.GetEventType() == wxEVT_COMMAND_BUTTON_CLICKED && + if ( event.GetEventType() == wxEVT_BUTTON && event.GetId() == MyEvtTestButton::BUTTON_ID ) { wxLogMessage("Step 0 in \"How Events are Processed\":\n" @@ -424,12 +424,12 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size) // event handlers (see class definition); // Add a dynamic handler for this button event in the parent frame - Connect(m_testBtn->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, + Connect(m_testBtn->GetId(), wxEVT_BUTTON, wxCommandEventHandler(MyFrame::OnClickDynamicHandlerFrame)); // Bind a method of this frame (notice "this" argument!) to the button // itself - m_testBtn->Connect(wxEVT_COMMAND_BUTTON_CLICKED, + m_testBtn->Connect(wxEVT_BUTTON, wxCommandEventHandler(MyFrame::OnClickDynamicHandlerButton), NULL, this); @@ -520,19 +520,19 @@ void MyFrame::OnBind(wxCommandEvent& event) { // as we bind directly to the button, there is no need to use an id // here: the button will only ever get its own events - m_btnDynamic->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &MyFrame::OnDynamic, + m_btnDynamic->Bind(wxEVT_BUTTON, &MyFrame::OnDynamic, this); // but we do need the id for the menu command as the frame gets all of // them - Bind(wxEVT_COMMAND_MENU_SELECTED, &MyFrame::OnDynamic, this, + Bind(wxEVT_MENU, &MyFrame::OnDynamic, this, Event_Dynamic); } else // disconnect { - m_btnDynamic->Unbind(wxEVT_COMMAND_BUTTON_CLICKED, + m_btnDynamic->Unbind(wxEVT_BUTTON, &MyFrame::OnDynamic, this); - Unbind(wxEVT_COMMAND_MENU_SELECTED, &MyFrame::OnDynamic, this, + Unbind(wxEVT_MENU, &MyFrame::OnDynamic, this, Event_Dynamic); } @@ -545,18 +545,18 @@ void MyFrame::OnConnect(wxCommandEvent& event) { if ( event.IsChecked() ) { - m_btnDynamic->Connect(wxID_ANY, wxEVT_COMMAND_BUTTON_CLICKED, + m_btnDynamic->Connect(wxID_ANY, wxEVT_BUTTON, wxCommandEventHandler(MyFrame::OnDynamic), NULL, this); - Connect(Event_Dynamic, wxEVT_COMMAND_MENU_SELECTED, + Connect(Event_Dynamic, wxEVT_MENU, wxCommandEventHandler(MyFrame::OnDynamic)); } else // disconnect { - m_btnDynamic->Disconnect(wxID_ANY, wxEVT_COMMAND_BUTTON_CLICKED, + m_btnDynamic->Disconnect(wxID_ANY, wxEVT_BUTTON, wxCommandEventHandler(MyFrame::OnDynamic), NULL, this); - Disconnect(Event_Dynamic, wxEVT_COMMAND_MENU_SELECTED, + Disconnect(Event_Dynamic, wxEVT_MENU, wxCommandEventHandler(MyFrame::OnDynamic)); } diff --git a/samples/fswatcher/fswatcher.cpp b/samples/fswatcher/fswatcher.cpp index 890fd45ff5..824f4c94e2 100644 --- a/samples/fswatcher/fswatcher.cpp +++ b/samples/fswatcher/fswatcher.cpp @@ -178,7 +178,7 @@ MyFrame::MyFrame(const wxString& title) _("If checked, dereference symlinks") ); it->Check(false); - Connect(MENU_ID_DEREFERENCE, wxEVT_COMMAND_MENU_SELECTED, + Connect(MENU_ID_DEREFERENCE, wxEVT_MENU, wxCommandEventHandler(MyFrame::OnFollowLinks)); #endif // __UNIX__ @@ -263,21 +263,21 @@ MyFrame::MyFrame(const wxString& title) // event handlers & show // menu - Connect(MENU_ID_CLEAR, wxEVT_COMMAND_MENU_SELECTED, + Connect(MENU_ID_CLEAR, wxEVT_MENU, wxCommandEventHandler(MyFrame::OnClear)); - Connect(MENU_ID_QUIT, wxEVT_COMMAND_MENU_SELECTED, + Connect(MENU_ID_QUIT, wxEVT_MENU, wxCommandEventHandler(MyFrame::OnQuit)); - Connect(MENU_ID_WATCH, wxEVT_COMMAND_MENU_SELECTED, + Connect(MENU_ID_WATCH, wxEVT_MENU, wxCommandEventHandler(MyFrame::OnWatch)); - Connect(wxID_ABOUT, wxEVT_COMMAND_MENU_SELECTED, + Connect(wxID_ABOUT, wxEVT_MENU, wxCommandEventHandler(MyFrame::OnAbout)); // buttons - Connect(BTN_ID_ADD, wxEVT_COMMAND_BUTTON_CLICKED, + Connect(BTN_ID_ADD, wxEVT_BUTTON, wxCommandEventHandler(MyFrame::OnAdd)); - Connect(BTN_ID_ADD_TREE, wxEVT_COMMAND_BUTTON_CLICKED, + Connect(BTN_ID_ADD_TREE, wxEVT_BUTTON, wxCommandEventHandler(MyFrame::OnAddTree)); - Connect(BTN_ID_REMOVE, wxEVT_COMMAND_BUTTON_CLICKED, + Connect(BTN_ID_REMOVE, wxEVT_BUTTON, wxCommandEventHandler(MyFrame::OnRemove)); Connect(BTN_ID_REMOVE, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MyFrame::OnRemoveUpdateUI)); diff --git a/samples/keyboard/keyboard.cpp b/samples/keyboard/keyboard.cpp index 579f253dcd..337a8f46e8 100644 --- a/samples/keyboard/keyboard.cpp +++ b/samples/keyboard/keyboard.cpp @@ -225,30 +225,30 @@ MyFrame::MyFrame(const wxString& title) // connect menu event handlers - Connect(QuitID, wxEVT_COMMAND_MENU_SELECTED, + Connect(QuitID, wxEVT_MENU, wxCommandEventHandler(MyFrame::OnQuit)); - Connect(wxID_ABOUT, wxEVT_COMMAND_MENU_SELECTED, + Connect(wxID_ABOUT, wxEVT_MENU, wxCommandEventHandler(MyFrame::OnAbout)); - Connect(ClearID, wxEVT_COMMAND_MENU_SELECTED, + Connect(ClearID, wxEVT_MENU, wxCommandEventHandler(MyFrame::OnClear)); - Connect(SkipHook, wxEVT_COMMAND_MENU_SELECTED, + Connect(SkipHook, wxEVT_MENU, wxCommandEventHandler(MyFrame::OnSkipHook)); - Connect(SkipDown, wxEVT_COMMAND_MENU_SELECTED, + Connect(SkipDown, wxEVT_MENU, wxCommandEventHandler(MyFrame::OnSkipDown)); - Connect(IDInputCustom, IDInputText, wxEVT_COMMAND_MENU_SELECTED, + Connect(IDInputCustom, IDInputText, wxEVT_MENU, wxCommandEventHandler(MyFrame::OnInputWindowKind)); - Connect(TestAccelA, wxEVT_COMMAND_MENU_SELECTED, + Connect(TestAccelA, wxEVT_MENU, wxCommandEventHandler(MyFrame::OnTestAccelA)); - Connect(TestAccelCtrlA, wxEVT_COMMAND_MENU_SELECTED, + Connect(TestAccelCtrlA, wxEVT_MENU, wxCommandEventHandler(MyFrame::OnTestAccelCtrlA)); - Connect(TestAccelEsc, wxEVT_COMMAND_MENU_SELECTED, + Connect(TestAccelEsc, wxEVT_MENU, wxCommandEventHandler(MyFrame::OnTestAccelEsc)); // notice that we don't connect OnCharHook() to the input window, unlike diff --git a/samples/layout/layout.cpp b/samples/layout/layout.cpp index 68c11ca289..d0684e9c20 100644 --- a/samples/layout/layout.cpp +++ b/samples/layout/layout.cpp @@ -277,9 +277,9 @@ MyProportionsFrame::MyProportionsFrame(wxFrame *parent) SetSizerAndFit(sizerTop); // and connect the events - Connect(wxEVT_COMMAND_TEXT_UPDATED, + Connect(wxEVT_TEXT, wxCommandEventHandler(MyProportionsFrame::OnProportionUpdated)); - Connect(wxEVT_COMMAND_SPINCTRL_UPDATED, + Connect(wxEVT_SPINCTRL, wxSpinEventHandler(MyProportionsFrame::OnProportionChanged)); } diff --git a/samples/mediaplayer/mediaplayer.cpp b/samples/mediaplayer/mediaplayer.cpp index 4055a71261..589e1e5cf3 100644 --- a/samples/mediaplayer/mediaplayer.cpp +++ b/samples/mediaplayer/mediaplayer.cpp @@ -471,7 +471,7 @@ bool wxMediaPlayerApp::OnInit() for ( size_t n = 0; n < m_params.size(); n++ ) frame->AddToPlayList(m_params[n]); - wxCommandEvent theEvent(wxEVT_COMMAND_MENU_SELECTED, wxID_NEXT); + wxCommandEvent theEvent(wxEVT_MENU, wxID_NEXT); frame->AddPendingEvent(theEvent); } #endif // wxUSE_CMDLINE_PARSER @@ -651,46 +651,46 @@ wxMediaPlayerFrame::wxMediaPlayerFrame(const wxString& title) // // Menu events // - this->Connect(wxID_EXIT, wxEVT_COMMAND_MENU_SELECTED, + this->Connect(wxID_EXIT, wxEVT_MENU, wxCommandEventHandler(wxMediaPlayerFrame::OnQuit)); - this->Connect(wxID_ABOUT, wxEVT_COMMAND_MENU_SELECTED, + this->Connect(wxID_ABOUT, wxEVT_MENU, wxCommandEventHandler(wxMediaPlayerFrame::OnAbout)); - this->Connect(wxID_LOOP, wxEVT_COMMAND_MENU_SELECTED, + this->Connect(wxID_LOOP, wxEVT_MENU, wxCommandEventHandler(wxMediaPlayerFrame::OnLoop)); - this->Connect(wxID_SHOWINTERFACE, wxEVT_COMMAND_MENU_SELECTED, + this->Connect(wxID_SHOWINTERFACE, wxEVT_MENU, wxCommandEventHandler(wxMediaPlayerFrame::OnShowInterface)); - this->Connect(wxID_OPENFILENEWPAGE, wxEVT_COMMAND_MENU_SELECTED, + this->Connect(wxID_OPENFILENEWPAGE, wxEVT_MENU, wxCommandEventHandler(wxMediaPlayerFrame::OnOpenFileNewPage)); - this->Connect(wxID_OPENFILESAMEPAGE, wxEVT_COMMAND_MENU_SELECTED, + this->Connect(wxID_OPENFILESAMEPAGE, wxEVT_MENU, wxCommandEventHandler(wxMediaPlayerFrame::OnOpenFileSamePage)); - this->Connect(wxID_OPENURLNEWPAGE, wxEVT_COMMAND_MENU_SELECTED, + this->Connect(wxID_OPENURLNEWPAGE, wxEVT_MENU, wxCommandEventHandler(wxMediaPlayerFrame::OnOpenURLNewPage)); - this->Connect(wxID_OPENURLSAMEPAGE, wxEVT_COMMAND_MENU_SELECTED, + this->Connect(wxID_OPENURLSAMEPAGE, wxEVT_MENU, wxCommandEventHandler(wxMediaPlayerFrame::OnOpenURLSamePage)); - this->Connect(wxID_CLOSECURRENTPAGE, wxEVT_COMMAND_MENU_SELECTED, + this->Connect(wxID_CLOSECURRENTPAGE, wxEVT_MENU, wxCommandEventHandler(wxMediaPlayerFrame::OnCloseCurrentPage)); - this->Connect(wxID_PLAY, wxEVT_COMMAND_MENU_SELECTED, + this->Connect(wxID_PLAY, wxEVT_MENU, wxCommandEventHandler(wxMediaPlayerFrame::OnPlay)); - this->Connect(wxID_STOP, wxEVT_COMMAND_MENU_SELECTED, + this->Connect(wxID_STOP, wxEVT_MENU, wxCommandEventHandler(wxMediaPlayerFrame::OnStop)); - this->Connect(wxID_NEXT, wxEVT_COMMAND_MENU_SELECTED, + this->Connect(wxID_NEXT, wxEVT_MENU, wxCommandEventHandler(wxMediaPlayerFrame::OnNext)); - this->Connect(wxID_PREV, wxEVT_COMMAND_MENU_SELECTED, + this->Connect(wxID_PREV, wxEVT_MENU, wxCommandEventHandler(wxMediaPlayerFrame::OnPrev)); - this->Connect(wxID_SELECTBACKEND, wxEVT_COMMAND_MENU_SELECTED, + this->Connect(wxID_SELECTBACKEND, wxEVT_MENU, wxCommandEventHandler(wxMediaPlayerFrame::OnSelectBackend)); // @@ -1713,7 +1713,7 @@ wxMediaPlayerNotebookPage::wxMediaPlayerNotebookPage(wxMediaPlayerFrame* parentF // // ListCtrl events // - this->Connect( wxID_LISTCTRL, wxEVT_COMMAND_LIST_ITEM_ACTIVATED, + this->Connect( wxID_LISTCTRL, wxEVT_LIST_ITEM_ACTIVATED, wxListEventHandler(wxMediaPlayerFrame::OnChangeSong), (wxObject*)0, parentFrame); @@ -1747,22 +1747,22 @@ wxMediaPlayerNotebookPage::wxMediaPlayerNotebookPage(wxMediaPlayerFrame* parentF // // Button events // - this->Connect( wxID_BUTTONPREV, wxEVT_COMMAND_BUTTON_CLICKED, + this->Connect( wxID_BUTTONPREV, wxEVT_BUTTON, wxCommandEventHandler(wxMediaPlayerFrame::OnPrev), (wxObject*)0, parentFrame); - this->Connect( wxID_BUTTONPLAY, wxEVT_COMMAND_BUTTON_CLICKED, + this->Connect( wxID_BUTTONPLAY, wxEVT_BUTTON, wxCommandEventHandler(wxMediaPlayerFrame::OnPlay), (wxObject*)0, parentFrame); - this->Connect( wxID_BUTTONSTOP, wxEVT_COMMAND_BUTTON_CLICKED, + this->Connect( wxID_BUTTONSTOP, wxEVT_BUTTON, wxCommandEventHandler(wxMediaPlayerFrame::OnStop), (wxObject*)0, parentFrame); - this->Connect( wxID_BUTTONNEXT, wxEVT_COMMAND_BUTTON_CLICKED, + this->Connect( wxID_BUTTONNEXT, wxEVT_BUTTON, wxCommandEventHandler(wxMediaPlayerFrame::OnNext), (wxObject*)0, parentFrame); - this->Connect( wxID_BUTTONVD, wxEVT_COMMAND_BUTTON_CLICKED, + this->Connect( wxID_BUTTONVD, wxEVT_BUTTON, wxCommandEventHandler(wxMediaPlayerFrame::OnVolumeDown), (wxObject*)0, parentFrame); - this->Connect( wxID_BUTTONVU, wxEVT_COMMAND_BUTTON_CLICKED, + this->Connect( wxID_BUTTONVU, wxEVT_BUTTON, wxCommandEventHandler(wxMediaPlayerFrame::OnVolumeUp), (wxObject*)0, parentFrame); } diff --git a/samples/notebook/notebook.cpp b/samples/notebook/notebook.cpp index 46da69e90f..703ca19565 100644 --- a/samples/notebook/notebook.cpp +++ b/samples/notebook/notebook.cpp @@ -977,43 +977,43 @@ void MyFrame::OnBookCtrl(wxBookCtrlBaseEvent& event) { #if wxUSE_NOTEBOOK { - wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, - wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, + wxEVT_NOTEBOOK_PAGE_CHANGED, + wxEVT_NOTEBOOK_PAGE_CHANGING, wxT("wxNotebook") }, #endif // wxUSE_NOTEBOOK #if wxUSE_LISTBOOK { - wxEVT_COMMAND_LISTBOOK_PAGE_CHANGED, - wxEVT_COMMAND_LISTBOOK_PAGE_CHANGING, + wxEVT_LISTBOOK_PAGE_CHANGED, + wxEVT_LISTBOOK_PAGE_CHANGING, wxT("wxListbook") }, #endif // wxUSE_LISTBOOK #if wxUSE_CHOICEBOOK { - wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED, - wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING, + wxEVT_CHOICEBOOK_PAGE_CHANGED, + wxEVT_CHOICEBOOK_PAGE_CHANGING, wxT("wxChoicebook") }, #endif // wxUSE_CHOICEBOOK #if wxUSE_TREEBOOK { - wxEVT_COMMAND_TREEBOOK_PAGE_CHANGED, - wxEVT_COMMAND_TREEBOOK_PAGE_CHANGING, + wxEVT_TREEBOOK_PAGE_CHANGED, + wxEVT_TREEBOOK_PAGE_CHANGING, wxT("wxTreebook") }, #endif // wxUSE_TREEBOOK #if wxUSE_TOOLBOOK { - wxEVT_COMMAND_TOOLBOOK_PAGE_CHANGED, - wxEVT_COMMAND_TOOLBOOK_PAGE_CHANGING, + wxEVT_TOOLBOOK_PAGE_CHANGED, + wxEVT_TOOLBOOK_PAGE_CHANGING, wxT("wxToolbook") }, #endif // wxUSE_TOOLBOOK #if wxUSE_AUI { - wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, - wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING, + wxEVT_AUINOTEBOOK_PAGE_CHANGED, + wxEVT_AUINOTEBOOK_PAGE_CHANGING, wxT("wxAuiNotebook") }, #endif // wxUSE_AUI diff --git a/samples/ownerdrw/ownerdrw.cpp b/samples/ownerdrw/ownerdrw.cpp index 80a7c2eb74..104dd7ea00 100644 --- a/samples/ownerdrw/ownerdrw.cpp +++ b/samples/ownerdrw/ownerdrw.cpp @@ -81,7 +81,7 @@ BEGIN_EVENT_TABLE(OwnerDrawnFrame, wxFrame) EVT_MENU(Menu_Quit, OwnerDrawnFrame::OnQuit) EVT_LISTBOX(Control_Listbox, OwnerDrawnFrame::OnListboxSelect) EVT_CHECKLISTBOX(Control_Listbox, OwnerDrawnFrame::OnCheckboxToggle) - EVT_COMMAND(Control_Listbox, wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, + EVT_COMMAND(Control_Listbox, wxEVT_LISTBOX_DCLICK, OwnerDrawnFrame::OnListboxDblClick) END_EVENT_TABLE() diff --git a/samples/preferences/preferences.cpp b/samples/preferences/preferences.cpp index 87fbcccd86..f1ab3b6152 100644 --- a/samples/preferences/preferences.cpp +++ b/samples/preferences/preferences.cpp @@ -58,10 +58,10 @@ public: SetMenuBar(menuBar); Connect(wxID_PREFERENCES, - wxEVT_COMMAND_MENU_SELECTED, + wxEVT_MENU, wxCommandEventHandler(MyFrame::OnPref), NULL, this); Connect(wxID_EXIT, - wxEVT_COMMAND_MENU_SELECTED, + wxEVT_MENU, wxCommandEventHandler(MyFrame::OnExit), NULL, this); Connect(wxEVT_CLOSE_WINDOW, wxCloseEventHandler(MyFrame::OnClose), NULL, this); @@ -104,10 +104,10 @@ public: // immediately rather than after the OK or Apply button is pressed. if ( wxPreferencesEditor::ShouldApplyChangesImmediately() ) { - m_useMarkdown->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED, + m_useMarkdown->Connect(wxEVT_CHECKBOX, wxCommandEventHandler(PrefsPageGeneralPanel::ChangedUseMarkdown), NULL, this); - m_spellcheck->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED, + m_spellcheck->Connect(wxEVT_CHECKBOX, wxCommandEventHandler(PrefsPageGeneralPanel::ChangedSpellcheck), NULL, this); } @@ -173,7 +173,7 @@ public: if ( wxPreferencesEditor::ShouldApplyChangesImmediately() ) { - m_fulltext->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED, + m_fulltext->Connect(wxEVT_CHECKBOX, wxCommandEventHandler(PrefsPageTopicsPanel::ChangedFulltext), NULL, this); } diff --git a/samples/propgrid/propgrid.cpp b/samples/propgrid/propgrid.cpp index 87ca762f84..08a6c3edde 100644 --- a/samples/propgrid/propgrid.cpp +++ b/samples/propgrid/propgrid.cpp @@ -128,7 +128,7 @@ bool wxSampleMultiButtonEditor::OnEvent( wxPropertyGrid* propGrid, wxWindow* ctrl, wxEvent& event ) const { - if ( event.GetEventType() == wxEVT_COMMAND_BUTTON_CLICKED ) + if ( event.GetEventType() == wxEVT_BUTTON ) { wxPGMultiButton* buttons = (wxPGMultiButton*) propGrid->GetEditorControlSecondary(); diff --git a/samples/regtest/regtest.cpp b/samples/regtest/regtest.cpp index 711d0241f1..c2b1d60c80 100644 --- a/samples/regtest/regtest.cpp +++ b/samples/regtest/regtest.cpp @@ -784,7 +784,7 @@ void RegTreeCtrl::OnSelChanged(wxTreeEvent& event) void RegTreeCtrl::OnItemExpanding(wxTreeEvent& event) { TreeNode *pNode = GetNode(event); - bool bExpanding = event.GetEventType() == wxEVT_COMMAND_TREE_ITEM_EXPANDING; + bool bExpanding = event.GetEventType() == wxEVT_TREE_ITEM_EXPANDING; // expansion might take some time wxSetCursor(*wxHOURGLASS_CURSOR); @@ -858,7 +858,7 @@ void RegTreeCtrl::OnEndEdit(wxTreeEvent& event) void RegTreeCtrl::OnBeginDrag(wxTreeEvent& event) { - m_copyOnDrop = event.GetEventType() == wxEVT_COMMAND_TREE_BEGIN_DRAG; + m_copyOnDrop = event.GetEventType() == wxEVT_TREE_BEGIN_DRAG; TreeNode *pNode = GetNode(event); if ( pNode->IsRoot() || pNode->Parent()->IsRoot() ) diff --git a/samples/ribbon/ribbondemo.cpp b/samples/ribbon/ribbondemo.cpp index e30b1db9a2..7a326c8598 100644 --- a/samples/ribbon/ribbondemo.cpp +++ b/samples/ribbon/ribbondemo.cpp @@ -970,7 +970,7 @@ void MyFrame::OnColourGalleryButton(wxCommandEvent& evt) gallery->SetSelection(item); // Send an event to respond to the selection change - wxRibbonGalleryEvent dummy(wxEVT_COMMAND_RIBBONGALLERY_SELECTED, gallery->GetId()); + wxRibbonGalleryEvent dummy(wxEVT_RIBBONGALLERY_SELECTED, gallery->GetId()); dummy.SetEventObject(gallery); dummy.SetGallery(gallery); dummy.SetGalleryItem(item); diff --git a/samples/scroll/scroll.cpp b/samples/scroll/scroll.cpp index 342bdfdf27..c31e0f45a7 100644 --- a/samples/scroll/scroll.cpp +++ b/samples/scroll/scroll.cpp @@ -126,9 +126,9 @@ public: mbar->Append(menuFile, "&File"); SetMenuBar( mbar ); - Connect(wxID_DELETE, wxEVT_COMMAND_MENU_SELECTED, + Connect(wxID_DELETE, wxEVT_MENU, wxCommandEventHandler(MyCanvasFrame::OnDeleteAll)); - Connect(wxID_NEW, wxEVT_COMMAND_MENU_SELECTED, + Connect(wxID_NEW, wxEVT_MENU, wxCommandEventHandler(MyCanvasFrame::OnInsertNew)); Show(); @@ -809,7 +809,7 @@ MySizerScrolledWindow::MySizerScrolledWindow(wxWindow *parent) SetSizer( sizer ); - Connect(wxID_RESIZE_FRAME, wxEVT_COMMAND_BUTTON_CLICKED, + Connect(wxID_RESIZE_FRAME, wxEVT_BUTTON, wxCommandEventHandler(MySizerScrolledWindow::OnResizeClick)); } diff --git a/samples/webview/webview.cpp b/samples/webview/webview.cpp index fc134a9498..42bae38685 100644 --- a/samples/webview/webview.cpp +++ b/samples/webview/webview.cpp @@ -416,104 +416,104 @@ WebFrame::WebFrame(const wxString& url) : // Connect the toolbar events - Connect(m_toolbar_back->GetId(), wxEVT_COMMAND_TOOL_CLICKED, + Connect(m_toolbar_back->GetId(), wxEVT_TOOL, wxCommandEventHandler(WebFrame::OnBack), NULL, this ); - Connect(m_toolbar_forward->GetId(), wxEVT_COMMAND_TOOL_CLICKED, + Connect(m_toolbar_forward->GetId(), wxEVT_TOOL, wxCommandEventHandler(WebFrame::OnForward), NULL, this ); - Connect(m_toolbar_stop->GetId(), wxEVT_COMMAND_TOOL_CLICKED, + Connect(m_toolbar_stop->GetId(), wxEVT_TOOL, wxCommandEventHandler(WebFrame::OnStop), NULL, this ); - Connect(m_toolbar_reload->GetId(), wxEVT_COMMAND_TOOL_CLICKED, + Connect(m_toolbar_reload->GetId(), wxEVT_TOOL, wxCommandEventHandler(WebFrame::OnReload),NULL, this ); - Connect(m_toolbar_tools->GetId(), wxEVT_COMMAND_TOOL_CLICKED, + Connect(m_toolbar_tools->GetId(), wxEVT_TOOL, wxCommandEventHandler(WebFrame::OnToolsClicked), NULL, this ); - Connect(m_url->GetId(), wxEVT_COMMAND_TEXT_ENTER, + Connect(m_url->GetId(), wxEVT_TEXT_ENTER, wxCommandEventHandler(WebFrame::OnUrl), NULL, this ); // Connect find toolbar events. - Connect(m_find_toolbar_done->GetId(), wxEVT_COMMAND_TOOL_CLICKED, + Connect(m_find_toolbar_done->GetId(), wxEVT_TOOL, wxCommandEventHandler(WebFrame::OnFindDone), NULL, this ); - Connect(m_find_toolbar_next->GetId(), wxEVT_COMMAND_TOOL_CLICKED, + Connect(m_find_toolbar_next->GetId(), wxEVT_TOOL, wxCommandEventHandler(WebFrame::OnFindText), NULL, this ); - Connect(m_find_toolbar_previous->GetId(), wxEVT_COMMAND_TOOL_CLICKED, + Connect(m_find_toolbar_previous->GetId(), wxEVT_TOOL, wxCommandEventHandler(WebFrame::OnFindText), NULL, this ); // Connect find control events. - Connect(m_find_ctrl->GetId(), wxEVT_COMMAND_TEXT_UPDATED, + Connect(m_find_ctrl->GetId(), wxEVT_TEXT, wxCommandEventHandler(WebFrame::OnFindText), NULL, this ); - Connect(m_find_ctrl->GetId(), wxEVT_COMMAND_TEXT_ENTER, + Connect(m_find_ctrl->GetId(), wxEVT_TEXT_ENTER, wxCommandEventHandler(WebFrame::OnFindText), NULL, this ); // Connect the webview events - Connect(m_browser->GetId(), wxEVT_COMMAND_WEBVIEW_NAVIGATING, + Connect(m_browser->GetId(), wxEVT_WEBVIEW_NAVIGATING, wxWebViewEventHandler(WebFrame::OnNavigationRequest), NULL, this); - Connect(m_browser->GetId(), wxEVT_COMMAND_WEBVIEW_NAVIGATED, + Connect(m_browser->GetId(), wxEVT_WEBVIEW_NAVIGATED, wxWebViewEventHandler(WebFrame::OnNavigationComplete), NULL, this); - Connect(m_browser->GetId(), wxEVT_COMMAND_WEBVIEW_LOADED, + Connect(m_browser->GetId(), wxEVT_WEBVIEW_LOADED, wxWebViewEventHandler(WebFrame::OnDocumentLoaded), NULL, this); - Connect(m_browser->GetId(), wxEVT_COMMAND_WEBVIEW_ERROR, + Connect(m_browser->GetId(), wxEVT_WEBVIEW_ERROR, wxWebViewEventHandler(WebFrame::OnError), NULL, this); - Connect(m_browser->GetId(), wxEVT_COMMAND_WEBVIEW_NEWWINDOW, + Connect(m_browser->GetId(), wxEVT_WEBVIEW_NEWWINDOW, wxWebViewEventHandler(WebFrame::OnNewWindow), NULL, this); - Connect(m_browser->GetId(), wxEVT_COMMAND_WEBVIEW_TITLE_CHANGED, + Connect(m_browser->GetId(), wxEVT_WEBVIEW_TITLE_CHANGED, wxWebViewEventHandler(WebFrame::OnTitleChanged), NULL, this); // Connect the menu events - Connect(viewSource->GetId(), wxEVT_COMMAND_MENU_SELECTED, + Connect(viewSource->GetId(), wxEVT_MENU, wxCommandEventHandler(WebFrame::OnViewSourceRequest), NULL, this ); - Connect(print->GetId(), wxEVT_COMMAND_MENU_SELECTED, + Connect(print->GetId(), wxEVT_MENU, wxCommandEventHandler(WebFrame::OnPrint), NULL, this ); - Connect(m_tools_layout->GetId(), wxEVT_COMMAND_MENU_SELECTED, + Connect(m_tools_layout->GetId(), wxEVT_MENU, wxCommandEventHandler(WebFrame::OnZoomLayout), NULL, this ); - Connect(m_tools_tiny->GetId(), wxEVT_COMMAND_MENU_SELECTED, + Connect(m_tools_tiny->GetId(), wxEVT_MENU, wxCommandEventHandler(WebFrame::OnSetZoom), NULL, this ); - Connect(m_tools_small->GetId(), wxEVT_COMMAND_MENU_SELECTED, + Connect(m_tools_small->GetId(), wxEVT_MENU, wxCommandEventHandler(WebFrame::OnSetZoom), NULL, this ); - Connect(m_tools_medium->GetId(), wxEVT_COMMAND_MENU_SELECTED, + Connect(m_tools_medium->GetId(), wxEVT_MENU, wxCommandEventHandler(WebFrame::OnSetZoom), NULL, this ); - Connect(m_tools_large->GetId(), wxEVT_COMMAND_MENU_SELECTED, + Connect(m_tools_large->GetId(), wxEVT_MENU, wxCommandEventHandler(WebFrame::OnSetZoom), NULL, this ); - Connect(m_tools_largest->GetId(), wxEVT_COMMAND_MENU_SELECTED, + Connect(m_tools_largest->GetId(), wxEVT_MENU, wxCommandEventHandler(WebFrame::OnSetZoom), NULL, this ); - Connect(clearhist->GetId(), wxEVT_COMMAND_MENU_SELECTED, + Connect(clearhist->GetId(), wxEVT_MENU, wxCommandEventHandler(WebFrame::OnClearHistory), NULL, this ); - Connect(m_tools_enable_history->GetId(), wxEVT_COMMAND_MENU_SELECTED, + Connect(m_tools_enable_history->GetId(), wxEVT_MENU, wxCommandEventHandler(WebFrame::OnEnableHistory), NULL, this ); - Connect(m_edit_cut->GetId(), wxEVT_COMMAND_MENU_SELECTED, + Connect(m_edit_cut->GetId(), wxEVT_MENU, wxCommandEventHandler(WebFrame::OnCut), NULL, this ); - Connect(m_edit_copy->GetId(), wxEVT_COMMAND_MENU_SELECTED, + Connect(m_edit_copy->GetId(), wxEVT_MENU, wxCommandEventHandler(WebFrame::OnCopy), NULL, this ); - Connect(m_edit_paste->GetId(), wxEVT_COMMAND_MENU_SELECTED, + Connect(m_edit_paste->GetId(), wxEVT_MENU, wxCommandEventHandler(WebFrame::OnPaste), NULL, this ); - Connect(m_edit_undo->GetId(), wxEVT_COMMAND_MENU_SELECTED, + Connect(m_edit_undo->GetId(), wxEVT_MENU, wxCommandEventHandler(WebFrame::OnUndo), NULL, this ); - Connect(m_edit_redo->GetId(), wxEVT_COMMAND_MENU_SELECTED, + Connect(m_edit_redo->GetId(), wxEVT_MENU, wxCommandEventHandler(WebFrame::OnRedo), NULL, this ); - Connect(m_edit_mode->GetId(), wxEVT_COMMAND_MENU_SELECTED, + Connect(m_edit_mode->GetId(), wxEVT_MENU, wxCommandEventHandler(WebFrame::OnMode), NULL, this ); - Connect(m_scroll_line_up->GetId(), wxEVT_COMMAND_MENU_SELECTED, + Connect(m_scroll_line_up->GetId(), wxEVT_MENU, wxCommandEventHandler(WebFrame::OnScrollLineUp), NULL, this ); - Connect(m_scroll_line_down->GetId(), wxEVT_COMMAND_MENU_SELECTED, + Connect(m_scroll_line_down->GetId(), wxEVT_MENU, wxCommandEventHandler(WebFrame::OnScrollLineDown), NULL, this ); - Connect(m_scroll_page_up->GetId(), wxEVT_COMMAND_MENU_SELECTED, + Connect(m_scroll_page_up->GetId(), wxEVT_MENU, wxCommandEventHandler(WebFrame::OnScrollPageUp), NULL, this ); - Connect(m_scroll_page_down->GetId(), wxEVT_COMMAND_MENU_SELECTED, + Connect(m_scroll_page_down->GetId(), wxEVT_MENU, wxCommandEventHandler(WebFrame::OnScrollPageDown), NULL, this ); - Connect(script->GetId(), wxEVT_COMMAND_MENU_SELECTED, + Connect(script->GetId(), wxEVT_MENU, wxCommandEventHandler(WebFrame::OnRunScript), NULL, this ); - Connect(m_selection_clear->GetId(), wxEVT_COMMAND_MENU_SELECTED, + Connect(m_selection_clear->GetId(), wxEVT_MENU, wxCommandEventHandler(WebFrame::OnClearSelection), NULL, this ); - Connect(m_selection_delete->GetId(), wxEVT_COMMAND_MENU_SELECTED, + Connect(m_selection_delete->GetId(), wxEVT_MENU, wxCommandEventHandler(WebFrame::OnDeleteSelection), NULL, this ); - Connect(selectall->GetId(), wxEVT_COMMAND_MENU_SELECTED, + Connect(selectall->GetId(), wxEVT_MENU, wxCommandEventHandler(WebFrame::OnSelectAll), NULL, this ); - Connect(loadscheme->GetId(), wxEVT_COMMAND_MENU_SELECTED, + Connect(loadscheme->GetId(), wxEVT_MENU, wxCommandEventHandler(WebFrame::OnLoadScheme), NULL, this ); - Connect(usememoryfs->GetId(), wxEVT_COMMAND_MENU_SELECTED, + Connect(usememoryfs->GetId(), wxEVT_MENU, wxCommandEventHandler(WebFrame::OnUseMemoryFS), NULL, this ); - Connect(m_find->GetId(), wxEVT_COMMAND_MENU_SELECTED, + Connect(m_find->GetId(), wxEVT_MENU, wxCommandEventHandler(WebFrame::OnFind), NULL, this ); - Connect(m_context_menu->GetId(), wxEVT_COMMAND_MENU_SELECTED, + Connect(m_context_menu->GetId(), wxEVT_MENU, wxCommandEventHandler(WebFrame::OnEnableContextMenu), NULL, this ); //Connect the idle events @@ -881,7 +881,7 @@ void WebFrame::OnToolsClicked(wxCommandEvent& WXUNUSED(evt)) { item = m_tools_history_menu->AppendRadioItem(wxID_ANY, back[i]->GetTitle()); m_histMenuItems[item->GetId()] = back[i]; - Connect(item->GetId(), wxEVT_COMMAND_MENU_SELECTED, + Connect(item->GetId(), wxEVT_MENU, wxCommandEventHandler(WebFrame::OnHistory), NULL, this ); } @@ -898,7 +898,7 @@ void WebFrame::OnToolsClicked(wxCommandEvent& WXUNUSED(evt)) { item = m_tools_history_menu->AppendRadioItem(wxID_ANY, forward[i]->GetTitle()); m_histMenuItems[item->GetId()] = forward[i]; - Connect(item->GetId(), wxEVT_COMMAND_TOOL_CLICKED, + Connect(item->GetId(), wxEVT_TOOL, wxCommandEventHandler(WebFrame::OnHistory), NULL, this ); } diff --git a/samples/widgets/bmpcombobox.cpp b/samples/widgets/bmpcombobox.cpp index d65f82c259..74b14b493c 100644 --- a/samples/widgets/bmpcombobox.cpp +++ b/samples/widgets/bmpcombobox.cpp @@ -803,7 +803,7 @@ void BitmapComboBoxWidgetsPage::OnComboText(wxCommandEvent& event) wxASSERT_MSG( s == m_combobox->GetValue(), wxT("event and combobox values should be the same") ); - if (event.GetEventType() == wxEVT_COMMAND_TEXT_ENTER) + if (event.GetEventType() == wxEVT_TEXT_ENTER) { wxLogMessage(wxT("BitmapCombobox enter pressed (now '%s')"), s.c_str()); } diff --git a/samples/widgets/combobox.cpp b/samples/widgets/combobox.cpp index 23fd516a01..7f1bf88a2f 100644 --- a/samples/widgets/combobox.cpp +++ b/samples/widgets/combobox.cpp @@ -654,7 +654,7 @@ void ComboboxWidgetsPage::OnComboText(wxCommandEvent& event) wxASSERT_MSG( s == m_combobox->GetValue(), wxT("event and combobox values should be the same") ); - if (event.GetEventType() == wxEVT_COMMAND_TEXT_ENTER) + if (event.GetEventType() == wxEVT_TEXT_ENTER) { wxLogMessage(wxT("Combobox enter pressed (now '%s')"), s.c_str()); } diff --git a/samples/widgets/odcombobox.cpp b/samples/widgets/odcombobox.cpp index 6473e51983..c29e7e88cc 100644 --- a/samples/widgets/odcombobox.cpp +++ b/samples/widgets/odcombobox.cpp @@ -764,7 +764,7 @@ void ODComboboxWidgetsPage::OnComboText(wxCommandEvent& event) wxASSERT_MSG( s == m_combobox->GetValue(), wxT("event and combobox values should be the same") ); - if (event.GetEventType() == wxEVT_COMMAND_TEXT_ENTER) + if (event.GetEventType() == wxEVT_TEXT_ENTER) { wxLogMessage(wxT("OwnerDrawnCombobox enter pressed (now '%s')"), s.c_str()); } diff --git a/samples/widgets/searchctrl.cpp b/samples/widgets/searchctrl.cpp index 4c8e900c40..beedb630b2 100644 --- a/samples/widgets/searchctrl.cpp +++ b/samples/widgets/searchctrl.cpp @@ -198,7 +198,7 @@ wxMenu* SearchCtrlWidgetsPage::CreateTestMenu() // target->Connect( // ID_SEARCHMENU, // ID_SEARCHMENU+SEARCH_MENU_SIZE, -// wxEVT_COMMAND_MENU_SELECTED, +// wxEVT_MENU, // wxCommandEventHandler(MySearchCtrl::OnSearchMenu) // ); return menu; diff --git a/samples/widgets/statbmp.cpp b/samples/widgets/statbmp.cpp index 6449d23ef9..12ec4704b8 100644 --- a/samples/widgets/statbmp.cpp +++ b/samples/widgets/statbmp.cpp @@ -104,9 +104,9 @@ void StatBmpWidgetsPage::CreateContent() wxInitAllImageHandlers(); - Connect(wxEVT_COMMAND_FILEPICKER_CHANGED, + Connect(wxEVT_FILEPICKER_CHANGED, wxFileDirPickerEventHandler(StatBmpWidgetsPage::OnFileChange)); - Connect(wxEVT_COMMAND_RADIOBOX_SELECTED, + Connect(wxEVT_RADIOBOX, wxCommandEventHandler(StatBmpWidgetsPage::OnRadioChange)); m_statbmp = NULL; diff --git a/samples/widgets/static.cpp b/samples/widgets/static.cpp index 58a2d0610e..3307ae047b 100644 --- a/samples/widgets/static.cpp +++ b/samples/widgets/static.cpp @@ -299,7 +299,7 @@ void StaticWidgetsPage::CreateContent() m_textBox = new wxTextCtrl(this, wxID_ANY, wxEmptyString); wxButton *b1 = new wxButton(this, wxID_ANY, "Change &box label"); - b1->Connect(wxEVT_COMMAND_BUTTON_CLICKED, + b1->Connect(wxEVT_BUTTON, wxCommandEventHandler(StaticWidgetsPage::OnButtonBoxText), NULL, this); sizerMiddle->Add(m_textBox, 0, wxEXPAND|wxALL, 5); @@ -309,7 +309,7 @@ void StaticWidgetsPage::CreateContent() wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxHSCROLL); wxButton *b2 = new wxButton(this, wxID_ANY, "Change &text label"); - b2->Connect(wxEVT_COMMAND_BUTTON_CLICKED, + b2->Connect(wxEVT_BUTTON, wxCommandEventHandler(StaticWidgetsPage::OnButtonLabelText), NULL, this); sizerMiddle->Add(m_textLabel, 0, wxEXPAND|wxALL, 5); @@ -321,7 +321,7 @@ void StaticWidgetsPage::CreateContent() wxTE_MULTILINE|wxHSCROLL); wxButton *b3 = new wxButton(this, wxID_ANY, "Change decorated text label"); - b3->Connect(wxEVT_COMMAND_BUTTON_CLICKED, + b3->Connect(wxEVT_BUTTON, wxCommandEventHandler(StaticWidgetsPage::OnButtonLabelWithMarkupText), NULL, this); sizerMiddle->Add(m_textLabelWithMarkup, 0, wxEXPAND|wxALL, 5); diff --git a/samples/widgets/widgets.h b/samples/widgets/widgets.h index 21baa5105b..32ea550ed1 100644 --- a/samples/widgets/widgets.h +++ b/samples/widgets/widgets.h @@ -18,7 +18,7 @@ #define WidgetsBookCtrl wxTreebook #define WidgetsBookCtrlEvent wxTreebookEvent #define EVT_WIDGETS_PAGE_CHANGING(id,func) EVT_TREEBOOK_PAGE_CHANGING(id,func) - #define wxEVT_COMMAND_WIDGETS_PAGE_CHANGED wxEVT_COMMAND_TREEBOOK_PAGE_CHANGED + #define wxEVT_COMMAND_WIDGETS_PAGE_CHANGED wxEVT_TREEBOOK_PAGE_CHANGED #define wxWidgetsbookEventHandler(func) wxTreebookEventHandler(func) #else #include "wx/bookctrl.h" @@ -26,7 +26,7 @@ #define WidgetsBookCtrl wxBookCtrl #define WidgetsBookCtrlEvent wxBookCtrlEvent #define EVT_WIDGETS_PAGE_CHANGING(id,func) EVT_BOOKCTRL_PAGE_CHANGING(id,func) - #define wxEVT_COMMAND_WIDGETS_PAGE_CHANGED wxEVT_COMMAND_BOOKCTRL_PAGE_CHANGED + #define wxEVT_COMMAND_WIDGETS_PAGE_CHANGED wxEVT_BOOKCTRL_PAGE_CHANGED #define wxWidgetsbookEventHandler(func) wxBookCtrlEventHandler(func) #endif diff --git a/samples/wrapsizer/wrapsizer.cpp b/samples/wrapsizer/wrapsizer.cpp index 7ad2c93903..ad2c6fc6bf 100644 --- a/samples/wrapsizer/wrapsizer.cpp +++ b/samples/wrapsizer/wrapsizer.cpp @@ -145,7 +145,7 @@ WrapSizerFrame::WrapSizerFrame() // OK Button sizerRoot->Add(new wxButton(m_panel, wxID_OK), wxSizerFlags().Centre().DoubleBorder()); - Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, + Connect(wxID_OK, wxEVT_BUTTON, wxCommandEventHandler(WrapSizerFrame::OnButton)); // Set sizer for the panel diff --git a/samples/xrc/myframe.cpp b/samples/xrc/myframe.cpp index 509ea31833..3a2dfc0dac 100644 --- a/samples/xrc/myframe.cpp +++ b/samples/xrc/myframe.cpp @@ -255,7 +255,7 @@ void MyFrame::OnControlsToolOrMenuCommand(wxCommandEvent& WXUNUSED(event)) #if wxUSE_ANIMATIONCTRL // dynamically connect our event handler for the "clicked" event of the "play" button // in the animation ctrl page of our dialog - dlg.Connect(XRCID("controls_animation_button_play"), wxEVT_COMMAND_BUTTON_CLICKED, + dlg.Connect(XRCID("controls_animation_button_play"), wxEVT_BUTTON, wxCommandEventHandler(MyFrame::OnAnimationCtrlPlay)); #endif diff --git a/samples/xrc/objrefdlg.cpp b/samples/xrc/objrefdlg.cpp index 3421f2dc8f..0b0b625ece 100644 --- a/samples/xrc/objrefdlg.cpp +++ b/samples/xrc/objrefdlg.cpp @@ -49,7 +49,7 @@ ObjrefDialog::ObjrefDialog(wxWindow* parent) wxCHECK_RET(nb, "failed to find objref_notebook"); // Connect different event handlers. - nb->Connect(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, + nb->Connect(wxEVT_NOTEBOOK_PAGE_CHANGED, wxNotebookEventHandler(ObjrefDialog::OnNotebookPageChanged), NULL, this); @@ -74,11 +74,11 @@ ObjrefDialog::ObjrefDialog(wxWindow* parent) // Connect the id ranges, using the [start] and [end] 'typedefs' page = nb->GetPage(calc_page); page->Connect(XRCID("digits[start]"), XRCID("digits[end]"), - wxEVT_COMMAND_BUTTON_CLICKED, + wxEVT_BUTTON, wxCommandEventHandler(ObjrefDialog::OnNumeralClick), NULL, this); page->Connect(XRCID("operators[start]"), XRCID("operators[end]"), - wxEVT_COMMAND_BUTTON_CLICKED, + wxEVT_BUTTON, wxCommandEventHandler(ObjrefDialog::OnOperatorClick), NULL, this); diff --git a/src/aui/auibar.cpp b/src/aui/auibar.cpp index a7451849a3..df3e57c8c4 100644 --- a/src/aui/auibar.cpp +++ b/src/aui/auibar.cpp @@ -44,11 +44,11 @@ WX_DEFINE_OBJARRAY(wxAuiToolBarItemArray) -wxDEFINE_EVENT( wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN, wxAuiToolBarEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_AUITOOLBAR_OVERFLOW_CLICK, wxAuiToolBarEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_AUITOOLBAR_RIGHT_CLICK, wxAuiToolBarEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_AUITOOLBAR_MIDDLE_CLICK, wxAuiToolBarEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_AUITOOLBAR_BEGIN_DRAG, wxAuiToolBarEvent ); +wxDEFINE_EVENT( wxEVT_AUITOOLBAR_TOOL_DROPDOWN, wxAuiToolBarEvent ); +wxDEFINE_EVENT( wxEVT_AUITOOLBAR_OVERFLOW_CLICK, wxAuiToolBarEvent ); +wxDEFINE_EVENT( wxEVT_AUITOOLBAR_RIGHT_CLICK, wxAuiToolBarEvent ); +wxDEFINE_EVENT( wxEVT_AUITOOLBAR_MIDDLE_CLICK, wxAuiToolBarEvent ); +wxDEFINE_EVENT( wxEVT_AUITOOLBAR_BEGIN_DRAG, wxAuiToolBarEvent ); IMPLEMENT_CLASS(wxAuiToolBar, wxControl) @@ -101,7 +101,7 @@ public: bool ProcessEvent(wxEvent& evt) { - if (evt.GetEventType() == wxEVT_COMMAND_MENU_SELECTED) + if (evt.GetEventType() == wxEVT_MENU) { m_lastId = evt.GetId(); return true; @@ -2506,7 +2506,7 @@ void wxAuiToolBar::OnLeftDown(wxMouseEvent& evt) m_overflowVisible && overflow_rect.Contains(evt.m_x, evt.m_y)) { - wxAuiToolBarEvent e(wxEVT_COMMAND_AUITOOLBAR_OVERFLOW_CLICK, -1); + wxAuiToolBarEvent e(wxEVT_AUITOOLBAR_OVERFLOW_CLICK, -1); e.SetEventObject(this); e.SetToolId(-1); e.SetClickPoint(wxPoint(evt.GetX(), evt.GetY())); @@ -2545,7 +2545,7 @@ void wxAuiToolBar::OnLeftDown(wxMouseEvent& evt) Refresh(false); if (res != -1) { - wxCommandEvent event(wxEVT_COMMAND_MENU_SELECTED, res); + wxCommandEvent event(wxEVT_MENU, res); event.SetEventObject(this); GetParent()->GetEventHandler()->ProcessEvent(event); } @@ -2571,7 +2571,7 @@ void wxAuiToolBar::OnLeftDown(wxMouseEvent& evt) UnsetToolTip(); // fire the tool dropdown event - wxAuiToolBarEvent e(wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN, m_actionItem->m_toolId); + wxAuiToolBarEvent e(wxEVT_AUITOOLBAR_TOOL_DROPDOWN, m_actionItem->m_toolId); e.SetEventObject(this); e.SetToolId(m_actionItem->m_toolId); @@ -2634,7 +2634,7 @@ void wxAuiToolBar::OnLeftUp(wxMouseEvent& evt) { UnsetToolTip(); - wxCommandEvent e(wxEVT_COMMAND_MENU_SELECTED, m_actionItem->m_toolId); + wxCommandEvent e(wxEVT_MENU, m_actionItem->m_toolId); e.SetEventObject(this); if (hitItem->m_kind == wxITEM_CHECK || hitItem->m_kind == wxITEM_RADIO) @@ -2713,7 +2713,7 @@ void wxAuiToolBar::OnRightUp(wxMouseEvent& evt) if (m_actionItem && hitItem == m_actionItem) { - wxAuiToolBarEvent e(wxEVT_COMMAND_AUITOOLBAR_RIGHT_CLICK, m_actionItem->m_toolId); + wxAuiToolBarEvent e(wxEVT_AUITOOLBAR_RIGHT_CLICK, m_actionItem->m_toolId); e.SetEventObject(this); e.SetToolId(m_actionItem->m_toolId); e.SetClickPoint(m_actionPos); @@ -2723,7 +2723,7 @@ void wxAuiToolBar::OnRightUp(wxMouseEvent& evt) else { // right-clicked on the invalid area of the toolbar - wxAuiToolBarEvent e(wxEVT_COMMAND_AUITOOLBAR_RIGHT_CLICK, -1); + wxAuiToolBarEvent e(wxEVT_AUITOOLBAR_RIGHT_CLICK, -1); e.SetEventObject(this); e.SetToolId(-1); e.SetClickPoint(m_actionPos); @@ -2784,7 +2784,7 @@ void wxAuiToolBar::OnMiddleUp(wxMouseEvent& evt) { if (hitItem->m_kind == wxITEM_NORMAL) { - wxAuiToolBarEvent e(wxEVT_COMMAND_AUITOOLBAR_MIDDLE_CLICK, m_actionItem->m_toolId); + wxAuiToolBarEvent e(wxEVT_AUITOOLBAR_MIDDLE_CLICK, m_actionItem->m_toolId); e.SetEventObject(this); e.SetToolId(m_actionItem->m_toolId); e.SetClickPoint(m_actionPos); @@ -2808,7 +2808,7 @@ void wxAuiToolBar::OnMotion(wxMouseEvent& evt) { // TODO: sending this event only makes sense if there is an 'END_DRAG' // event sent sometime in the future (see OnLeftUp()) - wxAuiToolBarEvent e(wxEVT_COMMAND_AUITOOLBAR_BEGIN_DRAG, GetId()); + wxAuiToolBarEvent e(wxEVT_AUITOOLBAR_BEGIN_DRAG, GetId()); e.SetEventObject(this); e.SetToolId(m_actionItem->m_toolId); m_dragging = GetEventHandler()->ProcessEvent(e) && !e.GetSkipped(); diff --git a/src/aui/auibook.cpp b/src/aui/auibook.cpp index 2b64833d72..caa36cbb33 100644 --- a/src/aui/auibook.cpp +++ b/src/aui/auibook.cpp @@ -38,22 +38,22 @@ WX_DEFINE_OBJARRAY(wxAuiNotebookPageArray) WX_DEFINE_OBJARRAY(wxAuiTabContainerButtonArray) -wxDEFINE_EVENT(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, wxAuiNotebookEvent); -wxDEFINE_EVENT(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSED, wxAuiNotebookEvent); -wxDEFINE_EVENT(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING, wxAuiNotebookEvent); -wxDEFINE_EVENT(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, wxAuiNotebookEvent); -wxDEFINE_EVENT(wxEVT_COMMAND_AUINOTEBOOK_BUTTON, wxAuiNotebookEvent); -wxDEFINE_EVENT(wxEVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG, wxAuiNotebookEvent); -wxDEFINE_EVENT(wxEVT_COMMAND_AUINOTEBOOK_END_DRAG, wxAuiNotebookEvent); -wxDEFINE_EVENT(wxEVT_COMMAND_AUINOTEBOOK_CANCEL_DRAG, wxAuiNotebookEvent); -wxDEFINE_EVENT(wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION, wxAuiNotebookEvent); -wxDEFINE_EVENT(wxEVT_COMMAND_AUINOTEBOOK_ALLOW_DND, wxAuiNotebookEvent); -wxDEFINE_EVENT(wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK, wxAuiNotebookEvent); -wxDEFINE_EVENT(wxEVT_COMMAND_AUINOTEBOOK_DRAG_DONE, wxAuiNotebookEvent); -wxDEFINE_EVENT(wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP, wxAuiNotebookEvent); -wxDEFINE_EVENT(wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN, wxAuiNotebookEvent); -wxDEFINE_EVENT(wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP, wxAuiNotebookEvent); -wxDEFINE_EVENT(wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN, wxAuiNotebookEvent); +wxDEFINE_EVENT(wxEVT_AUINOTEBOOK_PAGE_CLOSE, wxAuiNotebookEvent); +wxDEFINE_EVENT(wxEVT_AUINOTEBOOK_PAGE_CLOSED, wxAuiNotebookEvent); +wxDEFINE_EVENT(wxEVT_AUINOTEBOOK_PAGE_CHANGING, wxAuiNotebookEvent); +wxDEFINE_EVENT(wxEVT_AUINOTEBOOK_PAGE_CHANGED, wxAuiNotebookEvent); +wxDEFINE_EVENT(wxEVT_AUINOTEBOOK_BUTTON, wxAuiNotebookEvent); +wxDEFINE_EVENT(wxEVT_AUINOTEBOOK_BEGIN_DRAG, wxAuiNotebookEvent); +wxDEFINE_EVENT(wxEVT_AUINOTEBOOK_END_DRAG, wxAuiNotebookEvent); +wxDEFINE_EVENT(wxEVT_AUINOTEBOOK_CANCEL_DRAG, wxAuiNotebookEvent); +wxDEFINE_EVENT(wxEVT_AUINOTEBOOK_DRAG_MOTION, wxAuiNotebookEvent); +wxDEFINE_EVENT(wxEVT_AUINOTEBOOK_ALLOW_DND, wxAuiNotebookEvent); +wxDEFINE_EVENT(wxEVT_AUINOTEBOOK_BG_DCLICK, wxAuiNotebookEvent); +wxDEFINE_EVENT(wxEVT_AUINOTEBOOK_DRAG_DONE, wxAuiNotebookEvent); +wxDEFINE_EVENT(wxEVT_AUINOTEBOOK_TAB_MIDDLE_UP, wxAuiNotebookEvent); +wxDEFINE_EVENT(wxEVT_AUINOTEBOOK_TAB_MIDDLE_DOWN, wxAuiNotebookEvent); +wxDEFINE_EVENT(wxEVT_AUINOTEBOOK_TAB_RIGHT_UP, wxAuiNotebookEvent); +wxDEFINE_EVENT(wxEVT_AUINOTEBOOK_TAB_RIGHT_DOWN, wxAuiNotebookEvent); IMPLEMENT_CLASS(wxAuiNotebook, wxControl) IMPLEMENT_CLASS(wxAuiTabCtrl, wxControl) @@ -1049,7 +1049,7 @@ void wxAuiTabCtrl::OnLeftDown(wxMouseEvent& evt) if ((new_selection != GetActivePage() || wxDynamicCast(GetParent(), wxAuiNotebook)) && !m_hoverButton) { - wxAuiNotebookEvent e(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING, m_windowId); + wxAuiNotebookEvent e(wxEVT_AUINOTEBOOK_PAGE_CHANGING, m_windowId); e.SetSelection(new_selection); e.SetOldSelection(GetActivePage()); e.SetEventObject(this); @@ -1076,7 +1076,7 @@ void wxAuiTabCtrl::OnCaptureLost(wxMouseCaptureLostEvent& WXUNUSED(event)) { m_isDragging = false; - wxAuiNotebookEvent evt(wxEVT_COMMAND_AUINOTEBOOK_CANCEL_DRAG, m_windowId); + wxAuiNotebookEvent evt(wxEVT_AUINOTEBOOK_CANCEL_DRAG, m_windowId); evt.SetSelection(GetIdxFromWindow(m_clickTab)); evt.SetOldSelection(evt.GetSelection()); evt.SetEventObject(this); @@ -1093,7 +1093,7 @@ void wxAuiTabCtrl::OnLeftUp(wxMouseEvent& evt) { m_isDragging = false; - wxAuiNotebookEvent e(wxEVT_COMMAND_AUINOTEBOOK_END_DRAG, m_windowId); + wxAuiNotebookEvent e(wxEVT_AUINOTEBOOK_END_DRAG, m_windowId); e.SetSelection(GetIdxFromWindow(m_clickTab)); e.SetOldSelection(e.GetSelection()); e.SetEventObject(this); @@ -1121,7 +1121,7 @@ void wxAuiTabCtrl::OnLeftUp(wxMouseEvent& evt) if (!(m_pressedButton->curState & wxAUI_BUTTON_STATE_DISABLED)) { - wxAuiNotebookEvent e(wxEVT_COMMAND_AUINOTEBOOK_BUTTON, m_windowId); + wxAuiNotebookEvent e(wxEVT_AUINOTEBOOK_BUTTON, m_windowId); e.SetSelection(GetIdxFromWindow(m_clickTab)); e.SetInt(m_pressedButton->id); e.SetEventObject(this); @@ -1142,7 +1142,7 @@ void wxAuiTabCtrl::OnMiddleUp(wxMouseEvent& evt) if (!TabHitTest(evt.m_x, evt.m_y, &wnd)) return; - wxAuiNotebookEvent e(wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP, m_windowId); + wxAuiNotebookEvent e(wxEVT_AUINOTEBOOK_TAB_MIDDLE_UP, m_windowId); e.SetEventObject(this); e.SetSelection(GetIdxFromWindow(wnd)); GetEventHandler()->ProcessEvent(e); @@ -1154,7 +1154,7 @@ void wxAuiTabCtrl::OnMiddleDown(wxMouseEvent& evt) if (!TabHitTest(evt.m_x, evt.m_y, &wnd)) return; - wxAuiNotebookEvent e(wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN, m_windowId); + wxAuiNotebookEvent e(wxEVT_AUINOTEBOOK_TAB_MIDDLE_DOWN, m_windowId); e.SetEventObject(this); e.SetSelection(GetIdxFromWindow(wnd)); GetEventHandler()->ProcessEvent(e); @@ -1166,7 +1166,7 @@ void wxAuiTabCtrl::OnRightUp(wxMouseEvent& evt) if (!TabHitTest(evt.m_x, evt.m_y, &wnd)) return; - wxAuiNotebookEvent e(wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP, m_windowId); + wxAuiNotebookEvent e(wxEVT_AUINOTEBOOK_TAB_RIGHT_UP, m_windowId); e.SetEventObject(this); e.SetSelection(GetIdxFromWindow(wnd)); GetEventHandler()->ProcessEvent(e); @@ -1178,7 +1178,7 @@ void wxAuiTabCtrl::OnRightDown(wxMouseEvent& evt) if (!TabHitTest(evt.m_x, evt.m_y, &wnd)) return; - wxAuiNotebookEvent e(wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN, m_windowId); + wxAuiNotebookEvent e(wxEVT_AUINOTEBOOK_TAB_RIGHT_DOWN, m_windowId); e.SetEventObject(this); e.SetSelection(GetIdxFromWindow(wnd)); GetEventHandler()->ProcessEvent(e); @@ -1190,7 +1190,7 @@ void wxAuiTabCtrl::OnLeftDClick(wxMouseEvent& evt) wxAuiTabContainerButton* button; if (!TabHitTest(evt.m_x, evt.m_y, &wnd) && !ButtonHitTest(evt.m_x, evt.m_y, &button)) { - wxAuiNotebookEvent e(wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK, m_windowId); + wxAuiNotebookEvent e(wxEVT_AUINOTEBOOK_BG_DCLICK, m_windowId); e.SetEventObject(this); GetEventHandler()->ProcessEvent(e); } @@ -1253,7 +1253,7 @@ void wxAuiTabCtrl::OnMotion(wxMouseEvent& evt) if (m_isDragging) { - wxAuiNotebookEvent e(wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION, m_windowId); + wxAuiNotebookEvent e(wxEVT_AUINOTEBOOK_DRAG_MOTION, m_windowId); e.SetSelection(GetIdxFromWindow(m_clickTab)); e.SetOldSelection(e.GetSelection()); e.SetEventObject(this); @@ -1268,7 +1268,7 @@ void wxAuiTabCtrl::OnMotion(wxMouseEvent& evt) if (abs(pos.x - m_clickPt.x) > drag_x_threshold || abs(pos.y - m_clickPt.y) > drag_y_threshold) { - wxAuiNotebookEvent e(wxEVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG, m_windowId); + wxAuiNotebookEvent e(wxEVT_AUINOTEBOOK_BEGIN_DRAG, m_windowId); e.SetSelection(GetIdxFromWindow(m_clickTab)); e.SetOldSelection(e.GetSelection()); e.SetEventObject(this); @@ -1317,7 +1317,7 @@ void wxAuiTabCtrl::OnButton(wxAuiNotebookEvent& event) if (idx != -1) { - wxAuiNotebookEvent e(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING, m_windowId); + wxAuiNotebookEvent e(wxEVT_AUINOTEBOOK_PAGE_CHANGING, m_windowId); e.SetSelection(idx); e.SetOldSelection(GetActivePage()); e.SetEventObject(this); @@ -1453,7 +1453,7 @@ void wxAuiTabCtrl::OnChar(wxKeyEvent& event) if (newPage != -1) { - wxAuiNotebookEvent e(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING, m_windowId); + wxAuiNotebookEvent e(wxEVT_AUINOTEBOOK_PAGE_CHANGING, m_windowId); e.SetSelection(newPage); e.SetOldSelection(newPage); e.SetEventObject(this); @@ -1614,37 +1614,37 @@ BEGIN_EVENT_TABLE(wxAuiNotebook, wxControl) EVT_SIZE(wxAuiNotebook::OnSize) EVT_CHILD_FOCUS(wxAuiNotebook::OnChildFocusNotebook) EVT_AUI_RANGE(wxAuiBaseTabCtrlId, wxAuiBaseTabCtrlId+500, - wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING, + wxEVT_AUINOTEBOOK_PAGE_CHANGING, wxAuiNotebook::OnTabClicked) EVT_AUI_RANGE(wxAuiBaseTabCtrlId, wxAuiBaseTabCtrlId+500, - wxEVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG, + wxEVT_AUINOTEBOOK_BEGIN_DRAG, wxAuiNotebook::OnTabBeginDrag) EVT_AUI_RANGE(wxAuiBaseTabCtrlId, wxAuiBaseTabCtrlId+500, - wxEVT_COMMAND_AUINOTEBOOK_END_DRAG, + wxEVT_AUINOTEBOOK_END_DRAG, wxAuiNotebook::OnTabEndDrag) EVT_AUI_RANGE(wxAuiBaseTabCtrlId, wxAuiBaseTabCtrlId+500, - wxEVT_COMMAND_AUINOTEBOOK_CANCEL_DRAG, + wxEVT_AUINOTEBOOK_CANCEL_DRAG, wxAuiNotebook::OnTabCancelDrag) EVT_AUI_RANGE(wxAuiBaseTabCtrlId, wxAuiBaseTabCtrlId+500, - wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION, + wxEVT_AUINOTEBOOK_DRAG_MOTION, wxAuiNotebook::OnTabDragMotion) EVT_AUI_RANGE(wxAuiBaseTabCtrlId, wxAuiBaseTabCtrlId+500, - wxEVT_COMMAND_AUINOTEBOOK_BUTTON, + wxEVT_AUINOTEBOOK_BUTTON, wxAuiNotebook::OnTabButton) EVT_AUI_RANGE(wxAuiBaseTabCtrlId, wxAuiBaseTabCtrlId+500, - wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN, + wxEVT_AUINOTEBOOK_TAB_MIDDLE_DOWN, wxAuiNotebook::OnTabMiddleDown) EVT_AUI_RANGE(wxAuiBaseTabCtrlId, wxAuiBaseTabCtrlId+500, - wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP, + wxEVT_AUINOTEBOOK_TAB_MIDDLE_UP, wxAuiNotebook::OnTabMiddleUp) EVT_AUI_RANGE(wxAuiBaseTabCtrlId, wxAuiBaseTabCtrlId+500, - wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN, + wxEVT_AUINOTEBOOK_TAB_RIGHT_DOWN, wxAuiNotebook::OnTabRightDown) EVT_AUI_RANGE(wxAuiBaseTabCtrlId, wxAuiBaseTabCtrlId+500, - wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP, + wxEVT_AUINOTEBOOK_TAB_RIGHT_UP, wxAuiNotebook::OnTabRightUp) EVT_AUI_RANGE(wxAuiBaseTabCtrlId, wxAuiBaseTabCtrlId+500, - wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK, + wxEVT_AUINOTEBOOK_BG_DCLICK, wxAuiNotebook::OnTabBgDClick) EVT_NAVIGATION_KEY(wxAuiNotebook::OnNavigationKeyNotebook) END_EVENT_TABLE() @@ -2496,7 +2496,7 @@ void wxAuiNotebook::OnTabBgDClick(wxAuiNotebookEvent& evt) } // notify owner that the tabbar background has been double-clicked - wxAuiNotebookEvent e(wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK, m_windowId); + wxAuiNotebookEvent e(wxEVT_AUINOTEBOOK_BG_DCLICK, m_windowId); e.SetEventObject(this); GetEventHandler()->ProcessEvent(e); } @@ -2674,7 +2674,7 @@ void wxAuiNotebook::OnTabEndDrag(wxAuiNotebookEvent& evt) { // find out from the destination control // if it's ok to drop this tab here - wxAuiNotebookEvent e(wxEVT_COMMAND_AUINOTEBOOK_ALLOW_DND, m_windowId); + wxAuiNotebookEvent e(wxEVT_AUINOTEBOOK_ALLOW_DND, m_windowId); e.SetSelection(evt.GetSelection()); e.SetOldSelection(evt.GetSelection()); e.SetEventObject(this); @@ -2747,7 +2747,7 @@ void wxAuiNotebook::OnTabEndDrag(wxAuiNotebookEvent& evt) nb->SetSelectionToPage(page_info); // notify owner that the tab has been dragged - wxAuiNotebookEvent e2(wxEVT_COMMAND_AUINOTEBOOK_DRAG_DONE, m_windowId); + wxAuiNotebookEvent e2(wxEVT_AUINOTEBOOK_DRAG_DONE, m_windowId); e2.SetSelection(evt.GetSelection()); e2.SetOldSelection(evt.GetSelection()); e2.SetEventObject(this); @@ -2856,7 +2856,7 @@ void wxAuiNotebook::OnTabEndDrag(wxAuiNotebookEvent& evt) } // notify owner that the tab has been dragged - wxAuiNotebookEvent e(wxEVT_COMMAND_AUINOTEBOOK_DRAG_DONE, m_windowId); + wxAuiNotebookEvent e(wxEVT_AUINOTEBOOK_DRAG_DONE, m_windowId); e.SetSelection(evt.GetSelection()); e.SetOldSelection(evt.GetSelection()); e.SetEventObject(this); @@ -3099,7 +3099,7 @@ void wxAuiNotebook::OnTabButton(wxAuiNotebookEvent& evt) wxWindow* close_wnd = tabs->GetWindowFromIdx(selection); // ask owner if it's ok to close the tab - wxAuiNotebookEvent e(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, m_windowId); + wxAuiNotebookEvent e(wxEVT_AUINOTEBOOK_PAGE_CLOSE, m_windowId); e.SetSelection(m_tabs.GetIdxFromWindow(close_wnd)); const int idx = m_tabs.GetIdxFromWindow(close_wnd); e.SetSelection(idx); @@ -3125,7 +3125,7 @@ void wxAuiNotebook::OnTabButton(wxAuiNotebookEvent& evt) } // notify owner that the tab has been closed - wxAuiNotebookEvent e2(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSED, m_windowId); + wxAuiNotebookEvent e2(wxEVT_AUINOTEBOOK_PAGE_CLOSED, m_windowId); e2.SetSelection(idx); e2.SetEventObject(this); GetEventHandler()->ProcessEvent(e2); @@ -3140,7 +3140,7 @@ void wxAuiNotebook::OnTabMiddleDown(wxAuiNotebookEvent& evt) wxAuiTabCtrl* tabs = (wxAuiTabCtrl*)evt.GetEventObject(); wxWindow* wnd = tabs->GetWindowFromIdx(evt.GetSelection()); - wxAuiNotebookEvent e(wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN, m_windowId); + wxAuiNotebookEvent e(wxEVT_AUINOTEBOOK_TAB_MIDDLE_DOWN, m_windowId); e.SetSelection(m_tabs.GetIdxFromWindow(wnd)); e.SetEventObject(this); GetEventHandler()->ProcessEvent(e); @@ -3156,7 +3156,7 @@ void wxAuiNotebook::OnTabMiddleUp(wxAuiNotebookEvent& evt) wxAuiTabCtrl* tabs = (wxAuiTabCtrl*)evt.GetEventObject(); wxWindow* wnd = tabs->GetWindowFromIdx(evt.GetSelection()); - wxAuiNotebookEvent e(wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP, m_windowId); + wxAuiNotebookEvent e(wxEVT_AUINOTEBOOK_TAB_MIDDLE_UP, m_windowId); e.SetSelection(m_tabs.GetIdxFromWindow(wnd)); e.SetEventObject(this); if (GetEventHandler()->ProcessEvent(e)) @@ -3179,7 +3179,7 @@ void wxAuiNotebook::OnTabRightDown(wxAuiNotebookEvent& evt) wxAuiTabCtrl* tabs = (wxAuiTabCtrl*)evt.GetEventObject(); wxWindow* wnd = tabs->GetWindowFromIdx(evt.GetSelection()); - wxAuiNotebookEvent e(wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN, m_windowId); + wxAuiNotebookEvent e(wxEVT_AUINOTEBOOK_TAB_RIGHT_DOWN, m_windowId); e.SetSelection(m_tabs.GetIdxFromWindow(wnd)); e.SetEventObject(this); GetEventHandler()->ProcessEvent(e); @@ -3191,7 +3191,7 @@ void wxAuiNotebook::OnTabRightUp(wxAuiNotebookEvent& evt) wxAuiTabCtrl* tabs = (wxAuiTabCtrl*)evt.GetEventObject(); wxWindow* wnd = tabs->GetWindowFromIdx(evt.GetSelection()); - wxAuiNotebookEvent e(wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP, m_windowId); + wxAuiNotebookEvent e(wxEVT_AUINOTEBOOK_TAB_RIGHT_UP, m_windowId); e.SetSelection(m_tabs.GetIdxFromWindow(wnd)); e.SetEventObject(this); GetEventHandler()->ProcessEvent(e); @@ -3258,7 +3258,7 @@ bool wxAuiNotebook::ShowWindowMenu() if (idx != -1) { - wxAuiNotebookEvent e(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING, tabCtrl->GetId()); + wxAuiNotebookEvent e(wxEVT_AUINOTEBOOK_PAGE_CHANGING, tabCtrl->GetId()); e.SetSelection(idx); e.SetOldSelection(tabCtrl->GetActivePage()); e.SetEventObject(tabCtrl); @@ -3364,7 +3364,7 @@ int wxAuiNotebook::DoModifySelection(size_t n, bool events) bool vetoed = false; - wxAuiNotebookEvent evt(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING, m_windowId); + wxAuiNotebookEvent evt(wxEVT_AUINOTEBOOK_PAGE_CHANGING, m_windowId); if(events) { @@ -3383,7 +3383,7 @@ int wxAuiNotebook::DoModifySelection(size_t n, bool events) // program allows the page change if(events) { - evt.SetEventType(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED); + evt.SetEventType(wxEVT_AUINOTEBOOK_PAGE_CHANGED); (void)GetEventHandler()->ProcessEvent(evt); } diff --git a/src/aui/tabart.cpp b/src/aui/tabart.cpp index 9a30baf76c..35026065ec 100644 --- a/src/aui/tabart.cpp +++ b/src/aui/tabart.cpp @@ -50,7 +50,7 @@ public: bool ProcessEvent(wxEvent& evt) { - if (evt.GetEventType() == wxEVT_COMMAND_MENU_SELECTED) + if (evt.GetEventType() == wxEVT_MENU) { m_lastId = evt.GetId(); return true; diff --git a/src/cocoa/bmpbuttn.mm b/src/cocoa/bmpbuttn.mm index e3ebb7fd02..5a17b19e8c 100644 --- a/src/cocoa/bmpbuttn.mm +++ b/src/cocoa/bmpbuttn.mm @@ -63,7 +63,7 @@ wxBitmapButton::~wxBitmapButton() void wxBitmapButton::Cocoa_wxNSButtonAction(void) { wxLogTrace(wxTRACE_COCOA,wxT("YAY!")); - wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, GetId()); + wxCommandEvent event(wxEVT_BUTTON, GetId()); InitCommandEvent(event); // event.SetEventObject(this); Command(event); } diff --git a/src/cocoa/button.mm b/src/cocoa/button.mm index 1ef4130155..a78e3b6c59 100644 --- a/src/cocoa/button.mm +++ b/src/cocoa/button.mm @@ -79,7 +79,7 @@ wxButton::~wxButton() void wxButton::Cocoa_wxNSButtonAction(void) { wxLogTrace(wxTRACE_COCOA,wxT("YAY!")); - wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, GetId()); + wxCommandEvent event(wxEVT_BUTTON, GetId()); InitCommandEvent(event); // event.SetEventObject(this); Command(event); } diff --git a/src/cocoa/checkbox.mm b/src/cocoa/checkbox.mm index 373a1c4b33..4b603e57f5 100644 --- a/src/cocoa/checkbox.mm +++ b/src/cocoa/checkbox.mm @@ -130,7 +130,7 @@ void wxCheckBox::Cocoa_wxNSButtonAction(void) // skip mixed, go right back to on [GetNSButton() setState: NSOnState]; } - wxCommandEvent event(wxEVT_COMMAND_CHECKBOX_CLICKED, GetId()); + wxCommandEvent event(wxEVT_CHECKBOX, GetId()); InitCommandEvent(event); // event.SetEventObject(this); event.SetInt(Get3StateValue()); Command(event); diff --git a/src/cocoa/choice.mm b/src/cocoa/choice.mm index 0bec755e00..12d04eaa86 100644 --- a/src/cocoa/choice.mm +++ b/src/cocoa/choice.mm @@ -117,7 +117,7 @@ void wxChoice::CocoaNotification_menuDidSendAction(WX_NSNotification notificatio int index = [[(NSPopUpButton*)m_cocoaNSView menu] indexOfItem: menuitem]; int selectedItem = [(NSPopUpButton*)m_cocoaNSView indexOfSelectedItem]; wxLogTrace(wxTRACE_COCOA,wxT("menuDidSendAction, index=%d, selectedItem=%d"), index, selectedItem); - wxCommandEvent event(wxEVT_COMMAND_CHOICE_SELECTED, m_windowId); + wxCommandEvent event(wxEVT_CHOICE, m_windowId); event.SetInt(index); event.SetEventObject(this); event.SetString(GetStringSelection()); diff --git a/src/cocoa/combobox.mm b/src/cocoa/combobox.mm index f9d8da8edf..6c8eb3b04e 100644 --- a/src/cocoa/combobox.mm +++ b/src/cocoa/combobox.mm @@ -142,7 +142,7 @@ WX_DECLARE_GET_OBJC_CLASS(wxPoserNSComboBox,NSComboBox) - (void)comboBoxSelectionDidChange:(NSNotification *)notification { wxCocoaNSComboBox *win = wxCocoaNSComboBox::GetFromCocoa(self); - win->doWxEvent(wxEVT_COMMAND_COMBOBOX_SELECTED); + win->doWxEvent(wxEVT_COMBOBOX); } - (void)comboBoxSelectionIsChanging:(NSNotification *)notification @@ -224,7 +224,7 @@ wxComboBox::~wxComboBox() void wxComboBox::doWxEvent(int nEvent) { - wxCommandEvent event2(wxEVT_COMMAND_COMBOBOX_SELECTED, GetId() ); + wxCommandEvent event2(wxEVT_COMBOBOX, GetId() ); event2.SetInt(GetSelection()); event2.SetEventObject(this); event2.SetString(GetStringSelection()); @@ -232,7 +232,7 @@ void wxComboBox::doWxEvent(int nEvent) // For consistency with MSW and GTK, also send a text updated event // After all, the text is updated when a selection is made - wxCommandEvent TextEvent( wxEVT_COMMAND_TEXT_UPDATED, GetId() ); + wxCommandEvent TextEvent( wxEVT_TEXT, GetId() ); TextEvent.SetString( GetStringSelection() ); TextEvent.SetEventObject( this ); HandleWindowEvent( TextEvent ); diff --git a/src/cocoa/notebook.mm b/src/cocoa/notebook.mm index 0a892ca2f3..3c369d20db 100644 --- a/src/cocoa/notebook.mm +++ b/src/cocoa/notebook.mm @@ -308,7 +308,7 @@ int wxNotebook::GetSelection() const void wxNotebook::CocoaDelegate_tabView_didSelectTabViewItem(WX_NSTabViewItem tabViewItem) { // FIXME: oldSel probably == newSel - wxBookCtrlEvent event(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, GetId(), + wxBookCtrlEvent event(wxEVT_NOTEBOOK_PAGE_CHANGED, GetId(), [GetNSTabView() indexOfTabViewItem:tabViewItem], GetSelection()); event.SetEventObject(this); GetEventHandler()->ProcessEvent(event); @@ -316,7 +316,7 @@ void wxNotebook::CocoaDelegate_tabView_didSelectTabViewItem(WX_NSTabViewItem tab bool wxNotebook::CocoaDelegate_tabView_shouldSelectTabViewItem(WX_NSTabViewItem tabViewItem) { - wxBookCtrlEvent event(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, GetId(), + wxBookCtrlEvent event(wxEVT_NOTEBOOK_PAGE_CHANGING, GetId(), [GetNSTabView() indexOfTabViewItem:tabViewItem], GetSelection()); event.SetEventObject(this); return !HandleWindowEvent(event) || event.IsAllowed(); diff --git a/src/cocoa/radiobox.mm b/src/cocoa/radiobox.mm index 0a8e1aaefb..54bff0019c 100644 --- a/src/cocoa/radiobox.mm +++ b/src/cocoa/radiobox.mm @@ -268,7 +268,7 @@ wxSize wxRadioBox::DoGetBestSize() const void wxRadioBox::CocoaTarget_action(void) { - wxCommandEvent event(wxEVT_COMMAND_RADIOBOX_SELECTED, GetId()); + wxCommandEvent event(wxEVT_RADIOBOX, GetId()); InitCommandEvent(event); event.SetInt(GetSelection()); // i.e. SetSelection. Command(event); diff --git a/src/cocoa/radiobut.mm b/src/cocoa/radiobut.mm index 3a5d0553b0..70820d4a18 100644 --- a/src/cocoa/radiobut.mm +++ b/src/cocoa/radiobut.mm @@ -182,7 +182,7 @@ void wxRadioButton::Cocoa_wxNSButtonAction(void) { Cocoa_DeselectOtherButtonsInTheGroup(); } - wxCommandEvent event(wxEVT_COMMAND_RADIOBUTTON_SELECTED, GetId()); + wxCommandEvent event(wxEVT_RADIOBUTTON, GetId()); InitCommandEvent(event); // event.SetEventObject(this); event.SetInt(GetValue()); Command(event); diff --git a/src/cocoa/toolbar.mm b/src/cocoa/toolbar.mm index 7237864f57..0897ff1f61 100644 --- a/src/cocoa/toolbar.mm +++ b/src/cocoa/toolbar.mm @@ -100,7 +100,7 @@ void wxToolBarTool::Init() void wxToolBar::CocoaToolClickEnded() { wxASSERT(m_mouseDownTool); - wxCommandEvent event(wxEVT_COMMAND_MENU_SELECTED, m_mouseDownTool->GetId()); + wxCommandEvent event(wxEVT_MENU, m_mouseDownTool->GetId()); InitCommandEvent(event); Command(event); } diff --git a/src/common/btncmn.cpp b/src/common/btncmn.cpp index 4ddc6a5bad..72d67726ef 100644 --- a/src/common/btncmn.cpp +++ b/src/common/btncmn.cpp @@ -75,7 +75,7 @@ wxEND_FLAGS( wxButtonStyle ) wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxButton, wxControl, "wx/button.h") wxBEGIN_PROPERTIES_TABLE(wxButton) -wxEVENT_PROPERTY( Click, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEvent ) +wxEVENT_PROPERTY( Click, wxEVT_BUTTON, wxCommandEvent ) wxPROPERTY( Font, wxFont, SetFont, GetFont, wxEMPTY_PARAMETER_VALUE, \ 0 /*flags*/, wxT("The font associated with the button label"), wxT("group")) diff --git a/src/common/checkboxcmn.cpp b/src/common/checkboxcmn.cpp index 0eb628c744..1d16153fbe 100644 --- a/src/common/checkboxcmn.cpp +++ b/src/common/checkboxcmn.cpp @@ -68,7 +68,7 @@ wxEND_FLAGS( wxCheckBoxStyle ) wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxCheckBox, wxControl, "wx/checkbox.h") wxBEGIN_PROPERTIES_TABLE(wxCheckBox) - wxEVENT_PROPERTY( Click, wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEvent ) + wxEVENT_PROPERTY( Click, wxEVT_CHECKBOX, wxCommandEvent ) wxPROPERTY( Font, wxFont, SetFont, GetFont, wxEMPTY_PARAMETER_VALUE, \ 0 /*flags*/, wxT("Helpstring"), wxT("group")) diff --git a/src/common/checklstcmn.cpp b/src/common/checklstcmn.cpp index fe451702a7..09ea30c7b7 100644 --- a/src/common/checklstcmn.cpp +++ b/src/common/checklstcmn.cpp @@ -87,7 +87,7 @@ wxEND_FLAGS( wxCheckListBoxStyle ) wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxCheckListBox, wxListBox, "wx/checklst.h") wxBEGIN_PROPERTIES_TABLE(wxCheckListBox) - wxEVENT_PROPERTY( Toggle, wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, wxCommandEvent ) + wxEVENT_PROPERTY( Toggle, wxEVT_CHECKLISTBOX, wxCommandEvent ) wxPROPERTY_FLAGS( WindowStyle, wxCheckListBoxStyle, long, SetWindowStyleFlag, \ GetWindowStyleFlag, wxEMPTY_PARAMETER_VALUE, wxLB_OWNERDRAW /*flags*/, \ wxT("Helpstring"), wxT("group")) // style diff --git a/src/common/choiccmn.cpp b/src/common/choiccmn.cpp index 31b0a2df06..004efb24f0 100644 --- a/src/common/choiccmn.cpp +++ b/src/common/choiccmn.cpp @@ -70,7 +70,7 @@ wxEND_FLAGS( wxChoiceStyle ) wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxChoice, wxControl, "wx/choice.h") wxBEGIN_PROPERTIES_TABLE(wxChoice) -wxEVENT_PROPERTY( Select, wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEvent ) +wxEVENT_PROPERTY( Select, wxEVT_CHOICE, wxCommandEvent ) wxPROPERTY( Font, wxFont, SetFont, GetFont , wxEMPTY_PARAMETER_VALUE, \ 0 /*flags*/, wxT("Helpstring"), wxT("group")) diff --git a/src/common/clrpickercmn.cpp b/src/common/clrpickercmn.cpp index 9420551b5a..6ed13c73d7 100644 --- a/src/common/clrpickercmn.cpp +++ b/src/common/clrpickercmn.cpp @@ -39,7 +39,7 @@ const char wxColourPickerWidgetNameStr[] = "colourpickerwidget"; // implementation // ============================================================================ -wxDEFINE_EVENT(wxEVT_COMMAND_COLOURPICKER_CHANGED, wxColourPickerEvent); +wxDEFINE_EVENT(wxEVT_COLOURPICKER_CHANGED, wxColourPickerEvent); IMPLEMENT_DYNAMIC_CLASS(wxColourPickerCtrl, wxPickerBase) IMPLEMENT_DYNAMIC_CLASS(wxColourPickerEvent, wxEvent) @@ -68,7 +68,7 @@ bool wxColourPickerCtrl::Create( wxWindow *parent, wxWindowID id, // complete sizer creation wxPickerBase::PostCreation(); - m_picker->Connect(wxEVT_COMMAND_COLOURPICKER_CHANGED, + m_picker->Connect(wxEVT_COLOURPICKER_CHANGED, wxColourPickerEventHandler(wxColourPickerCtrl::OnColourChange), NULL, this); diff --git a/src/common/combocmn.cpp b/src/common/combocmn.cpp index b055549416..f1f60c697b 100644 --- a/src/common/combocmn.cpp +++ b/src/common/combocmn.cpp @@ -72,8 +72,8 @@ wxEND_FLAGS( wxComboBoxStyle ) wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxComboBox, wxControl, "wx/combobox.h") wxBEGIN_PROPERTIES_TABLE(wxComboBox) -wxEVENT_PROPERTY( Select, wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEvent ) -wxEVENT_PROPERTY( TextEnter, wxEVT_COMMAND_TEXT_ENTER, wxCommandEvent ) +wxEVENT_PROPERTY( Select, wxEVT_COMBOBOX, wxCommandEvent ) +wxEVENT_PROPERTY( TextEnter, wxEVT_TEXT_ENTER, wxCommandEvent ) // TODO DELEGATES wxPROPERTY( Font, wxFont, SetFont, GetFont, wxEMPTY_PARAMETER_VALUE, \ @@ -1096,10 +1096,10 @@ wxComboCtrlBase::CreateTextCtrl(int style) // Connecting the events is currently the most reliable way wxWindowID id = m_text->GetId(); - m_text->Connect(id, wxEVT_COMMAND_TEXT_UPDATED, + m_text->Connect(id, wxEVT_TEXT, wxCommandEventHandler(wxComboCtrlBase::OnTextCtrlEvent), NULL, this); - m_text->Connect(id, wxEVT_COMMAND_TEXT_ENTER, + m_text->Connect(id, wxEVT_TEXT_ENTER, wxCommandEventHandler(wxComboCtrlBase::OnTextCtrlEvent), NULL, this); @@ -1788,7 +1788,7 @@ void wxComboCtrlBase::OnTextCtrlEvent(wxCommandEvent& event) return; } - if ( event.GetEventType() == wxEVT_COMMAND_TEXT_UPDATED ) + if ( event.GetEventType() == wxEVT_TEXT ) { if ( m_ignoreEvtText > 0 ) { @@ -2234,7 +2234,7 @@ void wxComboCtrlBase::OnButtonClick() void wxComboCtrlBase::Popup() { - wxCommandEvent event(wxEVT_COMMAND_COMBOBOX_DROPDOWN, GetId()); + wxCommandEvent event(wxEVT_COMBOBOX_DROPDOWN, GetId()); event.SetEventObject(this); HandleWindowEvent(event); @@ -2520,7 +2520,7 @@ void wxComboCtrlBase::OnPopupDismiss(bool generateEvent) if ( generateEvent ) { - wxCommandEvent event(wxEVT_COMMAND_COMBOBOX_CLOSEUP, GetId()); + wxCommandEvent event(wxEVT_COMBOBOX_CLOSEUP, GetId()); event.SetEventObject(this); HandleWindowEvent(event); } diff --git a/src/common/datavcmn.cpp b/src/common/datavcmn.cpp index 69301bc8a1..a647887645 100644 --- a/src/common/datavcmn.cpp +++ b/src/common/datavcmn.cpp @@ -650,7 +650,7 @@ bool wxDataViewRendererBase::StartEditing( const wxDataViewItem &item, wxRect la wxDataViewCtrl* dv_ctrl = GetOwner()->GetOwner(); // Before doing anything we send an event asking if editing of this item is really wanted. - wxDataViewEvent start_event( wxEVT_COMMAND_DATAVIEW_ITEM_START_EDITING, dv_ctrl->GetId() ); + wxDataViewEvent start_event( wxEVT_DATAVIEW_ITEM_START_EDITING, dv_ctrl->GetId() ); start_event.SetDataViewColumn( GetOwner() ); start_event.SetModel( dv_ctrl->GetModel() ); start_event.SetItem( item ); @@ -683,7 +683,7 @@ bool wxDataViewRendererBase::StartEditing( const wxDataViewItem &item, wxRect la #endif // Now we should send Editing Started event - wxDataViewEvent event( wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_STARTED, dv_ctrl->GetId() ); + wxDataViewEvent event( wxEVT_DATAVIEW_ITEM_EDITING_STARTED, dv_ctrl->GetId() ); event.SetDataViewColumn( GetOwner() ); event.SetModel( dv_ctrl->GetModel() ); event.SetItem( item ); @@ -737,7 +737,7 @@ bool wxDataViewRendererBase::FinishEditing() unsigned int col = GetOwner()->GetModelColumn(); // Now we should send Editing Done event - wxDataViewEvent event( wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_DONE, dv_ctrl->GetId() ); + wxDataViewEvent event( wxEVT_DATAVIEW_ITEM_EDITING_DONE, dv_ctrl->GetId() ); event.SetDataViewColumn( GetOwner() ); event.SetModel( dv_ctrl->GetModel() ); event.SetItem( m_item ); @@ -1396,30 +1396,30 @@ void wxDataViewCtrlBase::StartEditor(const wxDataViewItem& item, unsigned int co IMPLEMENT_DYNAMIC_CLASS(wxDataViewEvent,wxNotifyEvent) -wxDEFINE_EVENT( wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, wxDataViewEvent ); +wxDEFINE_EVENT( wxEVT_DATAVIEW_SELECTION_CHANGED, wxDataViewEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, wxDataViewEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_DATAVIEW_ITEM_COLLAPSING, wxDataViewEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_DATAVIEW_ITEM_COLLAPSED, wxDataViewEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_DATAVIEW_ITEM_EXPANDING, wxDataViewEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_DATAVIEW_ITEM_EXPANDED, wxDataViewEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_STARTED, wxDataViewEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_DATAVIEW_ITEM_START_EDITING, wxDataViewEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_DONE, wxDataViewEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED, wxDataViewEvent ); +wxDEFINE_EVENT( wxEVT_DATAVIEW_ITEM_ACTIVATED, wxDataViewEvent ); +wxDEFINE_EVENT( wxEVT_DATAVIEW_ITEM_COLLAPSING, wxDataViewEvent ); +wxDEFINE_EVENT( wxEVT_DATAVIEW_ITEM_COLLAPSED, wxDataViewEvent ); +wxDEFINE_EVENT( wxEVT_DATAVIEW_ITEM_EXPANDING, wxDataViewEvent ); +wxDEFINE_EVENT( wxEVT_DATAVIEW_ITEM_EXPANDED, wxDataViewEvent ); +wxDEFINE_EVENT( wxEVT_DATAVIEW_ITEM_EDITING_STARTED, wxDataViewEvent ); +wxDEFINE_EVENT( wxEVT_DATAVIEW_ITEM_START_EDITING, wxDataViewEvent ); +wxDEFINE_EVENT( wxEVT_DATAVIEW_ITEM_EDITING_DONE, wxDataViewEvent ); +wxDEFINE_EVENT( wxEVT_DATAVIEW_ITEM_VALUE_CHANGED, wxDataViewEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_DATAVIEW_ITEM_CONTEXT_MENU, wxDataViewEvent ); +wxDEFINE_EVENT( wxEVT_DATAVIEW_ITEM_CONTEXT_MENU, wxDataViewEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_CLICK, wxDataViewEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK, wxDataViewEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_DATAVIEW_COLUMN_SORTED, wxDataViewEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_DATAVIEW_COLUMN_REORDERED, wxDataViewEvent ); +wxDEFINE_EVENT( wxEVT_DATAVIEW_COLUMN_HEADER_CLICK, wxDataViewEvent ); +wxDEFINE_EVENT( wxEVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICKED, wxDataViewEvent ); +wxDEFINE_EVENT( wxEVT_DATAVIEW_COLUMN_SORTED, wxDataViewEvent ); +wxDEFINE_EVENT( wxEVT_DATAVIEW_COLUMN_REORDERED, wxDataViewEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_DATAVIEW_CACHE_HINT, wxDataViewEvent ); +wxDEFINE_EVENT( wxEVT_DATAVIEW_CACHE_HINT, wxDataViewEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_DATAVIEW_ITEM_BEGIN_DRAG, wxDataViewEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_DATAVIEW_ITEM_DROP_POSSIBLE, wxDataViewEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_DATAVIEW_ITEM_DROP, wxDataViewEvent ); +wxDEFINE_EVENT( wxEVT_DATAVIEW_ITEM_BEGIN_DRAG, wxDataViewEvent ); +wxDEFINE_EVENT( wxEVT_DATAVIEW_ITEM_DROP_POSSIBLE, wxDataViewEvent ); +wxDEFINE_EVENT( wxEVT_DATAVIEW_ITEM_DROP, wxDataViewEvent ); diff --git a/src/common/dlgcmn.cpp b/src/common/dlgcmn.cpp index 9289aa2d58..1bc4d72667 100644 --- a/src/common/dlgcmn.cpp +++ b/src/common/dlgcmn.cpp @@ -425,7 +425,7 @@ bool wxDialogBase::EmulateButtonClickIfPresent(int id) if ( !btn || !btn->IsEnabled() || !btn->IsShown() ) return false; - wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, id); + wxCommandEvent event(wxEVT_BUTTON, id); event.SetEventObject(btn); btn->GetEventHandler()->ProcessEvent(event); diff --git a/src/common/event.cpp b/src/common/event.cpp index 4bc7989682..c35ba60eb8 100644 --- a/src/common/event.cpp +++ b/src/common/event.cpp @@ -164,26 +164,26 @@ wxDEFINE_EVENT( wxEVT_ASYNC_METHOD_CALL, wxAsyncMethodCallEvent ); #if wxUSE_GUI -wxDEFINE_EVENT( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, wxCommandEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_MENU_SELECTED, wxCommandEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_SLIDER_UPDATED, wxCommandEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_SCROLLBAR_UPDATED, wxCommandEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_VLBOX_SELECTED, wxCommandEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_TOOL_RCLICKED, wxCommandEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_TOOL_ENTER, wxCommandEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_SPINCTRL_UPDATED, wxCommandEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_SPINCTRLDOUBLE_UPDATED, wxCommandEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_TOOL_DROPDOWN_CLICKED, wxCommandEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_COMBOBOX_DROPDOWN, wxCommandEvent); -wxDEFINE_EVENT( wxEVT_COMMAND_COMBOBOX_CLOSEUP, wxCommandEvent); +wxDEFINE_EVENT( wxEVT_BUTTON, wxCommandEvent ); +wxDEFINE_EVENT( wxEVT_CHECKBOX, wxCommandEvent ); +wxDEFINE_EVENT( wxEVT_CHOICE, wxCommandEvent ); +wxDEFINE_EVENT( wxEVT_LISTBOX, wxCommandEvent ); +wxDEFINE_EVENT( wxEVT_LISTBOX_DCLICK, wxCommandEvent ); +wxDEFINE_EVENT( wxEVT_CHECKLISTBOX, wxCommandEvent ); +wxDEFINE_EVENT( wxEVT_MENU, wxCommandEvent ); +wxDEFINE_EVENT( wxEVT_SLIDER, wxCommandEvent ); +wxDEFINE_EVENT( wxEVT_RADIOBOX, wxCommandEvent ); +wxDEFINE_EVENT( wxEVT_RADIOBUTTON, wxCommandEvent ); +wxDEFINE_EVENT( wxEVT_SCROLLBAR, wxCommandEvent ); +wxDEFINE_EVENT( wxEVT_VLBOX, wxCommandEvent ); +wxDEFINE_EVENT( wxEVT_COMBOBOX, wxCommandEvent ); +wxDEFINE_EVENT( wxEVT_TOOL_RCLICKED, wxCommandEvent ); +wxDEFINE_EVENT( wxEVT_TOOL_ENTER, wxCommandEvent ); +wxDEFINE_EVENT( wxEVT_SPINCTRL, wxCommandEvent ); +wxDEFINE_EVENT( wxEVT_SPINCTRLDOUBLE, wxCommandEvent ); +wxDEFINE_EVENT( wxEVT_TOOL_DROPDOWN, wxCommandEvent ); +wxDEFINE_EVENT( wxEVT_COMBOBOX_DROPDOWN, wxCommandEvent); +wxDEFINE_EVENT( wxEVT_COMBOBOX_CLOSEUP, wxCommandEvent); // Mouse event types wxDEFINE_EVENT( wxEVT_LEFT_DOWN, wxMouseEvent ); @@ -299,9 +299,9 @@ wxDEFINE_EVENT( wxEVT_INIT_DIALOG, wxInitDialogEvent ); wxDEFINE_EVENT( wxEVT_UPDATE_UI, wxUpdateUIEvent ); // Clipboard events -wxDEFINE_EVENT( wxEVT_COMMAND_TEXT_COPY, wxClipboardTextEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_TEXT_CUT, wxClipboardTextEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_TEXT_PASTE, wxClipboardTextEvent ); +wxDEFINE_EVENT( wxEVT_TEXT_COPY, wxClipboardTextEvent ); +wxDEFINE_EVENT( wxEVT_TEXT_CUT, wxClipboardTextEvent ); +wxDEFINE_EVENT( wxEVT_TEXT_PASTE, wxClipboardTextEvent ); // Generic command events // Note: a click is a higher-level event than button down/up @@ -427,7 +427,7 @@ wxCommandEvent::wxCommandEvent(wxEventType commandType, int theId) wxString wxCommandEvent::GetString() const { - if (m_eventType != wxEVT_COMMAND_TEXT_UPDATED || !m_eventObject) + if (m_eventType != wxEVT_TEXT || !m_eventObject) { return m_cmdString; } diff --git a/src/common/fddlgcmn.cpp b/src/common/fddlgcmn.cpp index dc2ba56709..210d36e6d1 100644 --- a/src/common/fddlgcmn.cpp +++ b/src/common/fddlgcmn.cpp @@ -37,11 +37,11 @@ IMPLEMENT_DYNAMIC_CLASS(wxFindDialogEvent, wxCommandEvent) -wxDEFINE_EVENT( wxEVT_COMMAND_FIND, wxFindDialogEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_FIND_NEXT, wxFindDialogEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_FIND_REPLACE, wxFindDialogEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_FIND_REPLACE_ALL, wxFindDialogEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_FIND_CLOSE, wxFindDialogEvent ); +wxDEFINE_EVENT( wxEVT_FIND, wxFindDialogEvent ); +wxDEFINE_EVENT( wxEVT_FIND_NEXT, wxFindDialogEvent ); +wxDEFINE_EVENT( wxEVT_FIND_REPLACE, wxFindDialogEvent ); +wxDEFINE_EVENT( wxEVT_FIND_REPLACE_ALL, wxFindDialogEvent ); +wxDEFINE_EVENT( wxEVT_FIND_CLOSE, wxFindDialogEvent ); // ============================================================================ // implementations @@ -71,18 +71,18 @@ void wxFindReplaceDialogBase::Send(wxFindDialogEvent& event) m_FindReplaceData->m_Flags = event.GetFlags(); m_FindReplaceData->m_FindWhat = event.GetFindString(); if ( HasFlag(wxFR_REPLACEDIALOG) && - (event.GetEventType() == wxEVT_COMMAND_FIND_REPLACE || - event.GetEventType() == wxEVT_COMMAND_FIND_REPLACE_ALL) ) + (event.GetEventType() == wxEVT_FIND_REPLACE || + event.GetEventType() == wxEVT_FIND_REPLACE_ALL) ) { m_FindReplaceData->m_ReplaceWith = event.GetReplaceString(); } - // translate wxEVT_COMMAND_FIND_NEXT to wxEVT_COMMAND_FIND if needed - if ( event.GetEventType() == wxEVT_COMMAND_FIND_NEXT ) + // translate wxEVT_FIND_NEXT to wxEVT_FIND if needed + if ( event.GetEventType() == wxEVT_FIND_NEXT ) { if ( m_FindReplaceData->m_FindWhat != m_lastSearch ) { - event.SetEventType(wxEVT_COMMAND_FIND); + event.SetEventType(wxEVT_FIND); m_lastSearch = m_FindReplaceData->m_FindWhat; } diff --git a/src/common/filepickercmn.cpp b/src/common/filepickercmn.cpp index c6dd71d6d0..5923767f2d 100644 --- a/src/common/filepickercmn.cpp +++ b/src/common/filepickercmn.cpp @@ -44,8 +44,8 @@ const char wxDirPickerWidgetNameStr[] = "dirpickerwidget"; const char wxFilePickerWidgetLabel[] = wxTRANSLATE("Browse"); const char wxDirPickerWidgetLabel[] = wxTRANSLATE("Browse"); -wxDEFINE_EVENT( wxEVT_COMMAND_FILEPICKER_CHANGED, wxFileDirPickerEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEvent ); +wxDEFINE_EVENT( wxEVT_FILEPICKER_CHANGED, wxFileDirPickerEvent ); +wxDEFINE_EVENT( wxEVT_DIRPICKER_CHANGED, wxFileDirPickerEvent ); IMPLEMENT_DYNAMIC_CLASS(wxFileDirPickerEvent, wxCommandEvent) // ---------------------------------------------------------------------------- diff --git a/src/common/fontpickercmn.cpp b/src/common/fontpickercmn.cpp index 107d8c7a14..e4bf043341 100644 --- a/src/common/fontpickercmn.cpp +++ b/src/common/fontpickercmn.cpp @@ -42,7 +42,7 @@ const char wxFontPickerCtrlNameStr[] = "fontpicker"; const char wxFontPickerWidgetNameStr[] = "fontpickerwidget"; -wxDEFINE_EVENT(wxEVT_COMMAND_FONTPICKER_CHANGED, wxFontPickerEvent); +wxDEFINE_EVENT(wxEVT_FONTPICKER_CHANGED, wxFontPickerEvent); IMPLEMENT_DYNAMIC_CLASS(wxFontPickerCtrl, wxPickerBase) IMPLEMENT_DYNAMIC_CLASS(wxFontPickerEvent, wxCommandEvent) @@ -71,7 +71,7 @@ bool wxFontPickerCtrl::Create( wxWindow *parent, wxWindowID id, // complete sizer creation wxPickerBase::PostCreation(); - m_picker->Connect(wxEVT_COMMAND_FONTPICKER_CHANGED, + m_picker->Connect(wxEVT_FONTPICKER_CHANGED, wxFontPickerEventHandler(wxFontPickerCtrl::OnFontChange), NULL, this); diff --git a/src/common/framecmn.cpp b/src/common/framecmn.cpp index 45349869f3..be0234a6c7 100644 --- a/src/common/framecmn.cpp +++ b/src/common/framecmn.cpp @@ -131,7 +131,7 @@ wxEND_FLAGS( wxFrameStyle ) wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxFrame, wxTopLevelWindow, "wx/frame.h") wxBEGIN_PROPERTIES_TABLE(wxFrame) -wxEVENT_PROPERTY( Menu, wxEVT_COMMAND_MENU_SELECTED, wxCommandEvent) +wxEVENT_PROPERTY( Menu, wxEVT_MENU, wxCommandEvent) wxPROPERTY( Title,wxString, SetTitle, GetTitle, wxString(), 0 /*flags*/, \ wxT("Helpstring"), wxT("group")) diff --git a/src/common/headerctrlcmn.cpp b/src/common/headerctrlcmn.cpp index 98025723ad..25d51cb2f8 100644 --- a/src/common/headerctrlcmn.cpp +++ b/src/common/headerctrlcmn.cpp @@ -495,23 +495,23 @@ wxHeaderCtrlSimple::UpdateColumnWidthToFit(unsigned int idx, int widthTitle) IMPLEMENT_DYNAMIC_CLASS(wxHeaderCtrlEvent, wxNotifyEvent) -wxDEFINE_EVENT( wxEVT_COMMAND_HEADER_CLICK, wxHeaderCtrlEvent); -wxDEFINE_EVENT( wxEVT_COMMAND_HEADER_RIGHT_CLICK, wxHeaderCtrlEvent); -wxDEFINE_EVENT( wxEVT_COMMAND_HEADER_MIDDLE_CLICK, wxHeaderCtrlEvent); +wxDEFINE_EVENT( wxEVT_HEADER_CLICK, wxHeaderCtrlEvent); +wxDEFINE_EVENT( wxEVT_HEADER_RIGHT_CLICK, wxHeaderCtrlEvent); +wxDEFINE_EVENT( wxEVT_HEADER_MIDDLE_CLICK, wxHeaderCtrlEvent); -wxDEFINE_EVENT( wxEVT_COMMAND_HEADER_DCLICK, wxHeaderCtrlEvent); -wxDEFINE_EVENT( wxEVT_COMMAND_HEADER_RIGHT_DCLICK, wxHeaderCtrlEvent); -wxDEFINE_EVENT( wxEVT_COMMAND_HEADER_MIDDLE_DCLICK, wxHeaderCtrlEvent); +wxDEFINE_EVENT( wxEVT_HEADER_DCLICK, wxHeaderCtrlEvent); +wxDEFINE_EVENT( wxEVT_HEADER_RIGHT_DCLICK, wxHeaderCtrlEvent); +wxDEFINE_EVENT( wxEVT_HEADER_MIDDLE_DCLICK, wxHeaderCtrlEvent); -wxDEFINE_EVENT( wxEVT_COMMAND_HEADER_SEPARATOR_DCLICK, wxHeaderCtrlEvent); +wxDEFINE_EVENT( wxEVT_HEADER_SEPARATOR_DCLICK, wxHeaderCtrlEvent); -wxDEFINE_EVENT( wxEVT_COMMAND_HEADER_BEGIN_RESIZE, wxHeaderCtrlEvent); -wxDEFINE_EVENT( wxEVT_COMMAND_HEADER_RESIZING, wxHeaderCtrlEvent); -wxDEFINE_EVENT( wxEVT_COMMAND_HEADER_END_RESIZE, wxHeaderCtrlEvent); +wxDEFINE_EVENT( wxEVT_HEADER_BEGIN_RESIZE, wxHeaderCtrlEvent); +wxDEFINE_EVENT( wxEVT_HEADER_RESIZING, wxHeaderCtrlEvent); +wxDEFINE_EVENT( wxEVT_HEADER_END_RESIZE, wxHeaderCtrlEvent); -wxDEFINE_EVENT( wxEVT_COMMAND_HEADER_BEGIN_REORDER, wxHeaderCtrlEvent); -wxDEFINE_EVENT( wxEVT_COMMAND_HEADER_END_REORDER, wxHeaderCtrlEvent); +wxDEFINE_EVENT( wxEVT_HEADER_BEGIN_REORDER, wxHeaderCtrlEvent); +wxDEFINE_EVENT( wxEVT_HEADER_END_REORDER, wxHeaderCtrlEvent); -wxDEFINE_EVENT( wxEVT_COMMAND_HEADER_DRAGGING_CANCELLED, wxHeaderCtrlEvent); +wxDEFINE_EVENT( wxEVT_HEADER_DRAGGING_CANCELLED, wxHeaderCtrlEvent); #endif // wxUSE_HEADERCTRL diff --git a/src/common/hyperlnkcmn.cpp b/src/common/hyperlnkcmn.cpp index 20ff7acc52..3128d072af 100644 --- a/src/common/hyperlnkcmn.cpp +++ b/src/common/hyperlnkcmn.cpp @@ -80,7 +80,7 @@ wxEND_FLAGS( wxHyperlinkStyle ) wxIMPLEMENT_DYNAMIC_CLASS_XTI( wxHyperlinkCtrl, wxControl, "wx/hyperlink.h") IMPLEMENT_DYNAMIC_CLASS(wxHyperlinkEvent, wxCommandEvent) -wxDEFINE_EVENT( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEvent ); +wxDEFINE_EVENT( wxEVT_HYPERLINK, wxHyperlinkEvent ); wxBEGIN_PROPERTIES_TABLE(wxHyperlinkCtrl) wxPROPERTY( Label, wxString, SetLabel, GetLabel, wxString(), \ diff --git a/src/common/lboxcmn.cpp b/src/common/lboxcmn.cpp index 0e1d050193..4255232c43 100644 --- a/src/common/lboxcmn.cpp +++ b/src/common/lboxcmn.cpp @@ -90,8 +90,8 @@ wxEND_FLAGS( wxListBoxStyle ) wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxListBox, wxControl, "wx/listbox.h") wxBEGIN_PROPERTIES_TABLE(wxListBox) -wxEVENT_PROPERTY( Select, wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEvent ) -wxEVENT_PROPERTY( DoubleClick, wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEvent ) +wxEVENT_PROPERTY( Select, wxEVT_LISTBOX, wxCommandEvent ) +wxEVENT_PROPERTY( DoubleClick, wxEVT_LISTBOX_DCLICK, wxCommandEvent ) wxPROPERTY( Font, wxFont, SetFont, GetFont , wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, \ wxT("Helpstring"), wxT("group")) @@ -303,7 +303,7 @@ bool wxListBoxBase::CalcAndSendEvent() m_oldSelections = selections; - return SendEvent(wxEVT_COMMAND_LISTBOX_SELECTED, item, selected); + return SendEvent(wxEVT_LISTBOX, item, selected); } // ---------------------------------------------------------------------------- diff --git a/src/common/listctrlcmn.cpp b/src/common/listctrlcmn.cpp index 4c89a84d26..d78425adf7 100644 --- a/src/common/listctrlcmn.cpp +++ b/src/common/listctrlcmn.cpp @@ -34,26 +34,26 @@ const char wxListCtrlNameStr[] = "listCtrl"; // ListCtrl events -wxDEFINE_EVENT( wxEVT_COMMAND_LIST_BEGIN_DRAG, wxListEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_LIST_BEGIN_RDRAG, wxListEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT, wxListEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_LIST_END_LABEL_EDIT, wxListEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_LIST_DELETE_ITEM, wxListEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS, wxListEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_LIST_KEY_DOWN, wxListEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_LIST_INSERT_ITEM, wxListEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_LIST_COL_CLICK, wxListEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_LIST_COL_RIGHT_CLICK, wxListEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_LIST_COL_BEGIN_DRAG, wxListEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_LIST_COL_DRAGGING, wxListEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_LIST_COL_END_DRAG, wxListEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK, wxListEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK, wxListEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_LIST_ITEM_FOCUSED, wxListEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_LIST_CACHE_HINT, wxListEvent ); +wxDEFINE_EVENT( wxEVT_LIST_BEGIN_DRAG, wxListEvent ); +wxDEFINE_EVENT( wxEVT_LIST_BEGIN_RDRAG, wxListEvent ); +wxDEFINE_EVENT( wxEVT_LIST_BEGIN_LABEL_EDIT, wxListEvent ); +wxDEFINE_EVENT( wxEVT_LIST_END_LABEL_EDIT, wxListEvent ); +wxDEFINE_EVENT( wxEVT_LIST_DELETE_ITEM, wxListEvent ); +wxDEFINE_EVENT( wxEVT_LIST_DELETE_ALL_ITEMS, wxListEvent ); +wxDEFINE_EVENT( wxEVT_LIST_ITEM_SELECTED, wxListEvent ); +wxDEFINE_EVENT( wxEVT_LIST_ITEM_DESELECTED, wxListEvent ); +wxDEFINE_EVENT( wxEVT_LIST_KEY_DOWN, wxListEvent ); +wxDEFINE_EVENT( wxEVT_LIST_INSERT_ITEM, wxListEvent ); +wxDEFINE_EVENT( wxEVT_LIST_COL_CLICK, wxListEvent ); +wxDEFINE_EVENT( wxEVT_LIST_COL_RIGHT_CLICK, wxListEvent ); +wxDEFINE_EVENT( wxEVT_LIST_COL_BEGIN_DRAG, wxListEvent ); +wxDEFINE_EVENT( wxEVT_LIST_COL_DRAGGING, wxListEvent ); +wxDEFINE_EVENT( wxEVT_LIST_COL_END_DRAG, wxListEvent ); +wxDEFINE_EVENT( wxEVT_LIST_ITEM_RIGHT_CLICK, wxListEvent ); +wxDEFINE_EVENT( wxEVT_LIST_ITEM_MIDDLE_CLICK, wxListEvent ); +wxDEFINE_EVENT( wxEVT_LIST_ITEM_ACTIVATED, wxListEvent ); +wxDEFINE_EVENT( wxEVT_LIST_ITEM_FOCUSED, wxListEvent ); +wxDEFINE_EVENT( wxEVT_LIST_CACHE_HINT, wxListEvent ); // ----------------------------------------------------------------------------- // XTI @@ -111,7 +111,7 @@ wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxListCtrl, wxControl, "wx/listctrl.h") #endif wxBEGIN_PROPERTIES_TABLE(wxListCtrl) -wxEVENT_PROPERTY( TextUpdated, wxEVT_COMMAND_TEXT_UPDATED, wxCommandEvent ) +wxEVENT_PROPERTY( TextUpdated, wxEVT_TEXT, wxCommandEvent ) wxPROPERTY_FLAGS( WindowStyle, wxListCtrlStyle, long, SetWindowStyleFlag, \ GetWindowStyleFlag, wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, \ diff --git a/src/common/menucmn.cpp b/src/common/menucmn.cpp index f34a5bf0f6..53745cb024 100644 --- a/src/common/menucmn.cpp +++ b/src/common/menucmn.cpp @@ -69,7 +69,7 @@ template<> void wxCollectionToVariantArray( wxMenuItemList const &theList, #endif wxBEGIN_PROPERTIES_TABLE(wxMenu) -wxEVENT_PROPERTY( Select, wxEVT_COMMAND_MENU_SELECTED, wxCommandEvent) +wxEVENT_PROPERTY( Select, wxEVT_MENU, wxCommandEvent) wxPROPERTY( Title, wxString, SetTitle, GetTitle, wxString(), \ 0 /*flags*/, wxT("Helpstring"), wxT("group") ) @@ -639,7 +639,7 @@ void wxMenuBase::UpdateUI(wxEvtHandler* source) bool wxMenuBase::SendEvent(int itemid, int checked) { - wxCommandEvent event(wxEVT_COMMAND_MENU_SELECTED, itemid); + wxCommandEvent event(wxEVT_MENU, itemid); event.SetEventObject(this); event.SetInt(checked); diff --git a/src/common/nbkbase.cpp b/src/common/nbkbase.cpp index a0b6a8b45a..530400bd80 100644 --- a/src/common/nbkbase.cpp +++ b/src/common/nbkbase.cpp @@ -37,8 +37,8 @@ extern WXDLLEXPORT_DATA(const char) wxNotebookNameStr[] = "notebook"; -wxDEFINE_EVENT( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxBookCtrlEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, wxBookCtrlEvent ); +wxDEFINE_EVENT( wxEVT_NOTEBOOK_PAGE_CHANGED, wxBookCtrlEvent ); +wxDEFINE_EVENT( wxEVT_NOTEBOOK_PAGE_CHANGING, wxBookCtrlEvent ); // ---------------------------------------------------------------------------- // XTI @@ -140,8 +140,8 @@ const wxNotebookPageInfoList& wxNotebookBase::GetPageInfos() const wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxNotebook, wxBookCtrlBase, "wx/notebook.h") wxBEGIN_PROPERTIES_TABLE(wxNotebook) -wxEVENT_PROPERTY( PageChanging, wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, wxNotebookEvent ) -wxEVENT_PROPERTY( PageChanged, wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxNotebookEvent ) +wxEVENT_PROPERTY( PageChanging, wxEVT_NOTEBOOK_PAGE_CHANGING, wxNotebookEvent ) +wxEVENT_PROPERTY( PageChanged, wxEVT_NOTEBOOK_PAGE_CHANGED, wxNotebookEvent ) wxPROPERTY_COLLECTION( PageInfos, wxNotebookPageInfoList, wxNotebookPageInfo*, \ AddPageInfo, GetPageInfos, 0 /*flags*/, wxT("Helpstring"), \ @@ -186,7 +186,7 @@ wxSize wxNotebookBase::CalcSizeFromPage(const wxSize& sizePage) const bool wxNotebookBase::SendPageChangingEvent(int nPage) { - wxBookCtrlEvent event(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, GetId()); + wxBookCtrlEvent event(wxEVT_NOTEBOOK_PAGE_CHANGING, GetId()); event.SetSelection(nPage); event.SetOldSelection(GetSelection()); event.SetEventObject(this); @@ -195,7 +195,7 @@ bool wxNotebookBase::SendPageChangingEvent(int nPage) void wxNotebookBase::SendPageChangedEvent(int nPageOld, int nPageNew) { - wxBookCtrlEvent event(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, GetId()); + wxBookCtrlEvent event(wxEVT_NOTEBOOK_PAGE_CHANGED, GetId()); event.SetSelection(nPageNew == -1 ? GetSelection() : nPageNew); event.SetOldSelection(nPageOld); event.SetEventObject(this); diff --git a/src/common/pickerbase.cpp b/src/common/pickerbase.cpp index fa35329952..74f27c24a2 100644 --- a/src/common/pickerbase.cpp +++ b/src/common/pickerbase.cpp @@ -92,7 +92,7 @@ bool wxPickerBase::CreateBase(wxWindow *parent, // set the initial contents of the textctrl m_text->SetValue(text); - m_text->Connect(m_text->GetId(), wxEVT_COMMAND_TEXT_UPDATED, + m_text->Connect(m_text->GetId(), wxEVT_TEXT, wxCommandEventHandler(wxPickerBase::OnTextCtrlUpdate), NULL, this); m_text->Connect(m_text->GetId(), wxEVT_KILL_FOCUS, diff --git a/src/common/prntbase.cpp b/src/common/prntbase.cpp index e71e729e05..fee5f8d239 100644 --- a/src/common/prntbase.cpp +++ b/src/common/prntbase.cpp @@ -1112,7 +1112,7 @@ public: Connect(wxEVT_KILL_FOCUS, wxFocusEventHandler(wxPrintPageTextCtrl::OnKillFocus)); - Connect(wxEVT_COMMAND_TEXT_ENTER, + Connect(wxEVT_TEXT_ENTER, wxCommandEventHandler(wxPrintPageTextCtrl::OnTextEnter)); } diff --git a/src/common/radiobtncmn.cpp b/src/common/radiobtncmn.cpp index b32dbff048..f0d81bc2da 100644 --- a/src/common/radiobtncmn.cpp +++ b/src/common/radiobtncmn.cpp @@ -75,7 +75,7 @@ wxEND_FLAGS( wxRadioButtonStyle ) wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxRadioButton, wxControl, "wx/radiobut.h") wxBEGIN_PROPERTIES_TABLE(wxRadioButton) - wxEVENT_PROPERTY( Click, wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEvent ) + wxEVENT_PROPERTY( Click, wxEVT_RADIOBUTTON, wxCommandEvent ) wxPROPERTY( Font, wxFont, SetFont, GetFont , wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, \ wxT("Helpstring"), wxT("group")) wxPROPERTY( Label,wxString, SetLabel, GetLabel, wxString(), 0 /*flags*/, \ diff --git a/src/common/radiocmn.cpp b/src/common/radiocmn.cpp index 538281a0ed..6b85a15b86 100644 --- a/src/common/radiocmn.cpp +++ b/src/common/radiocmn.cpp @@ -90,7 +90,7 @@ wxEND_FLAGS( wxRadioBoxStyle ) IMPLEMENT_DYNAMIC_CLASS_XTI(wxRadioBox, wxControl,"wx/radiobox.h") wxBEGIN_PROPERTIES_TABLE(wxRadioBox) -wxEVENT_PROPERTY( Select , wxEVT_COMMAND_RADIOBOX_SELECTED , wxCommandEvent ) +wxEVENT_PROPERTY( Select , wxEVT_RADIOBOX , wxCommandEvent ) wxPROPERTY_FLAGS( WindowStyle , wxRadioBoxStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style wxEND_PROPERTIES_TABLE() diff --git a/src/common/slidercmn.cpp b/src/common/slidercmn.cpp index 04abd16f0b..abed40df1b 100644 --- a/src/common/slidercmn.cpp +++ b/src/common/slidercmn.cpp @@ -81,7 +81,7 @@ wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxSlider, wxControl, "wx/slider.h") wxBEGIN_PROPERTIES_TABLE(wxSlider) wxEVENT_RANGE_PROPERTY( Scroll, wxEVT_SCROLL_TOP, wxEVT_SCROLL_CHANGED, wxScrollEvent ) - wxEVENT_PROPERTY( Updated, wxEVT_COMMAND_SLIDER_UPDATED, wxCommandEvent ) + wxEVENT_PROPERTY( Updated, wxEVT_SLIDER, wxCommandEvent ) wxPROPERTY( Value, int, SetValue, GetValue, 0, 0 /*flags*/, \ wxT("Helpstring"), wxT("group")) diff --git a/src/common/spinctrlcmn.cpp b/src/common/spinctrlcmn.cpp index 5da05418d7..87c820bcf1 100644 --- a/src/common/spinctrlcmn.cpp +++ b/src/common/spinctrlcmn.cpp @@ -28,8 +28,8 @@ #if wxUSE_SPINCTRL -wxDEFINE_EVENT(wxEVT_COMMAND_SPINCTRL_UPDATED, wxSpinEvent); -wxDEFINE_EVENT(wxEVT_COMMAND_SPINCTRLDOUBLE_UPDATED, wxSpinDoubleEvent); +wxDEFINE_EVENT(wxEVT_SPINCTRL, wxSpinEvent); +wxDEFINE_EVENT(wxEVT_SPINCTRLDOUBLE, wxSpinDoubleEvent); // ---------------------------------------------------------------------------- // XTI @@ -75,9 +75,9 @@ wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxSpinCtrl, wxControl, "wx/spinctrl.h") wxBEGIN_PROPERTIES_TABLE(wxSpinCtrl) wxEVENT_RANGE_PROPERTY( Spin, wxEVT_SCROLL_TOP, wxEVT_SCROLL_CHANGED, wxSpinEvent ) -wxEVENT_PROPERTY( Updated, wxEVT_COMMAND_SPINCTRL_UPDATED, wxCommandEvent ) -wxEVENT_PROPERTY( TextUpdated, wxEVT_COMMAND_TEXT_UPDATED, wxCommandEvent ) -wxEVENT_PROPERTY( TextEnter, wxEVT_COMMAND_TEXT_ENTER, wxCommandEvent ) +wxEVENT_PROPERTY( Updated, wxEVT_SPINCTRL, wxCommandEvent ) +wxEVENT_PROPERTY( TextUpdated, wxEVT_TEXT, wxCommandEvent ) +wxEVENT_PROPERTY( TextEnter, wxEVT_TEXT_ENTER, wxCommandEvent ) wxPROPERTY( ValueString, wxString, SetValue, GetValue, \ wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, wxT("Helpstring"), wxT("group")) ; diff --git a/src/common/srchcmn.cpp b/src/common/srchcmn.cpp index cff6badf99..5b47fd8d20 100644 --- a/src/common/srchcmn.cpp +++ b/src/common/srchcmn.cpp @@ -35,8 +35,8 @@ const char wxSearchCtrlNameStr[] = "searchCtrl"; -wxDEFINE_EVENT(wxEVT_COMMAND_SEARCHCTRL_CANCEL_BTN, wxCommandEvent); -wxDEFINE_EVENT(wxEVT_COMMAND_SEARCHCTRL_SEARCH_BTN, wxCommandEvent); +wxDEFINE_EVENT(wxEVT_SEARCHCTRL_CANCEL_BTN, wxCommandEvent); +wxDEFINE_EVENT(wxEVT_SEARCHCTRL_SEARCH_BTN, wxCommandEvent); #endif // wxUSE_SEARCHCTRL diff --git a/src/common/tbarbase.cpp b/src/common/tbarbase.cpp index 2a33c1979b..b20130ec33 100644 --- a/src/common/tbarbase.cpp +++ b/src/common/tbarbase.cpp @@ -631,7 +631,7 @@ bool wxToolBarBase::IsVertical() const // Only allow toggle if returns true bool wxToolBarBase::OnLeftClick(int toolid, bool toggleDown) { - wxCommandEvent event(wxEVT_COMMAND_TOOL_CLICKED, toolid); + wxCommandEvent event(wxEVT_TOOL, toolid); event.SetEventObject(this); // we use SetInt() to make wxCommandEvent::IsChecked() return toggleDown @@ -651,7 +651,7 @@ void wxToolBarBase::OnRightClick(int toolid, long WXUNUSED(x), long WXUNUSED(y)) { - wxCommandEvent event(wxEVT_COMMAND_TOOL_RCLICKED, toolid); + wxCommandEvent event(wxEVT_TOOL_RCLICKED, toolid); event.SetEventObject(this); event.SetInt(toolid); @@ -665,7 +665,7 @@ void wxToolBarBase::OnRightClick(int toolid, // the tool toolid. void wxToolBarBase::OnMouseEnter(int toolid) { - wxCommandEvent event(wxEVT_COMMAND_TOOL_ENTER, GetId()); + wxCommandEvent event(wxEVT_TOOL_ENTER, GetId()); event.SetEventObject(this); event.SetInt(toolid); diff --git a/src/common/textcmn.cpp b/src/common/textcmn.cpp index dd84b88556..46847431f1 100644 --- a/src/common/textcmn.cpp +++ b/src/common/textcmn.cpp @@ -103,8 +103,8 @@ wxEND_FLAGS( wxTextCtrlStyle ) wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxTextCtrl, wxControl, "wx/textctrl.h") wxBEGIN_PROPERTIES_TABLE(wxTextCtrl) -wxEVENT_PROPERTY( TextUpdated, wxEVT_COMMAND_TEXT_UPDATED, wxCommandEvent ) -wxEVENT_PROPERTY( TextEnter, wxEVT_COMMAND_TEXT_ENTER, wxCommandEvent ) +wxEVENT_PROPERTY( TextUpdated, wxEVT_TEXT, wxCommandEvent ) +wxEVENT_PROPERTY( TextEnter, wxEVT_TEXT_ENTER, wxCommandEvent ) wxPROPERTY( Font, wxFont, SetFont, GetFont , wxEMPTY_PARAMETER_VALUE, \ 0 /*flags*/, wxT("Helpstring"), wxT("group") ) @@ -125,10 +125,10 @@ wxCONSTRUCTOR_6( wxTextCtrl, wxWindow*, Parent, wxWindowID, Id, \ IMPLEMENT_DYNAMIC_CLASS(wxTextUrlEvent, wxCommandEvent) -wxDEFINE_EVENT( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_TEXT_ENTER, wxCommandEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_TEXT_URL, wxTextUrlEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_TEXT_MAXLEN, wxCommandEvent ); +wxDEFINE_EVENT( wxEVT_TEXT, wxCommandEvent ); +wxDEFINE_EVENT( wxEVT_TEXT_ENTER, wxCommandEvent ); +wxDEFINE_EVENT( wxEVT_TEXT_URL, wxTextUrlEvent ); +wxDEFINE_EVENT( wxEVT_TEXT_MAXLEN, wxCommandEvent ); IMPLEMENT_ABSTRACT_CLASS(wxTextCtrlBase, wxControl) @@ -1213,6 +1213,6 @@ wxPoint wxTextAreaBase::DoPositionToCoords(long WXUNUSED(pos)) const // define this one even if !wxUSE_TEXTCTRL because it is also used by other // controls (wxComboBox and wxSpinCtrl) -wxDEFINE_EVENT( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEvent ); +wxDEFINE_EVENT( wxEVT_TEXT, wxCommandEvent ); #endif // wxUSE_TEXTCTRL/!wxUSE_TEXTCTRL diff --git a/src/common/textentrycmn.cpp b/src/common/textentrycmn.cpp index 2ca2077467..0db04b25f8 100644 --- a/src/common/textentrycmn.cpp +++ b/src/common/textentrycmn.cpp @@ -50,7 +50,7 @@ public: wxTextEntryHintData::OnSetFocus, this); wxBIND_OR_CONNECT_HACK(win, wxEVT_KILL_FOCUS, wxFocusEventHandler, wxTextEntryHintData::OnKillFocus, this); - wxBIND_OR_CONNECT_HACK(win, wxEVT_COMMAND_TEXT_UPDATED, + wxBIND_OR_CONNECT_HACK(win, wxEVT_TEXT, wxCommandEventHandler, wxTextEntryHintData::OnTextChanged, this); } @@ -367,7 +367,7 @@ bool wxTextEntryBase::SendTextUpdatedEvent(wxWindow *win) { wxCHECK_MSG( win, false, "can't send an event without a window" ); - wxCommandEvent event(wxEVT_COMMAND_TEXT_UPDATED, win->GetId()); + wxCommandEvent event(wxEVT_TEXT, win->GetId()); // do not do this as it could be very inefficient if the text control // contains a lot of text and we're not using ref-counted wxString diff --git a/src/common/treebase.cpp b/src/common/treebase.cpp index f831b489ad..82c7da2704 100644 --- a/src/common/treebase.cpp +++ b/src/common/treebase.cpp @@ -35,27 +35,27 @@ extern WXDLLEXPORT_DATA(const char) wxTreeCtrlNameStr[] = "treeCtrl"; // events // ---------------------------------------------------------------------------- -wxDEFINE_EVENT( wxEVT_COMMAND_TREE_BEGIN_DRAG, wxTreeEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_TREE_BEGIN_RDRAG, wxTreeEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, wxTreeEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_TREE_END_LABEL_EDIT, wxTreeEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_TREE_DELETE_ITEM, wxTreeEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_TREE_GET_INFO, wxTreeEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_TREE_SET_INFO, wxTreeEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_TREE_ITEM_EXPANDED, wxTreeEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_TREE_ITEM_EXPANDING, wxTreeEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_TREE_ITEM_COLLAPSED, wxTreeEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_TREE_ITEM_COLLAPSING, wxTreeEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_TREE_SEL_CHANGED, wxTreeEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_TREE_SEL_CHANGING, wxTreeEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_TREE_KEY_DOWN, wxTreeEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_TREE_ITEM_ACTIVATED, wxTreeEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK, wxTreeEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK, wxTreeEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_TREE_END_DRAG, wxTreeEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK, wxTreeEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_TREE_ITEM_GETTOOLTIP, wxTreeEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_TREE_ITEM_MENU, wxTreeEvent ); +wxDEFINE_EVENT( wxEVT_TREE_BEGIN_DRAG, wxTreeEvent ); +wxDEFINE_EVENT( wxEVT_TREE_BEGIN_RDRAG, wxTreeEvent ); +wxDEFINE_EVENT( wxEVT_TREE_BEGIN_LABEL_EDIT, wxTreeEvent ); +wxDEFINE_EVENT( wxEVT_TREE_END_LABEL_EDIT, wxTreeEvent ); +wxDEFINE_EVENT( wxEVT_TREE_DELETE_ITEM, wxTreeEvent ); +wxDEFINE_EVENT( wxEVT_TREE_GET_INFO, wxTreeEvent ); +wxDEFINE_EVENT( wxEVT_TREE_SET_INFO, wxTreeEvent ); +wxDEFINE_EVENT( wxEVT_TREE_ITEM_EXPANDED, wxTreeEvent ); +wxDEFINE_EVENT( wxEVT_TREE_ITEM_EXPANDING, wxTreeEvent ); +wxDEFINE_EVENT( wxEVT_TREE_ITEM_COLLAPSED, wxTreeEvent ); +wxDEFINE_EVENT( wxEVT_TREE_ITEM_COLLAPSING, wxTreeEvent ); +wxDEFINE_EVENT( wxEVT_TREE_SEL_CHANGED, wxTreeEvent ); +wxDEFINE_EVENT( wxEVT_TREE_SEL_CHANGING, wxTreeEvent ); +wxDEFINE_EVENT( wxEVT_TREE_KEY_DOWN, wxTreeEvent ); +wxDEFINE_EVENT( wxEVT_TREE_ITEM_ACTIVATED, wxTreeEvent ); +wxDEFINE_EVENT( wxEVT_TREE_ITEM_RIGHT_CLICK, wxTreeEvent ); +wxDEFINE_EVENT( wxEVT_TREE_ITEM_MIDDLE_CLICK, wxTreeEvent ); +wxDEFINE_EVENT( wxEVT_TREE_END_DRAG, wxTreeEvent ); +wxDEFINE_EVENT( wxEVT_TREE_STATE_IMAGE_CLICK, wxTreeEvent ); +wxDEFINE_EVENT( wxEVT_TREE_ITEM_GETTOOLTIP, wxTreeEvent ); +wxDEFINE_EVENT( wxEVT_TREE_ITEM_MENU, wxTreeEvent ); // ---------------------------------------------------------------------------- // XTI @@ -111,9 +111,9 @@ wxEND_FLAGS( wxTreeCtrlStyle ) wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxTreeCtrl, wxControl, "wx/treectrl.h") wxBEGIN_PROPERTIES_TABLE(wxTreeCtrl) -wxEVENT_PROPERTY( TextUpdated, wxEVT_COMMAND_TEXT_UPDATED, wxCommandEvent ) -wxEVENT_RANGE_PROPERTY( TreeEvent, wxEVT_COMMAND_TREE_BEGIN_DRAG, \ - wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK, wxTreeEvent ) +wxEVENT_PROPERTY( TextUpdated, wxEVT_TEXT, wxCommandEvent ) +wxEVENT_RANGE_PROPERTY( TreeEvent, wxEVT_TREE_BEGIN_DRAG, \ + wxEVT_TREE_STATE_IMAGE_CLICK, wxTreeEvent ) wxPROPERTY_FLAGS( WindowStyle, wxTreeCtrlStyle, long, SetWindowStyleFlag, \ GetWindowStyleFlag, wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, \ diff --git a/src/common/webview.cpp b/src/common/webview.cpp index e664d60192..96435027c9 100644 --- a/src/common/webview.cpp +++ b/src/common/webview.cpp @@ -44,12 +44,12 @@ extern WXDLLIMPEXP_DATA_WEBVIEW(const char) wxWebViewBackendDefault[] = "wxWebVi wxIMPLEMENT_ABSTRACT_CLASS(wxWebView, wxControl); wxIMPLEMENT_DYNAMIC_CLASS(wxWebViewEvent, wxCommandEvent); -wxDEFINE_EVENT( wxEVT_COMMAND_WEBVIEW_NAVIGATING, wxWebViewEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_WEBVIEW_NAVIGATED, wxWebViewEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_WEBVIEW_LOADED, wxWebViewEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_WEBVIEW_ERROR, wxWebViewEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_WEBVIEW_NEWWINDOW, wxWebViewEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_WEBVIEW_TITLE_CHANGED, wxWebViewEvent ); +wxDEFINE_EVENT( wxEVT_WEBVIEW_NAVIGATING, wxWebViewEvent ); +wxDEFINE_EVENT( wxEVT_WEBVIEW_NAVIGATED, wxWebViewEvent ); +wxDEFINE_EVENT( wxEVT_WEBVIEW_LOADED, wxWebViewEvent ); +wxDEFINE_EVENT( wxEVT_WEBVIEW_ERROR, wxWebViewEvent ); +wxDEFINE_EVENT( wxEVT_WEBVIEW_NEWWINDOW, wxWebViewEvent ); +wxDEFINE_EVENT( wxEVT_WEBVIEW_TITLE_CHANGED, wxWebViewEvent ); wxStringWebViewFactoryMap wxWebView::m_factoryMap; diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index 5e5a2c83be..c3b4e315ce 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -2953,7 +2953,7 @@ wxWindowBase::DoGetPopupMenuSelectionFromUser(wxMenu& menu, int x, int y) { gs_popupMenuSelection = wxID_NONE; - Connect(wxEVT_COMMAND_MENU_SELECTED, + Connect(wxEVT_MENU, wxCommandEventHandler(wxWindowBase::InternalOnPopupMenu), NULL, this); @@ -2976,7 +2976,7 @@ wxWindowBase::DoGetPopupMenuSelectionFromUser(wxMenu& menu, int x, int y) wxUpdateUIEventHandler(wxWindowBase::InternalOnPopupMenuUpdate), NULL, this); - Disconnect(wxEVT_COMMAND_MENU_SELECTED, + Disconnect(wxEVT_MENU, wxCommandEventHandler(wxWindowBase::InternalOnPopupMenu), NULL, this); diff --git a/src/generic/aboutdlgg.cpp b/src/generic/aboutdlgg.cpp index 86c6da123a..b3eaa51751 100644 --- a/src/generic/aboutdlgg.cpp +++ b/src/generic/aboutdlgg.cpp @@ -223,7 +223,7 @@ bool wxGenericAboutDialog::Create(const wxAboutDialogInfo& info, wxWindow* paren #if !wxUSE_MODAL_ABOUT_DIALOG Connect(wxEVT_CLOSE_WINDOW, wxCloseEventHandler(wxGenericAboutDialog::OnCloseWindow)); - Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, + Connect(wxID_OK, wxEVT_BUTTON, wxCommandEventHandler(wxGenericAboutDialog::OnOK)); #endif // !wxUSE_MODAL_ABOUT_DIALOG diff --git a/src/generic/buttonbar.cpp b/src/generic/buttonbar.cpp index 82d43dc554..c9e1f5f5d0 100644 --- a/src/generic/buttonbar.cpp +++ b/src/generic/buttonbar.cpp @@ -550,7 +550,7 @@ void wxButtonToolBar::OnLeftUp(wxMouseEvent& event) wxButtonToolBarTool* tool = (wxButtonToolBarTool*) FindToolForPosition(event.GetX(), event.GetY()); if (tool && tool->GetButton() && (event.GetY() > (tool->m_y + tool->GetButton()->GetSize().y))) { - wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, tool->GetId()); + wxCommandEvent event(wxEVT_BUTTON, tool->GetId()); event.SetEventObject(tool->GetButton()); if (!GetEventHandler()->ProcessEvent(event)) event.Skip(); diff --git a/src/generic/calctrlg.cpp b/src/generic/calctrlg.cpp index f8a14221c6..8565b8bb39 100644 --- a/src/generic/calctrlg.cpp +++ b/src/generic/calctrlg.cpp @@ -274,7 +274,7 @@ void wxGenericCalendarCtrl::CreateMonthComboBox() wxDefaultCoord, wxSIZE_AUTO_WIDTH|wxSIZE_AUTO_HEIGHT); - m_comboMonth->Connect(m_comboMonth->GetId(), wxEVT_COMMAND_COMBOBOX_SELECTED, + m_comboMonth->Connect(m_comboMonth->GetId(), wxEVT_COMBOBOX, wxCommandEventHandler(wxGenericCalendarCtrl::OnMonthChange), NULL, this); } @@ -288,11 +288,11 @@ void wxGenericCalendarCtrl::CreateYearSpinCtrl() wxSP_ARROW_KEYS | wxCLIP_SIBLINGS, -4300, 10000, GetDate().GetYear()); - m_spinYear->Connect(m_spinYear->GetId(), wxEVT_COMMAND_TEXT_UPDATED, + m_spinYear->Connect(m_spinYear->GetId(), wxEVT_TEXT, wxCommandEventHandler(wxGenericCalendarCtrl::OnYearTextChange), NULL, this); - m_spinYear->Connect(m_spinYear->GetId(), wxEVT_COMMAND_SPINCTRL_UPDATED, + m_spinYear->Connect(m_spinYear->GetId(), wxEVT_SPINCTRL, wxSpinEventHandler(wxGenericCalendarCtrl::OnYearChange), NULL, this); } diff --git a/src/generic/choicbkg.cpp b/src/generic/choicbkg.cpp index 52fd088591..c8b2c5acf5 100644 --- a/src/generic/choicbkg.cpp +++ b/src/generic/choicbkg.cpp @@ -49,8 +49,8 @@ IMPLEMENT_DYNAMIC_CLASS(wxChoicebook, wxBookCtrlBase) -wxDEFINE_EVENT( wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING, wxBookCtrlEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED, wxBookCtrlEvent ); +wxDEFINE_EVENT( wxEVT_CHOICEBOOK_PAGE_CHANGING, wxBookCtrlEvent ); +wxDEFINE_EVENT( wxEVT_CHOICEBOOK_PAGE_CHANGED, wxBookCtrlEvent ); BEGIN_EVENT_TABLE(wxChoicebook, wxBookCtrlBase) EVT_CHOICE(wxID_ANY, wxChoicebook::OnChoiceSelected) @@ -162,12 +162,12 @@ void wxChoicebook::SetImageList(wxImageList *imageList) wxBookCtrlEvent* wxChoicebook::CreatePageChangingEvent() const { - return new wxBookCtrlEvent(wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING, m_windowId); + return new wxBookCtrlEvent(wxEVT_CHOICEBOOK_PAGE_CHANGING, m_windowId); } void wxChoicebook::MakeChangedEvent(wxBookCtrlEvent &event) { - event.SetEventType(wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED); + event.SetEventType(wxEVT_CHOICEBOOK_PAGE_CHANGED); } // ---------------------------------------------------------------------------- diff --git a/src/generic/clrpickerg.cpp b/src/generic/clrpickerg.cpp index ffc71547ad..9f855ca485 100644 --- a/src/generic/clrpickerg.cpp +++ b/src/generic/clrpickerg.cpp @@ -58,7 +58,7 @@ bool wxGenericColourButton::Create( wxWindow *parent, wxWindowID id, } // and handle user clicks on it - Connect(GetId(), wxEVT_COMMAND_BUTTON_CLICKED, + Connect(GetId(), wxEVT_BUTTON, wxCommandEventHandler(wxGenericColourButton::OnButtonClick), NULL, this); diff --git a/src/generic/collpaneg.cpp b/src/generic/collpaneg.cpp index d0fd7bfdb2..b04b142f51 100644 --- a/src/generic/collpaneg.cpp +++ b/src/generic/collpaneg.cpp @@ -50,7 +50,7 @@ const char wxCollapsiblePaneNameStr[] = "collapsiblePane"; // wxGenericCollapsiblePane //----------------------------------------------------------------------------- -wxDEFINE_EVENT( wxEVT_COMMAND_COLLPANE_CHANGED, wxCollapsiblePaneEvent ); +wxDEFINE_EVENT( wxEVT_COLLAPSIBLEPANE_CHANGED, wxCollapsiblePaneEvent ); IMPLEMENT_DYNAMIC_CLASS(wxGenericCollapsiblePane, wxControl) IMPLEMENT_DYNAMIC_CLASS(wxCollapsiblePaneEvent, wxCommandEvent) diff --git a/src/generic/datavgen.cpp b/src/generic/datavgen.cpp index 3a29887b4b..a23a0a3549 100644 --- a/src/generic/datavgen.cpp +++ b/src/generic/datavgen.cpp @@ -249,7 +249,7 @@ private: { const unsigned idx = event.GetColumn(); - if ( SendEvent(wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_CLICK, idx) ) + if ( SendEvent(wxEVT_DATAVIEW_COLUMN_HEADER_CLICK, idx) ) return; // default handling for the column click is to sort by this column or @@ -279,12 +279,12 @@ private: owner->OnColumnChange(idx); - SendEvent(wxEVT_COMMAND_DATAVIEW_COLUMN_SORTED, idx); + SendEvent(wxEVT_DATAVIEW_COLUMN_SORTED, idx); } void OnRClick(wxHeaderCtrlEvent& event) { - if ( !SendEvent(wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK, + if ( !SendEvent(wxEVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICKED, event.GetColumn()) ) event.Skip(); } @@ -1571,7 +1571,7 @@ wxDragResult wxDataViewMainWindow::OnDragOver( wxDataFormat format, wxCoord x, wxDataViewModel *model = GetModel(); - wxDataViewEvent event( wxEVT_COMMAND_DATAVIEW_ITEM_DROP_POSSIBLE, m_owner->GetId() ); + wxDataViewEvent event( wxEVT_DATAVIEW_ITEM_DROP_POSSIBLE, m_owner->GetId() ); event.SetEventObject( m_owner ); event.SetItem( item ); event.SetModel( model ); @@ -1615,7 +1615,7 @@ bool wxDataViewMainWindow::OnDrop( wxDataFormat format, wxCoord x, wxCoord y ) wxDataViewModel *model = GetModel(); - wxDataViewEvent event( wxEVT_COMMAND_DATAVIEW_ITEM_DROP_POSSIBLE, m_owner->GetId() ); + wxDataViewEvent event( wxEVT_DATAVIEW_ITEM_DROP_POSSIBLE, m_owner->GetId() ); event.SetEventObject( m_owner ); event.SetItem( item ); event.SetModel( model ); @@ -1646,7 +1646,7 @@ wxDragResult wxDataViewMainWindow::OnData( wxDataFormat format, wxCoord x, wxCoo wxCustomDataObject *obj = (wxCustomDataObject *) GetDropTarget()->GetDataObject(); - wxDataViewEvent event( wxEVT_COMMAND_DATAVIEW_ITEM_DROP, m_owner->GetId() ); + wxDataViewEvent event( wxEVT_DATAVIEW_ITEM_DROP, m_owner->GetId() ); event.SetEventObject( m_owner ); event.SetItem( item ); event.SetModel( model ); @@ -1805,7 +1805,7 @@ void wxDataViewMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) ) // Send the event to wxDataViewCtrl itself. wxWindow * const parent = GetParent(); - wxDataViewEvent cache_event(wxEVT_COMMAND_DATAVIEW_CACHE_HINT, parent->GetId()); + wxDataViewEvent cache_event(wxEVT_DATAVIEW_CACHE_HINT, parent->GetId()); cache_event.SetEventObject(parent); cache_event.SetCache(item_start, item_last - 1); parent->ProcessWindowEvent(cache_event); @@ -2490,7 +2490,7 @@ bool wxDataViewMainWindow::ItemChanged(const wxDataViewItem & item) // Send event wxWindow *parent = GetParent(); - wxDataViewEvent le(wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED, parent->GetId()); + wxDataViewEvent le(wxEVT_DATAVIEW_ITEM_VALUE_CHANGED, parent->GetId()); le.SetEventObject(parent); le.SetModel(GetModel()); le.SetItem(item); @@ -2531,7 +2531,7 @@ bool wxDataViewMainWindow::ValueChanged( const wxDataViewItem & item, unsigned i // Send event wxWindow *parent = GetParent(); - wxDataViewEvent le(wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED, parent->GetId()); + wxDataViewEvent le(wxEVT_DATAVIEW_ITEM_VALUE_CHANGED, parent->GetId()); le.SetEventObject(parent); le.SetModel(GetModel()); le.SetItem(item); @@ -2810,7 +2810,7 @@ bool wxDataViewMainWindow::IsRowSelected( unsigned int row ) void wxDataViewMainWindow::SendSelectionChangedEvent( const wxDataViewItem& item) { wxWindow *parent = GetParent(); - wxDataViewEvent le(wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, parent->GetId()); + wxDataViewEvent le(wxEVT_DATAVIEW_SELECTION_CHANGED, parent->GetId()); le.SetEventObject(parent); le.SetModel(GetModel()); @@ -3161,7 +3161,7 @@ void wxDataViewMainWindow::Expand( unsigned int row ) if (!node->IsOpen()) { - if ( !SendExpanderEvent(wxEVT_COMMAND_DATAVIEW_ITEM_EXPANDING, node->GetItem()) ) + if ( !SendExpanderEvent(wxEVT_DATAVIEW_ITEM_EXPANDING, node->GetItem()) ) { // Vetoed by the event handler. return; @@ -3195,7 +3195,7 @@ void wxDataViewMainWindow::Expand( unsigned int row ) m_count = -1; UpdateDisplay(); // Send the expanded event - SendExpanderEvent(wxEVT_COMMAND_DATAVIEW_ITEM_EXPANDED,node->GetItem()); + SendExpanderEvent(wxEVT_DATAVIEW_ITEM_EXPANDED,node->GetItem()); } } @@ -3213,7 +3213,7 @@ void wxDataViewMainWindow::Collapse(unsigned int row) if (node->IsOpen()) { - if ( !SendExpanderEvent(wxEVT_COMMAND_DATAVIEW_ITEM_COLLAPSING,node->GetItem()) ) + if ( !SendExpanderEvent(wxEVT_DATAVIEW_ITEM_COLLAPSING,node->GetItem()) ) { // Vetoed by the event handler. return; @@ -3269,7 +3269,7 @@ void wxDataViewMainWindow::Collapse(unsigned int row) m_count = -1; UpdateDisplay(); - SendExpanderEvent(wxEVT_COMMAND_DATAVIEW_ITEM_COLLAPSED,node->GetItem()); + SendExpanderEvent(wxEVT_DATAVIEW_ITEM_COLLAPSED,node->GetItem()); } } @@ -3696,13 +3696,13 @@ void wxDataViewMainWindow::OnChar( wxKeyEvent &event ) } else { - // Enter activates the item, i.e. sends wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED to + // Enter activates the item, i.e. sends wxEVT_DATAVIEW_ITEM_ACTIVATED to // it. Only if that event is not handled do we activate column renderer (which // is normally done by Space) or even inline editing. const wxDataViewItem item = GetItemByRow(m_currentRow); - wxDataViewEvent le(wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, + wxDataViewEvent le(wxEVT_DATAVIEW_ITEM_ACTIVATED, parent->GetId()); le.SetItem(item); le.SetEventObject(parent); @@ -4058,7 +4058,7 @@ void wxDataViewMainWindow::OnMouse( wxMouseEvent &event ) if (event.RightUp()) { wxWindow *parent = GetParent(); - wxDataViewEvent le(wxEVT_COMMAND_DATAVIEW_ITEM_CONTEXT_MENU, parent->GetId()); + wxDataViewEvent le(wxEVT_DATAVIEW_ITEM_CONTEXT_MENU, parent->GetId()); le.SetEventObject(parent); le.SetModel(model); @@ -4170,7 +4170,7 @@ void wxDataViewMainWindow::OnMouse( wxMouseEvent &event ) wxDataViewItem itemDragged = GetItemByRow( drag_item_row ); // Notify cell about drag - wxDataViewEvent event( wxEVT_COMMAND_DATAVIEW_ITEM_BEGIN_DRAG, m_owner->GetId() ); + wxDataViewEvent event( wxEVT_DATAVIEW_ITEM_BEGIN_DRAG, m_owner->GetId() ); event.SetEventObject( m_owner ); event.SetItem( itemDragged ); event.SetModel( model ); @@ -4220,7 +4220,7 @@ void wxDataViewMainWindow::OnMouse( wxMouseEvent &event ) else if ( current == m_lineLastClicked ) { wxWindow *parent = GetParent(); - wxDataViewEvent le(wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, parent->GetId()); + wxDataViewEvent le(wxEVT_DATAVIEW_ITEM_ACTIVATED, parent->GetId()); le.SetItem( item ); le.SetColumn( col->GetModelColumn() ); le.SetDataViewColumn( col ); diff --git a/src/generic/dirctrlg.cpp b/src/generic/dirctrlg.cpp index 78f8ffc252..f38afa7ce9 100644 --- a/src/generic/dirctrlg.cpp +++ b/src/generic/dirctrlg.cpp @@ -106,7 +106,7 @@ bool wxIsDriveAvailable(const wxString& dirName); // events // ---------------------------------------------------------------------------- -wxDEFINE_EVENT( wxEVT_COMMAND_DIRCTRL_CHANGED, wxTreeEvent ); +wxDEFINE_EVENT( wxEVT_DIRCTRL_CHANGED, wxTreeEvent ); // ---------------------------------------------------------------------------- // wxGetAvailableDrives, for WINDOWS, DOS, OS2, MAC, UNIX (returns "/") @@ -703,7 +703,7 @@ void wxGenericDirCtrl::OnEndEditItem(wxTreeEvent &event) void wxGenericDirCtrl::OnTreeSelChange(wxTreeEvent &event) { - wxTreeEvent changedEvent(wxEVT_COMMAND_DIRCTRL_CHANGED, GetId()); + wxTreeEvent changedEvent(wxEVT_DIRCTRL_CHANGED, GetId()); changedEvent.SetEventObject(this); changedEvent.SetItem(event.GetItem()); diff --git a/src/generic/editlbox.cpp b/src/generic/editlbox.cpp index 7818c33a5a..14d3cd18cb 100644 --- a/src/generic/editlbox.cpp +++ b/src/generic/editlbox.cpp @@ -350,9 +350,9 @@ void wxEditableListBox::OnEndLabelEdit(wxListEvent& event) // possible: m_listCtrl->InsertItem(m_listCtrl->GetItemCount(), wxEmptyString); - // Simulate a wxEVT_COMMAND_LIST_ITEM_SELECTED event for the new item, + // Simulate a wxEVT_LIST_ITEM_SELECTED event for the new item, // so that the buttons are enabled/disabled properly - wxListEvent selectionEvent(wxEVT_COMMAND_LIST_ITEM_SELECTED, m_listCtrl->GetId()); + wxListEvent selectionEvent(wxEVT_LIST_ITEM_SELECTED, m_listCtrl->GetId()); selectionEvent.m_itemIndex = event.GetIndex(); m_listCtrl->GetEventHandler()->ProcessEvent(selectionEvent); } diff --git a/src/generic/fdrepdlg.cpp b/src/generic/fdrepdlg.cpp index 27289d6e37..136edf9630 100644 --- a/src/generic/fdrepdlg.cpp +++ b/src/generic/fdrepdlg.cpp @@ -259,22 +259,22 @@ void wxGenericFindReplaceDialog::SendEvent(const wxEventType& evtType) void wxGenericFindReplaceDialog::OnFind(wxCommandEvent& WXUNUSED(event)) { - SendEvent(wxEVT_COMMAND_FIND_NEXT); + SendEvent(wxEVT_FIND_NEXT); } void wxGenericFindReplaceDialog::OnReplace(wxCommandEvent& WXUNUSED(event)) { - SendEvent(wxEVT_COMMAND_FIND_REPLACE); + SendEvent(wxEVT_FIND_REPLACE); } void wxGenericFindReplaceDialog::OnReplaceAll(wxCommandEvent& WXUNUSED(event)) { - SendEvent(wxEVT_COMMAND_FIND_REPLACE_ALL); + SendEvent(wxEVT_FIND_REPLACE_ALL); } void wxGenericFindReplaceDialog::OnCancel(wxCommandEvent& WXUNUSED(event)) { - SendEvent(wxEVT_COMMAND_FIND_CLOSE); + SendEvent(wxEVT_FIND_CLOSE); Show(false); } @@ -287,7 +287,7 @@ void wxGenericFindReplaceDialog::OnUpdateFindUI(wxUpdateUIEvent &event) void wxGenericFindReplaceDialog::OnCloseWindow(wxCloseEvent &) { - SendEvent(wxEVT_COMMAND_FIND_CLOSE); + SendEvent(wxEVT_FIND_CLOSE); } #endif // wxUSE_FINDREPLDLG diff --git a/src/generic/filepickerg.cpp b/src/generic/filepickerg.cpp index a33a965db0..965b875fe8 100644 --- a/src/generic/filepickerg.cpp +++ b/src/generic/filepickerg.cpp @@ -81,7 +81,7 @@ bool wxGenericFileDirButton::Create(wxWindow *parent, } // and handle user clicks on it - Connect(GetId(), wxEVT_COMMAND_BUTTON_CLICKED, + Connect(GetId(), wxEVT_BUTTON, wxCommandEventHandler(wxGenericFileDirButton::OnButtonClick), NULL, this); diff --git a/src/generic/fontpickerg.cpp b/src/generic/fontpickerg.cpp index ffcbb91de3..c09cb09234 100644 --- a/src/generic/fontpickerg.cpp +++ b/src/generic/fontpickerg.cpp @@ -59,7 +59,7 @@ bool wxGenericFontButton::Create( wxWindow *parent, wxWindowID id, } // and handle user clicks on it - Connect(GetId(), wxEVT_COMMAND_BUTTON_CLICKED, + Connect(GetId(), wxEVT_BUTTON, wxCommandEventHandler(wxGenericFontButton::OnButtonClick), NULL, this); diff --git a/src/generic/headerctrlg.cpp b/src/generic/headerctrlg.cpp index 279c1d031b..5ce9bcf83c 100644 --- a/src/generic/headerctrlg.cpp +++ b/src/generic/headerctrlg.cpp @@ -278,7 +278,7 @@ void wxHeaderCtrl::CancelDragging() unsigned int& col = IsResizing() ? m_colBeingResized : m_colBeingReordered; - wxHeaderCtrlEvent event(wxEVT_COMMAND_HEADER_DRAGGING_CANCELLED, GetId()); + wxHeaderCtrlEvent event(wxEVT_HEADER_DRAGGING_CANCELLED, GetId()); event.SetEventObject(this); event.SetColumn(col); @@ -303,8 +303,8 @@ int wxHeaderCtrl::ConstrainByMinWidth(unsigned int col, int& xPhysical) void wxHeaderCtrl::StartOrContinueResizing(unsigned int col, int xPhysical) { - wxHeaderCtrlEvent event(IsResizing() ? wxEVT_COMMAND_HEADER_RESIZING - : wxEVT_COMMAND_HEADER_BEGIN_RESIZE, + wxHeaderCtrlEvent event(IsResizing() ? wxEVT_HEADER_RESIZING + : wxEVT_HEADER_BEGIN_RESIZE, GetId()); event.SetEventObject(this); event.SetColumn(col); @@ -341,7 +341,7 @@ void wxHeaderCtrl::EndResizing(int xPhysical) ReleaseMouse(); - wxHeaderCtrlEvent event(wxEVT_COMMAND_HEADER_END_RESIZE, GetId()); + wxHeaderCtrlEvent event(wxEVT_HEADER_END_RESIZE, GetId()); event.SetEventObject(this); event.SetColumn(m_colBeingResized); event.SetWidth(ConstrainByMinWidth(m_colBeingResized, xPhysical)); @@ -382,7 +382,7 @@ void wxHeaderCtrl::UpdateReorderingMarker(int xPhysical) void wxHeaderCtrl::StartReordering(unsigned int col, int xPhysical) { - wxHeaderCtrlEvent event(wxEVT_COMMAND_HEADER_BEGIN_REORDER, GetId()); + wxHeaderCtrlEvent event(wxEVT_HEADER_BEGIN_REORDER, GetId()); event.SetEventObject(this); event.SetColumn(col); @@ -421,7 +421,7 @@ bool wxHeaderCtrl::EndReordering(int xPhysical) if ( colNew != colOld ) { - wxHeaderCtrlEvent event(wxEVT_COMMAND_HEADER_END_REORDER, GetId()); + wxHeaderCtrlEvent event(wxEVT_HEADER_END_REORDER, GetId()); event.SetEventObject(this); event.SetColumn(colOld); @@ -680,23 +680,23 @@ void wxHeaderCtrl::OnMouse(wxMouseEvent& mevent) // treat left double clicks on separator specially if ( onSeparator && dblclk ) { - evtType = wxEVT_COMMAND_HEADER_SEPARATOR_DCLICK; + evtType = wxEVT_HEADER_SEPARATOR_DCLICK; } else // not double click on separator { - evtType = click ? wxEVT_COMMAND_HEADER_CLICK - : wxEVT_COMMAND_HEADER_DCLICK; + evtType = click ? wxEVT_HEADER_CLICK + : wxEVT_HEADER_DCLICK; } break; case wxMOUSE_BTN_RIGHT: - evtType = click ? wxEVT_COMMAND_HEADER_RIGHT_CLICK - : wxEVT_COMMAND_HEADER_RIGHT_DCLICK; + evtType = click ? wxEVT_HEADER_RIGHT_CLICK + : wxEVT_HEADER_RIGHT_DCLICK; break; case wxMOUSE_BTN_MIDDLE: - evtType = click ? wxEVT_COMMAND_HEADER_MIDDLE_CLICK - : wxEVT_COMMAND_HEADER_MIDDLE_DCLICK; + evtType = click ? wxEVT_HEADER_MIDDLE_CLICK + : wxEVT_HEADER_MIDDLE_DCLICK; break; default: diff --git a/src/generic/hyperlinkg.cpp b/src/generic/hyperlinkg.cpp index 257e6ef67f..e64480d762 100644 --- a/src/generic/hyperlinkg.cpp +++ b/src/generic/hyperlinkg.cpp @@ -120,7 +120,7 @@ void wxGenericHyperlinkCtrl::ConnectMenuHandlers() { // Connect the event handlers for the context menu. Connect( wxEVT_RIGHT_UP, wxMouseEventHandler(wxGenericHyperlinkCtrl::OnRightUp) ); - Connect( wxHYPERLINK_POPUP_COPY_ID, wxEVT_COMMAND_MENU_SELECTED, + Connect( wxHYPERLINK_POPUP_COPY_ID, wxEVT_MENU, wxCommandEventHandler(wxGenericHyperlinkCtrl::OnPopUpCopy) ); } diff --git a/src/generic/listbkg.cpp b/src/generic/listbkg.cpp index 9196219b1a..ccdc712780 100644 --- a/src/generic/listbkg.cpp +++ b/src/generic/listbkg.cpp @@ -49,8 +49,8 @@ IMPLEMENT_DYNAMIC_CLASS(wxListbook, wxBookCtrlBase) -wxDEFINE_EVENT( wxEVT_COMMAND_LISTBOOK_PAGE_CHANGING, wxBookCtrlEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_LISTBOOK_PAGE_CHANGED, wxBookCtrlEvent ); +wxDEFINE_EVENT( wxEVT_LISTBOOK_PAGE_CHANGING, wxBookCtrlEvent ); +wxDEFINE_EVENT( wxEVT_LISTBOOK_PAGE_CHANGED, wxBookCtrlEvent ); BEGIN_EVENT_TABLE(wxListbook, wxBookCtrlBase) EVT_SIZE(wxListbook::OnSize) @@ -303,12 +303,12 @@ void wxListbook::UpdateSelectedPage(size_t newsel) wxBookCtrlEvent* wxListbook::CreatePageChangingEvent() const { - return new wxBookCtrlEvent(wxEVT_COMMAND_LISTBOOK_PAGE_CHANGING, m_windowId); + return new wxBookCtrlEvent(wxEVT_LISTBOOK_PAGE_CHANGING, m_windowId); } void wxListbook::MakeChangedEvent(wxBookCtrlEvent &event) { - event.SetEventType(wxEVT_COMMAND_LISTBOOK_PAGE_CHANGED); + event.SetEventType(wxEVT_LISTBOOK_PAGE_CHANGED); } diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index b311e031ef..54f7f0dd57 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -1214,7 +1214,7 @@ void wxListHeaderWindow::OnMouse( wxMouseEvent &event ) if (m_isDragging) { - SendListEvent(wxEVT_COMMAND_LIST_COL_DRAGGING, event.GetPosition()); + SendListEvent(wxEVT_LIST_COL_DRAGGING, event.GetPosition()); // we don't draw the line beyond our window, but we allow dragging it // there @@ -1233,7 +1233,7 @@ void wxListHeaderWindow::OnMouse( wxMouseEvent &event ) m_isDragging = false; m_dirty = true; m_owner->SetColumnWidth( m_column, m_currentX - m_minX ); - SendListEvent(wxEVT_COMMAND_LIST_COL_END_DRAG, event.GetPosition()); + SendListEvent(wxEVT_LIST_COL_END_DRAG, event.GetPosition()); } else { @@ -1286,7 +1286,7 @@ void wxListHeaderWindow::OnMouse( wxMouseEvent &event ) { if (hit_border && event.LeftDown()) { - if ( SendListEvent(wxEVT_COMMAND_LIST_COL_BEGIN_DRAG, + if ( SendListEvent(wxEVT_LIST_COL_BEGIN_DRAG, event.GetPosition()) ) { m_isDragging = true; @@ -1315,8 +1315,8 @@ void wxListHeaderWindow::OnMouse( wxMouseEvent &event ) } SendListEvent( event.LeftDown() - ? wxEVT_COMMAND_LIST_COL_CLICK - : wxEVT_COMMAND_LIST_COL_RIGHT_CLICK, + ? wxEVT_LIST_COL_CLICK + : wxEVT_LIST_COL_RIGHT_CLICK, event.GetPosition()); } } @@ -1888,8 +1888,8 @@ bool wxListMainWindow::HighlightLine( size_t line, bool highlight ) if ( changed ) { - SendNotify( line, highlight ? wxEVT_COMMAND_LIST_ITEM_SELECTED - : wxEVT_COMMAND_LIST_ITEM_DESELECTED ); + SendNotify( line, highlight ? wxEVT_LIST_ITEM_SELECTED + : wxEVT_LIST_ITEM_DESELECTED ); } return changed; @@ -2043,7 +2043,7 @@ void wxListMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) ) // tell the caller cache to cache the data if ( IsVirtual() ) { - wxListEvent evCache(wxEVT_COMMAND_LIST_CACHE_HINT, + wxListEvent evCache(wxEVT_LIST_CACHE_HINT, GetParent()->GetId()); evCache.SetEventObject( GetParent() ); evCache.m_oldItemIndex = visibleFrom; @@ -2195,7 +2195,7 @@ void wxListMainWindow::SendNotify( size_t line, { GetLine(line)->GetItem( 0, le.m_item ); } - //else: this happens for wxEVT_COMMAND_LIST_ITEM_FOCUSED event + //else: this happens for wxEVT_LIST_ITEM_FOCUSED event } //else: there may be no more such item @@ -2211,7 +2211,7 @@ void wxListMainWindow::ChangeCurrent(size_t current) if ( m_renameTimer->IsRunning() ) m_renameTimer->Stop(); - SendNotify(current, wxEVT_COMMAND_LIST_ITEM_FOCUSED); + SendNotify(current, wxEVT_LIST_ITEM_FOCUSED); } wxTextCtrl *wxListMainWindow::EditLabel(long item, wxClassInfo* textControlClass) @@ -2224,7 +2224,7 @@ wxTextCtrl *wxListMainWindow::EditLabel(long item, wxClassInfo* textControlClass size_t itemEdit = (size_t)item; - wxListEvent le( wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT, GetParent()->GetId() ); + wxListEvent le( wxEVT_LIST_BEGIN_LABEL_EDIT, GetParent()->GetId() ); le.SetEventObject( GetParent() ); le.m_item.m_itemId = le.m_itemIndex = item; @@ -2258,7 +2258,7 @@ void wxListMainWindow::OnRenameTimer() bool wxListMainWindow::OnRenameAccept(size_t itemEdit, const wxString& value) { - wxListEvent le( wxEVT_COMMAND_LIST_END_LABEL_EDIT, GetParent()->GetId() ); + wxListEvent le( wxEVT_LIST_END_LABEL_EDIT, GetParent()->GetId() ); le.SetEventObject( GetParent() ); le.m_item.m_itemId = le.m_itemIndex = itemEdit; @@ -2276,7 +2276,7 @@ bool wxListMainWindow::OnRenameAccept(size_t itemEdit, const wxString& value) void wxListMainWindow::OnRenameCancelled(size_t itemEdit) { // let owner know that the edit was cancelled - wxListEvent le( wxEVT_COMMAND_LIST_END_LABEL_EDIT, GetParent()->GetId() ); + wxListEvent le( wxEVT_LIST_END_LABEL_EDIT, GetParent()->GetId() ); le.SetEditCanceled(true); @@ -2338,7 +2338,7 @@ void wxListMainWindow::OnMouse( wxMouseEvent &event ) { if (event.RightDown()) { - SendNotify( (size_t)-1, wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK, event.GetPosition() ); + SendNotify( (size_t)-1, wxEVT_LIST_ITEM_RIGHT_CLICK, event.GetPosition() ); wxContextMenuEvent evtCtx(wxEVT_CONTEXT_MENU, GetParent()->GetId(), @@ -2394,7 +2394,7 @@ void wxListMainWindow::OnMouse( wxMouseEvent &event ) m_dragCount = 0; // The only mouse event that can be generated without any valid item is - // wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK as it can be useful to have a global + // wxEVT_LIST_ITEM_RIGHT_CLICK as it can be useful to have a global // popup menu for the list control itself which should be shown even when // the user clicks outside of any item. if ( !hitResult ) @@ -2402,7 +2402,7 @@ void wxListMainWindow::OnMouse( wxMouseEvent &event ) // outside of any item if (event.RightDown()) { - SendNotify( (size_t) -1, wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK, event.GetPosition() ); + SendNotify( (size_t) -1, wxEVT_LIST_ITEM_RIGHT_CLICK, event.GetPosition() ); wxContextMenuEvent evtCtx( wxEVT_CONTEXT_MENU, @@ -2433,8 +2433,8 @@ void wxListMainWindow::OnMouse( wxMouseEvent &event ) if (m_dragCount != 3) return; - int command = event.RightIsDown() ? wxEVT_COMMAND_LIST_BEGIN_RDRAG - : wxEVT_COMMAND_LIST_BEGIN_DRAG; + int command = event.RightIsDown() ? wxEVT_LIST_BEGIN_RDRAG + : wxEVT_LIST_BEGIN_DRAG; SendNotify( m_lineLastClicked, command, m_dragStart ); @@ -2451,7 +2451,7 @@ void wxListMainWindow::OnMouse( wxMouseEvent &event ) if ( current == m_lineLastClicked ) { - SendNotify( current, wxEVT_COMMAND_LIST_ITEM_ACTIVATED ); + SendNotify( current, wxEVT_LIST_ITEM_ACTIVATED ); return; } @@ -2513,14 +2513,14 @@ void wxListMainWindow::OnMouse( wxMouseEvent &event ) ReverseHighlight(m_current); } - SendNotify( current, wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK, event.GetPosition() ); + SendNotify( current, wxEVT_LIST_ITEM_RIGHT_CLICK, event.GetPosition() ); // Allow generation of context menu event event.Skip(); } else if (event.MiddleDown()) { - SendNotify( current, wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK ); + SendNotify( current, wxEVT_LIST_ITEM_MIDDLE_CLICK ); } else if ( event.LeftDown() || forceClick ) { @@ -2740,7 +2740,7 @@ void wxListMainWindow::OnKeyDown( wxKeyEvent &event ) return; // send a list event - wxListEvent le( wxEVT_COMMAND_LIST_KEY_DOWN, parent->GetId() ); + wxListEvent le( wxEVT_LIST_KEY_DOWN, parent->GetId() ); le.m_item.m_itemId = le.m_itemIndex = m_current; if (HasCurrent()) @@ -2900,7 +2900,7 @@ void wxListMainWindow::OnChar( wxKeyEvent &event ) } else // normal space press { - SendNotify( m_current, wxEVT_COMMAND_LIST_ITEM_ACTIVATED ); + SendNotify( m_current, wxEVT_LIST_ITEM_ACTIVATED ); } } else // multiple selection @@ -2911,7 +2911,7 @@ void wxListMainWindow::OnChar( wxKeyEvent &event ) case WXK_RETURN: case WXK_EXECUTE: - SendNotify( m_current, wxEVT_COMMAND_LIST_ITEM_ACTIVATED ); + SendNotify( m_current, wxEVT_LIST_ITEM_ACTIVATED ); break; default: @@ -3938,7 +3938,7 @@ void wxListMainWindow::DeleteItem( long lindex ) ResetVisibleLinesRange(); } - SendNotify( index, wxEVT_COMMAND_LIST_DELETE_ITEM, wxDefaultPosition ); + SendNotify( index, wxEVT_LIST_DELETE_ITEM, wxDefaultPosition ); if ( IsVirtual() ) { @@ -4016,7 +4016,7 @@ void wxListMainWindow::DoDeleteAllItems() // for all of them: this is compatible with wxMSW and documented in // DeleteAllItems() description - wxListEvent event( wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS, GetParent()->GetId() ); + wxListEvent event( wxEVT_LIST_DELETE_ALL_ITEMS, GetParent()->GetId() ); event.SetEventObject( GetParent() ); GetParent()->GetEventHandler()->ProcessEvent( event ); @@ -4227,7 +4227,7 @@ void wxListMainWindow::InsertItem( wxListItem &item ) if ( HasCurrent() && m_current >= id ) m_current++; - SendNotify(id, wxEVT_COMMAND_LIST_INSERT_ITEM); + SendNotify(id, wxEVT_LIST_INSERT_ITEM); RefreshLines(id, GetItemCount() - 1); } diff --git a/src/generic/mdig.cpp b/src/generic/mdig.cpp index 0c139b9470..d18b731a5f 100644 --- a/src/generic/mdig.cpp +++ b/src/generic/mdig.cpp @@ -359,7 +359,7 @@ bool wxGenericMDIParentFrame::ProcessEvent(wxEvent& event) // the menu events should be given to the child as we show its menu bar // as our own const wxEventType eventType = event.GetEventType(); - if ( eventType == wxEVT_COMMAND_MENU_SELECTED || + if ( eventType == wxEVT_MENU || eventType == wxEVT_UPDATE_UI ) { // set the flag indicating that this event was forwarded to the @@ -537,7 +537,7 @@ wxGenericMDIClientWindow::CreateGenericClient(wxWindow *parent) m_notebook = new wxNotebook(this, wxID_ANY); m_notebook->Connect ( - wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, + wxEVT_NOTEBOOK_PAGE_CHANGED, wxNotebookEventHandler( wxGenericMDIClientWindow::OnPageChanged), NULL, diff --git a/src/generic/notebook.cpp b/src/generic/notebook.cpp index 560ea1000f..ee3636026d 100644 --- a/src/generic/notebook.cpp +++ b/src/generic/notebook.cpp @@ -709,7 +709,7 @@ void wxNotebookTabView::OnTabActivate(int activateId, int deactivateId) if (!m_notebook) return; - wxBookCtrlEvent event(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, m_notebook->GetId()); + wxBookCtrlEvent event(wxEVT_NOTEBOOK_PAGE_CHANGED, m_notebook->GetId()); // Translate from wxTabView's ids (which aren't position-dependent) // to wxNotebook's (which are). @@ -732,7 +732,7 @@ bool wxNotebookTabView::OnTabPreActivate(int activateId, int deactivateId) if (m_notebook) { - wxBookCtrlEvent event(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, m_notebook->GetId()); + wxBookCtrlEvent event(wxEVT_NOTEBOOK_PAGE_CHANGING, m_notebook->GetId()); // Translate from wxTabView's ids (which aren't position-dependent) // to wxNotebook's (which are). diff --git a/src/generic/odcombo.cpp b/src/generic/odcombo.cpp index 451026384f..98a30b8f86 100644 --- a/src/generic/odcombo.cpp +++ b/src/generic/odcombo.cpp @@ -237,7 +237,7 @@ void wxVListBoxComboPopup::DismissWithEvent() void wxVListBoxComboPopup::SendComboBoxEvent( int selection ) { - wxCommandEvent evt(wxEVT_COMMAND_COMBOBOX_SELECTED,m_combo->GetId()); + wxCommandEvent evt(wxEVT_COMBOBOX,m_combo->GetId()); evt.SetEventObject(m_combo); diff --git a/src/generic/spinctlg.cpp b/src/generic/spinctlg.cpp index 0e13113779..2301503682 100644 --- a/src/generic/spinctlg.cpp +++ b/src/generic/spinctlg.cpp @@ -630,7 +630,7 @@ bool wxSpinCtrl::SetBase(int base) void wxSpinCtrl::DoSendEvent() { - wxSpinEvent event( wxEVT_COMMAND_SPINCTRL_UPDATED, GetId()); + wxSpinEvent event( wxEVT_SPINCTRL, GetId()); event.SetEventObject( this ); event.SetPosition((int)(m_value + 0.5)); // FIXME should be SetValue event.SetString(m_textCtrl->GetValue()); @@ -675,7 +675,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxSpinCtrlDouble, wxSpinCtrlGenericBase) void wxSpinCtrlDouble::DoSendEvent() { - wxSpinDoubleEvent event( wxEVT_COMMAND_SPINCTRLDOUBLE_UPDATED, GetId()); + wxSpinDoubleEvent event( wxEVT_SPINCTRLDOUBLE, GetId()); event.SetEventObject( this ); event.SetValue(m_value); event.SetString(m_textCtrl->GetValue()); diff --git a/src/generic/splitter.cpp b/src/generic/splitter.cpp index 1db5638513..d769fecd86 100644 --- a/src/generic/splitter.cpp +++ b/src/generic/splitter.cpp @@ -39,10 +39,10 @@ #include -wxDEFINE_EVENT( wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED, wxSplitterEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING, wxSplitterEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_SPLITTER_DOUBLECLICKED, wxSplitterEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_SPLITTER_UNSPLIT, wxSplitterEvent ); +wxDEFINE_EVENT( wxEVT_SPLITTER_SASH_POS_CHANGED, wxSplitterEvent ); +wxDEFINE_EVENT( wxEVT_SPLITTER_SASH_POS_CHANGING, wxSplitterEvent ); +wxDEFINE_EVENT( wxEVT_SPLITTER_DOUBLECLICKED, wxSplitterEvent ); +wxDEFINE_EVENT( wxEVT_SPLITTER_UNSPLIT, wxSplitterEvent ); IMPLEMENT_DYNAMIC_CLASS(wxSplitterWindow, wxWindow) @@ -293,7 +293,7 @@ void wxSplitterWindow::OnMouseEvent(wxMouseEvent& event) m_windowOne = m_windowTwo; m_windowTwo = NULL; OnUnsplit(removedWindow); - wxSplitterEvent eventUnsplit(wxEVT_COMMAND_SPLITTER_UNSPLIT, this); + wxSplitterEvent eventUnsplit(wxEVT_SPLITTER_UNSPLIT, this); eventUnsplit.m_data.win = removedWindow; (void)DoSendEvent(eventUnsplit); SetSashPositionAndNotify(0); @@ -304,7 +304,7 @@ void wxSplitterWindow::OnMouseEvent(wxMouseEvent& event) wxWindow *removedWindow = m_windowTwo; m_windowTwo = NULL; OnUnsplit(removedWindow); - wxSplitterEvent eventUnsplit(wxEVT_COMMAND_SPLITTER_UNSPLIT, this); + wxSplitterEvent eventUnsplit(wxEVT_SPLITTER_UNSPLIT, this); eventUnsplit.m_data.win = removedWindow; (void)DoSendEvent(eventUnsplit); SetSashPositionAndNotify(0); @@ -652,7 +652,7 @@ void wxSplitterWindow::SetSashPositionAndNotify(int sashPos) // must generate a CHANGED event at the end of resizing DoSetSashPosition(sashPos); - wxSplitterEvent event(wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED, this); + wxSplitterEvent event(wxEVT_SPLITTER_SASH_POS_CHANGED, this); event.m_data.pos = m_sashPosition; (void)DoSendEvent(event); @@ -988,7 +988,7 @@ int wxSplitterWindow::OnSashPositionChanging(int newSashPosition) // // FIXME: shouldn't we do it before the adjustments above so as to ensure // that the sash position is always reasonable? - wxSplitterEvent event(wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING, this); + wxSplitterEvent event(wxEVT_SPLITTER_SASH_POS_CHANGING, this); event.m_data.pos = newSashPosition; if ( !DoSendEvent(event) ) @@ -1012,7 +1012,7 @@ void wxSplitterWindow::OnDoubleClickSash(int x, int y) wxCHECK_RET(m_windowTwo, wxT("splitter: no window to remove")); // new code should handle events instead of using the virtual functions - wxSplitterEvent event(wxEVT_COMMAND_SPLITTER_DOUBLECLICKED, this); + wxSplitterEvent event(wxEVT_SPLITTER_DOUBLECLICKED, this); event.m_data.pt.x = x; event.m_data.pt.y = y; if ( DoSendEvent(event) ) @@ -1022,7 +1022,7 @@ void wxSplitterWindow::OnDoubleClickSash(int x, int y) wxWindow* win = m_windowTwo; if ( Unsplit(win) ) { - wxSplitterEvent unsplitEvent(wxEVT_COMMAND_SPLITTER_UNSPLIT, this); + wxSplitterEvent unsplitEvent(wxEVT_SPLITTER_UNSPLIT, this); unsplitEvent.m_data.win = win; (void)DoSendEvent(unsplitEvent); } diff --git a/src/generic/srchctlg.cpp b/src/generic/srchctlg.cpp index 4e9fd4bb83..f965b5de4a 100644 --- a/src/generic/srchctlg.cpp +++ b/src/generic/srchctlg.cpp @@ -202,7 +202,7 @@ protected: wxCommandEvent event(m_eventType, m_search->GetId()); event.SetEventObject(m_search); - if ( m_eventType == wxEVT_COMMAND_SEARCHCTRL_SEARCH_BTN ) + if ( m_eventType == wxEVT_SEARCHCTRL_SEARCH_BTN ) { // it's convenient to have the string to search for directly in the // event instead of having to retrieve it from the control in the @@ -215,7 +215,7 @@ protected: m_search->SetFocus(); #if wxUSE_MENUS - if ( m_eventType == wxEVT_COMMAND_SEARCHCTRL_SEARCH_BTN ) + if ( m_eventType == wxEVT_SEARCHCTRL_SEARCH_BTN ) { // this happens automatically, just like on Mac OS X m_search->PopupSearchMenu(); @@ -329,10 +329,10 @@ bool wxSearchCtrl::Create(wxWindow *parent, wxWindowID id, m_text = new wxSearchTextCtrl(this, value, style); m_searchButton = new wxSearchButton(this, - wxEVT_COMMAND_SEARCHCTRL_SEARCH_BTN, + wxEVT_SEARCHCTRL_SEARCH_BTN, m_searchBitmap); m_cancelButton = new wxSearchButton(this, - wxEVT_COMMAND_SEARCHCTRL_CANCEL_BTN, + wxEVT_SEARCHCTRL_CANCEL_BTN, m_cancelBitmap); SetBackgroundColour( m_text->GetBackgroundColour() ); diff --git a/src/generic/toolbkg.cpp b/src/generic/toolbkg.cpp index 8ba3ac9325..1fe2ad781d 100644 --- a/src/generic/toolbkg.cpp +++ b/src/generic/toolbkg.cpp @@ -45,8 +45,8 @@ IMPLEMENT_DYNAMIC_CLASS(wxToolbook, wxBookCtrlBase) -wxDEFINE_EVENT( wxEVT_COMMAND_TOOLBOOK_PAGE_CHANGING, wxBookCtrlEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_TOOLBOOK_PAGE_CHANGED, wxBookCtrlEvent ); +wxDEFINE_EVENT( wxEVT_TOOLBOOK_PAGE_CHANGING, wxBookCtrlEvent ); +wxDEFINE_EVENT( wxEVT_TOOLBOOK_PAGE_CHANGED, wxBookCtrlEvent ); BEGIN_EVENT_TABLE(wxToolbook, wxBookCtrlBase) EVT_SIZE(wxToolbook::OnSize) @@ -202,12 +202,12 @@ void wxToolbook::SetImageList(wxImageList *imageList) wxBookCtrlEvent* wxToolbook::CreatePageChangingEvent() const { - return new wxBookCtrlEvent(wxEVT_COMMAND_TOOLBOOK_PAGE_CHANGING, m_windowId); + return new wxBookCtrlEvent(wxEVT_TOOLBOOK_PAGE_CHANGING, m_windowId); } void wxToolbook::MakeChangedEvent(wxBookCtrlEvent &event) { - event.SetEventType(wxEVT_COMMAND_TOOLBOOK_PAGE_CHANGED); + event.SetEventType(wxEVT_TOOLBOOK_PAGE_CHANGED); } void wxToolbook::UpdateSelectedPage(size_t newsel) diff --git a/src/generic/treebkg.cpp b/src/generic/treebkg.cpp index 140829ad6a..803b4f4b73 100644 --- a/src/generic/treebkg.cpp +++ b/src/generic/treebkg.cpp @@ -47,10 +47,10 @@ IMPLEMENT_DYNAMIC_CLASS(wxTreebook, wxBookCtrlBase) -wxDEFINE_EVENT( wxEVT_COMMAND_TREEBOOK_PAGE_CHANGING, wxBookCtrlEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_TREEBOOK_PAGE_CHANGED, wxBookCtrlEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_TREEBOOK_NODE_COLLAPSED, wxBookCtrlEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_TREEBOOK_NODE_EXPANDED, wxBookCtrlEvent ); +wxDEFINE_EVENT( wxEVT_TREEBOOK_PAGE_CHANGING, wxBookCtrlEvent ); +wxDEFINE_EVENT( wxEVT_TREEBOOK_PAGE_CHANGED, wxBookCtrlEvent ); +wxDEFINE_EVENT( wxEVT_TREEBOOK_NODE_COLLAPSED, wxBookCtrlEvent ); +wxDEFINE_EVENT( wxEVT_TREEBOOK_NODE_EXPANDED, wxBookCtrlEvent ); BEGIN_EVENT_TABLE(wxTreebook, wxBookCtrlBase) EVT_TREE_SEL_CHANGED (wxID_ANY, wxTreebook::OnTreeSelectionChange) @@ -563,7 +563,7 @@ int wxTreebook::DoSetSelection(size_t pagePos, int flags) wxASSERT_MSG( GetPageCount() == DoInternalGetPageCount(), wxT("wxTreebook logic error: m_treeIds and m_pages not in sync!")); - wxBookCtrlEvent event(wxEVT_COMMAND_TREEBOOK_PAGE_CHANGING, m_windowId); + wxBookCtrlEvent event(wxEVT_TREEBOOK_PAGE_CHANGING, m_windowId); const int oldSel = m_selection; wxTreeCtrl *tree = GetTreeCtrl(); bool allowed = false; @@ -618,7 +618,7 @@ int wxTreebook::DoSetSelection(size_t pagePos, int flags) if (flags & SetSelection_SendEvent) { // notify about the (now completed) page change - event.SetEventType(wxEVT_COMMAND_TREEBOOK_PAGE_CHANGED); + event.SetEventType(wxEVT_TREEBOOK_PAGE_CHANGED); (void)GetEventHandler()->ProcessEvent(event); } } @@ -702,8 +702,8 @@ void wxTreebook::OnTreeNodeExpandedCollapsed(wxTreeEvent & event) wxCHECK_RET( pagePos != wxNOT_FOUND, wxT("Internal problem in wxTreebook!..") ); wxBookCtrlEvent ev(GetTreeCtrl()->IsExpanded(nodeId) - ? wxEVT_COMMAND_TREEBOOK_NODE_EXPANDED - : wxEVT_COMMAND_TREEBOOK_NODE_COLLAPSED, + ? wxEVT_TREEBOOK_NODE_EXPANDED + : wxEVT_TREEBOOK_NODE_COLLAPSED, m_windowId); ev.SetSelection(pagePos); diff --git a/src/generic/treectlg.cpp b/src/generic/treectlg.cpp index d7193a9feb..bbe1355c01 100644 --- a/src/generic/treectlg.cpp +++ b/src/generic/treectlg.cpp @@ -1722,7 +1722,7 @@ wxTreeItemId wxGenericTreeCtrl::DoInsertAfter(const wxTreeItemId& parentId, void wxGenericTreeCtrl::SendDeleteEvent(wxGenericTreeItem *item) { - wxTreeEvent event(wxEVT_COMMAND_TREE_DELETE_ITEM, this, item); + wxTreeEvent event(wxEVT_TREE_DELETE_ITEM, this, item); GetEventHandler()->ProcessEvent( event ); } @@ -1861,7 +1861,7 @@ void wxGenericTreeCtrl::Expand(const wxTreeItemId& itemId) if ( item->IsExpanded() ) return; - wxTreeEvent event(wxEVT_COMMAND_TREE_ITEM_EXPANDING, this, item); + wxTreeEvent event(wxEVT_TREE_ITEM_EXPANDING, this, item); if ( GetEventHandler()->ProcessEvent( event ) && !event.IsAllowed() ) { @@ -1881,7 +1881,7 @@ void wxGenericTreeCtrl::Expand(const wxTreeItemId& itemId) m_dirty = true; } - event.SetEventType(wxEVT_COMMAND_TREE_ITEM_EXPANDED); + event.SetEventType(wxEVT_TREE_ITEM_EXPANDED); GetEventHandler()->ProcessEvent( event ); } @@ -1895,7 +1895,7 @@ void wxGenericTreeCtrl::Collapse(const wxTreeItemId& itemId) if ( !item->IsExpanded() ) return; - wxTreeEvent event(wxEVT_COMMAND_TREE_ITEM_COLLAPSING, this, item); + wxTreeEvent event(wxEVT_TREE_ITEM_COLLAPSING, this, item); if ( GetEventHandler()->ProcessEvent( event ) && !event.IsAllowed() ) { // cancelled by program @@ -1918,7 +1918,7 @@ void wxGenericTreeCtrl::Collapse(const wxTreeItemId& itemId) RefreshSubtree(item); - event.SetEventType(wxEVT_COMMAND_TREE_ITEM_COLLAPSED); + event.SetEventType(wxEVT_TREE_ITEM_COLLAPSED); GetEventHandler()->ProcessEvent( event ); } @@ -2011,7 +2011,7 @@ void wxGenericTreeCtrl::SelectChildren(const wxTreeItemId& parent) wxGenericTreeItem * item = (wxGenericTreeItem*) ((wxTreeItemId)children[0]).m_pItem; - wxTreeEvent event(wxEVT_COMMAND_TREE_SEL_CHANGING, this, item); + wxTreeEvent event(wxEVT_TREE_SEL_CHANGING, this, item); event.m_itemOld = m_current; if ( GetEventHandler()->ProcessEvent( event ) && !event.IsAllowed() ) @@ -2025,7 +2025,7 @@ void wxGenericTreeCtrl::SelectChildren(const wxTreeItemId& parent) } - event.SetEventType(wxEVT_COMMAND_TREE_SEL_CHANGED); + event.SetEventType(wxEVT_TREE_SEL_CHANGED); GetEventHandler()->ProcessEvent( event ); } @@ -2135,7 +2135,7 @@ void wxGenericTreeCtrl::DoSelectItem(const wxTreeItemId& itemId, return; } - wxTreeEvent event(wxEVT_COMMAND_TREE_SEL_CHANGING, this, item); + wxTreeEvent event(wxEVT_TREE_SEL_CHANGING, this, item); event.m_itemOld = m_current; // TODO : Here we don't send any selection mode yet ! @@ -2188,7 +2188,7 @@ void wxGenericTreeCtrl::DoSelectItem(const wxTreeItemId& itemId, // selection is set EnsureVisible( itemId ); - event.SetEventType(wxEVT_COMMAND_TREE_SEL_CHANGED); + event.SetEventType(wxEVT_TREE_SEL_CHANGED); GetEventHandler()->ProcessEvent( event ); } @@ -2204,14 +2204,14 @@ void wxGenericTreeCtrl::SelectItem(const wxTreeItemId& itemId, bool select) } else // deselect { - wxTreeEvent event(wxEVT_COMMAND_TREE_SEL_CHANGING, this, item); + wxTreeEvent event(wxEVT_TREE_SEL_CHANGING, this, item); if ( GetEventHandler()->ProcessEvent( event ) && !event.IsAllowed() ) return; item->SetHilight(false); RefreshLine(item); - event.SetEventType(wxEVT_COMMAND_TREE_SEL_CHANGED); + event.SetEventType(wxEVT_TREE_SEL_CHANGED); GetEventHandler()->ProcessEvent( event ); } } @@ -3048,7 +3048,7 @@ void wxGenericTreeCtrl::OnKillFocus( wxFocusEvent &event ) void wxGenericTreeCtrl::OnKeyDown( wxKeyEvent &event ) { // send a tree event - wxTreeEvent te( wxEVT_COMMAND_TREE_KEY_DOWN, this); + wxTreeEvent te( wxEVT_TREE_KEY_DOWN, this); te.m_evtKey = event; if ( GetEventHandler()->ProcessEvent( te ) ) return; @@ -3142,7 +3142,7 @@ void wxGenericTreeCtrl::OnChar( wxKeyEvent &event ) GetBoundingRect(m_current, ItemRect, true); wxTreeEvent - eventMenu(wxEVT_COMMAND_TREE_ITEM_MENU, this, m_current); + eventMenu(wxEVT_TREE_ITEM_MENU, this, m_current); // Use the left edge, vertical middle eventMenu.m_pointDrag = wxPoint(ItemRect.GetX(), ItemRect.GetY() + @@ -3156,7 +3156,7 @@ void wxGenericTreeCtrl::OnChar( wxKeyEvent &event ) if ( !event.HasModifiers() ) { wxTreeEvent - eventAct(wxEVT_COMMAND_TREE_ITEM_ACTIVATED, this, m_current); + eventAct(wxEVT_TREE_ITEM_ACTIVATED, this, m_current); GetEventHandler()->ProcessEvent( eventAct ); } @@ -3472,7 +3472,7 @@ wxTextCtrl *wxGenericTreeCtrl::EditLabel(const wxTreeItemId& item, wxGenericTreeItem *itemEdit = (wxGenericTreeItem *)item.m_pItem; - wxTreeEvent te(wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, this, itemEdit); + wxTreeEvent te(wxEVT_TREE_BEGIN_LABEL_EDIT, this, itemEdit); if ( GetEventHandler()->ProcessEvent( te ) && !te.IsAllowed() ) { // vetoed by user @@ -3512,7 +3512,7 @@ void wxGenericTreeCtrl::EndEditLabel(const wxTreeItemId& WXUNUSED(item), bool wxGenericTreeCtrl::OnRenameAccept(wxGenericTreeItem *item, const wxString& value) { - wxTreeEvent le(wxEVT_COMMAND_TREE_END_LABEL_EDIT, this, item); + wxTreeEvent le(wxEVT_TREE_END_LABEL_EDIT, this, item); le.m_label = value; le.m_editCancelled = false; @@ -3522,7 +3522,7 @@ bool wxGenericTreeCtrl::OnRenameAccept(wxGenericTreeItem *item, void wxGenericTreeCtrl::OnRenameCancelled(wxGenericTreeItem *item) { // let owner know that the edit was cancelled - wxTreeEvent le(wxEVT_COMMAND_TREE_END_LABEL_EDIT, this, item); + wxTreeEvent le(wxEVT_TREE_END_LABEL_EDIT, this, item); le.m_label = wxEmptyString; le.m_editCancelled = true; @@ -3588,7 +3588,7 @@ void wxGenericTreeCtrl::OnMouse( wxMouseEvent &event ) { // Ask the tree control what tooltip (if any) should be shown wxTreeEvent - hevent(wxEVT_COMMAND_TREE_ITEM_GETTOOLTIP, this, hoverItem); + hevent(wxEVT_TREE_ITEM_GETTOOLTIP, this, hoverItem); // setting a tooltip upon leaving a view is getting the tooltip displayed // on the neighbouring view ... @@ -3643,8 +3643,8 @@ void wxGenericTreeCtrl::OnMouse( wxMouseEvent &event ) } wxEventType command = event.RightIsDown() - ? wxEVT_COMMAND_TREE_BEGIN_RDRAG - : wxEVT_COMMAND_TREE_BEGIN_DRAG; + ? wxEVT_TREE_BEGIN_RDRAG + : wxEVT_TREE_BEGIN_DRAG; wxTreeEvent nevent(command, this, m_current); nevent.SetPoint(CalcScrolledPosition(pt)); @@ -3713,7 +3713,7 @@ void wxGenericTreeCtrl::OnMouse( wxMouseEvent &event ) } // generate the drag end event - wxTreeEvent eventEndDrag(wxEVT_COMMAND_TREE_END_DRAG, this, item); + wxTreeEvent eventEndDrag(wxEVT_TREE_END_DRAG, this, item); eventEndDrag.m_pointDrag = CalcScrolledPosition(pt); @@ -3763,20 +3763,20 @@ void wxGenericTreeCtrl::OnMouse( wxMouseEvent &event ) } wxTreeEvent - nevent(wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK, this, item); + nevent(wxEVT_TREE_ITEM_RIGHT_CLICK, this, item); nevent.m_pointDrag = CalcScrolledPosition(pt); event.Skip(!GetEventHandler()->ProcessEvent(nevent)); // Consistent with MSW (for now), send the ITEM_MENU *after* // the RIGHT_CLICK event. TODO: This behaviour may change. - wxTreeEvent nevent2(wxEVT_COMMAND_TREE_ITEM_MENU, this, item); + wxTreeEvent nevent2(wxEVT_TREE_ITEM_MENU, this, item); nevent2.m_pointDrag = CalcScrolledPosition(pt); GetEventHandler()->ProcessEvent(nevent2); } else if ( event.MiddleDown() ) { wxTreeEvent - nevent(wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK, this, item); + nevent(wxEVT_TREE_ITEM_MIDDLE_CLICK, this, item); nevent.m_pointDrag = CalcScrolledPosition(pt); event.Skip(!GetEventHandler()->ProcessEvent(nevent)); } @@ -3785,7 +3785,7 @@ void wxGenericTreeCtrl::OnMouse( wxMouseEvent &event ) if (flags & wxTREE_HITTEST_ONITEMSTATEICON) { wxTreeEvent - nevent(wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK, this, item); + nevent(wxEVT_TREE_STATE_IMAGE_CLICK, this, item); GetEventHandler()->ProcessEvent(nevent); } @@ -3887,7 +3887,7 @@ void wxGenericTreeCtrl::OnMouse( wxMouseEvent &event ) // send activate event first wxTreeEvent - nevent(wxEVT_COMMAND_TREE_ITEM_ACTIVATED, this, item); + nevent(wxEVT_TREE_ITEM_ACTIVATED, this, item); nevent.m_pointDrag = CalcScrolledPosition(pt); if ( !GetEventHandler()->ProcessEvent( nevent ) ) { diff --git a/src/generic/treelist.cpp b/src/generic/treelist.cpp index ff07cd4222..56b820780f 100644 --- a/src/generic/treelist.cpp +++ b/src/generic/treelist.cpp @@ -1565,7 +1565,7 @@ void wxTreeListCtrl::SendColumnEvent(wxEventType evt, wxDataViewEvent& eventDV) void wxTreeListCtrl::OnItemToggled(wxTreeListItem item, wxCheckBoxState stateOld) { - wxTreeListEvent event(wxEVT_COMMAND_TREELIST_ITEM_CHECKED, this, item); + wxTreeListEvent event(wxEVT_TREELIST_ITEM_CHECKED, this, item); event.SetOldCheckedState(stateOld); ProcessWindowEvent(event); @@ -1573,32 +1573,32 @@ wxTreeListCtrl::OnItemToggled(wxTreeListItem item, wxCheckBoxState stateOld) void wxTreeListCtrl::OnSelectionChanged(wxDataViewEvent& event) { - SendItemEvent(wxEVT_COMMAND_TREELIST_SELECTION_CHANGED, event); + SendItemEvent(wxEVT_TREELIST_SELECTION_CHANGED, event); } void wxTreeListCtrl::OnItemExpanding(wxDataViewEvent& event) { - SendItemEvent(wxEVT_COMMAND_TREELIST_ITEM_EXPANDING, event); + SendItemEvent(wxEVT_TREELIST_ITEM_EXPANDING, event); } void wxTreeListCtrl::OnItemExpanded(wxDataViewEvent& event) { - SendItemEvent(wxEVT_COMMAND_TREELIST_ITEM_EXPANDED, event); + SendItemEvent(wxEVT_TREELIST_ITEM_EXPANDED, event); } void wxTreeListCtrl::OnItemActivated(wxDataViewEvent& event) { - SendItemEvent(wxEVT_COMMAND_TREELIST_ITEM_ACTIVATED, event); + SendItemEvent(wxEVT_TREELIST_ITEM_ACTIVATED, event); } void wxTreeListCtrl::OnItemContextMenu(wxDataViewEvent& event) { - SendItemEvent(wxEVT_COMMAND_TREELIST_ITEM_CONTEXT_MENU, event); + SendItemEvent(wxEVT_TREELIST_ITEM_CONTEXT_MENU, event); } void wxTreeListCtrl::OnColumnSorted(wxDataViewEvent& event) { - SendColumnEvent(wxEVT_COMMAND_TREELIST_COLUMN_SORTED, event); + SendColumnEvent(wxEVT_TREELIST_COLUMN_SORTED, event); } // ---------------------------------------------------------------------------- @@ -1666,7 +1666,7 @@ wxWindow* wxTreeListCtrl::GetView() const wxIMPLEMENT_DYNAMIC_CLASS(wxTreeListEvent, wxNotifyEvent) #define wxDEFINE_TREELIST_EVENT(name) \ - wxDEFINE_EVENT(wxEVT_COMMAND_TREELIST_##name, wxTreeListEvent) + wxDEFINE_EVENT(wxEVT_TREELIST_##name, wxTreeListEvent) wxDEFINE_TREELIST_EVENT(SELECTION_CHANGED); wxDEFINE_TREELIST_EVENT(ITEM_EXPANDING); diff --git a/src/generic/vlbox.cpp b/src/generic/vlbox.cpp index a4be49817c..4ae7b7652c 100644 --- a/src/generic/vlbox.cpp +++ b/src/generic/vlbox.cpp @@ -275,7 +275,7 @@ void wxVListBox::SendSelectedEvent() wxASSERT_MSG( m_current != wxNOT_FOUND, wxT("SendSelectedEvent() shouldn't be called") ); - wxCommandEvent event(wxEVT_COMMAND_LISTBOX_SELECTED, GetId()); + wxCommandEvent event(wxEVT_LISTBOX, GetId()); InitEvent(event, m_current); (void)GetEventHandler()->ProcessEvent(event); } @@ -720,7 +720,7 @@ void wxVListBox::OnLeftDClick(wxMouseEvent& eventMouse) // this event as a left-click instead if ( item == m_current ) { - wxCommandEvent event(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, GetId()); + wxCommandEvent event(wxEVT_LISTBOX_DCLICK, GetId()); InitEvent(event, item); (void)GetEventHandler()->ProcessEvent(event); } diff --git a/src/gtk/button.cpp b/src/gtk/button.cpp index f5f76a7b10..a2ec92fdde 100644 --- a/src/gtk/button.cpp +++ b/src/gtk/button.cpp @@ -36,7 +36,7 @@ wxgtk_button_clicked_callback(GtkWidget *WXUNUSED(widget), wxButton *button) if ( button->GTKShouldIgnoreEvent() ) return; - wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, button->GetId()); + wxCommandEvent event(wxEVT_BUTTON, button->GetId()); event.SetEventObject(button); button->HandleWindowEvent(event); } diff --git a/src/gtk/checkbox.cpp b/src/gtk/checkbox.cpp index 21c4159d59..8c1c45257a 100644 --- a/src/gtk/checkbox.cpp +++ b/src/gtk/checkbox.cpp @@ -78,7 +78,7 @@ static void gtk_checkbox_toggled_callback(GtkWidget *widget, wxCheckBox *cb) } } - wxCommandEvent event(wxEVT_COMMAND_CHECKBOX_CLICKED, cb->GetId()); + wxCommandEvent event(wxEVT_CHECKBOX, cb->GetId()); event.SetInt(cb->Get3StateValue()); event.SetEventObject(cb); cb->HandleWindowEvent(event); diff --git a/src/gtk/checklst.cpp b/src/gtk/checklst.cpp index fef7b3c61c..fe5cfb0414 100644 --- a/src/gtk/checklst.cpp +++ b/src/gtk/checklst.cpp @@ -31,7 +31,7 @@ static void gtk_checklist_toggled(GtkCellRendererToggle * WXUNUSED(renderer), wxCHECK_RET( listbox->m_treeview != NULL, wxT("invalid listbox") ); GtkTreePath* path = gtk_tree_path_new_from_string(stringpath); - wxCommandEvent new_event( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, + wxCommandEvent new_event( wxEVT_CHECKLISTBOX, listbox->GetId() ); new_event.SetEventObject( listbox ); new_event.SetInt( gtk_tree_path_get_indices(path)[0] ); diff --git a/src/gtk/choice.cpp b/src/gtk/choice.cpp index 34bd9964dd..bbfa2480bb 100644 --- a/src/gtk/choice.cpp +++ b/src/gtk/choice.cpp @@ -30,7 +30,7 @@ extern "C" { static void gtk_choice_changed_callback( GtkWidget *WXUNUSED(widget), wxChoice *choice ) { - choice->SendSelectionChangedEvent(wxEVT_COMMAND_CHOICE_SELECTED); + choice->SendSelectionChangedEvent(wxEVT_CHOICE); } } diff --git a/src/gtk/collpane.cpp b/src/gtk/collpane.cpp index a8fb57bf25..26539041ab 100644 --- a/src/gtk/collpane.cpp +++ b/src/gtk/collpane.cpp @@ -33,7 +33,7 @@ const char wxCollapsiblePaneNameStr[] = "collapsiblePane"; -wxDEFINE_EVENT( wxEVT_COMMAND_COLLPANE_CHANGED, wxCollapsiblePaneEvent ); +wxDEFINE_EVENT( wxEVT_COLLAPSIBLEPANE_CHANGED, wxCollapsiblePaneEvent ); IMPLEMENT_DYNAMIC_CLASS(wxCollapsiblePaneEvent, wxCommandEvent) diff --git a/src/gtk/combobox.cpp b/src/gtk/combobox.cpp index 6f84ab0a8a..609811eb65 100644 --- a/src/gtk/combobox.cpp +++ b/src/gtk/combobox.cpp @@ -17,7 +17,7 @@ #ifndef WX_PRECOMP #include "wx/intl.h" #include "wx/settings.h" - #include "wx/textctrl.h" // for wxEVT_COMMAND_TEXT_UPDATED + #include "wx/textctrl.h" // for wxEVT_TEXT #include "wx/arrstr.h" #endif @@ -33,7 +33,7 @@ extern "C" { static void gtkcombobox_text_changed_callback( GtkWidget *WXUNUSED(widget), wxComboBox *combo ) { - wxCommandEvent event( wxEVT_COMMAND_TEXT_UPDATED, combo->GetId() ); + wxCommandEvent event( wxEVT_TEXT, combo->GetId() ); event.SetString( combo->GetValue() ); event.SetEventObject( combo ); combo->HandleWindowEvent( event ); @@ -42,7 +42,7 @@ gtkcombobox_text_changed_callback( GtkWidget *WXUNUSED(widget), wxComboBox *comb static void gtkcombobox_changed_callback( GtkWidget *WXUNUSED(widget), wxComboBox *combo ) { - combo->SendSelectionChangedEvent(wxEVT_COMMAND_COMBOBOX_SELECTED); + combo->SendSelectionChangedEvent(wxEVT_COMBOBOX); } static void @@ -52,8 +52,8 @@ gtkcombobox_popupshown_callback(GObject *WXUNUSED(gobject), { gboolean isShown; g_object_get( combo->m_widget, "popup-shown", &isShown, NULL ); - wxCommandEvent event( isShown ? wxEVT_COMMAND_COMBOBOX_DROPDOWN - : wxEVT_COMMAND_COMBOBOX_CLOSEUP, + wxCommandEvent event( isShown ? wxEVT_COMBOBOX_DROPDOWN + : wxEVT_COMBOBOX_CLOSEUP, combo->GetId() ); event.SetEventObject( combo ); combo->HandleWindowEvent( event ); @@ -216,7 +216,7 @@ void wxComboBox::OnChar( wxKeyEvent &event ) if ( HasFlag(wxTE_PROCESS_ENTER) && GetEntry() ) { // GTK automatically selects an item if its in the list - wxCommandEvent eventEnter(wxEVT_COMMAND_TEXT_ENTER, GetId()); + wxCommandEvent eventEnter(wxEVT_TEXT_ENTER, GetId()); eventEnter.SetString( GetValue() ); eventEnter.SetInt( GetSelection() ); eventEnter.SetEventObject( this ); diff --git a/src/gtk/dataview.cpp b/src/gtk/dataview.cpp index ada9706013..cc2860cef7 100644 --- a/src/gtk/dataview.cpp +++ b/src/gtk/dataview.cpp @@ -1015,7 +1015,7 @@ wxgtk_tree_model_set_sort_column_id (GtkTreeSortable *sortable, if (gs_lastLeftClickHeader) { wxDataViewCtrl *dv = tree_model->internal->GetOwner(); - wxDataViewEvent event( wxEVT_COMMAND_DATAVIEW_COLUMN_SORTED, dv->GetId() ); + wxDataViewEvent event( wxEVT_DATAVIEW_COLUMN_SORTED, dv->GetId() ); event.SetDataViewColumn( gs_lastLeftClickHeader ); event.SetModel( dv->GetModel() ); dv->HandleWindowEvent( event ); @@ -1164,7 +1164,7 @@ static GtkCellEditable *gtk_wx_cell_renderer_text_start_editing( item(column->GetOwner()->GTKPathToItem(wxGtkTreePath(path))); wxDataViewCtrl *dv = column->GetOwner(); - wxDataViewEvent event( wxEVT_COMMAND_DATAVIEW_ITEM_START_EDITING, dv->GetId() ); + wxDataViewEvent event( wxEVT_DATAVIEW_ITEM_START_EDITING, dv->GetId() ); event.SetDataViewColumn( column ); event.SetModel( dv->GetModel() ); event.SetColumn( column->GetModelColumn() ); @@ -1785,7 +1785,7 @@ wxgtk_cell_editable_editing_done( GtkCellEditable *WXUNUSED(editable), { wxDataViewColumn *column = wxrenderer->GetOwner(); wxDataViewCtrl *dv = column->GetOwner(); - wxDataViewEvent event( wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_DONE, dv->GetId() ); + wxDataViewEvent event( wxEVT_DATAVIEW_ITEM_EDITING_DONE, dv->GetId() ); event.SetDataViewColumn( column ); event.SetModel( dv->GetModel() ); wxDataViewItem item( s_user_data ); @@ -1802,7 +1802,7 @@ wxgtk_renderer_editing_started( GtkCellRenderer *WXUNUSED(cell), GtkCellEditable wxDataViewColumn *column = wxrenderer->GetOwner(); wxDataViewCtrl *dv = column->GetOwner(); - wxDataViewEvent event( wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_STARTED, dv->GetId() ); + wxDataViewEvent event( wxEVT_DATAVIEW_ITEM_EDITING_STARTED, dv->GetId() ); event.SetDataViewColumn( column ); event.SetModel( dv->GetModel() ); wxDataViewItem item(dv->GTKPathToItem(wxGtkTreePath(path))); @@ -2844,7 +2844,7 @@ gtk_dataview_header_button_press_callback( GtkWidget *WXUNUSED(widget), gs_lastLeftClickHeader = column; wxDataViewCtrl *dv = column->GetOwner(); - wxDataViewEvent event( wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_CLICK, dv->GetId() ); + wxDataViewEvent event( wxEVT_DATAVIEW_COLUMN_HEADER_CLICK, dv->GetId() ); event.SetDataViewColumn( column ); event.SetModel( dv->GetModel() ); if (dv->HandleWindowEvent( event )) @@ -2854,7 +2854,7 @@ gtk_dataview_header_button_press_callback( GtkWidget *WXUNUSED(widget), if (gdk_event->button == 3) { wxDataViewCtrl *dv = column->GetOwner(); - wxDataViewEvent event( wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK, dv->GetId() ); + wxDataViewEvent event( wxEVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICKED, dv->GetId() ); event.SetDataViewColumn( column ); event.SetModel( dv->GetModel() ); if (dv->HandleWindowEvent( event )) @@ -3494,7 +3494,7 @@ gboolean wxDataViewCtrlInternal::row_draggable( GtkTreeDragSource *WXUNUSED(drag if ( !item ) return FALSE; - wxDataViewEvent event( wxEVT_COMMAND_DATAVIEW_ITEM_BEGIN_DRAG, m_owner->GetId() ); + wxDataViewEvent event( wxEVT_DATAVIEW_ITEM_BEGIN_DRAG, m_owner->GetId() ); event.SetEventObject( m_owner ); event.SetItem( item ); event.SetModel( m_wx_model ); @@ -3563,7 +3563,7 @@ wxDataViewCtrlInternal::drag_data_received(GtkTreeDragDest *WXUNUSED(drag_dest), if ( !item ) return FALSE; - wxDataViewEvent event( wxEVT_COMMAND_DATAVIEW_ITEM_DROP, m_owner->GetId() ); + wxDataViewEvent event( wxEVT_DATAVIEW_ITEM_DROP, m_owner->GetId() ); event.SetEventObject( m_owner ); event.SetItem( item ); event.SetModel( m_wx_model ); @@ -3588,7 +3588,7 @@ wxDataViewCtrlInternal::row_drop_possible(GtkTreeDragDest *WXUNUSED(drag_dest), if ( !item ) return FALSE; - wxDataViewEvent event( wxEVT_COMMAND_DATAVIEW_ITEM_DROP_POSSIBLE, m_owner->GetId() ); + wxDataViewEvent event( wxEVT_DATAVIEW_ITEM_DROP_POSSIBLE, m_owner->GetId() ); event.SetEventObject( m_owner ); event.SetItem( item ); event.SetModel( m_wx_model ); @@ -3711,7 +3711,7 @@ bool wxDataViewCtrlInternal::ItemDeleted( const wxDataViewItem &parent, const wx bool wxDataViewCtrlInternal::ItemChanged( const wxDataViewItem &item ) { - wxDataViewEvent event( wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED, m_owner->GetId() ); + wxDataViewEvent event( wxEVT_DATAVIEW_ITEM_VALUE_CHANGED, m_owner->GetId() ); event.SetEventObject( m_owner ); event.SetModel( m_owner->GetModel() ); event.SetItem( item ); @@ -3722,7 +3722,7 @@ bool wxDataViewCtrlInternal::ItemChanged( const wxDataViewItem &item ) bool wxDataViewCtrlInternal::ValueChanged( const wxDataViewItem &item, unsigned int view_column ) { - wxDataViewEvent event( wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED, m_owner->GetId() ); + wxDataViewEvent event( wxEVT_DATAVIEW_ITEM_VALUE_CHANGED, m_owner->GetId() ); event.SetEventObject( m_owner ); event.SetModel( m_owner->GetModel() ); event.SetColumn( view_column ); @@ -4260,7 +4260,7 @@ wxdataview_selection_changed_callback( GtkTreeSelection* WXUNUSED(selection), wx if (!gtk_widget_get_realized(dv->m_widget)) return; - wxDataViewEvent event( wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, dv->GetId() ); + wxDataViewEvent event( wxEVT_DATAVIEW_SELECTION_CHANGED, dv->GetId() ); event.SetItem( dv->GetSelection() ); event.SetModel( dv->GetModel() ); dv->HandleWindowEvent( event ); @@ -4270,7 +4270,7 @@ static void wxdataview_row_activated_callback( GtkTreeView* WXUNUSED(treeview), GtkTreePath *path, GtkTreeViewColumn *WXUNUSED(column), wxDataViewCtrl *dv ) { - wxDataViewEvent event( wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, dv->GetId() ); + wxDataViewEvent event( wxEVT_DATAVIEW_ITEM_ACTIVATED, dv->GetId() ); wxDataViewItem item(dv->GTKPathToItem(path)); event.SetItem( item ); @@ -4282,7 +4282,7 @@ static gboolean wxdataview_test_expand_row_callback( GtkTreeView* WXUNUSED(treeview), GtkTreeIter* iter, GtkTreePath *WXUNUSED(path), wxDataViewCtrl *dv ) { - wxDataViewEvent event( wxEVT_COMMAND_DATAVIEW_ITEM_EXPANDING, dv->GetId() ); + wxDataViewEvent event( wxEVT_DATAVIEW_ITEM_EXPANDING, dv->GetId() ); wxDataViewItem item( (void*) iter->user_data );; event.SetItem( item ); @@ -4296,7 +4296,7 @@ static void wxdataview_row_expanded_callback( GtkTreeView* WXUNUSED(treeview), GtkTreeIter* iter, GtkTreePath *WXUNUSED(path), wxDataViewCtrl *dv ) { - wxDataViewEvent event( wxEVT_COMMAND_DATAVIEW_ITEM_EXPANDED, dv->GetId() ); + wxDataViewEvent event( wxEVT_DATAVIEW_ITEM_EXPANDED, dv->GetId() ); wxDataViewItem item( (void*) iter->user_data );; event.SetItem( item ); @@ -4308,7 +4308,7 @@ static gboolean wxdataview_test_collapse_row_callback( GtkTreeView* WXUNUSED(treeview), GtkTreeIter* iter, GtkTreePath *WXUNUSED(path), wxDataViewCtrl *dv ) { - wxDataViewEvent event( wxEVT_COMMAND_DATAVIEW_ITEM_COLLAPSING, dv->GetId() ); + wxDataViewEvent event( wxEVT_DATAVIEW_ITEM_COLLAPSING, dv->GetId() ); wxDataViewItem item( (void*) iter->user_data );; event.SetItem( item ); @@ -4322,7 +4322,7 @@ static void wxdataview_row_collapsed_callback( GtkTreeView* WXUNUSED(treeview), GtkTreeIter* iter, GtkTreePath *WXUNUSED(path), wxDataViewCtrl *dv ) { - wxDataViewEvent event( wxEVT_COMMAND_DATAVIEW_ITEM_COLLAPSED, dv->GetId() ); + wxDataViewEvent event( wxEVT_DATAVIEW_ITEM_COLLAPSED, dv->GetId() ); wxDataViewItem item( (void*) iter->user_data );; event.SetItem( item ); @@ -4438,7 +4438,7 @@ gtk_dataview_button_press_callback( GtkWidget *WXUNUSED(widget), &cell_y ); - wxDataViewEvent event( wxEVT_COMMAND_DATAVIEW_ITEM_CONTEXT_MENU, dv->GetId() ); + wxDataViewEvent event( wxEVT_DATAVIEW_ITEM_CONTEXT_MENU, dv->GetId() ); if (path) event.SetItem(dv->GTKPathToItem(path)); event.SetModel( dv->GetModel() ); diff --git a/src/gtk/filepicker.cpp b/src/gtk/filepicker.cpp index f93d3428f2..2d1d3b6f5f 100644 --- a/src/gtk/filepicker.cpp +++ b/src/gtk/filepicker.cpp @@ -86,7 +86,7 @@ bool wxFileButton::Create( wxWindow *parent, wxWindowID id, // we need to know when the dialog has been dismissed clicking OK... // NOTE: the "clicked" signal is not available for a GtkFileChooserButton // thus we are forced to use wxFileDialog's event - m_dialog->Connect(wxEVT_COMMAND_BUTTON_CLICKED, + m_dialog->Connect(wxEVT_BUTTON, wxCommandEventHandler(wxFileButton::OnDialogOK), NULL, this); @@ -115,7 +115,7 @@ void wxFileButton::OnDialogOK(wxCommandEvent& ev) UpdatePathFromDialog(m_dialog); // ...and fire an event - wxFileDirPickerEvent event(wxEVT_COMMAND_FILEPICKER_CHANGED, this, GetId(), m_path); + wxFileDirPickerEvent event(wxEVT_FILEPICKER_CHANGED, this, GetId(), m_path); HandleWindowEvent(event); } } @@ -183,7 +183,7 @@ static void gtk_dirbutton_currentfolderchanged_callback(GtkFileChooserButton *wi chdir(filename); // ...and fire an event - wxFileDirPickerEvent event(wxEVT_COMMAND_DIRPICKER_CHANGED, p, p->GetId(), p->GetPath()); + wxFileDirPickerEvent event(wxEVT_DIRPICKER_CHANGED, p, p->GetId(), p->GetPath()); p->HandleWindowEvent(event); } } diff --git a/src/gtk/infobar.cpp b/src/gtk/infobar.cpp index 9963cdb516..defc0738aa 100644 --- a/src/gtk/infobar.cpp +++ b/src/gtk/infobar.cpp @@ -197,7 +197,7 @@ void wxInfoBar::Dismiss() void wxInfoBar::GTKResponse(int btnid) { - wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, btnid); + wxCommandEvent event(wxEVT_BUTTON, btnid); event.SetEventObject(this); if ( !HandleWindowEvent(event) ) diff --git a/src/gtk/listbox.cpp b/src/gtk/listbox.cpp index 6cdf71a549..4f44746313 100644 --- a/src/gtk/listbox.cpp +++ b/src/gtk/listbox.cpp @@ -669,7 +669,7 @@ int wxListBox::FindString( const wxString &item, bool bCase ) const void wxListBox::GTKOnActivated(int item) { - SendEvent(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, item, IsSelected(item)); + SendEvent(wxEVT_LISTBOX_DCLICK, item, IsSelected(item)); } void wxListBox::GTKOnSelectionChanged() @@ -682,7 +682,7 @@ void wxListBox::GTKOnSelectionChanged() { const int item = GetSelection(); if ( DoChangeSingleSelection(item) ) - SendEvent(wxEVT_COMMAND_LISTBOX_SELECTED, item, true); + SendEvent(wxEVT_LISTBOX, item, true); } } diff --git a/src/gtk/radiobox.cpp b/src/gtk/radiobox.cpp index 37eafdf31d..f181ace7dc 100644 --- a/src/gtk/radiobox.cpp +++ b/src/gtk/radiobox.cpp @@ -62,7 +62,7 @@ static void gtk_radiobutton_clicked_callback( GtkToggleButton *button, wxRadioBo if (!gtk_toggle_button_get_active(button)) return; - wxCommandEvent event( wxEVT_COMMAND_RADIOBOX_SELECTED, rb->GetId() ); + wxCommandEvent event( wxEVT_RADIOBOX, rb->GetId() ); event.SetInt( rb->GetSelection() ); event.SetString( rb->GetStringSelection() ); event.SetEventObject( rb ); diff --git a/src/gtk/radiobut.cpp b/src/gtk/radiobut.cpp index 6128b2ce11..2dbfb916ee 100644 --- a/src/gtk/radiobut.cpp +++ b/src/gtk/radiobut.cpp @@ -36,7 +36,7 @@ void gtk_radiobutton_clicked_callback( GtkToggleButton *button, wxRadioButton *r if (!gtk_toggle_button_get_active(button)) return; - wxCommandEvent event( wxEVT_COMMAND_RADIOBUTTON_SELECTED, rb->GetId()); + wxCommandEvent event( wxEVT_RADIOBUTTON, rb->GetId()); event.SetInt( rb->GetValue() ); event.SetEventObject( rb ); rb->HandleWindowEvent( event ); diff --git a/src/gtk/slider.cpp b/src/gtk/slider.cpp index 7e49ff26b4..70a10d6d02 100644 --- a/src/gtk/slider.cpp +++ b/src/gtk/slider.cpp @@ -60,7 +60,7 @@ ProcessScrollEvent(wxSlider *win, wxEventType evtType) } // and also generate a command event for compatibility - wxCommandEvent event( wxEVT_COMMAND_SLIDER_UPDATED, win->GetId() ); + wxCommandEvent event( wxEVT_SLIDER, win->GetId() ); event.SetEventObject( win ); event.SetInt( value ); win->HandleWindowEvent( event ); diff --git a/src/gtk/spinctrl.cpp b/src/gtk/spinctrl.cpp index d4f935e07a..55596562ba 100644 --- a/src/gtk/spinctrl.cpp +++ b/src/gtk/spinctrl.cpp @@ -16,7 +16,7 @@ #include "wx/spinctrl.h" #ifndef WX_PRECOMP - #include "wx/textctrl.h" // for wxEVT_COMMAND_TEXT_UPDATED + #include "wx/textctrl.h" // for wxEVT_TEXT #include "wx/utils.h" #include "wx/wxcrtvararg.h" #endif @@ -44,7 +44,7 @@ gtk_value_changed(GtkSpinButton* spinbutton, wxSpinCtrlGTKBase* win) if (wxIsKindOf(win, wxSpinCtrl)) { - wxSpinEvent event(wxEVT_COMMAND_SPINCTRL_UPDATED, win->GetId()); + wxSpinEvent event(wxEVT_SPINCTRL, win->GetId()); event.SetEventObject( win ); event.SetPosition(static_cast(win)->GetValue()); event.SetString(gtk_entry_get_text(GTK_ENTRY(spinbutton))); @@ -52,7 +52,7 @@ gtk_value_changed(GtkSpinButton* spinbutton, wxSpinCtrlGTKBase* win) } else // wxIsKindOf(win, wxSpinCtrlDouble) { - wxSpinDoubleEvent event( wxEVT_COMMAND_SPINCTRLDOUBLE_UPDATED, win->GetId()); + wxSpinDoubleEvent event( wxEVT_SPINCTRLDOUBLE, win->GetId()); event.SetEventObject( win ); event.SetValue(static_cast(win)->GetValue()); event.SetString(gtk_entry_get_text(GTK_ENTRY(spinbutton))); @@ -69,7 +69,7 @@ extern "C" { static void gtk_changed(GtkSpinButton* spinbutton, wxSpinCtrl* win) { - wxCommandEvent event( wxEVT_COMMAND_TEXT_UPDATED, win->GetId() ); + wxCommandEvent event( wxEVT_TEXT, win->GetId() ); event.SetEventObject( win ); event.SetString(gtk_entry_get_text(GTK_ENTRY(spinbutton))); event.SetInt(win->GetValue()); @@ -309,7 +309,7 @@ void wxSpinCtrlGTKBase::OnChar( wxKeyEvent &event ) if ((event.GetKeyCode() == WXK_RETURN) && (m_windowStyle & wxTE_PROCESS_ENTER)) { - wxCommandEvent evt( wxEVT_COMMAND_TEXT_ENTER, m_windowId ); + wxCommandEvent evt( wxEVT_TEXT_ENTER, m_windowId ); evt.SetEventObject(this); GtkSpinButton *gsb = GTK_SPIN_BUTTON(m_widget); wxString val = wxGTK_CONV_BACK( gtk_entry_get_text( &gsb->entry ) ); diff --git a/src/gtk/textctrl.cpp b/src/gtk/textctrl.cpp index 629a6fbfae..10a90eaad7 100644 --- a/src/gtk/textctrl.cpp +++ b/src/gtk/textctrl.cpp @@ -1618,7 +1618,7 @@ void wxTextCtrl::OnChar( wxKeyEvent &key_event ) { if ( HasFlag(wxTE_PROCESS_ENTER) ) { - wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId); + wxCommandEvent event(wxEVT_TEXT_ENTER, m_windowId); event.SetEventObject(this); event.SetString(GetValue()); if ( HandleWindowEvent(event) ) diff --git a/src/gtk/textentry.cpp b/src/gtk/textentry.cpp index 1f38fa69c7..f8f9730d6d 100644 --- a/src/gtk/textentry.cpp +++ b/src/gtk/textentry.cpp @@ -117,21 +117,21 @@ static void wx_gtk_copy_clipboard_callback( GtkWidget *widget, wxWindow *win ) { DoHandleClipboardCallback( - widget, win, wxEVT_COMMAND_TEXT_COPY, "copy-clipboard" ); + widget, win, wxEVT_TEXT_COPY, "copy-clipboard" ); } static void wx_gtk_cut_clipboard_callback( GtkWidget *widget, wxWindow *win ) { DoHandleClipboardCallback( - widget, win, wxEVT_COMMAND_TEXT_CUT, "cut-clipboard" ); + widget, win, wxEVT_TEXT_CUT, "cut-clipboard" ); } static void wx_gtk_paste_clipboard_callback( GtkWidget *widget, wxWindow *win ) { DoHandleClipboardCallback( - widget, win, wxEVT_COMMAND_TEXT_PASTE, "paste-clipboard" ); + widget, win, wxEVT_TEXT_PASTE, "paste-clipboard" ); } } // extern "C" @@ -402,11 +402,11 @@ void wxTextEntry::SetMaxLength(unsigned long len) void wxTextEntry::SendMaxLenEvent() { // remember that the next changed signal is to be ignored to avoid - // generating a dummy wxEVT_COMMAND_TEXT_UPDATED event + // generating a dummy wxEVT_TEXT event //IgnoreNextTextUpdate(); wxWindow * const win = GetEditableWindow(); - wxCommandEvent event(wxEVT_COMMAND_TEXT_MAXLEN, win->GetId()); + wxCommandEvent event(wxEVT_TEXT_MAXLEN, win->GetId()); event.SetEventObject(win); event.SetString(GetValue()); win->HandleWindowEvent(event); diff --git a/src/gtk/tglbtn.cpp b/src/gtk/tglbtn.cpp index c3b92d2980..7673bca04a 100644 --- a/src/gtk/tglbtn.cpp +++ b/src/gtk/tglbtn.cpp @@ -33,14 +33,14 @@ static void gtk_togglebutton_clicked_callback(GtkWidget *WXUNUSED(widget), wxTog return; // Generate a wx event. - wxCommandEvent event(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, cb->GetId()); + wxCommandEvent event(wxEVT_TOGGLEBUTTON, cb->GetId()); event.SetInt(cb->GetValue()); event.SetEventObject(cb); cb->HandleWindowEvent(event); } } -wxDEFINE_EVENT( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEvent ); +wxDEFINE_EVENT( wxEVT_TOGGLEBUTTON, wxCommandEvent ); // ------------------------------------------------------------------------ // wxBitmapToggleButton diff --git a/src/gtk/toolbar.cpp b/src/gtk/toolbar.cpp index ee5749277c..8d82ebc8b2 100644 --- a/src/gtk/toolbar.cpp +++ b/src/gtk/toolbar.cpp @@ -298,7 +298,7 @@ void wxToolBarTool::CreateDropDown() void wxToolBarTool::ShowDropdown(GtkToggleButton* button) { wxToolBarBase* toolbar = GetToolBar(); - wxCommandEvent event(wxEVT_COMMAND_TOOL_DROPDOWN_CLICKED, GetId()); + wxCommandEvent event(wxEVT_TOOL_DROPDOWN, GetId()); if (!toolbar->HandleWindowEvent(event)) { wxMenu* menu = GetDropdownMenu(); diff --git a/src/gtk/webview_webkit.cpp b/src/gtk/webview_webkit.cpp index c6579f8fcb..3331a74026 100644 --- a/src/gtk/webview_webkit.cpp +++ b/src/gtk/webview_webkit.cpp @@ -59,7 +59,7 @@ wxgtk_webview_webkit_load_status(GtkWidget* widget, } webKitCtrl->m_busy = false; - wxWebViewEvent event(wxEVT_COMMAND_WEBVIEW_LOADED, + wxWebViewEvent event(wxEVT_WEBVIEW_LOADED, webKitCtrl->GetId(), url, target); @@ -69,7 +69,7 @@ wxgtk_webview_webkit_load_status(GtkWidget* widget, else if (status == WEBKIT_LOAD_COMMITTED) { webKitCtrl->m_busy = true; - wxWebViewEvent event(wxEVT_COMMAND_WEBVIEW_NAVIGATED, + wxWebViewEvent event(wxEVT_WEBVIEW_NAVIGATED, webKitCtrl->GetId(), url, target); @@ -101,7 +101,7 @@ wxgtk_webview_webkit_navigation(WebKitWebView *, const gchar* uri = webkit_network_request_get_uri(request); wxString target = webkit_web_frame_get_name (frame); - wxWebViewEvent event(wxEVT_COMMAND_WEBVIEW_NAVIGATING, + wxWebViewEvent event(wxEVT_WEBVIEW_NAVIGATING, webKitCtrl->GetId(), wxString( uri, wxConvUTF8 ), target); @@ -274,7 +274,7 @@ wxgtk_webview_webkit_error(WebKitWebView*, } */ - wxWebViewEvent event(wxEVT_COMMAND_WEBVIEW_ERROR, + wxWebViewEvent event(wxEVT_WEBVIEW_ERROR, webKitWindow->GetId(), uri, ""); event.SetString(description); @@ -299,7 +299,7 @@ wxgtk_webview_webkit_new_window(WebKitWebView*, const gchar* uri = webkit_network_request_get_uri(request); wxString target = webkit_web_frame_get_name (frame); - wxWebViewEvent event(wxEVT_COMMAND_WEBVIEW_NEWWINDOW, + wxWebViewEvent event(wxEVT_WEBVIEW_NEWWINDOW, webKitCtrl->GetId(), wxString( uri, wxConvUTF8 ), target); @@ -318,7 +318,7 @@ wxgtk_webview_webkit_title_changed(WebKitWebView*, gchar *title, wxWebViewWebKit *webKitCtrl) { - wxWebViewEvent event(wxEVT_COMMAND_WEBVIEW_TITLE_CHANGED, + wxWebViewEvent event(wxEVT_WEBVIEW_TITLE_CHANGED, webKitCtrl->GetId(), webKitCtrl->GetCurrentURL(), ""); diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index 7eb9314093..462cc9d5d6 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -961,7 +961,7 @@ gtk_window_key_press_callback( GtkWidget *WXUNUSED(widget), int command = ancestor->GetAcceleratorTable()->GetCommand( event ); if (command != -1) { - wxCommandEvent menu_event( wxEVT_COMMAND_MENU_SELECTED, command ); + wxCommandEvent menu_event( wxEVT_MENU, command ); ret = ancestor->HandleWindowEvent( menu_event ); if ( !ret ) @@ -969,7 +969,7 @@ gtk_window_key_press_callback( GtkWidget *WXUNUSED(widget), // if the accelerator wasn't handled as menu event, try // it as button click (for compatibility with other // platforms): - wxCommandEvent button_event( wxEVT_COMMAND_BUTTON_CLICKED, command ); + wxCommandEvent button_event( wxEVT_BUTTON, command ); ret = ancestor->HandleWindowEvent( button_event ); } diff --git a/src/gtk1/bmpbuttn.cpp b/src/gtk1/bmpbuttn.cpp index 109281084a..908926d673 100644 --- a/src/gtk1/bmpbuttn.cpp +++ b/src/gtk1/bmpbuttn.cpp @@ -48,7 +48,7 @@ static void gtk_bmpbutton_clicked_callback( GtkWidget *WXUNUSED(widget), wxBitma if (!button->m_hasVMT) return; if (g_blockEventsOnDrag) return; - wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, button->GetId()); + wxCommandEvent event(wxEVT_BUTTON, button->GetId()); event.SetEventObject(button); button->HandleWindowEvent(event); } diff --git a/src/gtk1/button.cpp b/src/gtk1/button.cpp index cbcf71028c..3ff3a24241 100644 --- a/src/gtk1/button.cpp +++ b/src/gtk1/button.cpp @@ -53,7 +53,7 @@ static void gtk_button_clicked_callback( GtkWidget *WXUNUSED(widget), wxButton * if (!button->m_hasVMT) return; if (g_blockEventsOnDrag) return; - wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, button->GetId()); + wxCommandEvent event(wxEVT_BUTTON, button->GetId()); event.SetEventObject(button); button->HandleWindowEvent(event); } diff --git a/src/gtk1/checkbox.cpp b/src/gtk1/checkbox.cpp index e52bdc4b01..2c0d16e961 100644 --- a/src/gtk1/checkbox.cpp +++ b/src/gtk1/checkbox.cpp @@ -47,7 +47,7 @@ static void gtk_checkbox_toggled_callback(GtkWidget *WXUNUSED(widget), if (cb->m_blockEvent) return; - wxCommandEvent event(wxEVT_COMMAND_CHECKBOX_CLICKED, cb->GetId()); + wxCommandEvent event(wxEVT_CHECKBOX, cb->GetId()); event.SetInt(cb->GetValue()); event.SetEventObject(cb); cb->HandleWindowEvent(event); diff --git a/src/gtk1/choice.cpp b/src/gtk1/choice.cpp index 1a17d2d027..bf990f2b81 100644 --- a/src/gtk1/choice.cpp +++ b/src/gtk1/choice.cpp @@ -66,7 +66,7 @@ static void gtk_choice_clicked_callback( GtkWidget *WXUNUSED(widget), wxChoice * choice->m_selection_hack = selection; - wxCommandEvent event(wxEVT_COMMAND_CHOICE_SELECTED, choice->GetId() ); + wxCommandEvent event(wxEVT_CHOICE, choice->GetId() ); int n = choice->GetSelection(); event.SetInt( n ); diff --git a/src/gtk1/combobox.cpp b/src/gtk1/combobox.cpp index 48221babd6..cd0f53c520 100644 --- a/src/gtk1/combobox.cpp +++ b/src/gtk1/combobox.cpp @@ -17,7 +17,7 @@ #ifndef WX_PRECOMP #include "wx/intl.h" #include "wx/settings.h" - #include "wx/textctrl.h" // for wxEVT_COMMAND_TEXT_UPDATED + #include "wx/textctrl.h" // for wxEVT_TEXT #include "wx/arrstr.h" #endif @@ -56,7 +56,7 @@ gtk_text_changed_callback( GtkWidget *WXUNUSED(widget), wxComboBox *combo ) if (!combo->m_hasVMT) return; - wxCommandEvent event( wxEVT_COMMAND_TEXT_UPDATED, combo->GetId() ); + wxCommandEvent event( wxEVT_TEXT, combo->GetId() ); event.SetString( combo->GetValue() ); event.SetEventObject( combo ); combo->HandleWindowEvent( event ); @@ -87,14 +87,14 @@ gtk_popup_hide_callback(GtkCombo *WXUNUSED(gtk_combo), wxComboBox *combo) if ( hasChanged ) { - wxCommandEvent event( wxEVT_COMMAND_COMBOBOX_SELECTED, combo->GetId() ); + wxCommandEvent event( wxEVT_COMBOBOX, combo->GetId() ); event.SetInt( curSelection ); event.SetString( combo->GetStringSelection() ); event.SetEventObject( combo ); combo->HandleWindowEvent( event ); // for consistency with the other ports, send TEXT event - wxCommandEvent event2( wxEVT_COMMAND_TEXT_UPDATED, combo->GetId() ); + wxCommandEvent event2( wxEVT_TEXT, combo->GetId() ); event2.SetString( combo->GetStringSelection() ); event2.SetEventObject( combo ); combo->HandleWindowEvent( event2 ); @@ -150,7 +150,7 @@ gtk_combo_select_child_callback( GtkList *WXUNUSED(list), GtkWidget *WXUNUSED(wi // and select other items ... if (g_SelectionBeforePopup == wxID_NONE) { - wxCommandEvent event( wxEVT_COMMAND_COMBOBOX_SELECTED, combo->GetId() ); + wxCommandEvent event( wxEVT_COMBOBOX, combo->GetId() ); event.SetInt( curSelection ); event.SetString( combo->GetStringSelection() ); event.SetEventObject( combo ); @@ -158,7 +158,7 @@ gtk_combo_select_child_callback( GtkList *WXUNUSED(list), GtkWidget *WXUNUSED(wi // for consistency with the other ports, don't generate text update // events while the user is browsing the combobox neither - wxCommandEvent event2( wxEVT_COMMAND_TEXT_UPDATED, combo->GetId() ); + wxCommandEvent event2( wxEVT_TEXT, combo->GetId() ); event2.SetString( combo->GetValue() ); event2.SetEventObject( combo ); combo->HandleWindowEvent( event2 ); @@ -782,7 +782,7 @@ void wxComboBox::OnChar( wxKeyEvent &event ) if ( event.GetKeyCode() == WXK_RETURN ) { // GTK automatically selects an item if its in the list - wxCommandEvent eventEnter(wxEVT_COMMAND_TEXT_ENTER, GetId()); + wxCommandEvent eventEnter(wxEVT_TEXT_ENTER, GetId()); eventEnter.SetString( GetValue() ); eventEnter.SetInt( GetSelection() ); eventEnter.SetEventObject( this ); diff --git a/src/gtk1/dialog.cpp b/src/gtk1/dialog.cpp index 8699a02e6b..041d74275b 100644 --- a/src/gtk1/dialog.cpp +++ b/src/gtk1/dialog.cpp @@ -138,7 +138,7 @@ void wxDialog::OnCloseWindow(wxCloseEvent& WXUNUSED(event)) s_closing.Append(this); - wxCommandEvent cancelEvent(wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL); + wxCommandEvent cancelEvent(wxEVT_BUTTON, wxID_CANCEL); cancelEvent.SetEventObject( this ); HandleWindowEvent(cancelEvent); s_closing.DeleteObject(this); diff --git a/src/gtk1/fontdlg.cpp b/src/gtk1/fontdlg.cpp index 5b9a04bba4..7cb8429c46 100644 --- a/src/gtk1/fontdlg.cpp +++ b/src/gtk1/fontdlg.cpp @@ -82,7 +82,7 @@ void gtk_fontdialog_ok_callback( GtkWidget *WXUNUSED(widget), wxFontDialog *dial g_free( fontname ); - wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK); + wxCommandEvent event(wxEVT_BUTTON, wxID_OK); event.SetEventObject( dialog ); dialog->HandleWindowEvent( event ); } @@ -99,7 +99,7 @@ void gtk_fontdialog_cancel_callback( GtkWidget *WXUNUSED(w), wxFontDialog *dialo if (g_isIdle) wxapp_install_idle_handler(); - wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL); + wxCommandEvent event(wxEVT_BUTTON, wxID_CANCEL); event.SetEventObject( dialog ); dialog->HandleWindowEvent( event ); } diff --git a/src/gtk1/listbox.cpp b/src/gtk1/listbox.cpp index a3bb9f6acf..316e4914db 100644 --- a/src/gtk1/listbox.cpp +++ b/src/gtk1/listbox.cpp @@ -160,7 +160,7 @@ static gint gtk_listitem_focus_out_callback( GtkWidget *WXUNUSED(widget), // "button_release_event" //----------------------------------------------------------------------------- -/* we would normally emit a wxEVT_COMMAND_LISTBOX_DOUBLECLICKED event once +/* we would normally emit a wxEVT_LISTBOX_DCLICK event once a GDK_2BUTTON_PRESS occurs, but this has the particular problem of the listbox keeping the focus until it receives a GDK_BUTTON_RELEASE event. this can lead to race conditions so that we emit the dclick event @@ -181,7 +181,7 @@ gtk_listbox_button_release_callback( GtkWidget * WXUNUSED(widget), if (!g_hasDoubleClicked) return FALSE; - wxCommandEvent event( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, listbox->GetId() ); + wxCommandEvent event( wxEVT_LISTBOX_DCLICK, listbox->GetId() ); event.SetEventObject( listbox ); wxArrayInt aSelections; @@ -234,7 +234,7 @@ gtk_listbox_button_press_callback( GtkWidget *widget, clb->Check( sel, !clb->IsChecked(sel) ); - wxCommandEvent event( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, listbox->GetId() ); + wxCommandEvent event( wxEVT_CHECKLISTBOX, listbox->GetId() ); event.SetEventObject( listbox ); event.SetInt( sel ); listbox->HandleWindowEvent( event ); @@ -257,7 +257,7 @@ gtk_listbox_button_press_callback( GtkWidget *widget, return false; } - /* emit wxEVT_COMMAND_LISTBOX_DOUBLECLICKED later */ + /* emit wxEVT_LISTBOX_DCLICK later */ g_hasDoubleClicked = (gdk_event->type == GDK_2BUTTON_PRESS); return FALSE; @@ -306,7 +306,7 @@ gtk_listbox_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_event, wxLis clb->Check( sel, !clb->IsChecked(sel) ); - wxCommandEvent new_event( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, listbox->GetId() ); + wxCommandEvent new_event( wxEVT_CHECKLISTBOX, listbox->GetId() ); new_event.SetEventObject( listbox ); new_event.SetInt( sel ); ret = listbox->HandleWindowEvent( new_event ); @@ -329,7 +329,7 @@ gtk_listbox_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_event, wxLis else gtk_list_select_item( listbox->m_list, sel ); - wxCommandEvent new_event(wxEVT_COMMAND_LISTBOX_SELECTED, listbox->GetId() ); + wxCommandEvent new_event(wxEVT_LISTBOX, listbox->GetId() ); new_event.SetEventObject( listbox ); wxArrayInt aSelections; int n, count = listbox->GetSelections(aSelections); @@ -376,7 +376,7 @@ static void gtk_listitem_select_cb( GtkWidget *widget, if (listbox->m_blockEvent) return; - wxCommandEvent event(wxEVT_COMMAND_LISTBOX_SELECTED, listbox->GetId() ); + wxCommandEvent event(wxEVT_LISTBOX, listbox->GetId() ); event.SetEventObject( listbox ); // indicate whether this is a selection or a deselection diff --git a/src/gtk1/menu.cpp b/src/gtk1/menu.cpp index e41086721f..8449fc7a38 100644 --- a/src/gtk1/menu.cpp +++ b/src/gtk1/menu.cpp @@ -614,7 +614,7 @@ static void gtk_menu_clicked_callback( GtkWidget *widget, wxMenu *menu ) // If it is attached then let the frame send the event. // Don't call frame->ProcessCommand(id) because it toggles // checkable items and we've already done that above. - wxCommandEvent commandEvent(wxEVT_COMMAND_MENU_SELECTED, id); + wxCommandEvent commandEvent(wxEVT_MENU, id); commandEvent.SetEventObject(frame); if (item->IsCheckable()) commandEvent.SetInt(item->IsChecked()); diff --git a/src/gtk1/radiobox.cpp b/src/gtk1/radiobox.cpp index 1c576da328..ed7a7ce816 100644 --- a/src/gtk1/radiobox.cpp +++ b/src/gtk1/radiobox.cpp @@ -53,7 +53,7 @@ static void gtk_radiobutton_clicked_callback( GtkToggleButton *button, wxRadioBo if (!button->active) return; - wxCommandEvent event( wxEVT_COMMAND_RADIOBOX_SELECTED, rb->GetId() ); + wxCommandEvent event( wxEVT_RADIOBOX, rb->GetId() ); event.SetInt( rb->GetSelection() ); event.SetString( rb->GetStringSelection() ); event.SetEventObject( rb ); diff --git a/src/gtk1/radiobut.cpp b/src/gtk1/radiobut.cpp index d07bbcdeea..7be6bb9ee5 100644 --- a/src/gtk1/radiobut.cpp +++ b/src/gtk1/radiobut.cpp @@ -49,7 +49,7 @@ void gtk_radiobutton_clicked_callback( GtkToggleButton *button, wxRadioButton *r if (rb->m_blockEvent) return; - wxCommandEvent event( wxEVT_COMMAND_RADIOBUTTON_SELECTED, rb->GetId()); + wxCommandEvent event( wxEVT_RADIOBUTTON, rb->GetId()); event.SetInt( rb->GetValue() ); event.SetEventObject( rb ); rb->HandleWindowEvent( event ); diff --git a/src/gtk1/scrolbar.cpp b/src/gtk1/scrolbar.cpp index e6dd46e299..ae2b4b8a2b 100644 --- a/src/gtk1/scrolbar.cpp +++ b/src/gtk1/scrolbar.cpp @@ -79,7 +79,7 @@ static void gtk_scrollbar_callback( GtkAdjustment *adjust, win->HandleWindowEvent( event ); /* - wxCommandEvent cevent( wxEVT_COMMAND_SCROLLBAR_UPDATED, win->GetId() ); + wxCommandEvent cevent( wxEVT_SCROLLBAR, win->GetId() ); cevent.SetEventObject( win ); win->ProcessEvent( cevent ); */ diff --git a/src/gtk1/slider.cpp b/src/gtk1/slider.cpp index c0187f3cca..089ea23c88 100644 --- a/src/gtk1/slider.cpp +++ b/src/gtk1/slider.cpp @@ -63,7 +63,7 @@ ProcessScrollEvent(wxSlider *win, wxEventType evtType, double dvalue) win->HandleWindowEvent( event2 ); } - wxCommandEvent cevent( wxEVT_COMMAND_SLIDER_UPDATED, win->GetId() ); + wxCommandEvent cevent( wxEVT_SLIDER, win->GetId() ); cevent.SetEventObject( win ); cevent.SetInt( value ); win->HandleWindowEvent( cevent ); diff --git a/src/gtk1/spinctrl.cpp b/src/gtk1/spinctrl.cpp index 6d430eb4f8..275077ee32 100644 --- a/src/gtk1/spinctrl.cpp +++ b/src/gtk1/spinctrl.cpp @@ -17,7 +17,7 @@ #ifndef WX_PRECOMP #include "wx/utils.h" - #include "wx/textctrl.h" // for wxEVT_COMMAND_TEXT_UPDATED + #include "wx/textctrl.h" // for wxEVT_TEXT #include "wx/math.h" #include "wx/crt.h" #endif @@ -83,7 +83,7 @@ static void gtk_spinctrl_callback( GtkWidget *WXUNUSED(widget), wxSpinCtrl *win if (!win->m_hasVMT) return; if (g_blockEventsOnDrag) return; - wxCommandEvent event( wxEVT_COMMAND_SPINCTRL_UPDATED, win->GetId()); + wxCommandEvent event( wxEVT_SPINCTRL, win->GetId()); event.SetEventObject( win ); // note that we don't use wxSpinCtrl::GetValue() here because it would @@ -110,7 +110,7 @@ gtk_spinctrl_text_changed_callback( GtkWidget *WXUNUSED(widget), wxSpinCtrl *win if (g_isIdle) wxapp_install_idle_handler(); - wxCommandEvent event( wxEVT_COMMAND_TEXT_UPDATED, win->GetId() ); + wxCommandEvent event( wxEVT_TEXT, win->GetId() ); event.SetEventObject( win ); // see above @@ -309,7 +309,7 @@ void wxSpinCtrl::OnChar( wxKeyEvent &event ) if ((event.GetKeyCode() == WXK_RETURN) && (m_windowStyle & wxTE_PROCESS_ENTER)) { - wxCommandEvent evt( wxEVT_COMMAND_TEXT_ENTER, m_windowId ); + wxCommandEvent evt( wxEVT_TEXT_ENTER, m_windowId ); evt.SetEventObject(this); GtkSpinButton *gsb = GTK_SPIN_BUTTON(m_widget); wxString val = wxGTK_CONV_BACK( gtk_entry_get_text( &gsb->entry ) ); diff --git a/src/gtk1/textctrl.cpp b/src/gtk1/textctrl.cpp index fd777b6b3d..41e10d0526 100644 --- a/src/gtk1/textctrl.cpp +++ b/src/gtk1/textctrl.cpp @@ -114,11 +114,11 @@ gtk_insert_text_callback(GtkEditable *editable, gtk_signal_emit_stop_by_name(GTK_OBJECT(editable), "insert_text"); // remember that the next changed signal is to be ignored to avoid - // generating a dummy wxEVT_COMMAND_TEXT_UPDATED event + // generating a dummy wxEVT_TEXT event win->IgnoreNextTextUpdate(); // and generate the correct one ourselves - wxCommandEvent event(wxEVT_COMMAND_TEXT_MAXLEN, win->GetId()); + wxCommandEvent event(wxEVT_TEXT_MAXLEN, win->GetId()); event.SetEventObject(win); event.SetString(win->GetValue()); win->HandleWindowEvent( event ); @@ -145,7 +145,7 @@ gtk_text_changed_callback( GtkWidget *WXUNUSED(widget), wxTextCtrl *win ) win->SetModified(); win->UpdateFontIfNeeded(); - wxCommandEvent event( wxEVT_COMMAND_TEXT_UPDATED, win->GetId() ); + wxCommandEvent event( wxEVT_TEXT, win->GetId() ); event.SetEventObject( win ); win->HandleWindowEvent( event ); } @@ -972,7 +972,7 @@ void wxTextCtrl::OnChar( wxKeyEvent &key_event ) if ((key_event.GetKeyCode() == WXK_RETURN) && (m_windowStyle & wxTE_PROCESS_ENTER)) { - wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId); + wxCommandEvent event(wxEVT_TEXT_ENTER, m_windowId); event.SetEventObject(this); event.SetString(GetValue()); if (HandleWindowEvent(event)) return; diff --git a/src/gtk1/tglbtn.cpp b/src/gtk1/tglbtn.cpp index 286f3fc478..82972011f1 100644 --- a/src/gtk1/tglbtn.cpp +++ b/src/gtk1/tglbtn.cpp @@ -40,14 +40,14 @@ static void gtk_togglebutton_clicked_callback(GtkWidget *WXUNUSED(widget), wxTog if (cb->m_blockEvent) return; // Generate a wx event. - wxCommandEvent event(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, cb->GetId()); + wxCommandEvent event(wxEVT_TOGGLEBUTTON, cb->GetId()); event.SetInt(cb->GetValue()); event.SetEventObject(cb); cb->HandleWindowEvent(event); } } -wxDEFINE_EVENT( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEvent ); +wxDEFINE_EVENT( wxEVT_TOGGLEBUTTON, wxCommandEvent ); // ------------------------------------------------------------------------ // wxToggleBitmapButton diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index 42a37b7df2..da39d7a90e 100644 --- a/src/gtk1/window.cpp +++ b/src/gtk1/window.cpp @@ -1141,7 +1141,7 @@ static gint gtk_window_key_press_callback( GtkWidget *widget, int command = ancestor->GetAcceleratorTable()->GetCommand( event ); if (command != -1) { - wxCommandEvent command_event( wxEVT_COMMAND_MENU_SELECTED, command ); + wxCommandEvent command_event( wxEVT_MENU, command ); ret = ancestor->HandleWindowEvent( command_event ); break; } @@ -1257,7 +1257,7 @@ static gint gtk_window_key_press_callback( GtkWidget *widget, if ( btnCancel ) { - wxCommandEvent eventClick(wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL); + wxCommandEvent eventClick(wxEVT_BUTTON, wxID_CANCEL); eventClick.SetEventObject(btnCancel); ret = btnCancel->HandleWindowEvent(eventClick); } diff --git a/src/html/htmlwin.cpp b/src/html/htmlwin.cpp index 11a4d78bf9..0264befd05 100644 --- a/src/html/htmlwin.cpp +++ b/src/html/htmlwin.cpp @@ -43,9 +43,9 @@ IMPLEMENT_DYNAMIC_CLASS(wxHtmlLinkEvent, wxCommandEvent) IMPLEMENT_DYNAMIC_CLASS(wxHtmlCellEvent, wxCommandEvent) -wxDEFINE_EVENT( wxEVT_COMMAND_HTML_CELL_CLICKED, wxHtmlCellEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_HTML_CELL_HOVER, wxHtmlCellEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_HTML_LINK_CLICKED, wxHtmlLinkEvent ); +wxDEFINE_EVENT( wxEVT_HTML_CELL_CLICKED, wxHtmlCellEvent ); +wxDEFINE_EVENT( wxEVT_HTML_CELL_HOVER, wxHtmlCellEvent ); +wxDEFINE_EVENT( wxEVT_HTML_LINK_CLICKED, wxHtmlLinkEvent ); #if wxUSE_CLIPBOARD @@ -240,7 +240,7 @@ bool wxHtmlWindowMouseHelper::OnCellClicked(wxHtmlCell *cell, wxCoord x, wxCoord y, const wxMouseEvent& event) { - wxHtmlCellEvent ev(wxEVT_COMMAND_HTML_CELL_CLICKED, + wxHtmlCellEvent ev(wxEVT_HTML_CELL_CLICKED, m_interface->GetHTMLWindow()->GetId(), cell, wxPoint(x,y), event); @@ -261,7 +261,7 @@ void wxHtmlWindowMouseHelper::OnCellMouseHover(wxHtmlCell * cell, wxCoord x, wxCoord y) { - wxHtmlCellEvent ev(wxEVT_COMMAND_HTML_CELL_HOVER, + wxHtmlCellEvent ev(wxEVT_HTML_CELL_HOVER, m_interface->GetHTMLWindow()->GetId(), cell, wxPoint(x,y), wxMouseEvent()); m_interface->GetHTMLWindow()->GetEventHandler()->ProcessEvent(ev); @@ -1538,7 +1538,7 @@ void wxHtmlWindow::OnKeyUp(wxKeyEvent& event) if ( IsSelectionEnabled() && (event.GetKeyCode() == 'C' && event.CmdDown()) ) { - wxClipboardTextEvent evt(wxEVT_COMMAND_TEXT_COPY, GetId()); + wxClipboardTextEvent evt(wxEVT_TEXT_COPY, GetId()); evt.SetEventObject(this); diff --git a/src/motif/button.cpp b/src/motif/button.cpp index 9df9eab55c..14418ab50a 100644 --- a/src/motif/button.cpp +++ b/src/motif/button.cpp @@ -242,7 +242,7 @@ void wxButtonCallback (Widget w, XtPointer clientData, XtPointer WXUNUSED(ptr)) return; wxButton *item = (wxButton *) clientData; - wxCommandEvent event (wxEVT_COMMAND_BUTTON_CLICKED, item->GetId()); + wxCommandEvent event (wxEVT_BUTTON, item->GetId()); event.SetEventObject(item); item->ProcessCommand (event); } diff --git a/src/motif/checkbox.cpp b/src/motif/checkbox.cpp index 6a68b1009b..094fe8bf36 100644 --- a/src/motif/checkbox.cpp +++ b/src/motif/checkbox.cpp @@ -216,7 +216,7 @@ wxCheckBoxState wxCheckBox::DoGet3StateValue() const #if wxUSE_TOGGLEBTN -wxDEFINE_EVENT( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEvent ); +wxDEFINE_EVENT( wxEVT_TOGGLEBUTTON, wxCommandEvent ); IMPLEMENT_DYNAMIC_CLASS(wxToggleButton, wxControl) bool wxToggleButton::Create( wxWindow* parent, wxWindowID id, diff --git a/src/motif/checklst.cpp b/src/motif/checklst.cpp index b461e6ab3a..7481179cce 100644 --- a/src/motif/checklst.cpp +++ b/src/motif/checklst.cpp @@ -129,7 +129,7 @@ void wxCheckListBox::DoToggleItem( int n, int x ) label[1u] = (!::IsChecked(label)) ? checkChar : uncheckChar; wxListBox::SetString(n, label); - wxCommandEvent event(wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, GetId()); + wxCommandEvent event(wxEVT_CHECKLISTBOX, GetId()); if( HasClientObjectData() ) event.SetClientObject( GetClientObject(n) ); else if( HasClientUntypedData() ) diff --git a/src/motif/choice.cpp b/src/motif/choice.cpp index 7557887c05..39b0f03086 100644 --- a/src/motif/choice.cpp +++ b/src/motif/choice.cpp @@ -411,7 +411,7 @@ void wxChoiceCallback (Widget w, XtPointer clientData, XtPointer WXUNUSED(ptr)) int n = item->GetWidgets().Index(w); if (n != wxNOT_FOUND) { - wxCommandEvent event(wxEVT_COMMAND_CHOICE_SELECTED, item->GetId()); + wxCommandEvent event(wxEVT_CHOICE, item->GetId()); event.SetEventObject(item); event.SetInt(n); event.SetString( item->GetStrings().Item(n) ); diff --git a/src/motif/combobox.cpp b/src/motif/combobox.cpp index 65fcf3f7ac..aac9cc7e4e 100644 --- a/src/motif/combobox.cpp +++ b/src/motif/combobox.cpp @@ -232,7 +232,7 @@ void wxComboBoxCallback (Widget WXUNUSED(w), XtPointer clientData, case XmCR_SINGLE_SELECT: case XmCR_BROWSE_SELECT: { - wxCommandEvent event (wxEVT_COMMAND_COMBOBOX_SELECTED, + wxCommandEvent event (wxEVT_COMBOBOX, item->GetId()); event.SetInt(cbs->index - 1); event.SetString( item->GetString ( event.GetInt() ) ); @@ -247,7 +247,7 @@ void wxComboBoxCallback (Widget WXUNUSED(w), XtPointer clientData, } case XmCR_VALUE_CHANGED: { - wxCommandEvent event (wxEVT_COMMAND_TEXT_UPDATED, item->GetId()); + wxCommandEvent event (wxEVT_TEXT, item->GetId()); event.SetInt(-1); event.SetString( item->GetValue() ); event.SetExtraLong(true); diff --git a/src/motif/combobox_native.cpp b/src/motif/combobox_native.cpp index 4f22c841b4..f72329eabe 100644 --- a/src/motif/combobox_native.cpp +++ b/src/motif/combobox_native.cpp @@ -294,7 +294,7 @@ void wxComboBoxCallback (Widget WXUNUSED(w), XtPointer clientData, case XmCR_BROWSE_SELECT: #endif { - wxCommandEvent event (wxEVT_COMMAND_COMBOBOX_SELECTED, + wxCommandEvent event (wxEVT_COMBOBOX, item->GetId()); int idx = cbs->item_position; event.SetInt(idx); @@ -310,7 +310,7 @@ void wxComboBoxCallback (Widget WXUNUSED(w), XtPointer clientData, } case XmCR_VALUE_CHANGED: { - wxCommandEvent event (wxEVT_COMMAND_TEXT_UPDATED, item->GetId()); + wxCommandEvent event (wxEVT_TEXT, item->GetId()); event.SetInt(-1); event.SetString( item->GetValue() ); event.SetExtraLong(true); diff --git a/src/motif/listbox.cpp b/src/motif/listbox.cpp index da952a3627..43f92d3446 100644 --- a/src/motif/listbox.cpp +++ b/src/motif/listbox.cpp @@ -452,9 +452,9 @@ void wxListBoxCallback (Widget WXUNUSED(w), XtPointer clientData, wxEventType evtType; if( cbs->reason == XmCR_DEFAULT_ACTION ) - evtType = wxEVT_COMMAND_LISTBOX_DOUBLECLICKED; + evtType = wxEVT_LISTBOX_DCLICK; else - evtType = wxEVT_COMMAND_LISTBOX_SELECTED; + evtType = wxEVT_LISTBOX; int n = cbs->item_position - 1; wxCommandEvent event (evtType, item->GetId()); diff --git a/src/motif/menuitem.cpp b/src/motif/menuitem.cpp index 1f770c0f69..76b337eb4c 100644 --- a/src/motif/menuitem.cpp +++ b/src/motif/menuitem.cpp @@ -338,7 +338,7 @@ void wxMenuItemCallback (Widget WXUNUSED(w), XtPointer clientData, wxMenuItem *item = (wxMenuItem *) clientData; if (item) { - wxCommandEvent event(wxEVT_COMMAND_MENU_SELECTED, item->GetId()); + wxCommandEvent event(wxEVT_MENU, item->GetId()); event.SetInt( item->GetId() ); if (item->IsCheckable()) diff --git a/src/motif/radiobox.cpp b/src/motif/radiobox.cpp index 00303033a4..3e9b9cb597 100644 --- a/src/motif/radiobox.cpp +++ b/src/motif/radiobox.cpp @@ -390,7 +390,7 @@ void wxRadioBoxCallback (Widget w, XtPointer clientData, if (item->InSetValue()) return; - wxCommandEvent event (wxEVT_COMMAND_RADIOBOX_SELECTED, item->GetId()); + wxCommandEvent event (wxEVT_RADIOBOX, item->GetId()); event.SetInt(sel); event.SetString(item->GetStringSelection()); event.SetEventObject(item); diff --git a/src/motif/radiobut.cpp b/src/motif/radiobut.cpp index d6832a3f6d..eff4009524 100644 --- a/src/motif/radiobut.cpp +++ b/src/motif/radiobut.cpp @@ -159,13 +159,13 @@ void wxRadioButtonCallback (Widget WXUNUSED(w), XtPointer clientData, if ( old ) { - wxCommandEvent event(wxEVT_COMMAND_RADIOBUTTON_SELECTED, + wxCommandEvent event(wxEVT_RADIOBUTTON, old->GetId() ); event.SetEventObject(old); event.SetInt( false ); old->ProcessCommand(event); } - wxCommandEvent event2(wxEVT_COMMAND_RADIOBUTTON_SELECTED, item->GetId() ); + wxCommandEvent event2(wxEVT_RADIOBUTTON, item->GetId() ); event2.SetEventObject(item); event2.SetInt( true ); item->ProcessCommand(event2); diff --git a/src/motif/slider.cpp b/src/motif/slider.cpp index 70c5c66a24..478b1d686d 100644 --- a/src/motif/slider.cpp +++ b/src/motif/slider.cpp @@ -222,7 +222,7 @@ void wxSliderCallback (Widget widget, XtPointer clientData, slider->HandleWindowEvent(event); // Also send a wxCommandEvent for compatibility. - wxCommandEvent event2(wxEVT_COMMAND_SLIDER_UPDATED, slider->GetId()); + wxCommandEvent event2(wxEVT_SLIDER, slider->GetId()); event2.SetEventObject(slider); event2.SetInt( event.GetInt() ); slider->HandleWindowEvent(event2); diff --git a/src/motif/textctrl.cpp b/src/motif/textctrl.cpp index f637e1fa42..03514e834d 100644 --- a/src/motif/textctrl.cpp +++ b/src/motif/textctrl.cpp @@ -470,7 +470,7 @@ void wxTextCtrl::DoSendEvents(void *wxcbs, long keycode) if ( !InSetValue() && m_processedDefault ) { // Can generate a command - wxCommandEvent commandEvent(wxEVT_COMMAND_TEXT_UPDATED, GetId()); + wxCommandEvent commandEvent(wxEVT_TEXT, GetId()); commandEvent.SetEventObject(this); ProcessCommand(commandEvent); } @@ -687,7 +687,7 @@ static void wxTextWindowActivateProc(Widget w, XtPointer clientData, if (tw->InSetValue()) return; - wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER); + wxCommandEvent event(wxEVT_TEXT_ENTER); event.SetId(tw->GetId()); event.SetEventObject(tw); tw->ProcessCommand(event); diff --git a/src/motif/window.cpp b/src/motif/window.cpp index 01bac12813..a3db88113b 100644 --- a/src/motif/window.cpp +++ b/src/motif/window.cpp @@ -1692,7 +1692,7 @@ bool wxWindow::ProcessAccelerator(wxKeyEvent& event) wxMenuItem* item = frame->GetMenuBar()->FindItem(entry->GetCommand()); if (item) { - wxCommandEvent commandEvent(wxEVT_COMMAND_MENU_SELECTED, entry->GetCommand()); + wxCommandEvent commandEvent(wxEVT_MENU, entry->GetCommand()); commandEvent.SetEventObject(frame); // If ProcessEvent returns true (it was handled), then @@ -1714,7 +1714,7 @@ bool wxWindow::ProcessAccelerator(wxKeyEvent& event) // For now, only buttons. if ( wxDynamicCast(child, wxButton) ) { - wxCommandEvent commandEvent (wxEVT_COMMAND_BUTTON_CLICKED, child->GetId()); + wxCommandEvent commandEvent (wxEVT_BUTTON, child->GetId()); commandEvent.SetEventObject(child); return child->HandleWindowEvent(commandEvent); } diff --git a/src/msw/button.cpp b/src/msw/button.cpp index 324803e4d8..fc6793855f 100644 --- a/src/msw/button.cpp +++ b/src/msw/button.cpp @@ -360,7 +360,7 @@ wxButton::SetDefaultStyle(wxButton *btn, bool on) bool wxButton::SendClickEvent() { - wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, GetId()); + wxCommandEvent event(wxEVT_BUTTON, GetId()); event.SetEventObject(this); return ProcessCommand(event); diff --git a/src/msw/checkbox.cpp b/src/msw/checkbox.cpp index b793c2a589..6b8963443a 100644 --- a/src/msw/checkbox.cpp +++ b/src/msw/checkbox.cpp @@ -261,7 +261,7 @@ bool wxCheckBox::MSWCommand(WXUINT cmd, WXWORD WXUNUSED(id)) // generate the event - wxCommandEvent event(wxEVT_COMMAND_CHECKBOX_CLICKED, m_windowId); + wxCommandEvent event(wxEVT_CHECKBOX, m_windowId); event.SetInt(state); event.SetEventObject(this); diff --git a/src/msw/choice.cpp b/src/msw/choice.cpp index 30dad609d0..a14e549464 100644 --- a/src/msw/choice.cpp +++ b/src/msw/choice.cpp @@ -784,7 +784,7 @@ bool wxChoice::MSWCommand(WXUINT param, WXWORD WXUNUSED(id)) { // This can only happen in the case (B), so set the item // selected in the drop down as our real selection. - SendSelectionChangedEvent(wxEVT_COMMAND_CHOICE_SELECTED); + SendSelectionChangedEvent(wxEVT_CHOICE); m_pendingSelection = wxID_NONE; } break; @@ -795,7 +795,7 @@ bool wxChoice::MSWCommand(WXUINT param, WXWORD WXUNUSED(id)) m_lastAcceptedSelection = m_pendingSelection = wxID_NONE; - SendSelectionChangedEvent(wxEVT_COMMAND_CHOICE_SELECTED); + SendSelectionChangedEvent(wxEVT_CHOICE); break; case CBN_SELCHANGE: diff --git a/src/msw/combobox.cpp b/src/msw/combobox.cpp index b823cc5899..d98241f0c4 100644 --- a/src/msw/combobox.cpp +++ b/src/msw/combobox.cpp @@ -32,7 +32,7 @@ #include "wx/msw/wrapcctl.h" // include "properly" #include "wx/settings.h" #include "wx/log.h" - // for wxEVT_COMMAND_TEXT_ENTER + // for wxEVT_TEXT_ENTER #include "wx/textctrl.h" #include "wx/app.h" #include "wx/brush.h" @@ -234,7 +234,7 @@ bool wxComboBox::MSWProcessEditMsg(WXUINT msg, WXWPARAM wParam, WXLPARAM lParam) if (SendMessage(GetHwnd(), CB_GETDROPPEDSTATE, 0, 0)) return false; - wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId); + wxCommandEvent event(wxEVT_TEXT_ENTER, m_windowId); const int sel = GetSelection(); event.SetInt(sel); @@ -275,7 +275,7 @@ bool wxComboBox::MSWCommand(WXUINT param, WXWORD id) // remember the last selection, just as wxChoice does m_lastAcceptedSelection = GetCurrentSelection(); { - wxCommandEvent event(wxEVT_COMMAND_COMBOBOX_DROPDOWN, GetId()); + wxCommandEvent event(wxEVT_COMBOBOX_DROPDOWN, GetId()); event.SetEventObject(this); ProcessCommand(event); } @@ -285,11 +285,11 @@ bool wxComboBox::MSWCommand(WXUINT param, WXWORD id) // Do the same thing as in wxChoice but using different event type. if ( m_pendingSelection != wxID_NONE ) { - SendSelectionChangedEvent(wxEVT_COMMAND_COMBOBOX_SELECTED); + SendSelectionChangedEvent(wxEVT_COMBOBOX); m_pendingSelection = wxID_NONE; } { - wxCommandEvent event(wxEVT_COMMAND_COMBOBOX_CLOSEUP, GetId()); + wxCommandEvent event(wxEVT_COMBOBOX_CLOSEUP, GetId()); event.SetEventObject(this); ProcessCommand(event); } @@ -312,7 +312,7 @@ bool wxComboBox::MSWCommand(WXUINT param, WXWORD id) // could get a wrong value when it calls our GetValue() ::SetWindowText(GetHwnd(), value.t_str()); - SendSelectionChangedEvent(wxEVT_COMMAND_COMBOBOX_SELECTED); + SendSelectionChangedEvent(wxEVT_COMBOBOX); // fall through: for compatibility with wxGTK, also send the text // update event when the selection changes (this also seems more @@ -321,7 +321,7 @@ bool wxComboBox::MSWCommand(WXUINT param, WXWORD id) case CBN_EDITCHANGE: if ( m_allowTextEvents ) { - wxCommandEvent event(wxEVT_COMMAND_TEXT_UPDATED, GetId()); + wxCommandEvent event(wxEVT_TEXT, GetId()); // if sel != -1, value was already initialized above if ( sel == -1 ) diff --git a/src/msw/dialog.cpp b/src/msw/dialog.cpp index 67144e1bba..ccab43d45e 100644 --- a/src/msw/dialog.cpp +++ b/src/msw/dialog.cpp @@ -336,7 +336,7 @@ bool wxDialog::DoOK() if ( EmulateButtonClickIfPresent(idOk) ) return true; - wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, GetAffirmativeId()); + wxCommandEvent event(wxEVT_BUTTON, GetAffirmativeId()); event.SetEventObject(this); return HandleWindowEvent(event); diff --git a/src/msw/fdrepdlg.cpp b/src/msw/fdrepdlg.cpp index d185b884c3..7f27803410 100644 --- a/src/msw/fdrepdlg.cpp +++ b/src/msw/fdrepdlg.cpp @@ -240,21 +240,21 @@ wxFindReplaceDialogImpl::FindMessageHandler(wxWindow * WXUNUSED(win), // 2 cases dialog->GetImpl()->SetClosedByUser(); - evtType = wxEVT_COMMAND_FIND_CLOSE; + evtType = wxEVT_FIND_CLOSE; } else if ( pFR->Flags & FR_FINDNEXT ) { - evtType = wxEVT_COMMAND_FIND_NEXT; + evtType = wxEVT_FIND_NEXT; } else if ( pFR->Flags & FR_REPLACE ) { - evtType = wxEVT_COMMAND_FIND_REPLACE; + evtType = wxEVT_FIND_REPLACE; replace = true; } else if ( pFR->Flags & FR_REPLACEALL ) { - evtType = wxEVT_COMMAND_FIND_REPLACE_ALL; + evtType = wxEVT_FIND_REPLACE_ALL; replace = true; } diff --git a/src/msw/headerctrl.cpp b/src/msw/headerctrl.cpp index 6a5a417acc..4845715d03 100644 --- a/src/msw/headerctrl.cpp +++ b/src/msw/headerctrl.cpp @@ -475,18 +475,18 @@ wxEventType wxHeaderCtrl::GetClickEventType(bool dblclk, int button) switch ( button ) { case 0: - evtType = dblclk ? wxEVT_COMMAND_HEADER_DCLICK - : wxEVT_COMMAND_HEADER_CLICK; + evtType = dblclk ? wxEVT_HEADER_DCLICK + : wxEVT_HEADER_CLICK; break; case 1: - evtType = dblclk ? wxEVT_COMMAND_HEADER_RIGHT_DCLICK - : wxEVT_COMMAND_HEADER_RIGHT_CLICK; + evtType = dblclk ? wxEVT_HEADER_RIGHT_DCLICK + : wxEVT_HEADER_RIGHT_CLICK; break; case 2: - evtType = dblclk ? wxEVT_COMMAND_HEADER_MIDDLE_DCLICK - : wxEVT_COMMAND_HEADER_MIDDLE_CLICK; + evtType = dblclk ? wxEVT_HEADER_MIDDLE_DCLICK + : wxEVT_HEADER_MIDDLE_CLICK; break; default: @@ -554,7 +554,7 @@ bool wxHeaderCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) break; case HDN_DIVIDERDBLCLICK: - evtType = wxEVT_COMMAND_HEADER_SEPARATOR_DCLICK; + evtType = wxEVT_HEADER_SEPARATOR_DCLICK; break; @@ -573,7 +573,7 @@ bool wxHeaderCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) break; } - evtType = wxEVT_COMMAND_HEADER_BEGIN_RESIZE; + evtType = wxEVT_HEADER_BEGIN_RESIZE; // fall through case HDN_ENDTRACKA: @@ -582,7 +582,7 @@ bool wxHeaderCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) if ( evtType == wxEVT_NULL ) { - evtType = wxEVT_COMMAND_HEADER_END_RESIZE; + evtType = wxEVT_HEADER_END_RESIZE; // don't generate events with invalid width const int minWidth = GetColumn(idx).GetMinWidth(); @@ -612,7 +612,7 @@ bool wxHeaderCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) // generate the resizing event from here as we don't seem // to be getting HDN_TRACK events at all, at least with // comctl32.dll v6 - evtType = wxEVT_COMMAND_HEADER_RESIZING; + evtType = wxEVT_HEADER_RESIZING; } } break; @@ -643,7 +643,7 @@ bool wxHeaderCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) break; } - evtType = wxEVT_COMMAND_HEADER_BEGIN_REORDER; + evtType = wxEVT_HEADER_BEGIN_REORDER; break; case HDN_ENDDRAG: @@ -657,14 +657,14 @@ bool wxHeaderCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) order = MSWFromNativeOrder(order); - evtType = wxEVT_COMMAND_HEADER_END_REORDER; + evtType = wxEVT_HEADER_END_REORDER; // We (successfully) ended dragging the column. m_colBeingDragged = -1; break; case NM_RELEASEDCAPTURE: - evtType = wxEVT_COMMAND_HEADER_DRAGGING_CANCELLED; + evtType = wxEVT_HEADER_DRAGGING_CANCELLED; // Dragging the column was cancelled. m_colBeingDragged = -1; @@ -692,7 +692,7 @@ bool wxHeaderCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) // special post-processing for HDN_ENDDRAG: we need to update the // internal column indices array if this is allowed to go ahead as // the native control is going to reorder its columns now - if ( evtType == wxEVT_COMMAND_HEADER_END_REORDER ) + if ( evtType == wxEVT_HEADER_END_REORDER ) MoveColumnInOrderArray(m_colIndices, idx, order); if ( processed ) diff --git a/src/msw/listbox.cpp b/src/msw/listbox.cpp index 9f9720f39a..e8191c5a55 100644 --- a/src/msw/listbox.cpp +++ b/src/msw/listbox.cpp @@ -586,7 +586,7 @@ bool wxListBox::MSWCommand(WXUINT param, WXWORD WXUNUSED(id)) if ( HasMultipleSelection() ) return CalcAndSendEvent(); - evtType = wxEVT_COMMAND_LISTBOX_SELECTED; + evtType = wxEVT_LISTBOX; } else if ( param == LBN_DBLCLK ) { @@ -598,7 +598,7 @@ bool wxListBox::MSWCommand(WXUINT param, WXWORD WXUNUSED(id)) if ( HitTest(ScreenToClient(pt)) == wxNOT_FOUND ) return false; - evtType = wxEVT_COMMAND_LISTBOX_DOUBLECLICKED; + evtType = wxEVT_LISTBOX_DCLICK; } else { diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp index 941506314e..9684bf0e9a 100644 --- a/src/msw/listctrl.cpp +++ b/src/msw/listctrl.cpp @@ -700,7 +700,7 @@ wxTextCtrl* wxListCtrl::GetEditControl() const // first check corresponds to the case when the label editing was started // by user and hence m_textCtrl wasn't created by EditLabel() at all, while // the second case corresponds to us being called from inside EditLabel() - // (e.g. from a user wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT handler): in this + // (e.g. from a user wxEVT_LIST_BEGIN_LABEL_EDIT handler): in this // case EditLabel() did create the control but it didn't have an HWND to // initialize it with yet if ( !m_textCtrl || !m_textCtrl->GetHWND() ) @@ -1482,7 +1482,7 @@ wxTextCtrl* wxListCtrl::EditLabel(long item, wxClassInfo* textControlClass) SetFocus(); // create m_textCtrl here before calling ListView_EditLabel() because it - // generates wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT event from inside it and + // generates wxEVT_LIST_BEGIN_LABEL_EDIT event from inside it and // the user handler for it can call GetEditControl() resulting in an on // demand creation of a stock wxTextCtrl instead of the control of a // (possibly) custom wxClassInfo @@ -1882,7 +1882,7 @@ bool wxListCtrl::MSWShouldPreProcessMessage(WXMSG* msg) // conjunction with modifiers if ( msg->wParam == VK_RETURN && !wxIsAnyModifierDown() ) { - // we need VK_RETURN to generate wxEVT_COMMAND_LIST_ITEM_ACTIVATED + // we need VK_RETURN to generate wxEVT_LIST_ITEM_ACTIVATED return false; } } @@ -1894,7 +1894,7 @@ bool wxListCtrl::MSWCommand(WXUINT cmd, WXWORD id_) const int id = (signed short)id_; if (cmd == EN_UPDATE) { - wxCommandEvent event(wxEVT_COMMAND_TEXT_UPDATED, id); + wxCommandEvent event(wxEVT_TEXT, id); event.SetEventObject( this ); ProcessCommand(event); return true; @@ -2003,7 +2003,7 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) // need to use HDN_ITEMCHANGING instead of it case HDN_BEGINTRACKA: case HDN_BEGINTRACKW: - eventType = wxEVT_COMMAND_LIST_COL_BEGIN_DRAG; + eventType = wxEVT_LIST_COL_BEGIN_DRAG; // fall through case HDN_ITEMCHANGING: @@ -2028,14 +2028,14 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) break; } - eventType = wxEVT_COMMAND_LIST_COL_DRAGGING; + eventType = wxEVT_LIST_COL_DRAGGING; } // fall through case HDN_ENDTRACKA: case HDN_ENDTRACKW: if ( eventType == wxEVT_NULL ) - eventType = wxEVT_COMMAND_LIST_COL_END_DRAG; + eventType = wxEVT_LIST_COL_END_DRAG; event.m_item.m_width = nmHDR->pitem->cxy; event.m_col = nmHDR->iItem; @@ -2048,7 +2048,7 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) { POINT ptClick; - eventType = wxEVT_COMMAND_LIST_COL_RIGHT_CLICK; + eventType = wxEVT_LIST_COL_RIGHT_CLICK; event.m_col = wxMSWGetColumnClicked(nmhdr, &ptClick); event.m_pointDrag.x = ptClick.x; event.m_pointDrag.y = ptClick.y; @@ -2098,13 +2098,13 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) switch ( nmhdr->code ) { case LVN_BEGINRDRAG: - eventType = wxEVT_COMMAND_LIST_BEGIN_RDRAG; + eventType = wxEVT_LIST_BEGIN_RDRAG; // fall through case LVN_BEGINDRAG: if ( eventType == wxEVT_NULL ) { - eventType = wxEVT_COMMAND_LIST_BEGIN_DRAG; + eventType = wxEVT_LIST_BEGIN_DRAG; } event.m_itemIndex = iItem; @@ -2128,7 +2128,7 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) item.Init(((LV_DISPINFOW *)lParam)->item); } - eventType = wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT; + eventType = wxEVT_LIST_BEGIN_LABEL_EDIT; wxConvertFromMSWListItem(GetHwnd(), event.m_item, item); event.m_itemIndex = event.m_item.m_itemId; } @@ -2158,20 +2158,20 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) event.SetEditCanceled(true); } - eventType = wxEVT_COMMAND_LIST_END_LABEL_EDIT; + eventType = wxEVT_LIST_END_LABEL_EDIT; wxConvertFromMSWListItem(NULL, event.m_item, item); event.m_itemIndex = event.m_item.m_itemId; } break; case LVN_COLUMNCLICK: - eventType = wxEVT_COMMAND_LIST_COL_CLICK; + eventType = wxEVT_LIST_COL_CLICK; event.m_itemIndex = -1; event.m_col = nmLV->iSubItem; break; case LVN_DELETEALLITEMS: - eventType = wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS; + eventType = wxEVT_LIST_DELETE_ALL_ITEMS; event.m_itemIndex = -1; break; @@ -2183,13 +2183,13 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) return false; } - eventType = wxEVT_COMMAND_LIST_DELETE_ITEM; + eventType = wxEVT_LIST_DELETE_ITEM; event.m_itemIndex = iItem; break; case LVN_INSERTITEM: - eventType = wxEVT_COMMAND_LIST_INSERT_ITEM; + eventType = wxEVT_LIST_INSERT_ITEM; event.m_itemIndex = iItem; break; @@ -2215,7 +2215,7 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) // has the focus changed? if ( !(stOld & LVIS_FOCUSED) && (stNew & LVIS_FOCUSED) ) { - eventType = wxEVT_COMMAND_LIST_ITEM_FOCUSED; + eventType = wxEVT_LIST_ITEM_FOCUSED; event.m_itemIndex = iItem; } @@ -2237,8 +2237,8 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) } eventType = stNew & LVIS_SELECTED - ? wxEVT_COMMAND_LIST_ITEM_SELECTED - : wxEVT_COMMAND_LIST_ITEM_DESELECTED; + ? wxEVT_LIST_ITEM_SELECTED + : wxEVT_LIST_ITEM_DESELECTED; } } @@ -2267,11 +2267,11 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) (wVKey == VK_RETURN || wVKey == VK_SPACE) && !wxIsAnyModifierDown() ) { - eventType = wxEVT_COMMAND_LIST_ITEM_ACTIVATED; + eventType = wxEVT_LIST_ITEM_ACTIVATED; } else { - eventType = wxEVT_COMMAND_LIST_KEY_DOWN; + eventType = wxEVT_LIST_KEY_DOWN; event.m_code = wxMSWKeyboard::VKToWX(wVKey); @@ -2304,7 +2304,7 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) return true; } - // else translate it into wxEVT_COMMAND_LIST_ITEM_ACTIVATED event + // else translate it into wxEVT_LIST_ITEM_ACTIVATED event // if it happened on an item (and not on empty place) if ( iItem == -1 ) { @@ -2312,7 +2312,7 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) return false; } - eventType = wxEVT_COMMAND_LIST_ITEM_ACTIVATED; + eventType = wxEVT_LIST_ITEM_ACTIVATED; event.m_itemIndex = iItem; event.m_item.m_text = GetItemText(iItem); event.m_item.m_data = GetItemData(iItem); @@ -2329,7 +2329,7 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) return true; } - // else translate it into wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK event + // else translate it into wxEVT_LIST_ITEM_RIGHT_CLICK event LV_HITTESTINFO lvhti; wxZeroMemory(lvhti); @@ -2349,7 +2349,7 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) { if ( lvhti.flags & LVHT_ONITEM ) { - eventType = wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK; + eventType = wxEVT_LIST_ITEM_RIGHT_CLICK; event.m_itemIndex = lvhti.iItem; event.m_pointDrag.x = lvhti.pt.x; event.m_pointDrag.y = lvhti.pt.y; @@ -2368,7 +2368,7 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) { const NM_CACHEHINT *cacheHint = (NM_CACHEHINT *)lParam; - eventType = wxEVT_COMMAND_LIST_CACHE_HINT; + eventType = wxEVT_LIST_CACHE_HINT; // we get some really stupid cache hints like ones for // items in range 0..0 for an empty control or, after @@ -3050,7 +3050,7 @@ wxListCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) // because this message is propagated upwards the child-parent // chain, we get it for the right clicks on the header window but // this is confusing in wx as right clicking there already - // generates a separate wxEVT_COMMAND_LIST_COL_RIGHT_CLICK event + // generates a separate wxEVT_LIST_COL_RIGHT_CLICK event // so just ignore them if ( (HWND)wParam == ListView_GetHeader(GetHwnd()) ) return 0; diff --git a/src/msw/mdi.cpp b/src/msw/mdi.cpp index e6ea206fac..db1997bdd6 100644 --- a/src/msw/mdi.cpp +++ b/src/msw/mdi.cpp @@ -699,7 +699,7 @@ bool wxMDIParentFrame::TryBefore(wxEvent& event) { // menu (and toolbar) events should be sent to the active child frame // first, if any - if ( event.GetEventType() == wxEVT_COMMAND_MENU_SELECTED ) + if ( event.GetEventType() == wxEVT_MENU ) { wxMDIChildFrame * const child = GetActiveChild(); if ( child && child->ProcessWindowEventLocally(event) ) diff --git a/src/msw/notebook.cpp b/src/msw/notebook.cpp index d51c996daf..6b171c7a74 100644 --- a/src/msw/notebook.cpp +++ b/src/msw/notebook.cpp @@ -1325,11 +1325,11 @@ bool wxNotebook::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM* result) NMHDR* hdr = (NMHDR *)lParam; switch ( hdr->code ) { case TCN_SELCHANGE: - event.SetEventType(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED); + event.SetEventType(wxEVT_NOTEBOOK_PAGE_CHANGED); break; case TCN_SELCHANGING: - event.SetEventType(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING); + event.SetEventType(wxEVT_NOTEBOOK_PAGE_CHANGING); break; default: diff --git a/src/msw/radiobox.cpp b/src/msw/radiobox.cpp index e7dd3514a6..70665bdf84 100644 --- a/src/msw/radiobox.cpp +++ b/src/msw/radiobox.cpp @@ -81,7 +81,7 @@ wxEND_FLAGS( wxRadioBoxStyle ) IMPLEMENT_DYNAMIC_CLASS_XTI(wxRadioBox, wxControl,"wx/radiobox.h") wxBEGIN_PROPERTIES_TABLE(wxRadioBox) - wxEVENT_PROPERTY( Select , wxEVT_COMMAND_RADIOBOX_SELECTED , wxCommandEvent ) + wxEVENT_PROPERTY( Select , wxEVT_RADIOBOX , wxCommandEvent ) wxPROPERTY_FLAGS( WindowStyle , wxRadioBoxStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style wxEND_PROPERTIES_TABLE() @@ -377,7 +377,7 @@ void wxRadioBox::Command(wxCommandEvent & event) void wxRadioBox::SendNotificationEvent() { - wxCommandEvent event(wxEVT_COMMAND_RADIOBOX_SELECTED, m_windowId); + wxCommandEvent event(wxEVT_RADIOBOX, m_windowId); event.SetInt( m_selectedButton ); event.SetString(GetString(m_selectedButton)); event.SetEventObject( this ); diff --git a/src/msw/radiobut.cpp b/src/msw/radiobut.cpp index 6c8ed13480..0e0fb5b0d5 100644 --- a/src/msw/radiobut.cpp +++ b/src/msw/radiobut.cpp @@ -217,7 +217,7 @@ bool wxRadioButton::MSWCommand(WXUINT param, WXWORD WXUNUSED(id)) // and not BS_AUTORADIOBUTTON SetValue(true); - wxCommandEvent event(wxEVT_COMMAND_RADIOBUTTON_SELECTED, GetId()); + wxCommandEvent event(wxEVT_RADIOBUTTON, GetId()); event.SetEventObject( this ); event.SetInt(true); // always checked diff --git a/src/msw/slider.cpp b/src/msw/slider.cpp index 1b87047ed2..8b905b1fa5 100644 --- a/src/msw/slider.cpp +++ b/src/msw/slider.cpp @@ -310,7 +310,7 @@ bool wxSlider::MSWOnScroll(int WXUNUSED(orientation), event.SetEventObject( this ); HandleWindowEvent(event); - wxCommandEvent cevent( wxEVT_COMMAND_SLIDER_UPDATED, GetId() ); + wxCommandEvent cevent( wxEVT_SLIDER, GetId() ); cevent.SetInt( newPos ); cevent.SetEventObject( this ); diff --git a/src/msw/spinctrl.cpp b/src/msw/spinctrl.cpp index a034cda2ee..038d298624 100644 --- a/src/msw/spinctrl.cpp +++ b/src/msw/spinctrl.cpp @@ -179,7 +179,7 @@ bool wxSpinCtrl::ProcessTextCommand(WXWORD cmd, WXWORD WXUNUSED(id)) { if ( (cmd == EN_CHANGE) && (!m_blockEvent )) { - wxCommandEvent event(wxEVT_COMMAND_TEXT_UPDATED, GetId()); + wxCommandEvent event(wxEVT_TEXT, GetId()); event.SetEventObject(this); wxString val = wxGetWindowText(m_hwndBuddy); event.SetString(val); @@ -197,7 +197,7 @@ void wxSpinCtrl::OnChar(wxKeyEvent& event) { case WXK_RETURN: { - wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId); + wxCommandEvent event(wxEVT_TEXT_ENTER, m_windowId); InitCommandEvent(event); wxString val = wxGetWindowText(m_hwndBuddy); event.SetString(val); @@ -669,7 +669,7 @@ void wxSpinCtrl::DoSetToolTip(wxToolTip *tip) void wxSpinCtrl::SendSpinUpdate(int value) { - wxCommandEvent event(wxEVT_COMMAND_SPINCTRL_UPDATED, GetId()); + wxCommandEvent event(wxEVT_SPINCTRL, GetId()); event.SetEventObject(this); event.SetInt(value); diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index 930b37cd6d..36cd9dee90 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -1863,7 +1863,7 @@ void wxTextCtrl::OnChar(wxKeyEvent& event) { case WXK_RETURN: { - wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId); + wxCommandEvent event(wxEVT_TEXT_ENTER, m_windowId); InitCommandEvent(event); event.SetString(GetValue()); if ( HandleWindowEvent(event) ) @@ -2066,7 +2066,7 @@ bool wxTextCtrl::MSWCommand(WXUINT param, WXWORD WXUNUSED(id)) // the text size limit has been hit -- try to increase it if ( !AdjustSpaceLimit() ) { - wxCommandEvent event(wxEVT_COMMAND_TEXT_MAXLEN, m_windowId); + wxCommandEvent event(wxEVT_TEXT_MAXLEN, m_windowId); InitCommandEvent(event); event.SetString(GetValue()); ProcessCommand(event); diff --git a/src/msw/textentry.cpp b/src/msw/textentry.cpp index a91e8f33ca..a8a12a5c7f 100644 --- a/src/msw/textentry.cpp +++ b/src/msw/textentry.cpp @@ -492,7 +492,7 @@ public: // wxEVT_CHAR handler (as we must also let the other handlers // defined at wx level run first). // - // Notice that we can't use wxEVT_COMMAND_TEXT_UPDATED here + // Notice that we can't use wxEVT_TEXT here // neither as, due to our use of ACO_AUTOAPPEND, we get // EN_CHANGE notifications from the control every time // IAutoComplete auto-appends something to it. diff --git a/src/msw/tglbtn.cpp b/src/msw/tglbtn.cpp index e4effb9ff0..9fba62178c 100644 --- a/src/msw/tglbtn.cpp +++ b/src/msw/tglbtn.cpp @@ -45,7 +45,7 @@ // macros // ---------------------------------------------------------------------------- -wxDEFINE_EVENT( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEvent ); +wxDEFINE_EVENT( wxEVT_TOGGLEBUTTON, wxCommandEvent ); // ============================================================================ // implementation @@ -179,7 +179,7 @@ bool wxToggleButton::MSWCommand(WXUINT param, WXWORD WXUNUSED(id)) // auto checkboxes so do it ourselves in any case m_state = !m_state; - wxCommandEvent event(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, m_windowId); + wxCommandEvent event(wxEVT_TOGGLEBUTTON, m_windowId); event.SetInt(GetValue()); event.SetEventObject(this); ProcessCommand(event); diff --git a/src/msw/toolbar.cpp b/src/msw/toolbar.cpp index 8052cec705..1011c5d3e2 100644 --- a/src/msw/toolbar.cpp +++ b/src/msw/toolbar.cpp @@ -1391,7 +1391,7 @@ bool wxToolBar::MSWOnNotify(int WXUNUSED(idCtrl), { LPNMTOOLBAR tbhdr = (LPNMTOOLBAR)lParam; - wxCommandEvent evt(wxEVT_COMMAND_TOOL_DROPDOWN_CLICKED, tbhdr->iItem); + wxCommandEvent evt(wxEVT_TOOL_DROPDOWN, tbhdr->iItem); if ( HandleWindowEvent(evt) ) { // Event got handled, don't display default popup menu diff --git a/src/msw/treectrl.cpp b/src/msw/treectrl.cpp index 0ac6f626c0..2fbf27353f 100644 --- a/src/msw/treectrl.cpp +++ b/src/msw/treectrl.cpp @@ -666,8 +666,8 @@ static /* const */ wxEventType gs_expandEvents[IDX_WHAT_MAX][IDX_HOW_MAX]; but logically it's a const table with the following entries: = { - { wxEVT_COMMAND_TREE_ITEM_COLLAPSED, wxEVT_COMMAND_TREE_ITEM_COLLAPSING }, - { wxEVT_COMMAND_TREE_ITEM_EXPANDED, wxEVT_COMMAND_TREE_ITEM_EXPANDING } + { wxEVT_TREE_ITEM_COLLAPSED, wxEVT_TREE_ITEM_COLLAPSING }, + { wxEVT_TREE_ITEM_EXPANDED, wxEVT_TREE_ITEM_EXPANDING } }; */ @@ -726,10 +726,10 @@ void wxTreeCtrl::Init() // initialize the global array of events now as it can't be done statically // with the wxEVT_XXX values being allocated during run-time only - gs_expandEvents[IDX_COLLAPSE][IDX_DONE] = wxEVT_COMMAND_TREE_ITEM_COLLAPSED; - gs_expandEvents[IDX_COLLAPSE][IDX_DOING] = wxEVT_COMMAND_TREE_ITEM_COLLAPSING; - gs_expandEvents[IDX_EXPAND][IDX_DONE] = wxEVT_COMMAND_TREE_ITEM_EXPANDED; - gs_expandEvents[IDX_EXPAND][IDX_DOING] = wxEVT_COMMAND_TREE_ITEM_EXPANDING; + gs_expandEvents[IDX_COLLAPSE][IDX_DONE] = wxEVT_TREE_ITEM_COLLAPSED; + gs_expandEvents[IDX_COLLAPSE][IDX_DOING] = wxEVT_TREE_ITEM_COLLAPSING; + gs_expandEvents[IDX_EXPAND][IDX_DONE] = wxEVT_TREE_ITEM_EXPANDED; + gs_expandEvents[IDX_EXPAND][IDX_DOING] = wxEVT_TREE_ITEM_EXPANDING; } bool wxTreeCtrl::Create(wxWindow *parent, @@ -1642,11 +1642,11 @@ void wxTreeCtrl::Delete(const wxTreeItemId& item) if ( next.IsOk() ) { - wxTreeEvent changingEvent(wxEVT_COMMAND_TREE_SEL_CHANGING, this, next); + wxTreeEvent changingEvent(wxEVT_TREE_SEL_CHANGING, this, next); if ( IsTreeEventAllowed(changingEvent) ) { - wxTreeEvent changedEvent(wxEVT_COMMAND_TREE_SEL_CHANGED, this, next); + wxTreeEvent changedEvent(wxEVT_TREE_SEL_CHANGED, this, next); (void)HandleTreeEvent(changedEvent); } else @@ -1739,7 +1739,7 @@ void wxTreeCtrl::DoExpand(const wxTreeItemId& item, int flag) if ( IsExpanded(item) ) { - wxTreeEvent event(wxEVT_COMMAND_TREE_ITEM_COLLAPSING, + wxTreeEvent event(wxEVT_TREE_ITEM_COLLAPSING, this, wxTreeItemId(item)); if ( !IsTreeEventAllowed(event) ) @@ -1751,7 +1751,7 @@ void wxTreeCtrl::DoExpand(const wxTreeItemId& item, int flag) if ( IsExpanded(item) ) return; - wxTreeEvent event(wxEVT_COMMAND_TREE_ITEM_COLLAPSED, this, item); + wxTreeEvent event(wxEVT_TREE_ITEM_COLLAPSED, this, item); (void)HandleTreeEvent(event); } //else: change didn't took place, so do nothing at all @@ -1792,7 +1792,7 @@ void wxTreeCtrl::Unselect() if ( HasFlag(wxTR_MULTIPLE) ) { - wxTreeEvent changingEvent(wxEVT_COMMAND_TREE_SEL_CHANGING, + wxTreeEvent changingEvent(wxEVT_TREE_SEL_CHANGING, this, wxTreeItemId()); changingEvent.m_itemOld = htFocus; @@ -1800,7 +1800,7 @@ void wxTreeCtrl::Unselect() { ClearFocusedItem(); - wxTreeEvent changedEvent(wxEVT_COMMAND_TREE_SEL_CHANGED, + wxTreeEvent changedEvent(wxEVT_TREE_SEL_CHANGED, this, wxTreeItemId()); changedEvent.m_itemOld = htFocus; (void)HandleTreeEvent(changedEvent); @@ -1832,14 +1832,14 @@ void wxTreeCtrl::UnselectAll() HTREEITEM htFocus = (HTREEITEM)TreeView_GetSelection(GetHwnd()); if ( !htFocus ) return; - wxTreeEvent changingEvent(wxEVT_COMMAND_TREE_SEL_CHANGING, this); + wxTreeEvent changingEvent(wxEVT_TREE_SEL_CHANGING, this); changingEvent.m_itemOld = htFocus; if ( IsTreeEventAllowed(changingEvent) ) { DoUnselectAll(); - wxTreeEvent changedEvent(wxEVT_COMMAND_TREE_SEL_CHANGED, this); + wxTreeEvent changedEvent(wxEVT_TREE_SEL_CHANGED, this); changedEvent.m_itemOld = htFocus; (void)HandleTreeEvent(changedEvent); } @@ -1870,14 +1870,14 @@ void wxTreeCtrl::SelectChildren(const wxTreeItemId& parent) HTREEITEM htFocus = (HTREEITEM)TreeView_GetSelection(GetHwnd()); - wxTreeEvent changingEvent(wxEVT_COMMAND_TREE_SEL_CHANGING, this); + wxTreeEvent changingEvent(wxEVT_TREE_SEL_CHANGING, this); changingEvent.m_itemOld = htFocus; if ( IsTreeEventAllowed(changingEvent) ) { DoSelectChildren(parent); - wxTreeEvent changedEvent(wxEVT_COMMAND_TREE_SEL_CHANGED, this); + wxTreeEvent changedEvent(wxEVT_TREE_SEL_CHANGED, this); changedEvent.m_itemOld = htFocus; (void)HandleTreeEvent(changedEvent); } @@ -1902,7 +1902,7 @@ void wxTreeCtrl::SelectItem(const wxTreeItemId& item, bool select) if ( HasFlag(wxTR_MULTIPLE) ) { - wxTreeEvent changingEvent(wxEVT_COMMAND_TREE_SEL_CHANGING, this, item); + wxTreeEvent changingEvent(wxEVT_TREE_SEL_CHANGING, this, item); if ( IsTreeEventAllowed(changingEvent) ) { @@ -1914,7 +1914,7 @@ void wxTreeCtrl::SelectItem(const wxTreeItemId& item, bool select) SetFocusedItem(item); } - wxTreeEvent changedEvent(wxEVT_COMMAND_TREE_SEL_CHANGED, + wxTreeEvent changedEvent(wxEVT_TREE_SEL_CHANGED, this, item); (void)HandleTreeEvent(changedEvent); } @@ -1938,7 +1938,7 @@ void wxTreeCtrl::SelectItem(const wxTreeItemId& item, bool select) // not so send the events ourselves and ignore those generated by // TreeView_SelectItem() if m_changingSelection is set. wxTreeEvent - changingEvent(wxEVT_COMMAND_TREE_SEL_CHANGING, this, itemNew); + changingEvent(wxEVT_TREE_SEL_CHANGING, this, itemNew); changingEvent.SetOldItem(itemOld); if ( IsTreeEventAllowed(changingEvent) ) @@ -1953,7 +1953,7 @@ void wxTreeCtrl::SelectItem(const wxTreeItemId& item, bool select) { ::SetFocus(GetHwnd(), HITEM(item)); - wxTreeEvent changedEvent(wxEVT_COMMAND_TREE_SEL_CHANGED, + wxTreeEvent changedEvent(wxEVT_TREE_SEL_CHANGED, this, itemNew); changedEvent.SetOldItem(itemOld); (void)HandleTreeEvent(changedEvent); @@ -2193,7 +2193,7 @@ bool wxTreeCtrl::MSWShouldPreProcessMessage(WXMSG* msg) // conjunction with modifiers if ( (msg->wParam == VK_RETURN) && !wxIsAnyModifierDown() ) { - // we need VK_RETURN to generate wxEVT_COMMAND_TREE_ITEM_ACTIVATED + // we need VK_RETURN to generate wxEVT_TREE_ITEM_ACTIVATED return false; } } @@ -2207,7 +2207,7 @@ bool wxTreeCtrl::MSWCommand(WXUINT cmd, WXWORD id_) if ( cmd == EN_UPDATE ) { - wxCommandEvent event(wxEVT_COMMAND_TEXT_UPDATED, id); + wxCommandEvent event(wxEVT_TEXT, id); event.SetEventObject( this ); ProcessCommand(event); } @@ -2251,7 +2251,7 @@ bool wxTreeCtrl::MSWHandleSelectionKey(unsigned vkey) if ( vkey != VK_RETURN && bCtrl ) { - wxTreeEvent changingEvent(wxEVT_COMMAND_TREE_SEL_CHANGING, + wxTreeEvent changingEvent(wxEVT_TREE_SEL_CHANGING, this, htSel); changingEvent.m_itemOld = htSel; @@ -2259,7 +2259,7 @@ bool wxTreeCtrl::MSWHandleSelectionKey(unsigned vkey) { DoToggleItemSelection(wxTreeItemId(htSel)); - wxTreeEvent changedEvent(wxEVT_COMMAND_TREE_SEL_CHANGED, + wxTreeEvent changedEvent(wxEVT_TREE_SEL_CHANGED, this, htSel); changedEvent.m_itemOld = htSel; (void)HandleTreeEvent(changedEvent); @@ -2272,7 +2272,7 @@ bool wxTreeCtrl::MSWHandleSelectionKey(unsigned vkey) if ( count != 1 || HITEM(selections[0]) != htSel ) { - wxTreeEvent changingEvent(wxEVT_COMMAND_TREE_SEL_CHANGING, + wxTreeEvent changingEvent(wxEVT_TREE_SEL_CHANGING, this, htSel); changingEvent.m_itemOld = htSel; @@ -2281,7 +2281,7 @@ bool wxTreeCtrl::MSWHandleSelectionKey(unsigned vkey) DoUnselectAll(); DoSelectItem(wxTreeItemId(htSel)); - wxTreeEvent changedEvent(wxEVT_COMMAND_TREE_SEL_CHANGED, + wxTreeEvent changedEvent(wxEVT_TREE_SEL_CHANGED, this, htSel); changedEvent.m_itemOld = htSel; (void)HandleTreeEvent(changedEvent); @@ -2316,7 +2316,7 @@ bool wxTreeCtrl::MSWHandleSelectionKey(unsigned vkey) break; } - wxTreeEvent changingEvent(wxEVT_COMMAND_TREE_SEL_CHANGING, + wxTreeEvent changingEvent(wxEVT_TREE_SEL_CHANGING, this, next); changingEvent.m_itemOld = htSel; @@ -2326,7 +2326,7 @@ bool wxTreeCtrl::MSWHandleSelectionKey(unsigned vkey) DoSelectItem(next); SetFocusedItem(next); - wxTreeEvent changedEvent(wxEVT_COMMAND_TREE_SEL_CHANGED, + wxTreeEvent changedEvent(wxEVT_TREE_SEL_CHANGED, this, next); changedEvent.m_itemOld = htSel; (void)HandleTreeEvent(changedEvent); @@ -2351,7 +2351,7 @@ bool wxTreeCtrl::MSWHandleSelectionKey(unsigned vkey) if ( bShift && SelectRange(GetHwnd(), HITEM(m_htSelStart), HITEM(next), SR_UNSELECT_OTHERS | SR_SIMULATE) ) { - wxTreeEvent changingEvent(wxEVT_COMMAND_TREE_SEL_CHANGING, this, next); + wxTreeEvent changingEvent(wxEVT_TREE_SEL_CHANGING, this, next); changingEvent.m_itemOld = htSel; if ( IsTreeEventAllowed(changingEvent) ) @@ -2359,7 +2359,7 @@ bool wxTreeCtrl::MSWHandleSelectionKey(unsigned vkey) SelectRange(GetHwnd(), HITEM(m_htSelStart), HITEM(next), SR_UNSELECT_OTHERS); - wxTreeEvent changedEvent(wxEVT_COMMAND_TREE_SEL_CHANGED, this, next); + wxTreeEvent changedEvent(wxEVT_TREE_SEL_CHANGED, this, next); changedEvent.m_itemOld = htSel; (void)HandleTreeEvent(changedEvent); } @@ -2380,7 +2380,7 @@ bool wxTreeCtrl::MSWHandleSelectionKey(unsigned vkey) if ( next.IsOk() && !IsHiddenRoot(next) ) { - wxTreeEvent changingEvent(wxEVT_COMMAND_TREE_SEL_CHANGING, + wxTreeEvent changingEvent(wxEVT_TREE_SEL_CHANGING, this, next); changingEvent.m_itemOld = htSel; @@ -2390,7 +2390,7 @@ bool wxTreeCtrl::MSWHandleSelectionKey(unsigned vkey) DoSelectItem(next); SetFocusedItem(next); - wxTreeEvent changedEvent(wxEVT_COMMAND_TREE_SEL_CHANGED, + wxTreeEvent changedEvent(wxEVT_TREE_SEL_CHANGED, this, next); changedEvent.m_itemOld = htSel; (void)HandleTreeEvent(changedEvent); @@ -2416,7 +2416,7 @@ bool wxTreeCtrl::MSWHandleSelectionKey(unsigned vkey) { wxTreeItemId next = TreeView_GetChild(GetHwnd(), htSel); - wxTreeEvent changingEvent(wxEVT_COMMAND_TREE_SEL_CHANGING, this, next); + wxTreeEvent changingEvent(wxEVT_TREE_SEL_CHANGING, this, next); changingEvent.m_itemOld = htSel; if ( IsTreeEventAllowed(changingEvent) ) @@ -2425,7 +2425,7 @@ bool wxTreeCtrl::MSWHandleSelectionKey(unsigned vkey) DoSelectItem(next); SetFocusedItem(next); - wxTreeEvent changedEvent(wxEVT_COMMAND_TREE_SEL_CHANGED, this, next); + wxTreeEvent changedEvent(wxEVT_TREE_SEL_CHANGED, this, next); changedEvent.m_itemOld = htSel; (void)HandleTreeEvent(changedEvent); } @@ -2473,7 +2473,7 @@ bool wxTreeCtrl::MSWHandleSelectionKey(unsigned vkey) HITEM(m_htSelStart), HITEM(next), SR_UNSELECT_OTHERS | SR_SIMULATE) ) { - wxTreeEvent changingEvent(wxEVT_COMMAND_TREE_SEL_CHANGING, + wxTreeEvent changingEvent(wxEVT_TREE_SEL_CHANGING, this, next); changingEvent.m_itemOld = htSel; @@ -2484,7 +2484,7 @@ bool wxTreeCtrl::MSWHandleSelectionKey(unsigned vkey) SR_UNSELECT_OTHERS); SetFocusedItem(next); - wxTreeEvent changedEvent(wxEVT_COMMAND_TREE_SEL_CHANGED, + wxTreeEvent changedEvent(wxEVT_TREE_SEL_CHANGED, this, next); changedEvent.m_itemOld = htSel; (void)HandleTreeEvent(changedEvent); @@ -2493,7 +2493,7 @@ bool wxTreeCtrl::MSWHandleSelectionKey(unsigned vkey) } else // no Shift { - wxTreeEvent changingEvent(wxEVT_COMMAND_TREE_SEL_CHANGING, + wxTreeEvent changingEvent(wxEVT_TREE_SEL_CHANGING, this, next); changingEvent.m_itemOld = htSel; @@ -2503,7 +2503,7 @@ bool wxTreeCtrl::MSWHandleSelectionKey(unsigned vkey) DoSelectItem(next); SetFocusedItem(next); - wxTreeEvent changedEvent(wxEVT_COMMAND_TREE_SEL_CHANGED, + wxTreeEvent changedEvent(wxEVT_TREE_SEL_CHANGED, this, next); changedEvent.m_itemOld = htSel; (void)HandleTreeEvent(changedEvent); @@ -2595,7 +2595,7 @@ bool wxTreeCtrl::MSWHandleSelectionKey(unsigned vkey) next = nextTemp; } - wxTreeEvent changingEvent(wxEVT_COMMAND_TREE_SEL_CHANGING, + wxTreeEvent changingEvent(wxEVT_TREE_SEL_CHANGING, this, next); changingEvent.m_itemOld = htSel; @@ -2606,7 +2606,7 @@ bool wxTreeCtrl::MSWHandleSelectionKey(unsigned vkey) DoSelectItem(next); SetFocusedItem(next); - wxTreeEvent changedEvent(wxEVT_COMMAND_TREE_SEL_CHANGED, + wxTreeEvent changedEvent(wxEVT_TREE_SEL_CHANGED, this, next); changedEvent.m_itemOld = htSel; (void)HandleTreeEvent(changedEvent); @@ -2623,7 +2623,7 @@ bool wxTreeCtrl::MSWHandleSelectionKey(unsigned vkey) bool wxTreeCtrl::MSWHandleTreeKeyDownEvent(WXWPARAM wParam, WXLPARAM lParam) { - wxTreeEvent keyEvent(wxEVT_COMMAND_TREE_KEY_DOWN, this); + wxTreeEvent keyEvent(wxEVT_TREE_KEY_DOWN, this); keyEvent.m_evtKey = CreateKeyEvent(wxEVT_KEY_DOWN, wParam, lParam); bool processed = HandleTreeEvent(keyEvent); @@ -2635,7 +2635,7 @@ bool wxTreeCtrl::MSWHandleTreeKeyDownEvent(WXWPARAM wParam, WXLPARAM lParam) const HTREEITEM htSel = (HTREEITEM)TreeView_GetSelection(GetHwnd()); if ( htSel ) { - wxTreeEvent activatedEvent(wxEVT_COMMAND_TREE_ITEM_ACTIVATED, + wxTreeEvent activatedEvent(wxEVT_TREE_ITEM_ACTIVATED, this, htSel); (void)HandleTreeEvent(activatedEvent); } @@ -2698,7 +2698,7 @@ wxTreeCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) // create the event if ( item.IsOk() ) { - wxTreeEvent event(wxEVT_COMMAND_TREE_ITEM_MENU, this, item); + wxTreeEvent event(wxEVT_TREE_ITEM_MENU, this, item); event.m_pointDrag = pt; @@ -2771,7 +2771,7 @@ wxTreeCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) break; } - wxTreeEvent changingEvent(wxEVT_COMMAND_TREE_SEL_CHANGING, + wxTreeEvent changingEvent(wxEVT_TREE_SEL_CHANGING, this, htItem); changingEvent.m_itemOld = htOldItem; @@ -2785,7 +2785,7 @@ wxTreeCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) // reset on any click without Shift m_htSelStart.Unset(); - wxTreeEvent changedEvent(wxEVT_COMMAND_TREE_SEL_CHANGED, + wxTreeEvent changedEvent(wxEVT_TREE_SEL_CHANGED, this, htItem); changedEvent.m_itemOld = htOldItem; (void)HandleTreeEvent(changedEvent); @@ -2820,7 +2820,7 @@ wxTreeCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) if ( willChange ) { - wxTreeEvent changingEvent(wxEVT_COMMAND_TREE_SEL_CHANGING, + wxTreeEvent changingEvent(wxEVT_TREE_SEL_CHANGING, this, htItem); changingEvent.m_itemOld = htOldItem; @@ -2840,7 +2840,7 @@ wxTreeCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) SetFocusedItem(wxTreeItemId(htItem)); - wxTreeEvent changedEvent(wxEVT_COMMAND_TREE_SEL_CHANGED, + wxTreeEvent changedEvent(wxEVT_TREE_SEL_CHANGED, this, htItem); changedEvent.m_itemOld = htOldItem; (void)HandleTreeEvent(changedEvent); @@ -2871,7 +2871,7 @@ wxTreeCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) // multiple drag and drop to work. if ( !IsItemSelected(GetHwnd(), htItem)) { - wxTreeEvent changingEvent(wxEVT_COMMAND_TREE_SEL_CHANGING, + wxTreeEvent changingEvent(wxEVT_TREE_SEL_CHANGING, this, htItem); changingEvent.m_itemOld = htOldItem; @@ -2881,7 +2881,7 @@ wxTreeCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) DoSelectItem(wxTreeItemId(htItem)); SetFocusedItem(wxTreeItemId(htItem)); - wxTreeEvent changedEvent(wxEVT_COMMAND_TREE_SEL_CHANGED, + wxTreeEvent changedEvent(wxEVT_TREE_SEL_CHANGED, this, htItem); changedEvent.m_itemOld = htOldItem; (void)HandleTreeEvent(changedEvent); @@ -2950,7 +2950,7 @@ wxTreeCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) // confusing, so override this default behaviour if ( !IsItemSelected(GetHwnd(), htItem) ) { - wxTreeEvent changingEvent(wxEVT_COMMAND_TREE_SEL_CHANGING, + wxTreeEvent changingEvent(wxEVT_TREE_SEL_CHANGING, this, htItem); changingEvent.m_itemOld = htOldItem; @@ -2960,7 +2960,7 @@ wxTreeCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) DoSelectItem(wxTreeItemId(htItem)); SetFocusedItem(wxTreeItemId(htItem)); - wxTreeEvent changedEvent(wxEVT_COMMAND_TREE_SEL_CHANGED, + wxTreeEvent changedEvent(wxEVT_TREE_SEL_CHANGED, this, htItem); changedEvent.m_itemOld = htOldItem; (void)HandleTreeEvent(changedEvent); @@ -3044,7 +3044,7 @@ wxTreeCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) { m_mouseUpDeselect = false; - wxTreeEvent changingEvent(wxEVT_COMMAND_TREE_SEL_CHANGING, + wxTreeEvent changingEvent(wxEVT_TREE_SEL_CHANGING, this, htItem); changingEvent.m_itemOld = htOldItem; @@ -3054,7 +3054,7 @@ wxTreeCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) DoSelectItem(wxTreeItemId(htItem)); SetFocusedItem(wxTreeItemId(htItem)); - wxTreeEvent changedEvent(wxEVT_COMMAND_TREE_SEL_CHANGED, + wxTreeEvent changedEvent(wxEVT_TREE_SEL_CHANGED, this, htItem); changedEvent.m_itemOld = htOldItem; (void)HandleTreeEvent(changedEvent); @@ -3068,7 +3068,7 @@ wxTreeCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) { if ( tvht.flags & TVHT_ONITEMSTATEICON ) { - wxTreeEvent event(wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK, + wxTreeEvent event(wxEVT_TREE_STATE_IMAGE_CLICK, this, htItem); (void)HandleTreeEvent(event); @@ -3093,7 +3093,7 @@ wxTreeCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) wxDELETE(m_dragImage); // generate the drag end event - wxTreeEvent event(wxEVT_COMMAND_TREE_END_DRAG, + wxTreeEvent event(wxEVT_TREE_END_DRAG, this, htItem); event.m_pointDrag = wxPoint(x, y); (void)HandleTreeEvent(event); @@ -3253,13 +3253,13 @@ bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) switch ( hdr->code ) { case TVN_BEGINDRAG: - eventType = wxEVT_COMMAND_TREE_BEGIN_DRAG; + eventType = wxEVT_TREE_BEGIN_DRAG; // fall through case TVN_BEGINRDRAG: { if ( eventType == wxEVT_NULL ) - eventType = wxEVT_COMMAND_TREE_BEGIN_RDRAG; + eventType = wxEVT_TREE_BEGIN_RDRAG; //else: left drag, already set above NM_TREEVIEW *tv = (NM_TREEVIEW *)lParam; @@ -3276,7 +3276,7 @@ bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) case TVN_BEGINLABELEDIT: { - eventType = wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT; + eventType = wxEVT_TREE_BEGIN_LABEL_EDIT; TV_DISPINFO *info = (TV_DISPINFO *)lParam; // although the user event handler may still veto it, it is @@ -3291,7 +3291,7 @@ bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) case TVN_DELETEITEM: { - eventType = wxEVT_COMMAND_TREE_DELETE_ITEM; + eventType = wxEVT_TREE_DELETE_ITEM; NM_TREEVIEW *tv = (NM_TREEVIEW *)lParam; event.m_item = tv->itemOld.hItem; @@ -3310,7 +3310,7 @@ bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) case TVN_ENDLABELEDIT: { - eventType = wxEVT_COMMAND_TREE_END_LABEL_EDIT; + eventType = wxEVT_TREE_END_LABEL_EDIT; TV_DISPINFO *info = (TV_DISPINFO *)lParam; event.m_item = info->item.hItem; @@ -3334,7 +3334,7 @@ bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) #ifdef TVN_GETINFOTIP case TVN_GETINFOTIP: { - eventType = wxEVT_COMMAND_TREE_ITEM_GETTOOLTIP; + eventType = wxEVT_TREE_ITEM_GETTOOLTIP; NMTVGETINFOTIP *info = (NMTVGETINFOTIP*)lParam; // Which item are we trying to get a tooltip for? @@ -3346,13 +3346,13 @@ bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) #endif // !__WXWINCE__ case TVN_GETDISPINFO: - eventType = wxEVT_COMMAND_TREE_GET_INFO; + eventType = wxEVT_TREE_GET_INFO; // fall through case TVN_SETDISPINFO: { if ( eventType == wxEVT_NULL ) - eventType = wxEVT_COMMAND_TREE_SET_INFO; + eventType = wxEVT_TREE_SET_INFO; //else: get, already set above TV_DISPINFO *info = (TV_DISPINFO *)lParam; @@ -3440,7 +3440,7 @@ bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) case TVN_SELCHANGEDW: if ( !m_changingSelection ) { - eventType = wxEVT_COMMAND_TREE_SEL_CHANGED; + eventType = wxEVT_TREE_SEL_CHANGED; } // fall through @@ -3449,7 +3449,7 @@ bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) if ( !m_changingSelection ) { if ( eventType == wxEVT_NULL ) - eventType = wxEVT_COMMAND_TREE_SEL_CHANGING; + eventType = wxEVT_TREE_SEL_CHANGING; //else: already set above if (hdr->code == TVN_SELCHANGINGW || @@ -3648,7 +3648,7 @@ bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) if ( htFlags & wxTREE_HITTEST_ONITEMSTATEICON ) { event.m_item = item; - eventType = wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK; + eventType = wxEVT_TREE_STATE_IMAGE_CLICK; } break; @@ -3666,8 +3666,8 @@ bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) { event.m_item = tvhti.hItem; eventType = (int)hdr->code == NM_DBLCLK - ? wxEVT_COMMAND_TREE_ITEM_ACTIVATED - : wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK; + ? wxEVT_TREE_ITEM_ACTIVATED + : wxEVT_TREE_ITEM_RIGHT_CLICK; event.m_pointDrag.x = tvhti.pt.x; event.m_pointDrag.y = tvhti.pt.y; diff --git a/src/msw/webview_ie.cpp b/src/msw/webview_ie.cpp index 168604a030..d52a5ad373 100644 --- a/src/msw/webview_ie.cpp +++ b/src/msw/webview_ie.cpp @@ -188,13 +188,13 @@ void wxWebViewIE::DoSetPage(const wxString& html, const wxString& baseUrl) //We send the events when we are done to mimic webkit //Navigated event - wxWebViewEvent event(wxEVT_COMMAND_WEBVIEW_NAVIGATED, + wxWebViewEvent event(wxEVT_WEBVIEW_NAVIGATED, GetId(), baseUrl, ""); event.SetEventObject(this); HandleWindowEvent(event); //Document complete event - event.SetEventType(wxEVT_COMMAND_WEBVIEW_LOADED); + event.SetEventType(wxEVT_WEBVIEW_LOADED); event.SetEventObject(this); HandleWindowEvent(event); } @@ -1217,7 +1217,7 @@ void wxWebViewIE::onActiveXEvent(wxActiveXEvent& evt) wxString url = evt[1].GetString(); wxString target = evt[3].GetString(); - wxWebViewEvent event(wxEVT_COMMAND_WEBVIEW_NAVIGATING, + wxWebViewEvent event(wxEVT_WEBVIEW_NAVIGATING, GetId(), url, target); //skip empty javascript events. @@ -1252,7 +1252,7 @@ void wxWebViewIE::onActiveXEvent(wxActiveXEvent& evt) wxString url = evt[1].GetString(); // TODO: set target parameter if possible wxString target = wxEmptyString; - wxWebViewEvent event(wxEVT_COMMAND_WEBVIEW_NAVIGATED, + wxWebViewEvent event(wxEVT_WEBVIEW_NAVIGATED, GetId(), url, target); event.SetEventObject(this); HandleWindowEvent(event); @@ -1303,7 +1303,7 @@ void wxWebViewIE::onActiveXEvent(wxActiveXEvent& evt) FindClear(); // TODO: set target parameter if possible wxString target = wxEmptyString; - wxWebViewEvent event(wxEVT_COMMAND_WEBVIEW_LOADED, GetId(), + wxWebViewEvent event(wxEVT_WEBVIEW_LOADED, GetId(), url, target); event.SetEventObject(this); HandleWindowEvent(event); @@ -1319,7 +1319,7 @@ void wxWebViewIE::onActiveXEvent(wxActiveXEvent& evt) { wxString title = evt[0].GetString(); - wxWebViewEvent event(wxEVT_COMMAND_WEBVIEW_TITLE_CHANGED, + wxWebViewEvent event(wxEVT_WEBVIEW_TITLE_CHANGED, GetId(), GetCurrentURL(), ""); event.SetString(title); event.SetEventObject(this); @@ -1329,7 +1329,7 @@ void wxWebViewIE::onActiveXEvent(wxActiveXEvent& evt) case DISPID_NAVIGATEERROR: { - wxWebViewEvent event(wxEVT_COMMAND_WEBVIEW_ERROR, GetId(), + wxWebViewEvent event(wxEVT_WEBVIEW_ERROR, GetId(), evt[1].GetString(), evt[2].GetString()); event.SetEventObject(this); @@ -1396,7 +1396,7 @@ void wxWebViewIE::onActiveXEvent(wxActiveXEvent& evt) { wxString url = evt[4].GetString(); - wxWebViewEvent event(wxEVT_COMMAND_WEBVIEW_NEWWINDOW, + wxWebViewEvent event(wxEVT_WEBVIEW_NEWWINDOW, GetId(), url, wxEmptyString); event.SetEventObject(this); HandleWindowEvent(event); diff --git a/src/msw/wince/checklst.cpp b/src/msw/wince/checklst.cpp index 9cfd3541d6..067969cbe1 100644 --- a/src/msw/wince/checklst.cpp +++ b/src/msw/wince/checklst.cpp @@ -343,14 +343,14 @@ bool wxCheckListBox::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) // Check image changed if ((stOld & LVIS_STATEIMAGEMASK) != (stNew & LVIS_STATEIMAGEMASK)) { - event.SetEventType(wxEVT_COMMAND_CHECKLISTBOX_TOGGLED); + event.SetEventType(wxEVT_CHECKLISTBOX); event.SetInt(IsChecked(iItem)); (void) GetEventHandler()->ProcessEvent(event); } if ( (stNew & LVIS_SELECTED) != (stOld & LVIS_SELECTED) ) { - eventType = wxEVT_COMMAND_LISTBOX_SELECTED; + eventType = wxEVT_LISTBOX; event.SetExtraLong( (stNew & LVIS_SELECTED) != 0 ); // is a selection event.SetInt(iItem); diff --git a/src/msw/wince/choicece.cpp b/src/msw/wince/choicece.cpp index 33d80aa13c..646458e4cf 100644 --- a/src/msw/wince/choicece.cpp +++ b/src/msw/wince/choicece.cpp @@ -246,7 +246,7 @@ bool wxChoice::CreateAndInit(wxWindow *parent, (void)::SendMessage(GetHwnd(), UDM_SETBUDDY, (WPARAM)GetBuddyHwnd(), 0); // do it after finishing with m_hwndBuddy creation to avoid generating - // initial wxEVT_COMMAND_TEXT_UPDATED message + // initial wxEVT_TEXT message ms_allChoiceSpins.Add(this); // initialize the controls contents @@ -303,7 +303,7 @@ bool wxChoice::MSWCommand(WXUINT param, WXWORD WXUNUSED(id)) int n = GetSelection(); if (n > -1) { - wxCommandEvent event(wxEVT_COMMAND_CHOICE_SELECTED, m_windowId); + wxCommandEvent event(wxEVT_CHOICE, m_windowId); event.SetInt(n); event.SetEventObject(this); event.SetString(GetStringSelection()); diff --git a/src/msw/wince/menuce.cpp b/src/msw/wince/menuce.cpp index 6231ea1e22..a4cf26ecc9 100644 --- a/src/msw/wince/menuce.cpp +++ b/src/msw/wince/menuce.cpp @@ -248,7 +248,7 @@ bool wxTopLevelWindowMSW::HandleCommand(WXWORD id, WXWORD WXUNUSED(cmd), WXHWND if ( id == IDM_LEFT || id == IDM_RIGHT ) { int menuId = id == IDM_LEFT ? m_LeftButton.GetId() : m_RightButton.GetId() ; - wxCommandEvent commandEvent(wxEVT_COMMAND_MENU_SELECTED, menuId); + wxCommandEvent commandEvent(wxEVT_MENU, menuId); commandEvent.SetEventObject(this); GetEventHandler()->ProcessEvent(commandEvent); return true; diff --git a/src/msw/wince/tbarwce.cpp b/src/msw/wince/tbarwce.cpp index a2e2847ea2..18e0dda5d7 100644 --- a/src/msw/wince/tbarwce.cpp +++ b/src/msw/wince/tbarwce.cpp @@ -504,7 +504,7 @@ bool wxToolMenuBar::MSWCommand(WXUINT WXUNUSED(cmd), WXWORD id_) } } - wxCommandEvent event(wxEVT_COMMAND_MENU_SELECTED); + wxCommandEvent event(wxEVT_MENU); event.SetEventObject(this); event.SetId(id); event.SetInt(checked); diff --git a/src/msw/wince/textctrlce.cpp b/src/msw/wince/textctrlce.cpp index 9d3650ce62..999f327cff 100644 --- a/src/msw/wince/textctrlce.cpp +++ b/src/msw/wince/textctrlce.cpp @@ -258,7 +258,7 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id, (void)::SendMessage(GetHwnd(), UDM_SETBUDDY, (WPARAM)GetBuddyHwnd(), 0); // do it after finishing with m_hwndBuddy creation to avoid generating - // initial wxEVT_COMMAND_TEXT_UPDATED message + // initial wxEVT_TEXT message ms_allTextSpins.Add(this); return true; @@ -873,7 +873,7 @@ void wxTextCtrl::OnChar(wxKeyEvent& event) case WXK_RETURN: if ( !HasFlag(wxTE_MULTILINE) ) { - wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId); + wxCommandEvent event(wxEVT_TEXT_ENTER, m_windowId); InitCommandEvent(event); event.SetString(GetValue()); if ( GetEventHandler()->ProcessEvent(event) ) @@ -983,7 +983,7 @@ bool wxTextCtrl::SendUpdateEvent() return false; } - wxCommandEvent event(wxEVT_COMMAND_TEXT_UPDATED, GetId()); + wxCommandEvent event(wxEVT_TEXT, GetId()); InitCommandEvent(event); event.SetString(GetValue()); @@ -1013,7 +1013,7 @@ bool wxTextCtrl::MSWCommand(WXUINT param, WXWORD WXUNUSED(id)) // the text size limit has been hit -- try to increase it if ( !AdjustSpaceLimit() ) { - wxCommandEvent event(wxEVT_COMMAND_TEXT_MAXLEN, m_windowId); + wxCommandEvent event(wxEVT_TEXT_MAXLEN, m_windowId); InitCommandEvent(event); event.SetString(GetValue()); ProcessCommand(event); diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 65dd568e9c..2404c9ae77 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -5291,10 +5291,10 @@ bool wxWindowMSW::HandleCommand(WXWORD id_, WXWORD cmd, WXHWND control) // the messages sent from the in-place edit control used by the treectrl // for label editing have id == 0, but they should _not_ be treated as menu // messages (they are EN_XXX ones, in fact) so don't translate anything - // coming from a control to wxEVT_COMMAND_MENU_SELECTED + // coming from a control to wxEVT_MENU if ( !control ) { - wxCommandEvent event(wxEVT_COMMAND_MENU_SELECTED, id); + wxCommandEvent event(wxEVT_MENU, id); event.SetEventObject(this); event.SetInt(id); @@ -5859,9 +5859,9 @@ int wxWindowMSW::HandleMenuChar(int WXUNUSED_IN_WINCE(chAccel), bool wxWindowMSW::HandleClipboardEvent(WXUINT nMsg) { - const wxEventType type = nMsg == WM_CUT ? wxEVT_COMMAND_TEXT_CUT - : nMsg == WM_COPY ? wxEVT_COMMAND_TEXT_COPY - : /* nMsg == WM_PASTE */ wxEVT_COMMAND_TEXT_PASTE; + const wxEventType type = nMsg == WM_CUT ? wxEVT_TEXT_CUT + : nMsg == WM_COPY ? wxEVT_TEXT_COPY + : /* nMsg == WM_PASTE */ wxEVT_TEXT_PASTE; wxClipboardTextEvent evt(type, GetId()); evt.SetEventObject(this); diff --git a/src/os2/button.cpp b/src/os2/button.cpp index 684ee92aa6..92fda2b731 100644 --- a/src/os2/button.cpp +++ b/src/os2/button.cpp @@ -221,7 +221,7 @@ void wxButton::Command ( bool wxButton::SendClickEvent() { - wxCommandEvent vEvent( wxEVT_COMMAND_BUTTON_CLICKED + wxCommandEvent vEvent( wxEVT_BUTTON ,GetId() ); diff --git a/src/os2/checkbox.cpp b/src/os2/checkbox.cpp index 5462a84f7a..eec401f3f1 100644 --- a/src/os2/checkbox.cpp +++ b/src/os2/checkbox.cpp @@ -44,7 +44,7 @@ extern void wxAssociateWinWithHandle( HWND hWnd bool wxCheckBox::OS2Command( WXUINT WXUNUSED(uParam), WXWORD WXUNUSED(wId) ) { - wxCommandEvent rEvent( wxEVT_COMMAND_CHECKBOX_CLICKED, m_windowId ); + wxCommandEvent rEvent( wxEVT_CHECKBOX, m_windowId ); rEvent.SetInt(GetValue()); rEvent.SetEventObject(this); ProcessCommand(rEvent); diff --git a/src/os2/checklst.cpp b/src/os2/checklst.cpp index 6773983e9f..cd093e16e5 100644 --- a/src/os2/checklst.cpp +++ b/src/os2/checklst.cpp @@ -214,7 +214,7 @@ void wxCheckListBoxItem::Check( bool bCheck ) } - wxCommandEvent vEvent( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED,m_pParent->GetId()); + wxCommandEvent vEvent( wxEVT_CHECKLISTBOX,m_pParent->GetId()); vEvent.SetInt(m_nIndex); vEvent.SetEventObject(m_pParent); diff --git a/src/os2/choice.cpp b/src/os2/choice.cpp index 1804a62b24..1b999a6ffa 100644 --- a/src/os2/choice.cpp +++ b/src/os2/choice.cpp @@ -364,7 +364,7 @@ bool wxChoice::OS2Command( if (n > -1) { - wxCommandEvent vEvent( wxEVT_COMMAND_CHOICE_SELECTED + wxCommandEvent vEvent( wxEVT_CHOICE ,m_windowId ); diff --git a/src/os2/combobox.cpp b/src/os2/combobox.cpp index 81590e0f99..2e3d4f6371 100644 --- a/src/os2/combobox.cpp +++ b/src/os2/combobox.cpp @@ -45,7 +45,7 @@ bool wxComboBox::OS2Command( WXUINT uParam, WXWORD WXUNUSED(wId) ) case CBN_LBSELECT: if (lSel > -1) { - wxCommandEvent vEvent( wxEVT_COMMAND_COMBOBOX_SELECTED, GetId() ); + wxCommandEvent vEvent( wxEVT_COMBOBOX, GetId() ); vEvent.SetInt(lSel); vEvent.SetEventObject(this); @@ -57,7 +57,7 @@ bool wxComboBox::OS2Command( WXUINT uParam, WXWORD WXUNUSED(wId) ) case CBN_EFCHANGE: { - wxCommandEvent vEvent( wxEVT_COMMAND_TEXT_UPDATED, GetId() ); + wxCommandEvent vEvent( wxEVT_TEXT, GetId() ); if (lSel == -1L) sValue = GetValue(); diff --git a/src/os2/listbox.cpp b/src/os2/listbox.cpp index 6fa76670e7..932d5e0b6b 100644 --- a/src/os2/listbox.cpp +++ b/src/os2/listbox.cpp @@ -587,11 +587,11 @@ bool wxListBox::OS2Command( if (uParam == LN_SELECT) { - eEvtType = wxEVT_COMMAND_LISTBOX_SELECTED; + eEvtType = wxEVT_LISTBOX; } else if (uParam == LN_ENTER) { - eEvtType = wxEVT_COMMAND_LISTBOX_DOUBLECLICKED; + eEvtType = wxEVT_LISTBOX_DCLICK; } else { diff --git a/src/os2/listctrl.cpp b/src/os2/listctrl.cpp index 3b4cd843ea..9d90a99523 100644 --- a/src/os2/listctrl.cpp +++ b/src/os2/listctrl.cpp @@ -2445,7 +2445,7 @@ bool wxListCtrl::OS2Command ( WXUINT uCmd, WXWORD wId ) { if (uCmd == CN_ENDEDIT) { - wxCommandEvent vEvent( wxEVT_COMMAND_TEXT_UPDATED, wId ); + wxCommandEvent vEvent( wxEVT_TEXT, wId ); vEvent.SetEventObject( this ); ProcessCommand(vEvent); @@ -2674,7 +2674,7 @@ MRESULT wxListCtrl::OS2WindowProc( WXUINT uMsg, { PMYRECORD pRecord = (PMYRECORD)pDragInit->pRecord; - vEventType = wxEVT_COMMAND_LIST_BEGIN_RDRAG; + vEventType = wxEVT_LIST_BEGIN_RDRAG; vEvent.m_itemIndex = pRecord->m_ulItemId; vEvent.m_pointDrag.x = pDragInit->x; vEvent.m_pointDrag.y = pDragInit->y; @@ -2685,7 +2685,7 @@ MRESULT wxListCtrl::OS2WindowProc( WXUINT uMsg, pEditData = (PCNREDITDATA)lParam; if (pEditData) { - vEventType = wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT; + vEventType = wxEVT_LIST_BEGIN_LABEL_EDIT; ConvertFromOS2ListItem( GetHWND() ,(wxListItem &)vEvent.GetItem() ,(PMYRECORD)pEditData->pRecord @@ -2698,7 +2698,7 @@ MRESULT wxListCtrl::OS2WindowProc( WXUINT uMsg, pEditData = (PCNREDITDATA)lParam; if (pEditData) { - vEventType = wxEVT_COMMAND_LIST_END_LABEL_EDIT; + vEventType = wxEVT_LIST_END_LABEL_EDIT; ConvertFromOS2ListItem( GetHWND() ,(wxListItem &)vEvent.GetItem() ,(PMYRECORD)pEditData->pRecord @@ -2716,7 +2716,7 @@ MRESULT wxListCtrl::OS2WindowProc( WXUINT uMsg, wxListItem* pItem = (wxListItem*)&vEvent.GetItem(); PMYRECORD pMyRecord = (PMYRECORD)pNotifyEnter->pRecord; - vEventType = wxEVT_COMMAND_LIST_ITEM_ACTIVATED; + vEventType = wxEVT_LIST_ITEM_ACTIVATED; vEvent.m_itemIndex = pMyRecord->m_ulItemId; pItem->SetText(GetItemText(pMyRecord->m_ulItemId)); pItem->SetData(GetItemData(pMyRecord->m_ulItemId)); diff --git a/src/os2/notebook.cpp b/src/os2/notebook.cpp index f1c52e8ed4..de5fbf8e7a 100644 --- a/src/os2/notebook.cpp +++ b/src/os2/notebook.cpp @@ -208,7 +208,7 @@ int wxNotebook::SetSelection( size_t nPage ) if (nPage != (size_t)m_selection) { - wxBookCtrlEvent vEvent( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING + wxBookCtrlEvent vEvent( wxEVT_NOTEBOOK_PAGE_CHANGING ,m_windowId ); @@ -221,7 +221,7 @@ int wxNotebook::SetSelection( size_t nPage ) // // Program allows the page change // - vEvent.SetEventType(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED); + vEvent.SetEventType(wxEVT_NOTEBOOK_PAGE_CHANGED); HandleWindowEvent(vEvent); ::WinSendMsg( GetHWND() diff --git a/src/os2/radiobox.cpp b/src/os2/radiobox.cpp index 19ff8a2bac..9dbf887c62 100644 --- a/src/os2/radiobox.cpp +++ b/src/os2/radiobox.cpp @@ -719,7 +719,7 @@ bool wxRadioBox::OS2Command( WXUINT uCmd, void wxRadioBox::SendNotificationEvent() { wxCommandEvent vEvent( - wxEVT_COMMAND_RADIOBOX_SELECTED, + wxEVT_RADIOBOX, m_windowId ); diff --git a/src/os2/radiobut.cpp b/src/os2/radiobut.cpp index 3b85eff91d..b0c97c7ba7 100644 --- a/src/os2/radiobut.cpp +++ b/src/os2/radiobut.cpp @@ -163,7 +163,7 @@ bool wxRadioButton::OS2Command( WXUINT wParam, WXWORD WXUNUSED(wId) ) if (!bIsChecked ) SetValue(true); } - wxCommandEvent rEvent( wxEVT_COMMAND_RADIOBUTTON_SELECTED, m_windowId ); + wxCommandEvent rEvent( wxEVT_RADIOBUTTON, m_windowId ); rEvent.SetEventObject(this); ProcessCommand(rEvent); } diff --git a/src/os2/slider.cpp b/src/os2/slider.cpp index 2bf845aaad..e74e38ac5e 100644 --- a/src/os2/slider.cpp +++ b/src/os2/slider.cpp @@ -971,7 +971,7 @@ bool wxSlider::OS2OnScroll( int WXUNUSED(nOrientation), vEvent.SetEventObject(this); HandleWindowEvent(vEvent); - wxCommandEvent vCevent( wxEVT_COMMAND_SLIDER_UPDATED, GetId() ); + wxCommandEvent vCevent( wxEVT_SLIDER, GetId() ); vCevent.SetInt(nNewPos); vCevent.SetEventObject(this); diff --git a/src/os2/spinctrl.cpp b/src/os2/spinctrl.cpp index 2771654ab0..a826c0957d 100644 --- a/src/os2/spinctrl.cpp +++ b/src/os2/spinctrl.cpp @@ -326,7 +326,7 @@ void wxSpinCtrl::OnChar ( { case WXK_RETURN: { - wxCommandEvent vEvent( wxEVT_COMMAND_TEXT_ENTER + wxCommandEvent vEvent( wxEVT_TEXT_ENTER ,m_windowId ); wxString sVal = wxGetWindowText(m_hWndBuddy); @@ -368,7 +368,7 @@ void wxSpinCtrl::OnSpinChange( wxSpinEvent& rEventSpin ) { - wxCommandEvent vEvent( wxEVT_COMMAND_SPINCTRL_UPDATED + wxCommandEvent vEvent( wxEVT_SPINCTRL ,GetId() ); @@ -400,7 +400,7 @@ bool wxSpinCtrl::ProcessTextCommand( WXWORD wCmd, { case SPBN_CHANGE: { - wxCommandEvent vEvent( wxEVT_COMMAND_TEXT_UPDATED, GetId() ); + wxCommandEvent vEvent( wxEVT_TEXT, GetId() ); vEvent.SetEventObject(this); wxString sVal = wxGetWindowText(m_hWndBuddy); diff --git a/src/os2/textctrl.cpp b/src/os2/textctrl.cpp index 3be381a95f..8c38420a4a 100644 --- a/src/os2/textctrl.cpp +++ b/src/os2/textctrl.cpp @@ -1044,7 +1044,7 @@ void wxTextCtrl::OnChar( case WXK_RETURN: if ( !(m_windowStyle & wxTE_MULTILINE) ) { - wxCommandEvent vEvent(wxEVT_COMMAND_TEXT_ENTER, m_windowId); + wxCommandEvent vEvent(wxEVT_TEXT_ENTER, m_windowId); vEvent.SetEventObject(this); if ( HandleWindowEvent(vEvent)) @@ -1105,7 +1105,7 @@ bool wxTextCtrl::OS2Command( break; } - wxCommandEvent vEvent( wxEVT_COMMAND_TEXT_UPDATED + wxCommandEvent vEvent( wxEVT_TEXT ,m_windowId ); diff --git a/src/os2/tglbtn.cpp b/src/os2/tglbtn.cpp index 630f55d560..06a3bc015f 100644 --- a/src/os2/tglbtn.cpp +++ b/src/os2/tglbtn.cpp @@ -43,7 +43,7 @@ // ---------------------------------------------------------------------------- IMPLEMENT_DYNAMIC_CLASS(wxToggleButton, wxControl) -wxDEFINE_EVENT( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEvent ); +wxDEFINE_EVENT( wxEVT_TOGGLEBUTTON, wxCommandEvent ); #define BUTTON_HEIGHT_FROM_CHAR_HEIGHT(cy) (11*EDIT_HEIGHT_FROM_CHAR_HEIGHT(cy)/10) @@ -57,7 +57,7 @@ wxDEFINE_EVENT( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEvent ); bool wxToggleButton::OS2Command(WXUINT WXUNUSED(param), WXWORD WXUNUSED(id)) { - wxCommandEvent event(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, m_windowId); + wxCommandEvent event(wxEVT_TOGGLEBUTTON, m_windowId); event.SetInt(GetValue()); event.SetEventObject(this); ProcessCommand(event); diff --git a/src/os2/treectrl.cpp b/src/os2/treectrl.cpp index 9bddf9c719..4457ed40bd 100644 --- a/src/os2/treectrl.cpp +++ b/src/os2/treectrl.cpp @@ -281,8 +281,8 @@ static /* const */ wxEventType gs_expandEvents[IDX_WHAT_MAX][IDX_HOW_MAX]; but logically it's a const table with the following entries: = { - { wxEVT_COMMAND_TREE_ITEM_COLLAPSED, wxEVT_COMMAND_TREE_ITEM_COLLAPSING }, - { wxEVT_COMMAND_TREE_ITEM_EXPANDED, wxEVT_COMMAND_TREE_ITEM_EXPANDING } + { wxEVT_TREE_ITEM_COLLAPSED, wxEVT_TREE_ITEM_COLLAPSING }, + { wxEVT_TREE_ITEM_EXPANDED, wxEVT_TREE_ITEM_EXPANDING } }; */ @@ -349,10 +349,10 @@ void wxTreeCtrl::Init () // Initialize the global array of events now as it can't be done statically // with the wxEVT_XXX values being allocated during run-time only // - gs_expandEvents[IDX_COLLAPSE][IDX_DONE] = wxEVT_COMMAND_TREE_ITEM_COLLAPSED; - gs_expandEvents[IDX_COLLAPSE][IDX_DOING] = wxEVT_COMMAND_TREE_ITEM_COLLAPSING; - gs_expandEvents[IDX_EXPAND][IDX_DONE] = wxEVT_COMMAND_TREE_ITEM_EXPANDED; - gs_expandEvents[IDX_EXPAND][IDX_DOING] = wxEVT_COMMAND_TREE_ITEM_EXPANDING; + gs_expandEvents[IDX_COLLAPSE][IDX_DONE] = wxEVT_TREE_ITEM_COLLAPSED; + gs_expandEvents[IDX_COLLAPSE][IDX_DOING] = wxEVT_TREE_ITEM_COLLAPSING; + gs_expandEvents[IDX_EXPAND][IDX_DONE] = wxEVT_TREE_ITEM_EXPANDED; + gs_expandEvents[IDX_EXPAND][IDX_DOING] = wxEVT_TREE_ITEM_EXPANDING; } // end of wxTreeCtrl::Init bool wxTreeCtrl::Create ( @@ -1950,7 +1950,7 @@ bool wxTreeCtrl::OS2Command ( { if (uCmd == CN_ENDEDIT) { - wxCommandEvent vEvent( wxEVT_COMMAND_TEXT_UPDATED + wxCommandEvent vEvent( wxEVT_TEXT ,wId ); @@ -2002,7 +2002,7 @@ MRESULT wxTreeCtrl::OS2WindowProc ( { PMYRECORD pRecord = (PMYRECORD)pDragInit->pRecord; - vEventType = wxEVT_COMMAND_TREE_BEGIN_DRAG; + vEventType = wxEVT_TREE_BEGIN_DRAG; vEvent.m_item = pRecord->m_ulItemId; vEvent.m_pointDrag.x = pDragInit->x; vEvent.m_pointDrag.y = pDragInit->y; @@ -2015,7 +2015,7 @@ MRESULT wxTreeCtrl::OS2WindowProc ( { PMYRECORD pRecord = (PMYRECORD)pEditData->pRecord; - vEventType = wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT; + vEventType = wxEVT_TREE_BEGIN_LABEL_EDIT; vEvent.m_item = pRecord->m_ulItemId; vEvent.m_label = pRecord->m_vRecord.pszTree; vEvent.m_editCancelled = false; @@ -2028,7 +2028,7 @@ MRESULT wxTreeCtrl::OS2WindowProc ( { PMYRECORD pRecord = (PMYRECORD)pEditData->pRecord; - vEventType = wxEVT_COMMAND_TREE_END_LABEL_EDIT; + vEventType = wxEVT_TREE_END_LABEL_EDIT; vEvent.m_item = pRecord->m_ulItemId; vEvent.m_label = pRecord->m_vRecord.pszTree; if (pRecord->m_vRecord.pszTree == NULL) diff --git a/src/os2/window.cpp b/src/os2/window.cpp index b0aa9ea547..014b8f7bfe 100644 --- a/src/os2/window.cpp +++ b/src/os2/window.cpp @@ -2544,7 +2544,7 @@ MRESULT wxWindowOS2::OS2WindowProc( WXUINT uMsg, (pPage->ulPageIdNew > 0L && pPage->ulPageIdCur > 0L)) { wxWindowOS2* pWin = wxFindWinFromHandle(pPage->hwndBook); - wxBookCtrlEvent vEvent( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED + wxBookCtrlEvent vEvent( wxEVT_NOTEBOOK_PAGE_CHANGED ,(int)SHORT1FROMMP(wParam) ,(int)pPage->ulPageIdNew ,(int)pPage->ulPageIdCur diff --git a/src/osx/button_osx.cpp b/src/osx/button_osx.cpp index 32417fa88c..bd55cf3c46 100644 --- a/src/osx/button_osx.cpp +++ b/src/osx/button_osx.cpp @@ -128,7 +128,7 @@ void wxButton::Command (wxCommandEvent & WXUNUSED(event)) bool wxButton::OSXHandleClicked( double WXUNUSED(timestampsec) ) { - wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, m_windowId); + wxCommandEvent event(wxEVT_BUTTON, m_windowId); event.SetEventObject(this); ProcessCommand(event); return true; @@ -173,7 +173,7 @@ bool wxDisclosureTriangle::IsOpen() const bool wxDisclosureTriangle::OSXHandleClicked( double WXUNUSED(timestampsec) ) { // Just emit button event for now - wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, m_windowId); + wxCommandEvent event(wxEVT_BUTTON, m_windowId); event.SetEventObject(this); ProcessCommand(event); diff --git a/src/osx/carbon/app.cpp b/src/osx/carbon/app.cpp index 7f394e8a2d..be1de28f32 100644 --- a/src/osx/carbon/app.cpp +++ b/src/osx/carbon/app.cpp @@ -1485,7 +1485,7 @@ bool wxApp::MacSendCharEvent( wxWindow* focus , long keymessage , long modifiers wxButton *def = wxDynamicCast(tlw->GetDefaultItem(), wxButton); if ( def && def->IsEnabled() ) { - wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, def->GetId() ); + wxCommandEvent event(wxEVT_BUTTON, def->GetId() ); event.SetEventObject(def); def->Command(event); @@ -1496,7 +1496,7 @@ bool wxApp::MacSendCharEvent( wxWindow* focus , long keymessage , long modifiers else if (keyval == WXK_ESCAPE || (keyval == '.' && modifiers & cmdKey ) ) { // generate wxID_CANCEL if command-. or has been pressed (typically in dialogs) - wxCommandEvent new_event(wxEVT_COMMAND_BUTTON_CLICKED,wxID_CANCEL); + wxCommandEvent new_event(wxEVT_BUTTON,wxID_CANCEL); new_event.SetEventObject( focus ); handled = focus->HandleWindowEvent( new_event ); } diff --git a/src/osx/carbon/combobox.cpp b/src/osx/carbon/combobox.cpp index 73bbbad274..8d6dec95e2 100644 --- a/src/osx/carbon/combobox.cpp +++ b/src/osx/carbon/combobox.cpp @@ -75,7 +75,7 @@ protected: if ( event.GetKeyCode() == WXK_RETURN ) { - wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_cb->GetId()); + wxCommandEvent event(wxEVT_TEXT_ENTER, m_cb->GetId()); event.SetString( GetValue() ); event.SetInt( m_cb->GetSelection() ); event.SetEventObject( m_cb ); @@ -90,7 +90,7 @@ protected: wxButton *def = wxDynamicCast(tlw->GetDefaultItem(), wxButton); if ( def && def->IsEnabled() ) { - wxCommandEvent event( wxEVT_COMMAND_BUTTON_CLICKED, def->GetId() ); + wxCommandEvent event( wxEVT_BUTTON, def->GetId() ); event.SetEventObject(def); def->Command(event); } @@ -181,7 +181,7 @@ protected: wxString s = e.GetString(); m_cb->DelegateChoice( s ); - wxCommandEvent event2(wxEVT_COMMAND_COMBOBOX_SELECTED, m_cb->GetId() ); + wxCommandEvent event2(wxEVT_COMBOBOX, m_cb->GetId() ); event2.SetInt(m_cb->GetSelection()); event2.SetEventObject(m_cb); event2.SetString(m_cb->GetStringSelection()); @@ -189,7 +189,7 @@ protected: // For consistency with MSW and GTK, also send a text updated event // After all, the text is updated when a selection is made - wxCommandEvent TextEvent( wxEVT_COMMAND_TEXT_UPDATED, m_cb->GetId() ); + wxCommandEvent TextEvent( wxEVT_TEXT, m_cb->GetId() ); TextEvent.SetString( m_cb->GetStringSelection() ); TextEvent.SetEventObject( m_cb ); m_cb->ProcessCommand( TextEvent ); @@ -648,7 +648,7 @@ bool wxComboBox::OSXHandleClicked( double WXUNUSED(timestampsec) ) { /* For consistency with other platforms, clicking in the text area does not constitute a selection - wxCommandEvent event(wxEVT_COMMAND_COMBOBOX_SELECTED, m_windowId ); + wxCommandEvent event(wxEVT_COMBOBOX, m_windowId ); event.SetInt(GetSelection()); event.SetEventObject(this); event.SetString(GetStringSelection()); diff --git a/src/osx/carbon/combobxc.cpp b/src/osx/carbon/combobxc.cpp index b691300246..8f00357352 100644 --- a/src/osx/carbon/combobxc.cpp +++ b/src/osx/carbon/combobxc.cpp @@ -59,7 +59,7 @@ static pascal OSStatus wxMacComboBoxEventHandler( EventHandlerCallRef handler , { case kEventTextAccepted : { - wxCommandEvent event( wxEVT_COMMAND_COMBOBOX_SELECTED, cb->GetId() ); + wxCommandEvent event( wxEVT_COMBOBOX, cb->GetId() ); event.SetInt( cb->GetSelection() ); event.SetString( cb->GetStringSelection() ); event.SetEventObject( cb ); @@ -120,7 +120,7 @@ protected: // make Enter generate "selected" event if there is only one item // in the combobox - without it, it's impossible to select it at // all! - wxCommandEvent event( wxEVT_COMMAND_COMBOBOX_SELECTED, m_cb->GetId() ); + wxCommandEvent event( wxEVT_COMBOBOX, m_cb->GetId() ); event.SetInt( 0 ); event.SetString( value ); event.SetEventObject( m_cb ); @@ -135,7 +135,7 @@ protected: m_cb->SetStringSelection(value); // and generate the selected event for it - wxCommandEvent event( wxEVT_COMMAND_COMBOBOX_SELECTED, m_cb->GetId() ); + wxCommandEvent event( wxEVT_COMBOBOX, m_cb->GetId() ); event.SetInt( m_cb->GetCount() - 1 ); event.SetString( value ); event.SetEventObject( m_cb ); @@ -151,7 +151,7 @@ protected: wxButton *def = wxDynamicCast(tlw->GetDefaultItem(), wxButton); if ( def && def->IsEnabled() ) { - wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, def->GetId() ); + wxCommandEvent event(wxEVT_BUTTON, def->GetId() ); event.SetEventObject(def); def->Command(event); return; @@ -189,7 +189,7 @@ protected: wxString s = e.GetString(); m_cb->DelegateChoice( s ); - wxCommandEvent event2(wxEVT_COMMAND_COMBOBOX_SELECTED, m_cb->GetId() ); + wxCommandEvent event2(wxEVT_COMBOBOX, m_cb->GetId() ); event2.SetInt(m_cb->GetSelection()); event2.SetEventObject(m_cb); event2.SetString(m_cb->GetStringSelection()); @@ -775,7 +775,7 @@ bool wxComboBox::CanRedo() const bool wxComboBox::OSXHandleClicked( double timestampsec ) { - wxCommandEvent event(wxEVT_COMMAND_COMBOBOX_SELECTED, m_windowId ); + wxCommandEvent event(wxEVT_COMBOBOX, m_windowId ); event.SetInt(GetSelection()); event.SetEventObject(this); event.SetString(GetStringSelection()); diff --git a/src/osx/carbon/dataview.cpp b/src/osx/carbon/dataview.cpp index db4326848c..3990f25c48 100644 --- a/src/osx/carbon/dataview.cpp +++ b/src/osx/carbon/dataview.cpp @@ -99,7 +99,7 @@ static pascal OSStatus DataBrowserCtrlEventHandler(EventHandlerCallRef handler, unsigned long columnIndex; wxDataViewColumn* column; OSStatus status; - wxDataViewEvent DataViewEvent(wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_CLICK,DataViewCtrlPtr->GetId()); + wxDataViewEvent DataViewEvent(wxEVT_DATAVIEW_COLUMN_HEADER_CLICK,DataViewCtrlPtr->GetId()); CarbonEvent.GetParameter(kEventParamDirectObject,&controlReference); // determine the column that triggered the event (this is the column that is responsible for sorting the data view): @@ -1294,7 +1294,7 @@ Boolean wxMacDataViewDataBrowserListViewControl::DataBrowserCompareProc(DataBrow } void wxMacDataViewDataBrowserListViewControl::DataBrowserGetContextualMenuProc(MenuRef* menu, UInt32* helpType, CFStringRef* helpItemString, AEDesc* WXUNUSED(selection)) - // In this method we do not supply a contextual menu handler at all but only send a wxEVT_COMMAND_DATAVIEW_ITEM_CONTEXT_MENU. + // In this method we do not supply a contextual menu handler at all but only send a wxEVT_DATAVIEW_ITEM_CONTEXT_MENU. { wxArrayDataBrowserItemID itemIDs; @@ -1307,7 +1307,7 @@ void wxMacDataViewDataBrowserListViewControl::DataBrowserGetContextualMenuProc(M *helpType = kCMHelpItemNoHelp; *helpItemString = NULL; // create information for a context menu event: - wxDataViewEvent dataViewEvent(wxEVT_COMMAND_DATAVIEW_ITEM_CONTEXT_MENU,dataViewCtrlPtr->GetId()); + wxDataViewEvent dataViewEvent(wxEVT_DATAVIEW_ITEM_CONTEXT_MENU,dataViewCtrlPtr->GetId()); dataViewEvent.SetEventObject(dataViewCtrlPtr); dataViewEvent.SetModel(dataViewCtrlPtr->GetModel()); @@ -1443,7 +1443,7 @@ OSStatus wxMacDataViewDataBrowserListViewControl::DataBrowserGetSetItemDataProc( wxCHECK_MSG(dataViewCtrlPtr != NULL,errDataBrowserNotConfigured,_("Pointer to data view control not set correctly.")); // initialize wxWidget event: - wxDataViewEvent dataViewEvent(wxEVT_COMMAND_DATAVIEW_ITEM_COLLAPSING,dataViewCtrlPtr->GetId()); // variable definition + wxDataViewEvent dataViewEvent(wxEVT_DATAVIEW_ITEM_COLLAPSING,dataViewCtrlPtr->GetId()); // variable definition dataViewEvent.SetEventObject(dataViewCtrlPtr); dataViewEvent.SetItem (wxDataViewItem(reinterpret_cast(itemID))); @@ -1460,7 +1460,7 @@ OSStatus wxMacDataViewDataBrowserListViewControl::DataBrowserGetSetItemDataProc( wxCHECK_MSG(dataViewCtrlPtr != NULL,errDataBrowserNotConfigured,_("Pointer to data view control not set correctly.")); // initialize wxWidget event: - wxDataViewEvent dataViewEvent(wxEVT_COMMAND_DATAVIEW_ITEM_EXPANDING,dataViewCtrlPtr->GetId()); // variable definition + wxDataViewEvent dataViewEvent(wxEVT_DATAVIEW_ITEM_EXPANDING,dataViewCtrlPtr->GetId()); // variable definition dataViewEvent.SetEventObject(dataViewCtrlPtr); dataViewEvent.SetItem (wxDataViewItem(reinterpret_cast(itemID))); @@ -1500,7 +1500,7 @@ void wxMacDataViewDataBrowserListViewControl::DataBrowserItemNotificationProc(Da dataViewCtrlPtr->FinishCustomItemEditing(); // stop editing of a custom item first (if necessary) { // initialize wxWidget event: - wxDataViewEvent dataViewEvent(wxEVT_COMMAND_DATAVIEW_ITEM_COLLAPSED,dataViewCtrlPtr->GetId()); // variable definition + wxDataViewEvent dataViewEvent(wxEVT_DATAVIEW_ITEM_COLLAPSED,dataViewCtrlPtr->GetId()); // variable definition dataViewEvent.SetEventObject(dataViewCtrlPtr); dataViewEvent.SetItem(wxDataViewItem(reinterpret_cast(itemID))); @@ -1512,7 +1512,7 @@ void wxMacDataViewDataBrowserListViewControl::DataBrowserItemNotificationProc(Da dataViewCtrlPtr->FinishCustomItemEditing(); // stop editing of a custom item first (if necessary) { // initialize wxWidget event: - wxDataViewEvent dataViewEvent(wxEVT_COMMAND_DATAVIEW_ITEM_EXPANDED,dataViewCtrlPtr->GetId()); // variable definition + wxDataViewEvent dataViewEvent(wxEVT_DATAVIEW_ITEM_EXPANDED,dataViewCtrlPtr->GetId()); // variable definition dataViewEvent.SetEventObject(dataViewCtrlPtr); dataViewEvent.SetItem(wxDataViewItem(reinterpret_cast(itemID))); @@ -1527,7 +1527,7 @@ void wxMacDataViewDataBrowserListViewControl::DataBrowserItemNotificationProc(Da { // initialize wxWidget event: DataBrowserPropertyID propertyID; - wxDataViewEvent dataViewEvent(wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_STARTED,dataViewCtrlPtr->GetId()); // variable definition + wxDataViewEvent dataViewEvent(wxEVT_DATAVIEW_ITEM_EDITING_STARTED,dataViewCtrlPtr->GetId()); // variable definition dataViewEvent.SetEventObject(dataViewCtrlPtr); dataViewEvent.SetItem(wxDataViewItem(reinterpret_cast(itemID))); @@ -1548,7 +1548,7 @@ void wxMacDataViewDataBrowserListViewControl::DataBrowserItemNotificationProc(Da { // initialize wxWidget event: DataBrowserPropertyID propertyID; - wxDataViewEvent dataViewEvent(wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_DONE,dataViewCtrlPtr->GetId()); // variable definition + wxDataViewEvent dataViewEvent(wxEVT_DATAVIEW_ITEM_EDITING_DONE,dataViewCtrlPtr->GetId()); // variable definition dataViewEvent.SetEventObject(dataViewCtrlPtr); dataViewEvent.SetItem(wxDataViewItem(reinterpret_cast(itemID))); @@ -1574,7 +1574,7 @@ void wxMacDataViewDataBrowserListViewControl::DataBrowserItemNotificationProc(Da case kDataBrowserItemDoubleClicked: { // initialize wxWidget event: - wxDataViewEvent dataViewEvent(wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED,dataViewCtrlPtr->GetId()); // variable definition + wxDataViewEvent dataViewEvent(wxEVT_DATAVIEW_ITEM_ACTIVATED,dataViewCtrlPtr->GetId()); // variable definition dataViewEvent.SetEventObject(dataViewCtrlPtr); dataViewEvent.SetItem(wxDataViewItem(reinterpret_cast(itemID))); @@ -1590,7 +1590,7 @@ void wxMacDataViewDataBrowserListViewControl::DataBrowserItemNotificationProc(Da case kDataBrowserSelectionSetChanged: { // initialize wxWidget event: - wxDataViewEvent dataViewEvent(wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED,dataViewCtrlPtr->GetId()); // variable definition + wxDataViewEvent dataViewEvent(wxEVT_DATAVIEW_SELECTION_CHANGED,dataViewCtrlPtr->GetId()); // variable definition dataViewEvent.SetEventObject(dataViewCtrlPtr); dataViewEvent.SetModel (dataViewCtrlPtr->GetModel()); @@ -1634,7 +1634,7 @@ void wxMacDataViewDataBrowserListViewControl::DataBrowserItemNotificationProc(Da { columnPtr->SetSortOrder(!(columnPtr->IsSortOrderAscending())); // initialize wxWidget event: - wxDataViewEvent dataViewEvent(wxEVT_COMMAND_DATAVIEW_COLUMN_SORTED,dataViewCtrlPtr->GetId()); // variable definition + wxDataViewEvent dataViewEvent(wxEVT_DATAVIEW_COLUMN_SORTED,dataViewCtrlPtr->GetId()); // variable definition dataViewEvent.SetEventObject(dataViewCtrlPtr); dataViewEvent.SetColumn(columnIndex); @@ -1834,7 +1834,7 @@ Boolean wxMacDataViewDataBrowserListViewControl::DataBrowserAcceptDragProc(DragR ::GetDragItemReferenceNumber(dragRef,indexDraggedItem,&itemRef); // the index begins with 1! dataObjects = GetDnDDataObjects(dragRef,itemRef); // create wxWidget's event: - wxDataViewEvent dataViewEvent(wxEVT_COMMAND_DATAVIEW_ITEM_DROP_POSSIBLE,dataViewCtrlPtr->GetId()); + wxDataViewEvent dataViewEvent(wxEVT_DATAVIEW_ITEM_DROP_POSSIBLE,dataViewCtrlPtr->GetId()); dataViewEvent.SetEventObject(dataViewCtrlPtr); @@ -1878,7 +1878,7 @@ Boolean wxMacDataViewDataBrowserListViewControl::DataBrowserAddDragItemProc(Drag wxCHECK_MSG(dataViewItem.IsOk(),false,_("Invalid data view item")); // send a begin drag event and proceed with dragging unless the event is vetoed: - wxDataViewEvent dataViewEvent(wxEVT_COMMAND_DATAVIEW_ITEM_BEGIN_DRAG,dataViewCtrlPtr->GetId()); + wxDataViewEvent dataViewEvent(wxEVT_DATAVIEW_ITEM_BEGIN_DRAG,dataViewCtrlPtr->GetId()); dataViewEvent.SetEventObject(dataViewCtrlPtr); dataViewEvent.SetItem(dataViewItem); @@ -2011,7 +2011,7 @@ Boolean wxMacDataViewDataBrowserListViewControl::DataBrowserReceiveDragProc(Drag ::GetDragItemReferenceNumber(dragRef,indexDraggedItem,&itemRef); // the index begins with 1! dataObjects = GetDnDDataObjects(dragRef,itemRef); // create wxWidget's event: - wxDataViewEvent dataViewEvent(wxEVT_COMMAND_DATAVIEW_ITEM_DROP,dataViewCtrlPtr->GetId()); + wxDataViewEvent dataViewEvent(wxEVT_DATAVIEW_ITEM_DROP,dataViewCtrlPtr->GetId()); dataViewEvent.SetEventObject(dataViewCtrlPtr); diff --git a/src/osx/carbon/fontdlg.cpp b/src/osx/carbon/fontdlg.cpp index d9f1f99ede..2aa22e63ec 100644 --- a/src/osx/carbon/fontdlg.cpp +++ b/src/osx/carbon/fontdlg.cpp @@ -415,7 +415,7 @@ void wxFontColourSwatchCtrl::OnMouseEvent(wxMouseEvent& event) dialog->Destroy(); Refresh(); - wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, GetId()); + wxCommandEvent event(wxEVT_BUTTON, GetId()); HandleWindowEvent(event); } } @@ -625,7 +625,7 @@ void wxFontDialog::CreateControls() } /*! - * wxEVT_COMMAND_SPINCTRL_UPDATED event handler for wxID_FONTDIALOG_FONTSIZE + * wxEVT_SPINCTRL event handler for wxID_FONTDIALOG_FONTSIZE */ void wxFontDialog::OnFontdialogFontsizeUpdated( wxSpinEvent& WXUNUSED(event) ) @@ -634,7 +634,7 @@ void wxFontDialog::OnFontdialogFontsizeUpdated( wxSpinEvent& WXUNUSED(event) ) } /*! - * wxEVT_COMMAND_TEXT_UPDATED event handler for wxID_FONTDIALOG_FONTSIZE + * wxEVT_TEXT event handler for wxID_FONTDIALOG_FONTSIZE */ void wxFontDialog::OnFontdialogFontsizeTextUpdated( wxCommandEvent& WXUNUSED(event) ) @@ -643,7 +643,7 @@ void wxFontDialog::OnFontdialogFontsizeTextUpdated( wxCommandEvent& WXUNUSED(eve } /*! - * wxEVT_COMMAND_CHECKBOX_CLICKED event handler for wxID_FONTDIALOG_BOLD + * wxEVT_CHECKBOX event handler for wxID_FONTDIALOG_BOLD */ void wxFontDialog::OnFontdialogBoldClick( wxCommandEvent& WXUNUSED(event) ) @@ -652,7 +652,7 @@ void wxFontDialog::OnFontdialogBoldClick( wxCommandEvent& WXUNUSED(event) ) } /*! - * wxEVT_COMMAND_CHECKBOX_CLICKED event handler for wxID_FONTDIALOG_ITALIC + * wxEVT_CHECKBOX event handler for wxID_FONTDIALOG_ITALIC */ void wxFontDialog::OnFontdialogItalicClick( wxCommandEvent& WXUNUSED(event) ) @@ -661,7 +661,7 @@ void wxFontDialog::OnFontdialogItalicClick( wxCommandEvent& WXUNUSED(event) ) } /*! - * wxEVT_COMMAND_CHECKBOX_CLICKED event handler for wxID_FONTDIALOG_UNDERLINED + * wxEVT_CHECKBOX event handler for wxID_FONTDIALOG_UNDERLINED */ void wxFontDialog::OnFontdialogUnderlinedClick( wxCommandEvent& WXUNUSED(event) ) @@ -670,7 +670,7 @@ void wxFontDialog::OnFontdialogUnderlinedClick( wxCommandEvent& WXUNUSED(event) } /*! - * wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK + * wxEVT_BUTTON event handler for wxID_OK */ void wxFontDialog::OnOkClick( wxCommandEvent& event ) @@ -680,7 +680,7 @@ void wxFontDialog::OnOkClick( wxCommandEvent& event ) /*! - * wxEVT_COMMAND_LISTBOX_SELECTED event handler for wxID_FONTDIALOG_FACENAME + * wxEVT_LISTBOX event handler for wxID_FONTDIALOG_FACENAME */ void wxFontDialog::OnFontdialogFacenameSelected( wxCommandEvent& WXUNUSED(event) ) diff --git a/src/osx/carbon/listbox.cpp b/src/osx/carbon/listbox.cpp index 441f9aa930..32a312ad87 100644 --- a/src/osx/carbon/listbox.cpp +++ b/src/osx/carbon/listbox.cpp @@ -213,7 +213,7 @@ OSStatus wxMacListBoxItem::GetSetData(wxMacDataItemBrowserControl *owner , m_isChecked = newVal; err = noErr; - wxCommandEvent event( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, checklist->GetId() ); + wxCommandEvent event( wxEVT_CHECKLISTBOX, checklist->GetId() ); event.SetInt( owner->GetLineFromItem( this ) ); event.SetEventObject( checklist ); checklist->HandleWindowEvent( event ); @@ -362,7 +362,7 @@ void wxMacDataBrowserListControl::ItemNotification( if ((message == kDataBrowserSelectionSetChanged) && (!list->MacGetBlockEvents())) { - wxCommandEvent event( wxEVT_COMMAND_LISTBOX_SELECTED, list->GetId() ); + wxCommandEvent event( wxEVT_LISTBOX, list->GetId() ); int sel = list->GetSelection(); if ((sel < 0) || (sel > (int) list->GetCount())) // OS X can select an item below the last item (why?) diff --git a/src/osx/carbon/listctrl_mac.cpp b/src/osx/carbon/listctrl_mac.cpp index 5cc788b68f..ece68350ed 100644 --- a/src/osx/carbon/listctrl_mac.cpp +++ b/src/osx/carbon/listctrl_mac.cpp @@ -63,7 +63,7 @@ static pascal OSStatus wxMacListCtrlEventHandler( EventHandlerCallRef handler , cEvent.GetParameter( kEventParamDirectObject , &controlRef ) ; wxListCtrl *window = (wxListCtrl*) data ; - wxListEvent le( wxEVT_COMMAND_LIST_COL_CLICK, window->GetId() ); + wxListEvent le( wxEVT_LIST_COL_CLICK, window->GetId() ); le.SetEventObject( window ); switch ( GetEventKind( event ) ) @@ -558,14 +558,14 @@ void wxListCtrl::OnDblClick(wxMouseEvent& event) void wxListCtrl::OnRightDown(wxMouseEvent& event) { if (m_dbImpl) - FireMouseEvent(wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK, event.GetPosition()); + FireMouseEvent(wxEVT_LIST_ITEM_RIGHT_CLICK, event.GetPosition()); event.Skip(); } void wxListCtrl::OnMiddleDown(wxMouseEvent& event) { if (m_dbImpl) - FireMouseEvent(wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK, event.GetPosition()); + FireMouseEvent(wxEVT_LIST_ITEM_MIDDLE_CLICK, event.GetPosition()); event.Skip(); } @@ -593,7 +593,7 @@ void wxListCtrl::OnChar(wxKeyEvent& event) if (m_dbImpl) { - wxListEvent le( wxEVT_COMMAND_LIST_KEY_DOWN, GetId() ); + wxListEvent le( wxEVT_LIST_KEY_DOWN, GetId() ); le.SetEventObject(this); le.m_code = event.GetKeyCode(); le.m_itemIndex = -1; @@ -1738,7 +1738,7 @@ bool wxListCtrl::DeleteItem(long item) if (m_dbImpl) { m_dbImpl->MacDelete(item); - wxListEvent event( wxEVT_COMMAND_LIST_DELETE_ITEM, GetId() ); + wxListEvent event( wxEVT_LIST_DELETE_ITEM, GetId() ); event.SetEventObject( this ); event.m_itemIndex = item; HandleWindowEvent( event ); @@ -1757,7 +1757,7 @@ bool wxListCtrl::DeleteAllItems() if (m_dbImpl) { m_dbImpl->MacClear(); - wxListEvent event( wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS, GetId() ); + wxListEvent event( wxEVT_LIST_DELETE_ALL_ITEMS, GetId() ); event.SetEventObject( this ); HandleWindowEvent( event ); } @@ -1827,7 +1827,7 @@ wxTextCtrl* wxListCtrl::EditLabel(long item, wxClassInfo* textControlClass) wxASSERT_MSG( textControlClass->IsKindOf(CLASSINFO(wxTextCtrl)), wxT("EditLabel() needs a text control") ); - wxListEvent le( wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT, GetParent()->GetId() ); + wxListEvent le( wxEVT_LIST_BEGIN_LABEL_EDIT, GetParent()->GetId() ); le.SetEventObject( this ); le.m_itemIndex = item; le.m_col = 0; @@ -2106,7 +2106,7 @@ long wxListCtrl::InsertItem(wxListItem& info) m_dbImpl->MacInsertItem(info.m_itemId, &info ); - wxListEvent event( wxEVT_COMMAND_LIST_INSERT_ITEM, GetId() ); + wxListEvent event( wxEVT_LIST_INSERT_ITEM, GetId() ); event.SetEventObject( this ); event.m_itemIndex = info.m_itemId; HandleWindowEvent( event ); @@ -2254,7 +2254,7 @@ void wxListCtrl::OnRenameTimer() bool wxListCtrl::OnRenameAccept(long itemEdit, const wxString& value) { - wxListEvent le( wxEVT_COMMAND_LIST_END_LABEL_EDIT, GetId() ); + wxListEvent le( wxEVT_LIST_END_LABEL_EDIT, GetId() ); le.SetEventObject( this ); le.m_itemIndex = itemEdit; @@ -2267,7 +2267,7 @@ bool wxListCtrl::OnRenameAccept(long itemEdit, const wxString& value) void wxListCtrl::OnRenameCancelled(long itemEdit) { // let owner know that the edit was cancelled - wxListEvent le( wxEVT_COMMAND_LIST_END_LABEL_EDIT, GetParent()->GetId() ); + wxListEvent le( wxEVT_LIST_END_LABEL_EDIT, GetParent()->GetId() ); le.SetEditCanceled(true); @@ -2477,7 +2477,7 @@ void wxMacListCtrlItem::Notification(wxMacDataItemBrowserControl *owner , { bool trigger = false; - wxListEvent event( wxEVT_COMMAND_LIST_ITEM_SELECTED, list->GetId() ); + wxListEvent event( wxEVT_LIST_ITEM_SELECTED, list->GetId() ); bool isSingle = (list->GetWindowStyle() & wxLC_SINGLE_SEL) != 0; event.SetEventObject( list ); @@ -2488,7 +2488,7 @@ void wxMacListCtrlItem::Notification(wxMacDataItemBrowserControl *owner , switch (message) { case kDataBrowserItemDeselected: - event.SetEventType(wxEVT_COMMAND_LIST_ITEM_DESELECTED); + event.SetEventType(wxEVT_LIST_ITEM_DESELECTED); if ( !isSingle ) trigger = !lb->IsSelectionSuppressed(); break; @@ -2498,20 +2498,20 @@ void wxMacListCtrlItem::Notification(wxMacDataItemBrowserControl *owner , break; case kDataBrowserItemDoubleClicked: - event.SetEventType( wxEVT_COMMAND_LIST_ITEM_ACTIVATED ); + event.SetEventType( wxEVT_LIST_ITEM_ACTIVATED ); trigger = true; break; case kDataBrowserEditStarted : // TODO : how to veto ? - event.SetEventType( wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT ) ; + event.SetEventType( wxEVT_LIST_BEGIN_LABEL_EDIT ) ; trigger = true ; break ; case kDataBrowserEditStopped : // TODO probably trigger only upon the value store callback, because // here IIRC we cannot veto - event.SetEventType( wxEVT_COMMAND_LIST_END_LABEL_EDIT ) ; + event.SetEventType( wxEVT_LIST_END_LABEL_EDIT ) ; trigger = true ; break ; @@ -3058,7 +3058,7 @@ void wxMacDataBrowserListCtrlControl::ItemNotification(DataBrowserItemID itemID, { bool trigger = false; - wxListEvent event( wxEVT_COMMAND_LIST_ITEM_SELECTED, list->GetId() ); + wxListEvent event( wxEVT_LIST_ITEM_SELECTED, list->GetId() ); event.SetEventObject( list ); if ( !list->IsVirtual() ) @@ -3077,7 +3077,7 @@ void wxMacDataBrowserListCtrlControl::ItemNotification(DataBrowserItemID itemID, switch (message) { case kDataBrowserItemDeselected: - event.SetEventType(wxEVT_COMMAND_LIST_ITEM_DESELECTED); + event.SetEventType(wxEVT_LIST_ITEM_DESELECTED); // as the generic implementation is also triggering this // event for single selection, we do the same (different than listbox) trigger = !IsSelectionSuppressed(); @@ -3089,20 +3089,20 @@ void wxMacDataBrowserListCtrlControl::ItemNotification(DataBrowserItemID itemID, break; case kDataBrowserItemDoubleClicked: - event.SetEventType( wxEVT_COMMAND_LIST_ITEM_ACTIVATED ); + event.SetEventType( wxEVT_LIST_ITEM_ACTIVATED ); trigger = true; break; case kDataBrowserEditStarted : // TODO : how to veto ? - event.SetEventType( wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT ) ; + event.SetEventType( wxEVT_LIST_BEGIN_LABEL_EDIT ) ; trigger = true ; break ; case kDataBrowserEditStopped : // TODO probably trigger only upon the value store callback, because // here IIRC we cannot veto - event.SetEventType( wxEVT_COMMAND_LIST_END_LABEL_EDIT ) ; + event.SetEventType( wxEVT_LIST_END_LABEL_EDIT ) ; trigger = true ; break ; diff --git a/src/osx/carbon/taskbar.cpp b/src/osx/carbon/taskbar.cpp index 916ff9ccc3..01ba0fb3c8 100644 --- a/src/osx/carbon/taskbar.cpp +++ b/src/osx/carbon/taskbar.cpp @@ -60,7 +60,7 @@ public: : wxTopLevelWindow(NULL, wxID_ANY, wxEmptyString), m_impl(impl) { Connect( - -1, wxEVT_COMMAND_MENU_SELECTED, + -1, wxEVT_MENU, wxCommandEventHandler(wxTaskBarIconWindow::OnMenuEvent) ); } diff --git a/src/osx/checkbox_osx.cpp b/src/osx/checkbox_osx.cpp index e45c547eab..c82b404313 100644 --- a/src/osx/checkbox_osx.cpp +++ b/src/osx/checkbox_osx.cpp @@ -128,7 +128,7 @@ bool wxCheckBox::OSXHandleClicked( double WXUNUSED(timestampsec) ) if (sendEvent) { - wxCommandEvent event( wxEVT_COMMAND_CHECKBOX_CLICKED, m_windowId ); + wxCommandEvent event( wxEVT_CHECKBOX, m_windowId ); event.SetInt( newState ); event.SetEventObject( this ); ProcessCommand( event ); diff --git a/src/osx/checklst_osx.cpp b/src/osx/checklst_osx.cpp index 55e3b9ce4e..c73be79821 100644 --- a/src/osx/checklst_osx.cpp +++ b/src/osx/checklst_osx.cpp @@ -116,7 +116,7 @@ void wxCheckListBox::SetValueCallback( unsigned int n, wxListWidgetColumn* col , { Check( n, value.IsChecked() ); - wxCommandEvent event( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, GetId() ); + wxCommandEvent event( wxEVT_CHECKLISTBOX, GetId() ); event.SetInt( n ); event.SetString( GetString( n ) ); event.SetEventObject( this ); diff --git a/src/osx/choice_osx.cpp b/src/osx/choice_osx.cpp index d7ea4197fa..7dd17476cf 100644 --- a/src/osx/choice_osx.cpp +++ b/src/osx/choice_osx.cpp @@ -236,7 +236,7 @@ void * wxChoice::DoGetItemClientData(unsigned int n) const bool wxChoice::OSXHandleClicked( double WXUNUSED(timestampsec) ) { - SendSelectionChangedEvent(wxEVT_COMMAND_CHOICE_SELECTED); + SendSelectionChangedEvent(wxEVT_CHOICE); return true ; } diff --git a/src/osx/cocoa/combobox.mm b/src/osx/cocoa/combobox.mm index f0d4ea6677..f001957006 100644 --- a/src/osx/cocoa/combobox.mm +++ b/src/osx/cocoa/combobox.mm @@ -62,7 +62,7 @@ { wxWindow* wxpeer = (wxWindow*) impl->GetWXPeer(); if ( wxpeer ) { - wxCommandEvent event(wxEVT_COMMAND_TEXT_UPDATED, wxpeer->GetId()); + wxCommandEvent event(wxEVT_TEXT, wxpeer->GetId()); event.SetEventObject( wxpeer ); event.SetString( static_cast(wxpeer)->GetValue() ); wxpeer->HandleWindowEvent( event ); @@ -80,7 +80,7 @@ if ( wxpeer ) { const int sel = wxpeer->GetSelection(); - wxCommandEvent event(wxEVT_COMMAND_COMBOBOX_SELECTED, wxpeer->GetId()); + wxCommandEvent event(wxEVT_COMBOBOX, wxpeer->GetId()); event.SetEventObject( wxpeer ); event.SetInt( sel ); event.SetString( wxpeer->GetString(sel) ); diff --git a/src/osx/cocoa/dataview.mm b/src/osx/cocoa/dataview.mm index 632af4b04b..829b5dc5b0 100644 --- a/src/osx/cocoa/dataview.mm +++ b/src/osx/cocoa/dataview.mm @@ -542,7 +542,7 @@ outlineView:(NSOutlineView*)outlineView wxCHECK_MSG( dvc->GetModel(), false, "Pointer to model not set correctly." ); - wxDataViewEvent event(wxEVT_COMMAND_DATAVIEW_ITEM_DROP, dvc->GetId()); + wxDataViewEvent event(wxEVT_DATAVIEW_ITEM_DROP, dvc->GetId()); event.SetEventObject(dvc); event.SetItem(wxDataViewItemFromItem(item)); event.SetModel(dvc->GetModel()); @@ -753,7 +753,7 @@ outlineView:(NSOutlineView*)outlineView // send first the event to wxWidgets that the sorting has changed so that // the program can do special actions before the sorting actually starts: - wxDataViewEvent event(wxEVT_COMMAND_DATAVIEW_COLUMN_SORTED,dvc->GetId()); // variable definition + wxDataViewEvent event(wxEVT_DATAVIEW_COLUMN_SORTED,dvc->GetId()); // variable definition event.SetEventObject(dvc); if (noOfDescriptors > 0) @@ -792,7 +792,7 @@ outlineView:(NSOutlineView*)outlineView wxCHECK_MSG(dvc->GetModel(), false, "Pointer to model not set correctly."); wxDataViewEvent - event(wxEVT_COMMAND_DATAVIEW_ITEM_DROP_POSSIBLE,dvc->GetId()); + event(wxEVT_DATAVIEW_ITEM_DROP_POSSIBLE,dvc->GetId()); event.SetEventObject(dvc); event.SetItem(wxDataViewItemFromItem(item)); @@ -897,7 +897,7 @@ outlineView:(NSOutlineView*)outlineView // send a begin drag event for all selected items and proceed with // dragging unless the event is vetoed: wxDataViewEvent - event(wxEVT_COMMAND_DATAVIEW_ITEM_BEGIN_DRAG,dvc->GetId()); + event(wxEVT_DATAVIEW_ITEM_BEGIN_DRAG,dvc->GetId()); event.SetEventObject(dvc); event.SetModel(dvc->GetModel()); @@ -1624,7 +1624,7 @@ outlineView:(NSOutlineView*)outlineView // sent whether the cell is editable or not wxDataViewCtrl* const dvc = implementation->GetDataViewCtrl(); - wxDataViewEvent event(wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED,dvc->GetId()); + wxDataViewEvent event(wxEVT_DATAVIEW_ITEM_ACTIVATED,dvc->GetId()); event.SetEventObject(dvc); @@ -1645,7 +1645,7 @@ outlineView:(NSOutlineView*)outlineView // menu should be shown or not wxDataViewCtrl* const dvc = implementation->GetDataViewCtrl(); - wxDataViewEvent event(wxEVT_COMMAND_DATAVIEW_ITEM_CONTEXT_MENU,dvc->GetId()); + wxDataViewEvent event(wxEVT_DATAVIEW_ITEM_CONTEXT_MENU,dvc->GetId()); wxDataViewItemArray selectedItems; @@ -1674,7 +1674,7 @@ outlineView:(NSOutlineView*)outlineView wxDataViewCtrl* const dvc = implementation->GetDataViewCtrl(); wxDataViewEvent - event(wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_CLICK,dvc->GetId()); + event(wxEVT_DATAVIEW_COLUMN_HEADER_CLICK,dvc->GetId()); // first, send an event that the user clicked into a column's header: @@ -1716,7 +1716,7 @@ outlineView:(NSOutlineView*)outlineView wxDataViewCtrl* const dvc = implementation->GetDataViewCtrl(); - wxDataViewEvent event(wxEVT_COMMAND_DATAVIEW_ITEM_COLLAPSING,dvc->GetId()); + wxDataViewEvent event(wxEVT_DATAVIEW_ITEM_COLLAPSING,dvc->GetId()); event.SetEventObject(dvc); @@ -1734,7 +1734,7 @@ outlineView:(NSOutlineView*)outlineView wxDataViewCtrl* const dvc = implementation->GetDataViewCtrl(); - wxDataViewEvent event(wxEVT_COMMAND_DATAVIEW_ITEM_EXPANDING,dvc->GetId()); + wxDataViewEvent event(wxEVT_DATAVIEW_ITEM_EXPANDING,dvc->GetId()); event.SetEventObject(dvc); @@ -1809,7 +1809,7 @@ outlineView:(NSOutlineView*)outlineView wxDataViewCtrl* const dvc = implementation->GetDataViewCtrl(); - wxDataViewEvent event(wxEVT_COMMAND_DATAVIEW_COLUMN_REORDERED,dvc->GetId()); + wxDataViewEvent event(wxEVT_DATAVIEW_COLUMN_REORDERED,dvc->GetId()); event.SetEventObject(dvc); @@ -1822,7 +1822,7 @@ outlineView:(NSOutlineView*)outlineView { wxDataViewCtrl* const dvc = implementation->GetDataViewCtrl(); - wxDataViewEvent event(wxEVT_COMMAND_DATAVIEW_ITEM_COLLAPSED,dvc->GetId()); + wxDataViewEvent event(wxEVT_DATAVIEW_ITEM_COLLAPSED,dvc->GetId()); event.SetEventObject(dvc); @@ -1835,7 +1835,7 @@ outlineView:(NSOutlineView*)outlineView { wxDataViewCtrl* const dvc = implementation->GetDataViewCtrl(); - wxDataViewEvent event(wxEVT_COMMAND_DATAVIEW_ITEM_EXPANDED,dvc->GetId()); + wxDataViewEvent event(wxEVT_DATAVIEW_ITEM_EXPANDED,dvc->GetId()); event.SetEventObject(dvc); @@ -1850,7 +1850,7 @@ outlineView:(NSOutlineView*)outlineView wxDataViewCtrl* const dvc = implementation->GetDataViewCtrl(); - wxDataViewEvent event(wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED,dvc->GetId()); + wxDataViewEvent event(wxEVT_DATAVIEW_SELECTION_CHANGED,dvc->GetId()); event.SetEventObject(dvc); event.SetModel(dvc->GetModel()); @@ -1885,7 +1885,7 @@ outlineView:(NSOutlineView*)outlineView // now, send the event: wxDataViewEvent - event(wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_STARTED,dvc->GetId()); + event(wxEVT_DATAVIEW_ITEM_EDITING_STARTED,dvc->GetId()); event.SetEventObject(dvc); event.SetItem( @@ -1905,9 +1905,9 @@ outlineView:(NSOutlineView*)outlineView // even if no event indicating a start of an editing session has been sent // (see Documentation for NSControl controlTextDidEndEditing:); this is // not expected by a user of the wxWidgets library and therefore an - // wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_DONE event is only sent if a - // corresponding wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_STARTED has been sent - // before; to check if a wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_STARTED has + // wxEVT_DATAVIEW_ITEM_EDITING_DONE event is only sent if a + // corresponding wxEVT_DATAVIEW_ITEM_EDITING_STARTED has been sent + // before; to check if a wxEVT_DATAVIEW_ITEM_EDITING_STARTED has // been sent the last edited column/row are valid: if ( currentlyEditedColumn != -1 && currentlyEditedRow != -1 ) { @@ -1920,7 +1920,7 @@ outlineView:(NSOutlineView*)outlineView // send event to wxWidgets: wxDataViewEvent - event(wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_DONE,dvc->GetId()); + event(wxEVT_DATAVIEW_ITEM_EDITING_DONE,dvc->GetId()); event.SetEventObject(dvc); event.SetItem( diff --git a/src/osx/cocoa/filedlg.mm b/src/osx/cocoa/filedlg.mm index b159a1844b..1d162848ea 100644 --- a/src/osx/cocoa/filedlg.mm +++ b/src/osx/cocoa/filedlg.mm @@ -397,7 +397,7 @@ wxWindow* wxFileDialog::CreateFilterPanel(wxWindow *extracontrol) if ( m_firstFileTypeFilter >= 0 ) m_filterChoice->SetSelection(m_firstFileTypeFilter); } - m_filterChoice->Connect(wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler(wxFileDialog::OnFilterSelected), NULL, this); + m_filterChoice->Connect(wxEVT_CHOICE, wxCommandEventHandler(wxFileDialog::OnFilterSelected), NULL, this); } if(extracontrol) diff --git a/src/osx/cocoa/listbox.mm b/src/osx/cocoa/listbox.mm index 199363d247..5bfef6d047 100644 --- a/src/osx/cocoa/listbox.mm +++ b/src/osx/cocoa/listbox.mm @@ -303,7 +303,7 @@ protected: wxListBox *list = static_cast ( impl->GetWXPeer()); wxCHECK_RET( list != NULL , wxT("Listbox expected")); - wxCommandEvent event( wxEVT_COMMAND_LISTBOX_SELECTED, list->GetId() ); + wxCommandEvent event( wxEVT_LISTBOX, list->GetId() ); if ((row < 0) || (row > (int) list->GetCount())) // OS X can select an item below the last item return; diff --git a/src/osx/cocoa/preferences.mm b/src/osx/cocoa/preferences.mm index 389e75092d..28d80e3129 100644 --- a/src/osx/cocoa/preferences.mm +++ b/src/osx/cocoa/preferences.mm @@ -67,7 +67,7 @@ public: m_toolbar->OSXSetSelectableTools(true); SetToolBar(m_toolbar); - m_toolbar->Bind(wxEVT_COMMAND_TOOL_CLICKED, + m_toolbar->Bind(wxEVT_TOOL, &wxCocoaPrefsWindow::OnPageChanged, this); Bind(wxEVT_CLOSE_WINDOW, &wxCocoaPrefsWindow::OnClose, this); } diff --git a/src/osx/cocoa/textctrl.mm b/src/osx/cocoa/textctrl.mm index 3099d4a408..6c4b6c1a88 100644 --- a/src/osx/cocoa/textctrl.mm +++ b/src/osx/cocoa/textctrl.mm @@ -148,7 +148,7 @@ NSView* wxMacEditHelper::ms_viewCurrentlyEdited = nil; int len = [*partialStringPtr length]; if ( maxLength > 0 && len > maxLength ) { - // TODO wxEVT_COMMAND_TEXT_MAXLEN + // TODO wxEVT_TEXT_MAXLEN return NO; } return YES; @@ -206,7 +206,7 @@ NSView* wxMacEditHelper::ms_viewCurrentlyEdited = nil; wxButton *def = wxDynamicCast(tlw->GetDefaultItem(), wxButton); if ( def && def->IsEnabled() ) { - wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, def->GetId() ); + wxCommandEvent event(wxEVT_BUTTON, def->GetId() ); event.SetEventObject(def); def->Command(event); handled = YES; @@ -912,7 +912,7 @@ void wxNSTextFieldControl::controlAction(WXWidget WXUNUSED(slf), wxWindow* wxpeer = (wxWindow*) GetWXPeer(); if ( wxpeer && (wxpeer->GetWindowStyle() & wxTE_PROCESS_ENTER) ) { - wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, wxpeer->GetId()); + wxCommandEvent event(wxEVT_TEXT_ENTER, wxpeer->GetId()); event.SetEventObject( wxpeer ); event.SetString( GetTextEntry()->GetValue() ); wxpeer->HandleWindowEvent( event ); diff --git a/src/osx/cocoa/window.mm b/src/osx/cocoa/window.mm index 39740378c8..e6d722ba2e 100644 --- a/src/osx/cocoa/window.mm +++ b/src/osx/cocoa/window.mm @@ -1295,14 +1295,14 @@ bool wxWidgetCocoaImpl::performKeyEquivalent(WX_NSEvent event, WXWidget slf, voi { wxEvtHandler * const handler = m_wxPeer->GetEventHandler(); - wxCommandEvent command_event( wxEVT_COMMAND_MENU_SELECTED, command ); + wxCommandEvent command_event( wxEVT_MENU, command ); command_event.SetEventObject( wxevent.GetEventObject() ); handled = handler->ProcessEvent( command_event ); if ( !handled ) { // accelerators can also be used with buttons, try them too - command_event.SetEventType(wxEVT_COMMAND_BUTTON_CLICKED); + command_event.SetEventType(wxEVT_BUTTON); handled = handler->ProcessEvent( command_event ); } } diff --git a/src/osx/combobox_osx.cpp b/src/osx/combobox_osx.cpp index 00a8e571fe..762d575df1 100644 --- a/src/osx/combobox_osx.cpp +++ b/src/osx/combobox_osx.cpp @@ -207,7 +207,7 @@ void wxComboBox::EnableTextChangedEvents(bool WXUNUSED(enable)) bool wxComboBox::OSXHandleClicked( double WXUNUSED(timestampsec) ) { - wxCommandEvent event(wxEVT_COMMAND_COMBOBOX_SELECTED, m_windowId ); + wxCommandEvent event(wxEVT_COMBOBOX, m_windowId ); event.SetInt(GetSelection()); event.SetEventObject(this); event.SetString(GetStringSelection()); diff --git a/src/osx/dataview_osx.cpp b/src/osx/dataview_osx.cpp index fd5d37e765..d840376145 100644 --- a/src/osx/dataview_osx.cpp +++ b/src/osx/dataview_osx.cpp @@ -127,7 +127,7 @@ bool wxOSXDataViewModelNotifier::ItemChanged(wxDataViewItem const& item) if (m_DataViewCtrlPtr->GetDataViewPeer()->Update(GetOwner()->GetParent(item),item)) { // sent the equivalent wxWidget event: - wxDataViewEvent dataViewEvent(wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED,m_DataViewCtrlPtr->GetId()); + wxDataViewEvent dataViewEvent(wxEVT_DATAVIEW_ITEM_VALUE_CHANGED,m_DataViewCtrlPtr->GetId()); dataViewEvent.SetEventObject(m_DataViewCtrlPtr); dataViewEvent.SetItem(item); @@ -147,7 +147,7 @@ bool wxOSXDataViewModelNotifier::ItemsChanged(wxDataViewItemArray const& items) { size_t const noOfItems = items.GetCount(); - wxDataViewEvent dataViewEvent(wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED,m_DataViewCtrlPtr->GetId()); + wxDataViewEvent dataViewEvent(wxEVT_DATAVIEW_ITEM_VALUE_CHANGED,m_DataViewCtrlPtr->GetId()); dataViewEvent.SetEventObject(m_DataViewCtrlPtr); @@ -213,7 +213,7 @@ bool wxOSXDataViewModelNotifier::ValueChanged(wxDataViewItem const& item, unsign wxCHECK_MSG(GetOwner() != NULL,false,"Owner not initialized."); if (m_DataViewCtrlPtr->GetDataViewPeer()->Update(GetOwner()->GetParent(item),item)) { - wxDataViewEvent dataViewEvent(wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED,m_DataViewCtrlPtr->GetId()); + wxDataViewEvent dataViewEvent(wxEVT_DATAVIEW_ITEM_VALUE_CHANGED,m_DataViewCtrlPtr->GetId()); dataViewEvent.SetEventObject(m_DataViewCtrlPtr); dataViewEvent.SetColumn(col); diff --git a/src/osx/iphone/textctrl.mm b/src/osx/iphone/textctrl.mm index ab3baf12f2..27c8dcde95 100644 --- a/src/osx/iphone/textctrl.mm +++ b/src/osx/iphone/textctrl.mm @@ -189,7 +189,7 @@ protected : wxWindow* wxpeer = (wxWindow*) impl->GetWXPeer(); if ( wxpeer && wxpeer->GetWindowStyle() & wxTE_PROCESS_ENTER ) { - wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, wxpeer->GetId()); + wxCommandEvent event(wxEVT_TEXT_ENTER, wxpeer->GetId()); event.SetEventObject( wxpeer ); event.SetString( static_cast(wxpeer)->GetValue() ); wxpeer->HandleWindowEvent( event ); @@ -663,7 +663,7 @@ void wxUITextFieldControl::controlAction(WXWidget WXUNUSED(slf), wxWindow* wxpeer = (wxWindow*) GetWXPeer(); if ( wxpeer && (wxpeer->GetWindowStyle() & wxTE_PROCESS_ENTER) ) { - wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, wxpeer->GetId()); + wxCommandEvent event(wxEVT_TEXT_ENTER, wxpeer->GetId()); event.SetEventObject( wxpeer ); event.SetString( static_cast(wxpeer)->GetValue() ); wxpeer->HandleWindowEvent( event ); diff --git a/src/osx/iphone/window.mm b/src/osx/iphone/window.mm index 2ad2b7e27f..79abdfa1b0 100644 --- a/src/osx/iphone/window.mm +++ b/src/osx/iphone/window.mm @@ -793,7 +793,7 @@ void wxWidgetIPhoneImpl::controlTextDidChange() wxTextCtrl* wxpeer = wxDynamicCast((wxWindow*)GetWXPeer(),wxTextCtrl); if ( wxpeer ) { - wxCommandEvent event(wxEVT_COMMAND_TEXT_UPDATED, wxpeer->GetId()); + wxCommandEvent event(wxEVT_TEXT, wxpeer->GetId()); event.SetEventObject( wxpeer ); event.SetString( wxpeer->GetValue() ); wxpeer->HandleWindowEvent( event ); diff --git a/src/osx/listbox_osx.cpp b/src/osx/listbox_osx.cpp index a6e8b51418..63a7bc9e4b 100644 --- a/src/osx/listbox_osx.cpp +++ b/src/osx/listbox_osx.cpp @@ -393,8 +393,8 @@ void wxListBox::SetString(unsigned int n, const wxString& s) void wxListBox::HandleLineEvent( unsigned int n, bool doubleClick ) { - wxCommandEvent event( doubleClick ? wxEVT_COMMAND_LISTBOX_DOUBLECLICKED : - wxEVT_COMMAND_LISTBOX_SELECTED, GetId() ); + wxCommandEvent event( doubleClick ? wxEVT_LISTBOX_DCLICK : + wxEVT_LISTBOX, GetId() ); event.SetEventObject( this ); if ( HasClientObjectData() ) event.SetClientObject( GetClientObject(n) ); diff --git a/src/osx/menu_osx.cpp b/src/osx/menu_osx.cpp index aca50de2cd..093da094e4 100644 --- a/src/osx/menu_osx.cpp +++ b/src/osx/menu_osx.cpp @@ -428,7 +428,7 @@ bool wxMenu::HandleCommandProcess( wxMenuItem* item, wxWindow* senderWindow ) { if ( senderWindow != NULL ) { - wxCommandEvent event(wxEVT_COMMAND_MENU_SELECTED , menuid); + wxCommandEvent event(wxEVT_MENU , menuid); event.SetEventObject(this); event.SetInt(item->IsCheckable() ? item->IsChecked() : -1); diff --git a/src/osx/notebook_osx.cpp b/src/osx/notebook_osx.cpp index 9e49d0caca..90dc488863 100644 --- a/src/osx/notebook_osx.cpp +++ b/src/osx/notebook_osx.cpp @@ -458,7 +458,7 @@ bool wxNotebook::OSXHandleClicked( double WXUNUSED(timestampsec) ) if ( newSel != m_selection ) { wxBookCtrlEvent changing( - wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, m_windowId, + wxEVT_NOTEBOOK_PAGE_CHANGING, m_windowId, newSel , m_selection ); changing.SetEventObject( this ); HandleWindowEvent( changing ); @@ -466,7 +466,7 @@ bool wxNotebook::OSXHandleClicked( double WXUNUSED(timestampsec) ) if ( changing.IsAllowed() ) { wxBookCtrlEvent event( - wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, m_windowId, + wxEVT_NOTEBOOK_PAGE_CHANGED, m_windowId, newSel, m_selection ); event.SetEventObject( this ); HandleWindowEvent( event ); diff --git a/src/osx/radiobox_osx.cpp b/src/osx/radiobox_osx.cpp index bc209286cb..e4ebe931be 100644 --- a/src/osx/radiobox_osx.cpp +++ b/src/osx/radiobox_osx.cpp @@ -38,7 +38,7 @@ void wxRadioBox::OnRadioButton( wxCommandEvent &outer ) { if ( outer.IsChecked() ) { - wxCommandEvent event( wxEVT_COMMAND_RADIOBOX_SELECTED, m_windowId ); + wxCommandEvent event( wxEVT_RADIOBOX, m_windowId ); int i = GetSelection() ; event.SetInt(i); event.SetString(GetString(i)); @@ -265,7 +265,7 @@ void wxRadioBox::SetString(unsigned int item,const wxString& label) } // Sets a button by passing the desired position. This does not cause -// wxEVT_COMMAND_RADIOBOX_SELECTED event to get emitted +// wxEVT_RADIOBOX event to get emitted // void wxRadioBox::SetSelection(int item) { diff --git a/src/osx/radiobut_osx.cpp b/src/osx/radiobut_osx.cpp index 12f51b5b5b..6c511bc8e0 100644 --- a/src/osx/radiobut_osx.cpp +++ b/src/osx/radiobut_osx.cpp @@ -127,7 +127,7 @@ bool wxRadioButton::OSXHandleClicked( double WXUNUSED(timestampsec) ) SetValue( true ); - wxCommandEvent event2( wxEVT_COMMAND_RADIOBUTTON_SELECTED, m_windowId ); + wxCommandEvent event2( wxEVT_RADIOBUTTON, m_windowId ); event2.SetEventObject( this ); event2.SetInt( true ); ProcessCommand( event2 ); diff --git a/src/osx/slider_osx.cpp b/src/osx/slider_osx.cpp index f532b5691b..4a358a3906 100644 --- a/src/osx/slider_osx.cpp +++ b/src/osx/slider_osx.cpp @@ -299,7 +299,7 @@ void wxSlider::TriggerScrollEvent( wxEventType scrollEvent) event.SetEventObject( this ); HandleWindowEvent( event ); - wxCommandEvent cevent( wxEVT_COMMAND_SLIDER_UPDATED, m_windowId ); + wxCommandEvent cevent( wxEVT_SLIDER, m_windowId ); cevent.SetInt( value ); cevent.SetEventObject( this ); HandleWindowEvent( cevent ); diff --git a/src/osx/srchctrl_osx.cpp b/src/osx/srchctrl_osx.cpp index 9a300ff33e..03332a6910 100644 --- a/src/osx/srchctrl_osx.cpp +++ b/src/osx/srchctrl_osx.cpp @@ -203,7 +203,7 @@ bool wxSearchCtrl::Create(wxWindow *parent, wxWindowID id, bool wxSearchCtrl::HandleSearchFieldSearchHit() { - wxCommandEvent event(wxEVT_COMMAND_SEARCHCTRL_SEARCH_BTN, m_windowId ); + wxCommandEvent event(wxEVT_SEARCHCTRL_SEARCH_BTN, m_windowId ); event.SetEventObject(this); // provide the string to search for directly in the event, this is more @@ -215,7 +215,7 @@ bool wxSearchCtrl::HandleSearchFieldSearchHit() bool wxSearchCtrl::HandleSearchFieldCancelHit() { - wxCommandEvent event(wxEVT_COMMAND_SEARCHCTRL_CANCEL_BTN, m_windowId ); + wxCommandEvent event(wxEVT_SEARCHCTRL_CANCEL_BTN, m_windowId ); event.SetEventObject(this); return ProcessCommand(event); } diff --git a/src/osx/textctrl_osx.cpp b/src/osx/textctrl_osx.cpp index aa500bce44..e513b16b7e 100644 --- a/src/osx/textctrl_osx.cpp +++ b/src/osx/textctrl_osx.cpp @@ -285,7 +285,7 @@ void wxTextCtrl::Copy() { if (CanCopy()) { - wxClipboardTextEvent evt(wxEVT_COMMAND_TEXT_COPY, GetId()); + wxClipboardTextEvent evt(wxEVT_TEXT_COPY, GetId()); evt.SetEventObject(this); if (!GetEventHandler()->ProcessEvent(evt)) { @@ -298,7 +298,7 @@ void wxTextCtrl::Cut() { if (CanCut()) { - wxClipboardTextEvent evt(wxEVT_COMMAND_TEXT_CUT, GetId()); + wxClipboardTextEvent evt(wxEVT_TEXT_CUT, GetId()); evt.SetEventObject(this); if (!GetEventHandler()->ProcessEvent(evt)) { @@ -313,7 +313,7 @@ void wxTextCtrl::Paste() { if (CanPaste()) { - wxClipboardTextEvent evt(wxEVT_COMMAND_TEXT_PASTE, GetId()); + wxClipboardTextEvent evt(wxEVT_TEXT_PASTE, GetId()); evt.SetEventObject(this); if (!GetEventHandler()->ProcessEvent(evt)) { @@ -401,7 +401,7 @@ void wxTextCtrl::OnChar(wxKeyEvent& event) case WXK_RETURN: if (m_windowStyle & wxTE_PROCESS_ENTER) { - wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId); + wxCommandEvent event(wxEVT_TEXT_ENTER, m_windowId); event.SetEventObject( this ); event.SetString( GetValue() ); if ( HandleWindowEvent(event) ) @@ -416,7 +416,7 @@ void wxTextCtrl::OnChar(wxKeyEvent& event) wxButton *def = wxDynamicCast(tlw->GetDefaultItem(), wxButton); if ( def && def->IsEnabled() ) { - wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, def->GetId() ); + wxCommandEvent event(wxEVT_BUTTON, def->GetId() ); event.SetEventObject(def); def->Command(event); @@ -469,7 +469,7 @@ void wxTextCtrl::OnChar(wxKeyEvent& event) key == WXK_DELETE || key == WXK_BACK) { - wxCommandEvent event1(wxEVT_COMMAND_TEXT_UPDATED, m_windowId); + wxCommandEvent event1(wxEVT_TEXT, m_windowId); event1.SetEventObject( this ); wxPostEvent( GetEventHandler(), event1 ); } diff --git a/src/osx/tglbtn_osx.cpp b/src/osx/tglbtn_osx.cpp index 5eb31a43bc..abb3c193d6 100644 --- a/src/osx/tglbtn_osx.cpp +++ b/src/osx/tglbtn_osx.cpp @@ -31,7 +31,7 @@ // ---------------------------------------------------------------------------- IMPLEMENT_DYNAMIC_CLASS(wxToggleButton, wxControl) -wxDEFINE_EVENT( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEvent ); +wxDEFINE_EVENT( wxEVT_TOGGLEBUTTON, wxCommandEvent ); // ============================================================================ // implementation @@ -94,7 +94,7 @@ void wxToggleButton::Command(wxCommandEvent & event) bool wxToggleButton::OSXHandleClicked( double WXUNUSED(timestampsec) ) { - wxCommandEvent event(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, m_windowId); + wxCommandEvent event(wxEVT_TOGGLEBUTTON, m_windowId); event.SetInt(GetValue()); event.SetEventObject(this); ProcessCommand(event); diff --git a/src/osx/webview_webkit.mm b/src/osx/webview_webkit.mm index 0340ca7a02..018dacf3f5 100644 --- a/src/osx/webview_webkit.mm +++ b/src/osx/webview_webkit.mm @@ -1032,7 +1032,7 @@ void wxWebViewWebKit::RegisterHandler(wxSharedPtr handler) if (webKitWindow && frame == [sender mainFrame]){ NSString *url = [[[[frame dataSource] request] URL] absoluteString]; wxString target = wxStringWithNSString([frame name]); - wxWebViewEvent event(wxEVT_COMMAND_WEBVIEW_NAVIGATED, + wxWebViewEvent event(wxEVT_WEBVIEW_NAVIGATED, webKitWindow->GetId(), wxStringWithNSString( url ), target); @@ -1050,7 +1050,7 @@ void wxWebViewWebKit::RegisterHandler(wxSharedPtr handler) NSString *url = [[[[frame dataSource] request] URL] absoluteString]; wxString target = wxStringWithNSString([frame name]); - wxWebViewEvent event(wxEVT_COMMAND_WEBVIEW_LOADED, + wxWebViewEvent event(wxEVT_WEBVIEW_LOADED, webKitWindow->GetId(), wxStringWithNSString( url ), target); @@ -1150,7 +1150,7 @@ wxString nsErrorToWxHtmlError(NSError* error, wxWebViewNavigationError* out) wxWebViewNavigationError type; wxString description = nsErrorToWxHtmlError(error, &type); - wxWebViewEvent event(wxEVT_COMMAND_WEBVIEW_ERROR, + wxWebViewEvent event(wxEVT_WEBVIEW_ERROR, webKitWindow->GetId(), wxStringWithNSString( url ), wxEmptyString); @@ -1176,7 +1176,7 @@ wxString nsErrorToWxHtmlError(NSError* error, wxWebViewNavigationError* out) wxWebViewNavigationError type; wxString description = nsErrorToWxHtmlError(error, &type); - wxWebViewEvent event(wxEVT_COMMAND_WEBVIEW_ERROR, + wxWebViewEvent event(wxEVT_WEBVIEW_ERROR, webKitWindow->GetId(), wxStringWithNSString( url ), wxEmptyString); @@ -1192,7 +1192,7 @@ wxString nsErrorToWxHtmlError(NSError* error, wxWebViewNavigationError* out) forFrame:(WebFrame *)frame { wxString target = wxStringWithNSString([frame name]); - wxWebViewEvent event(wxEVT_COMMAND_WEBVIEW_TITLE_CHANGED, + wxWebViewEvent event(wxEVT_WEBVIEW_TITLE_CHANGED, webKitWindow->GetId(), webKitWindow->GetCurrentURL(), target); @@ -1224,7 +1224,7 @@ wxString nsErrorToWxHtmlError(NSError* error, wxWebViewNavigationError* out) webKitWindow->m_busy = true; NSString *url = [[request URL] absoluteString]; wxString target = wxStringWithNSString([frame name]); - wxWebViewEvent event(wxEVT_COMMAND_WEBVIEW_NAVIGATING, + wxWebViewEvent event(wxEVT_WEBVIEW_NAVIGATING, webKitWindow->GetId(), wxStringWithNSString( url ), target); @@ -1251,7 +1251,7 @@ wxString nsErrorToWxHtmlError(NSError* error, wxWebViewNavigationError* out) wxUnusedVar(actionInformation); NSString *url = [[request URL] absoluteString]; - wxWebViewEvent event(wxEVT_COMMAND_WEBVIEW_NEWWINDOW, + wxWebViewEvent event(wxEVT_WEBVIEW_NEWWINDOW, webKitWindow->GetId(), wxStringWithNSString( url ), ""); diff --git a/src/osx/window_osx.cpp b/src/osx/window_osx.cpp index cd7a53c8aa..14203e3978 100644 --- a/src/osx/window_osx.cpp +++ b/src/osx/window_osx.cpp @@ -2740,13 +2740,13 @@ bool wxWindowMac::OSXHandleKeyEvent( wxKeyEvent& event ) { wxEvtHandler * const handler = ancestor->GetEventHandler(); - wxCommandEvent command_event( wxEVT_COMMAND_MENU_SELECTED, command ); + wxCommandEvent command_event( wxEVT_MENU, command ); handled = handler->ProcessEvent( command_event ); if ( !handled ) { // accelerators can also be used with buttons, try them too - command_event.SetEventType(wxEVT_COMMAND_BUTTON_CLICKED); + command_event.SetEventType(wxEVT_BUTTON); handled = handler->ProcessEvent( command_event ); } diff --git a/src/propgrid/advprops.cpp b/src/propgrid/advprops.cpp index a634885003..c5189457df 100644 --- a/src/propgrid/advprops.cpp +++ b/src/propgrid/advprops.cpp @@ -1287,7 +1287,7 @@ bool wxSystemColourProperty::OnEvent( wxPropertyGrid* propgrid, // switched to one that has wxButton as well. askColour = true; } - else if ( event.GetEventType() == wxEVT_COMMAND_COMBOBOX_SELECTED ) + else if ( event.GetEventType() == wxEVT_COMBOBOX ) { // Must override index detection since at this point GetIndex() // will return old value. diff --git a/src/propgrid/editors.cpp b/src/propgrid/editors.cpp index fe58ba0ef7..1817abc615 100644 --- a/src/propgrid/editors.cpp +++ b/src/propgrid/editors.cpp @@ -406,14 +406,14 @@ bool wxPGTextCtrlEditor::OnTextCtrlEvent( wxPropertyGrid* propGrid, if ( !ctrl ) return false; - if ( event.GetEventType() == wxEVT_COMMAND_TEXT_ENTER ) + if ( event.GetEventType() == wxEVT_TEXT_ENTER ) { if ( propGrid->IsEditorsValueModified() ) { return true; } } - else if ( event.GetEventType() == wxEVT_COMMAND_TEXT_UPDATED ) + else if ( event.GetEventType() == wxEVT_TEXT ) { // // Pass this event outside wxPropertyGrid so that, @@ -1129,7 +1129,7 @@ void wxPGChoiceEditor::DeleteItem( wxWindow* ctrl, int index ) const bool wxPGChoiceEditor::OnEvent( wxPropertyGrid* propGrid, wxPGProperty* property, wxWindow* ctrl, wxEvent& event ) const { - if ( event.GetEventType() == wxEVT_COMMAND_COMBOBOX_SELECTED ) + if ( event.GetEventType() == wxEVT_COMBOBOX ) { wxPGComboBox* cb = (wxPGComboBox*)ctrl; int index = cb->GetSelection(); @@ -1587,7 +1587,7 @@ void wxSimpleCheckBox::SetValue( int value ) } Refresh(); - wxCommandEvent evt(wxEVT_COMMAND_CHECKBOX_CLICKED,GetParent()->GetId()); + wxCommandEvent evt(wxEVT_CHECKBOX,GetParent()->GetId()); wxPropertyGrid* propGrid = (wxPropertyGrid*) GetParent(); wxASSERT( wxDynamicCast(propGrid, wxPropertyGrid) ); @@ -1680,7 +1680,7 @@ void wxPGCheckBoxEditor::UpdateControl( wxPGProperty* property, bool wxPGCheckBoxEditor::OnEvent( wxPropertyGrid* WXUNUSED(propGrid), wxPGProperty* WXUNUSED(property), wxWindow* WXUNUSED(ctrl), wxEvent& event ) const { - if ( event.GetEventType() == wxEVT_COMMAND_CHECKBOX_CLICKED ) + if ( event.GetEventType() == wxEVT_CHECKBOX ) { return true; } diff --git a/src/propgrid/manager.cpp b/src/propgrid/manager.cpp index 788af596d3..99d6e145fc 100644 --- a/src/propgrid/manager.cpp +++ b/src/propgrid/manager.cpp @@ -355,7 +355,7 @@ private: int col = hcEvent.GetColumn(); int evtType = event.GetEventType(); - if ( evtType == wxEVT_COMMAND_HEADER_RESIZING ) + if ( evtType == wxEVT_HEADER_RESIZING ) { int colWidth = hcEvent.GetWidth(); @@ -367,7 +367,7 @@ private: return true; } - else if ( evtType == wxEVT_COMMAND_HEADER_BEGIN_RESIZE ) + else if ( evtType == wxEVT_HEADER_BEGIN_RESIZE ) { // Never allow column resize if layout is static if ( m_manager->HasFlag(wxPG_STATIC_SPLITTER) ) @@ -380,7 +380,7 @@ private: return true; } - else if ( evtType == wxEVT_COMMAND_HEADER_END_RESIZE ) + else if ( evtType == wxEVT_HEADER_END_RESIZE ) { pg->SendEvent(wxEVT_PG_COL_END_DRAG, NULL, NULL, 0, @@ -1032,7 +1032,7 @@ wxPropertyGridPage* wxPropertyGridManager::InsertPage( int index, // Connect to toolbar button events. Connect(pageObj->m_toolId, - wxEVT_COMMAND_TOOL_CLICKED, + wxEVT_TOOL, wxCommandEventHandler( wxPropertyGridManager::OnToolbarClick)); @@ -1515,11 +1515,11 @@ void wxPropertyGridManager::RecreateControls() m_pToolbar->Realize(); Connect(m_categorizedModeToolId, - wxEVT_COMMAND_TOOL_CLICKED, + wxEVT_TOOL, wxCommandEventHandler( wxPropertyGridManager::OnToolbarClick)); Connect(m_alphabeticModeToolId, - wxEVT_COMMAND_TOOL_CLICKED, + wxEVT_TOOL, wxCommandEventHandler( wxPropertyGridManager::OnToolbarClick)); } diff --git a/src/propgrid/propgrid.cpp b/src/propgrid/propgrid.cpp index aa61cf944d..a4f5b585f4 100644 --- a/src/propgrid/propgrid.cpp +++ b/src/propgrid/propgrid.cpp @@ -994,7 +994,7 @@ void wxPropertyGrid::DoBeginLabelEdit( unsigned int colIndex, colIndex); wxWindowID id = tc->GetId(); - tc->Connect(id, wxEVT_COMMAND_TEXT_ENTER, + tc->Connect(id, wxEVT_TEXT_ENTER, wxCommandEventHandler(wxPropertyGrid::OnLabelEditorEnterPress), NULL, this); tc->Connect(id, wxEVT_KEY_DOWN, @@ -3560,7 +3560,7 @@ bool wxPropertyGrid::HandleCustomEditorEvent( wxEvent &event ) // // Filter out excess wxTextCtrl modified events - if ( event.GetEventType() == wxEVT_COMMAND_TEXT_UPDATED && wnd ) + if ( event.GetEventType() == wxEVT_TEXT && wnd ) { if ( wxDynamicCast(wnd, wxTextCtrl) ) { @@ -3596,7 +3596,7 @@ bool wxPropertyGrid::HandleCustomEditorEvent( wxEvent &event ) // // Try common button handling - if ( m_wndEditor2 && event.GetEventType() == wxEVT_COMMAND_BUTTON_CLICKED ) + if ( m_wndEditor2 && event.GetEventType() == wxEVT_BUTTON ) { wxPGEditorDialogAdapter* adapter = selected->GetEditorDialog(); @@ -3604,7 +3604,7 @@ bool wxPropertyGrid::HandleCustomEditorEvent( wxEvent &event ) { buttonWasHandled = true; // Store as res2, as previously (and still currently alternatively) - // dialogs can be shown by handling wxEVT_COMMAND_BUTTON_CLICKED + // dialogs can be shown by handling wxEVT_BUTTON // in wxPGProperty::OnEvent(). adapter->ShowDialog( this, selected ); delete adapter; @@ -3676,7 +3676,7 @@ bool wxPropertyGrid::HandleCustomEditorEvent( wxEvent &event ) // Regardless of editor type, unfocus editor on // text-editing related enter press. - if ( event.GetEventType() == wxEVT_COMMAND_TEXT_ENTER ) + if ( event.GetEventType() == wxEVT_TEXT_ENTER ) { SetFocusOnCanvas(); } @@ -3687,16 +3687,16 @@ bool wxPropertyGrid::HandleCustomEditorEvent( wxEvent &event ) // Regardless of editor type, unfocus editor on // text-editing related enter press. - if ( event.GetEventType() == wxEVT_COMMAND_TEXT_ENTER ) + if ( event.GetEventType() == wxEVT_TEXT_ENTER ) { SetFocusOnCanvas(); } // Let unhandled button click events go to the parent - if ( !buttonWasHandled && event.GetEventType() == wxEVT_COMMAND_BUTTON_CLICKED ) + if ( !buttonWasHandled && event.GetEventType() == wxEVT_BUTTON ) { result = true; - wxCommandEvent evt(wxEVT_COMMAND_BUTTON_CLICKED,GetId()); + wxCommandEvent evt(wxEVT_BUTTON,GetId()); GetEventHandler()->AddPendingEvent(evt); } } @@ -3891,7 +3891,7 @@ private: // NB: On wxMSW, a wxTextCtrl with wxTE_PROCESS_ENTER // may beep annoyingly if that event is skipped // and passed to parent event handler. - if ( event.GetEventType() == wxEVT_COMMAND_TEXT_ENTER ) + if ( event.GetEventType() == wxEVT_TEXT_ENTER ) return true; return wxEvtHandler::ProcessEvent(event); @@ -5774,7 +5774,7 @@ bool wxPropertyGrid::ButtonTriggerKeyTest( int action, wxKeyEvent& event ) if ( action == wxPG_ACTION_PRESS_BUTTON && m_wndEditor2 ) { - wxCommandEvent evt(wxEVT_COMMAND_BUTTON_CLICKED, m_wndEditor2->GetId()); + wxCommandEvent evt(wxEVT_BUTTON, m_wndEditor2->GetId()); GetEventHandler()->AddPendingEvent(evt); return true; } diff --git a/src/propgrid/props.cpp b/src/propgrid/props.cpp index 7228b910e7..8c7f259679 100644 --- a/src/propgrid/props.cpp +++ b/src/propgrid/props.cpp @@ -2209,26 +2209,26 @@ bool wxPGArrayEditorDialog::Create( wxWindow *parent, but = m_elb->GetNewButton(); m_elbSubPanel = but->GetParent(); - but->Connect(but->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, + but->Connect(but->GetId(), wxEVT_BUTTON, wxCommandEventHandler(wxPGArrayEditorDialog::OnAddClick), NULL, this); but = m_elb->GetDelButton(); - but->Connect(but->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, + but->Connect(but->GetId(), wxEVT_BUTTON, wxCommandEventHandler(wxPGArrayEditorDialog::OnDeleteClick), NULL, this); but = m_elb->GetUpButton(); - but->Connect(but->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, + but->Connect(but->GetId(), wxEVT_BUTTON, wxCommandEventHandler(wxPGArrayEditorDialog::OnUpClick), NULL, this); but = m_elb->GetDownButton(); - but->Connect(but->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, + but->Connect(but->GetId(), wxEVT_BUTTON, wxCommandEventHandler(wxPGArrayEditorDialog::OnDownClick), NULL, this); - lc->Connect(lc->GetId(), wxEVT_COMMAND_LIST_END_LABEL_EDIT, + lc->Connect(lc->GetId(), wxEVT_LIST_END_LABEL_EDIT, wxListEventHandler(wxPGArrayEditorDialog::OnEndLabelEdit), NULL, this); diff --git a/src/ribbon/bar.cpp b/src/ribbon/bar.cpp index b2d008d734..d60cf26179 100644 --- a/src/ribbon/bar.cpp +++ b/src/ribbon/bar.cpp @@ -34,15 +34,15 @@ WX_DEFINE_USER_EXPORTED_OBJARRAY(wxRibbonPageTabInfoArray) -wxDEFINE_EVENT(wxEVT_COMMAND_RIBBONBAR_PAGE_CHANGED, wxRibbonBarEvent); -wxDEFINE_EVENT(wxEVT_COMMAND_RIBBONBAR_PAGE_CHANGING, wxRibbonBarEvent); -wxDEFINE_EVENT(wxEVT_COMMAND_RIBBONBAR_TAB_MIDDLE_DOWN, wxRibbonBarEvent); -wxDEFINE_EVENT(wxEVT_COMMAND_RIBBONBAR_TAB_MIDDLE_UP, wxRibbonBarEvent); -wxDEFINE_EVENT(wxEVT_COMMAND_RIBBONBAR_TAB_RIGHT_DOWN, wxRibbonBarEvent); -wxDEFINE_EVENT(wxEVT_COMMAND_RIBBONBAR_TAB_RIGHT_UP, wxRibbonBarEvent); -wxDEFINE_EVENT(wxEVT_COMMAND_RIBBONBAR_TAB_LEFT_DCLICK, wxRibbonBarEvent); -wxDEFINE_EVENT(wxEVT_COMMAND_RIBBONBAR_TOGGLED, wxRibbonBarEvent); -wxDEFINE_EVENT(wxEVT_COMMAND_RIBBONBAR_HELP_CLICKED, wxRibbonBarEvent); +wxDEFINE_EVENT(wxEVT_RIBBONBAR_PAGE_CHANGED, wxRibbonBarEvent); +wxDEFINE_EVENT(wxEVT_RIBBONBAR_PAGE_CHANGING, wxRibbonBarEvent); +wxDEFINE_EVENT(wxEVT_RIBBONBAR_TAB_MIDDLE_DOWN, wxRibbonBarEvent); +wxDEFINE_EVENT(wxEVT_RIBBONBAR_TAB_MIDDLE_UP, wxRibbonBarEvent); +wxDEFINE_EVENT(wxEVT_RIBBONBAR_TAB_RIGHT_DOWN, wxRibbonBarEvent); +wxDEFINE_EVENT(wxEVT_RIBBONBAR_TAB_RIGHT_UP, wxRibbonBarEvent); +wxDEFINE_EVENT(wxEVT_RIBBONBAR_TAB_LEFT_DCLICK, wxRibbonBarEvent); +wxDEFINE_EVENT(wxEVT_RIBBONBAR_TOGGLED, wxRibbonBarEvent); +wxDEFINE_EVENT(wxEVT_RIBBONBAR_HELP_CLICK, wxRibbonBarEvent); IMPLEMENT_CLASS(wxRibbonBar, wxRibbonControl) IMPLEMENT_DYNAMIC_CLASS(wxRibbonBarEvent, wxNotifyEvent) @@ -994,14 +994,14 @@ void wxRibbonBar::OnMouseLeftDown(wxMouseEvent& evt) } if(tab && tab != &m_pages.Item(m_current_page)) { - wxRibbonBarEvent query(wxEVT_COMMAND_RIBBONBAR_PAGE_CHANGING, GetId(), tab->page); + wxRibbonBarEvent query(wxEVT_RIBBONBAR_PAGE_CHANGING, GetId(), tab->page); query.SetEventObject(this); ProcessWindowEvent(query); if(query.IsAllowed()) { SetActivePage(query.GetPage()); - wxRibbonBarEvent notification(wxEVT_COMMAND_RIBBONBAR_PAGE_CHANGED, GetId(), m_pages.Item(m_current_page).page); + wxRibbonBarEvent notification(wxEVT_RIBBONBAR_PAGE_CHANGED, GetId(), m_pages.Item(m_current_page).page); notification.SetEventObject(this); ProcessWindowEvent(notification); } @@ -1035,13 +1035,13 @@ void wxRibbonBar::OnMouseLeftDown(wxMouseEvent& evt) m_ribbon_state = wxRIBBON_BAR_MINIMIZED; else m_ribbon_state = wxRIBBON_BAR_PINNED; - wxRibbonBarEvent event(wxEVT_COMMAND_RIBBONBAR_TOGGLED, GetId()); + wxRibbonBarEvent event(wxEVT_RIBBONBAR_TOGGLED, GetId()); event.SetEventObject(this); ProcessWindowEvent(event); } if ( m_help_button_rect.Contains(position) ) { - wxRibbonBarEvent event(wxEVT_COMMAND_RIBBONBAR_HELP_CLICKED, GetId()); + wxRibbonBarEvent event(wxEVT_RIBBONBAR_HELP_CLICK, GetId()); event.SetEventObject(this); ProcessWindowEvent(event); } @@ -1143,22 +1143,22 @@ void wxRibbonBar::RefreshTabBar() void wxRibbonBar::OnMouseMiddleDown(wxMouseEvent& evt) { - DoMouseButtonCommon(evt, wxEVT_COMMAND_RIBBONBAR_TAB_MIDDLE_DOWN); + DoMouseButtonCommon(evt, wxEVT_RIBBONBAR_TAB_MIDDLE_DOWN); } void wxRibbonBar::OnMouseMiddleUp(wxMouseEvent& evt) { - DoMouseButtonCommon(evt, wxEVT_COMMAND_RIBBONBAR_TAB_MIDDLE_UP); + DoMouseButtonCommon(evt, wxEVT_RIBBONBAR_TAB_MIDDLE_UP); } void wxRibbonBar::OnMouseRightDown(wxMouseEvent& evt) { - DoMouseButtonCommon(evt, wxEVT_COMMAND_RIBBONBAR_TAB_RIGHT_DOWN); + DoMouseButtonCommon(evt, wxEVT_RIBBONBAR_TAB_RIGHT_DOWN); } void wxRibbonBar::OnMouseRightUp(wxMouseEvent& evt) { - DoMouseButtonCommon(evt, wxEVT_COMMAND_RIBBONBAR_TAB_RIGHT_UP); + DoMouseButtonCommon(evt, wxEVT_RIBBONBAR_TAB_RIGHT_UP); } void wxRibbonBar::OnMouseDoubleClick(wxMouseEvent& evt) diff --git a/src/ribbon/buttonbar.cpp b/src/ribbon/buttonbar.cpp index 7e2b3bc43a..83c009b946 100644 --- a/src/ribbon/buttonbar.cpp +++ b/src/ribbon/buttonbar.cpp @@ -29,8 +29,8 @@ #include "wx/msw/private.h" #endif -wxDEFINE_EVENT(wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEvent); -wxDEFINE_EVENT(wxEVT_COMMAND_RIBBONBUTTON_DROPDOWN_CLICKED, wxRibbonButtonBarEvent); +wxDEFINE_EVENT(wxEVT_RIBBONBUTTONBAR_CLICKED, wxRibbonButtonBarEvent); +wxDEFINE_EVENT(wxEVT_RIBBONBUTTONBAR_DROPDOWN_CLICKED, wxRibbonButtonBarEvent); IMPLEMENT_DYNAMIC_CLASS(wxRibbonButtonBarEvent, wxCommandEvent) IMPLEMENT_CLASS(wxRibbonButtonBar, wxRibbonControl) @@ -1139,9 +1139,9 @@ void wxRibbonButtonBar::OnMouseUp(wxMouseEvent& evt) do { if(size.normal_region.Contains(cursor)) - event_type = wxEVT_COMMAND_RIBBONBUTTON_CLICKED; + event_type = wxEVT_RIBBONBUTTONBAR_CLICKED; else if(size.dropdown_region.Contains(cursor)) - event_type = wxEVT_COMMAND_RIBBONBUTTON_DROPDOWN_CLICKED; + event_type = wxEVT_RIBBONBUTTONBAR_DROPDOWN_CLICKED; else break; wxRibbonButtonBarEvent notification(event_type, id); diff --git a/src/ribbon/gallery.cpp b/src/ribbon/gallery.cpp index a671a3a880..926f0cdc3e 100644 --- a/src/ribbon/gallery.cpp +++ b/src/ribbon/gallery.cpp @@ -30,9 +30,9 @@ #include "wx/msw/private.h" #endif -wxDEFINE_EVENT(wxEVT_COMMAND_RIBBONGALLERY_HOVER_CHANGED, wxRibbonGalleryEvent); -wxDEFINE_EVENT(wxEVT_COMMAND_RIBBONGALLERY_SELECTED, wxRibbonGalleryEvent); -wxDEFINE_EVENT(wxEVT_COMMAND_RIBBONGALLERY_CLICKED, wxRibbonGalleryEvent); +wxDEFINE_EVENT(wxEVT_RIBBONGALLERY_HOVER_CHANGED, wxRibbonGalleryEvent); +wxDEFINE_EVENT(wxEVT_RIBBONGALLERY_SELECTED, wxRibbonGalleryEvent); +wxDEFINE_EVENT(wxEVT_RIBBONGALLERY_CLICKED, wxRibbonGalleryEvent); IMPLEMENT_DYNAMIC_CLASS(wxRibbonGalleryEvent, wxCommandEvent) IMPLEMENT_CLASS(wxRibbonGallery, wxRibbonControl) @@ -197,7 +197,7 @@ void wxRibbonGallery::OnMouseMove(wxMouseEvent& evt) { m_hovered_item = hovered_item; wxRibbonGalleryEvent notification( - wxEVT_COMMAND_RIBBONGALLERY_HOVER_CHANGED, GetId()); + wxEVT_RIBBONGALLERY_HOVER_CHANGED, GetId()); notification.SetEventObject(this); notification.SetGallery(this); notification.SetGalleryItem(hovered_item); @@ -251,7 +251,7 @@ void wxRibbonGallery::OnMouseLeave(wxMouseEvent& WXUNUSED(evt)) { m_hovered_item = NULL; wxRibbonGalleryEvent notification( - wxEVT_COMMAND_RIBBONGALLERY_HOVER_CHANGED, GetId()); + wxEVT_RIBBONGALLERY_HOVER_CHANGED, GetId()); notification.SetEventObject(this); notification.SetGallery(this); ProcessWindowEvent(notification); @@ -341,7 +341,7 @@ void wxRibbonGallery::OnMouseUp(wxMouseEvent& evt) else if(m_mouse_active_rect == &m_extension_button_rect) { m_extension_button_state = wxRIBBON_GALLERY_BUTTON_HOVERED; - wxCommandEvent notification(wxEVT_COMMAND_BUTTON_CLICKED, + wxCommandEvent notification(wxEVT_BUTTON, GetId()); notification.SetEventObject(this); ProcessWindowEvent(notification); @@ -352,7 +352,7 @@ void wxRibbonGallery::OnMouseUp(wxMouseEvent& evt) { m_selected_item = m_active_item; wxRibbonGalleryEvent notification( - wxEVT_COMMAND_RIBBONGALLERY_SELECTED, GetId()); + wxEVT_RIBBONGALLERY_SELECTED, GetId()); notification.SetEventObject(this); notification.SetGallery(this); notification.SetGalleryItem(m_selected_item); @@ -360,7 +360,7 @@ void wxRibbonGallery::OnMouseUp(wxMouseEvent& evt) } wxRibbonGalleryEvent notification( - wxEVT_COMMAND_RIBBONGALLERY_CLICKED, GetId()); + wxEVT_RIBBONGALLERY_CLICKED, GetId()); notification.SetEventObject(this); notification.SetGallery(this); notification.SetGalleryItem(m_selected_item); diff --git a/src/ribbon/panel.cpp b/src/ribbon/panel.cpp index 0a0f8d8a27..9ad0a56bfa 100644 --- a/src/ribbon/panel.cpp +++ b/src/ribbon/panel.cpp @@ -32,7 +32,7 @@ #include "wx/msw/private.h" #endif -wxDEFINE_EVENT(wxEVT_COMMAND_RIBBONPANEL_EXTBUTTON_ACTIVATED, wxRibbonPanelEvent); +wxDEFINE_EVENT(wxEVT_RIBBONPANEL_EXTBUTTON_ACTIVATED, wxRibbonPanelEvent); IMPLEMENT_DYNAMIC_CLASS(wxRibbonPanelEvent, wxCommandEvent) @@ -776,7 +776,7 @@ void wxRibbonPanel::OnMouseClick(wxMouseEvent& WXUNUSED(evt)) } else if(IsExtButtonHovered()) { - wxRibbonPanelEvent notification(wxEVT_COMMAND_RIBBONPANEL_EXTBUTTON_ACTIVATED, GetId()); + wxRibbonPanelEvent notification(wxEVT_RIBBONPANEL_EXTBUTTON_ACTIVATED, GetId()); notification.SetEventObject(this); notification.SetPanel(this); ProcessEvent(notification); diff --git a/src/ribbon/toolbar.cpp b/src/ribbon/toolbar.cpp index fa64dcc7f9..55a6c152ae 100644 --- a/src/ribbon/toolbar.cpp +++ b/src/ribbon/toolbar.cpp @@ -57,8 +57,8 @@ public: wxSize size; }; -wxDEFINE_EVENT(wxEVT_COMMAND_RIBBONTOOL_CLICKED, wxRibbonToolBarEvent); -wxDEFINE_EVENT(wxEVT_COMMAND_RIBBONTOOL_DROPDOWN_CLICKED, wxRibbonToolBarEvent); +wxDEFINE_EVENT(wxEVT_RIBBONTOOLBAR_CLICKED, wxRibbonToolBarEvent); +wxDEFINE_EVENT(wxEVT_RIBBONTOOLBAR_DROPDOWN_CLICKED, wxRibbonToolBarEvent); IMPLEMENT_DYNAMIC_CLASS(wxRibbonToolBarEvent, wxCommandEvent) IMPLEMENT_CLASS(wxRibbonToolBar, wxRibbonControl) @@ -1133,9 +1133,9 @@ void wxRibbonToolBar::OnMouseUp(wxMouseEvent& WXUNUSED(evt)) { if(m_active_tool->state & wxRIBBON_TOOLBAR_TOOL_ACTIVE_MASK) { - wxEventType evt_type = wxEVT_COMMAND_RIBBONTOOL_CLICKED; + wxEventType evt_type = wxEVT_RIBBONTOOLBAR_CLICKED; if(m_active_tool->state & wxRIBBON_TOOLBAR_TOOL_DROPDOWN_ACTIVE) - evt_type = wxEVT_COMMAND_RIBBONTOOL_DROPDOWN_CLICKED; + evt_type = wxEVT_RIBBONTOOLBAR_DROPDOWN_CLICKED; wxRibbonToolBarEvent notification(evt_type, m_active_tool->id); if(m_active_tool->kind == wxRIBBON_BUTTON_TOGGLE) { diff --git a/src/richtext/richtextborderspage.cpp b/src/richtext/richtextborderspage.cpp index 1bc46b2510..40f66d419a 100644 --- a/src/richtext/richtextborderspage.cpp +++ b/src/richtext/richtextborderspage.cpp @@ -805,7 +805,7 @@ void wxRichTextBordersPage::OnRichtextOutlineBottomUpdate( wxUpdateUIEvent& even } /*! - * wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXT_BORDER_LEFT_CHECKBOX + * wxEVT_CHECKBOX event handler for ID_RICHTEXT_BORDER_LEFT_CHECKBOX */ void wxRichTextBordersPage::OnRichtextBorderCheckboxClick( wxCommandEvent& event ) diff --git a/src/richtext/richtextbuffer.cpp b/src/richtext/richtextbuffer.cpp index 1a6186778f..53ac73dc22 100644 --- a/src/richtext/richtextbuffer.cpp +++ b/src/richtext/richtextbuffer.cpp @@ -3788,7 +3788,7 @@ void wxRichTextParagraphLayoutBox::Reset() wxRichTextBuffer* buffer = GetBuffer(); if (buffer && buffer->GetRichTextCtrl()) { - wxRichTextEvent event(wxEVT_COMMAND_RICHTEXT_BUFFER_RESET, buffer->GetRichTextCtrl()->GetId()); + wxRichTextEvent event(wxEVT_RICHTEXT_BUFFER_RESET, buffer->GetRichTextCtrl()->GetId()); event.SetEventObject(buffer->GetRichTextCtrl()); event.SetContainer(this); @@ -8603,7 +8603,7 @@ bool wxRichTextBuffer::SetStyleSheetAndNotify(wxRichTextStyleSheet* sheet) if (GetRichTextCtrl()) winid = GetRichTextCtrl()->GetId(); - wxRichTextEvent event(wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACING, winid); + wxRichTextEvent event(wxEVT_RICHTEXT_STYLESHEET_REPLACING, winid); event.SetEventObject(GetRichTextCtrl()); event.SetContainer(GetRichTextCtrl()->GetFocusObject()); event.SetOldStyleSheet(oldSheet); @@ -8623,7 +8623,7 @@ bool wxRichTextBuffer::SetStyleSheetAndNotify(wxRichTextStyleSheet* sheet) SetStyleSheet(sheet); - event.SetEventType(wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACED); + event.SetEventType(wxEVT_RICHTEXT_STYLESHEET_REPLACED); event.SetOldStyleSheet(NULL); event.Allow(); @@ -10625,7 +10625,7 @@ bool wxRichTextAction::Do() UpdateAppearance(newCaretPosition, true /* send update event */, & optimizationLineCharPositions, & optimizationLineYPositions, true /* do */); wxRichTextEvent cmdEvent( - wxEVT_COMMAND_RICHTEXT_CONTENT_INSERTED, + wxEVT_RICHTEXT_CONTENT_INSERTED, m_ctrl ? m_ctrl->GetId() : -1); cmdEvent.SetEventObject(m_ctrl ? (wxObject*) m_ctrl : (wxObject*) m_buffer); cmdEvent.SetRange(GetRange()); @@ -10658,7 +10658,7 @@ bool wxRichTextAction::Do() UpdateAppearance(caretPos, true /* send update event */, & optimizationLineCharPositions, & optimizationLineYPositions, true /* do */); wxRichTextEvent cmdEvent( - wxEVT_COMMAND_RICHTEXT_CONTENT_DELETED, + wxEVT_RICHTEXT_CONTENT_DELETED, m_ctrl ? m_ctrl->GetId() : -1); cmdEvent.SetEventObject(m_ctrl ? (wxObject*) m_ctrl : (wxObject*) m_buffer); cmdEvent.SetRange(GetRange()); @@ -10687,7 +10687,7 @@ bool wxRichTextAction::Do() UpdateAppearance(GetPosition()); wxRichTextEvent cmdEvent( - m_cmdId == wxRICHTEXT_CHANGE_STYLE ? wxEVT_COMMAND_RICHTEXT_STYLE_CHANGED : wxEVT_COMMAND_RICHTEXT_PROPERTIES_CHANGED, + m_cmdId == wxRICHTEXT_CHANGE_STYLE ? wxEVT_RICHTEXT_STYLE_CHANGED : wxEVT_RICHTEXT_PROPERTIES_CHANGED, m_ctrl ? m_ctrl->GetId() : -1); cmdEvent.SetEventObject(m_ctrl ? (wxObject*) m_ctrl : (wxObject*) m_buffer); cmdEvent.SetRange(GetRange()); @@ -10719,7 +10719,7 @@ bool wxRichTextAction::Do() UpdateAppearance(GetPosition()); wxRichTextEvent cmdEvent( - wxEVT_COMMAND_RICHTEXT_STYLE_CHANGED, + wxEVT_RICHTEXT_STYLE_CHANGED, m_ctrl ? m_ctrl->GetId() : -1); cmdEvent.SetEventObject(m_ctrl ? (wxObject*) m_ctrl : (wxObject*) m_buffer); cmdEvent.SetRange(GetRange()); @@ -10798,7 +10798,7 @@ bool wxRichTextAction::Undo() UpdateAppearance(newCaretPosition, true, /* send update event */ & optimizationLineCharPositions, & optimizationLineYPositions, false /* undo */); wxRichTextEvent cmdEvent( - wxEVT_COMMAND_RICHTEXT_CONTENT_DELETED, + wxEVT_RICHTEXT_CONTENT_DELETED, m_ctrl ? m_ctrl->GetId() : -1); cmdEvent.SetEventObject(m_ctrl ? (wxObject*) m_ctrl : (wxObject*) m_buffer); cmdEvent.SetRange(GetRange()); @@ -10828,7 +10828,7 @@ bool wxRichTextAction::Undo() UpdateAppearance(GetPosition(), true, /* send update event */ & optimizationLineCharPositions, & optimizationLineYPositions, false /* undo */); wxRichTextEvent cmdEvent( - wxEVT_COMMAND_RICHTEXT_CONTENT_INSERTED, + wxEVT_RICHTEXT_CONTENT_INSERTED, m_ctrl ? m_ctrl->GetId() : -1); cmdEvent.SetEventObject(m_ctrl ? (wxObject*) m_ctrl : (wxObject*) m_buffer); cmdEvent.SetRange(GetRange()); @@ -10850,7 +10850,7 @@ bool wxRichTextAction::Undo() UpdateAppearance(GetPosition()); wxRichTextEvent cmdEvent( - m_cmdId == wxRICHTEXT_CHANGE_STYLE ? wxEVT_COMMAND_RICHTEXT_STYLE_CHANGED : wxEVT_COMMAND_RICHTEXT_PROPERTIES_CHANGED, + m_cmdId == wxRICHTEXT_CHANGE_STYLE ? wxEVT_RICHTEXT_STYLE_CHANGED : wxEVT_RICHTEXT_PROPERTIES_CHANGED, m_ctrl ? m_ctrl->GetId() : -1); cmdEvent.SetEventObject(m_ctrl ? (wxObject*) m_ctrl : (wxObject*) m_buffer); cmdEvent.SetRange(GetRange()); diff --git a/src/richtext/richtextbulletspage.cpp b/src/richtext/richtextbulletspage.cpp index 6fa4117648..a43b9ada3c 100644 --- a/src/richtext/richtextbulletspage.cpp +++ b/src/richtext/richtextbulletspage.cpp @@ -622,7 +622,7 @@ wxIcon wxRichTextBulletsPage::GetIconResource( const wxString& name ) } /*! - * wxEVT_COMMAND_LISTBOX_SELECTED event handler for ID_RICHTEXTBULLETSPAGE_STYLELISTBOX + * wxEVT_LISTBOX event handler for ID_RICHTEXTBULLETSPAGE_STYLELISTBOX */ void wxRichTextBulletsPage::OnStylelistboxSelected( wxCommandEvent& WXUNUSED(event) ) @@ -639,7 +639,7 @@ void wxRichTextBulletsPage::OnStylelistboxSelected( wxCommandEvent& WXUNUSED(eve } /*! - * wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL + * wxEVT_COMBOBOX event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL */ void wxRichTextBulletsPage::OnSymbolctrlSelected( wxCommandEvent& WXUNUSED(event) ) @@ -652,7 +652,7 @@ void wxRichTextBulletsPage::OnSymbolctrlSelected( wxCommandEvent& WXUNUSED(event } /*! - * wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL + * wxEVT_TEXT event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL */ void wxRichTextBulletsPage::OnSymbolctrlUpdated( wxCommandEvent& WXUNUSED(event) ) @@ -674,7 +674,7 @@ void wxRichTextBulletsPage::OnSymbolctrlUpdate( wxUpdateUIEvent& event ) } /*! - * wxEVT_COMMAND_SPINCTRL_UPDATED event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL + * wxEVT_SPINCTRL event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL */ void wxRichTextBulletsPage::OnNumberctrlUpdated( wxSpinEvent& WXUNUSED(event) ) @@ -713,7 +713,7 @@ void wxRichTextBulletsPage::OnNumberctrlDown( wxSpinEvent& WXUNUSED(event) ) } /*! - * wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL + * wxEVT_TEXT event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL */ void wxRichTextBulletsPage::OnNumberctrlTextUpdated( wxCommandEvent& WXUNUSED(event) ) @@ -735,7 +735,7 @@ void wxRichTextBulletsPage::OnNumberctrlUpdate( wxUpdateUIEvent& event ) } /*! - * wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXTBULLETSPAGE_PARENTHESESCTRL + * wxEVT_CHECKBOX event handler for ID_RICHTEXTBULLETSPAGE_PARENTHESESCTRL */ void wxRichTextBulletsPage::OnParenthesesctrlClick( wxCommandEvent& WXUNUSED(event) ) @@ -760,7 +760,7 @@ void wxRichTextBulletsPage::OnParenthesesctrlUpdate( wxUpdateUIEvent& event ) } /*! - * wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXTBULLETSPAGE_PERIODCTRL + * wxEVT_CHECKBOX event handler for ID_RICHTEXTBULLETSPAGE_PERIODCTRL */ void wxRichTextBulletsPage::OnPeriodctrlClick( wxCommandEvent& WXUNUSED(event) ) @@ -785,7 +785,7 @@ void wxRichTextBulletsPage::OnPeriodctrlUpdate( wxUpdateUIEvent& event ) } /*! - * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXTBULLETSPAGE_CHOOSE_SYMBOL + * wxEVT_BUTTON event handler for ID_RICHTEXTBULLETSPAGE_CHOOSE_SYMBOL */ void wxRichTextBulletsPage::OnChooseSymbolClick( wxCommandEvent& WXUNUSED(event) ) @@ -820,7 +820,7 @@ void wxRichTextBulletsPage::OnChooseSymbolUpdate( wxUpdateUIEvent& event ) OnSymbolUpdate(event); } /*! - * wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLFONTCTRL + * wxEVT_COMBOBOX event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLFONTCTRL */ void wxRichTextBulletsPage::OnSymbolfontctrlSelected( wxCommandEvent& WXUNUSED(event) ) @@ -831,7 +831,7 @@ void wxRichTextBulletsPage::OnSymbolfontctrlSelected( wxCommandEvent& WXUNUSED(e } /*! - * wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLFONTCTRL + * wxEVT_TEXT event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLFONTCTRL */ void wxRichTextBulletsPage::OnSymbolfontctrlUpdated( wxCommandEvent& WXUNUSED(event) ) @@ -906,7 +906,7 @@ void wxRichTextBulletsPage::OnNamestaticUpdate( wxUpdateUIEvent& event ) /*! - * wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTBULLETSPAGE_NAMECTRL + * wxEVT_COMBOBOX event handler for ID_RICHTEXTBULLETSPAGE_NAMECTRL */ void wxRichTextBulletsPage::OnNamectrlSelected( wxCommandEvent& WXUNUSED(event) ) @@ -917,7 +917,7 @@ void wxRichTextBulletsPage::OnNamectrlSelected( wxCommandEvent& WXUNUSED(event) } /*! - * wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTBULLETSPAGE_NAMECTRL + * wxEVT_TEXT event handler for ID_RICHTEXTBULLETSPAGE_NAMECTRL */ void wxRichTextBulletsPage::OnNamectrlUpdated( wxCommandEvent& WXUNUSED(event) ) @@ -938,7 +938,7 @@ void wxRichTextBulletsPage::OnNamectrlUIUpdate( wxUpdateUIEvent& event ) #endif // wxUSE_RICHTEXT /*! - * wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXTBULLETSPAGE_RIGHT_PARENTHESIS_CTRL + * wxEVT_CHECKBOX event handler for ID_RICHTEXTBULLETSPAGE_RIGHT_PARENTHESIS_CTRL */ void wxRichTextBulletsPage::OnRightParenthesisCtrlClick( wxCommandEvent& WXUNUSED(event) ) @@ -963,7 +963,7 @@ void wxRichTextBulletsPage::OnRightParenthesisCtrlUpdate( wxUpdateUIEvent& event } /*! - * wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_COMBOBOX + * wxEVT_COMBOBOX event handler for ID_COMBOBOX */ void wxRichTextBulletsPage::OnBulletAlignmentCtrlSelected( wxCommandEvent& WXUNUSED(event) ) diff --git a/src/richtext/richtextctrl.cpp b/src/richtext/richtextctrl.cpp index ce93c740a3..b330581885 100644 --- a/src/richtext/richtextctrl.cpp +++ b/src/richtext/richtextctrl.cpp @@ -49,26 +49,26 @@ #include "wx/app.h" WX_CHECK_BUILD_OPTIONS("wxRichTextCtrl") -wxDEFINE_EVENT( wxEVT_COMMAND_RICHTEXT_LEFT_CLICK, wxRichTextEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_RICHTEXT_MIDDLE_CLICK, wxRichTextEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_RICHTEXT_RIGHT_CLICK, wxRichTextEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_RICHTEXT_LEFT_DCLICK, wxRichTextEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_RICHTEXT_RETURN, wxRichTextEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_RICHTEXT_CHARACTER, wxRichTextEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_RICHTEXT_DELETE, wxRichTextEvent ); - -wxDEFINE_EVENT( wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACING, wxRichTextEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACED, wxRichTextEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGING, wxRichTextEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGED, wxRichTextEvent ); - -wxDEFINE_EVENT( wxEVT_COMMAND_RICHTEXT_CONTENT_INSERTED, wxRichTextEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_RICHTEXT_CONTENT_DELETED, wxRichTextEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_RICHTEXT_STYLE_CHANGED, wxRichTextEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_RICHTEXT_PROPERTIES_CHANGED, wxRichTextEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_RICHTEXT_SELECTION_CHANGED, wxRichTextEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_RICHTEXT_BUFFER_RESET, wxRichTextEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_RICHTEXT_FOCUS_OBJECT_CHANGED, wxRichTextEvent ); +wxDEFINE_EVENT( wxEVT_RICHTEXT_LEFT_CLICK, wxRichTextEvent ); +wxDEFINE_EVENT( wxEVT_RICHTEXT_MIDDLE_CLICK, wxRichTextEvent ); +wxDEFINE_EVENT( wxEVT_RICHTEXT_RIGHT_CLICK, wxRichTextEvent ); +wxDEFINE_EVENT( wxEVT_RICHTEXT_LEFT_DCLICK, wxRichTextEvent ); +wxDEFINE_EVENT( wxEVT_RICHTEXT_RETURN, wxRichTextEvent ); +wxDEFINE_EVENT( wxEVT_RICHTEXT_CHARACTER, wxRichTextEvent ); +wxDEFINE_EVENT( wxEVT_RICHTEXT_DELETE, wxRichTextEvent ); + +wxDEFINE_EVENT( wxEVT_RICHTEXT_STYLESHEET_REPLACING, wxRichTextEvent ); +wxDEFINE_EVENT( wxEVT_RICHTEXT_STYLESHEET_REPLACED, wxRichTextEvent ); +wxDEFINE_EVENT( wxEVT_RICHTEXT_STYLESHEET_CHANGING, wxRichTextEvent ); +wxDEFINE_EVENT( wxEVT_RICHTEXT_STYLESHEET_CHANGED, wxRichTextEvent ); + +wxDEFINE_EVENT( wxEVT_RICHTEXT_CONTENT_INSERTED, wxRichTextEvent ); +wxDEFINE_EVENT( wxEVT_RICHTEXT_CONTENT_DELETED, wxRichTextEvent ); +wxDEFINE_EVENT( wxEVT_RICHTEXT_STYLE_CHANGED, wxRichTextEvent ); +wxDEFINE_EVENT( wxEVT_RICHTEXT_PROPERTIES_CHANGED, wxRichTextEvent ); +wxDEFINE_EVENT( wxEVT_RICHTEXT_SELECTION_CHANGED, wxRichTextEvent ); +wxDEFINE_EVENT( wxEVT_RICHTEXT_BUFFER_RESET, wxRichTextEvent ); +wxDEFINE_EVENT( wxEVT_RICHTEXT_FOCUS_OBJECT_CHANGED, wxRichTextEvent ); #if wxRICHTEXT_USE_OWN_CARET @@ -691,7 +691,7 @@ void wxRichTextCtrl::OnLeftUp(wxMouseEvent& event) if ((hit != wxRICHTEXT_HITTEST_NONE) && !(hit & wxRICHTEXT_HITTEST_OUTSIDE)) { wxRichTextEvent cmdEvent( - wxEVT_COMMAND_RICHTEXT_LEFT_CLICK, + wxEVT_RICHTEXT_LEFT_CLICK, GetId()); cmdEvent.SetEventObject(this); cmdEvent.SetPosition(position); @@ -990,7 +990,7 @@ void wxRichTextCtrl::OnRightClick(wxMouseEvent& event) } wxRichTextEvent cmdEvent( - wxEVT_COMMAND_RICHTEXT_RIGHT_CLICK, + wxEVT_RICHTEXT_RIGHT_CLICK, GetId()); cmdEvent.SetEventObject(this); cmdEvent.SetPosition(position); @@ -1005,7 +1005,7 @@ void wxRichTextCtrl::OnRightClick(wxMouseEvent& event) void wxRichTextCtrl::OnLeftDClick(wxMouseEvent& WXUNUSED(event)) { wxRichTextEvent cmdEvent( - wxEVT_COMMAND_RICHTEXT_LEFT_DCLICK, + wxEVT_RICHTEXT_LEFT_DCLICK, GetId()); cmdEvent.SetEventObject(this); cmdEvent.SetPosition(m_caretPosition+1); @@ -1021,7 +1021,7 @@ void wxRichTextCtrl::OnLeftDClick(wxMouseEvent& WXUNUSED(event)) void wxRichTextCtrl::OnMiddleClick(wxMouseEvent& event) { wxRichTextEvent cmdEvent( - wxEVT_COMMAND_RICHTEXT_MIDDLE_CLICK, + wxEVT_RICHTEXT_MIDDLE_CLICK, GetId()); cmdEvent.SetEventObject(this); cmdEvent.SetPosition(m_caretPosition+1); @@ -1197,7 +1197,7 @@ void wxRichTextCtrl::OnChar(wxKeyEvent& event) ScrollIntoView(m_caretPosition, WXK_RIGHT); wxRichTextEvent cmdEvent( - wxEVT_COMMAND_RICHTEXT_RETURN, + wxEVT_RICHTEXT_RETURN, GetId()); cmdEvent.SetEventObject(this); cmdEvent.SetFlags(flags); @@ -1207,7 +1207,7 @@ void wxRichTextCtrl::OnChar(wxKeyEvent& event) if (!GetEventHandler()->ProcessEvent(cmdEvent)) { // Generate conventional event - wxCommandEvent textEvent(wxEVT_COMMAND_TEXT_ENTER, GetId()); + wxCommandEvent textEvent(wxEVT_TEXT_ENTER, GetId()); InitCommandEvent(textEvent); GetEventHandler()->ProcessEvent(textEvent); @@ -1277,10 +1277,10 @@ void wxRichTextCtrl::OnChar(wxKeyEvent& event) ScrollIntoView(m_caretPosition, WXK_LEFT); - // Always send this event; wxEVT_COMMAND_RICHTEXT_CONTENT_DELETED will be sent only if there is an actual deletion. + // Always send this event; wxEVT_RICHTEXT_CONTENT_DELETED will be sent only if there is an actual deletion. { wxRichTextEvent cmdEvent( - wxEVT_COMMAND_RICHTEXT_DELETE, + wxEVT_RICHTEXT_DELETE, GetId()); cmdEvent.SetEventObject(this); cmdEvent.SetFlags(flags); @@ -1316,7 +1316,7 @@ void wxRichTextCtrl::OnChar(wxKeyEvent& event) } wxRichTextEvent cmdEvent( - wxEVT_COMMAND_RICHTEXT_CHARACTER, + wxEVT_RICHTEXT_CHARACTER, GetId()); cmdEvent.SetEventObject(this); cmdEvent.SetFlags(flags); @@ -1501,10 +1501,10 @@ bool wxRichTextCtrl::ProcessBackKey(wxKeyEvent& event, int flags) ScrollIntoView(m_caretPosition, WXK_LEFT); - // Always send this event; wxEVT_COMMAND_RICHTEXT_CONTENT_DELETED will be sent only if there is an actual deletion. + // Always send this event; wxEVT_RICHTEXT_CONTENT_DELETED will be sent only if there is an actual deletion. { wxRichTextEvent cmdEvent( - wxEVT_COMMAND_RICHTEXT_DELETE, + wxEVT_RICHTEXT_DELETE, GetId()); cmdEvent.SetEventObject(this); cmdEvent.SetFlags(flags); @@ -4554,7 +4554,7 @@ bool wxRichTextCtrl::SetFocusObject(wxRichTextParagraphLayoutBox* obj, bool setC SetDefaultStyleToCursorStyle(); wxRichTextEvent cmdEvent( - wxEVT_COMMAND_RICHTEXT_FOCUS_OBJECT_CHANGED, + wxEVT_RICHTEXT_FOCUS_OBJECT_CHANGED, GetId()); cmdEvent.SetEventObject(this); cmdEvent.SetPosition(m_caretPosition+1); diff --git a/src/richtext/richtextfontpage.cpp b/src/richtext/richtextfontpage.cpp index aa24a1b212..81afb760dc 100644 --- a/src/richtext/richtextfontpage.cpp +++ b/src/richtext/richtextfontpage.cpp @@ -828,7 +828,7 @@ wxIcon wxRichTextFontPage::GetIconResource( const wxString& name ) } /*! - * wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTFONTPAGE_FACETEXTCTRL + * wxEVT_TEXT event handler for ID_RICHTEXTFONTPAGE_FACETEXTCTRL */ void wxRichTextFontPage::OnFaceTextCtrlUpdated( wxCommandEvent& WXUNUSED(event) ) @@ -863,7 +863,7 @@ void wxRichTextFontPage::OnFaceTextCtrlUpdated( wxCommandEvent& WXUNUSED(event) /*! - * wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTFONTPAGE_SIZETEXTCTRL + * wxEVT_TEXT event handler for ID_RICHTEXTFONTPAGE_SIZETEXTCTRL */ void wxRichTextFontPage::OnSizeTextCtrlUpdated( wxCommandEvent& WXUNUSED(event) ) @@ -879,7 +879,7 @@ void wxRichTextFontPage::OnSizeTextCtrlUpdated( wxCommandEvent& WXUNUSED(event) /*! - * wxEVT_COMMAND_LISTBOX_SELECTED event handler for ID_RICHTEXTFONTPAGE_SIZELISTBOX + * wxEVT_LISTBOX event handler for ID_RICHTEXTFONTPAGE_SIZELISTBOX */ void wxRichTextFontPage::OnSizeListBoxSelected( wxCommandEvent& event ) @@ -898,7 +898,7 @@ void wxRichTextFontPage::OnSizeListBoxSelected( wxCommandEvent& event ) } /*! - * wxEVT_COMMAND_LISTBOX_SELECTED event handler for ID_RICHTEXTFONTPAGE_FACELISTBOX + * wxEVT_LISTBOX event handler for ID_RICHTEXTFONTPAGE_FACELISTBOX */ void wxRichTextFontPage::OnFaceListBoxSelected( wxCommandEvent& WXUNUSED(event) ) @@ -917,7 +917,7 @@ void wxRichTextFontPage::OnFaceListBoxSelected( wxCommandEvent& WXUNUSED(event) } /*! - * wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTFONTPAGE_STYLECTRL + * wxEVT_COMBOBOX event handler for ID_RICHTEXTFONTPAGE_STYLECTRL */ void wxRichTextFontPage::OnStyleCtrlSelected( wxCommandEvent& WXUNUSED(event) ) @@ -930,7 +930,7 @@ void wxRichTextFontPage::OnStyleCtrlSelected( wxCommandEvent& WXUNUSED(event) ) /*! - * wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTFONTPAGE_UNDERLINING_CTRL + * wxEVT_COMBOBOX event handler for ID_RICHTEXTFONTPAGE_UNDERLINING_CTRL */ void wxRichTextFontPage::OnUnderliningCtrlSelected( wxCommandEvent& WXUNUSED(event) ) @@ -943,7 +943,7 @@ void wxRichTextFontPage::OnUnderliningCtrlSelected( wxCommandEvent& WXUNUSED(eve /*! - * wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTFONTPAGE_WEIGHTCTRL + * wxEVT_COMBOBOX event handler for ID_RICHTEXTFONTPAGE_WEIGHTCTRL */ void wxRichTextFontPage::OnWeightCtrlSelected( wxCommandEvent& WXUNUSED(event) ) @@ -977,7 +977,7 @@ void wxRichTextFontPage::OnColourClicked( wxCommandEvent& event ) UpdatePreview(); } /*! - * wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXTFONTPAGE_STRIKETHROUGHCTRL + * wxEVT_CHECKBOX event handler for ID_RICHTEXTFONTPAGE_STRIKETHROUGHCTRL */ void wxRichTextFontPage::OnStrikethroughctrlClick( wxCommandEvent& WXUNUSED(event) ) @@ -989,7 +989,7 @@ void wxRichTextFontPage::OnStrikethroughctrlClick( wxCommandEvent& WXUNUSED(even } /*! - * wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXTFONTPAGE_CAPSCTRL + * wxEVT_CHECKBOX event handler for ID_RICHTEXTFONTPAGE_CAPSCTRL */ void wxRichTextFontPage::OnCapsctrlClick( wxCommandEvent& WXUNUSED(event) ) @@ -1001,7 +1001,7 @@ void wxRichTextFontPage::OnCapsctrlClick( wxCommandEvent& WXUNUSED(event) ) } /*! - * wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXTFONTPAGE_SUPERSCRIPT + * wxEVT_CHECKBOX event handler for ID_RICHTEXTFONTPAGE_SUPERSCRIPT */ void wxRichTextFontPage::OnRichtextfontpageSuperscriptClick( wxCommandEvent& WXUNUSED(event) ) @@ -1016,7 +1016,7 @@ void wxRichTextFontPage::OnRichtextfontpageSuperscriptClick( wxCommandEvent& WXU } /*! - * wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXTFONTPAGE_SUBSCRIPT + * wxEVT_CHECKBOX event handler for ID_RICHTEXTFONTPAGE_SUBSCRIPT */ void wxRichTextFontPage::OnRichtextfontpageSubscriptClick( wxCommandEvent& WXUNUSED(event) ) @@ -1031,7 +1031,7 @@ void wxRichTextFontPage::OnRichtextfontpageSubscriptClick( wxCommandEvent& WXUNU } /*! - * wxEVT_COMMAND_CHOICE_SELECTED event handler for ID_RICHTEXTFONTPAGE_SIZE_UNITS + * wxEVT_CHOICE event handler for ID_RICHTEXTFONTPAGE_SIZE_UNITS */ void wxRichTextFontPage::OnRichtextfontpageSizeUnitsSelected( wxCommandEvent& WXUNUSED(event) ) @@ -1043,7 +1043,7 @@ void wxRichTextFontPage::OnRichtextfontpageSizeUnitsSelected( wxCommandEvent& WX } /*! - * wxEVT_COMMAND_SPINCTRL_UPDATED event handler for ID_RICHTEXTFONTPAGE_SPINBUTTONS + * wxEVT_SPINCTRL event handler for ID_RICHTEXTFONTPAGE_SPINBUTTONS */ void wxRichTextFontPage::OnRichtextfontpageSpinbuttonsUp( wxSpinEvent& WXUNUSED(event) ) diff --git a/src/richtext/richtextformatdlg.cpp b/src/richtext/richtextformatdlg.cpp index 976eeef4bf..a5fbe3b54e 100644 --- a/src/richtext/richtextformatdlg.cpp +++ b/src/richtext/richtextformatdlg.cpp @@ -733,7 +733,7 @@ void wxRichTextColourSwatchCtrl::OnMouseEvent(wxMouseEvent& event) #endif // wxUSE_COLOURDLG Refresh(); - wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, GetId()); + wxCommandEvent event(wxEVT_BUTTON, GetId()); GetEventHandler()->ProcessEvent(event); } } diff --git a/src/richtext/richtextimagedlg.cpp b/src/richtext/richtextimagedlg.cpp index 939b51b37e..3cf80ec924 100644 --- a/src/richtext/richtextimagedlg.cpp +++ b/src/richtext/richtextimagedlg.cpp @@ -155,7 +155,7 @@ wxIcon wxRichTextObjectPropertiesDialog::GetIconResource( const wxString& name ) #if 0 /*! - * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON_PARA_UP + * wxEVT_BUTTON event handler for ID_BUTTON_PARA_UP */ void wxRichTextObjectPropertiesDialog::OnRichtextParaUpClick( wxCommandEvent& WXUNUSED(event)) { @@ -188,7 +188,7 @@ void wxRichTextObjectPropertiesDialog::OnRichtextParaUpClick( wxCommandEvent& WX /*! - * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON_PARA_DOWN + * wxEVT_BUTTON event handler for ID_BUTTON_PARA_DOWN */ void wxRichTextObjectPropertiesDialog::OnRichtextDownClick( wxCommandEvent& WXUNUSED(event)) diff --git a/src/richtext/richtextindentspage.cpp b/src/richtext/richtextindentspage.cpp index b7afe7325e..7f84d4e32d 100644 --- a/src/richtext/richtextindentspage.cpp +++ b/src/richtext/richtextindentspage.cpp @@ -601,7 +601,7 @@ wxIcon wxRichTextIndentsSpacingPage::GetIconResource( const wxString& name ) ////@end wxRichTextIndentsSpacingPage icon retrieval } /*! - * wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_LEFT + * wxEVT_RADIOBUTTON event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_LEFT */ void wxRichTextIndentsSpacingPage::OnAlignmentLeftSelected( wxCommandEvent& WXUNUSED(event) ) @@ -612,7 +612,7 @@ void wxRichTextIndentsSpacingPage::OnAlignmentLeftSelected( wxCommandEvent& WXUN /*! - * wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_RIGHT + * wxEVT_RADIOBUTTON event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_RIGHT */ void wxRichTextIndentsSpacingPage::OnAlignmentRightSelected( wxCommandEvent& WXUNUSED(event) ) @@ -623,7 +623,7 @@ void wxRichTextIndentsSpacingPage::OnAlignmentRightSelected( wxCommandEvent& WXU /*! - * wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_JUSTIFIED + * wxEVT_RADIOBUTTON event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_JUSTIFIED */ void wxRichTextIndentsSpacingPage::OnAlignmentJustifiedSelected( wxCommandEvent& WXUNUSED(event) ) @@ -634,7 +634,7 @@ void wxRichTextIndentsSpacingPage::OnAlignmentJustifiedSelected( wxCommandEvent& /*! - * wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_CENTRED + * wxEVT_RADIOBUTTON event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_CENTRED */ void wxRichTextIndentsSpacingPage::OnAlignmentCentredSelected( wxCommandEvent& WXUNUSED(event) ) @@ -645,7 +645,7 @@ void wxRichTextIndentsSpacingPage::OnAlignmentCentredSelected( wxCommandEvent& W /*! - * wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_INDETERMINATE + * wxEVT_RADIOBUTTON event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_INDETERMINATE */ void wxRichTextIndentsSpacingPage::OnAlignmentIndeterminateSelected( wxCommandEvent& WXUNUSED(event) ) @@ -656,7 +656,7 @@ void wxRichTextIndentsSpacingPage::OnAlignmentIndeterminateSelected( wxCommandEv /*! - * wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_LEFT + * wxEVT_TEXT event handler for ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_LEFT */ void wxRichTextIndentsSpacingPage::OnIndentLeftUpdated( wxCommandEvent& WXUNUSED(event) ) @@ -667,7 +667,7 @@ void wxRichTextIndentsSpacingPage::OnIndentLeftUpdated( wxCommandEvent& WXUNUSED /*! - * wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_LEFT_FIRST + * wxEVT_TEXT event handler for ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_LEFT_FIRST */ void wxRichTextIndentsSpacingPage::OnIndentLeftFirstUpdated( wxCommandEvent& WXUNUSED(event) ) @@ -678,7 +678,7 @@ void wxRichTextIndentsSpacingPage::OnIndentLeftFirstUpdated( wxCommandEvent& WXU /*! - * wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_RIGHT + * wxEVT_TEXT event handler for ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_RIGHT */ void wxRichTextIndentsSpacingPage::OnIndentRightUpdated( wxCommandEvent& WXUNUSED(event) ) @@ -689,7 +689,7 @@ void wxRichTextIndentsSpacingPage::OnIndentRightUpdated( wxCommandEvent& WXUNUSE /*! - * wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_BEFORE + * wxEVT_TEXT event handler for ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_BEFORE */ void wxRichTextIndentsSpacingPage::OnSpacingBeforeUpdated( wxCommandEvent& WXUNUSED(event) ) @@ -700,7 +700,7 @@ void wxRichTextIndentsSpacingPage::OnSpacingBeforeUpdated( wxCommandEvent& WXUNU /*! - * wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_AFTER + * wxEVT_TEXT event handler for ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_AFTER */ void wxRichTextIndentsSpacingPage::OnSpacingAfterUpdated( wxCommandEvent& WXUNUSED(event) ) @@ -710,7 +710,7 @@ void wxRichTextIndentsSpacingPage::OnSpacingAfterUpdated( wxCommandEvent& WXUNUS } /*! - * wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_LINE + * wxEVT_COMBOBOX event handler for ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_LINE */ void wxRichTextIndentsSpacingPage::OnSpacingLineSelected( wxCommandEvent& WXUNUSED(event) ) @@ -720,7 +720,7 @@ void wxRichTextIndentsSpacingPage::OnSpacingLineSelected( wxCommandEvent& WXUNUS } /*! - * wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_OUTLINELEVEL + * wxEVT_COMBOBOX event handler for ID_RICHTEXTINDENTSSPACINGPAGE_OUTLINELEVEL */ void wxRichTextIndentsSpacingPage::OnRichtextOutlinelevelSelected( wxCommandEvent& WXUNUSED(event) ) diff --git a/src/richtext/richtextliststylepage.cpp b/src/richtext/richtextliststylepage.cpp index 4acdca6a2a..b5cc9614d3 100644 --- a/src/richtext/richtextliststylepage.cpp +++ b/src/richtext/richtextliststylepage.cpp @@ -897,7 +897,7 @@ void wxRichTextListStylePage::TransferAndPreview() /*! - * wxEVT_COMMAND_SPINCTRL_UPDATED event handler for ID_RICHTEXTLISTSTYLEPAGE_LEVEL + * wxEVT_SPINCTRL event handler for ID_RICHTEXTLISTSTYLEPAGE_LEVEL */ void wxRichTextListStylePage::OnLevelUpdated( wxSpinEvent& WXUNUSED(event) ) @@ -936,7 +936,7 @@ void wxRichTextListStylePage::OnLevelDown( wxSpinEvent& event ) } /*! - * wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTLISTSTYLEPAGE_LEVEL + * wxEVT_TEXT event handler for ID_RICHTEXTLISTSTYLEPAGE_LEVEL */ void wxRichTextListStylePage::OnLevelTextUpdated( wxCommandEvent& WXUNUSED(event) ) @@ -964,7 +964,7 @@ void wxRichTextListStylePage::OnLevelUIUpdate( wxUpdateUIEvent& event ) } /*! - * wxEVT_COMMAND_LISTBOX_SELECTED event handler for ID_RICHTEXTLISTSTYLEPAGE_STYLELISTBOX + * wxEVT_LISTBOX event handler for ID_RICHTEXTLISTSTYLEPAGE_STYLELISTBOX */ void wxRichTextListStylePage::OnStylelistboxSelected( wxCommandEvent& WXUNUSED(event) ) @@ -982,7 +982,7 @@ void wxRichTextListStylePage::OnSymbolstaticUpdate( wxUpdateUIEvent& event ) } /*! - * wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL + * wxEVT_COMBOBOX event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL */ void wxRichTextListStylePage::OnSymbolctrlSelected( wxCommandEvent& WXUNUSED(event) ) @@ -991,7 +991,7 @@ void wxRichTextListStylePage::OnSymbolctrlSelected( wxCommandEvent& WXUNUSED(eve } /*! - * wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL + * wxEVT_TEXT event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL */ void wxRichTextListStylePage::OnSymbolctrlUpdated( wxCommandEvent& WXUNUSED(event) ) @@ -1009,7 +1009,7 @@ void wxRichTextListStylePage::OnSymbolctrlUIUpdate( wxUpdateUIEvent& event ) } /*! - * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXTBULLETSPAGE_CHOOSE_SYMBOL + * wxEVT_BUTTON event handler for ID_RICHTEXTBULLETSPAGE_CHOOSE_SYMBOL */ void wxRichTextListStylePage::OnChooseSymbolClick( wxCommandEvent& WXUNUSED(event) ) @@ -1045,7 +1045,7 @@ void wxRichTextListStylePage::OnChooseSymbolUpdate( wxUpdateUIEvent& event ) } /*! - * wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTLISTSTYLEPAGE_SYMBOLFONTCTRL + * wxEVT_COMBOBOX event handler for ID_RICHTEXTLISTSTYLEPAGE_SYMBOLFONTCTRL */ void wxRichTextListStylePage::OnSymbolfontctrlSelected( wxCommandEvent& WXUNUSED(event) ) @@ -1054,7 +1054,7 @@ void wxRichTextListStylePage::OnSymbolfontctrlSelected( wxCommandEvent& WXUNUSED } /*! - * wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTLISTSTYLEPAGE_SYMBOLFONTCTRL + * wxEVT_TEXT event handler for ID_RICHTEXTLISTSTYLEPAGE_SYMBOLFONTCTRL */ void wxRichTextListStylePage::OnSymbolfontctrlUpdated( wxCommandEvent& WXUNUSED(event) ) @@ -1072,7 +1072,7 @@ void wxRichTextListStylePage::OnSymbolfontctrlUIUpdate( wxUpdateUIEvent& event ) } /*! - * wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXTLISTSTYLEPAGE__PARENTHESESCTRL + * wxEVT_CHECKBOX event handler for ID_RICHTEXTLISTSTYLEPAGE__PARENTHESESCTRL */ void wxRichTextListStylePage::OnParenthesesctrlClick( wxCommandEvent& WXUNUSED(event) ) @@ -1093,7 +1093,7 @@ void wxRichTextListStylePage::OnParenthesesctrlUpdate( wxUpdateUIEvent& event ) } /*! - * wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXTLISTSTYLEPAGE_PERIODCTRL + * wxEVT_CHECKBOX event handler for ID_RICHTEXTLISTSTYLEPAGE_PERIODCTRL */ void wxRichTextListStylePage::OnPeriodctrlClick( wxCommandEvent& WXUNUSED(event) ) @@ -1114,7 +1114,7 @@ void wxRichTextListStylePage::OnPeriodctrlUpdate( wxUpdateUIEvent& event ) } /*! - * wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTLISTSTYLEPAGE_ALIGNLEFT + * wxEVT_RADIOBUTTON event handler for ID_RICHTEXTLISTSTYLEPAGE_ALIGNLEFT */ void wxRichTextListStylePage::OnRichtextliststylepageAlignleftSelected( wxCommandEvent& WXUNUSED(event) ) @@ -1123,7 +1123,7 @@ void wxRichTextListStylePage::OnRichtextliststylepageAlignleftSelected( wxComman } /*! - * wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTLISTSTYLEPAGE_ALIGNRIGHT + * wxEVT_RADIOBUTTON event handler for ID_RICHTEXTLISTSTYLEPAGE_ALIGNRIGHT */ void wxRichTextListStylePage::OnRichtextliststylepageAlignrightSelected( wxCommandEvent& WXUNUSED(event) ) @@ -1132,7 +1132,7 @@ void wxRichTextListStylePage::OnRichtextliststylepageAlignrightSelected( wxComma } /*! - * wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTLISTSTYLEPAGE_JUSTIFIED + * wxEVT_RADIOBUTTON event handler for ID_RICHTEXTLISTSTYLEPAGE_JUSTIFIED */ void wxRichTextListStylePage::OnRichtextliststylepageJustifiedSelected( wxCommandEvent& WXUNUSED(event) ) @@ -1141,7 +1141,7 @@ void wxRichTextListStylePage::OnRichtextliststylepageJustifiedSelected( wxComman } /*! - * wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTLISTSTYLEPAGE_CENTERED + * wxEVT_RADIOBUTTON event handler for ID_RICHTEXTLISTSTYLEPAGE_CENTERED */ void wxRichTextListStylePage::OnRichtextliststylepageCenteredSelected( wxCommandEvent& WXUNUSED(event) ) @@ -1150,7 +1150,7 @@ void wxRichTextListStylePage::OnRichtextliststylepageCenteredSelected( wxCommand } /*! - * wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTLISTSTYLEPAGE_ALIGNINDETERMINATE + * wxEVT_RADIOBUTTON event handler for ID_RICHTEXTLISTSTYLEPAGE_ALIGNINDETERMINATE */ void wxRichTextListStylePage::OnRichtextliststylepageAlignindeterminateSelected( wxCommandEvent& WXUNUSED(event) ) @@ -1159,7 +1159,7 @@ void wxRichTextListStylePage::OnRichtextliststylepageAlignindeterminateSelected( } /*! - * wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTLISTSTYLEPAGE_INDENTLEFT + * wxEVT_TEXT event handler for ID_RICHTEXTLISTSTYLEPAGE_INDENTLEFT */ void wxRichTextListStylePage::OnIndentLeftUpdated( wxCommandEvent& WXUNUSED(event) ) @@ -1168,7 +1168,7 @@ void wxRichTextListStylePage::OnIndentLeftUpdated( wxCommandEvent& WXUNUSED(even } /*! - * wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTLISTSTYLEPAGE_INDENTFIRSTLINE + * wxEVT_TEXT event handler for ID_RICHTEXTLISTSTYLEPAGE_INDENTFIRSTLINE */ void wxRichTextListStylePage::OnIndentFirstLineUpdated( wxCommandEvent& WXUNUSED(event) ) @@ -1177,7 +1177,7 @@ void wxRichTextListStylePage::OnIndentFirstLineUpdated( wxCommandEvent& WXUNUSED } /*! - * wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTLISTSTYLEPAGE_INDENTRIGHT + * wxEVT_TEXT event handler for ID_RICHTEXTLISTSTYLEPAGE_INDENTRIGHT */ void wxRichTextListStylePage::OnIndentRightUpdated( wxCommandEvent& WXUNUSED(event) ) @@ -1186,7 +1186,7 @@ void wxRichTextListStylePage::OnIndentRightUpdated( wxCommandEvent& WXUNUSED(eve } /*! - * wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTLISTSTYLEPAGE_SPACINGBEFORE + * wxEVT_TEXT event handler for ID_RICHTEXTLISTSTYLEPAGE_SPACINGBEFORE */ void wxRichTextListStylePage::OnSpacingBeforeUpdated( wxCommandEvent& WXUNUSED(event) ) @@ -1195,7 +1195,7 @@ void wxRichTextListStylePage::OnSpacingBeforeUpdated( wxCommandEvent& WXUNUSED(e } /*! - * wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTLISTSTYLEPAGE_SPACINGAFTER + * wxEVT_TEXT event handler for ID_RICHTEXTLISTSTYLEPAGE_SPACINGAFTER */ void wxRichTextListStylePage::OnSpacingAfterUpdated( wxCommandEvent& WXUNUSED(event) ) @@ -1204,7 +1204,7 @@ void wxRichTextListStylePage::OnSpacingAfterUpdated( wxCommandEvent& WXUNUSED(ev } /*! - * wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTLISTSTYLEPAGE_LINESPACING + * wxEVT_COMBOBOX event handler for ID_RICHTEXTLISTSTYLEPAGE_LINESPACING */ void wxRichTextListStylePage::OnLineSpacingSelected( wxCommandEvent& WXUNUSED(event) ) @@ -1272,7 +1272,7 @@ void wxRichTextListStylePage::OnStandardBulletUpdate( wxUpdateUIEvent& event ) } /*! - * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXTLISTSTYLEPAGE_CHOOSE_FONT + * wxEVT_BUTTON event handler for ID_RICHTEXTLISTSTYLEPAGE_CHOOSE_FONT */ void wxRichTextListStylePage::OnChooseFontClick( wxCommandEvent& WXUNUSED(event) ) @@ -1300,7 +1300,7 @@ void wxRichTextListStylePage::OnNamestaticUpdate( wxUpdateUIEvent& event ) } /*! - * wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTLISTSTYLEPAGE_NAMECTRL + * wxEVT_COMBOBOX event handler for ID_RICHTEXTLISTSTYLEPAGE_NAMECTRL */ void wxRichTextListStylePage::OnNamectrlSelected( wxCommandEvent& WXUNUSED(event) ) @@ -1309,7 +1309,7 @@ void wxRichTextListStylePage::OnNamectrlSelected( wxCommandEvent& WXUNUSED(event } /*! - * wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTLISTSTYLEPAGE_NAMECTRL + * wxEVT_TEXT event handler for ID_RICHTEXTLISTSTYLEPAGE_NAMECTRL */ void wxRichTextListStylePage::OnNamectrlUpdated( wxCommandEvent& WXUNUSED(event) ) @@ -1326,7 +1326,7 @@ void wxRichTextListStylePage::OnNamectrlUIUpdate( wxUpdateUIEvent& event ) OnStandardBulletUpdate(event); } /*! - * wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXTLISTSTYLEPAGE_RIGHTPARENTHESISCTRL + * wxEVT_CHECKBOX event handler for ID_RICHTEXTLISTSTYLEPAGE_RIGHTPARENTHESISCTRL */ void wxRichTextListStylePage::OnRightParenthesisCtrlClick( wxCommandEvent& WXUNUSED(event) ) @@ -1347,7 +1347,7 @@ void wxRichTextListStylePage::OnRightParenthesisCtrlUpdate( wxUpdateUIEvent& eve } /*! - * wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTLISTSTYLEPAGE_BULLETALIGNMENTCTRL + * wxEVT_COMBOBOX event handler for ID_RICHTEXTLISTSTYLEPAGE_BULLETALIGNMENTCTRL */ void wxRichTextListStylePage::OnBulletAlignmentCtrlSelected( wxCommandEvent& WXUNUSED(event) ) diff --git a/src/richtext/richtextsizepage.cpp b/src/richtext/richtextsizepage.cpp index e6cae8e2c3..22c1e9eb62 100644 --- a/src/richtext/richtextsizepage.cpp +++ b/src/richtext/richtextsizepage.cpp @@ -939,7 +939,7 @@ void wxRichTextSizePage::OnRichtextHeightUpdate( wxUpdateUIEvent& event ) } /*! - * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXT_PARA_UP + * wxEVT_BUTTON event handler for ID_RICHTEXT_PARA_UP */ void wxRichTextSizePage::OnRichtextParaUpClick( wxCommandEvent& WXUNUSED(event) ) @@ -987,7 +987,7 @@ void wxRichTextSizePage::OnRichtextParaUpClick( wxCommandEvent& WXUNUSED(event) } /*! - * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXT_DOWN + * wxEVT_BUTTON event handler for ID_RICHTEXT_DOWN */ void wxRichTextSizePage::OnRichtextParaDownClick( wxCommandEvent& WXUNUSED(event) ) diff --git a/src/richtext/richtextstyledlg.cpp b/src/richtext/richtextstyledlg.cpp index dc29f844a5..e4c2f009fb 100644 --- a/src/richtext/richtextstyledlg.cpp +++ b/src/richtext/richtextstyledlg.cpp @@ -577,7 +577,7 @@ wxIcon wxRichTextStyleOrganiserDialog::GetIconResource( const wxString& name ) } /*! - * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXTSTYLEORGANISERDIALOG_APPLY + * wxEVT_BUTTON event handler for ID_RICHTEXTSTYLEORGANISERDIALOG_APPLY */ void wxRichTextStyleOrganiserDialog::OnApplyClick( wxCommandEvent& WXUNUSED(event) ) @@ -596,7 +596,7 @@ void wxRichTextStyleOrganiserDialog::OnApplyUpdate( wxUpdateUIEvent& event ) /*! - * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXTSTYLEORGANISERDIALOG_NEW_CHAR + * wxEVT_BUTTON event handler for ID_RICHTEXTSTYLEORGANISERDIALOG_NEW_CHAR */ void wxRichTextStyleOrganiserDialog::OnNewCharClick( wxCommandEvent& WXUNUSED(event) ) @@ -644,7 +644,7 @@ void wxRichTextStyleOrganiserDialog::OnNewCharUpdate( wxUpdateUIEvent& event ) /*! - * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXTSTYLEORGANISERDIALOG_NEW_PARA + * wxEVT_BUTTON event handler for ID_RICHTEXTSTYLEORGANISERDIALOG_NEW_PARA */ void wxRichTextStyleOrganiserDialog::OnNewParaClick( wxCommandEvent& WXUNUSED(event) ) @@ -692,7 +692,7 @@ void wxRichTextStyleOrganiserDialog::OnNewParaUpdate( wxUpdateUIEvent& event ) /*! - * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXTSTYLEORGANISERDIALOG_EDIT + * wxEVT_BUTTON event handler for ID_RICHTEXTSTYLEORGANISERDIALOG_EDIT */ void wxRichTextStyleOrganiserDialog::OnEditClick( wxCommandEvent& WXUNUSED(event) ) @@ -767,7 +767,7 @@ void wxRichTextStyleOrganiserDialog::OnEditUpdate( wxUpdateUIEvent& event ) /*! - * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXTSTYLEORGANISERDIALOG_DELETE + * wxEVT_BUTTON event handler for ID_RICHTEXTSTYLEORGANISERDIALOG_DELETE */ void wxRichTextStyleOrganiserDialog::OnDeleteClick( wxCommandEvent& WXUNUSED(event) ) @@ -810,7 +810,7 @@ void wxRichTextStyleOrganiserDialog::OnDeleteUpdate( wxUpdateUIEvent& event ) } /*! - * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXTSTYLEORGANISERDIALOG_NEW_LIST + * wxEVT_BUTTON event handler for ID_RICHTEXTSTYLEORGANISERDIALOG_NEW_LIST */ void wxRichTextStyleOrganiserDialog::OnNewListClick( wxCommandEvent& WXUNUSED(event) ) @@ -876,7 +876,7 @@ void wxRichTextStyleOrganiserDialog::OnNewListUpdate( wxUpdateUIEvent& event ) } /*! - * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXTSTYLEORGANISERDIALOG_RENAME + * wxEVT_BUTTON event handler for ID_RICHTEXTSTYLEORGANISERDIALOG_RENAME */ void wxRichTextStyleOrganiserDialog::OnRenameClick( wxCommandEvent& WXUNUSED(event) ) @@ -924,7 +924,7 @@ void wxRichTextStyleOrganiserDialog::OnListSelection(wxCommandEvent& event) } /*! - * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXTSTYLEORGANISERDIALOG_NEW_BOX + * wxEVT_BUTTON event handler for ID_RICHTEXTSTYLEORGANISERDIALOG_NEW_BOX */ void wxRichTextStyleOrganiserDialog::OnNewBoxClick( wxCommandEvent& WXUNUSED(event) ) @@ -971,7 +971,7 @@ void wxRichTextStyleOrganiserDialog::OnNewBoxUpdate( wxUpdateUIEvent& event ) } /*! - * wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_HELP + * wxEVT_BUTTON event handler for wxID_HELP */ void wxRichTextStyleOrganiserDialog::OnHelpClick( wxCommandEvent& WXUNUSED(event) ) diff --git a/src/richtext/richtextsymboldlg.cpp b/src/richtext/richtextsymboldlg.cpp index 85c07f0592..05a19477ad 100644 --- a/src/richtext/richtextsymboldlg.cpp +++ b/src/richtext/richtextsymboldlg.cpp @@ -873,7 +873,7 @@ bool wxSymbolListCtrl::DoSetCurrent(int current) void wxSymbolListCtrl::SendSelectedEvent() { - wxCommandEvent event(wxEVT_COMMAND_LISTBOX_SELECTED, GetId()); + wxCommandEvent event(wxEVT_LISTBOX, GetId()); event.SetEventObject(this); event.SetInt(m_current); @@ -1180,7 +1180,7 @@ void wxSymbolListCtrl::OnLeftDClick(wxMouseEvent& eventMouse) // this event as a left-click instead if ( item == m_current ) { - wxCommandEvent event(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, GetId()); + wxCommandEvent event(wxEVT_LISTBOX_DCLICK, GetId()); event.SetEventObject(this); event.SetInt(item); @@ -1293,7 +1293,7 @@ wxSymbolListCtrl::GetClassDefaultAttributes(wxWindowVariant variant) } /*! - * wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_HELP + * wxEVT_BUTTON event handler for wxID_HELP */ void wxSymbolPickerDialog::OnHelpClick( wxCommandEvent& WXUNUSED(event) ) diff --git a/src/richtext/richtexttabspage.cpp b/src/richtext/richtexttabspage.cpp index 2c433f9f83..1fa5b07d86 100644 --- a/src/richtext/richtexttabspage.cpp +++ b/src/richtext/richtexttabspage.cpp @@ -268,7 +268,7 @@ wxIcon wxRichTextTabsPage::GetIconResource( const wxString& name ) } /*! - * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXTTABSPAGE_NEW_TAB + * wxEVT_BUTTON event handler for ID_RICHTEXTTABSPAGE_NEW_TAB */ void wxRichTextTabsPage::OnNewTabClick( wxCommandEvent& WXUNUSED(event) ) @@ -305,7 +305,7 @@ void wxRichTextTabsPage::OnNewTabUpdate( wxUpdateUIEvent& event ) /*! - * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXTTABSPAGE_DELETE_TAB + * wxEVT_BUTTON event handler for ID_RICHTEXTTABSPAGE_DELETE_TAB */ void wxRichTextTabsPage::OnDeleteTabClick( wxCommandEvent& WXUNUSED(event) ) @@ -327,7 +327,7 @@ void wxRichTextTabsPage::OnDeleteTabUpdate( wxUpdateUIEvent& event ) /*! - * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXTTABSPAGE_DELETE_ALL_TABS + * wxEVT_BUTTON event handler for ID_RICHTEXTTABSPAGE_DELETE_ALL_TABS */ void wxRichTextTabsPage::OnDeleteAllTabsClick( wxCommandEvent& WXUNUSED(event) ) @@ -350,7 +350,7 @@ void wxRichTextTabsPage::OnDeleteAllTabsUpdate( wxUpdateUIEvent& event ) /*! - * wxEVT_COMMAND_LISTBOX_SELECTED event handler for ID_RICHTEXTTABSPAGE_TABLIST + * wxEVT_LISTBOX event handler for ID_RICHTEXTTABSPAGE_TABLIST */ void wxRichTextTabsPage::OnTablistSelected( wxCommandEvent& WXUNUSED(event) ) diff --git a/src/stc/stc.cpp b/src/stc/stc.cpp index c9b08e945c..d4190e23fb 100644 --- a/src/stc/stc.cpp +++ b/src/stc/stc.cpp @@ -4387,7 +4387,7 @@ void wxStyledTextCtrl::DoSetValue(const wxString& value, int flags) else SetText(value); - // We don't send wxEVT_COMMAND_TEXT_UPDATED anyhow, so ignore the + // We don't send wxEVT_TEXT anyhow, so ignore the // SetValue_SendEvent bit of the flags } diff --git a/src/univ/button.cpp b/src/univ/button.cpp index 7f4c253d14..77f2d79c71 100644 --- a/src/univ/button.cpp +++ b/src/univ/button.cpp @@ -278,7 +278,7 @@ void wxButton::Toggle() void wxButton::Click() { - wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, GetId()); + wxCommandEvent event(wxEVT_BUTTON, GetId()); InitCommandEvent(event); Command(event); } diff --git a/src/univ/checkbox.cpp b/src/univ/checkbox.cpp index 2c070024f6..f038623987 100644 --- a/src/univ/checkbox.cpp +++ b/src/univ/checkbox.cpp @@ -298,7 +298,7 @@ void wxCheckBox::ChangeValue(bool value) void wxCheckBox::SendEvent() { - wxCommandEvent event(wxEVT_COMMAND_CHECKBOX_CLICKED, GetId()); + wxCommandEvent event(wxEVT_CHECKBOX, GetId()); InitCommandEvent(event); wxCheckBoxState state = Get3StateValue(); diff --git a/src/univ/checklst.cpp b/src/univ/checklst.cpp index 4e2d6f857c..c242e941c3 100644 --- a/src/univ/checklst.cpp +++ b/src/univ/checklst.cpp @@ -199,7 +199,7 @@ bool wxCheckListBox::PerformAction(const wxControlAction& action, { Check(sel, !IsChecked(sel)); - SendEvent(wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, sel); + SendEvent(wxEVT_CHECKLISTBOX, sel); } } else diff --git a/src/univ/choice.cpp b/src/univ/choice.cpp index 5bb5b0020b..eb42fccad6 100644 --- a/src/univ/choice.cpp +++ b/src/univ/choice.cpp @@ -81,7 +81,7 @@ void wxChoice::OnComboBox(wxCommandEvent& event) { if ( event.GetId() == GetId() ) { - event.SetEventType(wxEVT_COMMAND_CHOICE_SELECTED); + event.SetEventType(wxEVT_CHOICE); event.Skip(); GetEventHandler()->ProcessEvent(event); } diff --git a/src/univ/combobox.cpp b/src/univ/combobox.cpp index e41adaa761..9d4118eaa2 100644 --- a/src/univ/combobox.cpp +++ b/src/univ/combobox.cpp @@ -180,7 +180,7 @@ void wxComboListBox::OnLeftUp(wxMouseEvent& event) m_combo->SetValue(wxListBox::GetStringSelection()); // next let the user code have the event - wxCommandEvent evt(wxEVT_COMMAND_COMBOBOX_SELECTED,m_combo->GetId()); + wxCommandEvent evt(wxEVT_COMBOBOX,m_combo->GetId()); evt.SetInt(wxListBox::GetSelection()); evt.SetEventObject(m_combo); m_combo->ProcessWindowEvent(evt); diff --git a/src/univ/dialog.cpp b/src/univ/dialog.cpp index b698e2a678..bb1c941125 100644 --- a/src/univ/dialog.cpp +++ b/src/univ/dialog.cpp @@ -129,7 +129,7 @@ void wxDialog::OnCloseWindow(wxCloseEvent& WXUNUSED(event)) s_closing.Append(this); - wxCommandEvent cancelEvent(wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL); + wxCommandEvent cancelEvent(wxEVT_BUTTON, wxID_CANCEL); cancelEvent.SetEventObject(this); GetEventHandler()->ProcessEvent(cancelEvent); s_closing.DeleteObject(this); diff --git a/src/univ/listbox.cpp b/src/univ/listbox.cpp index 147ebfb148..ff9b6eb9f5 100644 --- a/src/univ/listbox.cpp +++ b/src/univ/listbox.cpp @@ -1092,7 +1092,7 @@ void wxListBox::SelectAndNotify(int item) { DoSelect(item); - SendEvent(wxEVT_COMMAND_LISTBOX_SELECTED); + SendEvent(wxEVT_LISTBOX); } void wxListBox::Activate(int item) @@ -1111,7 +1111,7 @@ void wxListBox::Activate(int item) { DoSelect(item); - SendEvent(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED); + SendEvent(wxEVT_LISTBOX_DCLICK); } } diff --git a/src/univ/radiobox.cpp b/src/univ/radiobox.cpp index ac606d1cd3..b468f61fce 100644 --- a/src/univ/radiobox.cpp +++ b/src/univ/radiobox.cpp @@ -63,7 +63,7 @@ public: virtual bool ProcessEvent(wxEvent& event) { // we intercept the command events from radio buttons - if ( event.GetEventType() == wxEVT_COMMAND_RADIOBUTTON_SELECTED ) + if ( event.GetEventType() == wxEVT_RADIOBUTTON ) { m_radio->OnRadioButton(event); } @@ -261,7 +261,7 @@ void wxRadioBox::SendRadioEvent() { wxCHECK_RET( m_selection != -1, wxT("no active radio button") ); - wxCommandEvent event(wxEVT_COMMAND_RADIOBOX_SELECTED, GetId()); + wxCommandEvent event(wxEVT_RADIOBOX, GetId()); InitCommandEvent(event); event.SetInt(m_selection); event.SetString(GetString(m_selection)); diff --git a/src/univ/radiobut.cpp b/src/univ/radiobut.cpp index d047af7f97..80d51339dd 100644 --- a/src/univ/radiobut.cpp +++ b/src/univ/radiobut.cpp @@ -135,7 +135,7 @@ void wxRadioButton::ClearValue() void wxRadioButton::SendEvent() { - wxCommandEvent event(wxEVT_COMMAND_RADIOBUTTON_SELECTED, GetId()); + wxCommandEvent event(wxEVT_RADIOBUTTON, GetId()); InitCommandEvent(event); event.SetInt(IsChecked()); Command(event); diff --git a/src/univ/slider.cpp b/src/univ/slider.cpp index dde7764218..7cbf97e9de 100644 --- a/src/univ/slider.cpp +++ b/src/univ/slider.cpp @@ -220,7 +220,7 @@ bool wxSlider::ChangeValueTo(int value) eventScroll.SetEventObject( this ); (void)GetEventHandler()->ProcessEvent(eventScroll); - wxCommandEvent event(wxEVT_COMMAND_SLIDER_UPDATED, GetId()); + wxCommandEvent event(wxEVT_SLIDER, GetId()); event.SetInt(m_value); event.SetEventObject(this); (void)GetEventHandler()->ProcessEvent(event); diff --git a/src/univ/textctrl.cpp b/src/univ/textctrl.cpp index 041ea21d51..25a44a78eb 100644 --- a/src/univ/textctrl.cpp +++ b/src/univ/textctrl.cpp @@ -4709,7 +4709,7 @@ bool wxTextCtrl::PerformAction(const wxControlAction& actionOrig, { wxASSERT_MSG( IsEditable(), wxT("non editable control changed?") ); - wxCommandEvent event(wxEVT_COMMAND_TEXT_UPDATED, GetId()); + wxCommandEvent event(wxEVT_TEXT, GetId()); InitCommandEvent(event); GetEventHandler()->ProcessEvent(event); @@ -4733,7 +4733,7 @@ void wxTextCtrl::OnChar(wxKeyEvent& event) { if ( IsSingleLine() || (GetWindowStyle() & wxTE_PROCESS_ENTER) ) { - wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, GetId()); + wxCommandEvent event(wxEVT_TEXT_ENTER, GetId()); InitCommandEvent(event); event.SetString(GetValue()); GetEventHandler()->ProcessEvent(event); diff --git a/src/univ/tglbtn.cpp b/src/univ/tglbtn.cpp index f9d541af6d..2652017d44 100644 --- a/src/univ/tglbtn.cpp +++ b/src/univ/tglbtn.cpp @@ -19,7 +19,7 @@ #include "wx/tglbtn.h" -wxDEFINE_EVENT( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEvent ); +wxDEFINE_EVENT( wxEVT_TOGGLEBUTTON, wxCommandEvent ); IMPLEMENT_DYNAMIC_CLASS(wxToggleButton, wxButton) @@ -83,7 +83,7 @@ void wxToggleButton::Toggle() void wxToggleButton::Click() { - wxCommandEvent event(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, GetId()); + wxCommandEvent event(wxEVT_TOGGLEBUTTON, GetId()); InitCommandEvent(event); event.SetInt(GetValue()); Command(event); diff --git a/src/univ/winuniv.cpp b/src/univ/winuniv.cpp index 1842fc485e..f6e19ec4d8 100644 --- a/src/univ/winuniv.cpp +++ b/src/univ/winuniv.cpp @@ -1322,7 +1322,7 @@ void wxWindow::OnKeyDown(wxKeyEvent& event) int command = win->GetAcceleratorTable()->GetCommand(event); if ( command != -1 ) { - wxCommandEvent eventCmd(wxEVT_COMMAND_MENU_SELECTED, command); + wxCommandEvent eventCmd(wxEVT_MENU, command); if ( win->GetEventHandler()->ProcessEvent(eventCmd) ) { // skip "event.Skip()" below @@ -1353,7 +1353,7 @@ void wxWindow::OnKeyDown(wxKeyEvent& event) wxWindow* child = win->FindWindow(command); if ( child && wxDynamicCast(child, wxButton) ) { - wxCommandEvent eventCmd(wxEVT_COMMAND_BUTTON_CLICKED, command); + wxCommandEvent eventCmd(wxEVT_BUTTON, command); eventCmd.SetEventObject(child); if ( child->GetEventHandler()->ProcessEvent(eventCmd) ) { @@ -1428,7 +1428,7 @@ void wxWindow::OnChar(wxKeyEvent& event) wxButton *btn = wxDynamicCast(tlw->GetDefaultItem(), wxButton); if ( btn ) { - wxCommandEvent evt(wxEVT_COMMAND_BUTTON_CLICKED, btn->GetId()); + wxCommandEvent evt(wxEVT_BUTTON, btn->GetId()); evt.SetEventObject(btn); btn->Command(evt); return; diff --git a/src/x11/textctrl.cpp b/src/x11/textctrl.cpp index d37b667068..b214e264e1 100644 --- a/src/x11/textctrl.cpp +++ b/src/x11/textctrl.cpp @@ -1896,7 +1896,7 @@ void wxTextCtrl::OnChar( wxKeyEvent &event ) { if (m_windowStyle & wxTE_PROCESS_ENTER) { - wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId); + wxCommandEvent event(wxEVT_TEXT_ENTER, m_windowId); event.SetEventObject(this); event.SetString(GetValue()); if (HandleWindowEvent(event)) return; diff --git a/tests/controls/bitmaptogglebuttontest.cpp b/tests/controls/bitmaptogglebuttontest.cpp index 25783069ad..03a7e7eac0 100644 --- a/tests/controls/bitmaptogglebuttontest.cpp +++ b/tests/controls/bitmaptogglebuttontest.cpp @@ -74,7 +74,7 @@ void BitmapToggleButtonTestCase::tearDown() void BitmapToggleButtonTestCase::Click() { #if wxUSE_UIACTIONSIMULATOR - EventCounter clicked(m_button, wxEVT_COMMAND_TOGGLEBUTTON_CLICKED); + EventCounter clicked(m_button, wxEVT_TOGGLEBUTTON); wxUIActionSimulator sim; @@ -101,7 +101,7 @@ void BitmapToggleButtonTestCase::Click() void BitmapToggleButtonTestCase::Value() { - EventCounter clicked(m_button, wxEVT_COMMAND_BUTTON_CLICKED); + EventCounter clicked(m_button, wxEVT_BUTTON); m_button->SetValue(true); diff --git a/tests/controls/buttontest.cpp b/tests/controls/buttontest.cpp index 37502ea4fe..bb7d684428 100644 --- a/tests/controls/buttontest.cpp +++ b/tests/controls/buttontest.cpp @@ -82,7 +82,7 @@ void ButtonTestCase::Click() { //We use the internal class EventCounter which handles connecting and //disconnecting the control to the wxTestableFrame - EventCounter clicked(m_button, wxEVT_COMMAND_BUTTON_CLICKED); + EventCounter clicked(m_button, wxEVT_BUTTON); wxUIActionSimulator sim; @@ -99,7 +99,7 @@ void ButtonTestCase::Click() void ButtonTestCase::Disabled() { - EventCounter clicked(m_button, wxEVT_COMMAND_BUTTON_CLICKED); + EventCounter clicked(m_button, wxEVT_BUTTON); wxUIActionSimulator sim; diff --git a/tests/controls/checkboxtest.cpp b/tests/controls/checkboxtest.cpp index 8c1b3a607d..c36ea4325b 100644 --- a/tests/controls/checkboxtest.cpp +++ b/tests/controls/checkboxtest.cpp @@ -83,7 +83,7 @@ void CheckBoxTestCase::tearDown() void CheckBoxTestCase::Check() { - EventCounter clicked(m_check, wxEVT_COMMAND_CHECKBOX_CLICKED); + EventCounter clicked(m_check, wxEVT_CHECKBOX); //We should be unchecked by default CPPUNIT_ASSERT(!m_check->IsChecked()); diff --git a/tests/controls/checklistboxtest.cpp b/tests/controls/checklistboxtest.cpp index cf61babec0..eb3c9bf52f 100644 --- a/tests/controls/checklistboxtest.cpp +++ b/tests/controls/checklistboxtest.cpp @@ -65,7 +65,7 @@ void CheckListBoxTestCase::tearDown() void CheckListBoxTestCase::Check() { - EventCounter toggled(m_check, wxEVT_COMMAND_CHECKLISTBOX_TOGGLED); + EventCounter toggled(m_check, wxEVT_CHECKLISTBOX); wxArrayInt checkedItems; wxArrayString testitems; diff --git a/tests/controls/choicebooktest.cpp b/tests/controls/choicebooktest.cpp index 4349295325..fcd91a3f91 100644 --- a/tests/controls/choicebooktest.cpp +++ b/tests/controls/choicebooktest.cpp @@ -35,10 +35,10 @@ private: virtual wxBookCtrlBase *GetBase() const { return m_choicebook; } virtual wxEventType GetChangedEvent() const - { return wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED; } + { return wxEVT_CHOICEBOOK_PAGE_CHANGED; } virtual wxEventType GetChangingEvent() const - { return wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING; } + { return wxEVT_CHOICEBOOK_PAGE_CHANGING; } CPPUNIT_TEST_SUITE( ChoicebookTestCase ); wxBOOK_CTRL_BASE_TESTS(); diff --git a/tests/controls/comboboxtest.cpp b/tests/controls/comboboxtest.cpp index e811f4a086..609c66b232 100644 --- a/tests/controls/comboboxtest.cpp +++ b/tests/controls/comboboxtest.cpp @@ -129,8 +129,8 @@ void ComboBoxTestCase::Size() void ComboBoxTestCase::PopDismiss() { #if defined(__WXMSW__) || defined(__WXGTK210__) - EventCounter drop(m_combo, wxEVT_COMMAND_COMBOBOX_DROPDOWN); - EventCounter close(m_combo, wxEVT_COMMAND_COMBOBOX_CLOSEUP); + EventCounter drop(m_combo, wxEVT_COMBOBOX_DROPDOWN); + EventCounter close(m_combo, wxEVT_COMBOBOX_CLOSEUP); m_combo->Popup(); m_combo->Dismiss(); diff --git a/tests/controls/hyperlinkctrltest.cpp b/tests/controls/hyperlinkctrltest.cpp index a6197c0a74..cc4254a5ac 100644 --- a/tests/controls/hyperlinkctrltest.cpp +++ b/tests/controls/hyperlinkctrltest.cpp @@ -94,7 +94,7 @@ void HyperlinkCtrlTestCase::Url() void HyperlinkCtrlTestCase::Click() { #if wxUSE_UIACTIONSIMULATOR && !defined(__WXGTK__) - EventCounter hyperlink(m_hyperlink, wxEVT_COMMAND_HYPERLINK); + EventCounter hyperlink(m_hyperlink, wxEVT_HYPERLINK); wxUIActionSimulator sim; diff --git a/tests/controls/listbasetest.cpp b/tests/controls/listbasetest.cpp index 65bffc00e7..81dd455881 100644 --- a/tests/controls/listbasetest.cpp +++ b/tests/controls/listbasetest.cpp @@ -199,10 +199,10 @@ void ListBaseTestCase::ItemClick() list->SetItem(0, 1, "first column"); list->SetItem(0, 2, "second column"); - EventCounter selected(list, wxEVT_COMMAND_LIST_ITEM_SELECTED); - EventCounter focused(list, wxEVT_COMMAND_LIST_ITEM_FOCUSED); - EventCounter activated(list, wxEVT_COMMAND_LIST_ITEM_ACTIVATED); - EventCounter rclick(list, wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK); + EventCounter selected(list, wxEVT_LIST_ITEM_SELECTED); + EventCounter focused(list, wxEVT_LIST_ITEM_FOCUSED); + EventCounter activated(list, wxEVT_LIST_ITEM_ACTIVATED); + EventCounter rclick(list, wxEVT_LIST_ITEM_RIGHT_CLICK); wxUIActionSimulator sim; @@ -241,7 +241,7 @@ void ListBaseTestCase::KeyDown() #if wxUSE_UIACTIONSIMULATOR wxListCtrl* const list = GetList(); - EventCounter keydown(list, wxEVT_COMMAND_LIST_KEY_DOWN); + EventCounter keydown(list, wxEVT_LIST_KEY_DOWN); wxUIActionSimulator sim; @@ -258,8 +258,8 @@ void ListBaseTestCase::DeleteItems() #ifndef __WXOSX__ wxListCtrl* const list = GetList(); - EventCounter deleteitem(list, wxEVT_COMMAND_LIST_DELETE_ITEM); - EventCounter deleteall(list, wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS); + EventCounter deleteitem(list, wxEVT_LIST_DELETE_ITEM); + EventCounter deleteall(list, wxEVT_LIST_DELETE_ALL_ITEMS); list->InsertColumn(0, "Column 0", wxLIST_FORMAT_LEFT, 60); @@ -296,7 +296,7 @@ void ListBaseTestCase::InsertItem() { wxListCtrl* const list = GetList(); - EventCounter insert(list, wxEVT_COMMAND_LIST_INSERT_ITEM); + EventCounter insert(list, wxEVT_LIST_INSERT_ITEM); list->InsertColumn(0, "Column 0", wxLIST_FORMAT_LEFT, 60); @@ -391,8 +391,8 @@ void ListBaseTestCase::EditLabel() list->InsertItem(0, "Item 0"); list->InsertItem(1, "Item 1"); - EventCounter beginedit(list, wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT); - EventCounter endedit(list, wxEVT_COMMAND_LIST_END_LABEL_EDIT); + EventCounter beginedit(list, wxEVT_LIST_BEGIN_LABEL_EDIT); + EventCounter endedit(list, wxEVT_LIST_END_LABEL_EDIT); wxUIActionSimulator sim; diff --git a/tests/controls/listbooktest.cpp b/tests/controls/listbooktest.cpp index 1dd63c31c9..b77bc438c3 100644 --- a/tests/controls/listbooktest.cpp +++ b/tests/controls/listbooktest.cpp @@ -36,10 +36,10 @@ private: virtual wxBookCtrlBase *GetBase() const { return m_listbook; } virtual wxEventType GetChangedEvent() const - { return wxEVT_COMMAND_LISTBOOK_PAGE_CHANGED; } + { return wxEVT_LISTBOOK_PAGE_CHANGED; } virtual wxEventType GetChangingEvent() const - { return wxEVT_COMMAND_LISTBOOK_PAGE_CHANGING; } + { return wxEVT_LISTBOOK_PAGE_CHANGING; } CPPUNIT_TEST_SUITE( ListbookTestCase ); wxBOOK_CTRL_BASE_TESTS(); diff --git a/tests/controls/listboxtest.cpp b/tests/controls/listboxtest.cpp index afab5f80ed..32cc9defc2 100644 --- a/tests/controls/listboxtest.cpp +++ b/tests/controls/listboxtest.cpp @@ -184,8 +184,8 @@ void ListBoxTestCase::ClickEvents() wxTestableFrame* frame = wxStaticCast(wxTheApp->GetTopWindow(), wxTestableFrame); - EventCounter selected(frame, wxEVT_COMMAND_LISTBOX_SELECTED); - EventCounter dclicked(frame, wxEVT_COMMAND_LISTBOX_DOUBLECLICKED); + EventCounter selected(frame, wxEVT_LISTBOX); + EventCounter dclicked(frame, wxEVT_LISTBOX_DCLICK); wxUIActionSimulator sim; @@ -220,8 +220,8 @@ void ListBoxTestCase::ClickNotOnItem() wxTestableFrame* frame = wxStaticCast(wxTheApp->GetTopWindow(), wxTestableFrame); - EventCounter selected(frame, wxEVT_COMMAND_LISTBOX_SELECTED); - EventCounter dclicked(frame, wxEVT_COMMAND_LISTBOX_DOUBLECLICKED); + EventCounter selected(frame, wxEVT_LISTBOX); + EventCounter dclicked(frame, wxEVT_LISTBOX_DCLICK); wxUIActionSimulator sim; diff --git a/tests/controls/listctrltest.cpp b/tests/controls/listctrltest.cpp index dfd3784d22..fb0e74f3ac 100644 --- a/tests/controls/listctrltest.cpp +++ b/tests/controls/listctrltest.cpp @@ -97,9 +97,9 @@ void ListCtrlTestCase::EditLabel() #if wxUSE_UIACTIONSIMULATOR void ListCtrlTestCase::ColumnDrag() { - EventCounter begindrag(m_list, wxEVT_COMMAND_LIST_COL_BEGIN_DRAG); - EventCounter dragging(m_list, wxEVT_COMMAND_LIST_COL_DRAGGING); - EventCounter enddrag(m_list, wxEVT_COMMAND_LIST_COL_END_DRAG); + EventCounter begindrag(m_list, wxEVT_LIST_COL_BEGIN_DRAG); + EventCounter dragging(m_list, wxEVT_LIST_COL_DRAGGING); + EventCounter enddrag(m_list, wxEVT_LIST_COL_END_DRAG); m_list->InsertColumn(0, "Column 0"); m_list->InsertColumn(1, "Column 1"); @@ -132,8 +132,8 @@ void ListCtrlTestCase::ColumnDrag() void ListCtrlTestCase::ColumnClick() { - EventCounter colclick(m_list, wxEVT_COMMAND_LIST_COL_CLICK); - EventCounter colrclick(m_list, wxEVT_COMMAND_LIST_COL_RIGHT_CLICK); + EventCounter colclick(m_list, wxEVT_LIST_COL_CLICK); + EventCounter colrclick(m_list, wxEVT_LIST_COL_RIGHT_CLICK); m_list->InsertColumn(0, "Column 0", wxLIST_FORMAT_LEFT, 60); diff --git a/tests/controls/notebooktest.cpp b/tests/controls/notebooktest.cpp index b32ec9a31e..212a910401 100644 --- a/tests/controls/notebooktest.cpp +++ b/tests/controls/notebooktest.cpp @@ -35,10 +35,10 @@ private: virtual wxBookCtrlBase *GetBase() const { return m_notebook; } virtual wxEventType GetChangedEvent() const - { return wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED; } + { return wxEVT_NOTEBOOK_PAGE_CHANGED; } virtual wxEventType GetChangingEvent() const - { return wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING; } + { return wxEVT_NOTEBOOK_PAGE_CHANGING; } CPPUNIT_TEST_SUITE( NotebookTestCase ); diff --git a/tests/controls/ownerdrawncomboboxtest.cpp b/tests/controls/ownerdrawncomboboxtest.cpp index ecaa344552..52f02284a6 100644 --- a/tests/controls/ownerdrawncomboboxtest.cpp +++ b/tests/controls/ownerdrawncomboboxtest.cpp @@ -129,8 +129,8 @@ void OwnerDrawnComboBoxTestCase::Size() void OwnerDrawnComboBoxTestCase::PopDismiss() { - EventCounter drop(m_combo, wxEVT_COMMAND_COMBOBOX_DROPDOWN); - EventCounter close(m_combo, wxEVT_COMMAND_COMBOBOX_CLOSEUP); + EventCounter drop(m_combo, wxEVT_COMBOBOX_DROPDOWN); + EventCounter close(m_combo, wxEVT_COMBOBOX_CLOSEUP); m_combo->Popup(); m_combo->Dismiss(); diff --git a/tests/controls/radiobuttontest.cpp b/tests/controls/radiobuttontest.cpp index 92ff3a3079..ce4f7989a4 100644 --- a/tests/controls/radiobuttontest.cpp +++ b/tests/controls/radiobuttontest.cpp @@ -71,7 +71,7 @@ void RadioButtonTestCase::Click() { // GTK does not support selecting a single radio button #if wxUSE_UIACTIONSIMULATOR && !defined(__WXGTK__) - EventCounter selected(m_radio, wxEVT_COMMAND_RADIOBUTTON_SELECTED); + EventCounter selected(m_radio, wxEVT_RADIOBUTTON); wxUIActionSimulator sim; @@ -87,7 +87,7 @@ void RadioButtonTestCase::Click() void RadioButtonTestCase::Value() { #ifndef __WXGTK__ - EventCounter selected(m_radio, wxEVT_COMMAND_RADIOBUTTON_SELECTED); + EventCounter selected(m_radio, wxEVT_RADIOBUTTON); m_radio->SetValue(true); diff --git a/tests/controls/richtextctrltest.cpp b/tests/controls/richtextctrltest.cpp index f1e1cc7ca4..0d311e54b9 100644 --- a/tests/controls/richtextctrltest.cpp +++ b/tests/controls/richtextctrltest.cpp @@ -121,8 +121,8 @@ void RichTextCtrlTestCase::CharacterEvent() // There seems to be an event sequence problem on GTK+ that causes the events // to be disconnected before they're processed, generating spurious errors. #if !defined(__WXGTK__) - EventCounter character(m_rich, wxEVT_COMMAND_RICHTEXT_CHARACTER); - EventCounter content(m_rich, wxEVT_COMMAND_RICHTEXT_CONTENT_INSERTED); + EventCounter character(m_rich, wxEVT_RICHTEXT_CHARACTER); + EventCounter content(m_rich, wxEVT_RICHTEXT_CONTENT_INSERTED); m_rich->SetFocus(); @@ -153,8 +153,8 @@ void RichTextCtrlTestCase::DeleteEvent() // There seems to be an event sequence problem on GTK+ that causes the events // to be disconnected before they're processed, generating spurious errors. #if !defined(__WXGTK__) - EventCounter deleteevent(m_rich, wxEVT_COMMAND_RICHTEXT_DELETE); - EventCounter contentdelete(m_rich, wxEVT_COMMAND_RICHTEXT_CONTENT_DELETED); + EventCounter deleteevent(m_rich, wxEVT_RICHTEXT_DELETE); + EventCounter contentdelete(m_rich, wxEVT_RICHTEXT_CONTENT_DELETED); m_rich->SetFocus(); @@ -177,7 +177,7 @@ void RichTextCtrlTestCase::ReturnEvent() // There seems to be an event sequence problem on GTK+ that causes the events // to be disconnected before they're processed, generating spurious errors. #if !defined(__WXGTK__) - EventCounter returnevent(m_rich, wxEVT_COMMAND_RICHTEXT_RETURN); + EventCounter returnevent(m_rich, wxEVT_RICHTEXT_RETURN); m_rich->SetFocus(); @@ -192,7 +192,7 @@ void RichTextCtrlTestCase::ReturnEvent() void RichTextCtrlTestCase::StyleEvent() { - EventCounter stylechanged(m_rich, wxEVT_COMMAND_RICHTEXT_STYLE_CHANGED); + EventCounter stylechanged(m_rich, wxEVT_RICHTEXT_STYLE_CHANGED); m_rich->SetValue("Sometext"); m_rich->SetStyle(0, 8, wxTextAttr(*wxRED, *wxWHITE)); @@ -202,7 +202,7 @@ void RichTextCtrlTestCase::StyleEvent() void RichTextCtrlTestCase::BufferResetEvent() { - EventCounter reset(m_rich, wxEVT_COMMAND_RICHTEXT_BUFFER_RESET); + EventCounter reset(m_rich, wxEVT_RICHTEXT_BUFFER_RESET); m_rich->AppendText("more text!"); m_rich->SetValue(""); @@ -227,7 +227,7 @@ void RichTextCtrlTestCase::UrlEvent() #if wxUSE_UIACTIONSIMULATOR // Mouse up event not being caught on GTK+ #if !defined(__WXGTK__) - EventCounter url(m_rich, wxEVT_COMMAND_TEXT_URL); + EventCounter url(m_rich, wxEVT_TEXT_URL); m_rich->BeginURL("http://www.wxwidgets.org"); m_rich->WriteText("http://www.wxwidgets.org"); @@ -249,7 +249,7 @@ void RichTextCtrlTestCase::TextEvent() { #if wxUSE_UIACTIONSIMULATOR #if !defined(__WXGTK__) - EventCounter updated(m_rich, wxEVT_COMMAND_TEXT_UPDATED); + EventCounter updated(m_rich, wxEVT_TEXT); m_rich->SetFocus(); @@ -409,7 +409,7 @@ void RichTextCtrlTestCase::Editable() { #if wxUSE_UIACTIONSIMULATOR #if !defined(__WXGTK__) - EventCounter updated(m_rich, wxEVT_COMMAND_TEXT_UPDATED); + EventCounter updated(m_rich, wxEVT_TEXT); m_rich->SetFocus(); diff --git a/tests/controls/spinctrldbltest.cpp b/tests/controls/spinctrldbltest.cpp index 854b4cefe7..007f0804e3 100644 --- a/tests/controls/spinctrldbltest.cpp +++ b/tests/controls/spinctrldbltest.cpp @@ -70,7 +70,7 @@ void SpinCtrlDoubleTestCase::tearDown() void SpinCtrlDoubleTestCase::Arrows() { #ifndef __WXGTK__ - EventCounter updated(m_spin, wxEVT_COMMAND_SPINCTRLDOUBLE_UPDATED); + EventCounter updated(m_spin, wxEVT_SPINCTRLDOUBLE); wxUIActionSimulator sim; diff --git a/tests/controls/spinctrltest.cpp b/tests/controls/spinctrltest.cpp index 2338bb4248..88e86d3516 100644 --- a/tests/controls/spinctrltest.cpp +++ b/tests/controls/spinctrltest.cpp @@ -107,7 +107,7 @@ void SpinCtrlTestCase::NoEventsInCtor() delete m_spin; m_spin = new wxSpinCtrl; - EventCounter updated(m_spin, wxEVT_COMMAND_SPINCTRL_UPDATED); + EventCounter updated(m_spin, wxEVT_SPINCTRL); m_spin->Create(parent, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, 0, @@ -119,7 +119,7 @@ void SpinCtrlTestCase::NoEventsInCtor() void SpinCtrlTestCase::Arrows() { #if wxUSE_UIACTIONSIMULATOR - EventCounter updated(m_spin, wxEVT_COMMAND_SPINCTRL_UPDATED); + EventCounter updated(m_spin, wxEVT_SPINCTRL); wxUIActionSimulator sim; @@ -177,7 +177,7 @@ void SpinCtrlTestCase::Range() // that this doesn't result in any events (as this is not something done by // the user). { - EventCounter updated(m_spin, wxEVT_COMMAND_SPINCTRL_UPDATED); + EventCounter updated(m_spin, wxEVT_SPINCTRL); m_spin->SetRange(1, 10); CPPUNIT_ASSERT_EQUAL(1, m_spin->GetValue()); diff --git a/tests/controls/textctrltest.cpp b/tests/controls/textctrltest.cpp index 61dd87347c..a541f74b29 100644 --- a/tests/controls/textctrltest.cpp +++ b/tests/controls/textctrltest.cpp @@ -188,7 +188,7 @@ void TextCtrlTestCase::ReadOnly() delete m_text; CreateText(wxTE_READONLY); - EventCounter updated(m_text, wxEVT_COMMAND_TEXT_UPDATED); + EventCounter updated(m_text, wxEVT_TEXT); m_text->SetFocus(); @@ -213,8 +213,8 @@ void TextCtrlTestCase::ReadOnly() void TextCtrlTestCase::MaxLength() { #if wxUSE_UIACTIONSIMULATOR - EventCounter updated(m_text, wxEVT_COMMAND_TEXT_UPDATED); - EventCounter maxlen(m_text, wxEVT_COMMAND_TEXT_MAXLEN); + EventCounter updated(m_text, wxEVT_TEXT); + EventCounter maxlen(m_text, wxEVT_TEXT_MAXLEN); m_text->SetFocus(); m_text->SetMaxLength(10); @@ -319,7 +319,7 @@ void TextCtrlTestCase::ProcessEnter() wxTestableFrame* frame = wxStaticCast(wxTheApp->GetTopWindow(), wxTestableFrame); - EventCounter count(m_text, wxEVT_COMMAND_TEXT_ENTER); + EventCounter count(m_text, wxEVT_TEXT_ENTER); m_text->SetFocus(); @@ -327,7 +327,7 @@ void TextCtrlTestCase::ProcessEnter() sim.Char(WXK_RETURN); wxYield(); - CPPUNIT_ASSERT_EQUAL(0, frame->GetEventCount(wxEVT_COMMAND_TEXT_ENTER)); + CPPUNIT_ASSERT_EQUAL(0, frame->GetEventCount(wxEVT_TEXT_ENTER)); // we need a text control with wxTE_PROCESS_ENTER for this test delete m_text; @@ -338,7 +338,7 @@ void TextCtrlTestCase::ProcessEnter() sim.Char(WXK_RETURN); wxYield(); - CPPUNIT_ASSERT_EQUAL(1, frame->GetEventCount(wxEVT_COMMAND_TEXT_ENTER)); + CPPUNIT_ASSERT_EQUAL(1, frame->GetEventCount(wxEVT_TEXT_ENTER)); #endif } #endif @@ -349,7 +349,7 @@ void TextCtrlTestCase::Url() delete m_text; CreateText(wxTE_RICH | wxTE_AUTO_URL); - EventCounter url(m_text, wxEVT_COMMAND_TEXT_URL); + EventCounter url(m_text, wxEVT_TEXT_URL); m_text->AppendText("http://www.wxwidgets.org"); diff --git a/tests/controls/textentrytest.cpp b/tests/controls/textentrytest.cpp index 2bf31ed555..895047e2aa 100644 --- a/tests/controls/textentrytest.cpp +++ b/tests/controls/textentrytest.cpp @@ -41,7 +41,7 @@ void TextEntryTestCase::SetValue() void TextEntryTestCase::TextChangeEvents() { - EventCounter updated(GetTestWindow(), wxEVT_COMMAND_TEXT_UPDATED); + EventCounter updated(GetTestWindow(), wxEVT_TEXT); wxTextEntry * const entry = GetTestEntry(); @@ -184,7 +184,7 @@ void TextEntryTestCase::Editable() wxTextEntry * const entry = GetTestEntry(); wxWindow * const window = GetTestWindow(); - EventCounter updated(window, wxEVT_COMMAND_TEXT_UPDATED); + EventCounter updated(window, wxEVT_TEXT); window->SetFocus(); wxYield(); diff --git a/tests/controls/togglebuttontest.cpp b/tests/controls/togglebuttontest.cpp index 295627e810..054b7c6574 100644 --- a/tests/controls/togglebuttontest.cpp +++ b/tests/controls/togglebuttontest.cpp @@ -64,7 +64,7 @@ void ToggleButtonTestCase::tearDown() void ToggleButtonTestCase::Click() { #if wxUSE_UIACTIONSIMULATOR - EventCounter clicked(m_button, wxEVT_COMMAND_TOGGLEBUTTON_CLICKED); + EventCounter clicked(m_button, wxEVT_TOGGLEBUTTON); wxUIActionSimulator sim; @@ -89,7 +89,7 @@ void ToggleButtonTestCase::Click() void ToggleButtonTestCase::Value() { - EventCounter clicked(m_button, wxEVT_COMMAND_BUTTON_CLICKED); + EventCounter clicked(m_button, wxEVT_BUTTON); m_button->SetValue(true); diff --git a/tests/controls/toolbooktest.cpp b/tests/controls/toolbooktest.cpp index 85150a831f..b1b0802bf2 100644 --- a/tests/controls/toolbooktest.cpp +++ b/tests/controls/toolbooktest.cpp @@ -36,10 +36,10 @@ private: virtual wxBookCtrlBase *GetBase() const { return m_toolbook; } virtual wxEventType GetChangedEvent() const - { return wxEVT_COMMAND_TOOLBOOK_PAGE_CHANGED; } + { return wxEVT_TOOLBOOK_PAGE_CHANGED; } virtual wxEventType GetChangingEvent() const - { return wxEVT_COMMAND_TOOLBOOK_PAGE_CHANGING; } + { return wxEVT_TOOLBOOK_PAGE_CHANGING; } CPPUNIT_TEST_SUITE( ToolbookTestCase ); wxBOOK_CTRL_BASE_TESTS(); diff --git a/tests/controls/treebooktest.cpp b/tests/controls/treebooktest.cpp index d1e6f3388b..36497f4bea 100644 --- a/tests/controls/treebooktest.cpp +++ b/tests/controls/treebooktest.cpp @@ -35,10 +35,10 @@ private: virtual wxBookCtrlBase *GetBase() const { return m_treebook; } virtual wxEventType GetChangedEvent() const - { return wxEVT_COMMAND_TREEBOOK_PAGE_CHANGED; } + { return wxEVT_TREEBOOK_PAGE_CHANGED; } virtual wxEventType GetChangingEvent() const - { return wxEVT_COMMAND_TREEBOOK_PAGE_CHANGING; } + { return wxEVT_TREEBOOK_PAGE_CHANGING; } CPPUNIT_TEST_SUITE( TreebookTestCase ); wxBOOK_CTRL_BASE_TESTS(); diff --git a/tests/controls/treectrltest.cpp b/tests/controls/treectrltest.cpp index c2a791c0a3..218a9b7942 100644 --- a/tests/controls/treectrltest.cpp +++ b/tests/controls/treectrltest.cpp @@ -239,8 +239,8 @@ void TreeCtrlTestCase::SelectItemMulti() void TreeCtrlTestCase::ItemClick() { #if wxUSE_UIACTIONSIMULATOR - EventCounter activated(m_tree, wxEVT_COMMAND_TREE_ITEM_ACTIVATED); - EventCounter rclick(m_tree, wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK); + EventCounter activated(m_tree, wxEVT_TREE_ITEM_ACTIVATED); + EventCounter rclick(m_tree, wxEVT_TREE_ITEM_RIGHT_CLICK); wxUIActionSimulator sim; @@ -266,7 +266,7 @@ void TreeCtrlTestCase::ItemClick() void TreeCtrlTestCase::DeleteItem() { - EventCounter deleteitem(m_tree, wxEVT_COMMAND_TREE_DELETE_ITEM); + EventCounter deleteitem(m_tree, wxEVT_TREE_DELETE_ITEM); wxTreeItemId todelete = m_tree->AppendItem(m_root, "deleteme"); m_tree->Delete(todelete); @@ -280,8 +280,8 @@ void TreeCtrlTestCase::DeleteItem() void TreeCtrlTestCase::LabelEdit() { - EventCounter beginedit(m_tree, wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT); - EventCounter endedit(m_tree, wxEVT_COMMAND_TREE_END_LABEL_EDIT); + EventCounter beginedit(m_tree, wxEVT_TREE_BEGIN_LABEL_EDIT); + EventCounter endedit(m_tree, wxEVT_TREE_END_LABEL_EDIT); wxUIActionSimulator sim; @@ -301,7 +301,7 @@ void TreeCtrlTestCase::LabelEdit() void TreeCtrlTestCase::KeyDown() { - EventCounter keydown(m_tree, wxEVT_COMMAND_TREE_KEY_DOWN); + EventCounter keydown(m_tree, wxEVT_TREE_KEY_DOWN); wxUIActionSimulator sim; @@ -318,10 +318,10 @@ void TreeCtrlTestCase::CollapseExpandEvents() { m_tree->CollapseAll(); - EventCounter collapsed(m_tree, wxEVT_COMMAND_TREE_ITEM_COLLAPSED); - EventCounter collapsing(m_tree, wxEVT_COMMAND_TREE_ITEM_COLLAPSING); - EventCounter expanded(m_tree, wxEVT_COMMAND_TREE_ITEM_EXPANDED); - EventCounter expanding(m_tree, wxEVT_COMMAND_TREE_ITEM_EXPANDING); + EventCounter collapsed(m_tree, wxEVT_TREE_ITEM_COLLAPSED); + EventCounter collapsing(m_tree, wxEVT_TREE_ITEM_COLLAPSING); + EventCounter expanded(m_tree, wxEVT_TREE_ITEM_EXPANDED); + EventCounter expanding(m_tree, wxEVT_TREE_ITEM_EXPANDING); wxUIActionSimulator sim; @@ -352,8 +352,8 @@ void TreeCtrlTestCase::SelectionChange() m_tree->ExpandAll(); m_tree->UnselectAll(); - EventCounter changed(m_tree, wxEVT_COMMAND_TREE_SEL_CHANGED); - EventCounter changing(m_tree, wxEVT_COMMAND_TREE_SEL_CHANGING); + EventCounter changed(m_tree, wxEVT_TREE_SEL_CHANGED); + EventCounter changing(m_tree, wxEVT_TREE_SEL_CHANGING); wxUIActionSimulator sim; @@ -385,7 +385,7 @@ void TreeCtrlTestCase::SelectionChange() void TreeCtrlTestCase::Menu() { - EventCounter menu(m_tree, wxEVT_COMMAND_TREE_ITEM_MENU); + EventCounter menu(m_tree, wxEVT_TREE_ITEM_MENU); wxUIActionSimulator sim; wxRect pos; diff --git a/tests/controls/webtest.cpp b/tests/controls/webtest.cpp index 6b9e093e00..61e33298c3 100644 --- a/tests/controls/webtest.cpp +++ b/tests/controls/webtest.cpp @@ -77,9 +77,10 @@ CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( WebTestCase, "WebTestCase" ); void WebTestCase::setUp() { + m_loaded = new EventCounter(m_browser, wxEVT_WEBVIEW_LOADED); + m_browser = wxWebView::New(wxTheApp->GetTopWindow(), wxID_ANY); - m_loaded = new EventCounter(m_browser, wxEVT_COMMAND_WEBVIEW_LOADED); ENSURE_LOADED; } diff --git a/tests/html/htmlwindow.cpp b/tests/html/htmlwindow.cpp index ece296e8ae..47e980c76f 100644 --- a/tests/html/htmlwindow.cpp +++ b/tests/html/htmlwindow.cpp @@ -120,7 +120,7 @@ void HtmlWindowTestCase::Title() #if wxUSE_UIACTIONSIMULATOR void HtmlWindowTestCase::CellClick() { - EventCounter clicked(m_win, wxEVT_COMMAND_HTML_CELL_CLICKED); + EventCounter clicked(m_win, wxEVT_HTML_CELL_CLICKED); wxUIActionSimulator sim; @@ -139,7 +139,7 @@ void HtmlWindowTestCase::CellClick() void HtmlWindowTestCase::LinkClick() { - EventCounter clicked(m_win, wxEVT_COMMAND_HTML_LINK_CLICKED); + EventCounter clicked(m_win, wxEVT_HTML_LINK_CLICKED); wxUIActionSimulator sim; diff --git a/tests/menu/menu.cpp b/tests/menu/menu.cpp index abc4db0b0d..08667ef704 100644 --- a/tests/menu/menu.cpp +++ b/tests/menu/menu.cpp @@ -411,7 +411,7 @@ void MenuTestCase::Events() MenuEventHandler(wxWindow* win) : m_win(win) { - m_win->Connect(wxEVT_COMMAND_MENU_SELECTED, + m_win->Connect(wxEVT_MENU, wxCommandEventHandler(MenuEventHandler::OnMenu), NULL, this); @@ -422,7 +422,7 @@ void MenuTestCase::Events() virtual ~MenuEventHandler() { - m_win->Disconnect(wxEVT_COMMAND_MENU_SELECTED, + m_win->Disconnect(wxEVT_MENU, wxCommandEventHandler(MenuEventHandler::OnMenu), NULL, this); diff --git a/utils/screenshotgen/src/guiframe.cpp b/utils/screenshotgen/src/guiframe.cpp index 70bd0d4af9..2c3c1ab37a 100644 --- a/utils/screenshotgen/src/guiframe.cpp +++ b/utils/screenshotgen/src/guiframe.cpp @@ -101,11 +101,11 @@ void GUIFrame::AddMenuBar() this->SetMenuBar( mbar ); // Connect Events - this->Connect( m_menuSeeScr->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnSeeScreenshots ) ); - this->Connect( m_menuFileQuit->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnQuit ) ); - this->Connect( m_menuCapFullScreen->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnCaptureFullScreen ) ); - this->Connect( m_menuCapAll->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnCaptureAllControls ) ); - this->Connect( m_menuHelpAbout->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnAbout ) ); + this->Connect( m_menuSeeScr->GetId(), wxEVT_MENU, wxCommandEventHandler( GUIFrame::OnSeeScreenshots ) ); + this->Connect( m_menuFileQuit->GetId(), wxEVT_MENU, wxCommandEventHandler( GUIFrame::OnQuit ) ); + this->Connect( m_menuCapFullScreen->GetId(), wxEVT_MENU, wxCommandEventHandler( GUIFrame::OnCaptureFullScreen ) ); + this->Connect( m_menuCapAll->GetId(), wxEVT_MENU, wxCommandEventHandler( GUIFrame::OnCaptureAllControls ) ); + this->Connect( m_menuHelpAbout->GetId(), wxEVT_MENU, wxCommandEventHandler( GUIFrame::OnAbout ) ); } void GUIFrame::AddPanel_1() @@ -485,9 +485,9 @@ GUIFrame::~GUIFrame() { // Disconnect Events this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( GUIFrame::OnClose ) ); - this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnSeeScreenshots ) ); - this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnQuit ) ); - this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnCaptureFullScreen ) ); - this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnCaptureAllControls ) ); - this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnAbout ) ); + this->Disconnect( wxID_ANY, wxEVT_MENU, wxCommandEventHandler( GUIFrame::OnSeeScreenshots ) ); + this->Disconnect( wxID_ANY, wxEVT_MENU, wxCommandEventHandler( GUIFrame::OnQuit ) ); + this->Disconnect( wxID_ANY, wxEVT_MENU, wxCommandEventHandler( GUIFrame::OnCaptureFullScreen ) ); + this->Disconnect( wxID_ANY, wxEVT_MENU, wxCommandEventHandler( GUIFrame::OnCaptureAllControls ) ); + this->Disconnect( wxID_ANY, wxEVT_MENU, wxCommandEventHandler( GUIFrame::OnAbout ) ); } -- 2.45.2