X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/674ac8b919eecbc201b5f23b470a567cd0565e10..28be2e8a170979d476a5ea4f585505b8a2f5af27:/src/common/ctrlcmn.cpp?ds=sidebyside diff --git a/src/common/ctrlcmn.cpp b/src/common/ctrlcmn.cpp index 8e99dd0b17..479e92c1f5 100644 --- a/src/common/ctrlcmn.cpp +++ b/src/common/ctrlcmn.cpp @@ -68,5 +68,28 @@ void wxControlBase::InheritAttributes() void wxControlBase::Command(wxCommandEvent& event) { - (void)ProcessEvent(event); + (void)GetEventHandler()->ProcessEvent(event); } + +void wxControlBase::InitCommandEvent(wxCommandEvent& event) const +{ + event.SetEventObject((wxControlBase *)this); // const_cast + + // event.SetId(GetId()); -- this is usuall done in the event ctor + + switch ( m_clientDataType ) + { + case ClientData_Void: + event.SetClientData(GetClientData()); + break; + + case ClientData_Object: + event.SetClientObject(GetClientObject()); + break; + + case ClientData_None: + // nothing to do + ; + } +} +