Include wx/msw/uxtheme.h even when wxUSE_UXTHEME == 0 because
wxUxThemeEngine::GetIfActive() and MARGINS struct are still used even then in
anybutton.cpp and menuitem.cpp respectively.
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
For ComCtl32 prior to 6.0 all text labels in wxListCtrl need to be re-assigned when new wxImageList is set in order to position them correctly within the control.
ComCtl32 prior to 6.0 doesn't support images with alpha channel so if we have 32-bit icon with transparency we need to convert it to a wxBitmap and then add this bitmap to wxImageList. If required, bitmap with alpha channel will be converted to the mask in wxImageList::Add.
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.
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
These tests don't seem to be sound, it's possible for one second or more to
pass between the two calls to GetTimes() and it's apparently possible for the
access time on the symlink to not change (due to /tmp being mounted with
"noatime" option perhaps?), resulting in Travis CI build failures.
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.
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<>.
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.
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
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.
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.".
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.
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.
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.
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.
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