Commit Graph

65706 Commits

Author SHA1 Message Date
Vadim Zeitlin
10b35c22f5 Remove unnecessary "protected:" from wx/qt/radiobut.h
No real changes, just remove an empty protected section.
2019-02-02 15:06:11 +01:00
Artur Wieczorek
0183b47a45 Fix build with wxUSE_CLIPBOARD==0 2019-02-01 23:36:48 +01:00
Jouk
cbbb9a28d9 Add src/generic/rowheightcache.cpp to the OpenVMS makefiles for compilation 2019-02-01 13:41:25 +01:00
Jouk
fd020ad152 Synchronize setp.h_vms with setup.h.in 2019-01-31 14:46:07 +01:00
Vadim Zeitlin
c5f9bed8ff Merge branch 'tlw-activate-event'
Extend activation event unit tests and enable them for wxGTK where they
seem to pass too now.

See https://github.com/wxWidgets/wxWidgets/pull/1194
2019-01-30 17:40:03 +01:00
Vadim Zeitlin
4d16029f8b Merge branch 'notebook-add-page-events'
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
2019-01-30 17:38:51 +01:00
Vadim Zeitlin
8fbca5cb70 Remove all trailing spaces
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.
2019-01-30 17:35:54 +01:00
Matthew Griffin
ae94f4da9c Ensure that top level window is active when it's shown in wxQt
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
2019-01-30 17:27:15 +01:00
Scott Talbert
aa22547b28 Document wxHtmlCellEvent::GetMouseEvent()
Closes https://github.com/wxWidgets/wxWidgets/pull/1195
2019-01-30 03:01:38 +01:00
Vadim Zeitlin
f9323e4b87 Enable tests for wxTopLevelWindow::IsActive() for wxGTK too
After the addition of EventCounter::WaitEvent() call in the previous
commit these checks pass as well (with another WaitEvent() added to wait
for deactivation event as well).
2019-01-29 00:16:52 +01:00
Vadim Zeitlin
e599e26395 Test that showing a TLW generates wxActivateEvent
Wait until wxEVT_ACTIVATE arrives and check that it does.
2019-01-29 00:16:50 +01:00
Graham Dawes
3cb395a5a5 Implement wxNotebook::DeleteAllPages() for wxQt
See https://github.com/wxWidgets/wxWidgets/pull/1191
2019-01-28 19:07:28 +01:00
Vadim Zeitlin
ce1b72a4d2 Document wxNotebook::AddPage() events change in wxGTK
This hopefully shouldn't affect many people, but still document this
backwards-incompatible change.
2019-01-28 19:05:01 +01:00
Vadim Zeitlin
c22e81c7a1 Extend unit test for events generated by wxNotebook::AddPage()
In addition to checking that adding the first page doesn't generate any
events, check that adding another page later does generate them.
2019-01-28 19:01:17 +01:00
Vadim Zeitlin
7d36b02bcc Reuse base class helper in wxGTK wxNotebook::InsertPage()
Call DoSetSelectionAfterInsertion() instead of partially duplicating it.

This ensures that m_selection is correct after inserting a new page,
which wasn't the case before. Surprisingly, this didn't actually matter
because wxGTK implementation doesn't really use the base class
m_selection neither and just queries GTK+ widget directly for its
selection in GetSelection() instead, but it was at the very least
confusing.
2019-01-28 18:59:34 +01:00
Vadim Zeitlin
7cd6a27e16 Clarify when wxBookCtrl::AddPage() sends page changing events
Notably document that it does not do it when adding the first page.
2019-01-28 18:56:03 +01:00
Vadim Zeitlin
359b23a58b Avoid events on first page insertion in wxGTK wxNotebook
Make wxGTK consistent with wxMSW and wxOSX and also make it pass the
unit test added in the previous commit by suppressing events generated
by gtk_notebook_insert_page() when adding the first page (but not any
subsequent ones).
2019-01-28 18:51:02 +01:00
Vadim Zeitlin
da96ab179f Fix updating selection in wxNotebook::InsertPage() in wxQt
Just use DoSetSelectionAfterInsertion() provided by the base class,
which does the right thing already, including both setting m_selection
and sending (or not sending) the corresponding events.
2019-01-28 18:29:31 +01:00
Vadim Zeitlin
6fdcfd8199 Add unit test for no events when adding first wxNotebook page
Adding the first page shouldn't generate any events even if the
selection does change (from -1 to 0) internally.
2019-01-28 18:21:32 +01:00
Vadim Zeitlin
665b5a76a8 Remove unnecessary wxNotebook::DoSetSelection() from wxQt
Having this method didn't really help, it's simpler and more
straightforward to implement ChangeSelection() as a signal-blocking
wrapper around SetSelection() instead.

No real changes in behaviour, this is a pure refactoring.
2019-01-28 17:51:27 +01:00
Graham Dawes
6b11c372a1 Fix recently introduced build error in widgets sample
Make it compile again when wxHAS_BITMAPTOGGLEBUTTON is not defined,
which is notably the case in wxQt.

