Commit Graph

17371 Commits

Author SHA1 Message Date
Václav Slavík
7546989c44 Fix wxMarkupParserAttr's unwinding of colors
Fix the logic for restoring previous span's colors to account for the
possibility of spans that don't change the color, such as in "<i><span
color='red'>...</span></i>foo". Previously, "foo" would always be
rendered black, because unwinding the attributes stack would encounter
an invalid color (which has r=g=b=0) and set it, disregarding and
preexisting attributes.

Because there's code in there that checks whether the attributes are
valid, we need to keep track of both the actually specified attributes
and the currently effective ones, and use the latter for restoration.
2016-10-21 17:36:32 +02:00
Václav Slavík
5e5ffad0b8 Respect item font when rendering markup (wxOSX)
Respect per-item attributes and namely the font (which may differ from
the control's font) when rendering markup items in wxDataViewCtrl.
2016-10-21 17:36:32 +02:00
Václav Slavík
58fc33d7c2 Support ellipsizing of markup text in wxDVC
Fix wxDataViewTextRenderer to at least partially respect ellipsize mode
when using markup text. Generic implementation only supports
wxELLIPSIZE_END and wxELLIPSIZE_NONE at the moment, but the wxOSX and
wxGTK ones have full support.
2016-10-21 17:36:32 +02:00
Václav Slavík
ec45fc5ae0 Return IAccessible from GetIAccessibleStd()
There's no reason to return an untyped void* pointer when we can
forward-declare IAccessible.
2016-10-19 10:36:07 +02:00
Artur Wieczorek
cfe0eaa7f2 Create wxAccessible object on demand in wxDVC
Create wxAccessible objects only in response to calls to GetOrCreateAccessible() to save resources.
2016-10-16 23:48:27 +02:00
Václav Slavík
90e1769569 Add API to control OS X wxTextCtrl’s smart behavior
Allow the user to customize smart quotes and dashes substutions on OS X
and also provide the OSXDisableAllSmartSubstitutions() method for
disabling them all at once.
2016-10-16 16:49:18 +02:00
Artur Wieczorek
d8b2da0334 Remove wxUSE_VARIANT guards
wxDataViewCtrl requires wxVariant so these guards are not necessary.
2016-10-15 21:02:05 +02:00
Artur Wieczorek
9c3c6074eb Add accessibility support for wxDataViewCtrl and wxDataViewTreeCtrl
Implemented wxDataViewCtrlAccessible and wxDataViewTreeCtrlAccessible classes.
2016-10-09 21:13:00 +02:00
Václav Slavík
29d310c6f0 Implement wxDataViewCtrl::SetFont() on OS X
wxDataViewCtrl now behaves consistently with other ports on OS X:
calling SetFont() sets the default font used by renderers and adjusts
row height to fit.
2016-10-09 16:10:31 +02:00
Václav Slavík
8a6a20b1e3 Implement wxDataViewCtrl::SetRowHeight() on OS X 2016-10-09 16:10:30 +02:00
Václav Slavík
8e70ef3aec OS X: Fix wxDataViewBitmapRenderer autosizing
wxDataViewCtrl code expects, quite reasonably, that NSCell's cellSize:
will behave as documented and return the minimal size for image cells
too. Unfortunately, that's not the case.

A cell created as NSImageCell, which seems to exists for exactly this
purpose, will always return the size as (0,0), regardless of whether it
has any image set or not an regardless of its size.

On the other hand, a cell created with NSCell.imageCell constructor
sizes itself correctly, but is not a NSImageCell instance and somehow
interferes with other wxDataViewCtrl rendering, presumably due to its
special status.

The simplest fix to make the sizing work correctly therefore seems to be
to specialize NSImageCell and implement its (trivial) cellSize: method.
2016-10-08 18:29:22 +02:00
Václav Slavík
7d03ed608b Fix compilation warning in wx/osx/dataview.h 2016-10-08 16:58:53 +02:00
Artur Wieczorek
fb5f6c4720 Add wxACC_INVALID_ARG error code to wxAccStatus enum
Since accessibility framework supports signaling E_INVALIDARG error, it would be good to have a corresponding flag indicating this error in wxAccessible functions.
In response to wxACC_INVALID_ARG returned by wxAccessible functions, wxIAccessible should return E_INVALIDARG to the framework.
2016-10-03 20:43:00 +02:00
Maarten
977a826639 use more wxOVERRIDE (#329) 2016-09-25 13:21:28 -07:00
Paul Cornett
9b19a6e529 use wxOVERRIDE in wxMSW sources 2016-09-23 07:59:11 -07:00
Artur Wieczorek
b5a740a85f Remove unused member variables from wxGCDCImpl 2016-09-20 21:32:09 +02:00
Artur Wieczorek
41a2b3e371 Fix applying affine transformation matrix in wxGCDC
In wxGCDCImpl::ComputeScaleAndOrigin() current affine transformation matrix (applied with SetTransformMatrix, ResetTransformMatrix) has to be concatenated with current basic transformations (applied with SetDeviceOrigin, SetLogicalScale, etc.).

Closes #17674.
2016-09-20 21:31:56 +02:00
Artur Wieczorek
277f9c58a1 Fix retrieving bounding box coordinates
Bounding box coordinates have to be calculated and stored internally in device units to be independent on changes of logical coordinates between calls to wxDC::CalcBoundingBox.
These stored coordinates are converted to the logical units on demand when they are retrieved with call to wxDC::MinX, MinY, MaxX or MaxY.

Closes #17667.
2016-09-16 22:04:54 +02:00
Vadim Zeitlin
4f0701c82c Merge branch 'clean-up-pre-c++98-compatibility-macro' of https://github.com/minoki/wxWidgets
Don't bother with checking for some really obsolete compilers and just assume
that C++98 keywords "explicit", "{static,const,dynamic}_cast" and support for
partial template specialization is always available.

Closes #17655.
2016-09-16 01:41:19 +02:00
New Pagodi
b06e63dbd2 Add new wxStyledTextCtrl wxEVT_STC_AUTOCOMP_COMPLETED event
This is the translation of Scintilla SCN_AUTOCCOMPLETED notification.

Closes #17664.
2016-09-16 01:38:27 +02:00
Vadim Zeitlin
6ad64a5d69 Make wxTreeEvent::GetToolTip() const
This is not very important because this function is only used by wxWidgets
itself but it's still wrong to have a non-const trivial accessor like this.

See #17661.
2016-09-16 01:34:32 +02:00
ARATA Mizuki
affbcfa6c4 Remove HAVE_PARTIAL_SPECIALIZATION and HAVE_TEMPLATE_OVERLOAD_RESOLUTION macros
See #17655.
2016-09-14 18:45:12 +09:00
ARATA Mizuki
32666e8d4f Remove feature test for HAVE_EXPLICIT 2016-09-14 18:45:12 +09:00
ARATA Mizuki
8cfc74491a Replace wxEXPLICIT with the 'explicit' keyword
See #17655.
2016-09-14 18:45:12 +09:00
ARATA Mizuki
1e6251d592 Replace wx_static_cast/wx_const_cast/wx_reinterpret_cast with the function-style casts
See #17655.
2016-09-14 18:45:12 +09:00
New Pagodi
b99d28bb46 Add wxStyledTextEvent::GetListCompletionMethod()
Provide access to Scintilla "listCompletionMethod" field of SCR_AUTOCSELECTION
event.

Closes #17648.
2016-09-13 13:05:25 +02:00
Artur Wieczorek
49000defcf Add support for affine transformation matrix in wxGCDC
Graphics renderers (exposed through wxGraphicsContext) support arbitrary affine transformations so it is possible to add support for affine transformations in wxGCDC by implementing all wxGCDC::*TransformMatrix() functions with calls to respective wxGraphicsContext functions.
Additionally, this implementation adds support for affine transformations in wxDC under wxGTK3 because in this port wxDC is equivalent to wxGCDC.
2016-09-08 19:34:43 +02:00
Paul Cornett
0bf38e11a3 Cleanup of ad84d9f (r77846)
Remove the unnecessary 'CodePair' struct from a header, make the huge
keySymTab array const, and don't compile it for platforms that don't
use it, it's only used by wxX11
2016-09-07 22:02:05 -07:00
HasheeLeo
ef85c41d0c Pass wxFont by const reference to wxStyledTextCtrl::StyleSetFont()
Since wxStyledTextCtrl::StyleSetFont does not change its 'font' parameter, it
should be a constant reference so we can pass in temporary wxFont objects.

Closes https://github.com/wxWidgets/wxWidgets/pull/321
2016-09-08 01:13:39 +02:00
Kolya Kosenko
897ffb58b0 Use native MIME and display classes in wxGTK/Win32 build
Use Windows file associations when running under this OS, even when using
wxGTK, because this is the right thing to do.

Also use native wxDisplay implementation because it works better than the GTK+
one under this platform.

Closes #17651.
2016-09-08 00:48:41 +02:00
Artur Wieczorek
ba4b8d5670 Fix retrieving clipping box after changing wxDC coordinates (GTK)
Member data containing clipping box have to be updated not only when the clipping region is explicitly changed by SetClippingRegion()/DestroyClippingRegion() but also when wxDC coordinates are transformed with SetDeviceOrigin(), SetLogicalOrigin(), SetUserScale(), SetLogicalScale(), SetTransformMatrix() or ResetTransformMatrix().
When any of these functions is called then clipping box data are marked as invalid and updated by recalculating extents of the clipping region in new coordinates at nearest call to GetClippingBox().

Closes #17646.
2016-09-01 21:42:13 +02:00
Artur Wieczorek
98714ea452 Fix retrieving clipping box after changing wxGCDC coordinates (MSW, GTK)
Member data containing clipping box have to be updated not only when the clipping region is explicitly changed by SetClippingRegion()/DestroyClippingRegion() but also when existing wxGraphicsContext is associated with wxGCDC using SetGraphicsContext() or when wxGCDC coordinates are transformed with SetDeviceOrigin(), SetLogicalOrigin(), SetUserScale() or SetLogicalScale().
When any of these functions is called then clipping box data are marked as invalid and retrieved from underlying graphics context using wxGraphicsContext::GetClipBox() at nearest call to GetClippingBox().

See #17646.
2016-09-01 21:41:18 +02:00
Artur Wieczorek
dfc966bf1e Fix retrieving clipping box after changing wxDC coordinates (MSW)
Member data containing clipping box have to be updated not only when the clipping region is explicitly changed by SetClippingRegion()/DestroyClippingRegion() but also when existing HDC is associated with wxDC using SetHDC() or when wxDC coordinates are transformed with SetDeviceOrigin(), SetLogicalOrigin(), SetUserScale(), SetLogicalScale(), SetTransformMatrix() or ResetTransformMatrix().
When any of these functions is called then clipping box data are marked as invalid and updated using GetClipBox() Win API at nearest call to GetClippingBox().

See #17646.
2016-09-01 21:39:48 +02:00
Lauri Nurmi
84969ba00d Prevent assignment to wxString::const_iterator from compiling
Make const_reference const and dereference const_iterator into a
const_reference to ensure that the code trying to assign to a (dereferenced)
const_iterator doesn't compile.

Closes https://github.com/wxWidgets/wxWidgets/pull/316
2016-08-27 17:51:37 +02:00
arata, mizuki
23527a5f81 Fix wxCHECK_VISUALC_VERSION macro to correctly detect VC14 2016-08-27 17:45:12 +02:00
Lauri Nurmi
394ce5f631 Add C++11-style cbegin, cend, etc. to wxString's iterator interface
These c-prefixed functions always return a const_iterator.
The full list of functions added: cbegin(), cend(), crbegin(), crend().

Closes https://github.com/wxWidgets/wxWidgets/pull/314
2016-08-25 18:54:05 +02:00
Artur Wieczorek
480a003c00 Add wxGraphicsContext::GetClipBox() function
This method returns bounding box of the current clipping region.
Added declaration, documentation and implemented for GDI+, Direct2D, Cairo renderers.
2016-08-21 20:57:40 +02:00
brawer
7f10d1fa8a Add wxSYS_CARET_{ON,OFF,TIMEOUT}_MSEC system settings
Provide a way to retrieve the caret blink times from wxSystemSe and implement
it for wxOSX and wxGTK.

Closes #17629.
2016-08-19 22:55:20 +02:00
Scott Talbert
dbe2a1c2fd Fix wxNativeFontInfo::InitFromFont() when using Pango
Use pango_font_description_copy() to make a lossless copy of the original font
instead of doing it using wxWidgets API which is less direct and, in addition,
currently is completely broken as SetXXX() methods don't create the Pango font
description if it doesn't exist as they ought to.

Closes https://github.com/wxWidgets/wxWidgets/pull/312
2016-08-10 15:03:49 +02:00
Artur Wieczorek
cd96c664dd Updated documentation for some wxPropertyGrid classes.
Updated documentation for wxPGEditor, wxPropertyGridPage, wxPropertyGridManager, wx*Property classes.
Removed doxygen-style comments from header files.
2016-07-23 23:38:39 +02:00
Artur Wieczorek
c3fa684a27 Fixed displaying validation error for numeric wxPG properties (wxUIntProperty, etc.)
When entered wxFloatProperty, wxIntProperty or wxUIntProperty is out of range then there is displayed a warning message presenting a valid range. Instead of displaying in this message numeric values in default (and fixed) format we should display values which are formatted based on to the current attributes of the property (like wxPG_UINT_PREFIX, wxPG_UINT_BASE, wxPG_FLOAT_PRECISION).
To do so, we shouldn't format respective values on our own in NumericValidation() but instead call wxPGProperty()::ValueToString() which returns value string formatted in line with attributes.

Closes #17601
2016-07-21 23:13:16 +02:00
Vadim Zeitlin
90eaa1bbe3 Compilation fix for libc++ after the previous commit
libc++ defines std::iter_swap() with a non-standard exception specification
incompatible with the other other standard libraries and not compiling with
our definition of swap() for wxUniCharRef anyhow, so disable iter_swap()
specialization until https://llvm.org/bugs/show_bug.cgi?id=28559 is fixed.
2016-07-15 02:12:55 +02:00
Vadim Zeitlin
14ec2691f6 Allow swapping wxString iterators in C++11 mode
Specialize std::iter_swap() for wxString::iterator in C++11 mode as the
default implementation of it doesn't work for iterators using "reference" type
different from "value_type&" as is the case for wxString::iterator.

This notably allows the code using std::reverse() with wxString iterators to
compile in C++11 mode, which wasn't the case before.
2016-07-14 16:36:24 +02:00
Vadim Zeitlin
aa3acfdd15 Work around an apparent gcc optimizer bug in wxClassInfo
Rewrite a complex expression in wxClassInfo::IsKindOf() as several statements
to avoid what looks like a gcc optimizer bug as it was dereferencing
m_baseInfo1 pointer even when it was null.

The new version is not completely equivalent to the old one as it doesn't
check for info == NULL which is not really necessary, but this is just a side
effect and doesn't affect anything, the important change is avoiding doing
everything in a single expression.

Closes #17483.
2016-07-13 23:33:23 +02:00
Artur Wieczorek
53230aaf4d Fixed retrieving clipping box for transformed wxDC
Because wxDC can be the subject of geometric transformations (like translation, scaling) so we cannot assume in the calculations of the clipping box that DC origin is always at (0,0) and its logical size is the same as physical size. To get correct result we have to use logical coordinates of wxDC area in all clipping box calculations.
2016-07-09 23:38:31 +02:00
Artur Wieczorek
c08b8c6f6d Fixed minor typo in comment. 2016-07-08 19:51:58 +02:00
Artur Wieczorek
c910085507 Update documentation of some flags used by wxPropertyGridInterface methods. 2016-07-08 19:49:03 +02:00
Artur Wieczorek
04ba48e685 Use enum instead of macro to represent flag used in wxPGPropertyGridInterface and wxPGProperty methods.
Use enums to represent all flags.
2016-07-08 19:47:25 +02:00
Vadim Zeitlin
4c0e272589 Don't pass parameters to wxSizerXmlHandler::GetGB{Pos,Span}()
This doesn't make sense, these functions can only be ever used with a single
parameter ("cellpos" for the former and "cellspan" for the latter), so just
hard-code it inside the functions themselves.

No real changes, just make the code less confusing.
2016-07-06 18:51:10 +02:00
Vadim Zeitlin
f68c67aa85 Use "pair of ints" type for wxGridBagSizer size and position in XRC
Introduce a new type for XRC values imaginatively called just "pair of
integers" which can be used for values not expressed in pixels and hence for
which it doesn't make sense to use dialog units nor to scale them by the DPI.

Use this new type for wxGridBagSizer position and span elements to prevent
them from being changed when using higher than normal DPI.

Closes #17592.
2016-07-06 18:44:07 +02:00
Artur Wieczorek
8615921f42 Fixed retrieving clipping box parameters when there is no clipping region set.
When there is no clipping region currently set then current effective clipping region is identical with entire DC surface and therefore DC size should be returned as a region size.

Closes #17013
2016-07-03 22:39:48 +02:00
Vadim Zeitlin
2543c336b0 Revert "Fix invisible captions in high contrast mode"
This reverts commit 71dfb3b414 which fixed
appearance of the captions in high contrast mode but broke them for wxGTK.

Ideal would be to make this code work in wxGTK too or, in the worst, case only
use this code for wxMSW, but for now at least avoid breaking wxGTK appearance
by default.

See #16186.
2016-07-03 14:38:36 +02:00
Artur Wieczorek
7968f37883 Updated documentation of some wxPropertyGrid-related classes.
Updated wxPropertyGridPageState, wxPropertyGridHitTestResult, wxPropertyGridIterator,  documentation.
2016-07-02 23:20:11 +02:00
Iwbnwif Yiw
015ffbb0ef Make background of book controls in wxMSW be the same as parent
This improves their appearance especially when they're used as children of
wxNotebook, which uses a different background colour than plain wxPanel by
default.

This generalizes what was already done for wxChoicebook in 6cab632f
(see #12503) to all book controls.

Closes #16878.
2016-07-02 15:04:19 +02:00
Vadim Zeitlin
ebb3a791b9 Revert using an event object for waking up event loop in wxMSW
This reverts 6c40531fb7 ("Make main thread wake
up code more efficient and less error-prone in wxMSW") as, while being more
efficient, the new code doesn't work at all when we're not running the message
loop ourselves as it happens when the user opens a menu or starts resizing a
window because in both cases Windows runs a local message loop dispatching the
messages itself and this message loop doesn't react to our event object being
signalled.

So this approach can't work and needs to be reverted, even if it reintroduces
the danger of overflowing the message queue (see #9053).

Closes #17579.
2016-07-02 14:49:15 +02:00
Vadim Zeitlin
ffcdcc1617 Make wxTimeSpan::operator-() const
Due to an oversight, it wasn't declared as const, making it impossible to
subtract from a const wxTimeSpan object.

Fix this and add a unit test verifying that this compiles and works as
expected.

Closes #17583.
2016-06-30 19:09:04 +02:00
Vadim Zeitlin
dae164b8aa Return correct main window from wxListHeaderWindow
wxListHeaderWindow is part of the composite wxGenericListCtrl, so override
GetMainWindowOfCompositeControl() in it to indicate this relationship.
2016-06-29 18:20:55 +02:00
Vadim Zeitlin
423ad59b00 Replace AddCatalog() overload with defaulted argument
There is no need to have 2 overloads of this function when we could have just
a single one with a default parameter value.
2016-06-26 18:30:32 +02:00
Artur Wieczorek
2ea7ff3160 Updated documentation for wxPropertyGridInterface.
Updated documentation and removed doxygen-style comments from propgridiface.h header file.
2016-06-25 18:17:57 +02:00
Artur Wieczorek
9bee5e1e2b Updated documentation for several wxPG components.
Updated wxPropertyGrid, wxPropertyGridEvent, wxPropertyGridPopulator documentation and removed doxygen-style comments from propgrid.h header file.
2016-06-23 22:23:03 +02:00
Artur Wieczorek
2ea41cca8d Updated documentation for several wxPG components.
Updated documentation and removed doxygen-style comments from property.h header file.

wxPGPaintData
wxPGProperty
wxPGCell
wxPGAttributeStorage
wxPGChoices
wxPGChoiceEntry
wxPGRootProperty
wxPropertyCategory
2016-06-16 23:55:37 +02:00
Vadim Zeitlin
f792ba45f6 Merge branch 'dvc-markup'
Add support for using markup in wxDataViewCtrl items.
2016-06-16 17:49:54 +02:00
Vadim Zeitlin
74c0462c84 Add wxDataViewTextRenderer::EnableMarkup()
Implement the new method to all the implementations (generic, GTK, OS X), show
it in the sample and update the documentation.
2016-06-16 00:06:23 +02:00
Vadim Zeitlin
acd77439f9 Add wxMarkupText::RenderItemText()
Add new method allowing to use wxRendererNative::DrawItemText() for actually
rendering the text instead of wxDC::DrawLabel().

This will be used for markup support in (generic) wxDataViewCtrl.
2016-06-16 00:02:02 +02:00
Artur Wieczorek
1f696b6110 Updated wxPGDefaultRenderer and wxPGCellRenderer documentation.
Removed doxygen-style comments from the header file, too.

Closes #14788
2016-06-13 18:40:42 +02:00
Maarten Bent
97c7ac4289 Code cleanup in wxSVGFileDC.
Consistent white-space usage.
Use wxS macros for strings.
Check if output stream is OK when writing.
Removed unnecessary Borland pragmas.
2016-06-12 18:40:12 +02:00
Maarten Bent
9e07ba8fae Support SetDeviceOrigin and SetAxisOrientation in wxSVGFileDC.
Override SetDeviceOrigin, SetLogicalOrigin and SetAxisOrientation from wxDC and mark the graphics as changed, so the correct transform translations are applied.
2016-06-12 18:40:11 +02:00
Maarten Bent
1717db0373 Improved memory management in wxSVGFileDC. 2016-06-12 18:40:11 +02:00
Maarten Bent
b55a18f6b8 Generate valid XML in wxSVGFileDC and updated wxSVGVersion.
Use the correct doc-type and specify the encoding. 'title' is not a valid attribute of <image> so remove it.
Removed superfluous white-space and improved indenting in generated XML.
2016-06-12 18:40:10 +02:00
Maarten Bent
045265a7bb Allow to set the SVG title when creating a wxSVGFileDC. 2016-06-12 15:59:28 +02:00
Maarten Bent
3cc4d51c9b Implemented Clear in wxSVGFileDC.
Draw a rectangle with the background colour and a transparent pen.
Closes #15788.
2016-06-12 15:59:27 +02:00
Maarten Bent
444c5fd630 Correctly draw poly-polygons in wxSVGFileDC.
Each polygon in the poly-polygon needs to end with the start-point. The implementation is similar to the wxDCImpl implementation, except for the extra end points that are inserted.
2016-06-12 15:59:26 +02:00
Maarten Bent
ebab640578 Enable usage of clipping regions in wxSVGFileDC.
It was implemented 3 and half years ago in 614e38d.
Close remaining clipping regions when closing the SVG file.
2016-06-12 15:59:26 +02:00
Vadim Zeitlin
023ee99ea7 Don't crash in wxTextFile::GetLastLine() if the file is empty
Just return a reference to an empty wxString, as GetFirstLine() already does
(although this is actually questionable -- what if this string is modified?).

See #17283.
2016-06-09 16:48:01 +02:00
Vadim Zeitlin
dd562649f0 Fix recently broken wxPickerBase::SetPickerCtrlGrowable()
Resetting growable flag didn't work correctly after the changes of
0d86c01b8b, fix this and reuse the same code for
both this function and SetTextCtrlGrowable().

See https://github.com/wxWidgets/wxWidgets/pull/296
2016-06-09 15:24:44 +02:00
Vadim Zeitlin
0d86c01b8b Deprecate wxPickerBase::GetDefaultXXXFlag() methods
They just seem completely useless, not documented and only used by wxPickerBase
itself internally. Replace the code using them with wxSizerFlags which is more
clear and also doesn't hard code the border sizes (especially in the case of
the picker control which doesn't even have borders in the first place) and
prepare for removing them later.
2016-06-08 02:51:53 +02:00
Vadim Zeitlin
7f603c959f Move wxPanel::HasTransparentBackground() to wxControlContainer
This MSW-specific hack is actually needed by all windows containing more than
one control, even if they don't derive from wxPanel (which is just the most
commonly used class for such windows), otherwise the parts of the window not
covered by the child controls won't have the correct appearance when the
window itself is inside a wxNotebook.

So do this for all classes inheriting from wxNavigationEnabled<>, notably this
fixes the wrong background for all kinds of picker controls (wxDirPickerCtrl,
wxFilePickerCtrl, ...) when they're used inside a wxNotebook.

After moving this method out of wxPanel, src/msw/panel.cpp became empty, so
also delete it and remove it from {bake,make,project} files.
2016-06-07 22:08:51 +02:00
Vadim Zeitlin
4dfde501df Add support for returning item location to wxGTK wxMimeTypesManager.
This is a squash merge of gtk_mimetype branch from
https://github.com/Hanmac/wxWidgets.git with some extra minor cleanup.

Closes https://github.com/wxWidgets/wxWidgets/pull/293
2016-06-07 14:29:52 +02:00
Vadim Zeitlin
5f01172165 Compilation fix for wxUSE_STATUSBAR==0 build
This should have been part of 152b9fc0eb.

Closes #17553.
2016-06-07 14:29:52 +02:00
Vadim Zeitlin
ed73e4f624 Merge branch 'uisim-xtest'
Make wxUIActionSimulator work with GTK+3, including when using DPI scaling.
2016-06-04 22:44:25 +02:00
Vadim Zeitlin
152b9fc0eb Fix sending of wxEVT_UPDATE_UI events when wxUSE_STATUSBAR==0
wxFrameBase code unintentionally excluded the function generating
wxUpdateUIEvents for the menus from compilation when wxUSE_STATUSBAR was
turned off.

Move OnMenuOpen() out of #if wxUSE_STATUSBAR section to ensure that it's
compiled whenever wxUSE_MENUS==1.

Closes #17553.
2016-06-04 21:59:36 +02:00
Vadim Zeitlin
690ca5a1b4 Merge branch 'scintilla366' of https://github.com/pkulchenko/wxWidgets
Update bundled Scintilla version to 3.6.6.
2016-06-04 19:47:49 +02:00
Vadim Zeitlin
4154fbb8a3 Add conversions between wxSecretValue and wxString
This is less secure, but more convenient, than using raw pointers and in most
cases the password will already be stored in a wxString anyhow.
2016-06-04 19:19:15 +02:00
Vadim Zeitlin
1de80a72d9 Refactor wxSecretValue creation
No real changes, just add a new platform-specific NewImpl() method instead of
making wxSecretValue ctor itself platform-specific.

This makes adding other ctors for this class simpler.
2016-06-04 18:46:23 +02:00
Vadim Zeitlin
675d9d779d Add wxSecretStore
Add a new class allowing to store passwords and other sensitive information
using the OS-provided facilities.

Add implementations for all the main platforms, documentation and a new sample
(which contains an ad hoc unit test as the real unit test for this class would
probably be a bad idea as it wouldn't run in non-interactive contexts and
could show OS level dialog boxes if it did).
2016-06-04 18:29:15 +02:00
Paul Kulchenko
36c5b5f9ca Updated Scintilla to add GetTargetTextRaw (closes #17426). 2016-05-31 23:06:51 -07:00
Paul Kulchenko
c03ce59b86 Upgrade Scintilla component to 3.6.6. 2016-05-31 22:19:10 -07:00
Vadim Zeitlin
78bfde8ac0 Fix link errors with older MinGW due to use of GetLayout()
This function is not present in older MinGW import libraries, up to at least
MinGW 4.8.1, so we can't use it directly as it was done in
22f0801378 and we need to load it dynamically.

This was already done in wxDC code, so just reuse the same wrapper function
after extracting it (and a few others, for consistency) into a new header.
2016-05-30 19:30:07 +02:00
Vadim Zeitlin
4a0938d2b7 Allow "moving" wxX11Display objects
This is not a real move-ctor but std::auto_ptr<>-like "stealing" ctor. It
still allows to pass Display ownership to another function which is all that
is needed for our purposes.
2016-05-23 03:00:49 +02:00
Vadim Zeitlin
cfc1681b4c Virtualize wxUIActionSimulator implementation
Extract platform-specific code in a wxUIActionSimulatorImpl-derived class
instead of keeping it in wxUIActionSimulator itself.

This will allow determining which implementation to use dynamically (i.e. at
run-time and not compile-time) to use later and already allows to get rid of
an __WXOSX__ #ifdef in common code.
2016-05-23 03:00:49 +02:00
Vadim Zeitlin
e82c619402 Only define wxUSE_XTEST in Unix-specific headers
This symbol is not needed and doesn't make sense in wxMSW.
2016-05-23 03:00:48 +02:00
Scott Talbert
a4716916b7 Add support for using the XTest extension in wxUIActionSimulator
Fixes wxUIActionSimulator under wxGTK3, see #17530.
2016-05-23 03:00:48 +02:00
Vadim Zeitlin
6a2a4ef38b Use "int" instead of "long" for TLW geometry storage
For some reason, "long" was used for window coordinates even though they're
really "int", and implicitly converting from the former to the latter resulted
in warnings in user code including this header with e.g. Apple clang.

Just use int to avoid conversions.
2016-05-15 20:23:01 +02:00
Benjamin Drung
bc41cbeb25 Define wxIsNaN() as std::isnan() in C++11 mode
std::isnan() is always available when using C++11, so just use it.

Also pout the test for C++11 implementations of both wxIsNaN() and wxFinite()
first, eventually the rest of the checks will become obsolete and will be
removed.

Closes https://github.com/wxWidgets/wxWidgets/pull/283
2016-05-14 00:13:47 +02:00
Vadim Zeitlin
a5d2f53f41 Inherit wxGauge from wxGaugeBase in wxGTK
Ensure the proper class hierarchy in wxGTK, this notably allows to override
SetValue() in classes derived from wxGauge, which didn't work in wxGTK (but
did in wxMSW and wxOSX) before.

Also remove the now unnecessary IsVertical().
2016-05-13 22:32:16 +02:00
Vadim Zeitlin
189e4c5024 Null-terminate arrays returned from wxCmdLineArgsArray
This is required for compatibility with the real argv array that this class is
supposed to emulate.

Closes #17531.
2016-05-13 15:40:22 +02:00
Eric Jensen
e7a526604c Implement auto complete in generic wxSearchCtrl
Just forward the relevant methods to the embedded wxTextCtrl.

Closes #17519.
2016-05-07 01:49:22 +02:00
Vadim Zeitlin
8677b7eb0a Move our own CFM_BACKCOLOR definition to src/msw/textctrl.cpp
It is only needed/used in this source file, no need to have it in the global
header.
2016-05-06 18:54:40 +02:00
Václav Slavík
98f5315405 Don't set initial label in wxNativeWindow on OS X
Differentiate between setting the label from SetLabel() and from
SetPeer() (i.e. initially), because some native controls shouldn't have
an empty string set as their intitial value.

Override SetInitialSize() to be empty for wxNativeWindow in order to
prevent label-setting issues when an unknown, caller-controlled native
widget is attached. Reverts db9baf9aa5,
which was the previous attempt to fix this, but was causing too many
problems elsewhere.
2016-04-29 17:26:02 +02:00
Troels Knakkergaard
db62698720 Fix for DLL build after wxItemAttr addition
Don't forward declare this class as being DLL-exported, it isn't.

Closes #17508.
2016-04-25 12:08:28 +02:00
Vadim Zeitlin
875a40be13 Fix wxString::ToStdString(wxMBConv) to compile in ANSI build
70ddab243e broke compilation without Unicode as
mb_str() doesn't return a buffer in this case.

See #17461.
2016-04-24 18:12:31 +02:00
Maarten Bent
82ed51d167 Add virtual dtor to wxMSW CustomDraw class
This class is used polymorphically and needs a virtual dtor.

See https://github.com/wxWidgets/wxWidgets/pull/276
2016-04-24 18:02:58 +02:00
Vadim Zeitlin
70b64b8c53 Merge branch 'rename-listctrl-checkbox-methods' of https://github.com/discnl/wxWidgets
Use consistent case for wxListCtrl::{Has,Enable}CheckBoxes() methods.

Closes https://github.com/wxWidgets/wxWidgets/pull/275
2016-04-23 18:53:41 +02:00
Vadim Zeitlin
bed710d9a7 Add wxDataViewCtrl::GenericGetHeader() accessor
And show how to use it to increase the header size in the sample.
2016-04-22 01:12:21 +02:00
Vadim Zeitlin
bed7d9fe74 Add wxDataViewCtrl::SetHeaderAttr() too
This is currently only implemented in the generic version but could be
implemented at least for GTK+ native one as well in the future.
2016-04-22 00:58:38 +02:00
Dimitri Schoolwerth
c78470b647 Rename wxListMainWindow::IsInsideCheckBox to IsInsideCheckbox 2016-04-21 17:47:10 +00:00
Dimitri Schoolwerth
602111f2b3 Rename wxListCtrl::HasCheckboxes() and EnableCheckboxes()
Rename them to HasCheckBoxes and EnableCheckBoxes for consistency with
wxCheckBox naming.

See also PR https://github.com/wxWidgets/wxWidgets/pull/153
2016-04-21 15:25:10 +00:00
Vadim Zeitlin
5388c7a72e Add wxListCtrl::SetHeaderAttr()
This method can be used to change the list view header appearance.

Add the method declaration, documentation, show it in the sample and implement
it for wxMSW (only, for now).
2016-04-17 18:26:13 +02:00
Vadim Zeitlin
dfb993274c Add equality operators to wxItemAttr
It can be necessary to compare two item attributes for equality, e.g. to check
if the attributes have changed, so provide a straightforward implementation of
equality and inequality operator for it.
2016-04-17 17:36:20 +02:00
Vadim Zeitlin
e84053ed64 Add wxItemAttr::HasColours() and IsDefault() accessors
They are trivial but useful to have as testing for HasBackgroundColour() ||
HasTextColour() || HasFont() is too verbose.
2016-04-17 17:19:20 +02:00
Vadim Zeitlin
c15f75b81d Use custom draw in wxMSW wxHeaderCtrl to support colours
Add a helper wxMSWImpl::CustomDraw class which will be reused in the other
places too and, for now, use it just to implement support for custom colours
in wxHeaderCtrl.

Notice that the control took care of the custom font on its anyhow and that
background colour is ignored when themes are enabled, so the net effect of
this change is that now changing the header foreground colour works, while
it was ignored before.
2016-04-17 17:01:08 +02:00
Vadim Zeitlin
246ae58c19 Replace wxTreeItemAttr and wxListItemAttr with wxItemAttr
The two existing structs were completely identical, just replace them with a
single wxItemAttr.

Notice that wxDataViewItemAttr is not quite the same, although pretty similar,
so it remains separate for now. It would be nice to combine it with this one
too in the future, e.g. to make it simpler to make items bold in a wxListCtrl.
2016-04-16 19:04:52 +02:00
Marek Temnyak
d4460435d9 Make source string const in wxPropertyGrid escape sequence methods
Source string is not changed in {Expand,Create}EscapeSequences() methods, so
make it const.

Closes https://github.com/wxWidgets/wxWidgets/pull/271
2016-04-14 16:05:10 +02:00
Kevin B. McCarty
a922d576ec Use wxINT64_MIN for the value of invalid wxDateTime
Use 0xffffffffffffffff instead of the strange 0xffffffff00000000 that we used
before, for some reason.
2016-04-12 20:54:27 +02:00
Kevin B. McCarty
56aa94c61e Allow using wxDateTime::operator==() and !=() with invalid objects
Unlike the other operators, we comparing for equality has a well-defined
semantics even for invalid objects, so there doesn't seem any reason to not
allow it.
2016-04-12 20:50:09 +02:00
Kevin B. McCarty
fda904ea77 Implement wxDateTime::Is{EqualTo,{Earlier,Later}Than}() in terms of operators
Avoid duplicating the same code, even if it's trivial, in both places.

Notice that these functions are implemented in terms of operators and not vice
versa because we have no functions corresponding to operator<=() or
operator>=().
2016-04-12 20:45:15 +02:00
Kevin B. McCarty
d47efc42ff Remove redundant IsValid() checks from wxDateTime comparison methods
They're not necessary as GetValue() asserts when passed an invalid object
anyhow, there is no need to check for this twice.
2016-04-12 20:43:14 +02:00
orbitcowboy
e3f1423632 Fix typos in comments in C++ code
No real changes.

Closes https://github.com/wxWidgets/wxWidgets/pull/268
2016-04-12 17:15:23 +02:00
Vadim Zeitlin
bac5975b02 Merge branch 'rtl-fixes'
Fix appearance of wxNotebook children background when using RTL locales.
2016-04-10 20:51:33 +02:00
Vadim Zeitlin
eed5700a07 Refactor: remove wxNotebook::DoDrawBackground() in wxMSW
The code in QueryBgBitmap() and MSWPrintChild() is sufficiently different that
we can't easily reuse the drawing calls between them, so don't tie ourselves
in knots trying to do it, just duplicating these 2 calls in the 2 functions is
not that bad and the code is more clear.

No real changes.
2016-04-10 20:49:36 +02:00
Vadim Zeitlin
5368c72d37 Fix wxMSW build with wxUSE_DEFERRED_SIZING==0
Don't define BeginRepositioningChildren() and EndRepositioningChildren() at
all in this case instead of defining them as "do nothing" functions because
BeginRepositioningChildren() still needs to return a bool, so the old code
didn't compile and we would need to add another "#else" to fix this -- instead
make it simpler by just not compiling at all in this case.
2016-04-08 22:22:22 +02:00
New Pagodi
0a3057b83c Add GetDirect{Function,Pointer}() methods to wxStyledTextCtrl
These methods can be useful when working with dynamic lexers.

Closes #17481.
2016-04-03 15:50:21 +02:00
New Pagodi
a6e249ea1a Add support for loading external lexers to wxStyledTextCtrl
Implement Scintilla DynamicLibraryImpl and generate LoadLexerLibrary() and
GetLexerLanguage().

Closes #17480.
2016-04-03 15:47:48 +02:00
Vadim Zeitlin
8baaa652ef Merge branch 'dvc': miscellaneous wxDataViewCtrl-related fixes 2016-04-02 01:09:06 +02:00
Vadim Zeitlin
4e4286f0e2 Merge branch 'utf8-stdstring-interop' of https://github.com/minoki/wxWidgets
Make it easier to interoperate with the code using UTF-8-encoded std::strings.

Closes #17461.
2016-03-28 21:44:54 +02:00
Iwbnwif Yiw
00526cefb6 Return full virtual screen size from wxScreenDC::GetSize() in wxMSW
Return the size of the entire virtual screen, possibly composed from multiple
monitors, rather than just the size of the primary monitor.

This makes this method consistent with wxScreenDC actually representing the
entire virtual screen and not just the primary monitor and also with wxGTK.

Closes #13279.
2016-03-28 21:37:55 +02:00
ARATA Mizuki
70ddab243e Add wxMBConv parameter to wxString::ToStdString
See #17461.
2016-03-25 16:23:47 +09:00
ARATA Mizuki
81e6638585 Add overloads of wxString::FromUTF8/FromUTF8Unchecked taking a std::string
See #17461.
2016-03-25 16:23:47 +09:00
Václav Slavík
e37f1a84ce Disable warnings in the standard shlobj.h header with MSVC14
There is nothing we can do about these (harmless) warnings, so just
disable them. Also make sure that the header is included via
wx/msw/wrapshl.h  everywhere.
2016-03-23 14:46:59 +01:00
Vadim Zeitlin
716dace3d6 Make wxDataViewCtrl::Expand() expand ancestors in native ports too
Expand() called ExpandAncestors() in the generic wxDataViewCtrl implementation
but not in the native ones, resulting in observable difference in the
behaviour: for example, the wxDataViewTreeCtrl in the dataview sample appeared
initially expanded under MSW, using the generic version, but collapsed under
GTK and OSX.

Harmonize this among all ports. This also has a nice side effect of making
Expand() less horribly inefficient as it is not recursively called by
ExpandAncestors() which it itself used to call: now ExpandAncestors() only
calls DoExpand() which is a simple function that only expands the item passed
to it and does nothing else.

Closes #14803.
2016-03-22 21:22:36 +01:00
Vadim Zeitlin
aa9e7d3326 Don't make wxDataViewCtrl::ExpandAncestors() virtual
This method has a common implementation and is not supposed to be overridden.
2016-03-22 21:14:10 +01:00
Vadim Zeitlin
6316045e19 Remove unnecessary wxOSX_USE_COCOA checks in wx/osx/dvrenderers.h
These checks are not needed any more now that Carbon is not supported any
loner.
2016-03-19 00:17:14 +01:00
wanup
c4e892629f Implement wxDataViewChoiceByIndexRenderer for wxOSX
Add missing class implementation.

Closes #17452.
2016-03-19 00:17:13 +01:00
Vadim Zeitlin
9829446755 Refactor wxDataViewEvent constructors
Take care of all the common stuff such as setting the event object and the
model, which is used for all events, in the ctor. Also set both the column
pointer and the column index at once instead of having two separate setters
for them which could result in inconsistent event objects (and did, as
sometimes only one or only the other field was set).

This makes the code shorter (we save 160 lines) and more clear and ensures
that everything is always initialized.

Closes #12649.
2016-03-19 00:16:51 +01:00
Vadim Zeitlin
db6e1c5b38 Make wxCOL_WIDTH_AUTOSIZE work dynamically in generic wxDataViewCtrl
Caching the best column widths broke autosizing behaviour if the column title
was updated after setting the width to wxCOL_WIDTH_AUTOSIZE.

Fix this by invaliding the column cached width if its text changes.
2016-03-17 22:34:14 +01:00
Vadim Zeitlin
df101cab76 Regenerate wx/msw/setup0.h after merging MinGW changes
The merge db70be1a7c accidentally reverted the
changes of d053a90486, restore them.
2016-03-17 22:04:48 +01:00
Vadim Zeitlin
ccac9d0557 Enable wxStackWalker in MinGW64 builds
This class can be used even without SEH, provided debug help API is available,
so just make wxUSE_STACKWALKER dependent on wxUSE_DBGHELP instead of
unconditionally disabling it if SEH support is not available.
2016-03-15 20:11:10 +01:00
Vadim Zeitlin
841af56084 Allow using debug help API with non-MSVC compilers
MinGW64 and TDM-GCC come with imagehlp.h and can compile the code using debug
help API too, so enable wxUSE_DBGHELP when using these compilers by default
and also allow enabling it via a configure option.
2016-03-15 20:11:07 +01:00
Vadim Zeitlin
8979566dd2 Make wx/stackwalk.h self-sufficient
Don't rely on wx/string.h being already included, but include it explicitly
ourselves to fix compilation error when wx/stackwalk.h is the first wx header
to be included.
2016-03-14 01:15:43 +01:00
Vadim Zeitlin
a9be974d5b Avoid unnecessarily refreshing last column in generic wxDataViewCtrl
UpdateColumnSizes() was called whenever the control was modified in any way
since 4156e1a5c9 and it refreshed the entire
last column even if absolutely nothing changed.

Don't do this unless the last column width has really changed.
2016-03-14 00:13:46 +01:00
Vadim Zeitlin
d613fb75f6 Don't update if column width didn't change in generic wxDataViewCtrl
Avoid calling UpdateDisplay() unnecessarily if the column width didn't really
change. This doesn't result in anything really bad happening right now, but it
could easily result in an infinite stream of updates if the code were only
slightly different and it just seems useless to do it.
2016-03-14 00:13:46 +01:00
Vadim Zeitlin
34b0e534f8 Make wxDataViewCtrl::IsMultiColumnSortAllowed() exist in all ports
Contrary to the documentation, this method only existed in the generic
control, add it to the base class now so that the code using it could compile
when using the native ports too.
2016-03-14 00:13:46 +01:00
Vadim Zeitlin
062444ee50 Make generic wxDataViewCtrl EnsureVisible() overload non-virtual
There doesn't seem to be any reason for this method to be virtual other than
preventing "virtual function hiding" warnings from gcc, so just rename it to
have a different name than the virtual EnsureVisible() inherited from the base
class instead.
2016-03-14 00:13:46 +01:00
Vadim Zeitlin
b70109ee7a Don't make some generic wxDataViewCtrl unnecessarily virtual
These methods are not supposed to be overridden and don't override any base
class methods neither.
2016-03-14 00:13:46 +01:00
Vadim Zeitlin
a3fa628669 No changes, just add wxOVERRIDE to wx/generic/dataview.h
Mark the overridden virtual functions as being overridden.

Also reformat some methods to put them on several lines to prevent the lines
from becoming way too long.
2016-03-14 00:13:46 +01:00
Vadim Zeitlin
c03ae2a8f8 Propagate changes to generated wx/msw/setup0.h back to setup_inc.h
Changes of d053a90486 only updated the generated
wx/msw/setup0.h file but not the file wx/msw/setup_inc.h from which it is
generated and so would have been lost after the next modification to the
latter.

Modify the latter one too to ensure that the changes stick.

See https://github.com/wxWidgets/wxWidgets/pull/238
2016-03-13 15:37:08 +01:00
Vadim Zeitlin
81570ae070 Deprecate wxGRIDTABLE_REQUEST_VIEW_{GET,SEND}_VALUES
These grid table requests seem to have been never used and were not doing much
in wxGrid neither, moreover they were never documented, so just stop
supporting them.
2016-03-12 19:01:44 +01:00
Vadim Zeitlin
ef6d42e865 Merge branch 'xrc-aui'
Add XRC handlers for wxAuiManager and wxAuiPaneInfo.

Closes #13520.
2016-03-12 18:21:24 +01:00
Kolya Kosenko
da195023c1 Fix wxGTK/MSW build in wxDIB.
Don't define wxMSW-specific wxDIB::CreatePalette() method when not building
wxMSW.

Closes #17248.
2016-03-09 15:42:51 +01:00
Andrea Zanellato
cf5fa7d5f1 Add support for wxAuiManager and wxAuiPaneInfo to XRC
Add XRC handler for wxAuiManager and include the existing wxAuiNotebook
handler into it (but notice that wxAuiToolBar handler added by a later #15686
in f269f868d7 remains separate).

Also update the AUI dialog in the sample and stop hardcoding its size in
pixels.

See #13520.
2016-03-09 01:11:16 +01:00
Vadim Zeitlin
6f80021950 Fix wxGTK wxHyperlinkCtrl compilation problem with g++ 5.2
Make wxHyperlinkCtrl ctors non-inline to work around an error about incomplete
wxHyperlinkCtrlColData in the inline ctor body with this compiler (but not
with g++ 4.9 nor 5.3, somehow).

Closes #17089.
2016-03-07 19:41:58 +01:00
Vadim Zeitlin
6ac52b3bab Merge setting link colours for wxGTK3 wxHyperlinkCtrl
Closes https://github.com/wxWidgets/wxWidgets/pull/249
2016-03-07 16:17:11 +01:00
Vadim Zeitlin
c32fad09b8 Don't use __has_include() to test for C++11 headers
This is unnecessary as we know that we have them in C++11 mode and we can't
compile them in non-C++11 mode even if they exist.

Not doing it simplifies the code and works around a bug in clang 3.2.

Closes https://github.com/wxWidgets/wxWidgets/pull/247
2016-03-07 16:16:45 +01:00
Hans Mackowiak
d30673e507 Implement setting link colours in wxHyperlinkCtrl for GTK+3
Use GtkCssProvider to customize the colours used.

Closes #17089.
2016-03-07 15:00:07 +01:00
Hans Mackowiak
1e70c05759 Add wxWindow::ApplyCssStyle() helper to wxGTK
This is useful for styling GTK+ 3 widgets.

See #17089.
2016-03-07 13:22:57 +01:00
Vadim Zeitlin
b4d6348c6b Don't use a dummy menu with wxHtmlHelpFrame under OS X
Contrary to the comment in wxHtmlHelpFrame::Create(), this doesn't seem to be
necessary and can be actually problematic.

Never adding this menu obviates the need for the wxHF_MENU style from #15538.

Closes #15538.
2016-03-06 22:12:29 +01:00
Artur Wieczorek
31ab9d8f3f Make pointer to wxWindow a const argument.
State of referenced window is not going to be changed and let caller know about it.
2016-03-06 21:26:14 +01:00
Artur Wieczorek
912eb6fef9 Use enum instead of macros to represent wxPropertyGrid internal flags. 2016-03-06 21:19:07 +01:00
Vadim Zeitlin
f4fd4b8bde Merge with master to get bakefile changes 2016-03-05 17:46:36 +01:00
Troels Knakkergaard
c9a3a23e5a Add wxHtmlPrintout::SetMargins(wxPageSetupDialogData) overload
Make it simpler to set the user-configured margins.

Closes #16872.
2016-03-05 03:33:08 +01:00
Troels Knakkergaard
cda7209101 Add wxFileType::GetExpandedCommand()
This new method allows to get the command expanded with the given file name
for commands other than "Open" and "Print".

Closes #17367.
2016-03-05 03:09:59 +01:00
Tobias Taschner
c17202c696 Remove extra handling of wxAppTraits::GetStandardPaths() on OS X.
Since the removal of carbon in 5ba67c67e4 there is no longer any special handling required.
2016-03-04 15:34:51 +01:00
Tobias Taschner
1125dd8c12 Remove remaining unused carbon implementation code.
Remove code and files which should have already been removed in 5ba67c67e4.
2016-03-04 15:34:51 +01:00
Vadim Zeitlin
da7388c9c8 Make wxLogInfo() work even without wxLog::SetVerbose()
It's confusing that wxLogInfo() and wxLogVerbose() are exactly the same and
the former, and not only the latter, doesn't do anything unless SetVerbose()
had been called, even if the log level is wxLOG_Info or higher.

Fix this by checking for GetVerbose() in wxLogVerbose() only and making
wxLogInfo() check the log level only. This makes it very similar to
wxLogMessage() but this is not such a bad thing.

Also improve wxLogVerbose() documentation.
2016-03-04 15:17:35 +01:00
John Roberts
7c32ef2ba3 Remove extra borders around wxFilePickerCtrl in wxOSX
Don't use extra borders to reserve space for the focus ring, this breaks
alignment of wxFilePickerCtrl with the other controls.

Closes #17416.
2016-03-04 14:56:17 +01:00
Vadim Zeitlin
aa76606287 Merge support for OS and toolkit micro versions
Closes https://github.com/wxWidgets/wxWidgets/pull/234
2016-03-03 23:32:44 +01:00
Vadim Zeitlin
7eee3576cf Update version to 3.1.1
Update misc/scripts/inc_release script: remove non-existent any more files and
update the version in the MSVS 200x project files not generated by bakefile
any more and MSVS 201x project files which were not previously taken into
account.

Run it and rebake.
2016-03-03 23:23:06 +01:00
Paul Kulchenko
b5ac178789 Upgrade scintilla component to 3.6.3. 2016-03-03 09:49:53 -08:00
Vadim Zeitlin
b0a6ed4262 Merge miscellaneous string-related fixes
Closes https://github.com/wxWidgets/wxWidgets/pull/237
2016-03-02 23:17:23 +01:00
Xlord2
d053a90486 Force wxUSE_WINRT to 0 when targeting XP
The required headers such as winstring.h are not present in the SDK used when
targeting XP.

Closes https://github.com/wxWidgets/wxWidgets/pull/238
2016-03-02 21:39:49 +01:00
ARATA Mizuki
86dd0cd2a2 Fix constness of some member functions of wxUString 2016-03-01 16:01:39 +09:00
Vadim Zeitlin
173ecd77c4 Fix clang -Winconsistent-missing-override in wxTextCtrl
Add missing wxOVERRIDE for OnDynamicBind().
2016-02-29 16:12:53 +01:00
Tobias Taschner
3bdb4c4b21 Add micro version to wxCheckOsVersion(). 2016-02-29 10:05:51 +01:00
Dimitri Schoolwerth
1e78bf639e Add micro version to toolkit version functions
Support micro versions in wxAppTraits::GetToolkitVersion and
wxPlatformInfo functions related to toolkit versions.
2016-02-29 10:05:43 +01:00
Dimitri Schoolwerth
ea439c278b Add OS micro version information to wxPlatformInfo
Add GetOSMicroVersion and add other micro version references in an
unobtrusive way: don't change wxPlatformInfo's constructor and use
default parameters for CheckOSVersion and SetOSVersion. The only change
that could affect user code is the changed number of parameters for
DoCheckVersion but because that is a protected function it's less likely
to be a problem.
2016-02-29 10:05:34 +01:00
Dimitri Schoolwerth
b1a9c6e79e Add a micro version parameter to wxGetOsVersion
In addition to getting a major and minor OS version allow a micro
version to be retrieved. In case of running on e.g. OS X 10.10.3 this
allows the "3" to be retrieved again.
2016-02-29 09:58:15 +01:00
Dimitri Schoolwerth
5983274af6 Name the parameters of wxGetOsVersion consistently
Use verMaj and verMin like almost everywhere instead of majorVsn and
minorVsn in a couple of places.
2016-02-29 09:58:15 +01:00
Vadim Zeitlin
c2821dcea0 Allow using arbitrary windows as wxDataViewCtrl editors in wxGTK
Previously the editor created by wxDataViewRenderer::CreateEditorCtrl() had to
be a native GTK+ widget implementing GtkCellEditable interface which prevented
using composite windows (e.g. a container for a text control and a button) as
editors.

Create a helper container wrapping them now and implementing GtkCellEditable
now to allow this.
2016-02-28 20:25:07 +01:00
Vadim Zeitlin
890ccf8e30 Make wxDataViewRenderer::GetEditorCtrl() const
Really no reason not to do it.
2016-02-28 18:02:26 +01:00
Vadim Zeitlin
5e61689dbf Fix regression with MDI children accelerators
Since the changes of 8034e35391 (see #16870)
accelerators, including the standard ones such as Ctrl-F4 under MSW, didn't
work any longer inside the MDI children.

Fix this by extending IsTopNavigationDomain() to allow for checking whether
the given window should stop propagation of all keyboard events, as wxTLW
does, or only TAB navigation ones as wxMDIChildFrame and wxAuiFloatingFrame
do.
2016-02-28 01:24:20 +01:00
Vadim Zeitlin
fd738c5fdb Merge miscellaneous wxDataViewCtrl-related bug fixes
Make it possible to define custom renderers using text controls reacting to
error presses in at least wxMSW and wxGTK.

Closes https://github.com/wxWidgets/wxWidgets/pull/221
2016-02-27 18:08:12 +01:00
Vadim Zeitlin
c4907129f4 Don't export container classes from DLLs when using STL containers
Exporting these classes doesn't seem necessary as they only have inline
functions and doing it results in problems with MSVC as it also, apparently,
exports the corresponding specialization of std::vector<T> from the wxWidgets
DLLs which can clash with the use of std::vector<T> in the user code or even
in 3rd party libraries included in wx itself, such as Scintilla, so this
change fixes link errors in "DLL Debug" build configuration when using MSVC.

Closes #10884.
2016-02-26 13:10:59 +01:00
Kolya Kosenko
16468ac2ba Add missing __WXUNIVERSAL__ checks to fix wxUniv/MSW build
Only define wxHAS_SYSTEM_THEMED_CONTROL when not using wxUniv, do define
wxHAS_GENERIC_TREECTRL when using it.

Closes #17399.
2016-02-26 12:02:05 +01:00
Artur Wieczorek
85bad08373 Fix wxPropertyGrid compilation when wxUSE_TOOLBAR==0
Don't use toolbar associated with wxPG in this case.
2016-02-25 21:37:27 +01:00
Vadim Zeitlin
d3a0798bc5 Merge wxX11 build fixes
Closes https://github.com/wxWidgets/wxWidgets/pull/231
2016-02-24 23:24:20 +01:00
Vadim Zeitlin
4b9dc20956 Remove or make optional tons of debug messages from wxQt
Using the library wasn't really possible with all the debug messages it
generated, so either suppress them completely or turn them into trace messages
which can be activated on demand if needed.
2016-02-24 23:12:37 +01:00
Vadim Zeitlin
1c9a4694ff Merge OpenGL API changes and better modern OpenGL support
Closes https://github.com/wxWidgets/wxWidgets/pull/227
2016-02-24 20:15:35 +01:00
Vadim Zeitlin
a0580b361e Fix warning about ignored attributes for wxControlRenderer
This warning was given many times and was very confusing as it wasn't given at
all in the right location, but rather for all the other, subsequent
declarations of wxControlRenderer which were correct -- unlike this one which
used wrong order for the "class" keyword and the attribute.
2016-02-24 19:39:16 +01:00
Vadim Zeitlin
78cb66ff3f Disable use of opacity in wxGenericColourDialog for non-MSW/OSX
The other ports don't have wxBitmap::{Use,Has}Alpha() (see #17397), so
currently the code doesn't compile under them.

Closes #17393.
2016-02-24 19:30:56 +01:00
Vadim Zeitlin
4d33750137 Make it possible to include wx/base64.h as the first header
Include wx/defs.h before testing for wxUSE_BASE64, otherwise the test would
always fail if wx/base64.h is the first wx header to be included.
2016-02-23 17:11:27 +01:00
Manuel Martin
bdc95f5766 Improve wxGLCanvas to be more type safe and better support modern OpenGL
Add wxGLAttribsBase, wxGLAttributes and wxGLContextAttrs replacing the old
untyped "int attributes[]".

Don't use global object for creating OpenGL > 3.0 contexts.

Closes #16909.
2016-02-23 00:32:54 +01:00
Vadim Zeitlin
fb5ff50eda Make wxBitmap::ConvertToDisabled() work correctly for scaled bitmaps
Preserve the scale factor after conversion.

Closes #17307.
2016-02-23 00:13:37 +01:00
Joost Nieuwenhuijse
eb8f6e0173 Display the global menu bar if the last TLW is hidden in wxOSX
Hiding the last TLW should be enough to show the global menu bar, but this
only happened if it was closed and not just hidden.

Closes #16201.
2016-02-22 22:21:47 +01:00
Paul Cornett
ace212a311 Remove redundant wxGCDC::{Get,Set}GraphicsContext() overrides 2016-02-22 10:34:30 -08:00
Paul Cornett
6674ca57da implement wxDC::GetContentScaleFactor() for GTK3 2016-02-22 09:52:26 -08:00
Catalin
9afa157d43 Marked some standard keys as obsolete. They should probably be removed too. 2016-02-21 20:12:33 +02:00
Catalin
c69c4e2874 Removed wxNB_FLAT style. 2016-02-21 20:12:32 +02:00
Catalin
1a13f8e5b7 Removed wxTB_3DBUTTONS style 2016-02-21 20:12:31 +02:00
Catalin
0d870c5bb3 No longer define GET_X_LPARAM and GET_Y_LPARAM macros. According to MSDN they are available starting with Windows 2000 Professional/Server. 2016-02-21 20:12:23 +02:00
Catalin
77b4e9d7ea Removed obsolete symbols from comments. 2016-02-21 20:12:22 +02:00
Catalin
338629e314 Removed obsolete symbols from comments. 2016-02-21 20:12:11 +02:00
Catalin
cd4942bf8a Removed obsolete symbols from comments. 2016-02-21 20:12:10 +02:00
Catalin
ed938781b6 Removed obsolete symbols from comments. 2016-02-21 20:12:09 +02:00
Vadim Zeitlin
e5c93ad674 Synchronize access to wxSelectDispatcher from different threads
We reuse the same global dispatcher object (allocated in
wxFDIODispatcher::Get()) for the sockets created in different threads, so it's
perfectly possible for its methods to be called concurrently and this happens
even in our own socket streams unit tests.

Protect against concurrent modification of the select sets and m_maxFD. This
fixes sporadic Travis build failures such as the one at
https://travis-ci.org/wxWidgets/wxWidgets/jobs/110757281 for example and
probably even worse bugs too.
2016-02-21 18:47:46 +01:00
Vadim Zeitlin
e417913f46 Reset the wxDataViewItem being edited once it's not edited any more
No real changes, just some cleanup to ensure that the item being edited stored
in wxDataViewRendererBase never refers to an item which is not, actually,
being edited any longer.
2016-02-20 17:07:04 +01:00
Vadim Zeitlin
235e8ebd1a Factor out wxDataViewRendererBase::NotifyEditingStarted()
Reuse the same code from the generic and native GTK and OS X implementations
of wxDataViewCtrl instead of triplicating it.

This fixes a small discrepancy between the wxOSX version, which didn't see the
model pointer correctly in the generated event, and all the others, but mainly
paves way for future improvements.
2016-02-20 17:07:04 +01:00
Vadim Zeitlin
99a1526ee3 Factor out methods for clicking the default button in wxMSW
This will make it possible to reproduce the default "Enter" key functionality
from elsewhere.

Almost no changes yet, the only minor change is that we now wouldn't try to
"click" any windows using DLGC_DEFPUSHBUTTON dialog code but which are not
really buttons -- but then this shouldn't ever happen anyhow.
2016-02-20 17:07:04 +01:00
Vadim Zeitlin
9bcaa058a0 Replace wxTextCtrl::MSWWindowProc() with MSWHandleMessage()
Override newer and more flexible virtual method: this doesn't change anything
yet but will allow to provide default handling for some messages in a single
overridden method in the future commits, when it would have required to also
override MSWDefWindowProc() with the old method.
2016-02-20 17:07:04 +01:00
Vadim Zeitlin
5591a20093 Detect attempts to catch wxEVT_TEXT_ENTER without wxTE_PROCESS_ENTER
This is never going to work, so complain about trying to do it to help with
catching this bug.

This is possible thanks to the new OnDynamicBind() method invoked whenever a
dynamic event handler is bound to a control, so this doesn't detect all
possible occurrences of the bug (such as specifying the handler in a static
event table or in a validator), but it's still better than nothing.

In the future OnDynamicBind() should be extended for other invalid calls, e.g.
binding a handler for wxEVT_TEXT_ENTER to a non-text control shouldn't work
neither, ideally.
2016-02-20 17:07:04 +01:00
Vadim Zeitlin
956edbb309 Reimplement wxSafeConvertXXX() functions using wxWhateverWorksConv
These functions were almost but not quite identical to it:
wxSafeConvertMB2WX() tried the current locale encoding before UTF-8 while
wxConvWhateverWorks tries UTF-8 first and then the current locale encoding.

The latter behaviour is more correct as valid UTF-8 could be misinterpreted as
some legacy multibyte encoding otherwise, so get rid of this difference and
just forward these functions to wxConvWhateverWorks.
2016-02-19 02:57:20 +01:00
Vadim Zeitlin
a11456c078 Add wxWhateverWorksConv and use it for file names under Unix
This ensures that we can create output files with Unicode names even when
they're not representable in the current locale encoding, notably when the
current locale has never been changed and is still the default "C" one, not
supporting anything else other than 7 bit ASCII.

Credits for the new class name go to Woody Allen.
2016-02-19 02:52:43 +01:00
Vadim Zeitlin
80d4993119 Merge wxNotificationMessage for OS X and MSW 8+
Closes https://github.com/wxWidgets/wxWidgets/pull/92
2016-02-18 23:09:05 +01:00
Vadim Zeitlin
3351404c2c Don't use wxOVERRIDE in wxDECLARE_EVENT_TABLE to avoid clang warnings
If a class not using "override" for its other, not wx-related, virtual methods
included wxDECLARE_EVENT_TABLE() with wxOVERRIDE inside it, it resulted in a
clang -Winconsistent-missing-override warning per each virtual method without
it which was very annoying.

Avoid it by not using wxOVERRIDE in this macro and explicitly disabling the
-Winconsistent-missing-override for the methods inside it in case the rest of
the class does use "override".

Notice that this also required rearranging the order of the declarations in
this macro to ensure that a semicolon is still required after it.

Closes https://github.com/wxWidgets/wxWidgets/pull/217
2016-02-18 22:56:11 +01:00
Vadim Zeitlin
8e3a317392 Remove useless #ifdef wxUSE_DEBUG_NEW_ALWAYS check
This symbol is tested using "#if", so it should be always defined and there is
no need for testing whether this is the case.

Moreover, doing this useless check triggers warning C4574 (which is disabled
by default, but it's useful enough to enable it explicitly) with VC14 about
using "#ifdef" with a symbol defined as 0.
2016-02-15 01:20:48 +01:00
Paul Cornett
8585f3215a add missing wxOVERRIDE 2016-02-14 13:40:45 -08:00
Paul Cornett
0ee7565e19 Fix restoring TLW size with wxPersistenceManager on wxGTK
...when window decoration sizes are not known. See #17228
2016-02-14 13:23:49 -08:00
Paul Cornett
f95fd11e08 Allow drawing HiDPI bitmaps with GTK3
1. Override wxWindow::GetContentScaleFactor() to use gdk_window_get_scale_factor()
   when available, and to use correct scale (1.0) otherwise, as wxDC::GetPPI()
   (used by overridden method) is not properly implemented for wxGTK
2. Record scale in wxBitmap(wxImage&) ctor and wxBitmap::CreateScaled()
3. Adjust cairo scale for drawing bitmap, and (inversely) for drawing on bitmap
2016-02-14 13:12:52 -08:00
Vadim Zeitlin
90eae99cd6 Use strict UTF-8 conversion in wxSafeConvertXXX() functions
It doesn't make sense to use any fallbacks when converting to/from UTF-8 and
this wasn't even done consistently as only wxSafeConvertWX2MB() used
MAP_INVALID_UTF8_TO_OCTAL, but not wxSafeConvertMB2WX().

More importantly, UTF-8 conversion can never fail for a valid Unicode string,
so there is no need for any fall backs.
2016-02-13 17:03:47 +01:00
Vadim Zeitlin
fe850fccc5 Fix "open mode" variables naming convention in wxTextFile
Start variable name with lower case letters for consistency.

No real changes.
2016-02-13 13:46:25 +01:00
Rebel_X
35f35ea407 Clean up wxMSW tooltip window on library shutdown
Not doing this prevented the tooltips from working correctly if the library
was shut down and reinitialized again, so add a module ensuring this is done.

Closes #17360.
2016-02-13 12:55:17 +01:00
Vadim Zeitlin
d7d5bcaae6 Merge fixes for Unicode support in wxFileSystem::FindFirst()
Closes #11404.
2016-02-13 12:32:46 +01:00
Vadim Zeitlin
bfbdd37a1a Merge native MSW appearance for AUI toolbars
Closes https://github.com/wxWidgets/wxWidgets/pull/200
2016-02-13 12:31:49 +01:00
Vadim Zeitlin
314630945a Fix wxURI::Unescape() to work with Unicode strings
Such strings are not really URIs as they should have been encoded if they were
but we can obtain them from e.g. wxFileSystem::FindFirst(), so handle them
correctly here as it's simpler than checking all the places where Unescape()
is called.

Add a unit test checking that decoding an URI containing both Unicode and
percent-encoded Unicode characters works correctly.
2016-02-13 04:01:27 +01:00
Vadim Zeitlin
d1085c0182 Update WINVER and _WIN32_WINNT to use Windows 10 SDK values
This allows to see the declarations of the functions new in Windows 8.x and 10
if they're available.
2016-02-12 18:58:42 +01:00
Tobias Taschner
49b82e72f2 Add native wxAuiToolbarArt for MSW.
Using UXTheme or generic fallback for executables without manifest.
2016-02-10 20:40:45 +01:00
Tobias Taschner
c8c9f56e0c Prepare platform dependent wxAuiDefaultToolBarArt. 2016-02-10 20:40:30 +01:00
Tobias Taschner
9345482fbf Add Win8+ toast notification to wxNotificationMessage.
Since Windows 8 there are native toast notifications available via WinRT defined in windows.ui.notifications.h. This adds support for these notifications via wxNotificationMessage. These notifications have to be explicitly enabled via wxNotificationMessage::MSWEnableToasts() because they require a start menu shortcut to the application.
2016-02-10 20:38:12 +01:00
Tobias Taschner
72db8a6265 Add basic support to use WinRT APIs.
Some Windows8+ APIs are only accessible via WinRT which is based on COM. However there are a few dependencies to get to the interfaces via functions defined in roapi.h. Using RoInitialize, RoUninitialize, etc. directly from it's windows headers adds dependencies to the WinRT dlls leaving the resulting exe unable to launch on earlier Windows versions. The wxWinRT functions wrap this with dynamic loading. Additionally wxWinRT::TempStringRef adds a convenient wrapper to HSTRING which is used extensively in WinRT APIs.
2016-02-10 20:38:11 +01:00
Tobias Taschner
bf5e403a68 Restructure wxNotificationMessage.
wxNotificationMessage has been refactored to always use wxNotificationMessageImpl (this was previously already done in the MSW implementation)

This adds various features and fixes to wxNotificationMessage:
- OS X Notification Center implementation
- Generic "toast" notifications
- SetIcon() to specify a custom icon
- AddAction() to add actions to notifications
- Events to get notify of notification clicks, dismiss or actions
2016-02-10 20:38:10 +01:00
Tobias Taschner
abe10b8c00 Fix wxBase build under OS X
Due to recent changes in utils, stdpath and the removal of carbon, building on
OS X was broken by various compiler errors and linker issues.

Closes https://github.com/wxWidgets/wxWidgets/pull/210
2016-02-10 16:12:20 +01:00
Vadim Zeitlin
f8bfab5284 Replace out of date comment before wx/windowid.h inclusion
No real changes, just remove the nonsensical comment from wx/defs.h which
completely lost its meaning since wxWindowID typedef was replaced by a class 8
years ago in cf2810aa39.
2016-02-10 00:06:41 +01:00
Vadim Zeitlin
d50abc2d3e Make wxWS_EX_VALIDATE_RECURSIVELY default (and only) behaviour
In practice, almost everybody using validators also seems to use this style,
so make it the default (this hadn't been done when it was originally
introduced because of compatibility concerns, but now, 15+ years later, it's
probably safe enough to change this).
2016-02-09 23:38:23 +01:00
wxBen
526a627fa8 Allow customizing wxRibbon highlight colours
Add wxRIBBON_ART_BUTTON_BAR_LABEL_XXX settings.

Closes #16784.
2016-02-08 02:28:00 +01:00
Vadim Zeitlin
026659297b Fix path/URL confusion in wxLaunchDefaultBrowser()
Add a helper wxLaunchBrowserParams struct with clearly distinct "url" and
"path" fields and GetPathOrURL() accessor which returns whichever is
appropriate.

This makes the code more clear and ensures that we never pass URLs (but only
file paths) to xdg-open under Unix as it doesn't handle them.

See #17227.
2016-02-07 19:32:18 +01:00
Vadim Zeitlin
53bd62a23a Remove more unused wxOSX/Carbon headers
These should have been removed in 5ba67c67e4 too.
2016-02-07 14:20:45 +01:00
Paul Cornett
fc8d3f6fba Implement wxTextEntryBase::Clear() using Remove() instead of SetValue()
This avoids problems with SetValue() overrides not doing the intended thing
(for example wxComboBox). See #16654
2016-02-06 21:43:43 -08:00
Lauri Nurmi
4281cb4daa Use enums, not typedef enums, in all public headers. 2016-02-07 01:11:25 +02:00
Vadim Zeitlin
57fa59b81c Merge branch 'listctrl-checkboxes-generic' of https://github.com/MaartenBent/wxWidgets
Implement checkboxes support for the generic version of wxListCtrl too so it's
not available under all platforms.
2016-02-06 19:18:58 +01:00
Vadim Zeitlin
7a8684a8bd Add RAII wrapper for GTKDisableEvents/GTKEnableEvents() calls
Ensure GTKEnableEvents() is called automatically on scope exit whenever
GTKDisableEvents() is called.

This fixes a couple of potential bugs where GTKEnableEvents() could be not
called if wxCHECK() condition failed and makes the code shorter and safer.
2016-02-06 19:13:35 +01:00
Vadim Zeitlin
6768695d14 Extract wxGtkTreePath from src/gtk/dataview.cpp
Put this class into its own header so that it could be reused from other
places.

No real changes.
2016-02-06 19:13:35 +01:00
Andreas Falkenhahn
6a01623a80 Add wxListBox::GetTopItem() and GetCountPerPage()
Implement these methods for all the major ports, add them to the widgets
sample and documentation.

Closes #17189.
2016-02-06 19:13:35 +01:00
Maarten Bent
7dd65abaf7 Implemented checking checkboxes. 2016-02-06 17:20:40 +01:00
Maarten Bent
415292c614 Implemented logic. 2016-02-06 17:12:56 +01:00
Paul Cornett
413d7c220c Fix running with GTK+ 2.22 or earlier when built with 2.24
Previous versions define gdk_window_get_visual as gdk_drawable_get_visual
2016-02-05 23:14:48 -08:00
Vadim Zeitlin
3631a2d142 Merge branch listctrl-with-checkboxes
Add support for native checkboxes to wxMSW wxListCtrl.

Closes https://github.com/wxWidgets/wxWidgets/pull/153
2016-02-06 01:20:01 +01:00
Maarten Bent
90386df305 Notify Windows shell about file associations changes
This is documented as being required in the MSDN and, in practice, is
necessary for Windows to update the icon cache and show the new icon.

Closes https://github.com/wxWidgets/wxWidgets/pull/195
2016-02-06 00:56:46 +01:00
Vadim Zeitlin
a2ecb7a320 Don't test for old compilers in C++11 mode in configure
This makes configure faster when C++11 is enabled by avoiding spending time on
compiling unnecessary checks in this case.
2016-02-06 00:16:10 +01:00
Tim Kosse
dc48f595b3 Need to include wx/vector.h, otherwise wxVector is undeclared if configured with --disable-precom-headers --disable-any. 2016-02-05 10:07:09 +01:00
Vadim Zeitlin
cb26668204 Don't destroy the native window in wxNativeWindow itself by default
Leave ownership of the native window to the user code as it may want to reuse
it for some other purpose and provide an explicit Disown() function that can
be called if the user really wants wxWidgets to take ownership of the native
window.

In particular, this avoids problems when using ARC under OS X which resulted
in a double "release" before.
2016-02-04 18:46:47 +01:00
Vadim Zeitlin
536defd91c Get rid of TARGET_CARBON as well
Don't define this symbol in configure and don't test for it.

Also remove a stray reference to wxUSE_OSX_CARBON not removed by the previous
commit.
2016-02-03 18:18:37 +01:00
Tobias Taschner
5ba67c67e4 Remove wxOSX/Carbon support.
Cocoa has been the default toolkit in wxWidgets for a long time. There is really no good reason to use Carbon in 2016 and this removes a lot of unused and unmaintained code.
2016-02-01 13:48:48 +01:00
Vadim Zeitlin
8581f6851e Fix handling of wxGA_PROGRESS in wxGauge under MSW
This was broken by the refactoring during the addition of OS X implementation
of wxAppProgressIndicator in 11a5b83e2c, restore
this functionality by explicitly calling the code initializing the progress
indicator in wxGaugeBase from wxMSW implementation.

Closes #17301.
2016-01-31 20:11:06 +01:00
Artur Wieczorek
1237e932ad Fix setting wxBK_HITTEST_xxx flags in wxNotebook::HitTest
The state represented by TCHT_ONITEM Win API flag is not a superposition
TCHT_ONITEMICON and TCHT_ONITLABEL states but it represents a separate state.
The fact that binary value of TCHT_ONITEM is bitwise-OR operation on
TCHT_ONITEMICON and TCHT_ONITEMLABEL doesn't matter here. The same applies to
wxBK_HITTEST_xxx flags where state represented by wxBK_HITTEST_ONITEM is not a
superposition of wxBK_HITTEST_ONICON and wxBK_HITTEST_ONLABEL.

Add note to wxBookCtrl::HitTest documentation that wxBK_HITTEST_ONICON,
wxBK_HITTEST_ONLABEL, wxBK_HITTEST_ONITEM are mutually exclusive bits.

See https://github.com/wxWidgets/wxWidgets/pull/159
2016-01-31 03:06:33 +01:00
Vadim Zeitlin
a016e6b896 Allow suppressing warnings from wxImage::LoadFile()
Add wxImage::SetLoadFlags() and static SetDefaultLoadFlags() to allow
suppressing the warning messages that can be logged when loading some files,
notably PNG ones with invalid sRGB profiles which, unfortunately, seem to be
rather common and result in annoying warnings about them with libpng 1.6+.

Closes #15331.
2016-01-31 02:22:55 +01:00
Vadim Zeitlin
bc8293a9e5 Update wxMenu::UpdateUI() parameter comment and documentation
The argument to this method should basically just never be used, so while we
still keep it for compatibility (because it doesn't cost anything to do it),
make it clear that it should never be specified in the new code and, also,
that this function is actually only used inside wxWidgets and shouldn't be
normally called from outside of the library at all.
2016-01-30 21:39:09 +01:00
Kinaou Herve
38cd4b4769 Don't make wxAuiFloatingFrame root of a top navigation domain
This allows the accelerators associated with it to propagate to the parent
frame, which is what we want to happen in practice.

Closes #16870.
2016-01-30 18:41:18 +01:00
Zane U. Ji
71dfb3b414 Fix invisible captions in high contrast mode
Don't use black text on dark background.

Closes #16186.
2016-01-30 18:27:10 +01:00
Vadim Zeitlin
5dd5d68e67 Revert "Fix fields initialization in wxCommandEvent copy ctor."
This reverts commit 62763ad541 which seems to
have been completely unnecessary as the fields had been already initialized
and this commit actually broke initialization of the propagation level of the
copied wxCommandEvent objects.

Add a unit test proving that things do work.

Closes #16739.
2016-01-30 05:02:54 +01:00
Vadim Zeitlin
585b49474d Restore sending wxEVT_CONTEXT_MENU for wxTE_RICH controls in wxMSW
Since the changes to use IRichEditOleCallback in wxMSW wxTextCtrl (i.e.
bd650ec3d9 in master), wxEVT_CONTEXT_MENU was
not sent for it any more as the control consumed it after using the callback.

Send the event manually before the default handling takes place to fix this.
2016-01-30 01:03:32 +01:00
Vadim Zeitlin
b4d835090f Merge branch 'bitmap_image_conversion' of https://github.com/a-wi/wxWidgets
Closes #14582.
2016-01-30 00:05:19 +01:00
Vadim Zeitlin
fbe7fc85b2 Suppress harmless warning in a standard header with VC14
imagehlp.h from 8.1 SDK contains an extraneous "typedef" in an enum
declaration which results in several warnings when building, avoid them.
2016-01-29 22:35:17 +01:00
Vadim Zeitlin
0dc57e9e23 Avoid 1px gaps between consecutive underlined words in wxHTML
At least when using standard fonts under MSW, the underlines under the
consecutive words didn't overlap, resulting in ugly gaps between them when
using more than one word as the link text, for example.

Work around this by drawing an extra, slightly offset, underlined space when
the previous cell was drawn underlined.
2016-01-29 17:19:29 +01:00
Vadim Zeitlin
96f5a24f6d Consider g++ ABI up to 1010 to be compatible with 1002
This is not completely true, but the changes in the versions 9 and 10 of g++
ABI don't (seem to?) affect wxWidgets, so allow using later versions of the
compiler for building the code using the libraries created using earlier ones.
2016-01-24 21:18:54 +01:00
mgimenez
78b19e6811 Add wxTextEntryDialog::ForceUpper()
Just forward it to wxTextCtrll::ForceUpper().

Closes #17291.
2016-01-22 14:41:06 +01:00
Artur Wieczorek
a99e58e074 Add method to convert wxDIB to wxImage enforcing alpha channel values (wxMSW).
wxDIB::ConvertToImage called with Convert_AlphaAuto converts wxDIB to wxImage with automatic checking if 32 bpp DIB contains real alpha values (legacy way).
When it is called with Convert_AlphaAlwaysIf32bpp then automatic checking is disabled and 32 bpp DIB is unconditionally converted to ARGB wxImage.
2016-01-21 17:31:48 +01:00
Tobias Taschner
58c7e6d54f Add wxStaticBitmap::SetScaleMode() to control bitmap display size
This allows a bitmap to scale with the size of the wxStaticBitmap control.
Scaling can be controlled to fill the control with or without changing the
bitmaps aspect ratio.
2016-01-20 18:55:14 +01:00
Paul Cornett
03aae8254f remove unused private member variables 2016-01-16 11:04:27 -08:00
Paul Cornett
e5e3f6fffa remove useless wxMax(), an unsigned value is never less than 0 2016-01-16 10:59:02 -08:00
Paul Cornett
56701052eb remove const from pass-by-value parameters 2016-01-16 10:55:01 -08:00
Paul Cornett
c557f66eaf Fix SetWindowStyleFlag() override
Base class SetWindowStyle() is not virtual
2016-01-16 10:40:23 -08:00
Maarten Bent
418a96d44c Support native MSW check-boxes in wxListCtrl. 2016-01-15 20:55:32 +01:00
Jens Göpfert
abd46cb99a Add support for multimedia keys to wxMSW and wxGTK
Add WXK_XXX constants for the standard multimedia keys and generate events
corresponding to them under wxGTK and wxMSW.

Closes https://github.com/wxWidgets/wxWidgets/pull/157
2016-01-08 23:22:24 +01:00
Vadim Zeitlin
777b7537c1 Change WXK_SPECIALx constants to follow the other WXK_XXX values
These constants were defined in the middle of the wxKeyCode enum, value-wise,
which made it difficult to end new elements to the enum as they could clash
with the existing ones if they were simply added at the end.
2016-01-08 23:13:25 +01:00
Pete Stieber
5948602f4f Make wx/dirdlg.h safe to include as first wx header
Include wx/defs.h to get wxUSE_DIRDLG value from it, otherwise it could be
undefined, and hence evaluate to 0 (unfortunately without even a warning with
some compilers), if this header was the first wx header to be included.
2016-01-05 01:29:19 +01:00
htalbot
c0e75f27d1 Allow predefining wxHAS_MODE_T to avoid mode_t conflicts
This symbol can now be predefined to avoid conflicts with mode_t definition in
wx/filefn.h when wxWidgets is used in applications also using another library
which also defines mode_t.

Closes https://github.com/wxWidgets/wxWidgets/pull/165
2016-01-03 17:25:05 +01:00
Stefano D. Mtangoo
28bc1bdac0 Allow specifying the replacement character in wxString::ToAscii()
Don't hardcode "_" as the replacement character but accept the one specified
by the user.

Closes https://github.com/wxWidgets/wxWidgets/pull/116
2016-01-03 00:40:11 +01:00
Vadim Zeitlin
017bbdf516 Define ToDIP() in wxHAVE_DPI_INDEPENDENT_PIXELS case too
Previously any code using this function wouldn't link under GTK+ 3 or OS X
where wxHAVE_DPI_INDEPENDENT_PIXELS are defined.

Closes #17310.
2015-12-31 00:26:04 +01:00
Vadim Zeitlin
52a4fac626 Add proper support for wxUSE_NATIVE_PROGRESSDLG
This symbol was wrongly added to include/wx/msw/setup0.h directly in
075ef6551e, so it didn't work when
cross-compiling from Unix (which doesn't use this file) and would have been
lost after any future modification of include/wx/setup_inc.h where it should
have been added in the first place.

Do this now and also make the check for this symbol in wx/progdlg.h a bit more
readable.
2015-12-30 18:54:35 +01:00
Vadim Zeitlin
ed0b899fe5 Fix the build when using mismatching strict ANSI modes with MinGW
Don't use __STRICT_ANSI__ to determine whether a function is available or not
as its value can be different when building the library and the application,
resulting in mysterious link errors.

Instead use the same approach as in aa30a2f97ade6fe019f2f288917296b009bf4221
and just declare the functions that are available but just not declared in
strict ANSI mode manually.

Closes #15793.
2015-12-28 01:27:49 +01:00
Vadim Zeitlin
2c2b9051d8 Merge branch 'toolbar_change_placing' of https://github.com/a-wi/wxWidgets
Fix several problems related to SetToolPacking() in wxMSW.
2015-12-17 02:09:21 +01:00
JulianSmart
24580198b8 Fixed includes for generic image list 2015-12-14 23:17:01 +00:00
Artur Wieczorek
0a917b86b7 Initialize padding while creating a toolbar.
If padding value (stored in m_toolPacking) has been assigned prior to creating the toolbar (with SetToolPacking) then apply this padding to just created toolbar.
Otherwise initialize this variable with current padding retrieved from the toolbar to let GetToolPacking return proper padding value.
Implemented new method MSWSetPadding() to set padding for native toolbar.
2015-12-14 22:19:32 +01:00
JulianSmart
16d8d6c4a4 wxFileIconsTable::SetSize allows an application to set a different icon size in its initialisation, to adapt directory and file controls for HiDPI. 2015-12-13 20:22:02 +00:00
JulianSmart
0484975fed Added wxImageList::GetSize to retrieve the size originally passed 2015-12-13 19:17:40 +00:00
JulianSmart
b2e35d25c1 Implemented wxToolBar::SetToolPacking on Windows 2015-12-13 17:49:35 +00:00
Vadim Zeitlin
69b66e9e2e Add wxTextEntry::ForceUpper()
Allow automatically converting lower-case letters entered into wxTextCtrl to
upper-case equivalents. Provide generic fallback and implement the method
natively for all the major platforms.

Also update the text sample to show it in action.
2015-12-08 03:02:46 +01:00
Vadim Zeitlin
99d9a81e28 Fix crash when unbinding event handlers from other handlers
Calling Unbind() on another handler from the currently executing handler which
had been bound after (and hence executed before) the handler being unbound
resulted in a crash previously as the iterators used in the loop over all
dynamic event handlers became invalid.

Fix this by storing the dynamic event table entries in a vector instead of a
list (which is also more memory and speed efficient anyhow) and null the
deleted entries instead of removing them to avoid invalidating the iterators
and only really remove them once we finish iterating.

Closes #17229.
2015-12-08 03:02:37 +01:00
Vadim Zeitlin
929b077894 Remove comments and declarations copy-pasted from wxMSW
Mentioning MSW-specific styles in wxOSX or wxQt code doesn't make sense.

Closes https://github.com/wxWidgets/wxWidgets/pull/146
2015-12-07 14:37:34 +01:00
Paul Cornett
cc48c42e17 remove no-longer-needed OnInternalIdle() override 2015-12-06 20:24:59 -08:00
Paul Cornett
9cf8232ba8 check for macro '__sun' rather than 'sun', see #17258 2015-12-03 21:37:32 -08:00
JulianSmart
d0dc318b9d Set the default back to using the native progress dialog 2015-12-01 20:25:10 +00:00
JulianSmart
075ef6551e Made the generic progress dialog the default for wxMSW until we have corrected two kinds of seizure-inducing flicker 2015-11-30 23:07:34 +00:00
JulianSmart
78fe0ac3d8 Fix for breakage with multiple books 2015-11-29 19:29:04 +00:00
Vadim Zeitlin
9990959c99 Get rid of unnecessary wxColour::InitFromComponents() in wxOSX
This method was confusing and dangerous as it didn't actually initialize the
wxColour object because it didn't set its m_cgColour and so attempting to use
wxColour "initialized" using this method resulted in a crash whenever its
GetPixel(), GetCGColor() or CreateCGColor() methods were called.

Just merge this function with InitCGColorRef() which is the only remaining
place where it's used after rewriting wxColour(NSColor) ctor.
2015-11-27 00:19:37 +01:00
Vadim Zeitlin
3fc74d5a0f Fix wxColour(NSColor) ctor and use it in wxOSX code
wxColour ctor from NSColor added in b478f24288
didn't work correctly as it didn't initialize wxColour::m_cgColour and so any
attempts to use the colour created by it resulted in an immediate crash (so
the code added in 16671f229a likely didn't work
neither).

It also assumed that the NSColor given to it was always in the RGBA colorspace
and crashed if it wasn't (so 56ebe6dfac fixed
compilation at the price of making the code crash at run-time). Now explicitly
request the RGBA colorspace and leave the colour uninitialized, which is
better than crashing, if it can't be obtained.

After making this ctor safe to use, there is no reason to reproduce its logic
in wxColourDialog and wxFontDialog, so just use it from there.

Also make the ctor explicit as it's a non-trivial operation which shouldn't be
performed implicitly and document that it doesn't take ownership of NSColor,
unlike the similar ctor from CGColorRef.
2015-11-26 23:57:29 +01:00
Steve Browne
bbb6dbea1b Added wxWindow::ToDIP functionality. 2015-11-24 12:47:31 -05:00
Steve Browne
633d04ca92 Changed several places using hard-coded size values to use FromDIP instead. 2015-11-24 12:21:43 -05:00
Hartwig
474461601f Addition of overrides in diverse headers 2015-11-22 10:16:01 +01:00
Hartwig
308de8b69d Addition of overrides in anybutton.h, collpaneg.h, notebook.h, spinctlg.h, srchctrl.h and radiobox.h 2015-11-22 10:15:41 +01:00
Hartwig
5f7c4fa859 Addition of overrids in scrolbar.h, slider.h and vscroll.h 2015-11-22 10:14:29 +01:00
Hartwig
6802052efb Addition of overrides in colrdlgg.h ad fontdlgg.h 2015-11-22 10:13:27 +01:00
Hartwig
44715066da Addition of overrides in checklst.h and listbox.h 2015-11-22 10:12:58 +01:00
Hartwig
b67c5a9395 Addition of missing overrides in dirdlgg.h and filedlgg.h 2015-11-22 09:54:05 +01:00
Hartwig
c09ff65f7e Addition of missing overrides in statusbr.h and toolbar.h 2015-11-22 09:52:21 +01:00
Hartwig
f659422405 Addition of missing overrides in private.h 2015-11-22 09:50:27 +01:00
Hartwig
ed2d6152ec Addition of missing overrides in textctrl.h 2015-11-22 09:47:31 +01:00
Hartwig
da7c2e67b9 Addition of missing overrides to webkit.h 2015-11-22 09:45:47 +01:00
Hartwig
0b6b645412 Addition of missing overrides to splitter.h 2015-11-22 09:45:35 +01:00
Hartwig
57e10b695d Addition of missing overrides in glcanvas.h 2015-11-22 09:44:15 +01:00
Hartwig
1eb241e97b Addition of missing overrides in toplevel.h 2015-11-22 09:44:01 +01:00
Hartwig
612972a50c Addition of missing overrides to dataview.h 2015-11-22 09:42:01 +01:00
Hartwig
aa13cb8491 Addition of missing overrides to datecctrl.h and datetimectrl.mm 2015-11-22 09:38:20 +01:00
Hartwig
2a6d18547c Addition of missing overrides to frame.h 2015-11-22 09:36:45 +01:00
Hartwig
1da514f1b9 Addition of missing overrides in window.h 2015-11-22 09:34:47 +01:00
Hartwig
74a1ec3ead Addition of missing overrides to apptrait.h 2015-11-22 09:28:33 +01:00
Hartwig
e64489d5be Addition of missing overrides to app.h 2015-11-22 09:27:37 +01:00
Vadim Zeitlin
e58e3f67aa Merge branch 'colour_dialogs_alpha' of https://github.com/a-wi/wxWidgets
Add support for alpha channel to wxColourPicker and wxColourDialog in wxGTK.

Closes #14127.
2015-11-17 22:47:49 +01:00
Troels Knakkergaard
2460410278 Add wxListCtrl::GetAlternateRowColour()
Simple accessor matching the existing setter.

Closes #17250.
2015-11-16 03:10:16 +01:00
Artur Wieczorekl
59f5fe993b Add support for alpha channel in wxColourPicker (wxGTK).
Showing opacity slider is controlled by new flag wxCLRP_SHOW_ALPHA.
2015-11-15 16:38:55 +01:00
JulianSmart
a797c9d956 Make wxBitmap ctors consistent wrt passing scale for conversion from wxImage; HiDPI adaptation for propgrid buffer and wxRTC images 2015-11-15 12:49:25 +00:00
Vadim Zeitlin
ac0505e7d8 Merge branch 'colour_dialogs_alpha_generic' of https://github.com/a-wi/wxWidgets into wip
Add support for alpha channel to wxGenericColourDialog.

See #14127.
2015-11-15 00:56:13 +01:00
Vadim Zeitlin
1f347637a6 Merge wchar_t-surrogates branch
Fix several problems with surrogates in UTF-16-encoded wchar_t strings:
correct bugs in UTF-8 and UTF-32 conversion code and add surrogates support to
wxText{Input,Output}Stream classes.

Closes #17070.
2015-11-15 00:56:07 +01:00
JulianSmart
1675e641e6 Implement freeze/thaw in Do/Undo to considerably speed up commands with a large number of actions 2015-11-14 18:44:45 +00:00
JulianSmart
f48374a949 Added line height to wxRTC to allow faster scrolling if needed 2015-11-14 18:31:39 +00:00
Vadim Zeitlin
823a2337f6 Make wxTextStream classes work with surrogates under MSW
On the platforms using UTF-16 for wchar_t we can't read nor write Unicode data
one wchar_t at a time as a single half of a surrogate character can't be
converted to or from the encoding of the stream.

To fix this, we may need to store the last wchar_t already read from the
stream but not returned yet in wxTextInputStream::NextChar() and store,
without writing it, the wchar_t passed to wxTextOutputStream::PutChar() until
the second half of the surrogate is written.

See #17070.
2015-11-13 19:36:33 +01:00
Vadim Zeitlin
79f62505bb Fix clang warnings about inconsistent missing "override" keyword
Add wxCLANG_WARNING_SUPPRESS() and wxCLANG_WARNING_RESTORE() and use them to
suppress -Winconsistent-missing-override warnings.

Closes https://github.com/wxWidgets/wxWidgets/pull/99
2015-11-08 19:11:53 +01:00
Dimitri Schoolwerth
a1863a397c Fix wxOSX/Carbon build after wxDataViewRenderer changes
Since 361c6357b4 wxDataViewRenderer's
SetAttr and SetEnabled became pure virtual class methods which aren't
implemented for wxOSX/Carbon. Fix by defining the same empty stubs for
these methods as were previously present in the base class.
2015-11-08 18:42:14 +04:00
Dimitri Schoolwerth
ef62616b12 Fix wxOSX/Carbon build after Enable{Max,Min}imizeButton() addition
Define stubs for pure virtual base class methods.

See #17133.
2015-11-08 18:42:12 +04:00
ARATA Mizuki
d399d544f1 Suppress clang warning [-Winconsistent-missing-override] in DECLARE_HELP_PROVISION(). 2015-11-06 16:33:36 +09:00
ARATA Mizuki
450d9ce2b5 Suppress clang warning [-Winconsistent-missing-override] for GetClassInfo() in wxDECLARE_ABSTRACT_CLASS. 2015-11-06 16:33:36 +09:00
ARATA Mizuki
f90205951c Add macros to conditionally suppress clang warnings.
The added macros wxCLANG_WARNING_{SUPPRESS,RESTORE} are similar to
wxGCC_WARNING_{SUPPRESS,RESTORE}, but the `wxCLANG_' version will expand to
compiler pragmas only when the warning name is known to the compiler.

They use clang's __has_warning feature.
2015-11-06 16:33:16 +09:00
Artur Wieczorek
880ad7f6f8 Add alpha channel support to wxGenericColourDialog.
Added opacity slider and custom colours (with alpha) previews (implemented with wxStaticBitmap controls). This feature is controlled by wxColourData::GetChooseAlpha().
2015-11-02 23:19:19 +01:00
Artur Wieczorek
809a07a65d Add opacity control feature to wxColourData.
Added internal flag (with corresponding accessors) which purpose is to enable/disable modifying the opacity of the colours in colour dialogs.
2015-11-02 23:19:16 +01:00
Artur Wieczorek
3dc013920b Fix type of member variable in wxGenericColourDialog
Variable to hold the size should be of type wxSize, not wxPoint.
2015-11-02 23:19:12 +01:00
Artur Wieczorek
7399fb3428 Optimize wxGenericColourDialog
Variable to hold the size of the custom colour box doesn't need to be a member variable since it's used only locally in wxGenericColourDialog::CalculateMeasurements.
2015-11-02 23:19:09 +01:00
Bryan Petty
0b2263c25d Updated links and mailing list addresses. 2015-10-30 20:06:09 -06:00
Vadim Zeitlin
04a784dfd3 Hide wxSlider labels too when it's hidden in wxOSX
Derive wxSlider from wxCompositeWindow to ensure that Show() (and other
methods) affect the slider labels as well.

Closes #2388.
2015-10-25 18:47:29 +01:00
Vadim Zeitlin
ce3dab46c1 Remove unused headers from wx/osx/slider.h
wx/control.h is already included from wx/slider.h so including it from here is
useless and including wx/slider.h is even worse as it's very confusing because
this header itself is already included from wx/slider.h.

No real changes.
2015-10-25 18:36:39 +01:00
Vadim Zeitlin
065c7b34eb Remove unused wx/osx/treectrl.h
This file is not included anywhere and doesn't seem to be used.
2015-10-25 18:33:06 +01:00
Vadim Zeitlin
a5e36d3124 Remove unused png{hand,read}.h files from wxOSX
These files don't seem to be used anywhere.
2015-10-25 18:31:33 +01:00
Vadim Zeitlin
98bd4f1936 Remove unused helpxxxx.{h,cpp} stub files from wxOSX
These files seem to be left overs from a long, long time ago.
2015-10-25 18:29:47 +01:00
Vadim Zeitlin
3f33ecc773 No changes, just remove redundant "inline" from wxOSX headers
There is no need for them in the methods declared in the class declaration
anyhow, so just remove them.

No real changes.
2015-10-25 18:20:32 +01:00
Vadim Zeitlin
e9b379fe2a Fix TAB navigation inside wxStaticBox in wxOSX
Derive wxStaticBox from wxStaticBoxBase for consistency with the other ports
and to make it derive from wxNavigationEnabled<>, which is necessary for TAB
navigation to work.

Closes #3842.
2015-10-25 18:13:59 +01:00
Tim Stahlhut
fb5d1a002c Fixes for wxQt build under Cygwin
Include the missing headers, notable QtGui/QFont from wx/fontutil.h which uses
a QFont object.

Closes #16750.
2015-10-25 18:00:05 +01:00
Vadim Zeitlin
db966da330 Use explicit dllexport attribute for g++ 4.7 and later
The bug that resulted in creating huge DLLs that took inordinate amounts of
memory and time to link with g++ 4.5 has been fixed in 4.7, so don't export
everything when using it, as this results in even smaller DLLs.

The situation with 4.6 is unknown, so leave behaviour with it unchanged.

See 49d2c0adc3
2015-10-25 13:42:23 +01:00
Vadim Zeitlin
9c1bc3c019 Define LVS_EX_DOUBLEBUFFER ourselves if SDK headers don't do it
This should fix compilation with MinGW after the changes of
2a6e411887 which started using this style.

See #17177.
2015-10-25 13:36:25 +01:00
Andreas Falkenhahn
d45ba8ce62 Add wxTE_{RIGHT,CENTER} support for multiline wxTextCtrl in wxOSX
Just use -[NSTextView setAlignment].

Closes #13702.
2015-10-22 00:06:45 +02:00
Vadim Zeitlin
5e29b26d9e Preserve Win32 last error in wxTlsKey::Get()
::TlsGetValue() resets the last error code which means that the previous last
error is lost, but it shouldn't as we might be in the middle of logging it
with wxLogSysError(). So preserve the last error explicitly.

Closes #17209.
2015-10-16 20:20:42 +02:00
John Roberts
b9b9a30bc7 Don't rely on getting PAGE_CHANGED event in wxOSX wxNotebook
The user code may handle this event, meaning that its handler in wxNotebook
itself is never invoked, but this broke actually changing the pages.

Fix this by doing the page change in the code handling the underlying OS X
event directly.

Closes #17197.
2015-10-13 14:34:02 +02:00
Andreas Falkenhahn
9dd48eab61 Fix wxDataViewCtrl compilation when wxUSE_SPINCTRL==0
Just don't define wxDataViewSpinRenderer in this case.
2015-10-11 17:07:15 +02:00