Don't let wxNotebook created in the recently added test for the events
generated when adding pages to it continue to live after the test end as
this breaks the subsequent tests using wxUIActionSimulator (but only
when using MinGW, for some reason).
There were many dozens of such warnings given for the various arrays
used in the tests and it just doesn't seem feasible nor desirable to fix
them all, so just suppress the warnings for all these arrays to get rid
of them with recent (7+?) versions of gcc.
The original drawing mechanism was generating lots of QWarning messages
when running samples (e.g. htlbox, caret, etc.) and in some cases was
not actually completely drawing every element of the sample. The issue
was that the QPicture was being shared incorrectly between wxWindow and
wxClientDC and attempts to start painting, update, etc. were generating
console warnings.
Closes https://github.com/wxWidgets/wxWidgets/pull/1152
No real changes, just a refactoring to avoid duplicating the code
handling wxTE_READONLY and the alignment styles between multi- and
single-line versions.
Also avoid testing for "style & wxTE_LEFT" as this will never be true
anyhow.
See https://github.com/wxWidgets/wxWidgets/pull/1211
wxSlider and widgets samples improvements:
- Document `wxSL_BOTH` style of `wxSlider`.
- Centre labels above and below vertical `wxSlider`. Improve label
position for specific combinations of `wxSlider` styles.
- Improve `wxSlider` in high DPI. Make thumb and tick size DPI
dependent.
- Better fix layout of `wxSlider` labels after changing value range.
Commit 0b821ad did not (always) trigger a call to `DoMoveWindow`. See
[#17093](https://trac.wxwidgets.org/ticket/17093).
- Fix `wxSlider::SetThumbLength()` on `wxMSW`. It requires
`TBS_FIXEDLENGTH` style. Use `GetThumbLength()` instead of the
arbitrary defined `THUMB` size.
- Improve guards in button pages of widgets sample.
- Use `wxSizerFlags` for slider page in widgets sample.
- Some fixes for `wxSlider` in widgets sample
- Correctly save the slider value before recreating the slider.
- Layout the entire page instead of only the slider sizer.
- Update the text controls after recreating the slider.
- Always enable 'both sides' checkbox. It has additional effects in
`wxMSW`.
- Demonstrate `wxSlider::SetSelection()` in widgets sample.
See https://github.com/wxWidgets/wxWidgets/pull/1208
To get access to the control used for editing items, we need to create
it ourselves, which involves defining our own factory for doing this,
but seems to be the only way of achieving our goal.
Closes https://github.com/wxWidgets/wxWidgets/pull/1204
Hide the window explicitly once it's created. This is not very useful,
as the real purpose of calling Hide() before Create() is to prevent the
window from being initially shown at all to avoid flicker, but better
than not hiding it at all.
Closes https://github.com/wxWidgets/wxWidgets/pull/1203
Correctly save the slider value before recreating the slider.
Layout the entire page instead of only the slider sizer.
Update the text controls after recreating the slider.
Always enable 'both sides' checkbox. It has additional effects in wxMSW.
Add guards for wxCommandLinkButton.
Move CheckBoxes outside wxHAS_BITMAPTOGGLEBUTTON guard.
Remove wxHAS_ANY_BUTTON check, this is always defined with wxUSE_TOGGLEBTN.
It requires TBS_FIXEDLENGTH style.
Call InvalidateBestSize because the size of the control might change.
Call Layout in the widgets sample to adjust to the changed size.
Use GetThumbLength() instead of the arbitrary defined THUMB size.
Similarly to the previous commit, it doesn't seem to be worth it to
avoid including these simple and common headers from there and it
simplifies code and will allow making the converter functions inline.
Follow standard practice and include the header corresponding to the
source file from it explicitly.
Also include wx/gdicmn.h from the header itself, this is a pretty common
header and there is no real advantage in avoiding it there and including
it allows to avoid a bunch of forward declarations.
QPoint(0,0) is a valid position and there just doesn't seem to be any
good reason to make it invalid by mapping it to wxDefaultPosition.
Closes https://github.com/wxWidgets/wxWidgets/pull/1202
Harmonize events sent by wxNotebook::AddPage(): they are now sent only
when adding any page except the first one if it is selected in all
ports.
See https://github.com/wxWidgets/wxWidgets/pull/1192
No real changes, just clean up sources by removing trailing spaces from
all the non-generated files.
This should hopefully avoid future commits mixing significant changes
with insignificant whitespace ones.
Under some (not totally clear) circumstances, a TLW can remain inactive
after being shown, which is undesirable, as it prevents setting focus to
its children from working.
Work around this by calling activateWindow() explicitly if necessary.
Closes https://github.com/wxWidgets/wxWidgets/pull/1179
This uses the cursor variant (as opposed to the icon one) since these actually are cursors, the base class looks like cursors are meant to be used, and the icon thing looks like a hack.