Fix vertical positioning of text field in the combo box editor associated with wxPG property under wxMSW.

Vertical position of text field in wxOwnerDrawnComboBox control (instantiated at property selection) doesn't need any special adjustment.

Closes #16556.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77687 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Fix crash in wxMDIParentFrame dtor after taskbar branch merge.

wxFrame::m_taskBarButton needs to be initialized in its Init(), not Create(),
which is not necessarily used by the derived classes such as wxMDIParentFrame,
resulting in a guaranteed crash when deleting an uninitialized pointer later
in wxFrame dtor.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77688 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Fix wxCALL_FOR_EACH() to work with more than 2 arguments with MSVC.

Due to a bug in MSVC handling of __VA_ARGS__ (see
https://connect.microsoft.com/VisualStudio/feedback/details/380090/variadic-macro-replacement)
wxCALL_FOR_EACH() didn't work correctly as long as more than two arguments
were used with it.

Work around the bug by protecting __VA_ARGS__ from being incorrectly passed as
a single token to the macro being called on every step: this was already done
for wxCALL_FOR_EACH itself with wxCALL_FOR_EACH_, but we need to do it for all
the helper macros too.

Also add a test checking that this does, actually, work.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77689 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Avoid creating wxGraphicsContext in the drawing sample unnecessarily.

This is not only wasteful, but creating a Direct2D surface associated with a
wxDC makes it impossible to paint on the DC using GDI functions, so this
completely broke the initial display in the sample.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77690 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Split screen selection in a separate menu in the drawing sample.

No real changes, just make the "File" menu (which was also renamed to
"Drawing" as it has nothing to do with files) less long by splitting off the
screen selection in a separate menu.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77691 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Allow selecting wxGraphicsRenderer to use in the drawing sample.

In particular, allow switching between GDI+ and Direct2D under Windows, which
is very convenient for comparing the rendering results.

This can also be useful when using Cairo.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77692 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Fix memory leak when creating new Direct2D-based wxGraphicsContext.

ID2D1DCRenderTarget was leaked every time a wxD2DContext was created because a
raw pointer was given to wxCOMPtr<> which didn't take its ownership.

Use wxCOMPtr instead of the raw pointer to fix this and also fix more rare but
still possible leak in case of error.

This fixes out of memory errors and crashes in the drawing sample after a few
seconds of constant window resizing/repainting.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77693 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Return to using GDI+ by default in wxGraphicsContext under MSW.

Unfortunately Direct2D-based wxGraphicsRenderer is not ready for use yet as it
doesn't draw lines with width 0, which are commonly used.

The code using it in GetDefaultRenderer() will need to be restored when this
bug is fixed.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77694 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Fixes to wxFont strike-through support in wxOSX.

Don't create strike-through fonts by default.

Also add support for strike-through in wxCarbon.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77695 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use special code to identify custom colour in wxPG.

There is already defined a special code (wxPG_COLOUR_CUSTOM) to identify custom colour in wxColourProperty and wxSystemColourProperty but in practice item representing this colour is identified either by position (it is assumed it as always last item) or by fixed text label. This inconsistency makes the code unclear and can lead to problems (see workaround r76627).
Now, only wxPG_COLOUR_CUSTOM code is used to identify custom colour and hence "custom colour" item doesn't need to be the last item in the collection and doesn't need to have a fixed text label (like "Custom").


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77696 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
fixing memory leak

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77697 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Blind fix to wxiOS build after strike-through fixes.

This should correct build breakage caused by r77695.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77700 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Request hardware accelerated GL under OS X only if it's available.

Otherwise wxGLCanvas creation just fails completely when it isn't, e.g. when
running inside a VM.

Closes #16555.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77701 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Update progress immediately in the taskbar button sample.

Handle all scroll events instead of just wxEVT_SCROLL_CHANGED which was
probably done accidentally.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77702 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't crash under XP in the taskbar button sample.

Refuse to run if the taskbar button API is not available.

This wouldn't make much sense anyhow and is the simplest thing to do.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77703 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Revert "Avoid generating wxEVT_MENU_OPEN and CLOSE for disabled menus in wxMSW."

The check for top level menus being disabled added in r77657 is broken as it's
used, with the expectedly bad consequences, for non top level menus as well,
as can be seen by opening any submenu, so revert it.

See #2168.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77704 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use factory function for wxTaskBarButton creation.

This allows to encapsulate checking for errors, which should be handled when
using this class as task bar buttons API is not available under Windows XP.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77705 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Make wxAppProgressIndicator actually usable.

First of all, do define it under non-MSW platforms.

Second, don't crash in it when running under XP where wxTaskBarButton is not
available.

Also add IsAvailable() method to check for its availability explicitly and add
a demonstration of this class to the dialogs sample.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77706 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Always include wxGA_PROGRESS in wxGauge styles enumeration.

It can still be used even if it's not available under the current platform.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77707 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Portuguese translations update from @mansil.

Closes PR #16.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77708 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775