Commit Graph

18154 Commits

Author SHA1 Message Date
PB
357108d3cd Remove the last remnants of Windows CE related code
Remove the last few bits of code supporting Windows CE.
2019-05-18 08:40:03 +02:00
Artur Wieczorek
04cebe381a Remove unneeded privileged access as friends 2019-05-12 20:24:59 +02:00
Artur Wieczorek
d4df8119ee Remove from documentation references to nonexistent classes 2019-05-12 20:24:58 +02:00
Artur Wieczorek
baaba42776 Refactor: display file selector dialog from within member function in wxFileProperty
By moving the code to display file selector dialog from wxPGFileDialogAdapter to wxFileProperty we can encapsulate the operation of showing the dialog because all required parameters are stored in the corresponding data members and there is no need to use call generic GetAttribute() function to retrieve them. This also helps in making wxFileProperty attributes built-ones in the future.
2019-05-12 20:24:55 +02:00
Artur Wieczorek
b2ea56b4e9 Make wxPG_FILE_DIALOG_STYLE a built-in attribute
This attribute is used only internally in wxFileProperty so it can be considered as a built-in attribute which value can be stored in the local data member and not in the property's attribute store.
2019-05-12 20:24:53 +02:00
oneeyeman1
28a84486bd Implement wxClipboard::Flush() in wxGTK
Update the documentation and also add a call of Flush() to the sample.

Closes #10515.

Closes https://github.com/wxWidgets/wxWidgets/pull/1316
2019-05-10 01:46:54 +02:00
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
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
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
Maarten Bent
d262aa02d1 Remove obsolete wxOSX/Carbon listctrl header 2019-05-04 15:03:20 +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
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
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
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
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
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
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
Maarten Bent
e32721247a Use wxFileName in wxSVGBitmapFileHandler constructor 2019-04-23 21:20:02 +02:00
Artur Wieczorek
cd1dafb619 Make wxPG_ATTR_MULTICHOICE_USERSTRINGMODE a built-in attribute
This attribute is used only internally in wxArrayStringProperty and thus can be considered as a built-in attribute which value can be stored in the local data member and not in the property's attribute store.
2019-04-22 20:16:15 +02:00
Vadim Zeitlin
84dc4707d7 Fix horizontal scrollbar handling for wxCheckListBox in wxMSW
The scrollbar wasn't shown when the control became only slightly more
narrow than its contents, resulting in truncation of the rightmost part
of the strings shown in it.

Fix this by accounting for the check box explicitly in wxListBox
SetHorizontalExtent() method using the new MSWGetFullItemSize() helper
which is also used to avoid code duplication between wxCheckListBox
MSWOnMeasure() and DoGetBestClientSize() methods.

Closes #18377.
2019-04-22 14:57:55 +02:00
Vadim Zeitlin
5488a1438f Globally replace vadim@wxwindows.org with vadim@wxwidgets.org
The old email address is invalid since many years and shouldn't be used
any longer.

No real changes.
2019-04-22 14:12:05 +02:00
Vadim Zeitlin
5d770e5cbe Use "m_" prefix for wxExecuteData members
No real changes, just rename the members to use the standard prefix
which is more consistent with the rest of wxWidgets and also allows to
avoid both the hacks with "foo_" names for the arguments of some
functions that were used to avoid the conflicts with member "foo" and
at least one remaining shadowing warning for "exitcode".
2019-04-22 14:09:28 +02:00
Stefan Csomor
5020a810db Fix macOS memory leaks, also avoid false positive warnings from clang analyzer
__clang_analyzer__ is a constant that only is defined during analyze build, this helps avoiding false positives as long as there is no specific way to silence analyzer messages
2019-04-21 23:52:37 +02:00
Artur Wieczorek
b35170dc61 Make wxPG_BOOL_USE_CHECKBOX and wxPG_BOOL_USE_DOUBLE_CLICK_CYCLING built-in attributes
Both attributes are used only in wxBoolProperty and wxFlagsProperty to set respective internal flags and don't have to be stored in the property's attribute store.
2019-04-21 23:39:32 +02:00
Artur Wieczorek
ccd877c458 Make wxPG_FLOAT_PRECISION a built-in wxFloatProperty attribute
wxPG_FLOAT_PRECISION value is used only internally in wxFloatProperty and there is no need to make it readable via getter function.
2019-04-21 23:39:30 +02:00
Vadim Zeitlin
af83769bd0 Add wxMBConv::GetMaxCharLen()
This is not used yet, but will be needed soon in order to determine
whether we have sufficiently many to decode them.
2019-04-21 20:04:52 +02:00
Vadim Zeitlin
9a9c845289 Add wxSystemAppearance to check for dark mode under macOS
Provide a way to retrieve the name of the current system appearance
(mostly for diagnostic purposes) and check if it uses predominantly dark
colours.

Currently this class has a non-trivial (but still very simple)
implementation under macOS only and simply checks whether the default
text colour is brighter than the default background colour under the
other platforms, but other platform-specific implementations could be
added later.

