If the info bar is already shown, newly added buttons have to be relaid
out to appear correctly, so just add a call to Layout() in this case.
This makes the generic version work as the native GTK one, which already
handled this use case correctly.
Closes https://github.com/wxWidgets/wxWidgets/pull/1441Closes#14120.
CellToGridWindow(), added by frozen rows/columns patch, returned NULL
when called with invalid row/col arguments and this could happen if any
of several methods using m_currentCellCoords were called during wxGrid
initialization, while m_currentCellCoords was still (-1, -1).
Fix this by testing for this case explicitly and returning the main grid
window, which is never NULL, instead.
Closes#18454.
13068d3603 introduced code for stripping
CJK mnemonics (i.e. trailing " (&X)") from the menu items, but due to
the use of wxStripMenuCodes() in wxControl::GetLabelText(), it also
applied to the control labels, resulting in wrongly measuring their size
(because the text used for measurement didn't include the "(&X)" part)
and truncating them in display.
Fix this by adding an explicit wxStrip_CJKMnemonics and using it only in
the code dealing with the menu item labels. This requires more changes
than just modifying GetLabelText() to use some wxStrip_NoCJKMnemonics
flag, but is more compatible as it's not impossible that some existing
code using wxStripMenuCodes() could be broken by this change too, while
now the existing behaviour is preserved.
Also improve wxStrip_XXX documentation.
Closes https://github.com/wxWidgets/wxWidgets/pull/1439
See #16736.
Closes#18452.
This probably doesn't change much in practice, as it's unlikely that
SDL_GetCurrentAudioDriver() returns a 255 character long stting, but is
still safer and avoid gcc 8 warnings about passing exactly the buffer
size to strncpy().
The generic implementation indirectly uses ClientToScreen(), which won't work
with Wayland, and causes debug warnings when used before window is realized.
Use special values of DisplaySection() and KeywordSearch() parameters to
open the table of contents (if section is -1) or search page (if the
keyword to search for is empty) when using CHM help controller.
This is less discoverable than having separate Display{TOC,Search}()
methods, but avoids introducing special API that couldn't be implemented
in the other wxHelpController implementations.
Closes#18445.
Several wxEVT_COMMAND_xxx constants were replaced with alternative (shorter) names in ce7fe42e84 and since 2.9.5 they are actually deprecated and shouldn't be mentioned in the documentation.
When we create a toolbar from within the event handler of another toolbar several times (so we have a chain of embedded toolbars) and the last toolbar is destroyed, gs_liveToolbar variable is reset in its dtor what prevents from executing the part of code in MSWCommand() for other existing toolbars if they are still in their event handlers too (still executing OnLeftClick() function). This may happen when toolbars are created in the chain of modal dialog boxes.
To prevent this interference between the toolbars from occurring we have to keep track of all of active toolbars in the chain instead of keeping track of only the last one.
Closes#18309.
Remove WXDLLIMPEXP_BASE from wxObjectEventFunctor declaration: this
class only has inline methods and so doesn't define any functions that
would need to be exported from the DLL.
This reverts commit c0f2f38011.
Linking specific applications (sockets/baseserver, base test) resulted in the
following error: undefined reference to `__imp__ZTV20wxObjectEventFunctor'
Fix this by implementing the destructor inside the base library.
Add wxRendererNative::GetExpanderSize(), implement it using the
appropriate theme element and use it instead of hardcoding the expander
size to 3 character widths.
Closes https://github.com/wxWidgets/wxWidgets/pull/1431Closes#18449.
In wxGTK using negative coordinates with HitTest() happens to work and
it's useful to test that it does, as this test will run when the control
is scrolled even under Travis CI, unlike the test with positive
coordinates which doesn't work under Xvfb there and was disabled in the
previous commit.
Also document that passing negative coordinates to this function only
works in wxGTK.
For some reason, wxTextCtrl scrolls much too far when running under
Xvfb, so the test assumption that it still has some visible characters
after calling SetInsertionPointEnd() fails and must be disabled in this
environment.
For some reason, the height of a text line is 15px there and not 18px as
locally, so 400px high image still fit on the second page in the last
test. Make it higher to ensure that it doesn't.
The Debug configuration is the default, but it is not filled in in cmake-gui.
Do this, and set Debug and Release as available options.
See https://trac.wxwidgets.org/ticket/18438
Fix warning: Command line warning D9025 : overriding '/W3' with '/W4'
Remove /W3, either via a regex or via new policy CMP0092 (CMake 3.15).
The policy has to be set before calling project(), otherwise the
CMAKE_<LANG>_FLAGS are already initialized.
See https://trac.wxwidgets.org/ticket/18438
Adobe have announced the official EOL for flash is 2020 so we're
now at the point where support for flash just isn't interesting
any more.
It doesn't make sense to support it for the upcoming 3.2.x release
series, and the sample .swf files are lacking source code.
Closes https://github.com/wxWidgets/wxWidgets/pull/1427Closes#15886.
Set the "printer" PPI explicitly for wxMemoryDC used in the test to
ensure that it's the same in all ports: currently wxGTK3 stands out
because it uses 72 DPI unlike wxMSW and wxGTK2, which use 96.
There seems to be something wrong with the vertical offset returned by
gtk_entry_get_layout_offsets() in GTK 3, so just don't use it at all, as
we don't need it anyhow.
For some reason, the control does lose focus there, even if it doesn't
happen when using a normal X11 server.
Just disable the test in this environment.
This will allow disabling some tests which fail when running only under
Xvfb.
The new function doesn't work automatically because there doesn't seem
to be any way to distinguish it from the usual server, so it just checks
whether wxUSE_XVFB=1 is set in the environment, as is done by Travis CI
build script.
Older versions of the server default to 8bpp, which breaks some of our
tests (admittedly, this shouldn't be the case, but it's probably better
to test in the same configuration as is used by 99.99% of the users
rather than adjusting or disabling tests in the remaining 0.01%).