Closes https://github.com/wxWidgets/wxWidgets/pull/1189
2019-01-28 12:41:31 +01:00
Vadim Zeitlin
2c7489fffe Merge branch 'widgets-sample-buttons' of https://github.com/MaartenBent/wxWidgets
Several improvements to the buttons pages of the widgets sample:

- Use a valid font when creating the bitmap.
- Create the bitmap with an DPI independent size.
- Use different images for different button states, as described by the
  checkbox options.
- Add a checkbox to disable the bitmap.
- Recreate the button when changing label, so the bitmap is updated.
- Implement the 'fit exactly' option on ToggleButton page.
- Use more wxSizerFlags in widgets sample.

See https://github.com/wxWidgets/wxWidgets/pull/1188
2019-01-28 01:19:31 +01:00
Vadim Zeitlin
66727bf04b Merge branch 'wxradiobox' of https://github.com/MaartenBent/wxWidgets
Several wxRadioBox-related improvements:

- Fix its minimum width calculation to take the title into account.
- Remove unused nor useful wxRA_LEFTTORIGHT and wxRA_TOPTOBOTTOM.
- Tidy up the radiobox page of the widgets sample.

See https://github.com/wxWidgets/wxWidgets/pull/1187
2019-01-28 01:17:34 +01:00
Tomay
10eeb0b262 Improve drawing buttons in generic wxSearchCtrl
Several fixes:
* Clear the buttons background, which can be important if their (custom)
  bitmap is transparent.
* Only add margin before/after the corresponding button if it is
  actually visible.
* Select the bitmap out of wxMemoryDC before modifying it.
* Don't assume that the "Cancel" button is always square.

Closes https://github.com/wxWidgets/wxWidgets/pull/1142
2019-01-28 01:15:05 +01:00
New Pagodi
07f64c3b75 Add wxPU_CONTAINS_CONTROLS style for wxPopupWindow
This restores the default behavior of a popup window in MSW to the
behavior it had before 56c4191168. The new
flag added by this commit can be used to give the popup window the
behavior from after that commit, i.e. choose the implementation using a
WS_POPUP window rather than the default one using a WS_CHILD of the
desktop.

The old behavior kept the popup from taking focus from its parent window
but left some controls not working. The new behavior has the popup take
focus and lets all controls work.

Closes https://github.com/wxWidgets/wxWidgets/pull/1123
2019-01-28 00:48:16 +01:00
Tomay
8deb2cf0bb Add wxUSE_WINSOCK2 wxMSW option to include winsock2.h
Including <winsock.h> and <winsock2.h> is incompatible and if the
application wants to use the latter, it may be convenient to define
wxUSE_WINSOCK2 when building wxWidgets instead of having to work around
winsock.h implicit inclusion from include/wx/msw/wrapwin.h.

Closes https://github.com/wxWidgets/wxWidgets/pull/1122
2019-01-28 00:34:34 +01:00
Scott Talbert
eaee931011 Fix sending of EVT_KEY_DOWN on wxGTK for non-ASCII characters
Instead of returning early if the keycode is invalid, try setting the unicode
character first, and if neither are valid, return.

Fixes #18054
2019-01-27 09:01:05 -08:00
Maarten Bent
ee752e2439 Use more wxSizerFlags in widgets sample 2019-01-27 17:04:08 +01:00
Maarten Bent
a6fbfacc62 Improve wxButton and wxToggleButton with bitmap in widgets sample
Use a valid font when creating the bitmap.
Create the bitmap with a DPI independent size.
Use different images for different button states, as described by the checkbox
options.
Add a checkbox to disable the bitmap.
Recreate the button when changing label, so the bitmap is updated.
Implement the 'fit exactly' option on ToggleButton page.
2019-01-27 17:04:07 +01:00
Maarten Bent
0d5ed276a4 Update radio page in widgets sample
Make the reset button work by binding to OnUpdateUIReset.
Use wxSizerFlags based API.
Remove minimum size of right panel so the minimum size of wxRadioBox can be
verified.
Use wxArrayString instead of manually creating and deleting an array of
wxString pointers.
Reapply disabling and hiding the test button, and check if test button is
available.
Layout the entire page instead of only the sizer, see #18100.
2019-01-27 15:26:17 +01:00
Maarten Bent
a377f0e5f0 Get rid of wxRA_LEFTTORIGHT and wxRA_TOPTOBOTTOM styles
This was only used in wxUniv, wxRA_SPECIFY_[COLS/ROWS] can be used instead.
Do not remove them from the definitions, to not break user code.

Closes #18100.
2019-01-27 15:26:16 +01:00
Maarten Bent
4fc38bc2c7 Improve minimum width of wxRadioBox
Take the minimum width of the wxStaticBox into account, instead of only the
width of the label.
2019-01-27 15:26:14 +01:00
Graham Dawes
0265139c11 Track Qt tab widget selection when adding pages to wxNotebook
Ensure the selected state tracks the Qt selection: without this, if
no explicit selection is made after adding the pages,
wxNotebook::GetSelection() returns wxNOT_FOUND even though the first
page is selected.

