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.
Draw the background rectangle per line, instead of one big rectangle.
When there are multiple lines and one line is shorter, the area behind that
line should not get a background colour.
The text in a wxDC is adjusted to the screen DPI, but text in a SVG file is DPI
independent. Scale the text attribute so it has the same size as in the wxDC.
Scaling will modify the position of the attribute, correct this with translate.
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.
* Bad parsing of "Num " keys
* No parsing of NUMPAD_F keys
* Missing multiply key
* No case preservation on non-modifier accelerators
* No parsing of F13-24 keys
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.