No real changes yet, just refactor the code to always connect these
signals handlers and not just when using non-decimal base.
Add wxSpinCtrl::GTKInput() and GTKOutput() virtual methods to handle
these signals appropriately depending on the type of the control.
This will allow further customizing conversion to/from string in the
upcoming commit and will also make it possible to handle UI locale
different from the C locale in the future.
Just use this function now that it's available rather than calling
gtk_entry_get_text() (and sometimes forgetting to specify UTF-8 encoding
explicitly).
The field is used for common placement and sizing logic in
notebook-like controls that have a "controller buddy" control. Its use
isn't wxControl-specific and only relies on wxWindow API, so the
restriction to wxControl-inherited types is arbitrary.
Change the type to the more general wxWindow* pointer.
In practical terms, this allows derived classes to use e.g.
wxNativeWindow as the controller buddy.
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.