]> git.saurik.com Git - wxWidgets.git/commit - src/msw/checkbox.cpp
Improve validation of wxCheckBox styles.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 16 Oct 2010 18:10:42 +0000 (18:10 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 16 Oct 2010 18:10:42 +0000 (18:10 +0000)
commitf254e2424a5220e559e48205ace1114ea3e87f3f
treea1267306e75492470977de0b78db8837a8a4912c
parenta9df18b4e46c2faa9df280e84c1e92bc35ec2143
Improve validation of wxCheckBox styles.

Detect when incompatible styles are used (this required changing the value of
wxCHK_2STATE to be non-null) and sanitize the styles (after asserting) in this
case.

Put the validation code in wxCheckBoxBase instead of having slightly different
versions of it in port-specific wxCheckBox implementations.

Add a unit test checking that the expected asserts are indeed generated.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65824 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
include/wx/checkbox.h
src/gtk/checkbox.cpp
src/gtk1/checkbox.cpp
src/msw/checkbox.cpp
src/osx/checkbox_osx.cpp
src/univ/checkbox.cpp
tests/controls/checkboxtest.cpp