Closes https://github.com/wxWidgets/wxWidgets/pull/1182
2019-01-27 04:04:42 +01:00
chris2oph
b1594725c9 Use QWidget::update() rather than repaint() in wxClientDC
Qt documentation advises to avoid calling repaint() except when an
immediate update is required, i.e. it corresponds to wxWindow::Update().
Use update() instead to avoid many Qt warnings that appeared when
resizing the caret sample window, for example.

Closes https://github.com/wxWidgets/wxWidgets/pull/1178
2019-01-27 04:00:12 +01:00
Vadim Zeitlin
b38587c0ca Merge branch 'tests-wait-event' of https://github.com/vadz/wxWidgets
Refactor code waiting for events in the test suite.

See https://github.com/wxWidgets/wxWidgets/pull/1173
2019-01-27 03:58:23 +01:00
Vadim Zeitlin
c74727c20f Merge branch 'qt_more_event_loop_improvements' of https://github.com/GeoTeric/wxWidgets
Event loop and idle events improvements for wxQt

See https://github.com/wxWidgets/wxWidgets/pull/1171
2019-01-27 03:55:38 +01:00
Vadim Zeitlin
d8348b0419 Merge branch 'master' of https://github.com/dghart/wxWidgets
Improve wxDateTime::SetToWeekDay documentation.

See https://github.com/wxWidgets/wxWidgets/pull/1185
2019-01-27 03:41:22 +01:00
dghart
8e4b492cf4 Clarify what happens if the wxDateTime::SetToWeekDay month and/or year parameters are left as the default Inv_Month/Inv_Year
This causes the month and/or year being set to their wxDateTime::Now values, even if the original values in the wxDateTime object were valid.
2019-01-26 21:12:07 +00:00
dghart
2716347f17 Correct the order of parameters in the wxDateTime::SetToWeekDay examples
e.g. "For example, SetToWeekDay(wxDateTime::Wed, 2)"
not  "For example, SetToWeekDay(2, wxDateTime::Wed)"
2019-01-26 20:55:20 +00:00
Scott Talbert
c68e5d0617 Fix some spelling/grammar errors in documentation
Mostly replace ungrammatical "allows to do" with correct "allows doing".

Closes https://github.com/wxWidgets/wxWidgets/pull/1183
2019-01-26 03:50:47 +01:00
Graham Dawes
e40323d312 Simplify shared timer reference counting in wxEventLoop for wxQT 2019-01-25 16:44:23 +00:00
ali kettab
84fc5c1714 Fix changing tooltip via wxToolTip::SetTip() in wxQt
Update the actual tool tip used by Qt and not just the internal variable
when SetTip() is called.

Also implement wxToolTip::SetWindow().

Closes https://github.com/wxWidgets/wxWidgets/pull/1175
2019-01-25 14:39:37 +01:00
ali kettab
3c369af2e6 Translate QFocusEvent to wxFocusEvent correctly
Set the ID, object and the associated window.

Closes https://github.com/wxWidgets/wxWidgets/pull/1177
2019-01-25 03:31:22 +01:00
Vadim Zeitlin
5811d541da Refactor code waiting for events in the test suite
We already had WX_ASSERT_EVENT_OCCURS_IN macro and a recent commit also
added code doing almost the same thing manually in wxTopLevelWindow unit
test, which was one version too many.

Replace both of them with the new EventCounter::WaitEvent().

No real changes, this is just a refactoring.
2019-01-24 22:52:46 +01:00
Vadim Zeitlin
f4ea128007 Include wx/stopwatch.h explicitly from wxTextCtrl unit test
Don't rely on it being implicitly included from another header when we
use wxStopWatch in this file (with wxGTK only).
2019-01-24 22:52:46 +01:00
Vadim Zeitlin
7c831d25ee Group headers together in wxTextCtrl unit test
No real changes.
2019-01-24 22:52:46 +01:00
ali kettab
515031cf6b Set event object for wxKeyEvents generated in wxQt
Not setting the event object broke the code expecting it to be set,
notably in our own validators code.

Closes https://github.com/wxWidgets/wxWidgets/pull/1176
2019-01-24 22:47:26 +01:00
Vadim Zeitlin
7a42dbd83b Merge branch 'qt_listctrl_find_text' of https://github.com/GeoTeric/wxWidgets
Fix wxListCtrl::FindItem() and add support for columns to GetItemText()
in wxQt.

See https://github.com/wxWidgets/wxWidgets/pull/1174
2019-01-24 22:42:35 +01:00
Liam Treacy
f9280c8529 Now use the column index to retrieve the correct text in GetItemText 2019-01-24 14:38:38 +00:00
Liam Treacy
ca00251454 Fix in wxListCtrl::FindItem. Every item is now iterated through, rather than only the first 2019-01-24 14:35:47 +00:00