From 9a9e93da833b21386fee691cd81e71a4e981aae1 Mon Sep 17 00:00:00 2001 From: Jonathan Li Date: Mon, 29 Jun 2015 10:25:51 +0100 Subject: [PATCH] wxWidgets3.0: upgrade from 3.0.1 to 3.0.2 --- .../build/msw/wx_vc11_adv.vcxproj | 76 ++---- .../build/msw/wx_vc11_base.vcxproj | 76 ++---- .../build/msw/wx_vc11_core.vcxproj | 76 ++---- .../build/msw/wx_vc11_custom_build.vcxproj | 237 ++++++++++++++++++ .../msw/wx_vc11_custom_build.vcxproj.filters | 19 ++ .../build/msw/wx_vc12_adv.vcxproj | 76 ++---- .../build/msw/wx_vc12_base.vcxproj | 76 ++---- .../build/msw/wx_vc12_core.vcxproj | 76 ++---- .../build/msw/wx_vc12_custom_build.vcxproj | 237 ++++++++++++++++++ .../msw/wx_vc12_custom_build.vcxproj.filters | 19 ++ 3rdparty/wxwidgets3.0/include/wx/app.h | 2 +- 3rdparty/wxwidgets3.0/include/wx/arrstr.h | 5 +- 3rdparty/wxwidgets3.0/include/wx/bmpcbox.h | 1 + 3rdparty/wxwidgets3.0/include/wx/build.h | 7 +- 3rdparty/wxwidgets3.0/include/wx/compiler.h | 32 +-- 3rdparty/wxwidgets3.0/include/wx/defs.h | 2 +- 3rdparty/wxwidgets3.0/include/wx/event.h | 53 ---- 3rdparty/wxwidgets3.0/include/wx/filefn.h | 12 +- .../include/wx/generic/listctrl.h | 6 + .../include/wx/generic/private/listctrl.h | 3 + .../include/wx/generic/richmsgdlgg.h | 4 +- .../include/wx/generic/srchctlg.h | 3 + 3rdparty/wxwidgets3.0/include/wx/language.h | 2 +- 3rdparty/wxwidgets3.0/include/wx/msw/bitmap.h | 4 + .../wxwidgets3.0/include/wx/msw/gccpriv.h | 22 ++ 3rdparty/wxwidgets3.0/include/wx/msw/menu.h | 5 + .../wxwidgets3.0/include/wx/msw/menuitem.h | 5 + .../include/wx/msw/ole/oleutils.h | 27 ++ .../wxwidgets3.0/include/wx/msw/richmsgdlg.h | 4 +- .../wxwidgets3.0/include/wx/msw/textctrl.h | 7 + 3rdparty/wxwidgets3.0/include/wx/msw/window.h | 7 + .../include/wx/private/pipestream.h | 2 +- 3rdparty/wxwidgets3.0/include/wx/richmsgdlg.h | 4 +- 3rdparty/wxwidgets3.0/include/wx/simplebook.h | 10 + 3rdparty/wxwidgets3.0/include/wx/version.h | 4 +- 3rdparty/wxwidgets3.0/src/common/arrstr.cpp | 29 ++- 3rdparty/wxwidgets3.0/src/common/cairo.cpp | 4 + 3rdparty/wxwidgets3.0/src/common/cmdline.cpp | 12 +- 3rdparty/wxwidgets3.0/src/common/datavcmn.cpp | 8 +- 3rdparty/wxwidgets3.0/src/common/datetime.cpp | 17 +- .../wxwidgets3.0/src/common/datetimefmt.cpp | 69 ++++- 3rdparty/wxwidgets3.0/src/common/dcbase.cpp | 2 - 3rdparty/wxwidgets3.0/src/common/dcgraph.cpp | 107 +++++++- 3rdparty/wxwidgets3.0/src/common/event.cpp | 24 +- 3rdparty/wxwidgets3.0/src/common/ffile.cpp | 26 +- 3rdparty/wxwidgets3.0/src/common/file.cpp | 23 +- 3rdparty/wxwidgets3.0/src/common/filename.cpp | 13 +- .../wxwidgets3.0/src/common/fswatchercmn.cpp | 4 +- 3rdparty/wxwidgets3.0/src/common/ftp.cpp | 8 + 3rdparty/wxwidgets3.0/src/common/imaggif.cpp | 5 +- .../wxwidgets3.0/src/common/languageinfo.cpp | 8 +- 3rdparty/wxwidgets3.0/src/common/sckaddr.cpp | 2 +- .../wxwidgets3.0/src/common/stopwatch.cpp | 31 ++- 3rdparty/wxwidgets3.0/src/common/string.cpp | 38 +-- .../wxwidgets3.0/src/common/translation.cpp | 13 + .../wxwidgets3.0/src/generic/animateg.cpp | 2 +- .../wxwidgets3.0/src/generic/datavgen.cpp | 7 + .../wxwidgets3.0/src/generic/graphicc.cpp | 12 + 3rdparty/wxwidgets3.0/src/generic/grid.cpp | 20 +- .../wxwidgets3.0/src/generic/listctrl.cpp | 26 ++ .../wxwidgets3.0/src/generic/preferencesg.cpp | 5 + .../wxwidgets3.0/src/generic/srchctlg.cpp | 72 +++--- .../wxwidgets3.0/src/generic/treectlg.cpp | 70 +++--- 3rdparty/wxwidgets3.0/src/msw/anybutton.cpp | 12 +- 3rdparty/wxwidgets3.0/src/msw/bitmap.cpp | 129 ++++++---- 3rdparty/wxwidgets3.0/src/msw/bmpcbox.cpp | 11 +- 3rdparty/wxwidgets3.0/src/msw/calctrl.cpp | 2 +- 3rdparty/wxwidgets3.0/src/msw/control.cpp | 26 +- 3rdparty/wxwidgets3.0/src/msw/dc.cpp | 68 ++++- 3rdparty/wxwidgets3.0/src/msw/dirdlg.cpp | 25 +- 3rdparty/wxwidgets3.0/src/msw/font.cpp | 4 +- 3rdparty/wxwidgets3.0/src/msw/frame.cpp | 7 + 3rdparty/wxwidgets3.0/src/msw/graphics.cpp | 32 ++- 3rdparty/wxwidgets3.0/src/msw/imaglist.cpp | 60 +++-- 3rdparty/wxwidgets3.0/src/msw/menu.cpp | 2 +- 3rdparty/wxwidgets3.0/src/msw/menuitem.cpp | 51 +++- 3rdparty/wxwidgets3.0/src/msw/printdlg.cpp | 7 + 3rdparty/wxwidgets3.0/src/msw/statbox.cpp | 74 +++--- 3rdparty/wxwidgets3.0/src/msw/textctrl.cpp | 177 ++++++++++--- 3rdparty/wxwidgets3.0/src/msw/treectrl.cpp | 8 +- 3rdparty/wxwidgets3.0/src/msw/utils.cpp | 7 + 3rdparty/wxwidgets3.0/src/msw/webview_ie.cpp | 4 +- 3rdparty/wxwidgets3.0/src/msw/window.cpp | 148 ++++++----- 83 files changed, 1824 insertions(+), 888 deletions(-) create mode 100644 3rdparty/wxwidgets3.0/build/msw/wx_vc11_custom_build.vcxproj create mode 100644 3rdparty/wxwidgets3.0/build/msw/wx_vc11_custom_build.vcxproj.filters create mode 100644 3rdparty/wxwidgets3.0/build/msw/wx_vc12_custom_build.vcxproj create mode 100644 3rdparty/wxwidgets3.0/build/msw/wx_vc12_custom_build.vcxproj.filters diff --git a/3rdparty/wxwidgets3.0/build/msw/wx_vc11_adv.vcxproj b/3rdparty/wxwidgets3.0/build/msw/wx_vc11_adv.vcxproj index 458f2ff8aa..a7868ab67b 100644 --- a/3rdparty/wxwidgets3.0/build/msw/wx_vc11_adv.vcxproj +++ b/3rdparty/wxwidgets3.0/build/msw/wx_vc11_adv.vcxproj @@ -284,7 +284,7 @@ $(OutDir)$(TargetName).pdb Level4 true - None + ProgramDatabase AnySuitable true Speed @@ -450,7 +450,7 @@ $(OutDir)$(TargetName).pdb Level4 true - None + ProgramDatabase AnySuitable true Speed @@ -546,30 +546,14 @@ - Creating $(OutDir)$(wxIncSubDir)\wx\setup.h - Creating $(OutDir)$(wxIncSubDir)\wx\setup.h - copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h - copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h - $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) - Creating $(OutDir)$(wxIncSubDir)\wx\setup.h - Creating $(OutDir)$(wxIncSubDir)\wx\setup.h - copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h - copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h - $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) - Creating $(OutDir)$(wxIncSubDir)\wx\setup.h - Creating $(OutDir)$(wxIncSubDir)\wx\setup.h - copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h - copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h - $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) - Creating $(OutDir)$(wxIncSubDir)\wx\setup.h - Creating $(OutDir)$(wxIncSubDir)\wx\setup.h - copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h - copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h - $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + true + true + true + true + true + true + true + true @@ -577,38 +561,14 @@ - Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h - Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h - cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" - cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" - $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) - $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) - Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h - Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h - cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" - cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" - $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) - $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) - Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h - Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h - cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" - cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" - $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) - $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) - Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h - Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h - cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" - cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" - $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) - $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + true + true + true + true + true + true + true + true diff --git a/3rdparty/wxwidgets3.0/build/msw/wx_vc11_base.vcxproj b/3rdparty/wxwidgets3.0/build/msw/wx_vc11_base.vcxproj index e7ec970349..0f1cc8c48e 100644 --- a/3rdparty/wxwidgets3.0/build/msw/wx_vc11_base.vcxproj +++ b/3rdparty/wxwidgets3.0/build/msw/wx_vc11_base.vcxproj @@ -284,7 +284,7 @@ $(OutDir)$(TargetName).pdb Level4 true - None + ProgramDatabase AnySuitable true Speed @@ -450,7 +450,7 @@ $(OutDir)$(TargetName).pdb Level4 true - None + ProgramDatabase AnySuitable true Speed @@ -627,30 +627,14 @@ - Creating $(OutDir)$(wxIncSubDir)\wx\setup.h - Creating $(OutDir)$(wxIncSubDir)\wx\setup.h - copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h - copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h - $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) - Creating $(OutDir)$(wxIncSubDir)\wx\setup.h - Creating $(OutDir)$(wxIncSubDir)\wx\setup.h - copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h - copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h - $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) - Creating $(OutDir)$(wxIncSubDir)\wx\setup.h - Creating $(OutDir)$(wxIncSubDir)\wx\setup.h - copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h - copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h - $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) - Creating $(OutDir)$(wxIncSubDir)\wx\setup.h - Creating $(OutDir)$(wxIncSubDir)\wx\setup.h - copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h - copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h - $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + true + true + true + true + true + true + true + true @@ -662,38 +646,14 @@ - Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h - Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h - cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" - cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" - $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) - $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) - Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h - Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h - cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" - cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" - $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) - $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) - Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h - Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h - cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" - cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" - $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) - $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) - Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h - Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h - cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" - cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" - $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) - $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + true + true + true + true + true + true + true + true diff --git a/3rdparty/wxwidgets3.0/build/msw/wx_vc11_core.vcxproj b/3rdparty/wxwidgets3.0/build/msw/wx_vc11_core.vcxproj index 71f49e0f27..0f91d119dd 100644 --- a/3rdparty/wxwidgets3.0/build/msw/wx_vc11_core.vcxproj +++ b/3rdparty/wxwidgets3.0/build/msw/wx_vc11_core.vcxproj @@ -284,7 +284,7 @@ $(OutDir)$(TargetName).pdb Level4 true - None + ProgramDatabase AnySuitable true Speed @@ -450,7 +450,7 @@ $(OutDir)$(TargetName).pdb Level4 true - None + ProgramDatabase AnySuitable true Speed @@ -1123,30 +1123,14 @@ - Creating $(OutDir)$(wxIncSubDir)\wx\setup.h - Creating $(OutDir)$(wxIncSubDir)\wx\setup.h - copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h - copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h - $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) - Creating $(OutDir)$(wxIncSubDir)\wx\setup.h - Creating $(OutDir)$(wxIncSubDir)\wx\setup.h - copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h - copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h - $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) - Creating $(OutDir)$(wxIncSubDir)\wx\setup.h - Creating $(OutDir)$(wxIncSubDir)\wx\setup.h - copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h - copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h - $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) - Creating $(OutDir)$(wxIncSubDir)\wx\setup.h - Creating $(OutDir)$(wxIncSubDir)\wx\setup.h - copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h - copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h - $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + true + true + true + true + true + true + true + true @@ -1200,38 +1184,14 @@ - Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h - Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h - cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" - cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" - $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) - $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) - Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h - Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h - cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" - cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" - $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) - $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) - Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h - Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h - cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" - cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" - $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) - $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) - Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h - Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h - cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" - cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" - $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) - $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + true + true + true + true + true + true + true + true diff --git a/3rdparty/wxwidgets3.0/build/msw/wx_vc11_custom_build.vcxproj b/3rdparty/wxwidgets3.0/build/msw/wx_vc11_custom_build.vcxproj new file mode 100644 index 0000000000..2c977b8ebd --- /dev/null +++ b/3rdparty/wxwidgets3.0/build/msw/wx_vc11_custom_build.vcxproj @@ -0,0 +1,237 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + _custom_build + {01F4CE10-2CFB-41A8-B41F-E54337868A1D} + + + + DynamicLibrary + false + Unicode + v110 + + + DynamicLibrary + false + Unicode + v110 + + + DynamicLibrary + false + Unicode + v110 + + + DynamicLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + Utility + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + true + true + true + true + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + false + false + true + true + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + + + + + + + + + + + + + + + + + + + + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + + + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + + + + + + diff --git a/3rdparty/wxwidgets3.0/build/msw/wx_vc11_custom_build.vcxproj.filters b/3rdparty/wxwidgets3.0/build/msw/wx_vc11_custom_build.vcxproj.filters new file mode 100644 index 0000000000..03d7e9b387 --- /dev/null +++ b/3rdparty/wxwidgets3.0/build/msw/wx_vc11_custom_build.vcxproj.filters @@ -0,0 +1,19 @@ + + + + + {63537534-1833-5C1F-8DBD-359A84F294C8} + + + {5AFFF20E-29F9-512B-B80A-7DC45976CDAC} + + + + + Setup Headers + + + MSW Headers + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0/build/msw/wx_vc12_adv.vcxproj b/3rdparty/wxwidgets3.0/build/msw/wx_vc12_adv.vcxproj index 6b74f9b766..b3d1a20461 100644 --- a/3rdparty/wxwidgets3.0/build/msw/wx_vc12_adv.vcxproj +++ b/3rdparty/wxwidgets3.0/build/msw/wx_vc12_adv.vcxproj @@ -284,7 +284,7 @@ $(OutDir)$(TargetName).pdb Level4 true - None + ProgramDatabase AnySuitable true Speed @@ -450,7 +450,7 @@ $(OutDir)$(TargetName).pdb Level4 true - None + ProgramDatabase AnySuitable true Speed @@ -546,30 +546,14 @@ - Creating $(OutDir)$(wxIncSubDir)\wx\setup.h - Creating $(OutDir)$(wxIncSubDir)\wx\setup.h - copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h - copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h - $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) - Creating $(OutDir)$(wxIncSubDir)\wx\setup.h - Creating $(OutDir)$(wxIncSubDir)\wx\setup.h - copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h - copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h - $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) - Creating $(OutDir)$(wxIncSubDir)\wx\setup.h - Creating $(OutDir)$(wxIncSubDir)\wx\setup.h - copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h - copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h - $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) - Creating $(OutDir)$(wxIncSubDir)\wx\setup.h - Creating $(OutDir)$(wxIncSubDir)\wx\setup.h - copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h - copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h - $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + true + true + true + true + true + true + true + true @@ -577,38 +561,14 @@ - Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h - Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h - cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" - cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" - $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) - $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) - Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h - Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h - cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" - cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" - $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) - $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) - Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h - Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h - cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" - cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" - $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) - $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) - Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h - Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h - cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" - cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" - $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) - $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + true + true + true + true + true + true + true + true diff --git a/3rdparty/wxwidgets3.0/build/msw/wx_vc12_base.vcxproj b/3rdparty/wxwidgets3.0/build/msw/wx_vc12_base.vcxproj index 356fac496e..de36fa7602 100644 --- a/3rdparty/wxwidgets3.0/build/msw/wx_vc12_base.vcxproj +++ b/3rdparty/wxwidgets3.0/build/msw/wx_vc12_base.vcxproj @@ -284,7 +284,7 @@ $(OutDir)$(TargetName).pdb Level4 true - None + ProgramDatabase AnySuitable true Speed @@ -450,7 +450,7 @@ $(OutDir)$(TargetName).pdb Level4 true - None + ProgramDatabase AnySuitable true Speed @@ -627,30 +627,14 @@ - Creating $(OutDir)$(wxIncSubDir)\wx\setup.h - Creating $(OutDir)$(wxIncSubDir)\wx\setup.h - copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h - copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h - $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) - Creating $(OutDir)$(wxIncSubDir)\wx\setup.h - Creating $(OutDir)$(wxIncSubDir)\wx\setup.h - copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h - copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h - $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) - Creating $(OutDir)$(wxIncSubDir)\wx\setup.h - Creating $(OutDir)$(wxIncSubDir)\wx\setup.h - copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h - copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h - $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) - Creating $(OutDir)$(wxIncSubDir)\wx\setup.h - Creating $(OutDir)$(wxIncSubDir)\wx\setup.h - copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h - copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h - $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + true + true + true + true + true + true + true + true @@ -662,38 +646,14 @@ - Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h - Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h - cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" - cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" - $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) - $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) - Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h - Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h - cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" - cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" - $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) - $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) - Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h - Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h - cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" - cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" - $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) - $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) - Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h - Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h - cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" - cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" - $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) - $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + true + true + true + true + true + true + true + true diff --git a/3rdparty/wxwidgets3.0/build/msw/wx_vc12_core.vcxproj b/3rdparty/wxwidgets3.0/build/msw/wx_vc12_core.vcxproj index d513776bf5..27455d464e 100644 --- a/3rdparty/wxwidgets3.0/build/msw/wx_vc12_core.vcxproj +++ b/3rdparty/wxwidgets3.0/build/msw/wx_vc12_core.vcxproj @@ -284,7 +284,7 @@ $(OutDir)$(TargetName).pdb Level4 true - None + ProgramDatabase AnySuitable true Speed @@ -450,7 +450,7 @@ $(OutDir)$(TargetName).pdb Level4 true - None + ProgramDatabase AnySuitable true Speed @@ -1123,30 +1123,14 @@ - Creating $(OutDir)$(wxIncSubDir)\wx\setup.h - Creating $(OutDir)$(wxIncSubDir)\wx\setup.h - copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h - copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h - $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) - Creating $(OutDir)$(wxIncSubDir)\wx\setup.h - Creating $(OutDir)$(wxIncSubDir)\wx\setup.h - copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h - copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h - $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) - Creating $(OutDir)$(wxIncSubDir)\wx\setup.h - Creating $(OutDir)$(wxIncSubDir)\wx\setup.h - copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h - copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h - $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) - Creating $(OutDir)$(wxIncSubDir)\wx\setup.h - Creating $(OutDir)$(wxIncSubDir)\wx\setup.h - copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h - copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h - $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + true + true + true + true + true + true + true + true @@ -1200,38 +1184,14 @@ - Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h - Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h - cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" - cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" - $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) - $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) - Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h - Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h - cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" - cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" - $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) - $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) - Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h - Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h - cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" - cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" - $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) - $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) - Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h - Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h - cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" - cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" - $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) - $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) - $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + true + true + true + true + true + true + true + true diff --git a/3rdparty/wxwidgets3.0/build/msw/wx_vc12_custom_build.vcxproj b/3rdparty/wxwidgets3.0/build/msw/wx_vc12_custom_build.vcxproj new file mode 100644 index 0000000000..24a81f47b8 --- /dev/null +++ b/3rdparty/wxwidgets3.0/build/msw/wx_vc12_custom_build.vcxproj @@ -0,0 +1,237 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + _custom_build + {01F4CE10-2CFB-41A8-B41F-E54337868A1D} + + + + DynamicLibrary + false + Unicode + v120 + + + DynamicLibrary + false + Unicode + v120 + + + DynamicLibrary + false + Unicode + v120 + + + DynamicLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + Utility + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + true + true + true + true + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + false + false + true + true + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + + + + + + + + + + + + + + + + + + + + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + + + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + + + + + + diff --git a/3rdparty/wxwidgets3.0/build/msw/wx_vc12_custom_build.vcxproj.filters b/3rdparty/wxwidgets3.0/build/msw/wx_vc12_custom_build.vcxproj.filters new file mode 100644 index 0000000000..03d7e9b387 --- /dev/null +++ b/3rdparty/wxwidgets3.0/build/msw/wx_vc12_custom_build.vcxproj.filters @@ -0,0 +1,19 @@ + + + + + {63537534-1833-5C1F-8DBD-359A84F294C8} + + + {5AFFF20E-29F9-512B-B80A-7DC45976CDAC} + + + + + Setup Headers + + + MSW Headers + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0/include/wx/app.h b/3rdparty/wxwidgets3.0/include/wx/app.h index 60e02b35cc..9a73469570 100644 --- a/3rdparty/wxwidgets3.0/include/wx/app.h +++ b/3rdparty/wxwidgets3.0/include/wx/app.h @@ -516,7 +516,7 @@ protected: wxDECLARE_NO_COPY_CLASS(wxAppConsoleBase); }; -#if defined(__UNIX__) && !defined(__WXMSW__) +#if defined(__UNIX__) && !defined(__WINDOWS__) #include "wx/unix/app.h" #else // this has to be a class and not a typedef as we forward declare it diff --git a/3rdparty/wxwidgets3.0/include/wx/arrstr.h b/3rdparty/wxwidgets3.0/include/wx/arrstr.h index db67c8ef08..f0351c1641 100644 --- a/3rdparty/wxwidgets3.0/include/wx/arrstr.h +++ b/3rdparty/wxwidgets3.0/include/wx/arrstr.h @@ -364,7 +364,10 @@ protected: void Copy(const wxArrayString& src); // copies the contents of another array private: - void Grow(size_t nIncrement = 0); // makes array bigger if needed + // Allocate the new buffer big enough to hold m_nCount + nIncrement items and + // return the pointer to the old buffer, which must be deleted by the caller + // (if the old buffer is big enough, just return NULL). + wxString *Grow(size_t nIncrement); size_t m_nSize, // current size of the array m_nCount; // current number of elements diff --git a/3rdparty/wxwidgets3.0/include/wx/bmpcbox.h b/3rdparty/wxwidgets3.0/include/wx/bmpcbox.h index dd69525741..a5b9beeedb 100644 --- a/3rdparty/wxwidgets3.0/include/wx/bmpcbox.h +++ b/3rdparty/wxwidgets3.0/include/wx/bmpcbox.h @@ -17,6 +17,7 @@ #if wxUSE_BITMAPCOMBOBOX #include "wx/bitmap.h" +#include "wx/dynarray.h" class WXDLLIMPEXP_FWD_CORE wxWindow; class WXDLLIMPEXP_FWD_CORE wxItemContainer; diff --git a/3rdparty/wxwidgets3.0/include/wx/build.h b/3rdparty/wxwidgets3.0/include/wx/build.h index 0959a29782..5be137b133 100644 --- a/3rdparty/wxwidgets3.0/include/wx/build.h +++ b/3rdparty/wxwidgets3.0/include/wx/build.h @@ -54,13 +54,16 @@ #if defined(__GXX_ABI_VERSION) #define __WX_BO_COMPILER \ ",compiler with C++ ABI " __WX_BO_STRINGIZE(__GXX_ABI_VERSION) -#elif defined(__INTEL_COMPILER) - #define __WX_BO_COMPILER ",Intel C++" #elif defined(__GNUG__) #define __WX_BO_COMPILER ",GCC " \ __WX_BO_STRINGIZE(__GNUC__) "." __WX_BO_STRINGIZE(__GNUC_MINOR__) #elif defined(__VISUALC__) #define __WX_BO_COMPILER ",Visual C++ " __WX_BO_STRINGIZE(_MSC_VER) +#elif defined(__INTEL_COMPILER) + // Notice that this must come after MSVC check as ICC under Windows is + // ABI-compatible with the corresponding version of the MSVC and we want to + // allow using it compile the application code using MSVC-built DLLs. + #define __WX_BO_COMPILER ",Intel C++" #elif defined(__BORLANDC__) #define __WX_BO_COMPILER ",Borland C++" #elif defined(__DIGITALMARS__) diff --git a/3rdparty/wxwidgets3.0/include/wx/compiler.h b/3rdparty/wxwidgets3.0/include/wx/compiler.h index de67477f84..db8a7d36e0 100644 --- a/3rdparty/wxwidgets3.0/include/wx/compiler.h +++ b/3rdparty/wxwidgets3.0/include/wx/compiler.h @@ -135,36 +135,8 @@ #endif /* - This macro can be used to check that the version of mingw32 CRT is at least - maj.min + wxCHECK_MINGW32_VERSION() is defined in wx/msw/gccpriv.h which is included + later, see comments there. */ -/* - Define Mingw identification symbols, wxCHECK_MINGW32_VERSION() is defined in - wx/msw/gccpriv.h which is included later, see comments there. - */ -#ifdef __MINGW32__ -/* - MinGW-w64 project provides compilers for both Win32 and Win64 but only - defines the same __MINGW32__ symbol for the former as MinGW32 toolchain - which is quite different (notably doesn't provide many SDK headers that - MinGW-w64 does include). So we define a separate symbol which, unlike the - predefined __MINGW64__, can be used to detect this toolchain in both 32 and - 64 bit builds. - - And define __MINGW32_TOOLCHAIN__ for consistency and also because it's - convenient as we often want to have some workarounds only for the (old) - MinGW32 but not (newer) MinGW-w64, which still predefines __MINGW32__. - */ -# ifdef __MINGW64_VERSION_MAJOR -# ifndef __MINGW64_TOOLCHAIN__ -# define __MINGW64_TOOLCHAIN__ -# endif -# else -# ifndef __MINGW32_TOOLCHAIN__ -# define __MINGW32_TOOLCHAIN__ -# endif -# endif -#endif - #endif // _WX_COMPILER_H_ diff --git a/3rdparty/wxwidgets3.0/include/wx/defs.h b/3rdparty/wxwidgets3.0/include/wx/defs.h index 6dc716a696..397ddd7057 100644 --- a/3rdparty/wxwidgets3.0/include/wx/defs.h +++ b/3rdparty/wxwidgets3.0/include/wx/defs.h @@ -216,7 +216,7 @@ /* Prevents conflicts between sys/types.h and winsock.h with Cygwin, */ /* when using Windows sockets. */ -#if defined(__CYGWIN__) && defined(__WXMSW__) +#if defined(__CYGWIN__) && defined(__WINDOWS__) #define __USE_W32_SOCKETS #endif diff --git a/3rdparty/wxwidgets3.0/include/wx/event.h b/3rdparty/wxwidgets3.0/include/wx/event.h index 5ec79071ca..61ec19c5b3 100644 --- a/3rdparty/wxwidgets3.0/include/wx/event.h +++ b/3rdparty/wxwidgets3.0/include/wx/event.h @@ -4498,57 +4498,4 @@ WXDLLIMPEXP_CORE wxWindow* wxFindFocusDescendant(wxWindow* ancestor); #define wxEVT_COMMAND_TEXT_PASTE wxEVT_TEXT_PASTE #define wxEVT_COMMAND_TEXT_UPDATED wxEVT_TEXT -#if defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ == 9 -#if !defined NO_WX3_GCC49_VIRTUAL_HACK && !defined WXBUILDING -// Ugly work-around for GCC 4.9 bug: https://bugs.debian.org/752733 -#define WX3_GCC49_VIRTUAL_HACK(C) wxEvent* (C::*debian_wx3_gcc49_pr61214_##C##_hack)() const __attribute__((unused)) = &C::Clone - -namespace { - -WX3_GCC49_VIRTUAL_HACK(wxIdleEvent); -WX3_GCC49_VIRTUAL_HACK(wxThreadEvent); - -#if wxUSE_GUI -WX3_GCC49_VIRTUAL_HACK(wxActivateEvent); -WX3_GCC49_VIRTUAL_HACK(wxChildFocusEvent); -WX3_GCC49_VIRTUAL_HACK(wxClipboardTextEvent); -WX3_GCC49_VIRTUAL_HACK(wxCloseEvent); -WX3_GCC49_VIRTUAL_HACK(wxCommandEvent); -WX3_GCC49_VIRTUAL_HACK(wxContextMenuEvent); -WX3_GCC49_VIRTUAL_HACK(wxDisplayChangedEvent); -WX3_GCC49_VIRTUAL_HACK(wxDropFilesEvent); -WX3_GCC49_VIRTUAL_HACK(wxEraseEvent); -WX3_GCC49_VIRTUAL_HACK(wxFocusEvent); -WX3_GCC49_VIRTUAL_HACK(wxHelpEvent); -WX3_GCC49_VIRTUAL_HACK(wxIconizeEvent); -WX3_GCC49_VIRTUAL_HACK(wxInitDialogEvent); -WX3_GCC49_VIRTUAL_HACK(wxJoystickEvent); -WX3_GCC49_VIRTUAL_HACK(wxKeyEvent); -WX3_GCC49_VIRTUAL_HACK(wxMaximizeEvent); -WX3_GCC49_VIRTUAL_HACK(wxMenuEvent); -WX3_GCC49_VIRTUAL_HACK(wxMouseCaptureChangedEvent); -WX3_GCC49_VIRTUAL_HACK(wxMouseCaptureLostEvent); -WX3_GCC49_VIRTUAL_HACK(wxMouseEvent); -WX3_GCC49_VIRTUAL_HACK(wxMoveEvent); -WX3_GCC49_VIRTUAL_HACK(wxNavigationKeyEvent); -WX3_GCC49_VIRTUAL_HACK(wxNcPaintEvent); -WX3_GCC49_VIRTUAL_HACK(wxNotifyEvent); -WX3_GCC49_VIRTUAL_HACK(wxPaintEvent); -WX3_GCC49_VIRTUAL_HACK(wxPaletteChangedEvent); -WX3_GCC49_VIRTUAL_HACK(wxQueryNewPaletteEvent); -WX3_GCC49_VIRTUAL_HACK(wxScrollEvent); -WX3_GCC49_VIRTUAL_HACK(wxScrollWinEvent); -WX3_GCC49_VIRTUAL_HACK(wxSetCursorEvent); -WX3_GCC49_VIRTUAL_HACK(wxShowEvent); -WX3_GCC49_VIRTUAL_HACK(wxSizeEvent); -WX3_GCC49_VIRTUAL_HACK(wxSysColourChangedEvent); -WX3_GCC49_VIRTUAL_HACK(wxUpdateUIEvent); -WX3_GCC49_VIRTUAL_HACK(wxWindowCreateEvent); -WX3_GCC49_VIRTUAL_HACK(wxWindowDestroyEvent); -#endif - -} -#endif -#endif - #endif // _WX_EVENT_H_ diff --git a/3rdparty/wxwidgets3.0/include/wx/filefn.h b/3rdparty/wxwidgets3.0/include/wx/filefn.h index 95b3051c05..4815807f60 100644 --- a/3rdparty/wxwidgets3.0/include/wx/filefn.h +++ b/3rdparty/wxwidgets3.0/include/wx/filefn.h @@ -188,7 +188,7 @@ enum wxPosixPermissions #elif (defined(__WINDOWS__) || defined(__OS2__)) && \ ( \ defined(__VISUALC__) || \ - defined(__MINGW64__) || \ + defined(__MINGW64_TOOLCHAIN__) || \ (defined(__MINGW32__) && !defined(__WINE__) && \ wxCHECK_W32API_VERSION(0, 5)) || \ defined(__DMC__) || \ @@ -203,8 +203,8 @@ enum wxPosixPermissions // detect compilers which have support for huge files #if defined(__VISUALC__) #define wxHAS_HUGE_FILES 1 - #elif defined(__MINGW32__) || defined(__MINGW64__) - #define wxHAS_HUGE_FILES 1f + #elif defined(__MINGW32__) + #define wxHAS_HUGE_FILES 1 #elif defined(_LARGE_FILES) #define wxHAS_HUGE_FILES 1 #endif @@ -281,7 +281,7 @@ enum wxPosixPermissions // to avoid using them as they're not present in earlier versions and // always using the native functions spelling is easier than testing for // the versions - #if defined(__BORLANDC__) || defined(__DMC__) || defined(__WATCOMC__) || defined(__MINGW64__) + #if defined(__BORLANDC__) || defined(__DMC__) || defined(__WATCOMC__) || defined(__MINGW64_TOOLCHAIN__) #define wxPOSIX_IDENT(func) ::func #else // by default assume MSVC-compatible names #define wxPOSIX_IDENT(func) _ ## func @@ -296,7 +296,7 @@ enum wxPosixPermissions #define wxWrite wxPOSIX_IDENT(write) #ifdef wxHAS_HUGE_FILES - #ifndef __MINGW64__ + #ifndef __MINGW64_TOOLCHAIN__ #define wxSeek wxPOSIX_IDENT(lseeki64) #define wxLseek wxPOSIX_IDENT(lseeki64) #define wxTell wxPOSIX_IDENT(telli64) @@ -337,7 +337,7 @@ enum wxPosixPermissions #ifdef wxHAS_HUGE_FILES // MinGW-64 provides underscore-less versions of all file functions // except for this one. - #ifdef __MINGW64__ + #ifdef __MINGW64_TOOLCHAIN__ #define wxCRT_StatA _stati64 #else #define wxCRT_StatA wxPOSIX_IDENT(stati64) diff --git a/3rdparty/wxwidgets3.0/include/wx/generic/listctrl.h b/3rdparty/wxwidgets3.0/include/wx/generic/listctrl.h index 7e18eeccbf..a7bdebf6e3 100644 --- a/3rdparty/wxwidgets3.0/include/wx/generic/listctrl.h +++ b/3rdparty/wxwidgets3.0/include/wx/generic/listctrl.h @@ -120,6 +120,12 @@ public: wxTextCtrl *EditLabel(long item, wxClassInfo* textControlClass = wxCLASSINFO(wxTextCtrl)); + + // End label editing, optionally cancelling the edit +#if wxABI_VERSION >= 30002 + bool EndEditLabel(bool cancel); +#endif + wxTextCtrl* GetEditControl() const; void Edit( long item ) { EditLabel(item); } diff --git a/3rdparty/wxwidgets3.0/include/wx/generic/private/listctrl.h b/3rdparty/wxwidgets3.0/include/wx/generic/private/listctrl.h index 32afaada6f..5cd210f486 100644 --- a/3rdparty/wxwidgets3.0/include/wx/generic/private/listctrl.h +++ b/3rdparty/wxwidgets3.0/include/wx/generic/private/listctrl.h @@ -564,6 +564,9 @@ public: // start editing the label of the given item wxTextCtrl *EditLabel(long item, wxClassInfo* textControlClass = wxCLASSINFO(wxTextCtrl)); + + bool EndEditLabel(bool cancel); + wxTextCtrl *GetEditControl() const { return m_textctrlWrapper ? m_textctrlWrapper->GetText() : NULL; diff --git a/3rdparty/wxwidgets3.0/include/wx/generic/richmsgdlgg.h b/3rdparty/wxwidgets3.0/include/wx/generic/richmsgdlgg.h index 5446f87fef..9384dbb882 100644 --- a/3rdparty/wxwidgets3.0/include/wx/generic/richmsgdlgg.h +++ b/3rdparty/wxwidgets3.0/include/wx/generic/richmsgdlgg.h @@ -20,8 +20,8 @@ class WXDLLIMPEXP_CORE wxGenericRichMessageDialog public: wxGenericRichMessageDialog(wxWindow *parent, const wxString& message, - const wxString& caption, - long style) + const wxString& caption = wxMessageBoxCaptionStr, + long style = wxOK | wxCENTRE) : wxRichMessageDialogBase( parent, message, caption, style ), m_checkBox(NULL), m_detailsPane(NULL) diff --git a/3rdparty/wxwidgets3.0/include/wx/generic/srchctlg.h b/3rdparty/wxwidgets3.0/include/wx/generic/srchctlg.h index c61ddee751..4eaa8e1ca4 100644 --- a/3rdparty/wxwidgets3.0/include/wx/generic/srchctlg.h +++ b/3rdparty/wxwidgets3.0/include/wx/generic/srchctlg.h @@ -238,6 +238,9 @@ private: // Implement pure virtual function inherited from wxCompositeWindow. virtual wxWindowList GetCompositeWindowParts() const; + // Position the child controls using the current window size. + void DoLayoutControls(); + #if wxUSE_MENUS void PopupSearchMenu(); #endif // wxUSE_MENUS diff --git a/3rdparty/wxwidgets3.0/include/wx/language.h b/3rdparty/wxwidgets3.0/include/wx/language.h index 3324ef0752..bb8a13e52a 100644 --- a/3rdparty/wxwidgets3.0/include/wx/language.h +++ b/3rdparty/wxwidgets3.0/include/wx/language.h @@ -149,7 +149,6 @@ enum wxLanguage wxLANGUAGE_ITALIAN_SWISS, wxLANGUAGE_JAPANESE, wxLANGUAGE_JAVANESE, - wxLANGUAGE_KABYLE, wxLANGUAGE_KANNADA, wxLANGUAGE_KASHMIRI, wxLANGUAGE_KASHMIRI_INDIA, @@ -270,6 +269,7 @@ enum wxLanguage wxLANGUAGE_YORUBA, wxLANGUAGE_ZHUANG, wxLANGUAGE_ZULU, + wxLANGUAGE_KABYLE, /// For custom, user-defined languages. wxLANGUAGE_USER_DEFINED diff --git a/3rdparty/wxwidgets3.0/include/wx/msw/bitmap.h b/3rdparty/wxwidgets3.0/include/wx/msw/bitmap.h index c677af8ca3..47d638a1dd 100644 --- a/3rdparty/wxwidgets3.0/include/wx/msw/bitmap.h +++ b/3rdparty/wxwidgets3.0/include/wx/msw/bitmap.h @@ -183,6 +183,10 @@ public: // implementation only from now on // ------------------------------- + // Set alpha flag to true if this is a 32bpp bitmap which has any non-0 + // values in its alpha channel. + void MSWUpdateAlpha(); + public: void SetHBITMAP(WXHBITMAP bmp) { SetHandle((WXHANDLE)bmp); } WXHBITMAP GetHBITMAP() const { return (WXHBITMAP)GetHandle(); } diff --git a/3rdparty/wxwidgets3.0/include/wx/msw/gccpriv.h b/3rdparty/wxwidgets3.0/include/wx/msw/gccpriv.h index 4bebc12090..c1962799a6 100644 --- a/3rdparty/wxwidgets3.0/include/wx/msw/gccpriv.h +++ b/3rdparty/wxwidgets3.0/include/wx/msw/gccpriv.h @@ -35,6 +35,28 @@ #include <_mingw.h> + /* + MinGW-w64 project provides compilers for both Win32 and Win64 but only + defines the same __MINGW32__ symbol for the former as MinGW32 toolchain + which is quite different (notably doesn't provide many SDK headers that + MinGW-w64 does include). So we define a separate symbol which, unlike + the predefined __MINGW64__, can be used to detect this toolchain in + both 32 and 64 bit builds. + + And define __MINGW32_TOOLCHAIN__ for consistency and also because it's + convenient as we often want to have some workarounds only for the (old) + MinGW32 but not (newer) MinGW-w64, which still predefines __MINGW32__. + */ + #ifdef __MINGW64_VERSION_MAJOR + #ifndef __MINGW64_TOOLCHAIN__ + #define __MINGW64_TOOLCHAIN__ + #endif + #else + #ifndef __MINGW32_TOOLCHAIN__ + #define __MINGW32_TOOLCHAIN__ + #endif + #endif + #define wxCHECK_MINGW32_VERSION( major, minor ) \ ( ( ( __MINGW32_MAJOR_VERSION > (major) ) \ || ( __MINGW32_MAJOR_VERSION == (major) && __MINGW32_MINOR_VERSION >= (minor) ) ) ) diff --git a/3rdparty/wxwidgets3.0/include/wx/msw/menu.h b/3rdparty/wxwidgets3.0/include/wx/msw/menu.h index 5f4c9f1853..616b3044ad 100644 --- a/3rdparty/wxwidgets3.0/include/wx/msw/menu.h +++ b/3rdparty/wxwidgets3.0/include/wx/msw/menu.h @@ -67,6 +67,11 @@ public: // menu handle and will delete it when this object is destroyed. static wxMenu *MSWNewFromHMENU(WXHMENU hMenu) { return new wxMenu(hMenu); } +#if wxABI_VERSION >= 30002 + // Detaches HMENU so that it isn't deleted when this object is destroyed. + // Don't use this object after calling this method. + WXHMENU MSWDetachHMENU() { WXHMENU m = m_hMenu; m_hMenu = NULL; return m; } +#endif // implementation only from now on // ------------------------------- diff --git a/3rdparty/wxwidgets3.0/include/wx/msw/menuitem.h b/3rdparty/wxwidgets3.0/include/wx/msw/menuitem.h index d76bd11950..7e6eacd199 100644 --- a/3rdparty/wxwidgets3.0/include/wx/msw/menuitem.h +++ b/3rdparty/wxwidgets3.0/include/wx/msw/menuitem.h @@ -133,6 +133,11 @@ private: // common part of all ctors void Init(); + // Return the item position in the menu containing it. + // + // Returns -1 if the item is not attached to a menu or if we can't find its + // position (which is not really supposed to ever happen). + int MSGetMenuItemPos() const; #if wxUSE_OWNER_DRAWN // item bitmaps diff --git a/3rdparty/wxwidgets3.0/include/wx/msw/ole/oleutils.h b/3rdparty/wxwidgets3.0/include/wx/msw/ole/oleutils.h index c9f7eb88c8..ed37b2ade2 100644 --- a/3rdparty/wxwidgets3.0/include/wx/msw/ole/oleutils.h +++ b/3rdparty/wxwidgets3.0/include/wx/msw/ole/oleutils.h @@ -21,6 +21,7 @@ #include #include "wx/intl.h" #include "wx/log.h" +#include "wx/variant.h" // ============================================================================ // General purpose functions and macros @@ -354,4 +355,30 @@ inline void wxOleUninitialize() { } #endif // wxUSE_OLE/!wxUSE_OLE +// RAII class initializing OLE in its ctor and undoing it in its dtor. +class wxOleInitializer +{ +public: + wxOleInitializer() + : m_ok(wxOleInitialize()) + { + } + + bool IsOk() const + { + return m_ok; + } + + ~wxOleInitializer() + { + if ( m_ok ) + wxOleUninitialize(); + } + +private: + const bool m_ok; + + wxDECLARE_NO_COPY_CLASS(wxOleInitializer); +}; + #endif //_WX_OLEUTILS_H diff --git a/3rdparty/wxwidgets3.0/include/wx/msw/richmsgdlg.h b/3rdparty/wxwidgets3.0/include/wx/msw/richmsgdlg.h index 20c8eb72da..51cdc63222 100644 --- a/3rdparty/wxwidgets3.0/include/wx/msw/richmsgdlg.h +++ b/3rdparty/wxwidgets3.0/include/wx/msw/richmsgdlg.h @@ -15,8 +15,8 @@ class WXDLLIMPEXP_CORE wxRichMessageDialog : public wxGenericRichMessageDialog public: wxRichMessageDialog(wxWindow *parent, const wxString& message, - const wxString& caption, - long style) + const wxString& caption = wxMessageBoxCaptionStr, + long style = wxOK | wxCENTRE) : wxGenericRichMessageDialog(parent, message, caption, style) { } diff --git a/3rdparty/wxwidgets3.0/include/wx/msw/textctrl.h b/3rdparty/wxwidgets3.0/include/wx/msw/textctrl.h index 1a81e44d71..66950aa494 100644 --- a/3rdparty/wxwidgets3.0/include/wx/msw/textctrl.h +++ b/3rdparty/wxwidgets3.0/include/wx/msw/textctrl.h @@ -170,6 +170,13 @@ public: // EDIT control has one already) void OnContextMenu(wxContextMenuEvent& event); +#if wxABI_VERSION >= 30002 + // Create context menu for RICHEDIT controls. This may be called once during + // the control's lifetime or every time the menu is shown, depending on + // implementation. + wxMenu *MSWCreateContextMenu(); +#endif + // be sure the caret remains invisible if the user // called HideNativeCaret() before void OnSetFocus(wxFocusEvent& event); diff --git a/3rdparty/wxwidgets3.0/include/wx/msw/window.h b/3rdparty/wxwidgets3.0/include/wx/msw/window.h index bd793e143b..68ed583118 100644 --- a/3rdparty/wxwidgets3.0/include/wx/msw/window.h +++ b/3rdparty/wxwidgets3.0/include/wx/msw/window.h @@ -682,6 +682,13 @@ private: bool HandleJoystickEvent(WXUINT msg, int x, int y, WXUINT flags); bool HandleNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result); +#ifndef __WXUNIVERSAL__ + // Call ::IsDialogMessage() if it is safe to do it (i.e. if it's not going + // to hang or do something else stupid) with the given message, return true + // if the message was handled by it. + bool MSWSafeIsDialogMessage(WXMSG* msg); +#endif // __WXUNIVERSAL__ + #if wxUSE_DEFERRED_SIZING protected: // this function is called after the window was resized to its new size diff --git a/3rdparty/wxwidgets3.0/include/wx/private/pipestream.h b/3rdparty/wxwidgets3.0/include/wx/private/pipestream.h index f14d9aba79..7fdcb71760 100644 --- a/3rdparty/wxwidgets3.0/include/wx/private/pipestream.h +++ b/3rdparty/wxwidgets3.0/include/wx/private/pipestream.h @@ -20,7 +20,7 @@ // IsOpened() method. // // wxPipeOutputStream is similar but has no additional methods at all. -#ifdef __UNIX__ +#if defined(__UNIX__) && !defined(__WINDOWS__) #include "wx/unix/private/pipestream.h" #elif defined(__WINDOWS__) && !defined(__WXWINCE__) #include "wx/msw/private/pipestream.h" diff --git a/3rdparty/wxwidgets3.0/include/wx/richmsgdlg.h b/3rdparty/wxwidgets3.0/include/wx/richmsgdlg.h index 1fbc96428f..ab49af7d00 100644 --- a/3rdparty/wxwidgets3.0/include/wx/richmsgdlg.h +++ b/3rdparty/wxwidgets3.0/include/wx/richmsgdlg.h @@ -73,8 +73,8 @@ private: public: wxRichMessageDialog( wxWindow *parent, const wxString& message, - const wxString& caption, - long style ) + const wxString& caption = wxMessageBoxCaptionStr, + long style = wxOK | wxCENTRE ) : wxGenericRichMessageDialog( parent, message, caption, style ) { } diff --git a/3rdparty/wxwidgets3.0/include/wx/simplebook.h b/3rdparty/wxwidgets3.0/include/wx/simplebook.h index 5ca253ac10..78cc87215a 100644 --- a/3rdparty/wxwidgets3.0/include/wx/simplebook.h +++ b/3rdparty/wxwidgets3.0/include/wx/simplebook.h @@ -41,6 +41,16 @@ public: Init(); } + bool Create(wxWindow *parent, + wxWindowID winid = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxEmptyString) + { + return wxBookCtrlBase::Create(parent, winid, pos, size, style | wxBK_TOP, name); + } + // Methods specific to this class. diff --git a/3rdparty/wxwidgets3.0/include/wx/version.h b/3rdparty/wxwidgets3.0/include/wx/version.h index 1e33fb4d08..c1c438d2d9 100644 --- a/3rdparty/wxwidgets3.0/include/wx/version.h +++ b/3rdparty/wxwidgets3.0/include/wx/version.h @@ -27,9 +27,9 @@ /* NB: this file is parsed by automatic tools so don't change its format! */ #define wxMAJOR_VERSION 3 #define wxMINOR_VERSION 0 -#define wxRELEASE_NUMBER 1 +#define wxRELEASE_NUMBER 2 #define wxSUBRELEASE_NUMBER 0 -#define wxVERSION_STRING wxT("wxWidgets 3.0.1") +#define wxVERSION_STRING wxT("wxWidgets 3.0.2") /* nothing to update below this line when updating the version */ /* ---------------------------------------------------------------------------- */ diff --git a/3rdparty/wxwidgets3.0/src/common/arrstr.cpp b/3rdparty/wxwidgets3.0/src/common/arrstr.cpp index f66fcdd4ee..4111fd0875 100644 --- a/3rdparty/wxwidgets3.0/src/common/arrstr.cpp +++ b/3rdparty/wxwidgets3.0/src/common/arrstr.cpp @@ -20,6 +20,7 @@ #endif #include "wx/arrstr.h" +#include "wx/scopedarray.h" #include "wx/beforestd.h" #include @@ -106,10 +107,14 @@ void wxArrayString::Copy(const wxArrayString& src) } // grow the array -void wxArrayString::Grow(size_t nIncrement) +wxString *wxArrayString::Grow(size_t nIncrement) { - // only do it if no more place - if ( (m_nSize - m_nCount) < nIncrement ) { + if ( (m_nSize - m_nCount) >= nIncrement ) + { + // We already have enough space. + return NULL; + } + // if ARRAY_DEFAULT_INITIAL_SIZE were set to 0, the initially empty would // be never resized! #if ARRAY_DEFAULT_INITIAL_SIZE == 0 @@ -122,6 +127,9 @@ void wxArrayString::Grow(size_t nIncrement) if (m_nSize < nIncrement) m_nSize = nIncrement; m_pItems = new wxString[m_nSize]; + + // Nothing to free, we hadn't had any memory before. + return NULL; } else { // otherwise when it's called for the first time, nIncrement would be 0 @@ -140,12 +148,12 @@ void wxArrayString::Grow(size_t nIncrement) for ( size_t j = 0; j < m_nCount; j++ ) pNew[j] = m_pItems[j]; - // delete old memory (but do not release the strings!) - delete [] m_pItems; + wxString* const pItemsOld = m_pItems; m_pItems = pNew; + + return pItemsOld; } - } } // deletes all the strings from the list @@ -288,7 +296,10 @@ size_t wxArrayString::Add(const wxString& str, size_t nInsert) return (size_t)lo; } else { - Grow(nInsert); + // Now that we must postpone freeing the old memory until we don't need it + // any more, i.e. don't reference "str" which could be a reference to one + // of our own strings. + wxScopedArray oldStrings(Grow(nInsert)); for (size_t i = 0; i < nInsert; i++) { @@ -308,7 +319,7 @@ void wxArrayString::Insert(const wxString& str, size_t nIndex, size_t nInsert) wxCHECK_RET( m_nCount <= m_nCount + nInsert, wxT("array size overflow in wxArrayString::Insert") ); - Grow(nInsert); + wxScopedArray oldStrings(Grow(nInsert)); for (int j = m_nCount - nIndex - 1; j >= 0; j--) m_pItems[nIndex + nInsert + j] = m_pItems[nIndex + j]; @@ -327,7 +338,7 @@ wxArrayString::insert(iterator it, const_iterator first, const_iterator last) const int idx = it - begin(); // grow it once - Grow(last - first); + wxScopedArray oldStrings(Grow(last - first)); // reset "it" since it can change inside Grow() it = begin() + idx; diff --git a/3rdparty/wxwidgets3.0/src/common/cairo.cpp b/3rdparty/wxwidgets3.0/src/common/cairo.cpp index a10ca6499f..bfb69a2936 100644 --- a/3rdparty/wxwidgets3.0/src/common/cairo.cpp +++ b/3rdparty/wxwidgets3.0/src/common/cairo.cpp @@ -214,6 +214,10 @@ (cairo_format_t format, int width), (format, width), 0) \ m( int, cairo_version, \ (), (), 0) \ + m( int, cairo_image_surface_get_width, \ + (cairo_surface_t *surface), (surface), 0) \ + m( int, cairo_image_surface_get_height, \ + (cairo_surface_t *surface), (surface), 0) \ m( int, cairo_image_surface_get_stride, \ (cairo_surface_t *surface), (surface), 0) \ m( unsigned char *, cairo_image_surface_get_data, \ diff --git a/3rdparty/wxwidgets3.0/src/common/cmdline.cpp b/3rdparty/wxwidgets3.0/src/common/cmdline.cpp index 972d8431da..1362a65773 100644 --- a/3rdparty/wxwidgets3.0/src/common/cmdline.cpp +++ b/3rdparty/wxwidgets3.0/src/common/cmdline.cpp @@ -144,7 +144,13 @@ struct wxCmdLineOption bool HasValue() const { return m_hasVal; } void SetNegated() { m_isNegated = true; } - bool IsNegated() const { return m_isNegated; } + bool IsNegated() const + { + wxASSERT_MSG( kind == wxCMD_LINE_SWITCH, + wxT("kind mismatch in wxCmdLineArg") ); + + return m_isNegated; + } // Reset to the initial state, called before parsing another command line. void Reset() @@ -272,7 +278,8 @@ void wxCmdLineParserData::SetArguments(int argc, char **argv) // temporarily change the locale here. The only drawback is that changing // the locale is thread-unsafe but precisely because we're called so early // it's hopefully safe to assume that no other threads had been created yet. - char * const locOld = SetAllLocaleFacets(""); + char * const locOld = SetAllLocaleFacets(NULL); + SetAllLocaleFacets(""); wxON_BLOCK_EXIT1( SetAllLocaleFacets, locOld ); for ( int n = 0; n < argc; n++ ) @@ -666,6 +673,7 @@ int wxCmdLineParser::Parse(bool showUsage) Reset(); // parse everything + m_data->m_parameters.clear(); wxString arg; size_t count = m_data->m_arguments.size(); for ( size_t n = 1; ok && (n < count); n++ ) // 0 is program name diff --git a/3rdparty/wxwidgets3.0/src/common/datavcmn.cpp b/3rdparty/wxwidgets3.0/src/common/datavcmn.cpp index 9d68261fe0..25d85f4f13 100644 --- a/3rdparty/wxwidgets3.0/src/common/datavcmn.cpp +++ b/3rdparty/wxwidgets3.0/src/common/datavcmn.cpp @@ -1461,16 +1461,12 @@ wxDataViewSpinRenderer::wxDataViewSpinRenderer( int min, int max, wxDataViewCell wxWindow* wxDataViewSpinRenderer::CreateEditorCtrl( wxWindow *parent, wxRect labelRect, const wxVariant &value ) { long l = value; - wxSize size = labelRect.GetSize(); -#ifdef __WXMAC__ - size = wxSize( wxMax(70,labelRect.width ), -1 ); -#endif wxString str; str.Printf( wxT("%d"), (int) l ); wxSpinCtrl *sc = new wxSpinCtrl( parent, wxID_ANY, str, - labelRect.GetTopLeft(), size, wxSP_ARROW_KEYS|wxTE_PROCESS_ENTER, m_min, m_max, l ); + labelRect.GetTopLeft(), labelRect.GetSize(), wxSP_ARROW_KEYS|wxTE_PROCESS_ENTER, m_min, m_max, l ); #ifdef __WXMAC__ - size = sc->GetSize(); + const wxSize size = sc->GetSize(); wxPoint pt = sc->GetPosition(); sc->SetSize( pt.x - 4, pt.y - 4, size.x, size.y ); #endif diff --git a/3rdparty/wxwidgets3.0/src/common/datetime.cpp b/3rdparty/wxwidgets3.0/src/common/datetime.cpp index 669d0a3269..4446a33403 100644 --- a/3rdparty/wxwidgets3.0/src/common/datetime.cpp +++ b/3rdparty/wxwidgets3.0/src/common/datetime.cpp @@ -2084,9 +2084,15 @@ wxDateTime& wxDateTime::MakeTimezone(const TimeZone& tz, bool noDST) { long secDiff = wxGetTimeZone() + tz.GetOffset(); - // we need to know whether DST is or not in effect for this date unless - // the test disabled by the caller - if ( !noDST && (IsDST() == 1) ) + // We are converting from the local time, but local time zone does not + // include the DST offset (as it varies depending on the date), so we have + // to handle DST manually, unless a special flag inhibiting this was + // specified. + // + // Notice that we also shouldn't add the DST offset if we're already in the + // local time zone, as indicated by offset of 0, converting from local time + // to local time zone shouldn't change it, whether DST is in effect or not. + if ( !noDST && secDiff && (IsDST() == 1) ) { // FIXME we assume that the DST is always shifted by 1 hour secDiff -= 3600; @@ -2099,9 +2105,8 @@ wxDateTime& wxDateTime::MakeFromTimezone(const TimeZone& tz, bool noDST) { long secDiff = wxGetTimeZone() + tz.GetOffset(); - // we need to know whether DST is or not in effect for this date unless - // the test disabled by the caller - if ( !noDST && (IsDST() == 1) ) + // See comment in MakeTimezone() above, the logic here is exactly the same. + if ( !noDST && secDiff && (IsDST() == 1) ) { // FIXME we assume that the DST is always shifted by 1 hour secDiff -= 3600; diff --git a/3rdparty/wxwidgets3.0/src/common/datetimefmt.cpp b/3rdparty/wxwidgets3.0/src/common/datetimefmt.cpp index 4855025050..5084c282ee 100644 --- a/3rdparty/wxwidgets3.0/src/common/datetimefmt.cpp +++ b/3rdparty/wxwidgets3.0/src/common/datetimefmt.cpp @@ -271,6 +271,30 @@ GetWeekDayFromName(wxString::const_iterator& p, return wd; } +// return the year of the Monday of the week containing the given date +int +GetWeekBasedYear(const wxDateTime& dt) +{ + const wxDateTime::Tm tm = dt.GetTm(); + + int year = tm.year; + + // The week-based year can only be different from the normal year for few + // days in the beginning and the end of the year. + if ( tm.yday > 361 ) + { + if ( dt.GetWeekOfYear() == 1 ) + year++; + } + else if ( tm.yday < 5 ) + { + if ( dt.GetWeekOfYear() == 53 ) + year--; + } + + return year; +} + // parses string starting at given iterator using the specified format and, // optionally, a fall back format (and optionally another one... but it stops // there, really) @@ -324,17 +348,38 @@ wxString wxDateTime::Format(const wxString& formatp, const TimeZone& tz) const format.Replace("%X",wxLocale::GetInfo(wxLOCALE_TIME_FMT)); #endif // we have to use our own implementation if the date is out of range of - // strftime() or if we use non standard specifiers (notice that "%z" is - // special because it is de facto standard under Unix but is not supported - // under Windows) + // strftime() #ifdef wxHAS_STRFTIME time_t time = GetTicks(); - if ( (time != (time_t)-1) && !wxStrstr(format, wxT("%l")) + bool canUseStrftime = time != (time_t)-1; + + // We also can't use strftime() if we use non standard specifier: either + // our own extension "%l" or one of "%g", "%G", "%V", "%z" which are POSIX + // but not supported under Windows. + for ( wxString::const_iterator p = format.begin(); + canUseStrftime && p != format.end(); + ++p ) + { + if ( *p != '%' ) + continue; + + // set the default format + switch ( (*++p).GetValue() ) + { + case 'l': #ifdef __WINDOWS__ - && !wxStrstr(format, wxT("%z")) -#endif - ) + case 'g': + case 'G': + case 'V': + case 'z': +#endif // __WINDOWS__ + canUseStrftime = false; + break; + } + } + + if ( canUseStrftime ) { // use strftime() struct tm tmstruct; @@ -408,6 +453,7 @@ wxString wxDateTime::Format(const wxString& formatp, const TimeZone& tz) const switch ( (*++p).GetValue() ) { case wxT('Y'): // year has 4 digits + case wxT('G'): // (and ISO week year too) case wxT('z'): // time zone as well fmt = wxT("%04d"); break; @@ -579,6 +625,14 @@ wxString wxDateTime::Format(const wxString& formatp, const TimeZone& tz) const res += wxString::Format(fmt, tm.mday); break; + case wxT('g'): // 2-digit week-based year + res += wxString::Format(fmt, GetWeekBasedYear(*this) % 100); + break; + + case wxT('G'): // week-based year with century + res += wxString::Format(fmt, GetWeekBasedYear(*this)); + break; + case wxT('H'): // hour in 24h format (00-23) res += wxString::Format(fmt, tm.hour); break; @@ -624,6 +678,7 @@ wxString wxDateTime::Format(const wxString& formatp, const TimeZone& tz) const res += wxString::Format(fmt, GetWeekOfYear(Sunday_First, tz)); break; + case wxT('V'): // ISO week number case wxT('W'): // week number in the year (Monday 1st week day) res += wxString::Format(fmt, GetWeekOfYear(Monday_First, tz)); break; diff --git a/3rdparty/wxwidgets3.0/src/common/dcbase.cpp b/3rdparty/wxwidgets3.0/src/common/dcbase.cpp index bbef6164e5..c8008344f6 100644 --- a/3rdparty/wxwidgets3.0/src/common/dcbase.cpp +++ b/3rdparty/wxwidgets3.0/src/common/dcbase.cpp @@ -1484,7 +1484,6 @@ void wxDCImpl::CalculateEllipticPoints( wxPointList* points, wxCoord y = b; long x2 = 1; long y2 = y*y; - long y2_old = 0; long y_old = 0; // Lists for quadrant 1 to 4 wxPointList pointsarray[4]; @@ -1492,7 +1491,6 @@ void wxDCImpl::CalculateEllipticPoints( wxPointList* points, for( x = 0; x <= a; ++x ) { x2 = x2+x+x-1; - y2_old = y2; y_old = y; bool bNewPoint = false; while( y2 > c1 - c2 * x2 && y > 0 ) diff --git a/3rdparty/wxwidgets3.0/src/common/dcgraph.cpp b/3rdparty/wxwidgets3.0/src/common/dcgraph.cpp index acc689c3bb..d27e9cc02f 100644 --- a/3rdparty/wxwidgets3.0/src/common/dcgraph.cpp +++ b/3rdparty/wxwidgets3.0/src/common/dcgraph.cpp @@ -24,6 +24,8 @@ #include "wx/icon.h" #include "wx/dcclient.h" #include "wx/dcmemory.h" + #include "wx/math.h" + #include "wx/geometry.h" #endif //----------------------------------------------------------------------------- @@ -304,6 +306,9 @@ void wxGCDCImpl::DoDrawBitmap( const wxBitmap &bmp, wxCoord x, wxCoord y, m_graphicContext->DrawBitmap( bmpCopy, x, y, w, h ); } + + CalcBoundingBox(x, y); + CalcBoundingBox(x + w, y + h); } void wxGCDCImpl::DoDrawIcon( const wxIcon &icon, wxCoord x, wxCoord y ) @@ -315,6 +320,9 @@ void wxGCDCImpl::DoDrawIcon( const wxIcon &icon, wxCoord x, wxCoord y ) wxCoord h = icon.GetHeight(); m_graphicContext->DrawIcon( icon , x, y, w, h ); + + CalcBoundingBox(x, y); + CalcBoundingBox(x + w, y + h); } bool wxGCDCImpl::StartDoc( const wxString& WXUNUSED(message) ) @@ -570,7 +578,7 @@ void wxGCDCImpl::DoCrossHair( wxCoord x, wxCoord y ) m_graphicContext->StrokeLine(x,0,x,h); CalcBoundingBox(0, 0); - CalcBoundingBox(0+w, 0+h); + CalcBoundingBox(w, h); } void wxGCDCImpl::DoDrawArc( wxCoord x1, wxCoord y1, @@ -617,6 +625,11 @@ void wxGCDCImpl::DoDrawArc( wxCoord x1, wxCoord y1, if ( fill && ((x1!=x2)||(y1!=y2)) ) path.AddLineToPoint( xc, yc ); m_graphicContext->DrawPath(path); + + wxRect2DDouble box = path.GetBox(); + CalcBoundingBox(wxRound(box.m_x), wxRound(box.m_y)); + CalcBoundingBox(wxRound(box.m_x + box.m_width), + wxRound(box.m_y + box.m_height)); } void wxGCDCImpl::DoDrawEllipticArc( wxCoord x, wxCoord y, wxCoord w, wxCoord h, @@ -627,16 +640,19 @@ void wxGCDCImpl::DoDrawEllipticArc( wxCoord x, wxCoord y, wxCoord w, wxCoord h, if ( !m_logicalFunctionSupported ) return; - m_graphicContext->PushState(); - m_graphicContext->Translate(x+w/2.0,y+h/2.0); + wxCoord dx = x + w / 2.0; + wxCoord dy = y + h / 2.0; wxDouble factor = ((wxDouble) w) / h; - m_graphicContext->Scale( factor , 1.0); + m_graphicContext->PushState(); + m_graphicContext->Translate(dx, dy); + m_graphicContext->Scale(factor, 1.0); + wxGraphicsPath path; // since these angles (ea,sa) are measured counter-clockwise, we invert them to // get clockwise angles if ( m_brush.GetStyle() != wxTRANSPARENT ) { - wxGraphicsPath path = m_graphicContext->CreatePath(); + path = m_graphicContext->CreatePath(); path.MoveToPoint( 0, 0 ); path.AddArc( 0, 0, h/2.0 , DegToRad(-sa) , DegToRad(-ea), sa > ea ); path.AddLineToPoint( 0, 0 ); @@ -653,6 +669,17 @@ void wxGCDCImpl::DoDrawEllipticArc( wxCoord x, wxCoord y, wxCoord w, wxCoord h, m_graphicContext->DrawPath( path ); } + wxRect2DDouble box = path.GetBox(); + // apply the transformation to the box + box.m_x *= factor; + box.m_width *= factor; + box.m_x += dx; + box.m_y += dy; + + CalcBoundingBox(wxRound(box.m_x), wxRound(box.m_y)); + CalcBoundingBox(wxRound(box.m_x + box.m_width), + wxRound(box.m_y + box.m_height)); + m_graphicContext->PopState(); } @@ -667,19 +694,34 @@ void wxGCDCImpl::DoDrawLines(int n, const wxPoint points[], wxCoord xoffset, wxCoord yoffset) { wxCHECK_RET( IsOk(), wxT("wxGCDC(cg)::DoDrawLines - invalid DC") ); + wxASSERT_MSG( n > 0, wxT("wxGCDC(cg)::DoDrawLines - number of points too small") ); if ( !m_logicalFunctionSupported ) return; + int minX = points[0].x; + int minY = points[0].y; + int maxX = minX; + int maxY = minY; + wxPoint2DDouble* pointsD = new wxPoint2DDouble[n]; for( int i = 0; i < n; ++i) { - pointsD[i].m_x = points[i].x + xoffset; - pointsD[i].m_y = points[i].y + yoffset; + wxPoint p = points[i]; + pointsD[i].m_x = p.x + xoffset; + pointsD[i].m_y = p.y + yoffset; + + if (p.x < minX) minX = p.x; + else if (p.x > maxX) maxX = p.x; + if (p.y < minY) minY = p.y; + else if (p.y > maxY) maxY = p.y; } m_graphicContext->StrokeLines( n , pointsD); delete[] pointsD; + + CalcBoundingBox(minX + xoffset, minY + yoffset); + CalcBoundingBox(maxX + xoffset, maxY + yoffset); } #if wxUSE_SPLINES @@ -738,6 +780,11 @@ void wxGCDCImpl::DoDrawSpline(const wxPointList *points) path.AddLineToPoint( x2 , y2 ); m_graphicContext->StrokePath( path ); + + wxRect2DDouble box = path.GetBox(); + CalcBoundingBox(wxRound(box.m_x), wxRound(box.m_y)); + CalcBoundingBox(wxRound(box.m_x + box.m_width), + wxRound(box.m_y + box.m_height)); } #endif // wxUSE_SPLINES @@ -756,17 +803,31 @@ void wxGCDCImpl::DoDrawPolygon( int n, const wxPoint points[], if (points[n-1] != points[0]) closeIt = true; + int minX = points[0].x; + int minY = points[0].y; + int maxX = minX; + int maxY = minY; + wxPoint2DDouble* pointsD = new wxPoint2DDouble[n+(closeIt?1:0)]; for( int i = 0; i < n; ++i) { - pointsD[i].m_x = points[i].x + xoffset; - pointsD[i].m_y = points[i].y + yoffset; + wxPoint p = points[i]; + pointsD[i].m_x = p.x + xoffset; + pointsD[i].m_y = p.y + yoffset; + + if (p.x < minX) minX = p.x; + else if (p.x > maxX) maxX = p.x; + if (p.y < minY) minY = p.y; + else if (p.y > maxY) maxY = p.y; } if ( closeIt ) pointsD[n] = pointsD[0]; m_graphicContext->DrawLines( n+(closeIt?1:0) , pointsD, fillStyle); delete[] pointsD; + + CalcBoundingBox(minX + xoffset, minY + yoffset); + CalcBoundingBox(maxX + xoffset, maxY + yoffset); } void wxGCDCImpl::DoDrawPolyPolygon(int n, @@ -796,6 +857,11 @@ void wxGCDCImpl::DoDrawPolyPolygon(int n, path.AddLineToPoint( start.x+ xoffset, start.y+ yoffset); } m_graphicContext->DrawPath( path , fillStyle); + + wxRect2DDouble box = path.GetBox(); + CalcBoundingBox(wxRound(box.m_x), wxRound(box.m_y)); + CalcBoundingBox(wxRound(box.m_x + box.m_width), + wxRound(box.m_y + box.m_height)); } void wxGCDCImpl::DoDrawRectangle(wxCoord x, wxCoord y, wxCoord w, wxCoord h) @@ -809,6 +875,9 @@ void wxGCDCImpl::DoDrawRectangle(wxCoord x, wxCoord y, wxCoord w, wxCoord h) if (w == 0 || h == 0) return; + CalcBoundingBox(x, y); + CalcBoundingBox(x + w, y + h); + if ( m_graphicContext->ShouldOffset() ) { // if we are offsetting the entire rectangle is moved 0.5, so the @@ -835,6 +904,9 @@ void wxGCDCImpl::DoDrawRoundedRectangle(wxCoord x, wxCoord y, if (w == 0 || h == 0) return; + CalcBoundingBox(x, y); + CalcBoundingBox(x + w, y + h); + if ( m_graphicContext->ShouldOffset() ) { // if we are offsetting the entire rectangle is moved 0.5, so the @@ -852,6 +924,9 @@ void wxGCDCImpl::DoDrawEllipse(wxCoord x, wxCoord y, wxCoord w, wxCoord h) if ( !m_logicalFunctionSupported ) return; + CalcBoundingBox(x, y); + CalcBoundingBox(x + w, y + h); + if ( m_graphicContext->ShouldOffset() ) { // if we are offsetting the entire rectangle is moved 0.5, so the @@ -961,6 +1036,9 @@ bool wxGCDCImpl::DoStretchBlit( // reset composition m_graphicContext->SetCompositionMode(formerMode); + CalcBoundingBox(xdest, ydest); + CalcBoundingBox(xdest + dstWidth, ydest + dstHeight); + return retval; } @@ -1048,6 +1126,11 @@ void wxGCDCImpl::DoDrawText(const wxString& str, wxCoord x, wxCoord y) m_graphicContext->DrawText( str, x ,y); else m_graphicContext->DrawText( str, x ,y , m_graphicContext->CreateBrush( wxBrush(m_textBackgroundColour,wxSOLID) ) ); + + wxCoord w, h; + GetOwner()->GetTextExtent(str, &w, &h); + CalcBoundingBox(x, y); + CalcBoundingBox(x + w, y + h); } bool wxGCDCImpl::CanGetTextExtent() const @@ -1191,6 +1274,9 @@ void wxGCDCImpl::DoGradientFillLinear(const wxRect& rect, m_graphicContext->DrawRectangle(rect.x,rect.y,rect.width,rect.height); m_graphicContext->SetPen(m_pen); m_graphicContext->SetBrush(m_brush); + + CalcBoundingBox(rect.x, rect.y); + CalcBoundingBox(rect.x + rect.width, rect.y + rect.height); } void wxGCDCImpl::DoGradientFillConcentric(const wxRect& rect, @@ -1220,6 +1306,9 @@ void wxGCDCImpl::DoGradientFillConcentric(const wxRect& rect, m_graphicContext->DrawRectangle(rect.x,rect.y,rect.width,rect.height); m_graphicContext->SetPen(m_pen); m_graphicContext->SetBrush(m_brush); + + CalcBoundingBox(rect.x, rect.y); + CalcBoundingBox(rect.x + rect.width, rect.y + rect.height); } void wxGCDCImpl::DoDrawCheckMark(wxCoord x, wxCoord y, diff --git a/3rdparty/wxwidgets3.0/src/common/event.cpp b/3rdparty/wxwidgets3.0/src/common/event.cpp index 914995e2fa..d92a4acf0e 100644 --- a/3rdparty/wxwidgets3.0/src/common/event.cpp +++ b/3rdparty/wxwidgets3.0/src/common/event.cpp @@ -37,6 +37,7 @@ #if wxUSE_GUI #include "wx/window.h" + #include "wx/combobox.h" #include "wx/control.h" #include "wx/dc.h" #include "wx/spinbutt.h" @@ -435,20 +436,27 @@ wxCommandEvent::wxCommandEvent(wxEventType commandType, int theId) wxString wxCommandEvent::GetString() const { - if (m_eventType != wxEVT_TEXT || !m_eventObject) - { - return m_cmdString; - } - else + // This is part of the hack retrieving the event string from the control + // itself only when/if it's really needed to avoid copying potentially huge + // strings coming from multiline text controls. For consistency we also do + // it for combo boxes, even though there are no real performance advantages + // in doing this for them. + if (m_eventType == wxEVT_TEXT && m_eventObject) { #if wxUSE_TEXTCTRL wxTextCtrl *txt = wxDynamicCast(m_eventObject, wxTextCtrl); if ( txt ) return txt->GetValue(); - else #endif // wxUSE_TEXTCTRL - return m_cmdString; + +#if wxUSE_COMBOBOX + wxComboBox* combo = wxDynamicCast(m_eventObject, wxComboBox); + if ( combo ) + return combo->GetValue(); +#endif // wxUSE_COMBOBOX } + + return m_cmdString; } // ---------------------------------------------------------------------------- @@ -1886,7 +1894,7 @@ bool wxEventBlocker::ProcessEvent(wxEvent& event) return true; // yes, it should: mark this event as processed } - return false; + return wxEvtHandler::ProcessEvent(event);; } #endif // wxUSE_GUI diff --git a/3rdparty/wxwidgets3.0/src/common/ffile.cpp b/3rdparty/wxwidgets3.0/src/common/ffile.cpp index 0f479565d2..962242ebe8 100644 --- a/3rdparty/wxwidgets3.0/src/common/ffile.cpp +++ b/3rdparty/wxwidgets3.0/src/common/ffile.cpp @@ -153,12 +153,28 @@ size_t wxFFile::Write(const void *pBuf, size_t nCount) bool wxFFile::Write(const wxString& s, const wxMBConv& conv) { - const wxWX2MBbuf buf = s.mb_str(conv); - if ( !buf ) - return false; + // Writing nothing always succeeds -- and simplifies the check for + // conversion failure below. + if ( s.empty() ) + return true; - const size_t size = strlen(buf); // FIXME: use buf.length() when available - return Write(buf, size) == size; + const wxWX2MBbuf buf = s.mb_str(conv); + +#if wxUSE_UNICODE + const size_t size = buf.length(); + + if ( !size ) + { + // This means that the conversion failed as the original string wasn't + // empty (we explicitly checked for this above) and in this case we + // must fail too to indicate that we can't save the data. + return false; + } +#else + const size_t size = s.length(); +#endif + + return Write(buf, size) == size; } bool wxFFile::Flush() diff --git a/3rdparty/wxwidgets3.0/src/common/file.cpp b/3rdparty/wxwidgets3.0/src/common/file.cpp index b2a5aca736..9d5571d5ef 100644 --- a/3rdparty/wxwidgets3.0/src/common/file.cpp +++ b/3rdparty/wxwidgets3.0/src/common/file.cpp @@ -356,17 +356,28 @@ size_t wxFile::Write(const void *pBuf, size_t nCount) bool wxFile::Write(const wxString& s, const wxMBConv& conv) { - const wxWX2MBbuf buf = s.mb_str(conv); - if ( !buf ) - return false; + // Writing nothing always succeeds -- and simplifies the check for + // conversion failure below. + if ( s.empty() ) + return true; + + const wxWX2MBbuf buf = s.mb_str(conv); #if wxUSE_UNICODE - const size_t size = buf.length(); + const size_t size = buf.length(); + + if ( !size ) + { + // This means that the conversion failed as the original string wasn't + // empty (we explicitly checked for this above) and in this case we + // must fail too to indicate that we can't save the data. + return false; + } #else - const size_t size = s.length(); + const size_t size = s.length(); #endif - return Write(buf, size) == size; + return Write(buf, size) == size; } // flush diff --git a/3rdparty/wxwidgets3.0/src/common/filename.cpp b/3rdparty/wxwidgets3.0/src/common/filename.cpp index 6acde7603c..fcbc0e7206 100644 --- a/3rdparty/wxwidgets3.0/src/common/filename.cpp +++ b/3rdparty/wxwidgets3.0/src/common/filename.cpp @@ -102,6 +102,7 @@ #include "wx/msw/private.h" #include // for CLSID_ShellLink #include "wx/msw/missing.h" + #include "wx/msw/ole/oleutils.h" #endif #if defined(__WXMAC__) @@ -1706,6 +1707,9 @@ bool wxFileName::GetShortcutTarget(const wxString& shortcutPath, if (ext.CmpNoCase(wxT("lnk"))!=0) return false; + // Ensure OLE is initialized. + wxOleInitializer oleInit; + // create a ShellLink object hres = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, IID_IShellLink, (LPVOID*) &psl); @@ -1793,8 +1797,13 @@ bool wxFileName::MakeRelativeTo(const wxString& pathBase, wxPathFormat format) // get cwd only once - small time saving wxString cwd = wxGetCwd(); - Normalize(wxPATH_NORM_ALL & ~wxPATH_NORM_CASE, cwd, format); - fnBase.Normalize(wxPATH_NORM_ALL & ~wxPATH_NORM_CASE, cwd, format); + + // Normalize the paths but avoid changing the case or turning a shortcut + // into a file that it points to. + const int normFlags = wxPATH_NORM_ALL & + ~(wxPATH_NORM_CASE | wxPATH_NORM_SHORTCUT); + Normalize(normFlags, cwd, format); + fnBase.Normalize(normFlags, cwd, format); bool withCase = IsCaseSensitive(format); diff --git a/3rdparty/wxwidgets3.0/src/common/fswatchercmn.cpp b/3rdparty/wxwidgets3.0/src/common/fswatchercmn.cpp index cb32a14100..b946f6402c 100644 --- a/3rdparty/wxwidgets3.0/src/common/fswatchercmn.cpp +++ b/3rdparty/wxwidgets3.0/src/common/fswatchercmn.cpp @@ -144,9 +144,11 @@ wxFileSystemWatcherBase::AddAny(const wxFileName& path, else { wxFSWatchInfo& watch = it->second; - int count = watch.IncRef(); + const int count = watch.IncRef(); wxLogTrace(wxTRACE_FSWATCHER, "'%s' is now watched %d times", canonical, count); + + wxUnusedVar(count); // could be unused if debug tracing is disabled } return true; } diff --git a/3rdparty/wxwidgets3.0/src/common/ftp.cpp b/3rdparty/wxwidgets3.0/src/common/ftp.cpp index c205cd7592..cfb59e63d4 100644 --- a/3rdparty/wxwidgets3.0/src/common/ftp.cpp +++ b/3rdparty/wxwidgets3.0/src/common/ftp.cpp @@ -769,7 +769,11 @@ wxInputStream *wxFTP::GetInputStream(const wxString& path) wxString tmp_str = wxT("RETR ") + wxURI::Unescape(path); if ( !CheckCommand(tmp_str, '1') ) + { + delete sock; + return NULL; + } sock = AcceptIfActive(sock); if ( !sock ) @@ -800,7 +804,11 @@ wxOutputStream *wxFTP::GetOutputStream(const wxString& path) wxString tmp_str = wxT("STOR ") + path; if ( !CheckCommand(tmp_str, '1') ) + { + delete sock; + return NULL; + } sock = AcceptIfActive(sock); diff --git a/3rdparty/wxwidgets3.0/src/common/imaggif.cpp b/3rdparty/wxwidgets3.0/src/common/imaggif.cpp index 9c0f8bea3a..ba2f3bbc0d 100644 --- a/3rdparty/wxwidgets3.0/src/common/imaggif.cpp +++ b/3rdparty/wxwidgets3.0/src/common/imaggif.cpp @@ -721,13 +721,14 @@ bool wxGIFHandler_WriteControl(wxOutputStream *stream, int maskIndex, int delayMilliSecs) { wxUint8 buf[8]; + const wxUint16 delay = delayMilliSecs / 10; buf[0] = GIF_MARKER_EXT; // extension marker buf[1] = GIF_MARKER_EXT_GRAPHICS_CONTROL; buf[2] = 4; // length of block buf[3] = (maskIndex != wxNOT_FOUND) ? 1 : 0; // has transparency - buf[4] = delayMilliSecs / 10; // delay time - buf[5] = 0; + buf[4] = delay & 0xff; // delay time + buf[5] = (delay >> 8) & 0xff; // delay time second byte buf[6] = (maskIndex != wxNOT_FOUND) ? (wxUint8) maskIndex : 0; buf[7] = 0; return wxGIFHandler_Write(stream, buf, sizeof(buf)); diff --git a/3rdparty/wxwidgets3.0/src/common/languageinfo.cpp b/3rdparty/wxwidgets3.0/src/common/languageinfo.cpp index b162aea070..db69b404fd 100644 --- a/3rdparty/wxwidgets3.0/src/common/languageinfo.cpp +++ b/3rdparty/wxwidgets3.0/src/common/languageinfo.cpp @@ -151,9 +151,6 @@ #ifndef LANG_JAPANESE #define LANG_JAPANESE (0) #endif -#ifndef LANG_KABYLE -#define LANG_KABYLE (0) -#endif #ifndef LANG_KANNADA #define LANG_KANNADA (0) #endif @@ -268,6 +265,9 @@ #ifndef LANG_VIETNAMESE #define LANG_VIETNAMESE (0) #endif +#ifndef LANG_KABYLE +#define LANG_KABYLE (0) +#endif #ifndef SUBLANG_ARABIC_ALGERIA #define SUBLANG_ARABIC_ALGERIA SUBLANG_DEFAULT #endif @@ -666,7 +666,6 @@ void wxLocale::InitLanguagesDB() LNG(wxLANGUAGE_ITALIAN_SWISS, "it_CH", LANG_ITALIAN , SUBLANG_ITALIAN_SWISS , wxLayout_LeftToRight, "Italian (Swiss)") LNG(wxLANGUAGE_JAPANESE, "ja_JP", LANG_JAPANESE , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Japanese") LNG(wxLANGUAGE_JAVANESE, "jv" , 0 , 0 , wxLayout_LeftToRight, "Javanese") - LNG(wxLANGUAGE_KABYLE, "kab" , LANG_KABYLE , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Kabyle") LNG(wxLANGUAGE_KANNADA, "kn" , LANG_KANNADA , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Kannada") LNG(wxLANGUAGE_KASHMIRI, "ks" , LANG_KASHMIRI , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Kashmiri") LNG(wxLANGUAGE_KASHMIRI_INDIA, "ks_IN", LANG_KASHMIRI , SUBLANG_KASHMIRI_INDIA , wxLayout_LeftToRight, "Kashmiri (India)") @@ -789,6 +788,7 @@ void wxLocale::InitLanguagesDB() LNG(wxLANGUAGE_YORUBA, "yo" , 0 , 0 , wxLayout_LeftToRight, "Yoruba") LNG(wxLANGUAGE_ZHUANG, "za" , 0 , 0 , wxLayout_LeftToRight, "Zhuang") LNG(wxLANGUAGE_ZULU, "zu" , 0 , 0 , wxLayout_LeftToRight, "Zulu") + LNG(wxLANGUAGE_KABYLE, "kab" , LANG_KABYLE , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Kabyle") } #undef LNG diff --git a/3rdparty/wxwidgets3.0/src/common/sckaddr.cpp b/3rdparty/wxwidgets3.0/src/common/sckaddr.cpp index da66df3cdf..f2adc5634e 100644 --- a/3rdparty/wxwidgets3.0/src/common/sckaddr.cpp +++ b/3rdparty/wxwidgets3.0/src/common/sckaddr.cpp @@ -46,7 +46,7 @@ #include -#if defined(__UNIX__) && !defined(__WXMSW__) +#if defined(__UNIX__) && !defined(__WINDOWS__) #include #include #endif // __UNIX__ diff --git a/3rdparty/wxwidgets3.0/src/common/stopwatch.cpp b/3rdparty/wxwidgets3.0/src/common/stopwatch.cpp index 47745b8085..aad2b0bb68 100644 --- a/3rdparty/wxwidgets3.0/src/common/stopwatch.cpp +++ b/3rdparty/wxwidgets3.0/src/common/stopwatch.cpp @@ -67,7 +67,19 @@ struct PerfCounter wxCRIT_SECT_DECLARE_MEMBER(cs); LARGE_INTEGER freq; bool init; -} gs_perfCounter; +}; + +// Return the global perf counter state. +// +// This is wrapped in a function to avoid initialization order problems, +// otherwise simply creating a global wxStopWatch variable could crash because +// it would be using a (possibly) still uninitialized critical section. +PerfCounter& GetPerfCounterState() +{ + static PerfCounter s_perfCounter; + + return s_perfCounter; +} #endif // __WINDOWS__ @@ -79,10 +91,11 @@ const int MICROSECONDS_PER_SECOND = 1000*1000; void wxStopWatch::DoStart() { #ifdef __WINDOWS__ - if ( !gs_perfCounter.init ) + PerfCounter& perfCounter = GetPerfCounterState(); + if ( !perfCounter.init ) { - wxCRIT_SECT_LOCKER(lock, gs_perfCounter.cs); - ::QueryPerformanceFrequency(&gs_perfCounter.freq); + wxCRIT_SECT_LOCKER(lock, perfCounter.cs); + ::QueryPerformanceFrequency(&perfCounter.freq); // Just a sanity check: it's not supposed to happen but verify that // ::QueryPerformanceCounter() succeeds so that we can really use it. @@ -92,10 +105,10 @@ void wxStopWatch::DoStart() wxLogDebug("QueryPerformanceCounter() unexpected failed (%s), " "will not use it.", wxSysErrorMsg()); - gs_perfCounter.freq.QuadPart = 0; + perfCounter.freq.QuadPart = 0; } - gs_perfCounter.init = true; + perfCounter.init = true; } #endif // __WINDOWS__ @@ -107,8 +120,8 @@ wxLongLong wxStopWatch::GetClockFreq() const #ifdef __WINDOWS__ // Under MSW we use the high resolution performance counter timer which has // its own frequency (usually related to the CPU clock speed). - if ( gs_perfCounter.CanBeUsed() ) - return gs_perfCounter.freq.QuadPart; + if ( GetPerfCounterState().CanBeUsed() ) + return GetPerfCounterState().freq.QuadPart; #endif // __WINDOWS__ #ifdef HAVE_GETTIMEOFDAY @@ -136,7 +149,7 @@ void wxStopWatch::Start(long t0) wxLongLong wxStopWatch::GetCurrentClockValue() const { #ifdef __WINDOWS__ - if ( gs_perfCounter.CanBeUsed() ) + if ( GetPerfCounterState().CanBeUsed() ) { LARGE_INTEGER counter; ::QueryPerformanceCounter(&counter); diff --git a/3rdparty/wxwidgets3.0/src/common/string.cpp b/3rdparty/wxwidgets3.0/src/common/string.cpp index a2f18a8b49..2d30e939ee 100644 --- a/3rdparty/wxwidgets3.0/src/common/string.cpp +++ b/3rdparty/wxwidgets3.0/src/common/string.cpp @@ -1244,17 +1244,17 @@ wxString wxString::Mid(size_t nFirst, size_t nCount) const } // out-of-bounds requests return sensible things - if ( nFirst + nCount > nLen ) - { - nCount = nLen - nFirst; - } - if ( nFirst > nLen ) { // AllocCopy() will return empty string return wxEmptyString; } + if ( nCount > nLen - nFirst ) + { + nCount = nLen - nFirst; + } + wxString dest(*this, nFirst, nCount); if ( dest.length() != nCount ) { @@ -1797,6 +1797,8 @@ bool wxString::ToCULong(unsigned long *pVal, int base) const // point which is different in different locales. bool wxString::ToCDouble(double *pVal) const { + // See the explanations in FromCDouble() below for the reasons for all this. + // Create a copy of this string using the decimal point instead of whatever // separator the current locale uses. #if wxUSE_INTL @@ -1854,20 +1856,19 @@ wxString wxString::FromCDouble(double val, int precision) { wxCHECK_MSG( precision >= -1, wxString(), "Invalid negative precision" ); -#if wxUSE_STD_IOSTREAM && wxUSE_STD_STRING - // We assume that we can use the ostream and not wstream for numbers. - wxSTD ostringstream os; - if ( precision != -1 ) - { - os.precision(precision); - os.setf(std::ios::fixed, std::ios::floatfield); - } + // Unfortunately there is no good way to get the number directly in the C + // locale. Some platforms provide special functions to do this (e.g. + // _sprintf_l() in MSVS or sprintf_l() in BSD systems), but some systems we + // still support don't have them and it doesn't seem worth it to have two + // different ways to do the same thing. Also, in principle, using the + // standard C++ streams should allow us to do it, but some implementations + // of them are horribly broken and actually change the global C locale, + // thus randomly affecting the results produced in other threads, when + // imbue() stream method is called (for the record, the latest libstdc++ + // version included in OS X does it and so seem to do the versions + // currently included in Android NDK and both FreeBSD and OpenBSD), so we + // can't do this neither and are reduced to this hack. - os << val; - return os.str(); -#else // !wxUSE_STD_IOSTREAM - // Can't use iostream locale support, fall back to the manual method - // instead. wxString s = FromDouble(val, precision); #if wxUSE_INTL wxString sep = wxLocale::GetInfo(wxLOCALE_DECIMAL_POINT, @@ -1881,7 +1882,6 @@ wxString wxString::FromCDouble(double val, int precision) s.Replace(sep, "."); return s; -#endif // wxUSE_STD_IOSTREAM/!wxUSE_STD_IOSTREAM } // --------------------------------------------------------------------------- diff --git a/3rdparty/wxwidgets3.0/src/common/translation.cpp b/3rdparty/wxwidgets3.0/src/common/translation.cpp index 455fb315d0..b5b33de9f1 100644 --- a/3rdparty/wxwidgets3.0/src/common/translation.cpp +++ b/3rdparty/wxwidgets3.0/src/common/translation.cpp @@ -95,6 +95,8 @@ wxStringToStringHashMap gs_msgIdCharset; // Platform specific helpers // ---------------------------------------------------------------------------- +#if wxUSE_LOG_TRACE + void LogTraceArray(const char *prefix, const wxArrayString& arr) { wxLogTrace(TRACE_I18N, "%s: [%s]", prefix, wxJoin(arr, ',')); @@ -107,6 +109,13 @@ void LogTraceLargeArray(const wxString& prefix, const wxArrayString& arr) wxLogTrace(TRACE_I18N, " %s", *i); } +#else // !wxUSE_LOG_TRACE + +#define LogTraceArray(prefix, arr) +#define LogTraceLargeArray(prefix, arr) + +#endif // wxUSE_LOG_TRACE/!wxUSE_LOG_TRACE + // Use locale-based detection as a fallback wxString GetPreferredUILanguageFallback(const wxArrayString& WXUNUSED(available)) { @@ -180,6 +189,8 @@ wxString GetPreferredUILanguage(const wxArrayString& available) #elif defined(__WXOSX__) +#if wxUSE_LOG_TRACE + void LogTraceArray(const char *prefix, CFArrayRef arr) { wxString s; @@ -193,6 +204,8 @@ void LogTraceArray(const char *prefix, CFArrayRef arr) wxLogTrace(TRACE_I18N, "%s: [%s]", prefix, s); } +#endif // wxUSE_LOG_TRACE + wxString GetPreferredUILanguage(const wxArrayString& available) { wxStringToStringHashMap availableNormalized; diff --git a/3rdparty/wxwidgets3.0/src/generic/animateg.cpp b/3rdparty/wxwidgets3.0/src/generic/animateg.cpp index f267c21cdb..dd2adecffc 100644 --- a/3rdparty/wxwidgets3.0/src/generic/animateg.cpp +++ b/3rdparty/wxwidgets3.0/src/generic/animateg.cpp @@ -358,7 +358,7 @@ void wxAnimationCtrl::SetInactiveBitmap(const wxBitmap &bmp) // (which uses the bitmap's mask), our background colour would be used for // transparent areas - and that's not what we want (at least for // consistency with the GTK version) - if ( bmp.GetMask() != NULL && GetParent() != NULL ) + if ( bmp.IsOk() && bmp.GetMask() != NULL && GetParent() != NULL ) SetBackgroundColour(GetParent()->GetBackgroundColour()); wxAnimationCtrlBase::SetInactiveBitmap(bmp); diff --git a/3rdparty/wxwidgets3.0/src/generic/datavgen.cpp b/3rdparty/wxwidgets3.0/src/generic/datavgen.cpp index 4e15c71aee..95ef21a99b 100644 --- a/3rdparty/wxwidgets3.0/src/generic/datavgen.cpp +++ b/3rdparty/wxwidgets3.0/src/generic/datavgen.cpp @@ -4359,6 +4359,13 @@ void wxDataViewMainWindow::OnMouse( wxMouseEvent &event ) unsigned int lineFrom = oldCurrentRow, lineTo = current; + if ( lineFrom == static_cast(-1) ) + { + // If we hadn't had any current row before, treat this as a + // simple click and select the new row only. + lineFrom = current; + } + if ( lineTo < lineFrom ) { lineTo = lineFrom; diff --git a/3rdparty/wxwidgets3.0/src/generic/graphicc.cpp b/3rdparty/wxwidgets3.0/src/generic/graphicc.cpp index 767bd09ec6..2d715e8ccf 100644 --- a/3rdparty/wxwidgets3.0/src/generic/graphicc.cpp +++ b/3rdparty/wxwidgets3.0/src/generic/graphicc.cpp @@ -387,7 +387,9 @@ class WXDLLIMPEXP_CORE wxCairoContext : public wxGraphicsContext public: wxCairoContext( wxGraphicsRenderer* renderer, const wxWindowDC& dc ); wxCairoContext( wxGraphicsRenderer* renderer, const wxMemoryDC& dc ); +#if wxUSE_PRINTING_ARCHITECTURE wxCairoContext( wxGraphicsRenderer* renderer, const wxPrinterDC& dc ); +#endif #ifdef __WXGTK__ wxCairoContext( wxGraphicsRenderer* renderer, GdkWindow *window ); #endif @@ -1314,6 +1316,10 @@ wxCairoBitmapData::wxCairoBitmapData( wxGraphicsRenderer* renderer, cairo_surfac { m_surface = bitmap; m_pattern = cairo_pattern_create_for_surface(m_surface); + + m_width = cairo_image_surface_get_width(m_surface); + m_height = cairo_image_surface_get_height(m_surface); + m_buffer = NULL; } wxCairoBitmapData::wxCairoBitmapData( wxGraphicsRenderer* renderer, const wxBitmap& bmp ) : wxGraphicsBitmapData( renderer ) @@ -1640,6 +1646,7 @@ public : bool m_offset; } ; +#if wxUSE_PRINTING_ARCHITECTURE wxCairoContext::wxCairoContext( wxGraphicsRenderer* renderer, const wxPrinterDC& dc ) : wxGraphicsContext(renderer) { @@ -1684,6 +1691,7 @@ wxCairoContext::wxCairoContext( wxGraphicsRenderer* renderer, const wxPrinterDC& org = dc.GetLogicalOrigin(); cairo_translate( m_context, -org.x, -org.y ); } +#endif wxCairoContext::wxCairoContext( wxGraphicsRenderer* renderer, const wxWindowDC& dc ) : wxGraphicsContext(renderer) @@ -2336,7 +2344,9 @@ public : virtual wxGraphicsContext * CreateContext( const wxWindowDC& dc); virtual wxGraphicsContext * CreateContext( const wxMemoryDC& dc); +#if wxUSE_PRINTING_ARCHITECTURE virtual wxGraphicsContext * CreateContext( const wxPrinterDC& dc); +#endif virtual wxGraphicsContext * CreateContextFromNativeContext( void * context ); @@ -2429,11 +2439,13 @@ wxGraphicsContext * wxCairoRenderer::CreateContext( const wxMemoryDC& dc) return new wxCairoContext(this,dc); } +#if wxUSE_PRINTING_ARCHITECTURE wxGraphicsContext * wxCairoRenderer::CreateContext( const wxPrinterDC& dc) { ENSURE_LOADED_OR_RETURN(NULL); return new wxCairoContext(this, dc); } +#endif #ifdef __WXMSW__ #if wxUSE_ENH_METAFILE diff --git a/3rdparty/wxwidgets3.0/src/generic/grid.cpp b/3rdparty/wxwidgets3.0/src/generic/grid.cpp index e292e452ba..6d7815a3ab 100644 --- a/3rdparty/wxwidgets3.0/src/generic/grid.cpp +++ b/3rdparty/wxwidgets3.0/src/generic/grid.cpp @@ -1680,10 +1680,7 @@ void wxGridColLabelWindow::OnPaint( wxPaintEvent& WXUNUSED(event) ) int x, y; m_owner->CalcUnscrolledPosition( 0, 0, &x, &y ); wxPoint pt = dc.GetDeviceOrigin(); - if (GetLayoutDirection() == wxLayout_RightToLeft) - dc.SetDeviceOrigin( pt.x+x, pt.y ); - else - dc.SetDeviceOrigin( pt.x-x, pt.y ); + dc.SetDeviceOrigin( pt.x-x, pt.y ); wxArrayInt cols = m_owner->CalcColLabelsExposed( GetUpdateRegion() ); m_owner->DrawColLabels( dc, cols ); @@ -2359,12 +2356,15 @@ wxGrid::SetTable(wxGridTableBase *table, m_numRows = table->GetNumberRows(); m_numCols = table->GetNumberCols(); - if ( m_useNativeHeader ) - GetGridColHeader()->SetColumnCount(m_numCols); - m_table = table; m_table->SetView( this ); m_ownTable = takeOwnership; + + // Notice that this must be called after setting m_table as it uses it + // indirectly, via wxGrid::GetColLabelValue(). + if ( m_useNativeHeader ) + GetGridColHeader()->SetColumnCount(m_numCols); + m_selection = new wxGridSelection( this, selmode ); if (checkSelection) { @@ -3733,13 +3733,9 @@ void wxGrid::ProcessColLabelMouseEvent( wxMouseEvent& event ) // and check if we're on the "near" (usually left but right // in RTL case) part of the column - bool onNearPart; const int middle = GetColLeft(colValid) + GetColWidth(colValid)/2; - if ( GetLayoutDirection() == wxLayout_LeftToRight ) - onNearPart = (x <= middle); - else // wxLayout_RightToLeft - onNearPart = (x > middle); + const bool onNearPart = (x <= middle); // adjust for the column being dragged itself if ( pos < GetColPos(m_dragRowOrCol) ) diff --git a/3rdparty/wxwidgets3.0/src/generic/listctrl.cpp b/3rdparty/wxwidgets3.0/src/generic/listctrl.cpp index f17dd0124f..771c400bb4 100644 --- a/3rdparty/wxwidgets3.0/src/generic/listctrl.cpp +++ b/3rdparty/wxwidgets3.0/src/generic/listctrl.cpp @@ -1420,6 +1420,13 @@ wxListTextCtrlWrapper::wxListTextCtrlWrapper(wxListMainWindow *owner, void wxListTextCtrlWrapper::EndEdit(EndReason reason) { + if( m_aboutToFinish ) + { + // We already called Finish which cannot be called + // more than once. + return; + } + m_aboutToFinish = true; switch ( reason ) @@ -1525,6 +1532,7 @@ void wxListTextCtrlWrapper::OnKillFocus( wxFocusEvent &event ) { if ( !m_aboutToFinish ) { + m_aboutToFinish = true; if ( !AcceptChanges() ) m_owner->OnRenameCancelled( m_itemEdited ); @@ -2252,6 +2260,17 @@ wxTextCtrl *wxListMainWindow::EditLabel(long item, wxClassInfo* textControlClass return m_textctrlWrapper->GetText(); } +bool wxListMainWindow::EndEditLabel(bool cancel) +{ + if (!m_textctrlWrapper) + { + return false; + } + + m_textctrlWrapper->EndEdit(cancel ? wxListTextCtrlWrapper::End_Discard : wxListTextCtrlWrapper::End_Accept); + return true; +} + void wxListMainWindow::OnRenameTimer() { wxCHECK_RET( HasCurrent(), wxT("unexpected rename timer") ); @@ -5057,6 +5076,13 @@ wxTextCtrl *wxGenericListCtrl::EditLabel(long item, return m_mainWin->EditLabel( item, textControlClass ); } +#if wxABI_VERSION >= 30002 +bool wxGenericListCtrl::EndEditLabel(bool cancel) +{ + return m_mainWin->EndEditLabel(cancel); +} +#endif + wxTextCtrl *wxGenericListCtrl::GetEditControl() const { return m_mainWin->GetEditControl(); diff --git a/3rdparty/wxwidgets3.0/src/generic/preferencesg.cpp b/3rdparty/wxwidgets3.0/src/generic/preferencesg.cpp index 97236af305..45b311de64 100644 --- a/3rdparty/wxwidgets3.0/src/generic/preferencesg.cpp +++ b/3rdparty/wxwidgets3.0/src/generic/preferencesg.cpp @@ -81,6 +81,11 @@ public: m_notebook->ChangeSelection(page); } + bool ShouldPreventAppExit() const + { + return false; + } + private: wxNotebook *m_notebook; }; diff --git a/3rdparty/wxwidgets3.0/src/generic/srchctlg.cpp b/3rdparty/wxwidgets3.0/src/generic/srchctlg.cpp index ccf7ccbcfc..758a195cc9 100644 --- a/3rdparty/wxwidgets3.0/src/generic/srchctlg.cpp +++ b/3rdparty/wxwidgets3.0/src/generic/srchctlg.cpp @@ -38,17 +38,6 @@ // the margin between the text control and the search/cancel buttons static const wxCoord MARGIN = 2; -// border around all controls to compensate for wxSIMPLE_BORDER -#if defined(__WXMSW__) -static const wxCoord BORDER = 0; -static const wxCoord ICON_MARGIN = 2; -static const wxCoord ICON_OFFSET = 2; -#else -static const wxCoord BORDER = 2; -static const wxCoord ICON_MARGIN = 0; -static const wxCoord ICON_OFFSET = 0; -#endif - #define LIGHT_STEP 160 // ---------------------------------------------------------------------------- @@ -127,7 +116,7 @@ protected: // // This is a bit ugly and it would arguably be better to use whatever size // the base class version returns and just centre the text vertically in - // the search control but I failed to modify the code in LayoutControls() + // the search control but I failed to modify the code in DoLayoutControls() // to do this easily and as there is much in that code I don't understand // (notably what is the logic for buttons sizing?) I prefer to not touch it // at all. @@ -381,8 +370,7 @@ void wxSearchCtrl::SetMenu( wxMenu* menu ) m_searchButton->Refresh(); } } - wxRect rect = GetRect(); - LayoutControls(0, 0, rect.GetWidth(), rect.GetHeight()); + DoLayoutControls(); } wxMenu* wxSearchCtrl::GetMenu() @@ -405,8 +393,7 @@ void wxSearchCtrl::ShowSearchButton( bool show ) RecalcBitmaps(); } - wxRect rect = GetRect(); - LayoutControls(0, 0, rect.GetWidth(), rect.GetHeight()); + DoLayoutControls(); } bool wxSearchCtrl::IsSearchButtonVisible() const @@ -424,8 +411,7 @@ void wxSearchCtrl::ShowCancelButton( bool show ) } m_cancelButtonVisible = show; - wxRect rect = GetRect(); - LayoutControls(0, 0, rect.GetWidth(), rect.GetHeight()); + DoLayoutControls(); } bool wxSearchCtrl::IsCancelButtonVisible() const @@ -470,30 +456,36 @@ wxSize wxSearchCtrl::DoGetBestSize() const // buttons are square and equal to the height of the text control int height = sizeText.y; return wxSize(sizeSearch.x + searchMargin + sizeText.x + cancelMargin + sizeCancel.x + 2*horizontalBorder, - height + 2*BORDER); + height) + DoGetBorderSize(); } void wxSearchCtrl::DoMoveWindow(int x, int y, int width, int height) { wxSearchCtrlBase::DoMoveWindow(x, y, width, height); - LayoutControls(0, 0, width, height); + DoLayoutControls(); } -void wxSearchCtrl::LayoutControls(int x, int y, int width, int height) +void wxSearchCtrl::LayoutControls(int WXUNUSED(x), int WXUNUSED(y), + int WXUNUSED(width), int WXUNUSED(height)) +{ + DoLayoutControls(); +} + +void wxSearchCtrl::DoLayoutControls() { if ( !m_text ) return; + const wxSize sizeTotal = GetClientSize(); + int width = sizeTotal.x, + height = sizeTotal.y; + wxSize sizeText = m_text->GetBestSize(); // make room for the search menu & clear button - int horizontalBorder = ( sizeText.y - sizeText.y * 14 / 21 ) / 2; - x += horizontalBorder; - y += BORDER; + int horizontalBorder = 1 + ( sizeText.y - sizeText.y * 14 / 21 ) / 2; + int x = horizontalBorder; width -= horizontalBorder*2; - height -= BORDER*2; - if (width < 0) width = 0; - if (height < 0) height = 0; wxSize sizeSearch(0,0); wxSize sizeCancel(0,0); @@ -524,13 +516,17 @@ void wxSearchCtrl::LayoutControls(int x, int y, int width, int height) // position the subcontrols inside the client area - m_searchButton->SetSize(x, y + ICON_OFFSET - 1, sizeSearch.x, height); - m_text->SetSize( x + sizeSearch.x + searchMargin, - y + ICON_OFFSET - BORDER, - textWidth, - height); - m_cancelButton->SetSize(x + sizeSearch.x + searchMargin + textWidth + cancelMargin, - y + ICON_OFFSET - 1, sizeCancel.x, height); + m_searchButton->SetSize(x, (height - sizeSearch.y) / 2, + sizeSearch.x, height); + x += sizeSearch.x; + x += searchMargin; + + m_text->SetSize(x, 0, textWidth, height); + x += textWidth; + x += cancelMargin; + + m_cancelButton->SetSize(x, (height - sizeCancel.y) / 2, + sizeCancel.x, height); } wxWindowList wxSearchCtrl::GetCompositeWindowParts() const @@ -1130,7 +1126,7 @@ void wxSearchCtrl::RecalcBitmaps() } wxSize sizeText = m_text->GetBestSize(); - int bitmapHeight = sizeText.y - 2 * ICON_MARGIN; + int bitmapHeight = sizeText.y - 4; int bitmapWidth = sizeText.y * 20 / 14; if ( !m_searchBitmapUser ) @@ -1177,7 +1173,7 @@ void wxSearchCtrl::RecalcBitmaps() m_cancelBitmap.GetWidth() != bitmapHeight ) { - m_cancelBitmap = RenderCancelBitmap(bitmapHeight-BORDER-1,bitmapHeight-BORDER-1); // square + m_cancelBitmap = RenderCancelBitmap(bitmapHeight,bitmapHeight); // square m_cancelButton->SetBitmapLabel(m_cancelBitmap); } // else this bitmap was set by user, don't alter @@ -1200,9 +1196,7 @@ void wxSearchCtrl::OnSetFocus( wxFocusEvent& /*event*/ ) void wxSearchCtrl::OnSize( wxSizeEvent& WXUNUSED(event) ) { - int width, height; - GetSize(&width, &height); - LayoutControls(0, 0, width, height); + DoLayoutControls(); } #if wxUSE_MENUS diff --git a/3rdparty/wxwidgets3.0/src/generic/treectlg.cpp b/3rdparty/wxwidgets3.0/src/generic/treectlg.cpp index 4637767193..b81a0b4f09 100644 --- a/3rdparty/wxwidgets3.0/src/generic/treectlg.cpp +++ b/3rdparty/wxwidgets3.0/src/generic/treectlg.cpp @@ -458,6 +458,13 @@ wxTreeTextCtrl::wxTreeTextCtrl(wxGenericTreeCtrl *owner, void wxTreeTextCtrl::EndEdit(bool discardChanges) { + if ( m_aboutToFinish ) + { + // We already called Finish which cannot be called + // more than once. + return; + } + m_aboutToFinish = true; if ( discardChanges ) @@ -555,6 +562,7 @@ void wxTreeTextCtrl::OnKillFocus( wxFocusEvent &event ) { if ( !m_aboutToFinish ) { + m_aboutToFinish = true; if ( !AcceptChanges() ) m_owner->OnRenameCancelled( m_itemEdited ); @@ -1307,6 +1315,10 @@ bool wxGenericTreeCtrl::IsVisible(const wxTreeItemId& item) const { wxCHECK_MSG( item.IsOk(), false, wxT("invalid tree item") ); + // Hidden root item is never visible. + if ( item == GetRootItem() && HasFlag(wxTR_HIDE_ROOT) ) + return false; + // An item is only visible if it's not a descendant of a collapsed item wxGenericTreeItem *pItem = (wxGenericTreeItem*) item.m_pItem; wxGenericTreeItem* parent = pItem->GetParent(); @@ -3502,9 +3514,10 @@ wxTextCtrl* wxGenericTreeCtrl::GetEditControl() const void wxGenericTreeCtrl::EndEditLabel(const wxTreeItemId& WXUNUSED(item), bool discardChanges) { - wxCHECK_RET( m_textCtrl, wxT("not editing label") ); - - m_textCtrl->EndEdit(discardChanges); + if (m_textCtrl) + { + m_textCtrl->EndEdit(discardChanges); + } } bool wxGenericTreeCtrl::OnRenameAccept(wxGenericTreeItem *item, @@ -3696,46 +3709,39 @@ void wxGenericTreeCtrl::OnMouse( wxMouseEvent &event ) #endif } } - else if ( event.LeftUp() || event.RightUp() ) + else if ( (event.LeftUp() || event.RightUp()) && m_isDragging ) { - if ( m_isDragging ) + ReleaseMouse(); + + // erase the highlighting + DrawDropEffect(m_dropTarget); + + if ( m_oldSelection ) { - ReleaseMouse(); + m_oldSelection->SetHilight(true); + RefreshLine(m_oldSelection); + m_oldSelection = NULL; + } - // erase the highlighting - DrawDropEffect(m_dropTarget); + // generate the drag end event + wxTreeEvent eventEndDrag(wxEVT_TREE_END_DRAG, this, item); - if ( m_oldSelection ) - { - m_oldSelection->SetHilight(true); - RefreshLine(m_oldSelection); - m_oldSelection = NULL; - } + eventEndDrag.m_pointDrag = CalcScrolledPosition(pt); - // generate the drag end event - wxTreeEvent eventEndDrag(wxEVT_TREE_END_DRAG, this, item); + (void)GetEventHandler()->ProcessEvent(eventEndDrag); - eventEndDrag.m_pointDrag = CalcScrolledPosition(pt); + m_isDragging = false; + m_dropTarget = NULL; - (void)GetEventHandler()->ProcessEvent(eventEndDrag); - - m_isDragging = false; - m_dropTarget = NULL; - - SetCursor(m_oldCursor); + SetCursor(m_oldCursor); #if defined( __WXMSW__ ) || defined(__WXMAC__) || defined(__WXGTK20__) - Update(); + Update(); #else - // TODO: remove this call or use wxEventLoopBase::GetActive()->YieldFor(wxEVT_CATEGORY_UI) - // instead (needs to be tested!) - wxYieldIfNeeded(); + // TODO: remove this call or use wxEventLoopBase::GetActive()->YieldFor(wxEVT_CATEGORY_UI) + // instead (needs to be tested!) + wxYieldIfNeeded(); #endif - } - else - { - event.Skip(); - } } else { diff --git a/3rdparty/wxwidgets3.0/src/msw/anybutton.cpp b/3rdparty/wxwidgets3.0/src/msw/anybutton.cpp index 870ad0526c..b5d6dc84c0 100644 --- a/3rdparty/wxwidgets3.0/src/msw/anybutton.cpp +++ b/3rdparty/wxwidgets3.0/src/msw/anybutton.cpp @@ -211,7 +211,8 @@ public: // we must be constructed with the size of our images as we need to create // the image list wxXPButtonImageData(wxAnyButton *btn, const wxBitmap& bitmap) - : m_iml(bitmap.GetWidth(), bitmap.GetHeight(), true /* use mask */, + : m_iml(bitmap.GetWidth(), bitmap.GetHeight(), + !bitmap.HasAlpha() /* use mask only if no alpha */, wxAnyButton::State_Max + 1 /* see "pulse" comment below */), m_hwndBtn(GetHwndOf(btn)) { @@ -831,7 +832,12 @@ wxAnyButton::State GetButtonState(wxAnyButton *btn, UINT state) if ( state & ODS_DISABLED ) return wxAnyButton::State_Disabled; - if ( state & ODS_SELECTED ) + // We need to check for the pressed state of the button itself before the + // other checks because even if it is selected or current, it it still + // pressed first and foremost. + const wxAnyButton::State btnState = btn->GetNormalState(); + + if ( btnState == wxAnyButton::State_Pressed || state & ODS_SELECTED ) return wxAnyButton::State_Pressed; if ( btn->HasCapture() || btn->IsMouseInWindow() ) @@ -840,7 +846,7 @@ wxAnyButton::State GetButtonState(wxAnyButton *btn, UINT state) if ( state & ODS_FOCUS ) return wxAnyButton::State_Focused; - return btn->GetNormalState(); + return btnState; } void DrawButtonText(HDC hdc, diff --git a/3rdparty/wxwidgets3.0/src/msw/bitmap.cpp b/3rdparty/wxwidgets3.0/src/msw/bitmap.cpp index a58283f8c1..a0abcad045 100644 --- a/3rdparty/wxwidgets3.0/src/msw/bitmap.cpp +++ b/3rdparty/wxwidgets3.0/src/msw/bitmap.cpp @@ -339,6 +339,60 @@ wxGDIRefData *wxBitmap::CloneGDIRefData(const wxGDIRefData *data) const return new wxBitmapRefData(*static_cast(data)); } +// Premultiply the values of all RGBA pixels in the given range. +static void PremultiplyPixels(unsigned char* begin, unsigned char* end) +{ + for ( unsigned char* pixels = begin; pixels < end; pixels += 4 ) + { + const unsigned char a = pixels[3]; + + pixels[0] = ((pixels[0]*a) + 127)/255; + pixels[1] = ((pixels[1]*a) + 127)/255; + pixels[2] = ((pixels[2]*a) + 127)/255; + } +} + +// Helper which examines the alpha channel for any non-0 values and also +// possibly returns the DIB with premultiplied values if it does have alpha +// (i.e. this DIB is only filled if the function returns true). +// +// The function semantics is complicated but necessary to avoid converting to +// DIB twice, which is expensive for large bitmaps, yet avoid code duplication +// between CopyFromIconOrCursor() and MSWUpdateAlpha(). +static bool CheckAlpha(HBITMAP hbmp, HBITMAP* hdib = NULL) +{ + BITMAP bm; + if ( !::GetObject(hbmp, sizeof(bm), &bm) || (bm.bmBitsPixel != 32) ) + return false; + + wxDIB dib(hbmp); + if ( !dib.IsOk() ) + return false; + + unsigned char* pixels = dib.GetData(); + unsigned char* const end = pixels + 4*dib.GetWidth()*dib.GetHeight(); + for ( ; pixels < end; pixels += 4 ) + { + if ( pixels[3] != 0 ) + { + if ( hdib ) + { + // If we do have alpha, ensure we use premultiplied data for + // our pixels as this is what the bitmaps created in other ways + // do and this is necessary for e.g. AlphaBlend() to work with + // this bitmap. + PremultiplyPixels(dib.GetData(), end); + + *hdib = dib.Detach(); + } + + return true; + } + } + + return false; +} + bool wxBitmap::CopyFromIconOrCursor(const wxGDIImage& icon, wxBitmapTransparency transp) { @@ -360,11 +414,24 @@ bool wxBitmap::CopyFromIconOrCursor(const wxGDIImage& icon, int w = icon.GetWidth(), h = icon.GetHeight(); - refData->m_width = w; - refData->m_height = h; - refData->m_depth = wxDisplayDepth(); - - refData->m_hBitmap = (WXHBITMAP)iconInfo.hbmColor; + if ( iconInfo.hbmColor ) + { + refData->m_width = w; + refData->m_height = h; + refData->m_depth = wxDisplayDepth(); + refData->m_hBitmap = (WXHBITMAP)iconInfo.hbmColor; + } + else // we only have monochrome icon/cursor + { + // Then we need to create our own empty bitmap, which will be modified + // by the mask below. + wxDIB dib(w, h, wxDisplayDepth()); + if ( dib.IsOk() ) + { + memset(dib.GetData(), 0, wxDIB::GetLineSize(w, dib.GetDepth())*h); + refData->AssignDIB(dib); + } + } switch ( transp ) { @@ -379,48 +446,14 @@ bool wxBitmap::CopyFromIconOrCursor(const wxGDIImage& icon, #if wxUSE_WXDIB // If the icon is 32 bits per pixel then it may have alpha channel // data, although there are some icons that are 32 bpp but have no - // alpha... So convert to a DIB and manually check the 4th byte for - // each pixel. + // alpha, so check for this. { - BITMAP bm; - if ( ::GetObject(iconInfo.hbmColor, sizeof(bm), &bm) && - (bm.bmBitsPixel == 32) ) + HBITMAP hdib = 0; + if ( CheckAlpha(iconInfo.hbmColor, &hdib) ) { - wxDIB dib(iconInfo.hbmColor); - if (dib.IsOk()) - { - unsigned char* const pixels = dib.GetData(); - int idx; - for ( idx = 0; idx < w*h*4; idx += 4 ) - { - if (pixels[idx+3] != 0) - { - // If there is an alpha byte that is non-zero - // then set the alpha flag and stop checking - refData->m_hasAlpha = true; - break; - } - } - - if ( refData->m_hasAlpha ) - { - // If we do have alpha, ensure we use premultiplied - // data for our pixels as this is what the bitmaps - // created in other ways do and this is necessary - // for e.g. AlphaBlend() to work with this bitmap. - for ( idx = 0; idx < w*h*4; idx += 4 ) - { - const unsigned char a = pixels[idx+3]; - - pixels[idx] = ((pixels[idx] *a) + 127)/255; - pixels[idx+1] = ((pixels[idx+1]*a) + 127)/255; - pixels[idx+2] = ((pixels[idx+2]*a) + 127)/255; - } - - ::DeleteObject(refData->m_hBitmap); - refData->m_hBitmap = dib.Detach(); - } - } + refData->m_hasAlpha = true; + ::DeleteObject(refData->m_hBitmap); + refData->m_hBitmap = hdib; } } break; @@ -1267,6 +1300,12 @@ bool wxBitmap::HasAlpha() const return GetBitmapData() && GetBitmapData()->m_hasAlpha; } +void wxBitmap::MSWUpdateAlpha() +{ + if ( CheckAlpha(GetHbitmap()) ) + GetBitmapData()->m_hasAlpha = true; +} + // ---------------------------------------------------------------------------- // wxBitmap setters // ---------------------------------------------------------------------------- diff --git a/3rdparty/wxwidgets3.0/src/msw/bmpcbox.cpp b/3rdparty/wxwidgets3.0/src/msw/bmpcbox.cpp index f6d5950a02..469ddace63 100644 --- a/3rdparty/wxwidgets3.0/src/msw/bmpcbox.cpp +++ b/3rdparty/wxwidgets3.0/src/msw/bmpcbox.cpp @@ -441,7 +441,7 @@ bool wxBitmapComboBox::MSWOnDraw(WXDRAWITEMSTRUCT *item) //if ( lpDrawItem->itemState & ODS_FOCUS ) // DrawFocusRect(lpDrawItem->hDC, &lpDrawItem->rcItem); - return TRUE; + return true; } bool wxBitmapComboBox::MSWOnMeasure(WXMEASUREITEMSTRUCT *item) @@ -449,9 +449,14 @@ bool wxBitmapComboBox::MSWOnMeasure(WXMEASUREITEMSTRUCT *item) LPMEASUREITEMSTRUCT lpMeasureItem = (LPMEASUREITEMSTRUCT) item; int pos = lpMeasureItem->itemID; - lpMeasureItem->itemHeight = wxBitmapComboBoxBase::MeasureItem(pos); + // Measure item height if item list is not empty, + // otherwise leave default system value. + if ( pos >= 0 ) + { + lpMeasureItem->itemHeight = wxBitmapComboBoxBase::MeasureItem(pos); + } - return TRUE; + return true; } #endif // wxUSE_BITMAPCOMBOBOX diff --git a/3rdparty/wxwidgets3.0/src/msw/calctrl.cpp b/3rdparty/wxwidgets3.0/src/msw/calctrl.cpp index ac0d8bbd76..8b6f359fa5 100644 --- a/3rdparty/wxwidgets3.0/src/msw/calctrl.cpp +++ b/3rdparty/wxwidgets3.0/src/msw/calctrl.cpp @@ -108,7 +108,7 @@ wxCalendarCtrl::Create(wxWindow *parent, } const wxChar * const clsname = s_clsMonthCal.IsRegistered() - ? s_clsMonthCal.GetName().t_str() + ? static_cast(s_clsMonthCal.GetName().t_str()) : MONTHCAL_CLASS; if ( !MSWCreateControl(clsname, wxEmptyString, pos, size) ) diff --git a/3rdparty/wxwidgets3.0/src/msw/control.cpp b/3rdparty/wxwidgets3.0/src/msw/control.cpp index 4bb6ae8423..79aa30a763 100644 --- a/3rdparty/wxwidgets3.0/src/msw/control.cpp +++ b/3rdparty/wxwidgets3.0/src/msw/control.cpp @@ -372,14 +372,26 @@ WXHBRUSH wxControl::DoMSWControlColor(WXHDC pDC, wxColour colBg, WXHWND hWnd) // If this HWND doesn't correspond to a wxWindow, it still might be // one of its children for which we need to set the background // brush, e.g. this is the case for the EDIT control that is part - // of wxComboBox. Check for this by asking the parent if it has it: - HWND parent = ::GetParent(hWnd); - if ( parent ) + // of wxComboBox but also e.g. of wxSlider label HWNDs which are + // logically part of it, but are siblings of the main control at + // Windows level. + // + // So check whether it's a sibling of this window which is part of + // the same wx object. + if ( ContainsHWND(hWnd) ) { - wxWindow *winParent = wxFindWinFromHandle( parent ); - if( winParent && winParent->ContainsHWND( hWnd ) ) - win = winParent; - } + win = this; + } + else // Or maybe a child sub-window of this one. + { + HWND parent = ::GetParent(hWnd); + if ( parent ) + { + wxWindow *winParent = wxFindWinFromHandle( parent ); + if( winParent && winParent->ContainsHWND( hWnd ) ) + win = winParent; + } + } } if ( win ) diff --git a/3rdparty/wxwidgets3.0/src/msw/dc.cpp b/3rdparty/wxwidgets3.0/src/msw/dc.cpp index 2910a5a07c..abd8956f34 100644 --- a/3rdparty/wxwidgets3.0/src/msw/dc.cpp +++ b/3rdparty/wxwidgets3.0/src/msw/dc.cpp @@ -1037,7 +1037,9 @@ void wxMSWDCImpl::DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord h wxCoord x2 = x + width; wxCoord y2 = y + height; - wxCoord x2dev = XLOG2DEV(x2), + wxCoord x1dev = XLOG2DEV(x), + y1dev = YLOG2DEV(y), + x2dev = XLOG2DEV(x2), y2dev = YLOG2DEV(y2); // Windows (but not Windows CE) draws the filled rectangles without outline @@ -1046,12 +1048,18 @@ void wxMSWDCImpl::DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord h #ifndef __WXWINCE__ if ( m_pen.IsTransparent() ) { - x2dev++; + // Right edge to be extended is "displayed right edge" + // and hence its device coordinates depend + // on layout direction and can be either x1 or x2. + if ( GetLayoutDirection() == wxLayout_RightToLeft ) + x1dev--; + else + x2dev++; y2dev++; } #endif // !__WXWINCE__ - (void)Rectangle(GetHdc(), XLOG2DEV(x), YLOG2DEV(y), x2dev, y2dev); + (void)Rectangle(GetHdc(), x1dev, y1dev, x2dev, y2dev); CalcBoundingBox(x, y); CalcBoundingBox(x2, y2); @@ -1932,6 +1940,50 @@ void ApplyEffectiveScale(double scale, int sign, int *device, int *logical) *logical = sign*wxRound(VIEWPORT_EXTENT/scale); } +// Binary GCD algorithm +// See: http://en.wikipedia.org/wiki/Binary_GCD_algorithm#Iterative_version_in_C +unsigned int CalcGCD(unsigned int u, unsigned int v) +{ + // GCD(0,v) == v; GCD(u,0) == u, GCD(0,0) == 0 + if (u == 0) + return v; + if (v == 0) + return u; + + int shift; + + // Let shift := lg K, where K is the greatest power of 2 + // dividing both u and v. + for (shift = 0; ((u | v) & 1) == 0; ++shift) + { + u >>= 1; + v >>= 1; + } + + while ((u & 1) == 0) + u >>= 1; + + // From here on, u is always odd. + do + { + // remove all factors of 2 in v -- they are not common + // note: v is not zero, so while will terminate + while ((v & 1) == 0) + v >>= 1; + + // Now u and v are both odd. Swap if necessary so u <= v, + // then set v = v - u (which is even) + if (u > v) + { + wxSwap(u, v); + } + v -= u; // Here v >= u + } while (v != 0); + + // restore common factors of 2 + return u << shift; +} + } // anonymous namespace void wxMSWDCImpl::RealizeScaleAndOrigin() @@ -1952,6 +2004,16 @@ void wxMSWDCImpl::RealizeScaleAndOrigin() ApplyEffectiveScale(m_scaleX, m_signX, &devExtX, &logExtX); ApplyEffectiveScale(m_scaleY, m_signY, &devExtY, &logExtY); + // Becaue only devExtX/logExtX ratio and devExtY/logExtY ratio are counted + // we can reduce the fractions to avoid large absolute numbers + // and possible arithmetic overflows. + unsigned int gcd = CalcGCD(abs(devExtX), abs(logExtX)); + devExtX /= gcd; + logExtX /= gcd; + gcd = CalcGCD(abs(devExtY), abs(logExtY)); + devExtY /= gcd; + logExtY /= gcd; + ::SetViewportExtEx(GetHdc(), devExtX, devExtY, NULL); ::SetWindowExtEx(GetHdc(), logExtX, logExtY, NULL); diff --git a/3rdparty/wxwidgets3.0/src/msw/dirdlg.cpp b/3rdparty/wxwidgets3.0/src/msw/dirdlg.cpp index 549adec9ba..4f2c898d8e 100644 --- a/3rdparty/wxwidgets3.0/src/msw/dirdlg.cpp +++ b/3rdparty/wxwidgets3.0/src/msw/dirdlg.cpp @@ -386,17 +386,26 @@ int wxDirDialog::ShowIFileDialog(WXHWND owner) NULL, wxIID_PPV_ARGS(IShellItem, &folder)); - if ( FAILED(hr) ) - { - wxLogApiError(wxS("SHCreateItemFromParsingName"), hr); - return wxID_NONE; - } - hr = fileDialog->SetFolder(folder); + // Failing to parse the folder name is not really an error, we'll just + // ignore the initial directory in this case, but we should still show + // the dialog. if ( FAILED(hr) ) { - wxLogApiError(wxS("IFileDialog::SetFolder"), hr); - return wxID_NONE; + if ( hr != HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) ) + { + wxLogApiError(wxS("SHCreateItemFromParsingName"), hr); + return wxID_NONE; + } + } + else // The folder was parsed correctly. + { + hr = fileDialog->SetFolder(folder); + if ( FAILED(hr) ) + { + wxLogApiError(wxS("IFileDialog::SetFolder"), hr); + return wxID_NONE; + } } } diff --git a/3rdparty/wxwidgets3.0/src/msw/font.cpp b/3rdparty/wxwidgets3.0/src/msw/font.cpp index 6c747e821e..78786d142d 100644 --- a/3rdparty/wxwidgets3.0/src/msw/font.cpp +++ b/3rdparty/wxwidgets3.0/src/msw/font.cpp @@ -360,7 +360,7 @@ void wxFontRefData::Init(int pointSize, if ( m_sizeUsingPixels ) SetPixelSize(pixelSize); else - SetPointSize(pointSize); + SetPointSize(pointSize == -1 ? wxNORMAL_FONT->GetPointSize() : pointSize); SetStyle(style); SetWeight(weight); @@ -841,7 +841,7 @@ bool wxFont::DoCreate(int pointSize, // wxDEFAULT is a valid value for the font size too so we must treat it // specially here (otherwise the size would be 70 == wxDEFAULT value) - if ( pointSize == wxDEFAULT || pointSize == -1 ) + if ( pointSize == wxDEFAULT ) { pointSize = wxNORMAL_FONT->GetPointSize(); } diff --git a/3rdparty/wxwidgets3.0/src/msw/frame.cpp b/3rdparty/wxwidgets3.0/src/msw/frame.cpp index 8c1b178657..113420452e 100644 --- a/3rdparty/wxwidgets3.0/src/msw/frame.cpp +++ b/3rdparty/wxwidgets3.0/src/msw/frame.cpp @@ -286,6 +286,13 @@ void wxFrame::PositionStatusBar() int w, h; GetClientSize(&w, &h); + // Resize the status bar to its default height, as it could have been set + // to a wrong value before by WM_SIZE sent during the frame creation and + // our status bars preserve their programmatically set size to avoid being + // resized by DefWindowProc() to the full window width, so if we didn't do + // this here, the status bar would retain the possibly wrong current height. + m_frameStatusBar->SetSize(wxDefaultSize, wxSIZE_AUTO_HEIGHT); + int sw, sh; m_frameStatusBar->GetSize(&sw, &sh); diff --git a/3rdparty/wxwidgets3.0/src/msw/graphics.cpp b/3rdparty/wxwidgets3.0/src/msw/graphics.cpp index e46c3709c3..c0ce6da157 100644 --- a/3rdparty/wxwidgets3.0/src/msw/graphics.cpp +++ b/3rdparty/wxwidgets3.0/src/msw/graphics.cpp @@ -289,7 +289,9 @@ protected: private: // common part of Create{Linear,Radial}GradientBrush() template - void SetGradientStops(T *brush, const wxGraphicsGradientStops& stops); + void SetGradientStops(T *brush, + const wxGraphicsGradientStops& stops, + bool reversed = false); Brush* m_brush; Image* m_brushImage; @@ -857,7 +859,8 @@ void wxGDIPlusBrushData::Init() template void wxGDIPlusBrushData::SetGradientStops(T *brush, - const wxGraphicsGradientStops& stops) + const wxGraphicsGradientStops& stops, + bool reversed) { const unsigned numStops = stops.GetCount(); if ( numStops <= 2 ) @@ -870,12 +873,25 @@ wxGDIPlusBrushData::SetGradientStops(T *brush, wxVector colors(numStops); wxVector positions(numStops); - for ( unsigned i = 0; i < numStops; i++ ) + if ( reversed ) { - wxGraphicsGradientStop stop = stops.Item(i); + for ( unsigned i = 0; i < numStops; i++ ) + { + wxGraphicsGradientStop stop = stops.Item(numStops - i - 1); - colors[i] = wxColourToColor(stop.GetColour()); - positions[i] = stop.GetPosition(); + colors[i] = wxColourToColor(stop.GetColour()); + positions[i] = 1.0 - stop.GetPosition(); + } + } + else + { + for ( unsigned i = 0; i < numStops; i++ ) + { + wxGraphicsGradientStop stop = stops.Item(i); + + colors[i] = wxColourToColor(stop.GetColour()); + positions[i] = stop.GetPosition(); + } } brush->SetInterpolationColors(&colors[0], &positions[0], numStops); @@ -914,7 +930,9 @@ wxGDIPlusBrushData::CreateRadialGradientBrush(wxDouble xo, wxDouble yo, int count = 1; brush->SetSurroundColors(&col, &count); - SetGradientStops(brush, stops); + // Because the GDI+ API draws radial gradients from outside towards the + // center we have to reverse the order of the gradient stops. + SetGradientStops(brush, stops, true); } //----------------------------------------------------------------------------- diff --git a/3rdparty/wxwidgets3.0/src/msw/imaglist.cpp b/3rdparty/wxwidgets3.0/src/msw/imaglist.cpp index 7e100c32e0..37b308c7fd 100644 --- a/3rdparty/wxwidgets3.0/src/msw/imaglist.cpp +++ b/3rdparty/wxwidgets3.0/src/msw/imaglist.cpp @@ -374,7 +374,6 @@ bool wxImageList::Draw(int index, // Get the bitmap wxBitmap wxImageList::GetBitmap(int index) const { -#if wxUSE_WXDIB && wxUSE_IMAGE int bmp_width = 0, bmp_height = 0; GetSize(index, bmp_width, bmp_height); @@ -382,29 +381,50 @@ wxBitmap wxImageList::GetBitmap(int index) const wxMemoryDC dc; dc.SelectObject(bitmap); - // draw it the first time to find a suitable mask colour - ((wxImageList*)this)->Draw(index, dc, 0, 0, wxIMAGELIST_DRAW_TRANSPARENT); - dc.SelectObject(wxNullBitmap); +#if wxUSE_WXDIB && wxUSE_IMAGE + IMAGEINFO ii; + ImageList_GetImageInfo(GetHImageList(), index, &ii); + if ( ii.hbmMask ) + { + // draw it the first time to find a suitable mask colour + ((wxImageList*)this)->Draw(index, dc, 0, 0, wxIMAGELIST_DRAW_TRANSPARENT); + dc.SelectObject(wxNullBitmap); - // find the suitable mask colour - wxImage image = bitmap.ConvertToImage(); - unsigned char r = 0, g = 0, b = 0; - image.FindFirstUnusedColour(&r, &g, &b); + // find the suitable mask colour + wxImage image = bitmap.ConvertToImage(); + unsigned char r = 0, g = 0, b = 0; + image.FindFirstUnusedColour(&r, &g, &b); - // redraw whole image and bitmap in the mask colour - image.Create(bmp_width, bmp_height); - image.Replace(0, 0, 0, r, g, b); - bitmap = wxBitmap(image); + // redraw whole image and bitmap in the mask colour + image.Create(bmp_width, bmp_height); + image.Replace(0, 0, 0, r, g, b); + bitmap = wxBitmap(image); - // redraw icon over the mask colour to actually draw it - dc.SelectObject(bitmap); - ((wxImageList*)this)->Draw(index, dc, 0, 0, wxIMAGELIST_DRAW_TRANSPARENT); - dc.SelectObject(wxNullBitmap); + // redraw icon over the mask colour to actually draw it + dc.SelectObject(bitmap); + ((wxImageList*)this)->Draw(index, dc, 0, 0, wxIMAGELIST_DRAW_TRANSPARENT); + dc.SelectObject(wxNullBitmap); - // get the image, set the mask colour and convert back to get transparent bitmap - image = bitmap.ConvertToImage(); - image.SetMaskColour(r, g, b); - bitmap = wxBitmap(image); + // get the image, set the mask colour and convert back to get transparent bitmap + image = bitmap.ConvertToImage(); + image.SetMaskColour(r, g, b); + bitmap = wxBitmap(image); + } + else // no mask + { + // Just draw it normally. + ((wxImageList*)this)->Draw(index, dc, 0, 0, wxIMAGELIST_DRAW_NORMAL); + dc.SelectObject(wxNullBitmap); + + // And adjust its alpha flag as the destination bitmap would get it if + // the source one had it. + // + // Note that perhaps we could just call UseAlpha() which would set the + // "has alpha" flag unconditionally as it doesn't seem to do any harm, + // but for now only do it if necessary, just to be on the safe side, + // even if it requires more work (and takes more time). + bitmap.MSWUpdateAlpha(); + } #else wxBitmap bitmap; #endif diff --git a/3rdparty/wxwidgets3.0/src/msw/menu.cpp b/3rdparty/wxwidgets3.0/src/msw/menu.cpp index cdc229ffe4..88682ec440 100644 --- a/3rdparty/wxwidgets3.0/src/msw/menu.cpp +++ b/3rdparty/wxwidgets3.0/src/msw/menu.cpp @@ -360,7 +360,7 @@ wxMenu::~wxMenu() // we should free Windows resources only if Windows doesn't do it for us // which happens if we're attached to a menubar or a submenu of another // menu - if ( !IsAttached() && !GetParent() ) + if ( m_hMenu && !IsAttached() && !GetParent() ) { if ( !::DestroyMenu(GetHmenu()) ) { diff --git a/3rdparty/wxwidgets3.0/src/msw/menuitem.cpp b/3rdparty/wxwidgets3.0/src/msw/menuitem.cpp index 3c09d878fa..7d10a044ac 100644 --- a/3rdparty/wxwidgets3.0/src/msw/menuitem.cpp +++ b/3rdparty/wxwidgets3.0/src/msw/menuitem.cpp @@ -671,14 +671,11 @@ void wxMenuItem::SetItemLabel(const wxString& txt) m_parentMenu->UpdateAccel(this); #endif // wxUSE_ACCEL - const UINT id = GetMSWId(); - HMENU hMenu = GetHMenuOf(m_parentMenu); - if ( !hMenu ) + const int itemPos = MSGetMenuItemPos(); + if ( itemPos == -1 ) return; - const UINT state = ::GetMenuState(hMenu, id, MF_BYCOMMAND); - if ( state == (UINT)-1 ) - return; + HMENU hMenu = GetHMenuOf(m_parentMenu); // update the text of the native menu item WinStruct info; @@ -696,7 +693,7 @@ void wxMenuItem::SetItemLabel(const wxString& txt) info.fMask |= MIIM_BITMAP | MIIM_FTYPE; else info.fMask |= MIIM_TYPE; - if ( !::GetMenuItemInfo(hMenu, id, FALSE, &info) ) + if ( !::GetMenuItemInfo(hMenu, itemPos, TRUE, &info) ) { wxLogLastError(wxT("GetMenuItemInfo")); return; @@ -716,7 +713,7 @@ void wxMenuItem::SetItemLabel(const wxString& txt) // Also notice that we shouldn't use our IsOwnerDrawn() because it can be // true because it was set by e.g. SetBitmap(), even if the item wasn't // made owner drawn at Windows level. - if ( !(state & MF_OWNERDRAW) ) + if ( !(info.fState & MF_OWNERDRAW) ) #endif // wxUSE_OWNER_DRAWN { if ( isLaterThanWin95 ) @@ -726,7 +723,7 @@ void wxMenuItem::SetItemLabel(const wxString& txt) info.cch = m_text.length(); } - if ( !::SetMenuItemInfo(hMenu, id, FALSE, &info) ) + if ( !::SetMenuItemInfo(hMenu, itemPos, TRUE, &info) ) { wxLogLastError(wxT("SetMenuItemInfo")); } @@ -1251,6 +1248,42 @@ void wxMenuItem::GetColourToUse(wxODStatus stat, wxColour& colText, wxColour& co } #endif // wxUSE_OWNER_DRAWN +int wxMenuItem::MSGetMenuItemPos() const +{ + if ( !m_parentMenu ) + return -1; + + const HMENU hMenu = GetHMenuOf(m_parentMenu); + if ( !hMenu ) + return -1; + + const UINT id = GetMSWId(); + const int menuItems = ::GetMenuItemCount(hMenu); + for ( int i = 0; i < menuItems; i++ ) + { + const UINT state = ::GetMenuState(hMenu, i, MF_BYPOSITION); + if ( state == (UINT)-1 ) + { + // This indicates that the item at this position and is not + // supposed to happen here, but test for it just in case. + continue; + } + + if ( state & MF_POPUP ) + { + if ( ::GetSubMenu(hMenu, i) == (HMENU)id ) + return i; + } + else if ( !(state & MF_SEPARATOR) ) + { + if ( ::GetMenuItemID(hMenu, i) == id ) + return i; + } + } + + return -1; +} + // ---------------------------------------------------------------------------- // wxMenuItemBase // ---------------------------------------------------------------------------- diff --git a/3rdparty/wxwidgets3.0/src/msw/printdlg.cpp b/3rdparty/wxwidgets3.0/src/msw/printdlg.cpp index 63826efb51..629df49c74 100644 --- a/3rdparty/wxwidgets3.0/src/msw/printdlg.cpp +++ b/3rdparty/wxwidgets3.0/src/msw/printdlg.cpp @@ -413,6 +413,13 @@ void wxWindowsPrintNativeData::InitializeDevMode(const wxString& printerName, Wi NULL, // these are not used. 0 ); // Zero returns buffer size. + // Some buggy printer drivers (see #16274 which claims that Kyocera + // PCL6 driver does this) seem to return a too small value from + // DocumentProperties(), resulting in a crash because when we call + // it with DM_OUT_BUFFER below, memory beyond the allocated buffer + // is overwritten. So add a bit of extra memory to work around this. + dwNeeded += 1024; + LPDEVMODE tempDevMode = static_cast( GlobalAlloc( GMEM_FIXED | GMEM_ZEROINIT, dwNeeded ) ); // Step 2: diff --git a/3rdparty/wxwidgets3.0/src/msw/statbox.cpp b/3rdparty/wxwidgets3.0/src/msw/statbox.cpp index 678a2594cf..9a5637c01b 100644 --- a/3rdparty/wxwidgets3.0/src/msw/statbox.cpp +++ b/3rdparty/wxwidgets3.0/src/msw/statbox.cpp @@ -76,9 +76,6 @@ bool wxStaticBox::Create(wxWindow *parent, if ( !MSWCreateControl(wxT("BUTTON"), label, pos, size) ) return false; - // Always use LTR layout. Otherwise, the label would be mirrored. - SetLayoutDirection(wxLayout_LeftToRight); - #ifndef __WXWINCE__ if (!wxSystemOptions::IsFalse(wxT("msw.staticbox.optimized-paint"))) { @@ -117,12 +114,6 @@ WXDWORD wxStaticBox::MSWGetStyle(long style, WXDWORD *exstyle) const styleWin |= BS_GROUPBOX; - if ( wxTheApp->GetLayoutDirection() == wxLayout_RightToLeft ) - { - // Make sure label is on the right - styleWin |= BS_RIGHT; - } - return styleWin; } @@ -277,11 +268,26 @@ void wxStaticBox::MSWGetRegionWithoutSelf(WXHRGN hRgn, int w, int h) SubtractRectFromRgn(hrgn, w - border, 0, w, h); } +namespace { +RECT AdjustRectForRtl(wxLayoutDirection dir, RECT const& childRect, RECT const& boxRect) { + RECT ret = childRect; + if( dir == wxLayout_RightToLeft ) { + // The clipping region too is mirrored in RTL layout. + // We need to mirror screen coordinates relative to static box window priot to + // intersecting with region. + ret.right = boxRect.right - childRect.left - boxRect.left; + ret.left = boxRect.right - childRect.right - boxRect.left; + } + + return ret; +} +} + WXHRGN wxStaticBox::MSWGetRegionWithoutChildren() { - RECT rc; - ::GetWindowRect(GetHwnd(), &rc); - HRGN hrgn = ::CreateRectRgn(rc.left, rc.top, rc.right + 1, rc.bottom + 1); + RECT boxRc; + ::GetWindowRect(GetHwnd(), &boxRc); + HRGN hrgn = ::CreateRectRgn(boxRc.left, boxRc.top, boxRc.right + 1, boxRc.bottom + 1); bool foundThis = false; // Iterate over all sibling windows as in the old wxWidgets API the @@ -320,7 +326,9 @@ WXHRGN wxStaticBox::MSWGetRegionWithoutChildren() continue; } + RECT rc; ::GetWindowRect(child, &rc); + rc = AdjustRectForRtl(GetLayoutDirection(), rc, boxRc ); if ( ::RectInRegion(hrgn, &rc) ) { // need to remove WS_CLIPSIBLINGS from all sibling windows @@ -355,7 +363,9 @@ WXHRGN wxStaticBox::MSWGetRegionWithoutChildren() continue; } + RECT rc; ::GetWindowRect(child, &rc); + rc = AdjustRectForRtl(GetLayoutDirection(), rc, boxRc ); AutoHRGN hrgnChild(::CreateRectRgnIndirect(&rc)); ::CombineRgn(hrgn, hrgn, hrgnChild, RGN_DIFF); } @@ -391,7 +401,7 @@ void wxStaticBox::PaintBackground(wxDC& dc, const RECT& rc) ::FillRect(GetHdcOf(*impl), &rc, hbr); } -void wxStaticBox::PaintForeground(wxDC& dc, const RECT& rc) +void wxStaticBox::PaintForeground(wxDC& dc, const RECT&) { wxMSWDCImpl *impl = (wxMSWDCImpl*) dc.GetImpl(); MSWDefWindowProc(WM_PAINT, (WPARAM)GetHdcOf(*impl), 0); @@ -407,10 +417,6 @@ void wxStaticBox::PaintForeground(wxDC& dc, const RECT& rc) HDC hdc = GetHdcOf(*impl); ::SetTextColor(hdc, GetForegroundColour().GetPixel()); - const bool rtl = wxTheApp->GetLayoutDirection() == wxLayout_RightToLeft; - if ( rtl ) - ::SetTextAlign(hdc, TA_RTLREADING | TA_RIGHT); - // Get dimensions of the label const wxString label = GetLabel(); @@ -458,18 +464,9 @@ void wxStaticBox::PaintForeground(wxDC& dc, const RECT& rc) // FIXME: value of x is hardcoded as this is what it is on my system, // no idea if it's true everywhere RECT dimensions = {0, 0, 0, y}; - if ( !rtl ) - { - x = 9; - dimensions.left = x; - dimensions.right = x + width; - } - else - { - x = rc.right - 7; - dimensions.left = x - width; - dimensions.right = x; - } + x = 9; + dimensions.left = x; + dimensions.right = x + width; // need to adjust the rectangle to cover all the label background dimensions.left -= 2; @@ -505,18 +502,9 @@ void wxStaticBox::PaintForeground(wxDC& dc, const RECT& rc) } // now draw the text - if ( !rtl ) - { - RECT rc2 = { x, 0, x + width, y }; - ::DrawText(hdc, label.t_str(), label.length(), &rc2, - drawTextFlags); - } - else // RTL - { - RECT rc2 = { x, 0, x - width, y }; - ::DrawText(hdc, label.t_str(), label.length(), &rc2, - drawTextFlags | DT_RTLREADING); - } + RECT rc2 = { x, 0, x + width, y }; + ::DrawText(hdc, label.t_str(), label.length(), &rc2, + drawTextFlags); } #endif // wxUSE_UXTHEME } @@ -525,9 +513,10 @@ void wxStaticBox::OnPaint(wxPaintEvent& WXUNUSED(event)) { RECT rc; ::GetClientRect(GetHwnd(), &rc); + wxPaintDC dc(this); // draw the entire box in a memory DC - wxMemoryDC memdc; + wxMemoryDC memdc(&dc); wxBitmap bitmap(rc.right, rc.bottom); memdc.SelectObject(bitmap); @@ -540,7 +529,6 @@ void wxStaticBox::OnPaint(wxPaintEvent& WXUNUSED(event)) // note that it seems to be faster to do 4 small blits here and then paint // directly into wxPaintDC than painting background in wxMemoryDC and then // blitting everything at once to wxPaintDC, this is why we do it like this - wxPaintDC dc(this); int borderTop, border; GetBordersForSizer(&borderTop, &border); diff --git a/3rdparty/wxwidgets3.0/src/msw/textctrl.cpp b/3rdparty/wxwidgets3.0/src/msw/textctrl.cpp index 473aa0c36e..bf3b3b2f4e 100644 --- a/3rdparty/wxwidgets3.0/src/msw/textctrl.cpp +++ b/3rdparty/wxwidgets3.0/src/msw/textctrl.cpp @@ -40,6 +40,7 @@ #include "wx/wxcrtvararg.h" #endif +#include "wx/scopedptr.h" #include "wx/stack.h" #include "wx/sysopt.h" @@ -68,8 +69,11 @@ // richedit.h at all #if !defined(__GNUWIN32_OLD__) || defined(__CYGWIN10__) #include + #include #endif +#include "wx/msw/ole/oleutils.h" + #endif // wxUSE_RICHEDIT #include "wx/msw/missing.h" @@ -88,6 +92,25 @@ static wxDropTarget * #endif // wxUSE_DRAG_AND_DROP && wxUSE_RICHEDIT +#if wxUSE_OLE +// This must be the last header included to only affect the DEFINE_GUID() +// occurrences below but not any GUIDs declared in the standard files included +// above. +#include + +namespace +{ + +// Normally the IRichEditOleCallback interface and its IID are defined in +// richole.h header file included in the platform SDK but MinGW doesn't +// have the IID symbol (but does have the interface). Work around it by +// defining it ourselves. +DEFINE_GUID(wxIID_IRichEditOleCallback, + 0x00020d03, 0x0000, 0x0000, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46); + +} // anonymous namespace +#endif // wxUSE_OLE + // ---------------------------------------------------------------------------- // private classes // ---------------------------------------------------------------------------- @@ -138,6 +161,73 @@ bool wxRichEditModule::ms_inkEditLibLoadAttemped = false; IMPLEMENT_DYNAMIC_CLASS(wxRichEditModule, wxModule) +#if wxUSE_OLE + +extern wxMenu *wxCurrentPopupMenu; + +class wxTextCtrlOleCallback : public IRichEditOleCallback +{ +public: + wxTextCtrlOleCallback(wxTextCtrl *text) : m_textCtrl(text), m_menu(NULL) {} + ~wxTextCtrlOleCallback() { DeleteContextMenuObject(); } + + STDMETHODIMP ContextSensitiveHelp(BOOL WXUNUSED(enterMode)) { return E_NOTIMPL; } + STDMETHODIMP DeleteObject(LPOLEOBJECT WXUNUSED(oleobj)) { return E_NOTIMPL; } + STDMETHODIMP GetClipboardData(CHARRANGE* WXUNUSED(chrg), DWORD WXUNUSED(reco), LPDATAOBJECT* WXUNUSED(dataobj)) { return E_NOTIMPL; } + STDMETHODIMP GetDragDropEffect(BOOL WXUNUSED(drag), DWORD WXUNUSED(grfKeyState), LPDWORD WXUNUSED(effect)) { return E_NOTIMPL; } + STDMETHODIMP GetInPlaceContext(LPOLEINPLACEFRAME* WXUNUSED(frame), LPOLEINPLACEUIWINDOW* WXUNUSED(doc), LPOLEINPLACEFRAMEINFO WXUNUSED(frameInfo)) { return E_NOTIMPL; } + STDMETHODIMP GetNewStorage(LPSTORAGE *WXUNUSED(stg)) { return E_NOTIMPL; } + STDMETHODIMP QueryAcceptData(LPDATAOBJECT WXUNUSED(dataobj), CLIPFORMAT* WXUNUSED(format), DWORD WXUNUSED(reco), BOOL WXUNUSED(really), HGLOBAL WXUNUSED(hMetaPict)) { return E_NOTIMPL; } + STDMETHODIMP QueryInsertObject(LPCLSID WXUNUSED(clsid), LPSTORAGE WXUNUSED(stg), LONG WXUNUSED(cp)) { return E_NOTIMPL; } + STDMETHODIMP ShowContainerUI(BOOL WXUNUSED(show)) { return E_NOTIMPL; } + + STDMETHODIMP GetContextMenu(WORD WXUNUSED(seltype), LPOLEOBJECT WXUNUSED(oleobj), CHARRANGE* WXUNUSED(chrg), HMENU *menu) + { + // 'menu' will be shown and destroyed by the caller. We need to keep + // its wx counterpart, the wxMenu instance, around until it is + // dismissed, though, so store it in m_menu and destroy sometime later. + DeleteContextMenuObject(); + m_menu = m_textCtrl->MSWCreateContextMenu(); + *menu = m_menu->GetHMenu(); + + // Make wx handle events from the popup menu correctly: + m_menu->SetInvokingWindow(m_textCtrl); + wxCurrentPopupMenu = m_menu; + + m_menu->UpdateUI(); + + return S_OK; + } + + DECLARE_IUNKNOWN_METHODS; + +private: + void DeleteContextMenuObject() + { + if ( m_menu ) + { + m_menu->MSWDetachHMENU(); + if ( wxCurrentPopupMenu == m_menu ) + wxCurrentPopupMenu = NULL; + wxDELETE(m_menu); + } + } + + wxTextCtrl *m_textCtrl; + wxMenu *m_menu; + + wxDECLARE_NO_COPY_CLASS(wxTextCtrlOleCallback); +}; + +BEGIN_IID_TABLE(wxTextCtrlOleCallback) + ADD_IID(Unknown) + ADD_RAW_IID(wxIID_IRichEditOleCallback) +END_IID_TABLE; + +IMPLEMENT_IUNKNOWN_METHODS(wxTextCtrlOleCallback) + +#endif // wxUSE_OLE + #endif // wxUSE_RICHEDIT // a small class used to set m_updatesCount to 0 (to filter duplicate events if @@ -198,10 +288,6 @@ BEGIN_EVENT_TABLE(wxTextCtrl, wxTextCtrlBase) EVT_KEY_DOWN(wxTextCtrl::OnKeyDown) EVT_DROP_FILES(wxTextCtrl::OnDropFiles) -#if wxUSE_RICHEDIT - EVT_CONTEXT_MENU(wxTextCtrl::OnContextMenu) -#endif - EVT_MENU(wxID_CUT, wxTextCtrl::OnCut) EVT_MENU(wxID_COPY, wxTextCtrl::OnCopy) EVT_MENU(wxID_PASTE, wxTextCtrl::OnPaste) @@ -492,6 +578,17 @@ bool wxTextCtrl::MSWCreateText(const wxString& value, } ::SendMessage(GetHwnd(), EM_SETEVENTMASK, 0, mask); + + bool contextMenuConnected = false; +#if wxUSE_OLE + if ( m_verRichEdit >= 4 ) + { + wxTextCtrlOleCallback *cb = new wxTextCtrlOleCallback(this); + contextMenuConnected = ::SendMessage(GetHwnd(), EM_SETOLECALLBACK, 0, (LPARAM)cb) != 0; + } +#endif + if ( !contextMenuConnected ) + Connect(wxEVT_CONTEXT_MENU, wxContextMenuEventHandler(wxTextCtrl::OnContextMenu)); } else #endif // wxUSE_RICHEDIT @@ -2323,32 +2420,6 @@ void wxTextCtrl::OnUpdateSelectAll(wxUpdateUIEvent& event) event.Enable( !IsEmpty() ); } -void wxTextCtrl::OnContextMenu(wxContextMenuEvent& event) -{ -#if wxUSE_RICHEDIT - if (IsRich()) - { - if (!m_privateContextMenu) - { - m_privateContextMenu = new wxMenu; - m_privateContextMenu->Append(wxID_UNDO, _("&Undo")); - m_privateContextMenu->Append(wxID_REDO, _("&Redo")); - m_privateContextMenu->AppendSeparator(); - m_privateContextMenu->Append(wxID_CUT, _("Cu&t")); - m_privateContextMenu->Append(wxID_COPY, _("&Copy")); - m_privateContextMenu->Append(wxID_PASTE, _("&Paste")); - m_privateContextMenu->Append(wxID_CLEAR, _("&Delete")); - m_privateContextMenu->AppendSeparator(); - m_privateContextMenu->Append(wxID_SELECTALL, _("Select &All")); - } - PopupMenu(m_privateContextMenu); - return; - } - else -#endif - event.Skip(); -} - void wxTextCtrl::OnSetFocus(wxFocusEvent& event) { // be sure the caret remains invisible if the user had hidden it @@ -2363,6 +2434,34 @@ void wxTextCtrl::OnSetFocus(wxFocusEvent& event) // the rest of the file only deals with the rich edit controls #if wxUSE_RICHEDIT +void wxTextCtrl::OnContextMenu(wxContextMenuEvent& event) +{ + if (IsRich()) + { + if (!m_privateContextMenu) + m_privateContextMenu = MSWCreateContextMenu(); + PopupMenu(m_privateContextMenu); + return; + } + else + event.Skip(); +} + +wxMenu *wxTextCtrl::MSWCreateContextMenu() +{ + wxMenu *m = new wxMenu; + m->Append(wxID_UNDO, _("&Undo")); + m->Append(wxID_REDO, _("&Redo")); + m->AppendSeparator(); + m->Append(wxID_CUT, _("Cu&t")); + m->Append(wxID_COPY, _("&Copy")); + m->Append(wxID_PASTE, _("&Paste")); + m->Append(wxID_CLEAR, _("&Delete")); + m->AppendSeparator(); + m->Append(wxID_SELECTALL, _("Select &All")); + return m; +} + // ---------------------------------------------------------------------------- // EN_LINK processing // ---------------------------------------------------------------------------- @@ -2718,6 +2817,24 @@ bool wxTextCtrl::MSWSetParaFormat(const wxTextAttr& style, long start, long end) } } +#if wxUSE_RICHEDIT2 + if ( style.HasParagraphSpacingAfter() ) + { + pf.dwMask |= PFM_SPACEAFTER; + + // Convert from 1/10 mm to TWIPS + pf.dySpaceAfter = (int) (((double) style.GetParagraphSpacingAfter()) * mm2twips / 10.0) ; + } + + if ( style.HasParagraphSpacingBefore() ) + { + pf.dwMask |= PFM_SPACEBEFORE; + + // Convert from 1/10 mm to TWIPS + pf.dySpaceBefore = (int) (((double) style.GetParagraphSpacingBefore()) * mm2twips / 10.0) ; + } +#endif // wxUSE_RICHEDIT2 + #if wxUSE_RICHEDIT2 if ( m_verRichEdit > 1 ) { diff --git a/3rdparty/wxwidgets3.0/src/msw/treectrl.cpp b/3rdparty/wxwidgets3.0/src/msw/treectrl.cpp index 9cb47cd9e5..754ea316c3 100644 --- a/3rdparty/wxwidgets3.0/src/msw/treectrl.cpp +++ b/3rdparty/wxwidgets3.0/src/msw/treectrl.cpp @@ -3277,7 +3277,7 @@ bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) case TVN_BEGINLABELEDIT: { eventType = wxEVT_TREE_BEGIN_LABEL_EDIT; - TV_DISPINFO *info = (TV_DISPINFO *)lParam; + NMTVDISPINFO *info = (NMTVDISPINFO *)lParam; // although the user event handler may still veto it, it is // important to set it now so that calls to SetItemText() from @@ -3311,7 +3311,7 @@ bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) case TVN_ENDLABELEDIT: { eventType = wxEVT_TREE_END_LABEL_EDIT; - TV_DISPINFO *info = (TV_DISPINFO *)lParam; + NMTVDISPINFO *info = (NMTVDISPINFO *)lParam; event.m_item = info->item.hItem; event.m_label = info->item.pszText; @@ -3355,7 +3355,7 @@ bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) eventType = wxEVT_TREE_SET_INFO; //else: get, already set above - TV_DISPINFO *info = (TV_DISPINFO *)lParam; + NMTVDISPINFO *info = (NMTVDISPINFO *)lParam; event.m_item = info->item.hItem; break; @@ -3857,7 +3857,7 @@ bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) //if ( /* !processed && */ ) { wxTreeItemId item = event.m_item; - TV_DISPINFO *info = (TV_DISPINFO *)lParam; + NMTVDISPINFO *info = (NMTVDISPINFO *)lParam; const wxTreeItemParam * const param = GetItemParam(item); if ( !param ) diff --git a/3rdparty/wxwidgets3.0/src/msw/utils.cpp b/3rdparty/wxwidgets3.0/src/msw/utils.cpp index 33322697e7..df4ec5ffd1 100644 --- a/3rdparty/wxwidgets3.0/src/msw/utils.cpp +++ b/3rdparty/wxwidgets3.0/src/msw/utils.cpp @@ -1488,6 +1488,13 @@ wxWinVersion wxGetWinVersion() case 2: return wxWinVersion_8; + + case 3: + // For now, map to wxWinVersion_8. In case program + // does not have a manifest indicating 8.1 + // support, Windows already performs this mapping + // for us. + return wxWinVersion_8; } break; } diff --git a/3rdparty/wxwidgets3.0/src/msw/webview_ie.cpp b/3rdparty/wxwidgets3.0/src/msw/webview_ie.cpp index 9a3d3ea019..74d1236cb3 100644 --- a/3rdparty/wxwidgets3.0/src/msw/webview_ie.cpp +++ b/3rdparty/wxwidgets3.0/src/msw/webview_ie.cpp @@ -960,13 +960,13 @@ bool wxWebViewIE::IsElementVisible(wxCOMPtr elm) { //Check if the object has the style display:none. if((style->get_display(&tmp_bstr) != S_OK) || - (tmp_bstr != NULL && (_wcsicmp(tmp_bstr, L"none") == 0))) + (tmp_bstr != NULL && (wxCRT_StricmpW(tmp_bstr, L"none") == 0))) { is_visible = false; } //Check if the object has the style visibility:hidden. if((is_visible && (style->get_visibility(&tmp_bstr) != S_OK)) || - (tmp_bstr != NULL && _wcsicmp(tmp_bstr, L"hidden") == 0)) + (tmp_bstr != NULL && wxCRT_StricmpW(tmp_bstr, L"hidden") == 0)) { is_visible = false; } diff --git a/3rdparty/wxwidgets3.0/src/msw/window.cpp b/3rdparty/wxwidgets3.0/src/msw/window.cpp index 0e3f79e4db..55e8e948d3 100644 --- a/3rdparty/wxwidgets3.0/src/msw/window.cpp +++ b/3rdparty/wxwidgets3.0/src/msw/window.cpp @@ -1145,6 +1145,11 @@ void wxWindowMSW::SetLayoutDirection(wxLayoutDirection dir) if ( styleNew != styleOld ) { wxSetWindowExStyle(this, styleNew); + + // Update layout: whether we have children or are drawing something, we + // need to redo it with the new layout. + SendSizeEvent(); + Refresh(); } #endif } @@ -1837,31 +1842,18 @@ void wxWindowMSW::DoGetPosition(int *x, int *y) const { RECT rect = wxGetWindowRect(GetHwnd()); - POINT point; - point.x = rect.left; - point.y = rect.top; - // we do the adjustments with respect to the parent only for the "real" // children, not for the dialogs/frames if ( !IsTopLevel() ) { - if ( wxTheApp->GetLayoutDirection() == wxLayout_RightToLeft ) - { - // In RTL mode, we want the logical left x-coordinate, - // which would be the physical right x-coordinate. - point.x = rect.right; - } - - // Since we now have the absolute screen coords, if there's a - // parent we must subtract its top left corner - if ( parent ) - { - ::ScreenToClient(GetHwndOf(parent), &point); - } + // In RTL mode, we want the logical left x-coordinate, + // which would be the physical right x-coordinate. + ::MapWindowPoints(NULL, parent ? GetHwndOf(parent) : HWND_DESKTOP, + (LPPOINT)&rect, 2); } - pos.x = point.x; - pos.y = point.y; + pos.x = rect.left; + pos.y = rect.top; } // we also must adjust by the client area offset: a control which is just @@ -2128,11 +2120,11 @@ wxSize wxWindowMSW::DoGetBorderSize() const break; case wxBORDER_SUNKEN: + case wxBORDER_THEME: border = 2; break; case wxBORDER_RAISED: - case wxBORDER_DOUBLE: border = 3; break; @@ -2450,7 +2442,7 @@ bool wxWindowMSW::MSWProcessMessage(WXMSG* pMsg) } } - if ( btn && btn->IsEnabled() ) + if ( btn && btn->IsEnabled() && btn->IsShownOnScreen() ) { btn->MSWCommand(BN_CLICKED, 0 /* unused */); return true; @@ -2499,7 +2491,7 @@ bool wxWindowMSW::MSWProcessMessage(WXMSG* pMsg) } } - if ( ::IsDialogMessage(GetHwnd(), msg) ) + if ( MSWSafeIsDialogMessage(msg) ) { // IsDialogMessage() did something... return true; @@ -2530,12 +2522,16 @@ bool wxWindowMSW::MSWTranslateMessage(WXMSG* pMsg) #endif // wxUSE_ACCEL } -bool wxWindowMSW::MSWShouldPreProcessMessage(WXMSG* msg) +bool wxWindowMSW::MSWShouldPreProcessMessage(WXMSG* WXUNUSED(msg)) { - // all tests below have to deal with various bugs/misfeatures of - // IsDialogMessage(): we have to prevent it from being called from our - // MSWProcessMessage() in some situations + // We don't have any reason to not preprocess messages at this level. + return true; +} +#ifndef __WXUNIVERSAL__ + +bool wxWindowMSW::MSWSafeIsDialogMessage(WXMSG* msg) +{ // don't let IsDialogMessage() get VK_ESCAPE as it _always_ eats the // message even when there is no cancel button and when the message is // needed by the control itself: in particular, it prevents the tree in @@ -2549,48 +2545,45 @@ bool wxWindowMSW::MSWShouldPreProcessMessage(WXMSG* msg) // going into an infinite loop when it tries to find the control to give // focus to when Alt- is pressed, so we try to detect [some of] the // situations when this may happen and not call it then - if ( msg->message != WM_SYSCHAR ) - return true; - - // assume we can call it by default - bool canSafelyCallIsDlgMsg = true; - - HWND hwndFocus = ::GetFocus(); - - // if the currently focused window itself has WS_EX_CONTROLPARENT style, - // ::IsDialogMessage() will also enter an infinite loop, because it will - // recursively check the child windows but not the window itself and so if - // none of the children accepts focus it loops forever (as it only stops - // when it gets back to the window it started from) - // - // while it is very unusual that a window with WS_EX_CONTROLPARENT - // style has the focus, it can happen. One such possibility is if - // all windows are either toplevel, wxDialog, wxPanel or static - // controls and no window can actually accept keyboard input. -#if !defined(__WXWINCE__) - if ( ::GetWindowLong(hwndFocus, GWL_EXSTYLE) & WS_EX_CONTROLPARENT ) + if ( msg->message == WM_SYSCHAR ) { - // pessimistic by default - canSafelyCallIsDlgMsg = false; - for ( wxWindowList::compatibility_iterator node = GetChildren().GetFirst(); - node; - node = node->GetNext() ) - { - wxWindow * const win = node->GetData(); - if ( win->CanAcceptFocus() && - !wxHasWindowExStyle(win, WS_EX_CONTROLPARENT) ) - { - // it shouldn't hang... - canSafelyCallIsDlgMsg = true; + HWND hwndFocus = ::GetFocus(); - break; + // if the currently focused window itself has WS_EX_CONTROLPARENT style, + // ::IsDialogMessage() will also enter an infinite loop, because it will + // recursively check the child windows but not the window itself and so if + // none of the children accepts focus it loops forever (as it only stops + // when it gets back to the window it started from) + // + // while it is very unusual that a window with WS_EX_CONTROLPARENT + // style has the focus, it can happen. One such possibility is if + // all windows are either toplevel, wxDialog, wxPanel or static + // controls and no window can actually accept keyboard input. +#if !defined(__WXWINCE__) + if ( ::GetWindowLong(hwndFocus, GWL_EXSTYLE) & WS_EX_CONTROLPARENT ) + { + // pessimistic by default + bool canSafelyCallIsDlgMsg = false; + for ( wxWindowList::compatibility_iterator node = GetChildren().GetFirst(); + node; + node = node->GetNext() ) + { + wxWindow * const win = node->GetData(); + if ( win->CanAcceptFocus() && + !wxHasWindowExStyle(win, WS_EX_CONTROLPARENT) ) + { + // it shouldn't hang... + canSafelyCallIsDlgMsg = true; + + break; + } } + + if ( !canSafelyCallIsDlgMsg ) + return false; } - } #endif // !__WXWINCE__ - if ( canSafelyCallIsDlgMsg ) - { // ::IsDialogMessage() can enter in an infinite loop when the // currently focused window is disabled or hidden and its // parent has WS_EX_CONTROLPARENT style, so don't call it in @@ -2601,9 +2594,7 @@ bool wxWindowMSW::MSWShouldPreProcessMessage(WXMSG* msg) !::IsWindowVisible(hwndFocus) ) { // it would enter an infinite loop if we do this! - canSafelyCallIsDlgMsg = false; - - break; + return false; } if ( !(::GetWindowLong(hwndFocus, GWL_STYLE) & WS_CHILD) ) @@ -2618,9 +2609,11 @@ bool wxWindowMSW::MSWShouldPreProcessMessage(WXMSG* msg) } } - return canSafelyCallIsDlgMsg; + return ::IsDialogMessage(GetHwnd(), msg) != 0; } +#endif // __WXUNIVERSAL__ + // --------------------------------------------------------------------------- // message params unpackers // --------------------------------------------------------------------------- @@ -3491,6 +3484,29 @@ wxWindowMSW::MSWHandleMessage(WXLRESULT *result, } } break; + +#if !defined(__WXMICROWIN__) && !defined(__WXWINCE__) + case WM_INITMENUPOPUP: + case WM_MENUSELECT: + case WM_EXITMENULOOP: + case WM_UNINITMENUPOPUP: + { + // Contrary to MSDN implications, at least some of these messages are + // not actually sent to the TLW for popup menus, but to the owning + // window or even its parent window. + // + // wx-3.1+ handles these messages in wxWindow instead, but binary + // compatibility requirements on wx-3.0 make it simpler to just forward + // the messages to the wxTLW. + wxWindow *tlw = wxGetTopLevelParent(this); + if (tlw && tlw != this) + { + rc.result = tlw->MSWWindowProc(message, wParam, lParam); + processed = rc.result == 0; + } + } + break; +#endif // !__WXMICROWIN__ #endif // wxUSE_MENUS #ifndef __WXWINCE__