This colour is more appropriate when using wxGTK and is the same as the
previously used wxSYS_COLOUR_CAPTIONTEXT in wxOSX and should be also a
good choice for wxMSW.
Closes https://github.com/wxWidgets/wxWidgets/pull/1966
Platform native behaviour is not to show a filter, but to allow all
supported types to be selectable. Make sure GetFilterIndex still is a
valid choice (and not -1 as before).
Closes https://github.com/wxWidgets/wxWidgets/pull/1976
The refactoring in the commit 51ea713826 (Extend and rename
wxSocketImpl::UnblockAndRegisterWithEventLoop(), 2019-11-20)
accidentally inverted the test for wxSOCKET_BLOCK, restore the correct
logic to make non-blocking sockets work again.
Closes#18834.
Make Get[MultiLine]TextExtent() behave consistently for empty strings on
all platforms, in particular return (0, 0) size for them from
GetTextExtent() in wxGTK, which is an incompatible change but is needed
to make it behave in the same way as the others.
See https://github.com/wxWidgets/wxWidgets/pull/1970
wx public headers are not supposed to include platform-specific headers
defining many macros that can conflict with the identifiers defined in
the application code. In this particular case, including CoreServices.h
ultimately #included AssertMacros.h, which by default on older SDKs
(<10.12) introduces various macros whose names very easily conflict with
user code.
For example, if you #included <wx/fswatcher.h> in your own code, and
your code happened to contain a symbol called 'check', or 'verify',
compilation failed.
Fix this by using pImpl idiom to move the variable requiring a type
defined in the SDK header into the source file.
Closes https://github.com/wxWidgets/wxWidgets/pull/1666
The compiler is smart enough to determine that the variables are always
initialized when they're actually used when using optimizations, but
gives a bunch of C4701 warnings for them if we don't initialize them in
the non-optimized debug builds.
It helps demonstrating how the layout works and is consistent with the
other windows in the sample (which are frames and so are resizeable by
default).
Closes#18830.
No real changes, just rename the over generic MySizerDialog to a more
specific MyNotebookWithSizerDialog, as the goal of this dialog seems to
be to demonstrate using wxNotebook and sizers together.
This restores the previous behaviour inadvertently changed by bfeae1922d
(Minor optimizations in GetMultiLineTextExtent(), 2020-06-10) and makes
it official by documenting it and adding tests checking for it.
It wasn't completely obviously if this was intentional or accidental
before, but at least wxStaticText itself relied on the old behaviour,
and chances are that so did some code outside the library, so make this
part of the API now.
See #18825.
This seems more logical and is compatible with wxDC in wxMSW and wxGTK2,
as well as other kinds of DC, e.g. wxPostScriptDC.
It also looks like the current behaviour was unintentional as it
happened only because wxGCDCImpl::DoGetTextExtent() always passed all
non-null parameters to wxGraphicsContext::GetTextExtent(), even if it
didn't need the values for all of them, and thus bypassed the special
case for the empty string which was already present in the latter
function.
Fix this, making DoGetTextExtent() more efficient as a side effect (we
now avoid unnecessary calls to pango_layout_iter_get_baseline() in the
most common case), and also add another test for empty string to
wxGraphicsContext itself, for non-GTK case.
Also document this behaviour and add a test checking for it.
Using "x" as separator between the components created confusion with
hexadecimal notation, resulting in confusing messages like "0x17==0x0"
that seemed to describe comparison of 2 numbers and not 2 wxSize
objects.
Using "*" is also more consistent with wxRect output format.
There is no need to pass by GetTextExtent() now that we already make
sure width/height are non-null in this function, so just construct the
MeasuringGuard slightly earlier and call CallGetTextExtent() directly.
No real changes.
Don't output "ok" for all files when running update-setup-h, this was
not very informative and possibly misleading. Only show "ok" for the
actually updated files and "unchanged" otherwise.
This ensures that fn_str() returns the string in the expected,
decomposed, format.
Also simplify the code by removing workarounds for old systems which are
not supported any more and make explicit the fact that under macOS
ToWChar() always produced NFC.
There was a possible recursion from wxStockGDI::GetFont to
wxSystemSettings::GetFont and back, resolve by using direct font
creation, adding fixed system font.
Remove the delegate objects that are not used any longer.
Move wxGetAvailableDrives() to Objective-C code file dirdlg.mm to allow
for Cocoa implementation.