Mouse motion events happening over GtkEntry icons are consumed by this
class "event" callback, which simply returns GDK_EVENT_STOP for them if
the icon is insensitive (which is the case for GtkSearchEntry) and so
our "enter-notify-event" callback is never called.
Fix this by handling "event" signal ourselves and generating
wxEVT_ENTER_WINDOW from it if necessary.
Doing this required adding a global pointer to the window currently
under mouse, which is also used for generating wxEVT_LEAVE_WINDOW if
necessary.
See #24245.
This provides parity with the ribbon bar's GetPage() set of functions,
and adds an easy way to find a panel and show/hide it.
Also, add example and discussion about showing/hiding panels on a
ribbon.
Closes#24319.
Restore correct translation language lookup taking into account message
IDs language correctly when it is present in the preferred UI languages
but is not the first language in them and other similar corner cases.
Also add unit tests verifying that this code logic, already changed many
times in the past, does behave correctly now.
See #24297.
Knowing msgIdLanguage is necessary for correct evaluation of preferred
languages order; without it, it would be possible to load undesirable
translation file.
See 2af36e9560 for details.
This commit partially reverts 94b1a17aeb.
The above commit changed translation lookup logic to differentiate
between msgid and "available" translations (the latter being loaded from
a file or resource). It first attempted to use available translations
and only felt back to msgid language as the last resort.
Unfortunately, doing that broke lookup in cases when the user had msgid
language as not-last preference in their UI languages list, or even when
a similar translation was available. For example:
- msgid=en, user preference [cs,en,fr], only fr.po available: fr would
be used instead of en
- msgid=en_US or en, user preference [en], but en_GB.po available:
British English would be used even for US users
This commit fixes this by restoring the previous behavior where msgid
language was treated as a first-class citizen in lookup, while
preserving the API that allows distinguishing between the two cases.
It also reimplements AddStdCatalog() in a more straightforward way that
doesn't rely on AddAvailableCatalog().
- Support wxGLContext::SetCurrent.
- Pass GL canvas attributes via ParseAttribList to handle defaults.
- Remove OpenGL not implemented message.
- Prevent QGLWidget from changing OpenGL state before we paint.
- Set Qt::StrongFocus for wxQtGLWidget to allow keyboard input.
- Use QtCanPaintWithoutActivePainter to fix wxPaintDCImpl assert when using wxGLCanvas.
The main advantage of using wxOverlay over wxFrame, besides reduced
code complexity, is that the docking hint now works correctly under
Wayland which it didn't work before.
wxAUI_MGR_RECTANGLE_HINT now works everywhere (including wxGTK and wxOSX)
We simply use a bitmap to draw the venetian blinds hint instead of the
exotic and esoteric code using wxRegion.
wxGTK2 now uses graphics context for transparency. If not available, the hint
will be drawn using wxINVERT raster operation mode.
This Workaround is needed because the DC used to draw on the wxOverlay clips
children by default under wxGTK2. This means that the sash will always appear
behind the sub-windows. making wxOverlay worthless under this platforms.
Notice that calling gdk_gc_set_subwindow() unconditionally in Destroy() is cheap
when DontClipSubWindows() has never been called.
Make non-live resizing possible on all supported platforms thanks to wxOverlay.
Previously, live resizing was the only supported mode under these platforms:
wxMac, wxQt and wxGTK3 under Wayland.
Also remove no longer needed function AlwaysUsesLiveUpdate and its documentation.
Make non-live resizing possible on all supported platforms thanks to wxOverlay.
Previously, live resizing was the only supported mode under these platforms:
wxMac, wxQt and wxGTK3 under Wayland.
By default, wxMSW overlay uses a constant alpha for the window's opacity which
can be changed by the added wxOverlay::SetOpacity() function. For some applications,
that's all they need. But for others, per-pixel alpha blending is a requirement.
This capability can be enabled by calling SetOpacity(-1) before initializing the
overlay. But the drawing must be done via a graphics context because the standard DC
under MSW does not support alpha drawing.
Also request that the overlay window be positioned below any floating windows
on the target (if any).
The only real change in this commit is the use of wxRound() instead of
truncating cast to int when rescaling icons.
The rest consists of just some cleanup:
- Initialize (mostly) pointer member variables in their declaration.
- Remove wxT() from strings.
- Replace checks for __WXMAC__ with checks for __WXOSX__.
- Replace macros with lambda functions.
- Add "explicit"
- Replace wxString::IsEmpty() with empty().
- Use wxNOT_FOUND instead of -1.
- Use static_cast<> instead of C-style casts.
Closes#24261.
Check that ms_pfnSetThreadDpiAwarenessContext function pointer was
initialized before using it.
This fixes a regression introduced in 9befda5c26 (Only use
AutoSystemDpiAware when displays have different DPI, 2023-12-10).
See #24121, #24196.
Closes#24288.
This allows to get the name of the node which is needed for XRC handlers
using specific elements instead of using the object elements with
specific name attribute.
Allow specifying recurse="1" to inherit the attribute, as this is much
nicer than having to specify it for all the children.
Also add support for this to wxPropertyGridPopulator, which is used by
the XRC handler.
We don't need to take wxString here, when we only ever call this
function ourselves with ASCII strings only.
This should result in slightly shorter generated code too, as the
conversion from C string to wxString now happens only in a single place
inside MaybeStore() instead of being done in all places calling
wxLogSysError() or wxLogStatus().
Just rename wxPropertyGridState to wxPropertyGridPageState and add make
wxPropertyGridXmlHandler a friend of this class to allow it to use its
protected methods.
Also remove some preprocessor checks for non-existent symbols.
Enable wxGenericValidator(int*) to work with wxRadioButton groups
when applied to the first element of the group. The value will be
the index of the selected button within the group.
Closes#24264.
Stop consuming all wxEVT_KEY_UP events in wxGrid as this broke the
standard keyboard handling: pressing and releasing "Alt" didn't give
focus to the menu bar when wxGrid had it.
This also seems completely unnecessary.
Closes#24246.
See #24247.
Restrict the input to not allow values that are greater than the
positive maximum or less than the negative minimum.
In many cases it is not necessary to allow invalid characters to be
entered. For example, if the specified range is 0 to 100.
See #24220.
This function was replaced with a more useful function taking
wxOrientation and returning wxSize in bbba3b7cb9 (Make
wxAuiToolBar::RealizeHelper() return value actually useful, 2023-12-25)
but there is some existing code using the old RealizeHelper() from its
overridden Realize(), so restore it for compatibility, even if it's
quite useless now.
See #24023, #24164, #24244.