Commit Graph

61083 Commits

Author SHA1 Message Date
Vadim Zeitlin
0d7f51098d Rewrite switch on wxTextBufferOpenMode to be exhaustive
Get rid of the default clause to allow the compiler to warn us if ever add new
elements to this enum.

No real changes.
2016-02-13 13:52:13 +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
Vadim Zeitlin
d59c6c5add Remove useless c_str() calls from wxTextFile code
There is no need to call wxString::c_str() just to create another wxString
from it.
2016-02-13 13:44:12 +01:00
Vadim Zeitlin
b08985ac24 Don't use std::auto_ptr<> in the test to avoid warnings
When compiling with g++ or clang in C++11 mode, the use of std::auto_ptr<>
triggers warnings about its deprecation, so replace it with wxScopedPtr<> as
this is simpler than choosing between auto_ptr<> and unique_ptr<>.
2016-02-13 13:36:58 +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
David Vanderson
ccd361c98f Fix strike-through support in wxFont with GDI+
Pass down the strike-through flag to GDI+ (see #9907).

Closes #17372.
2016-02-13 12:49:21 +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
86b1181233 Fix issue with AUI toolbar overflow button always showing up
When resizing a wxAuiToolbar, the overflow button always showed up, and the
SetOverflowVisible() doesn't work as expected. E.g.

	tb->SetOverflowVisible(!tb->GetToolFitsByIndex(tb->GetToolCount()-1));
	tb->Refresh()

This was caused by the logic in OnPaint() ignoring the m_overflowVisible flag
and always drawing (or not drawing) the overflow button.

Add a check for it to fix this.

Closes https://github.com/wxWidgets/wxWidgets/pull/212
2016-02-13 12:22:04 +01:00
Vadim Zeitlin
f9b35855cf Fix amazingly broken wxURI::CharToHex() to only accept hex digits
The valid range for hex digits is A..F, not A..Z.
2016-02-13 04:01:54 +01:00
Artur Wieczorek
5245afa263 Add test cases to test file operations with Unicode file names
File names containing ASCII or non-ASCII (Unicode) characters are used in the
file function tests.
2016-02-13 04:01:28 +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
Artur Wieczorek
0a555f3c83 Fix ToolsVersion value in minimal sample project file (VS 2010+).
Since minimal.vcxproj file is shared by VS 2010-15 solution files, ToolsVersion value should be set to the value supported by all VS versions since 2010 to avoid warning messages like "Project file contains ToolsVersion="14.0", which is not supported by this version of MSBuild.".
2016-02-12 20:08:09 +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
Vadim Zeitlin
4a78ed8bb7 Use fixed width font for the RGB values in the drawing sample
This makes them more readable and aligns all colours vertically.
2016-02-12 03:18:30 +01:00
Vadim Zeitlin
6680dbf906 Fix MSVC14 warning about a shadowed variable in the drawing sample
The warning is harmless but avoid it nevertheless.
2016-02-12 03:18:18 +01:00
Vadim Zeitlin
8c7ada391a Reformat the system colour names in the drawing sample
No real changes, just prettify the code a little.
2016-02-12 03:17:46 +01:00
Vadim Zeitlin
baf67813b0 Fix redefinition errors in wxTaskBarButton code with MSVC
After 4475fe36a5 there were ambiguities between
PROPERTYKEY and PROPVARIANT defined in the anonymous namespace and the global
header for the compilers that did define them, such as MSVC.

Fix this by not (re)defining PROPERTYKEY if it had been already defined and
not defining PROPVARIANT at all as it's used as PropVariantClear() parameter
in the beginning of this file, before it was defined by us, so it must work
for all the compilers already anyhow.
2016-02-12 02:20:44 +01:00
Vadim Zeitlin
4475fe36a5 Don't define interfaces inside anonymous namespace in wxMSW
Some interfaces, notably IAutoCompleteDropDown, but also several other ones in
taskbarbutton.cpp, were defined inside anonymous namespace to avoid clashing
with the interfaces possibly (but not necessarily) declared in the standard
headers.

However gcc 4.9 is smart enough to realize that no classes deriving from a
class in an anonymous namespace can exist and so it devirtualizes the calls to
virtual methods of the objects of this type when compiling with optimizations
enabled. And it does it even if it means replacing the call to a virtual
method with just a call to __cxa_pure_virtual(), i.e. crashing during
run-time.

Prevent it from doing this by moving class declarations outside of the
anonymous namespace and fix the crash when using wxTextEntry::AutoComplete()
in the code compiled with g++ 4.9.
2016-02-11 23:39:44 +01:00
Paul Cornett
1908c41f36 Fix linking with gdk_mir_* functions
gdkmir.h header is missing extern "C" wrapper as of GTK+ 3.18.7
2016-02-10 23:22:58 -08: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
816c58e0af Add documentation for wxNotificationMessage::UseTaskBarIcon (MSW).
The method is not new, but was undocumented previously.
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
Paul Cornett
39716462e6 avoid deprecated gtk_widget_size_request() 2016-02-10 09:35:22 -08:00
Paul Cornett
2bb8367cba Suppress deprecation warnings for resize grip
We need the code for older GTK3 versions
2016-02-10 09:35:15 -08:00
Tobias Taschner
08ad90937b Ignore Xcode build intermediate files and user settings.
Ignore files create by opening and building the xcode project files.
2016-02-10 16:58:44 +01:00
Tobias Taschner
d7540a05c1 Fix Cocoa Xcode build.
Changes in abe10b8c00 broke building via the Xcode project file.
2016-02-10 16:57:32 +01:00
Vadim Zeitlin
730c1ee79b Merge https://github.com/wxWidgets/wxWidgets/pull/208
See #17218.
2016-02-10 16:17:23 +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
06458cb89f Fix handling of strings in wxPrintf() when using recent MinGW
MinGW-w64 (and apparently TDM too) defaults to using ANSI stdio functions
nowadays, which interpret format specifiers such as "%s" and "%c" in wide
string functions in the standard-conforming way, i.e. still expecting the
arguments of "char*" type, and not "wchar_t*" as MSVC and older MinGW did.
2016-02-10 15:22:51 +01:00
Paul Cornett
caf63a14cb avoid deprecated gtk_widget_get_requisition() 2016-02-09 23:48:48 -08:00
Vadim Zeitlin
35a56f5c5f Fix a crash when applying wxTextCtrl style with GTK+3
Add missing NULL terminator to gtk_style_context_get() call (thanks g++ for
the warning).
2016-02-10 00:12:14 +01:00
Vadim Zeitlin
f357fcc679 Remove unnecessary checks in the window ID management code
Remove asserts from the functions which are called only once and for which the
caller already performs exactly the same check before calling them.
2016-02-10 00:10:47 +01:00
Vadim Zeitlin
aece1f81b6 Remove tracing from wxWindowID code
wxWindowID objects can be global and thus be destroyed after the library has
been uninitialized and, worse, when some of the global objects have been
already destroyed.

In particular, using wxLogTrace() in DecIdRefCount() called from the dtor
could result in using the possibly already destroyed wxConvLibc object, so
avoid this by not doing any tracing from there.
2016-02-10 00:06:41 +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
Artur Wieczorek
088d8cbed5 Added missing references to some dynamically loaded Cairo API's. 2016-02-09 20:44:41 +01:00
Paul Cornett
08c176650c Silence deprecation warnings about gtk_font_selection_dialog_*
We use GtkFontChooser when available
2016-02-08 10:44:50 -08:00
Paul Cornett
94163e48c0 avoid gtk_style_context_get_*color(), deprecated in GTK+ 3.16 2016-02-08 10:44:18 -08:00
Tobias Taschner
425ae4ad4f Change highlight text colours in OSX sys settings.
wxSYS_COLOUR_LISTBOXHIGHLIGHTTEXT is usually used on a darker background provided by wxRender::DrawItemSelectionRect so a light color makes sense. While wxSYS_COLOUR_HIGHLIGHTTEXT is used on a lighter blue shade where the dark color makes sense.
2016-02-08 18:31:40 +01:00
Tobias Taschner
d811906b79 Add System Colour screen to drawing sample.
This adds an additional screen to the drawing sample showing all available wxSystemColour values. It makes sense for testing these values but also provides a convenient overview of available colours for the library user.
2016-02-08 14:34:37 +01:00
Vadim Zeitlin
f844b45815 Don't convert alpha channel to mask when loading PNG images
This seemed like a good idea many years ago when plenty of code (inside and
outside of wxWidgets) couldn't deal with the real alpha correctly, but this is
not the case since quite some time any more and producing an image without
alpha channel when loading a PNG image with transparency is more surprising
than useful now, so don't do it any more.

Closes #3019.
2016-02-08 02:28:00 +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
b1cb64f47f Remove old Cocoa port files from the files list
This should have been part of commit e7bf85055c.
2016-02-08 02:28:00 +01:00
Vadim Zeitlin
1ba4d1847b Show wxCollapsibleHeaderCtrl in the collpane sample
If nothing else, this at least verifies that this control can be used in all
ports.

See #17309.
2016-02-08 02:28:00 +01:00
Vadim Zeitlin
f0da6aa0ae Allow using wxCollapsibleHeaderCtrl in wxGTK too
The implementation file for this control somehow wasn't used in wxGTK build,
fix this and, in fact, include it in common sources as there is only a generic
implementation of this control so far.

Closes #17309.
2016-02-08 02:28:00 +01:00
Paul Cornett
2fe6f9ea59 avoid gtk_style_context_get_*color(), deprecated in GTK+ 3.16 2016-02-07 17:25:38 -08:00