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
This commit is contained in:
Vadim Zeitlin
2013-04-25 10:11:03 +00:00
parent 3f7564f229
commit ce7fe42e84
405 changed files with 2703 additions and 2409 deletions

View File

@@ -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(