Also update the drawing sample "system colours" page to show the system
appearance as well.
2019-04-21 02:11:07 +02:00
Vadim Zeitlin
d662a2223e Add wxColour::GetLuminance()
This method can be used to return the perceived brightness of the
colour.

Closes https://github.com/wxWidgets/wxWidgets/pull/1300
2019-04-21 02:09:42 +02:00
Vadim Zeitlin
b6477e0b9c Merge branch 'stcpopup'
Many usability and appearance improvements for autocompletion popups and
call tips in wxSTC.

See https://github.com/wxWidgets/wxWidgets/pull/1267
2019-04-21 02:03:32 +02:00
Vadim Zeitlin
807d95e07d Add wxEVT_COLOURPICKER_CURRENT_CHANGED and DIALOG_CANCELLED events
Send events from generic wxColourPickerCtrl when the currently selected
colour in the dialog shown by it changes and when this dialog is
cancelled.

Notice that currently this only works on wxMSW as it relies on
wxEVT_COLOUR_CHANGED support in wxColourDialog which is only available
there.

Based on work of Trylz, see https://github.com/wxWidgets/wxWidgets/pull/1219
2019-04-21 01:53:14 +02:00
Vadim Zeitlin
35c16935f1 Send wxEVT_COLOUR_CHANGED from wxColourDialog under MSW
Add support for a new event sent by wxColourDialog, currently only under
MSW, when the colour currently selected in it changes.

Based on work by Trylz, see https://github.com/wxWidgets/wxWidgets/pull/1219
2019-04-21 01:53:14 +02:00
Vadim Zeitlin
1f15b41f55 Merge branch 'osx-warnings'
Fix a few warnings with Xcode 10 and start using __builtin_available for
macOS version checks.

See https://github.com/wxWidgets/wxWidgets/pull/1299
2019-04-18 22:58:23 +02:00
Vsevolod V Gromov
20c7421a67 Add Get{Min,Max,Range}() to numeric validator classes
Just provide accessors matching the existing setters.

Closes https://github.com/wxWidgets/wxWidgets/pull/1287,
https://github.com/wxWidgets/wxWidgets/pull/1288
2019-04-18 16:47:02 +02:00
Vsevolod V Gromov
3674bd1c1f Add wxDCTextBgColourChanger and wxDCTextBgModeChanger helpers
These classes are similar to the existing wxDCTextColourChanger and
allow temporarily changing other wxDC attributes.

Closes https://github.com/wxWidgets/wxWidgets/pull/1298
2019-04-18 16:34:38 +02:00
Vadim Zeitlin
fe311b9cc5 Use __builtin_available() when available in wxMac builds
The advantage of using this compiler builtin instead of our own platform
checks is that the compiler will warn us (if -Wunguarded-availability is
turned on for APIs introduced before 10.13 or by default for later ones)
if a check is forgotten, which is not the case for the manual checks.

Update the code to use WX_IS_MACOS_AVAILABLE() macro, which expands to
__builtin_available() when supported, and also use API_AVAILABLE() where
it makes sense to avoid having too many checks.
2019-04-18 00:02:34 +02:00
Vadim Zeitlin
b53c516564 Add more wxOVERRIDE to avoid clang warnings
This fixes several thousands of -Winconsistent-missing-override warnings
given by Xcode 10 when building the library.
2019-04-17 19:05:31 +02:00
orbitcowboy
d82de6b5bf Fix a typo in wxWindow::CaptureMouse() comment
There are no functional changes.

Closes https://github.com/wxWidgets/wxWidgets/pull/1291
2019-04-16 02:04:56 +02:00
Maarten Bent
310b06402e Remove unused variable in wxSVGFileDC 2019-04-10 23:44:26 +02:00
Maarten Bent
b7bf6640ed Restore original wxSVGBitmapFileHandler behaviour
Save the embedded images in the same directory as the SVG file, not in the
runtime directory.
2019-04-10 23:41:58 +02:00
Maarten Bent
19c66c780d White-space only changes in wxSVGFileDC code 2019-04-10 23:37:34 +02:00
Paul Cornett
9511ab08f1 More use of wxOVERRIDE 2019-04-05 11:08:53 -07:00
Paul Cornett
794c1374b8 Remove unneeded overrides
These just forward to the base class
2019-04-05 10:54:54 -07:00
Paul Cornett
af1cf0a5f3 Use ctor-initializer rather than assignment for non-POD class members 2019-04-05 10:21:04 -07:00
Paul Cornett
1a90833839 Avoid 31-bit left shift of 32-bit signed values 2019-04-05 09:48:35 -07:00
Paul Cornett
365759753a Pass parameters by const reference rather than by value 2019-04-05 09:18:07 -07:00
Paul Cornett
25e9be6873 Avoid binding reference to NULL pointer when wxUSE_VALIDATORS==0
Undefined behavior sanitizer complains about it
2019-04-04 10:56:14 -07:00