The test for AUX2 mouse button was wrong and checked whether the button
was pressed, instead of checking whether the event was generated by it.
Check the event source correctly by comparing wParam with XBUTTON2 and
not MK_XBUTTON2.
Closes https://github.com/wxWidgets/wxWidgets/pull/753
Don't rely on wx/treebook.h pulling in wx/treectrl.h and wx/textctrl.h,
forward declare or include the headers declaring the classes from these
headers explicitly where needed.
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.