Refactor listbox event sending code to avoid duplication.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 5 Jun 2010 22:57:53 +0000 (22:57 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 5 Jun 2010 22:57:53 +0000 (22:57 +0000)
commit53f60d4ab61af3d8f72eb2202b4cda96774531d8
tree707952430415fb3c23c93f15ffb49c7eb2075f6a
parente0520316922cb14314035f3ba6a596eb95ee9eec
Refactor listbox event sending code to avoid duplication.

wxMSW wxListBox implementation contained the same code as the private
LBSendEvent() function in lboxcmn.cpp, so make this function a (protected)
member of wxListBoxBase and reuse it instead.

Also change its and CalcAndSendEvent() return type to bool to be able to
return whether the event was processed or not.

As the result of this refactoring, the "is selected" flag is now set correctly
for the selection events under MSW (it was always off before).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64496 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
include/wx/listbox.h
src/common/lboxcmn.cpp
src/msw/listbox.cpp