This is unnecessary at least since removal of Windows CE support back in
8282c1be0f (Remove Windows CE support, 2015-08-27) and probably for much
longer.
This allows to retrieve the current contents of the text entry part of
wxSpinCtrl.
For now provide a stub in the base class, will be made pure virtual
later.
Co-Authored-By: Vadim Zeitlin <vadim@wxwidgets.org>
Introduced in 53bd139, wxReadlink() trivially wraps readlink(), but
returned int instead of ssize_t as defined for readlink() by POSIX.
Fixes "Implicit conversion loses integer precision: 'ssize_t' (aka
'long') to 'int'" on platforms with sizeof(ssize_t)>sizeof(int).
This just uses the existing wxImage ctor from XPM data and wxCursor ctor
from wxImage, but will allow the code creating cursors from XPM to still
work even when wxImage ctor from XPM is made explicit.
Add a trivial test just to check that the new ctor can be used.
Use the same name as in the other ports for the function doing the same
thing, there doesn't seem to be any good reason to name it differently.
Also avoid declaring it when wxUSE_IMAGE==0 as it's not defined in this
case (again, consistently with the other ports).
wxGTK already did it like this, but also only declared ctor not taking
wxImage in this case, while wxMSW and wxMac declared this ctor in any
case, even when wxUSE_IMAGE==0, but didn't define it then.
This doesn't matter much anyhow, as the build with wxUSE_IMAGE==0 is
clearly broken and these changes are not enough to fix it, but be at
least somewhat consistent and:
1. Don't declare methods using a class which is not available at all.
2. Do define methods using wxImage only internally, even if they do
nothing when it's not available.
No real changes.
wxWidgets may be unaware of the locale being used and may be unable to
get correct information from its languages database. For example, en-AT
locale, supported by Windows 10 and using "," for decimal point, would
be interpreted as en-US by wx, and return "." here.
The other situation, when wx supports a locale that the OS doesn't,
shouldn't make a difference here because in that case, CRT wouldn't
support the locale either and CRT formatting functions wouldn't be set
to use it.
See also somewhat related 9fc78c8167.
For monochrome icons height reported by GetObject() is doubled because
icon bitmap contains both AND and XOR masks. To get actual icon height
we need to divide the value by 2.
Closes#19146.
These paths are actually URLs and so the special URL characters must be
percent-encoded in them.
Document this and add a test checking that this is how it works.
Closes#19142.
Concatenate the string only once instead of doing it several times.
Compiler might be optimizing this anyhow in release builds, but it
definitely helps in at least the debug ones and doesn't cost anything.
This variable was added back in 3ef22a5b02 (trying to fix race
conditions. double deletions and memory leaks on thread termination...,
2003-09-21), but not used even then, nor ever since, so just remove it.
Not doing it could result in using the now invalid or, worse, reassigned
to some other DLL, TLS slot if the library is initialized again later.
Also add asserts checking that the index is initialized before using it.
wxWidgetCocoaImpl injects implementation of several
NSDraggingDestination protocol methods, but never called their base
implementations, presumably on the assumption that drag and drop is
explicitly supported and not builtin into native NSView-derived
controls.
This prevented native builtin d'n'd in e.g. NSTextView (text can be
copied and inserted by dragging it to the insertion point) from
working. Fixed by always calling base implementation.
Closes https://github.com/wxWidgets/wxWidgets/pull/2320
No real changes, just use the same _PropertySheetDisplayName element as
the standard style sheets use to show a slightly more user-friendly
label in the Property Sheet manager window in MSVS.
If we have to change the client size, it's better to do this before
sending the event whose handler might rely on the size being already
correct.
Co-Authored-By: Paul Cornett <paulcor@users.noreply.github.com>
This fixes a problem similar to that fixed in the previous commit but
for SetMinSize(), which was also ignored if done after calling
wxSizer::Fit() and before showing the window, as the explicitly set min
size was also overwritten by the pending min size computed from the
client size corresponding to the sizer fitting size.
The fix is similar too: just invalidate the pending minimum size if
SetMinSize() is called.
Calls to SetSize() were ignored in wxGTK if they happened after calling
wxSizer::Fit() since the changes of f655a52fba (Allow wxSizer::Fit() to
work properly when called from TLW ctor on GTK3, 2020-04-20) because we
overwrote the explicitly set size with the client size computed earlier
by the sizer.
Don't do this by explicitly forgetting the client size we were going to
set when SetSize() is called.
Closes#19134.
Add wxWindow::WXSetInitialFittingClientSize() instead of handling wxGTK
TLWs specially in the common wxSizer code and override it in wxGTK to
remember that we need to reset the client size once the window is shown.
This commit shouldn't result in any changes in the observed behaviour.
Just extract the code generating wxEVT_SHOW for TLWs in wxGTK in its own
function before modifying it to avoid having to do it in two places.
No real changes, this is a pure refactoring.