Correct the signature of wxArrayString::Insert():
the first parameter is "const wxString&", not "wxString".
Mention wxSortedArrayString in wxArrayString documentation.
The rest are just minor edits improving language, consistency, and formatting.
Ensure that the new colours are actually shown after Refresh() is called
by refreshing the text part of the control as well, and not just the
spin button.
Closes https://github.com/wxWidgets/wxWidgets/pull/1468Closes#12382.
Instead of creating a temporary brush with the same colour as the
background brush, just use the background brush itself directly.
This allows clearing the window with non-solid brushes too, including
transparent ones -- even though the latter doesn't make much sense (as
it simply does nothing), it should still behave in the same way under
MSW as under the other platforms, while previously it cleared the window
using the solid black brush instead.
Closes#10273.
Current wxPG_FILE_DIALOG_TITLE and wxPG_DIR_DIALOG_MESSAGE attributes can be used to customize editor dialog titles only for wxFileProperty and wxDirProperty, respectively. New wxPG_DIALOG_TITLE property is applicable to all properties derived from wxEditorDialogProperty so not only editor dialog titles for wxFileProperty and wxDirProperty can be set but also for wxFontProperty, wxLongStringProperty, etc.
wxPG_FILE_DIALOG_TITLE and wxPG_DIR_DIALOG_MESSAGE attributes are marked obsolete.
Add MSWDoClientToScreen() and MSWDoScreenToClient() helpers and use them
with the correct HWND in DoClientToScreen() and DoScreenToClient()
overridden in wxSpinCtrl, i.e. the HWND of the "buddy" text control and
not the spin button, which is the main HWND of this control.
This notably fixes wxSpinCtrl::GetScreenPosition() which returned the
position of the spin button.
Closes https://github.com/wxWidgets/wxWidgets/pull/1454Closes#18455.
Dl_info requires __GNU_VISIBLE be defined; and,
pthread_setconcurrency requires __XSI_VISIBLE >= 500.
Defining _GNU_SOURCE satifies both of the above needs.
Add a new flag wxXRC_USE_ENVVARS for wxXmlResourceFlags that triggers a
call to wxExpandEnvVars() for bitmap, icon and animation paths.
This flag is not set by default to avoid silently changing the behaviour
of existing applications.
Closes https://github.com/wxWidgets/wxWidgets/pull/1445
On demand expandable items can fail to be actually expanded when the
user attempts to expand them, but the generic version of wxTreeCtrl
still sent an EXPANDED event in this case, which wasn't useful and
differed from the native MSW version.
Fix this and only send the event if the item was really expanded.
Closes https://github.com/wxWidgets/wxWidgets/pull/1450Closes#13886.
Even though these functions were declared in a header called private.h,
some code outside the library still used them, notably the popular
wxPdfDocument library.
So partially revert 72a225924d and these
functions back, and just mark them as deprecated for now.
C++20 introduces these two functions, along with some overloads, to
std::string. Add similar functions to wxString, which simply call the
already existing StartsWith() and EndsWith().
Closes https://github.com/wxWidgets/wxWidgets/pull/1452
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.