Commit Graph

66132 Commits

Author SHA1 Message Date
Vadim Zeitlin
02adddfa1a Merge branch 'wxlistctrl-virtual-checkboxes' of https://github.com/MaartenBent/wxWidgets
Add support for checkboxes to virtual wxListCtrl too.

See https://github.com/wxWidgets/wxWidgets/pull/1315
2019-05-10 01:39:33 +02:00
NikitaFeodonit
910aaa3961 Fix include directories for built-in libraries in CMake build
This fixes ''wx/setup.h' file not found' error in CMake macOS build.

Closes https://github.com/wxWidgets/wxWidgets/pull/1314
2019-05-10 01:37:26 +02:00
Vadim Zeitlin
04689e9727 Merge branch 'utf8-text-stream'
Really fix reading from UTF-8 text streams.

Closes #14720.

See https://github.com/wxWidgets/wxWidgets/pull/1304
2019-05-10 01:35:55 +02:00
Vadim Zeitlin
998097b3a4 Merge branch 'col-dialog-current'
Add events for current colour change in wxColourDialog and
wxColourPickerCtrl.

See https://github.com/wxWidgets/wxWidgets/pull/1301
2019-05-10 01:31:18 +02:00
Maarten Bent
dd23722432 Demonstrate checkboxes in virtual wxListCtrl 2019-05-05 14:26:39 +02:00
Maarten Bent
c20060745f Support checkboxes in virtual wxListCtrl 2019-05-05 14:25:06 +02:00
Maarten Bent
353b0aabba Add virtual function to provide virtual wxListCtrl checkbox state 2019-05-05 14:24:30 +02:00
Maarten Bent
ceaf2aa803 Move virtual stub functions to wxListCtrlBase 2019-05-05 14:23:44 +02:00
Vadim Zeitlin
1a48c2d914 Fix harmless "unused parameter" warning in wxMSW wxFileDialog
See https://github.com/wxWidgets/wxWidgets/pull/1310
2019-05-04 16:25:18 +02:00
Maarten Bent
d262aa02d1 Remove obsolete wxOSX/Carbon listctrl header 2019-05-04 15:03:20 +02:00
Vadim Zeitlin
542aafff39 Ensure that we accept WXK_XXX in RegisterHotKey() in wxMSW
RegisterHotKey() wrongly expected to be given VK_XXX MSW virtual key
code constant, which couldn't work in portable code, so fix it to accept
WXK_XXX constants, while preserving compatibility by still accepting
VK_XXX values not clashing with them.
2019-05-02 20:53:18 +02:00
Vadim Zeitlin
12385d3586 Show the current file dialog filter index in the sample
Update the dialogs sample to show GetCurrentlySelectedFilterIndex() in
action.

See https://github.com/wxWidgets/wxWidgets/pull/1310
2019-05-02 20:07:45 +02:00
QuentinC
413abb066e Allow retrieving current filter from wxFileDialog extra controls
Add wxFileDialog::GetCurrentlySelectedFilterIndex() similar to the
existing GetCurrentlySelectedFilename(), which can be used to retrieve
the index of the currently selected filter and update the state of the
extra controls in wxFileDialog accordingly.

Implement this for wxMSW only by updating the internally stored value
from the native CDN_TYPECHANGE notification and also generating a
wxEVT_UPDATE_UI event to allow the extra controls to update themselves.

