Allow measuring the descent and external leading of an empty string by
measuring just a space instead in wxOSX. This makes the behaviour more
consistent with wxMSW and makes the unit test added in r74464 pass under OS X
too.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74524 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The tests for these functions may succeed on the system we're running under
but the functions may not be actually available on the system the application
is going to run under (if it's < 10.7).
So use our own replacements for these functions unless 10.7 was explicitly
chosen as the minimal possible version.
An alternative solution could have been to use weak linking but this is more
difficult and there is no real gain (performance would need to be measured
first).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74523 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
It was based on a completely erroneous assumption that setlocale() returns the
locale that had been previously active when it actually returns the newly set
locale.
This fixes unit test failures in StringTestCase under OS X, as the locale
wasn't correctly restored by DateTimeTestCase that used this class.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74522 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The m_i field is only used in the currently commented out debugging messages,
suppress a warning about it being unused.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74521 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Clang detects that a class member is unused (under non-Windows systems) which
is quite impressive but not really useful in this particular case, so suppress
this warning by "using" it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74519 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
And also less annoying: remove the messages from DoMoveWindow() which could be
given during resizing but not necessarily corresponded to the final control
size.
And give more details about which control is not being given enough space when
a too small size is given in the ctor.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74516 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The change of r71371 resulted in using the already destroyed (implicitly, done
as part of destroying the wxView that failed to initialize) wxDocument in
wxScopeGuard destructor.
Avoid this and make the old (i.e. pre-r71371) code exception safe while
keeping its semantics exactly, i.e. only delete all views if the document
still exists.
Also add a comment explaining what's going on here because the ownership rules
in docview code are frankly crazy.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74515 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The changes of r73483 broke inclusion of the manifest in the programs built
using MinGW because wxUSE_RC_MANIFEST was never defined. Somehow nobody
complained about it but this resulted in using comctl32.dll 5.80 instead of
6.0 and e.g. problems with toolbar appearance (see #13512).
Do use the manifest by default with MinGW and, in fact, all the other
compilers if any other ones still work, as only MSVC is known to embed the
manifest automatically and we take care of it separately.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74509 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Do keep compiler-specific wxCHECK_MINGW32_VERSION() in wx/compiler.h as it's
needed by wx/cpp.h which includes wx/compiler.h only. But put the rest of the
stuff in gccpriv.h in its old place as including it before wx/setup.h didn't
work correctly and was unnecessary anyhow.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74506 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The free space near the tabs was always filled with the default light grey
colour, use wxNotebook background colour itself to fill it now.
Do it by changing the code in wxNotebook::OnPaint() to use the background
colour brush and ExtFloodFill() to paint over the default grey, instead of the
patterned background brush which is supposed to be used for the pages area
only and not for the tabs and which was not even taken into account anyhow as
the default window proc erases the entire contents of the DC we pass to it
anyhow (at least in the default top-aligned tabs case).
Also inherit the background colour from parent by default now, this ensures
that wxNotebook blends with its parent when its background colour has been
explicitly set by default, without the need to call its SetBackgroundColour()
explicitly.
See #13745.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74505 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Updated the Xcode projects to include wakeuppipe.cpp.
Also fixes the wxiphone project which appeared to have 2 source file references concatenated (stattext.mm and slider.mm) since the last commit. This unfortunately happens sometimes when running makeprojects.applescript.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74503 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
"MSW" is used as the name of toolkit using the standard Windows UI while
"Windows" is the name of the OS under which wxGTK can be now used too (in
addition to wxMSW).
This terminology is not perfect but at least let's keep it unambiguous.
Closes#15328.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74502 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This fixes linking of the widgets sample when using wxUniv/X11.
It partially reverts the changes of r73290 which only included this file in
some selected ports instead of all of them for some reason.
Closes#15327.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74499 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
In the majority of cases set the svn:eol-style property (mostly to native for sources and LF for m4 files) and svn:keywords to Id. Applied for files that were added since r72503.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74498 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The samples makefiles were not regenerated after the recent Scintilla changes
(see r74425), do it now. There are no real changes for most of them (except
stc sample), but it ensures that rerunning bakefile doesn't change anything.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74497 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This solves the problem with wx/defs.h -> wx/platform.h -> wx/setup.h which
resolves to msvc/wx/setup.h -> wx/version.h -> wx/cpp.h include path which
resulted in __VISUALC__ not being defined in wx/cpp.h.
This problem was not new but went unnoticed for a long time and was only
discovered when wxCHECK_VISUALC_VERSION() started being used in wx/cpp.h too
as now the compiler started warning about wrong #if syntax due to it being
undefined.
Putting the compiler-specific definitions in a separate file allows this file
to be included from wx/cpp.h to ensure that these symbols are always defined
in it and also makes things a little better organized.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74496 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Using wxNOT_FOUND and an unsigned size() return value in the same operator ?:
resulted in wxNOT_FOUND being converted to an unsigned size_t type and while
converting it back to (signed) long worked in 32 bit builds where long and
size_t have the same size, it was broken in 64 bit builds where their sizes
are different.
Thanks g++ for catching this one.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74493 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This is needed to at least silence g++ warnings but may actually even fix a
real problem as these classes can be inherited from and are deleted via a
pointer (to "this" itself, in Release() implementation).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74492 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The main user-visible effect of this change is that giving configure
--disable-vararg-macros argument now really disables the use of variadic
macros whereas it didn't disable them in wx/cpp.h before.
It is, of course, also less confusing to not have two very similar but
different symbols.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74489 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The functions are available in wxBase builds too, but wx/windowid.h
isn't. Rather than always including that header, just use int, for which
wxWindowID is a typedef. This keeps the functions available in wxBase
for compatibility and is consistent with how IDs are handled in other
parts of wxBase, particularly wxEvent.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74486 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxNewId(), wxRegisterId() and wxGetCurrentId() functions all work with
window IDs, so they should use the dedicated type. Previously, they
worked with long, which is not even the same type (wxWindowID is int),
causing implicit type conversion warnings.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74485 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This allows applications using wxMotif to link again after the changes of
r74350 -- and wxExecute() unit tests actually pass, too.
Closes#15305.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74480 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775