Add 'BEFORE' to target_include_directories so we include the headers
of the buildin third-party libraries before headers of third-party
libraries included in wxTOOLKIT_INCLUDE_DIRS.
Just remove the code manipulating the style from wxSearchCtrl::Create(),
there doesn't seem to be any need to force anything for "more native
appearance" as the control appears just fine by default under both wxMSW
and wxGTK without doing anything here (and is not used under macOS).
As a (desired) side effect, specifying wxBORDER_NONE now works as it's
not overridden by the control itself any more.
Closes#18105.
Use GetAttrs().m_defaultFlags everywhere when creating the widgets, it
was done for some but not all of them before, without any apparent
reason.
This should make setting various border styles work (for the widgets
supporting them).
Make it possible to call wxStandardPaths::MakeConfigFileName() without
explicitly specifying the convention to use, to make it conform to the
documentation (previously this only worked when calling the
wxStandardPathsBase version of the method).
Closes#18106.
Find and Replace would typically require user input to receive the
search string from the user, therefore their labels should end with an
elipsis. Also, these functions operate on documents, not selections.
Finally, Ctrl-H is the commonly used shortcut for Replace, rather than
Help (which is usually F1)
This bug was introduced way back in Aug 2011 by
73d1308b85
This fixes the code to match the exsiting documentation in
docs/doxygen/mainpages/const_stockitems.h
Define g_signal_handlers_disconnect_by_data() if it's not available,
i.e. when using glib older than 2.32 where it was added, to fix the
build under old systems such as CentOS 6 broken by the changes of
8278f7b618 (see #18084).
Also use it elsewhere instead of g_signal_handlers_disconnect_matched()
as it's more readable.
Closes https://github.com/wxWidgets/wxWidgets/pull/760
Give the example of saving the frame geometry, which is undoubtedly the
most common use case of these classes, and simplify the existing
example with wxNotebook.
Don't assume that all Vista and later systems support DTM_GETIDEALSIZE,
this is not the case under Wine even when it's emulating a Vista+
Windows version and trusting DTM_GETIDEALSIZE to always return the right
value resulted in these controls having 0 size and not being shown at
all when running wxWidgets programs under Wine.
See https://bugs.winehq.org/show_bug.cgi?id=44680
It seems to make more sense to round the result to int rather than to
truncate it when scaling wxSize or wxPoint coordinates by a floating
point number.
wxRealPoint uses double coordinates and it makes no sense to truncate
the result of scaling it to int -- this was almost certainly a
copy-and-paste error due to copying the code of the corresponding
wxPoint method.
There doesn't seem to be any reason to use float here when double is
used everywhere else.
Moreover, the (implicit) conversion of int to float is not always
lossless, and resulted in -Wconversion warnings from g++ 7, which
disappear when using doubles.
This completes changes of 0873abb836 which
replaced manual layout code with sizers, but broke layout after
recreating the control in the process.
This change notably fixes the control becoming invisible, due to having
the default too small size, in non-report modes.
Clearing this style by calling SetWindowStyleFlag() could reset
WS_EX_CONTROLPARENT extended flags bit, breaking the invariant that the
parent of any window with this bit set has it as well and resulting in
hangs due to infinite loops inside Windows own code iterating over the
controls.
Prevent this from happening by always preserving this style bit if it
was previously set in MSWUpdateStyle(). This is a bit ugly, but there
doesn't seem to be any obviously better way to do it.
Closes#18091.
This is similar to a recent commit adding the missing typedefs to wxList
iterators and defines the types required by the iterator concept in
wxVector::reverse_iterator and const_reverse_iterator classes (simple
iterators are just pointers and are already covered by the standard
iterator_traits specialization).
This typedef is redundant with the "reference" one and doesn't seem to
be used anywhere.
As with the previous commit, this one could be reverted later if it
turns out it does break any existing code, but this seems unlikely.
This typedef is completely redundant with pointer_type which had been
also available in these classes since the very beginning and seems to
have been meant to be private originally, so it should be safe to just
remove it, especially because I couldn't find any existing code using
it.
If we do find such code in the wild later, this commit could be reverted
as it's not really indispensable.
Define "pointer", "reference", "difference_type" and "iterator_category"
typedefs to ensure that wxList iterator classes are seen as iterators by
the standard library in C++11 and later, as otherwise standard container
template ctors taking iterators couldn't be used with them because
they're only available if input iterator requirements are satisfied.
This notably fixes creation of std::list from wxList iterators; add a
test which didn't compile before to show it.