There is no need to handle this style specially here, it's supposed to
be handled at wxWindow level and is, indeed, at least in all the major
ports.
So revert 2119b213e3 (see #13616) and the
workaround for it applied later for macOS (see #14856). And this also
removes the need for handling wx[HV]SCROLL in wxScrolled (see #17846).
Closes#14856, #17846.
Several compilation fixes due to the fact that sizeof(long)==8 under
Cygwin in 64 bits.
This allows the library to compile, but there are still run-time
problems, notably the unit tests throw an unknown exception currently.
Even though we don't need to perform the checks for the availability of
<unordered_map> or <type_traits> headers when using C++11 because we can
safely assume they're indeed available, we still need to define the
corresponding symbols, as if the checks were performed, so that the code
inside and outside the library could test them in any case, whether
we're using C++11 or not.
When using configure, use the same family of hash sets/maps when
building wxWidgets and the applications using it as doing otherwise
results in ABI incompatibility.
Avoid showing message boxes even if we don't have the associated console
as this prevents the test from completing on its own if an unknown
exception happens.
This is another fix for 64 bit Cygwin build: LONG is defined as a 32 bit
type in it, but not long, which is 64 bits, so use the former instead of
the latter.
Due to the same problem with sizeof(long) mismatch as in the previous
commit, we can't use struct timeval, with its long fields, in 64 bit
Cygwin builds, and need to use __ms_timeval instead.
Add wxTimeVal_t type to hide this difference and update all code
compiled under MSW (there is no need to uglify Unix-only code using
timeval, as in wxSelectDispatcher, for example) to use it instead of
timeval.
Use __ms_u_long instead of just u_long with Cygwin to avoid mismatch
between (64 bit) Cygwin long and (still 32 bit, even in 64 bit build)
Windows API long.
Use __LONG32, which is always 32 bits when using Cygwin, unlike long,
which is 64 bits there in 64 bit builds, and so can't be used as an
argument to InterlockedExchange().
Closes#16746.
In some specific scenario, described in the newly added comment in
wxStaticBoxBase::Enable(), the box and its label could remain disabled
after its parent was disabled and re-enabled.
Fix this by continuing to use the derived class version for disabling
the box children, but not when enabling them, as the base class version
already does the right thing in this case.
Calling Enable() on all children from wxStaticBox::Enable() was wrong,
the actual status of the child, returned by wxWindow::IsThisEnabled(),
is not supposed to change just because its parent was disabled.
Call NotifyWindowOnEnableChange() to avoid this, while still disabling
the children visually.
Simplify the code by replacing 2 conditionally-compiled DoEnable() calls
with a single unconditional one.
This doesn't change the behaviour of Enable(), as it always called
DoEnable() on the window itself and only did it for its children when
wxHAS_NATIVE_ENABLED_MANAGEMENT was not defined before and continues to
do the same thing now, but it should fix a small bug in Reparent() as it
didn't update the actual status of the window if it changed as the
result of reparenting before, even though it was supposed to.
There doesn't seem to be any need to have this symbol in the header,
when it's only used in NotifyWindowOnEnableChange() in wincmn.cpp.
No real changes.
This reverts commit d26758044c which was a
workaround for the problem of wxWakeUpIdle() dispatching events, as this
is not the case any more after the latest changes.
It just forwards to (virtual) WakeUp() and there should be no need to
ever override this method itself (nor even to keep it, except for
backwards compatibility).
No real changes.
Since the switch to using an event object for idle handling wakeup,
WM_NULLs are not being sent any longer, so wxIdleWakeUpModule didn't do
anything, resulting in pending event dispatching being paused while our
event loop was not running, as it happened, for example, while the
window was resized.
See #17579.
This reverts commit ebb3a791b9,
effectively reapplying 6c40531fb7 once
again.
This breaks wake up when not running our own event loop once again
(see #17579), but this will be fixed in the next commit.
This can result in deadlocks because wxWakeUpIdle(), admittedly rather
unexpectedly, can result in dispatching a message in the main thread,
which could reacquire the same lock again.
Add missing header, source and resource files.
Add missing data files (font), remove deleted data files (help).
Fix specifying xrc sample data files.
Remove WXUSINGDLL check from dialogs sample, it is not defined in e.g. static gui build.
Allow specifying label="1" attribute in wxRadioBox <item> tags to
indicate that the usual translation of "_" to "&" should be done, as for
all the other labels.
This is still not the default behaviour to avoid breaking any existing
XRC files using "_", even though using labels="1" by default would make
more sense.
Translate all strings in the new GetNodeText() function replacing the
old GetText() which was mostly used for translatable strings before --
except that <item> tag contents didn't use it because it also performed
string unescaping, not wanted for the control items, in addition to
translation.
Replace the old GetText() (while still keeping it for compatibility,
i.e. to avoid breaking any custom XRC handlers using it) with the new
function which is more flexible and can be used for all tags.
No real changes, this is just a refactoring.
Unlike all the other nodes containing translatable text, the contents of
the <item> tags, used for wxChoice, wxListBox etc items, is not escaped
(because it can't contain mnemonics), so don't unescape it when
outputting it from "wxrc --gettext" neither.
See #18033.
This does what 1c2e58cd85 tried to do
manually correctly, by updating bakefile and rebaking, and so finally
completing the changes of 961a1c2b39.
See #17962.
Extract styles initialization into a function reused by both
wxSpinCtrlXmlHandler and wxSpinCtrlDoubleXmlHandler.
No real changes, this is a pure refactoring.
Fix the problem with compiling user code including wx/debug.h as the
first wxWidgets header under MSW. This ought to work, but didn't,
because wx/debug.h included wx/chartype.h without including wx/defs.h
(because there is already an inclusion in the other direction), which
defines SIZEOF_WCHAR_T required by wx/chartype.h, first.
Notice that we repurpose the existing but completely unused (no mentions
of it or the symbols defined in it anywhere neither in wxWidgets nor in
any of the code search engines) wx/types.h header as it has a fitting
name and this avoids having to add a new header and remove the existing
one.
Replace the specialized Python script used for it before (and which was
actually forgotten to run a couple of times already) with a newer
version of upmake, which can now update CMake variable definitions too.
This message shouldn't be given only when --verbose is given, it's
useful as a reminder and you shouldn't have to remember to give a
special option to get this reminder.
Don't strip the <if> tags from bakefile variables (this bug fix is
actually in Makefile::Update Perl module, but is incorporated here by
reference) and remove these tags which somehow made it into upmake input
file, as they make no sense there.
Note also that upmake was recreated using a different version of fatpack
(0.010007), which accounts for many other differences in this file.
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.
Allow overriding the method called when the validator is associated with
the window, this can be convenient to perform some initialization on the
validator instance actually used as it can't be done on the initially
created object itself because it will be cloned by SetValidator(),
creating a new instance.
Also change SetWindow() to take wxWindow instead of wxWindowBase, this
still requires the cast in wxWindow::SetValidator(), but it's better to
have it there rather than in wxValidator and use the simpler type in the
public function signature.
This behaviour might be not completely intuitive, but it makes it much
simpler to handle the box state using a checkbox as the label control
(which is by far the most common case of using box window labels).
Notice that while we could add a separate EnableWithoutLabel() method to
wxStaticBox to make it possible to set the state of the box directly
relatively easily, it wouldn't help with using wxEVT_UPDATE_UI for
managing the box state indirectly as it relies on calling Enable() only.
And this solution does allow wxEVT_UPDATE_UI handlers for the box itself
to work (provided the handler takes care to check for the event object
being the box itself, as otherwise it would still disable the child
checkbox when its wxEVT_UPDATE_UI bubbles up to the box).