Commit Graph

13 Commits

Author SHA1 Message Date
Vadim Zeitlin
b1e59a6d60 Add wxFloatingPointValidator::SetFactor()
This allows displaying values in percents (or also currency units and
subunits, for example) without changing the actually stored value.
2018-01-26 14:39:57 +01:00
Vadim Zeitlin
a6d677a0fe Check for correct window in wxNumValidatorBase::SetWindow()
Override SetWindow() to check that the validator is being associated
with the window of the correct type, this allows to trigger an assert
immediately if this is not the case, making it simpler to find the error
as the call to SetValitator() on the wrong window will be in the call
stack when this happens, unlike before when the assert would happen only
at some later time.
2018-01-07 01:26:53 +01:00
Vadim Zeitlin
48faeb65b3 Fix copy ctor in numeric validators classes
wxFloatingPointValidator and wxIntegerValidator copy ctor didn't copy
the associated window, so it was lost when the validator was Clone()'d.

Fix this by correctly using wxValidator copy ctor, instead of the
default one, in the copy ctor of the common wxNumValidatorBase base
class.
2018-01-04 21:39:57 +01:00
Vadim Zeitlin
f83d16aa46 Undefine min and max before using them in wx/valnum.h
Avoid problems when using this header in code also include <windows.h>
(and not doing it via wx/msw/wrapwin.h) by ensuring that min and max
used here are not defined as macros.
2017-12-26 04:29:42 +01:00
Vadim Zeitlin
9db6f6ca1a Make wx/valnum.h self-contained by including wx/textentry.h
This header uses (i.e. forward declaration wouldn't be sufficient)
wxTextEntry, so it must include the header declaring it.
2016-12-09 01:58:14 +01:00
Maarten
977a826639 use more wxOVERRIDE (#329) 2016-09-25 13:21:28 -07:00
Paul Cornett
27a8d28029 more use of wxOVERRIDE 2015-09-06 17:20:42 -07:00
Vadim Zeitlin
f4b80e5337 Remove MSVC6 support.
Don't support this compiler any more, this allows to get rid of tons of
MSVC6-specific workarounds, in particular we can now use Bind() and natural
template functions calls in the library code.

Also remove MSVC6 project and solution files and don't generate them when
bakefile_gen is ran any more (removing the remaining occurrences of msvc6prj
from the bakefiles results in weird bake-time errors, so it's simpler to just
leave them there).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76532 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-15 22:32:17 +00:00
Stefan Csomor
e71baaa811 calling explicit base class constructor from copy constructor
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67215 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-16 10:55:30 +00:00
Stefan Csomor
f5f3d4ec5c clang fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66791 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-27 17:15:40 +00:00
Stefan Csomor
df04f800b8 supporting clang 2.0 under xcode, see #12332
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66780 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-27 11:00:26 +00:00
Vadim Zeitlin
6496afbab8 Work around wxNumValidator compilation problems with MSVC 6.
Surprisingly, MSVC 6 seems to be able to compile most of the code but chokes
on a wxCOMPILE_TIME_ASSERT involving an inherited typedef. As this assert is
not critical, simply disable it for this compiler.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66722 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-19 23:47:09 +00:00
Vadim Zeitlin
a54cf37118 Add wxIntegerValidator and wxFloatingPointValidator classes.
Add validators for integer and floating point numbers.

Add an example of their use to the validate sample as well as a new unit test
and documentation for them.

Use the new classes instead of wxTextValidator in wxGrid code.

Closes #12166.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66714 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-19 10:48:28 +00:00