Closes https://github.com/wxWidgets/wxWidgets/pull/1310
2019-05-02 19:53:05 +02:00
PB
1916442956 Remove unused wxUSE_COMCTL32_SAFELY from documentation
This preprocessor symbol seems to be no longer used anywhere in the code.
2019-04-30 20:34:20 +02:00
Artur Wieczorek
92d2be5842 Resolve ambiguity in calling overloaded wxPropertyGrid::SendEvent()
The right overloaded SendEvent() function can be determined by explicitly
casting second argument of the call to (wxPGProperty*) type.
2019-04-28 18:34:36 +02:00
Artur Wieczorek
96e24e73d6 Use conditional operator instead of conditional statement
This notation is more intuitive in this context.
2019-04-28 17:14:25 +02:00
Artur Wieczorek
bdc9d8f772 Remove redundant assignments
These assignments to the temporary variables are not necessary.
2019-04-28 17:11:56 +02:00
Artur Wieczorek
9df9e32a70 Get rid of unnecessary casts to wxPGProperty*
These casts are unnecessary and can be removed.
2019-04-28 17:04:07 +02:00
Artur Wieczorek
d06d403136 Replace 'while' loop with 'for' loop for simple iterations
Using 'for' loop to do a simple iteration is more intuitive and makes the code simpler.
2019-04-28 16:48:32 +02:00
Artur Wieczorek
50b1cfd0b5 Use dedicated function to change wxPGProperty flags
Using wxPGProperty::ChangeFlag() function makes the code simpler and more readable.
2019-04-28 16:38:48 +02:00
Artur Wieczorek
bd313b64ab Fix copying wxPGAttributeStorage
We need implement copy ctor and assignment operator because we are going to do a shallow copy of wxPGHashMapS2P data member and therefore we have to manually update reference counters of the objects being referenced in this map.
2019-04-28 16:35:11 +02:00
Artur Wieczorek
57aeaa3823 Add some tests of wxPGAttributeStorage
Check obtaining list of wxPGProperty attributes as wxPGAttributeStorage and making a copy of this list.
2019-04-28 16:32:20 +02:00
Artur Wieczorek
3f1d4a7104 Add test of setting/getting wxPGProperty attributes through wxPropertyGridManager 2019-04-28 16:32:19 +02:00
Artur Wieczorek
fc04f31a2b Remove unused variable
wxPGComboBox::m_sizeEventCalled was never used.
2019-04-28 15:31:51 +02:00
Artur Wieczorek
f39e70be15 Use dedicated event type to notify header about column width changes
Notification about changes of column widths needs to be sent locally from wxPropertyGrid to  wxPropertyGridManager (to update the header) so it would be good to use a dedicated non-public event type for these purposes.
2019-04-28 15:31:10 +02:00
Artur Wieczorek
fa35fdc600 Preserve header and label editing mode while recreating the grid
For some operations when grid needs to be recreated currently selected options to show the header and to enable label editing are being ignored and it can be seen a discrepancy between the options selected (and shown) in the menu and the mode of just created wxPropertyGrid. To avoid this inconsistency respective flags can be stored and used to enable/disable features in just created grid.
2019-04-27 22:10:47 +02:00
Stefan Csomor
35ec8c519f only execute app-startup behaviour if we are not a plug-in 2019-04-27 19:07:57 +02:00
Vadim Zeitlin
9484d453a9 Merge branch 'fswatcher-test-modernize'
Modernize and clean up wxFileSystemWatcher unit test.

See https://github.com/wxWidgets/wxWidgets/pull/1307
2019-04-26 23:35:23 +02:00
Vadim Zeitlin
0b9041dd29 Remove macOS workaround unnecessary any longer
The workaround introduced by f0e098fa06
doesn't seem to be needed any more, the test passes just fine without
it, so remove it.

See #16969.
2019-04-26 13:36:00 +02:00
Vadim Zeitlin
1b7b79e1c2 Remove wxLog::AddTraceMask() call
This shouldn't be done unconditionally, trace mask can always be enabled
using WXTRACE environment variable from outside the test.

Also remove a useless tracing message.
2019-04-26 13:19:05 +02:00
Vadim Zeitlin
77645a1aad Replace legacy CppUnit macros with CATCH ones
No real changes.
2019-04-26 13:19:05 +02:00
Vadim Zeitlin
ba8a594bb3 Remove unnecessary wxLogDebug() from the test cases
Tests can be traced using CATCH command line options already, so these
log statements were useless.
2019-04-26 13:19:05 +02:00
Vadim Zeitlin
12e2f9c0cc Get rid of CppUnit::TestCase subclass
Use a test fixture instead.

This gets rid of some boilerplate and allows to avoid repeating
preprocessor checks.
2019-04-26 13:19:05 +02:00
Vadim Zeitlin
bf3f84c867 Compilation fix for TempHWNDSetter in wxQt
Fix wxQt build after 2aef6570bb:
TempHWNDSetter can only be defined when using wxMSW.
2019-04-26 13:11:43 +02:00
Vadim Zeitlin
91b3bfedf8 Fix using std::reverse() with wxString iterators in a proper way
The solution with specializing std::iter_swap() for wxString::iterator
was not conforming as the iterator was still not swappable, as it is
required to be.

Fix this by providing std::swap() overload for wxString::iterator, which
is correct and even simpler.

