Make AutoHANDLE a template to allow specifying the invalid handle value, which
is inconsistent across Win32 API and is INVALID_HANDLE_VALUE for most kinds of
handles but 0 for some others, e.g. event object handles.
See #16233.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76653 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
When wxLongStringProperty is read-only, it should still be possible to view
its value by opening the dialog normally used for editing it, otherwise this
value cannot be seen (nor copied, which is also useful sometimes) at all.
Closes#14945.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76631 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This is especially important because the workaround of r76152 for IFileDialog
bug under Windows Vista also applied under later Windows versions as they were
not detected correctly.
Closes#16286.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76600 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
These operator functions are respectively adding and subtracting their arguments. Instead let the functions multiply and divide their arguments (like their wxPoint2DDouble counterparts were doing already).
See #10946.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76566 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We can't use _() in the static wxChar* arrays: first, because this doesn't
compile and second because if it did compile, it still wouldn't work as no
message catalogs are loaded yet when the static arrays are initialized.
Use wxTRANSLATE() instead and arrange for the strings to be translated when
they are really used. This is rather ugly and perhaps it would be better to
avoid passing untranslated labels array to the property classes but at least
the code compiles again now.
See #16266.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76562 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Fix an error for compile step of "Linux i386 wxGTK trunk no features" buildbot by forward declaring wxWindow class.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76550 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't test for wxUSE_NORLANDER_HEADERS, this is always true since many, many
years.
Remove tests for gcc version < 3.3, notably 2.95: the minimal supported gcc
version is 3.4.
Closes#15727.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76549 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't compare __VISUALC__ with versions 1200 (VC6) and earlier, such tests are
always true or always false now that we don't support VC6 any more, so just
remove them simplifying the code.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76548 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This compiler is not being developed since several years and almost certainly
can't be used to build the current wxWidgets sources anyhow, so remove all
support for it, including a lot of extremely ugly workarounds for its bugs
with template functions.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76546 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This allows to call Connect(wxIPV4address) on a wxHTTP object, without
having to explicitly specify the second argument (this was documented as being
a Watcom-specific problem, but actually it wasn't).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76545 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Not sure if this file is actually used at all right now, but update it to
avoid discrepancies with the other setup[0].h.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76544 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Most importantly, this allows us to remove all MSLU-related stuff.
Some functions which were previously loaded dynamically can now be just used
directly, too.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76535 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't define wxUSE_DBGHELP as 1 for MinGW, it was only supposed to be defined
as 1 for MSVC (just for all versions of it now that we don't support MSVC6
which couldn't compile this code).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76534 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This port is not used and is not being worked on, so remove it to reduce the
amount of the code which needs to be updated for every global change.
Also remove tests for VisualAge compiler which isn't used since ages.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76533 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
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
__WXMSW__ is not defined when compiling wxBase, so the tests which were meant
to prevent using Unix event loop classes under Cygwin (under which both
__UNIX__ and __WINDOWS__, but not __WXMSW__, are defined) failed, breaking
compilation of all wxEventLoop-related code in wxBase in Cygwin builds.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76505 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
In 64 bits, LONG is actually defined as int in Cygwin gcc headers, so is
different from long -- even if both types use identical representation.
Just add the casts to fix this for now, as this is the smallest ABI-preserving
change. Ideally, something better and less ugly would need to be done in the
future.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76502 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Previously __WIN64__ was only defined for 64 bit builds with MSVC, which
resulted in many problems when using 64 bit Cygwin compiler.
Also don't use MSVC-specific __int64 but our wxInt64 for WX{L,W}PARAM and
WXLRESULT definitions in 64 bit builds.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76500 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This breaks 64 bit Cygwin builds and is unnecessary for 32 bit ones where
configure already defines wxSIZE_T_IS_UINT correctly.
Closes#16130.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76498 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Previously the default parameter was only available in wxMSW and wxGTK. Added it to the base class as well to allow EnableCloseButton() calls without a parameter under other platforms too.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76496 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Added EnableFullScreenView() to have a full screen button in the title bar and also allowing ShowFullScreen() to make use of the newer full screen API.
See #14357.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76495 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
It's impossible to know what problem this was supposed to fix (it's been there
since the Dawn of Time: r2), but it prevents stddef.h from defining ptrdiff_t,
among others. We need ptrdiff_t.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76488 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add wxEVT_STC_CLIPBOARD_{COPY,PASTE} events, allowing to transform the text
being copied from or pasted into wxStyledTextCtrl.
Closes#16191.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76487 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
These fields were unnecessary and duplicated m_cmdString inherited from the
base class.
Also use base class GetString() instead of the redundant GetText() and
GetDragText() in the code, even though these methods are still kept for
backwards compatibility.
See #16191.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76486 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This class shouldn't need to be exported but not doing it breaks builds using
LTCG with Intel compiler, so do export it to avoid this problem.
Closes#16237.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76485 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add wxCONTROL_NONE which is just a symbolic name for 0 and use it in the code
to avoid g++ 4.8 warnings about mixing enum and int in conditional expression.
Closes#16242.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76484 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Since the addition of wxMSWOwnerDrawnButton, DLL builds started generated a
lot of warnings about using this non DLL-exported class as base class for the
DLL-exported wxCheckBox and wxRadioButton.
Simply suppress these warnings as they are harmless in this case because the
base class has no static data, which is the real problem this warning hints at.
Closes#16237.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76478 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The default implementation doesn't work for this reference-like class, and
this breaks not only swap() itself (see #14694), but also any algorithms using
it, such as std::reverse().
Fix this by providing our own specialization which does work correctly.
Closes#16234.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76474 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Ensure that we bring the native button in sync with the real state of the
radio button when we switch to normal state.
Also avoid using BM_GETCHECK for the owner drawn buttons as we don't use
BM_SETCHECK for them (as it's useless).
See #10137.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76460 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Create wxMSWOwnerDrawnButton class which contains all of this code.
Currently the methods of this class are (still) implemented in
src/msw/control.cpp.
See #10137.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76459 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Native radio buttons don't support changing their foreground colour, so use
owner drawn buttons if SetForegroundColour() was called, similarly to what was
already done for wxCheckBox.
Closes#10137.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76456 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Move it from wxCheckBox to wxControl to allow reusing this code in other
classes, notably wxRadioButton in the upcoming commits.
See #10137.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76455 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Just use wxArrayInt::Index() instead of doing a linear search in the array
manually. Also use RemoveAt() + Insert() instead of manually iterating over
the items.
See #16110.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76454 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Allow the renderer to specify the best height at the given width (or vice
versa) instead of the best size in both direction which is not defined for
e.g. wxGridCellAutoWrapStringRenderer.
Closes#15943.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76451 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The two compilers are binary compatible and by pretending that Intel compiler
is the same as MSVC, we allow using ICC to build applications using DLLs built
with MSVC.
Closes#9437.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76425 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Under MSW a thread has both an ID, returned by wxThread::GetId(), and a
handle, which couldn't be retrieved so far. Add an accessor to do it.
Closes#16170.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76418 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Allow calling this function not only from inside DoWriteText(): first, because
the existing code could be doing this (although this is only a concern in 3.0
branch as it was made private in the trunk) and second because it could
actually happen if the text limit was exceeded by user typing in the control.
See #15980.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76413 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
There is no need to do it as this is done by DoWriteText() and
AdjustSpaceLimit() doesn't work correctly if called from outside of it now.
Because of this, also make it private to prevent other accidental calls to it.
Closes#15980.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76412 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We did it up to MSVC 11 but this still seems to work just fine without /EHa
with MSVC 12 too, so relax the version check to allow it to pass.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76410 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Allow the code to determine which underlying technology is used for
implementing wxGraphics API. This is needed by the unit tests to account for
the known differences between platforms and may be useful in other cases.
Closes#16154.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76380 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Fix wxLANGUAGE_CAMBODIAN definition in autogenerated code, this was already
done manually in r76368 but these changes would have been lost after the next
generation, so update the script itself to generate them.
Closes#16183.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76379 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
the enum, but as such must still be given, before messing with the automatic
internal counter of enum by defining synonyms. Fixes#16183.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76368 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The timer is only used by Carbon code, there is no need for it in Cocoa, so
don't complicate things by starting it unnecessarily.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76324 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This fixes an ODR violation which could arise if wxWeakRef<T> was seen both
when T was an incomplete (e.g. just forward-defined) class and when it was
complete. As different implementations, with different binary layouts, were
used in these two cases, this resulted in fatal run-time problems.
Fix this by always using the slightly less efficient (because storing an extra
pointer) but simpler and safe "dynamic" wxWeakRef implementation.
Also get rid of checks for the ancient compilers such as VC6 and g++ < 3.3,
they are not supported any longer.
Closes#15884.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76316 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The existing overload taking bool didn't allow to specify whether the panel
should be just expanded or expanded and pinned, add a new one supporting this.
Also fix a bug with not updating the ribbon state in the old method.
Closes#16133.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76277 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The user-visible effect of this change is that removing the item from the menu
and adding it back doesn't lose its icon any more.
At the code level, wxMenuItem::SetBitmaps() and related methods are
implemented outside of "#if wxUSE_OWNER_DRAWN" which allows to use them even
in minimalistic library builds. And IsOwnerDrawn() is not used any more to
determine whether the item has bitmaps, just only if it's really owner drawn,
making the code more clear and fixing at least the bug above and possible more.
Closes#13878.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76202 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
No real changes, just make it clear that this method is MSW-specific and is
about using owner drawn items at MSW level and not wx one.
See #13878.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76201 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We need to call DoRemove() on all watcher objects to really remove them, just
removing our record of them was not enough and e.g. resulted in errors if we
tried to re-add a previously watched path again.
Closes#15531.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76187 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't log an incomprehensible error when the watched directory itself is
deleted, but generate wxFSW_EVENT_DELETE for it. This is consistent with the
behaviour under Unix and generally more useful.
Closes#13294.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76186 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Make wxIOCPService::GetStatus() smarter about its return value, it makes sense
to encapsulate the convention used to indicate the thread exit condition
inside wxIOCPService class itself instead of sharing it between it
wxIOCPThread itself.
It will also make it easier to detect more detailed error conditions in this
code.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76185 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
While the keyword is indeed supported since MSVC 8, it's only since MSVC 11
that using it doesn't generate C4481 compiler warning ("nonstandard extension
used"), so avoid using it with the earlier versions.
See #16100.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76184 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This avoids the warning about __cplusplus being undefined in the recently
added wxOVERRIDE logic and make the existing wx_xxx_cast<>s definitions
simpler.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76177 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Detect its support in the code by testing __cplusplus value and using specific
checks for MSVC and Clang as configure detects it as being available when
using recent g++ versions in non-C++11 mode, which do support this keyword but
warn when it is used without -std={gnu,c}++11 option, which makes actually
using it a bad idea in this case.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76174 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Make overriding virtual methods more explicit and enable additional checks
provided by C++11 compilers when "override" is used.
Closes#16100.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76173 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We include wx/cursor.h from wx/window.h anyhow (and can't avoid it as we have
a member of wxCursor type in wxWindowBase).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76165 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Currently this is only really implemented under Windows, just as the colour
support in wxFontDialog, but make the API available under all platforms for
consistency.
Closes#11614.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76160 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The native control doesn't make a secret copy of the image in this case (0RGB
bitmap, i.e. 32bpp ARGB bitmap with all alpha values set to 0) and just shows
the bitmap we assigned to it directly, so we must not delete it in this case,
otherwise nothing is shown at all.
Closes#16084.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76148 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
r76142 fixed the resource leak when wxStaticBitmap image was replaced by
another one but the leak still happened at the end, when the wxStaticBitmap
was destroyed.
Fix it there as well in the same way.
Closes#16068.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76147 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This can be used to "undo" the result of Bold() ,Underlined() or Italic()
methods and returns an unadorned version of the font.
Closes#11815.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76120 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
These methods already do exactly the same thing in the base wxAnyButton class,
there is no need to override them again.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76119 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use dladdr() under Unix, if available, to provide the same functionality as we
get from GetModuleHandleEx() under MSW and export it in a new public function.
Closes#15248.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76114 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This style tells the dialog to return the paths of the link being selected
without dereferencing it.
Currently only implemented under wxMSW as the links are not dereferenced by
default in wxGTK anyhow. But we may want to change this and implement it there
too for consistency in the future.
Closes#15429.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76085 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The code used by WM_INITMENUPOPUP and WM_EXITMENULOOP handlers shouldn't be
used in wxUniv build as it's not used there anyhow and doesn't even compile.
Closes#16039.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76077 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't repeat the same code in all the ports, move it to the common base class
and add a new virtual DoYieldFor() for the really port-specific code.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76061 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Previously, the code would assert if the caller passed too many
arguments to wxPrintf() or other printf-like functions. But that can
happen legitimately in translations: in some languages such as Hebrew,
using "1" (i.e. "%d") in the singular feels unnatural and it's better to
use the word "one" and left the variadic argument unused.
Relax the check not to assert in this case. This is consistent with the
standard library and other implementations. Notice that gettext's msgfmt
doesn't complain about this case either in the specific case of singular
forms.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76027 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The changes to type_traits headers detection with Clang broke Clang use
with the Xcode projects. Fix this by not setting HAVE_* macros in
config_xcode.h for Clang and letting defs.h detect the features.
See #15915.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76016 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't override HAVE_TR1_TYPE_TRAITS detected by configure with
HAVE_TYPE_TRAITS detected by clang __has_include() as the latter is less
reliable and can return true even when the header is not actually usable, as
it happens with g++ 4.8 <type_traits> in non C++11 mode.
Closes#15915.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75985 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Provide a built-in alternative for using external files for the bitmaps in
SVG: allow embedding them inside the SVG itself using "data:" URI.
And also allow to define custom handlers to make the behaviour even more
flexible.
Closes#15968.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75981 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
It was possible to call SetAttribute() to change this attribute value but not
to get it back. Override DoGetAttribute() to also allow the latter.
See #15625.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75978 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
When not using compiler TLS support (which is the default now), TLS variable
itself needs to be initialized and user-defined code in the global objects
ctor could be called before this happened, resulting in using uninitialized
CRITICAL_SECTION under Windows and a crash.
Fix this by wrapping global wxThreadSpecificInfo itself in an accessor
function ensuring that it is always initialized before use.
Notice that this required adding wxTLS_TYPE_REF() as wxTLS_TYPE() itself can't
be used for the function return value (__thread or similar can only be used on
the variables).
Closes#16009.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75949 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We kept doing it for compatibility with pre-2.5.3 versions but this was a long
time ago and we don't need this any longer.
See #2508.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75944 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Do it only once now that it's used in 3 different places (it recently started
to be used in src/msw/anybutton.cpp as well) instead of defining it thrice.
This also fixes MinGW build.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75930 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Starting to watch a path, stopping to watch it, starting to watch it again and
stopping again resulted in a crash in wxMSW wxFileSystemWatcher implementation
because the watcher object wasn't kept artificially kept alive when it was
stopped for the second time. This happened because our way of keeping it alive
was to store it in a hash map indexed by path, but if a watcher for the same
path (added there when this path was first unwatched) was already present in
the map, the watcher wasn't added to it and not kept alive.
Fix this by using a vector instead of a map. We obviously sacrifice quick
access to it by path but at least this doesn't crash any more. And we could
actually still use a map, just indexed by the (unique) pointer to the object
stored inside wxSharedPtr itself, and not its path. But a vector might be a
more efficient data structure in practice, if we keep it from becoming too big
as we should try to do by triggering artificial port completions when a watch
is removed.
At any rate, at least the crash is fixed for now.
Closes#15995.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75905 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
For compatibility with wxMSW, send event up the parent chain.
Properly handle setting the cursor for a wxSetCursorEvent, and don't overwrite the window cursor.
see #15801
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75821 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Previous this resulted in an assert and broken behaviour as it didn't update
the internally stored state. Do update it now and remove the assert as it
isn't possible to distinguish between user code calling Check() and wxGTK
doing it itself from wxCheckListBox implementation.
Closes#15940.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75786 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This is better than showing them initially and then hiding them if only
because it avoids the unexpected wxEVT_SHOW events being generated.
Closes#15919.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75757 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This fixes the DLL build of aui library as it can now be linked without
leaving any unresolved dependencies to the code in xml library (where
wxXmlNode is implemented).
Closes#15686.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75734 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This declaration conflicted with the one in the latest MinGW-W64 headers and
wasn't needed anyhow as we don't use neither the enum itself nor its members
in our code, so just remove it to fix the build in 64 bits with MinGW-W64 4.8.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75669 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Blind fix to avoid strange warnings given by OS X build slave about the ctor
being deprecated when it's defined, not used.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75667 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This virtual dtor is not really needed as manager objects are static
singletons and are not destroyed via their pointer, but add a virtual dtor
just to avoid g++ warnings about its absence.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75666 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
No real changes, just avoid the unnecessary copying and also make the
signatures more consistent by adding the apparently forgotten "&" in a couple
of places.
See #15893.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75657 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Ensure that 32bpp bitmaps selected in wxMemoryDC use DIB for their internal
representation as GDI+ functions don't seem to work correctly with DDBs with
alpha channel.
Closes#13328.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75648 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
{Freeze,Thaw}() themselves are not virtual any more, so overriding them
doesn't really work and it is unnecessary to reimplement the reference
counting already done by the base class anyhow, so override the DoXXX()
versions instead.
Closes#15877.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75640 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Explicitly reset wxBitmap alpha flag after clearing its alpha channel to
ensure that we don't treat it as having alpha after going to all the trouble
of ensuring that it doesn't/
See #14403.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75588 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wx/osx/setup0.h is auto-generated, so r74708 shouldn't have changed it as the
change was overwritten by r75568 which regenerated that file. Instead, disable
wxUSE_PREFERENCES_EDITOR in iPhone-specific file.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75571 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
While compiler TLS support is simpler to use and much faster than using our
own Win32 API-based TLS implementation, it results in difficult to debug
crashes when used inside a dynamically loaded DLL under Windows XP, so disable
it by default to be safe.
Closes#13116.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75568 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't use mask and alpha together, this results in visual artefacts and masks
are unnecessary with RGBA bitmaps anyhow.
The only potentially problematic remaining case is mixing bitmaps with alpha
and mask inside the same image list (as we need to indicate whether we use the
mask or not when creating it), but this should probably be rare and in the
meanwhile we can at least RGBA bitmaps with image lists, which includes doing
this implicitly when they are used as button bitmaps.
Also refactor wxBitmap code to extract part of CopyFromIconOrCursor() to allow
reusing it in the newly added MSWUpdateAlpha().
See #11476.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75567 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Deprecate the use of the old untyped constants but don't schedule them from
removal in a future wx version by removing "#if WXWIN_COMPATIBILITY_3_0" tests
around their definition and use. Provoking deprecation warnings in the code
using these constants is worth it as they are unclear and it's easy to make
mistakes when using them, but breaking this code compilation outright can't be
justified -- even in the future.
Also use more informational wxDEPRECATED_MSG() instead of a simple
wxDEPRECATED() as it might not be obvious at all how should the code be
updated exactly.
Finally, avoid the use of deprecated constants inside the library itself.
As a side effect, this closes#15814.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75565 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Simply use wxNumberFormatter instead, this reduces code duplication and avoids
bugs due to formatting inconsistencies in DoubleToString().
Closes#15625.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75561 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Unfortunately we can't keep it in wx/compiler.h which is included too early,
before UNICODE macro is defined, and we can't define it before including
wx/setup.h which itself must be included after wx/compiler.h.
So move it to wx/msw/gccpriv.h which is not a great solution, as the best
would be to get rid of this gcc-specific file completely, but at least should
make everything build again and ensure that _mingw.h is included after UNICODE
definition.
Closes#15805.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75555 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This hack resulted in showing a black rectangle corresponding to the initial
size of the first notebook page when creating the notebook, as could be seen
in the notebook sample by pressing Alt+2,Alt+1 to recreate the notebook after
the startup.
If the bug that this hack was supposed to fix hasn't been fixed yet (and it
might have been by r73126, but it's hard to be sure as we don't have any test
case for that bug), we could reintroduce this call to Update() but only if
we're not inside a deferred resize (i.e. m_hDWP != 0) as it just can't work
correctly in this case.
This reverts r69793.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75538 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
SetSize() doesn't do anything for MDI children in wxGTK and other ports using
TDI version of MDI, but it shouldn't result in an assert from
wxTLW::DoMoveWindow() neither, so override DoMoveWindow() in wxTDIChildFrame
to avoid it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75522 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This fixes the build with some versions of MinGW which depend on UNICODE being
defined correctly in _mingw.h which is included from wx/compiler.h, so that
before this change the build was broken as inconsistent definitions of UNICODE
were used there and in windows.h included later.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75520 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This avoids g++ warning about HAVE_VARIADIC_MACROS redefinition in setup.h if
wx/cpp.h happens to be included before it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75519 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Typical wxScopedArray initialization uses "new T[n]" expression, allow to omit
most of it and specify just n, the number of elements to allocate.
Use the new shorter form in the places where wxScopedArray(new ...) was used
(which is in almost all of them)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75504 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The size is expressed in logical coordinates and needs to use bitmap's
scaled size, otherwise it would appear twice as large in both
dimensions.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75350 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Under this system vsscanf() is declared as taking a non-const char* as first
argument which prevented our code using it from compiling. Wrap it in
wxCRT_VsscanfA() adding the necessary const_cast<> to fix this.
Closes#15638.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75340 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't fall back to wxALIGN_CENTRE, even if the renderer doesn't specify its
own alignment we still have to take the column alignment in consideration, so
use GetEffectiveAlignment() (which had to be made public for this).
This notably fixes (again) hit testing for wxDataViewToggleRenderer in the
generic version.
Closes#15731.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75329 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Disable setting focus in response to TVN_SELCHANGING when deleting an item in
a single selection control too -- this was already done in multi selection
case but not in this one, for some reason.
Also refactor the code to avoid duplicating TreeView_DeleteItem() calls.
Closes#15721.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75308 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We multiplied the number of items by the size of each element twice, once in
wxVector::reserve() itself and once in Ops::Realloc() it called, so we
allocated much more memory than actually needed.
Fix this by passing the number of elements to Ops::Realloc().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75246 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Native OS X apps sometimes have certain app-wide comments in the
Apple/app menu ("Check for Updates" is a typical example). Make it
possible to write well-behaved OS X apps by exposing this menu to user
code.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75231 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This is important not only for consistency with the other platforms but also
because without SIZEOF_LONG_LONG being defined, "%lu" format specifier can't
be used with size_t values under Win64, as Arg_Size_t is not defined correctly
there if SIZEOF_LONG_LONG is unknown.
Closes#15670.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75206 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Added identifier to wxRichTextObject so objects can be addressed by name.
Generalised wxRICHTEXT_CHANGE_OBJECT command so it can now apply to a paragraph as well as an object within a paragraph.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75124 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This header uses wxScopedPtr<> but didn't include the corresponding header, do
it now as we can't always rely on this happening via the other headers as it
does in the default build config.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75058 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
As 10.5 is the minimal supported version, it doesn't make sense to check for
it (or even earlier versions) during the build or run-time.
Closes#15580.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75028 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't provide our own (not fully functional) definitions of them and always
use the system versions as we don't support OS X 10.2 which was the last
platform where these functions didn't exist/work.
See #15580.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75024 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This fixes the build for non-x86 architectures when using MinGW with makefiles
(i.e. not using configure) as without this no WX_CPU_XXX was getting defined
at all, resulting in failures when building any programs using wxWidgets that
includes wx/msw/wx.rc (including our own minimal sample).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75020 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This partially undoes the changes of r73290 by keeping __WXMSW__ defined for
the console mode user applications and only undefining it when building
wxWidgets itself.
This allows the existing code using __WXMSW__ to continue compiling correctly
with wxWidgets 3.0.
Closes#15579.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75006 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We must use wxUIntPtr and not long here to avoid truncating the upper half of
the pointer when sizeof(void*)>sizeof(long).
Closes#15578.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75005 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
While we can't change the type of wxVariant to which SAFEARRAYs are converted
by default, it's much more convenient to work with the variant objects of the
correct type, i.e. using wxVariantDataSafeArray, when dealing with SAFEARRAYs,
so add a flag which can be set to tell a wxAutomationObject to behave in this
way.
Closes#14700.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75004 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Otherwise linking with it can create problems with the code using other
network libraries, which link with ws2_32.dll (Winsock 2).
See #15562.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75002 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This undoes r74888, r74913 and r74969 because all of them were still not
enough to make ICC build work correctly. So instead of trying to find all the
places where we need to test for __INTELC__ in addition to __VISUALC__, just
revert to defining __VISUALC__ for ICC under Windows as it uses its CRT anyhow
and in the vast majority of cases we are actually testing for the CRT and not
the compiler anyhow.
Closes#15359.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74999 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This format is special as it doesn't have a fixed value and is registered
dynamically instead. So we need to call HtmlFormatFixup(), which checks if the
given custom format is actually wxDF_HTML, before comparing formats to ensure
that the real value assigned to this format compares correctly to the fixed
wxDF_HTML value.
Closes#15280.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74997 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775