X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1b68e0b5b90ed63309f02f30e33b884eeaec5a3d..6603907dea3324a55ea99608ee69e3b65634fe73:/src/common/ctrlcmn.cpp 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 + ; + } +} +