This allows std::reverse(s.begin(), s.end()) work with clang too and
incidentally avoids warnings about the code relying on non-conforming
extensions with MSVS 2017 which were due to the fact that iter_swap()
workaround wasn't enabled for it, while the new swap() overload is.
2019-04-26 03:20:38 +02:00
Vadim Zeitlin
9adcae898f Make wxFileSystemWatcherEvent handler non-virtual and private
There is no reason for it to be neither virtual nor public.
2019-04-26 02:52:57 +02:00
Vadim Zeitlin
194fa8b4ca Remove unneeded KeepWaiting() and AfterWait() functions
These functions were never used anywhere and their meaning was not
clear, so just drop them.

Also remove the now unused "tested" member and "WAIT_DURATION" constant.
2019-04-26 02:52:57 +02:00
Vadim Zeitlin
4783262238 Simplify the code by using CallAfter()
Use CallAfter() to perform idle-time initialization, this is shorter and
simpler than dealing with the idle events explicitly.

Unfortunately the remaining use of idle events can't be avoided, explain
the reasons for this in a comment.
2019-04-26 02:51:47 +02:00
Vadim Zeitlin
9c956ea962 Remove strange counter-based idle handling code
Just bind the idle events we want to execute dynamically instead.

This is already more clear and robust than the old version, but will be
simplified event further in the next commit.
2019-04-26 02:35:14 +02:00
Vadim Zeitlin
a1b39ce78b Merge branch 'wxsvgfiledc-improvements' of https://github.com/MaartenBent/wxWidgets
Fix wxSVGBitmapFileHandler directory for saving files and other
miscellaneous improvements to wxSVGFileDC code and documentation.

See https://github.com/wxWidgets/wxWidgets/pull/1290
2019-04-25 18:54:23 +02:00
Vadim Zeitlin
ee771c51aa Fix TAB handling for controls with wxTE_PROCESS_ENTER in wxMSW
When this style is specified, TAB has to be handled manually as well and
we do it by calling our Navigate() method explicitly. But for it to work
correctly we need to pretend that it's called in response to a real TAB
press by specifying FromTab flag and the code forgot to do this -- just
add the missing flag to fix it now.

In particular, this ensures that the special code handling radio buttons
in wxControlContainer::HandleOnNavigationKey() is really executed and
fixes a bug with pressing TAB on a wxTextCtrl with wxTE_PROCESS_ENTER
before a radio button group would select the first radio button of this
group instead of jumping to the currently selected button.

Closes #18392.
2019-04-25 18:32:50 +02:00
Vadim Zeitlin
dce65bed1c Fix width returned by wxSpinCtrl::GetSizeFromTextSize() in wxMSW
Since the changes of 05b980aba1, this
function returned a value which was too small because the code in it
never accounted for the text control margins, but this was hidden by a
weird hack adding extra "3*y/10 + 10" pixels to the horizontal extent
which was removed by the commit above.

Really fix it now by reusing wxTextCtrl::GetSizeFromTextSize() which
correctly accounts for the margins and everything else.

See #12297.

Closes #18391.
2019-04-25 17:13:36 +02:00
Vadim Zeitlin
2aef6570bb Add TempHWNDSetter RAII helper to wxMSW and use it
No real changes, just replace pairs of SetHWND(hwnd)/SetHWND(0) calls
with the use of TempHWNDSetter.
2019-04-25 17:12:41 +02:00
Vadim Zeitlin
db0d288f60 Use Bind() instead of Connect()
Just another modernization, no real changes.
2019-04-25 02:49:23 +02:00
Vadim Zeitlin
cfb194e55f Use wxVector<> instead of macro-based wxArray
Also remove the never used m_lastEvent member variable.

No real changes.
2019-04-25 02:50:08 +02:00
Vadim Zeitlin
cd8bbcb8df Remove unused variable
FileSystemWatcherTestCase::m_loop was never used, so just remove it.
2019-04-25 02:50:03 +02:00
Vadim Zeitlin
a83ffbe320 Reduce use of raw pointers
Use objects instead of pointers whenever possible and wxScopedPtr
instead of raw pointers when we really need to allocate objects on the
heap.
2019-04-25 02:49:54 +02:00
Vadim Zeitlin
789ba56c77 Rename class used as the test skeleton
Use a better name than the absolutely meaningless EventHandler.

Also add a brief comment describing this class.

No real changes.
2019-04-25 02:49:24 +02:00
Maarten Bent
e32721247a Use wxFileName in wxSVGBitmapFileHandler constructor 2019-04-23 21:20:02 +02:00
Artur Wieczorek
87318ec4ee Update documentation bout querying for property attributes
Describe what is returned when corresponding functions are queried for values of built-in attributes and wxPG_EX_WRITEONLY_BUILTIN_ATTRIBUTES style is set.
2019-04-22 20:28:53 +02:00