mirror of
https://github.com/QIDITECH/QIDISlicer.git
synced 2026-01-30 15:38:43 +03:00
update deps
This commit is contained in:
4
deps/+Eigen/Eigen.cmake
vendored
Normal file
4
deps/+Eigen/Eigen.cmake
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
add_cmake_project(Eigen
|
||||
URL "https://gitlab.com/libeigen/eigen/-/archive/3.3.7/eigen-3.3.7.zip"
|
||||
URL_HASH SHA256=e09b89aae054e9778ee3f606192ee76d645eec82c402c01c648b1fe46b6b9857
|
||||
)
|
||||
4
deps/+LibBGCode/LibBGCode.cmake
vendored
4
deps/+LibBGCode/LibBGCode.cmake
vendored
@@ -1,8 +1,8 @@
|
||||
set(LibBGCode_SOURCE_DIR "" CACHE PATH "Optionally specify local LibBGCode source directory")
|
||||
|
||||
set(_source_dir_line
|
||||
URL https://github.com/prusa3d/libbgcode/archive/6f43cb004ef3d3bda37dde49f6235e24d2717629.zip
|
||||
URL_HASH SHA256=eb5198caecb6a693a294af6a56c37b0adb1eb159a34a9c3116970b80659ee9f9)
|
||||
URL https://github.com/prusa3d/libbgcode/archive/b5c57c423c958a78dacae468aeee63ab3d2de947.zip
|
||||
URL_HASH SHA256=ade82ffe9c1a1876c9d4d264948fa146d33d6a9c7cc23f6422fbbdb2949c5d75)
|
||||
|
||||
if (LibBGCode_SOURCE_DIR)
|
||||
set(_source_dir_line "SOURCE_DIR;${LibBGCode_SOURCE_DIR};BUILD_ALWAYS;ON")
|
||||
|
||||
8
deps/+OCCT/OCCT.cmake
vendored
8
deps/+OCCT/OCCT.cmake
vendored
@@ -1,7 +1,9 @@
|
||||
add_cmake_project(OCCT
|
||||
#LMBBS: changed version to 7.6.2
|
||||
URL https://github.com/Open-Cascade-SAS/OCCT/archive/refs/tags/V7_6_2.zip
|
||||
URL_HASH SHA256=c696b923593e8c18d059709717dbf155b3e72fdd283c8522047a790ec3a432c5
|
||||
# Versions newer than 7.6.1 contain a bug that causes chamfers to be triangulated incorrectly.
|
||||
# So, before any updating, it is necessary to check whether SPE-2257 is still happening.
|
||||
# In version 7.8.1, this bug has still not been fixed.
|
||||
URL https://github.com/Open-Cascade-SAS/OCCT/archive/refs/tags/V7_6_1.zip
|
||||
URL_HASH SHA256=b7cf65430d6f099adc9df1749473235de7941120b5b5dd356067d12d0909b1d3
|
||||
|
||||
PATCH_COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_LIST_DIR}/occt_toolkit.cmake ./adm/cmake/
|
||||
CMAKE_ARGS
|
||||
|
||||
1
deps/+OpenCSG/OpenCSG.cmake
vendored
1
deps/+OpenCSG/OpenCSG.cmake
vendored
@@ -1,5 +1,6 @@
|
||||
|
||||
add_cmake_project(OpenCSG
|
||||
EXCLUDE_FROM_ALL ON # No need to build this lib by default. Only used in experiment in sandboxes/opencsg
|
||||
URL https://github.com/floriankirsch/OpenCSG/archive/refs/tags/opencsg-1-4-2-release.zip
|
||||
URL_HASH SHA256=51afe0db79af8386e2027d56d685177135581e0ee82ade9d7f2caff8deab5ec5
|
||||
PATCH_COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt.in ./CMakeLists.txt
|
||||
|
||||
15
deps/+TIFF/TIFF.cmake
vendored
15
deps/+TIFF/TIFF.cmake
vendored
@@ -1,15 +0,0 @@
|
||||
add_cmake_project(TIFF
|
||||
URL https://gitlab.com/libtiff/libtiff/-/archive/v4.6.0/libtiff-v4.6.0.zip
|
||||
URL_HASH SHA256=5d652432123223338a6ee642a6499d98ebc5a702f8a065571e1001d4c08c37e6
|
||||
CMAKE_ARGS
|
||||
-Dtiff-tools:BOOL=OFF
|
||||
-Dtiff-tests:BOOL=OFF
|
||||
-Dlzma:BOOL=OFF
|
||||
-Dwebp:BOOL=OFF
|
||||
-Djbig:BOOL=OFF
|
||||
-Dzstd:BOOL=OFF
|
||||
-Dpixarlog:BOOL=OFF
|
||||
-Dlibdeflate:BOOL=OFF
|
||||
)
|
||||
|
||||
set(DEP_TIFF_DEPENDS ZLIB PNG JPEG OpenGL)
|
||||
35006
deps/+WebView2/include/WebView2.h
vendored
35006
deps/+WebView2/include/WebView2.h
vendored
File diff suppressed because it is too large
Load Diff
149
deps/+WebView2/include/WebView2EnvironmentOptions.h
vendored
149
deps/+WebView2/include/WebView2EnvironmentOptions.h
vendored
@@ -1,149 +0,0 @@
|
||||
// Copyright (C) Microsoft Corporation. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef __core_webview2_environment_options_h__
|
||||
#define __core_webview2_environment_options_h__
|
||||
|
||||
#include <objbase.h>
|
||||
#include <wrl/implements.h>
|
||||
|
||||
#include "webview2.h"
|
||||
#define CORE_WEBVIEW_TARGET_PRODUCT_VERSION L"107.0.1418.22"
|
||||
|
||||
#define COREWEBVIEW2ENVIRONMENTOPTIONS_STRING_PROPERTY(p) \
|
||||
public: \
|
||||
HRESULT STDMETHODCALLTYPE get_##p(LPWSTR* value) override { \
|
||||
if (!value) \
|
||||
return E_POINTER; \
|
||||
*value = m_##p.Copy(); \
|
||||
if ((*value == nullptr) && (m_##p.Get() != nullptr)) \
|
||||
return HRESULT_FROM_WIN32(GetLastError()); \
|
||||
return S_OK; \
|
||||
} \
|
||||
HRESULT STDMETHODCALLTYPE put_##p(LPCWSTR value) override { \
|
||||
LPCWSTR result = m_##p.Set(value); \
|
||||
if ((result == nullptr) && (value != nullptr)) \
|
||||
return HRESULT_FROM_WIN32(GetLastError()); \
|
||||
return S_OK; \
|
||||
} \
|
||||
\
|
||||
protected: \
|
||||
AutoCoMemString m_##p;
|
||||
|
||||
#define COREWEBVIEW2ENVIRONMENTOPTIONS_BOOL_PROPERTY(p) \
|
||||
public: \
|
||||
HRESULT STDMETHODCALLTYPE get_##p(BOOL* value) override { \
|
||||
if (!value) \
|
||||
return E_POINTER; \
|
||||
*value = m_##p; \
|
||||
return S_OK; \
|
||||
} \
|
||||
HRESULT STDMETHODCALLTYPE put_##p(BOOL value) override { \
|
||||
m_##p = value; \
|
||||
return S_OK; \
|
||||
} \
|
||||
\
|
||||
protected: \
|
||||
BOOL m_##p = FALSE;
|
||||
|
||||
// This is a base COM class that implements ICoreWebView2EnvironmentOptions.
|
||||
template <typename allocate_fn_t,
|
||||
allocate_fn_t allocate_fn,
|
||||
typename deallocate_fn_t,
|
||||
deallocate_fn_t deallocate_fn>
|
||||
class CoreWebView2EnvironmentOptionsBase
|
||||
: public Microsoft::WRL::Implements<
|
||||
Microsoft::WRL::RuntimeClassFlags<Microsoft::WRL::ClassicCom>,
|
||||
ICoreWebView2EnvironmentOptions,
|
||||
ICoreWebView2EnvironmentOptions2> {
|
||||
public:
|
||||
CoreWebView2EnvironmentOptionsBase() {
|
||||
// Initialize the target compatible browser version value to the version of
|
||||
// the browser binaries corresponding to this version of the SDK.
|
||||
m_TargetCompatibleBrowserVersion.Set(CORE_WEBVIEW_TARGET_PRODUCT_VERSION);
|
||||
}
|
||||
|
||||
protected:
|
||||
~CoreWebView2EnvironmentOptionsBase() {}
|
||||
|
||||
class AutoCoMemString {
|
||||
public:
|
||||
AutoCoMemString() {}
|
||||
~AutoCoMemString() { Release(); }
|
||||
void Release() {
|
||||
if (m_string) {
|
||||
deallocate_fn(m_string);
|
||||
m_string = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
LPCWSTR Set(LPCWSTR str) {
|
||||
Release();
|
||||
if (str) {
|
||||
m_string = MakeCoMemString(str);
|
||||
}
|
||||
return m_string;
|
||||
}
|
||||
LPCWSTR Get() { return m_string; }
|
||||
LPWSTR Copy() {
|
||||
if (m_string)
|
||||
return MakeCoMemString(m_string);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
protected:
|
||||
LPWSTR MakeCoMemString(LPCWSTR source) {
|
||||
const size_t length = wcslen(source);
|
||||
const size_t bytes = (length + 1) * sizeof(*source);
|
||||
// Ensure we didn't overflow during our size calculation.
|
||||
if (bytes <= length) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
wchar_t* result = reinterpret_cast<wchar_t*>(allocate_fn(bytes));
|
||||
if (result)
|
||||
memcpy(result, source, bytes);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
LPWSTR m_string = nullptr;
|
||||
};
|
||||
|
||||
// ICoreWebView2EnvironmentOptions
|
||||
COREWEBVIEW2ENVIRONMENTOPTIONS_STRING_PROPERTY(AdditionalBrowserArguments)
|
||||
COREWEBVIEW2ENVIRONMENTOPTIONS_STRING_PROPERTY(Language)
|
||||
COREWEBVIEW2ENVIRONMENTOPTIONS_STRING_PROPERTY(TargetCompatibleBrowserVersion)
|
||||
COREWEBVIEW2ENVIRONMENTOPTIONS_BOOL_PROPERTY(
|
||||
AllowSingleSignOnUsingOSPrimaryAccount)
|
||||
|
||||
// ICoreWebView2EnvironmentOptions2
|
||||
COREWEBVIEW2ENVIRONMENTOPTIONS_BOOL_PROPERTY(ExclusiveUserDataFolderAccess)
|
||||
};
|
||||
|
||||
template <typename allocate_fn_t,
|
||||
allocate_fn_t allocate_fn,
|
||||
typename deallocate_fn_t,
|
||||
deallocate_fn_t deallocate_fn>
|
||||
class CoreWebView2EnvironmentOptionsBaseClass
|
||||
: public Microsoft::WRL::RuntimeClass<
|
||||
Microsoft::WRL::RuntimeClassFlags<Microsoft::WRL::ClassicCom>,
|
||||
CoreWebView2EnvironmentOptionsBase<allocate_fn_t,
|
||||
allocate_fn,
|
||||
deallocate_fn_t,
|
||||
deallocate_fn>> {
|
||||
public:
|
||||
CoreWebView2EnvironmentOptionsBaseClass() {}
|
||||
|
||||
protected:
|
||||
~CoreWebView2EnvironmentOptionsBaseClass() override {}
|
||||
};
|
||||
|
||||
typedef CoreWebView2EnvironmentOptionsBaseClass<decltype(&::CoTaskMemAlloc),
|
||||
::CoTaskMemAlloc,
|
||||
decltype(&::CoTaskMemFree),
|
||||
::CoTaskMemFree>
|
||||
CoreWebView2EnvironmentOptions;
|
||||
|
||||
#endif // __core_webview2_environment_options_h__
|
||||
BIN
deps/+WebView2/lib/win32/WebView2Loader.dll
vendored
BIN
deps/+WebView2/lib/win32/WebView2Loader.dll
vendored
Binary file not shown.
BIN
deps/+WebView2/lib/win32/WebView2Loader.dll.lib
vendored
BIN
deps/+WebView2/lib/win32/WebView2Loader.dll.lib
vendored
Binary file not shown.
BIN
deps/+WebView2/lib/win32/WebView2LoaderStatic.lib
vendored
BIN
deps/+WebView2/lib/win32/WebView2LoaderStatic.lib
vendored
Binary file not shown.
BIN
deps/+WebView2/lib/win64/WebView2Loader.dll
vendored
BIN
deps/+WebView2/lib/win64/WebView2Loader.dll
vendored
Binary file not shown.
BIN
deps/+WebView2/lib/win64/WebView2Loader.dll.lib
vendored
BIN
deps/+WebView2/lib/win64/WebView2Loader.dll.lib
vendored
Binary file not shown.
BIN
deps/+WebView2/lib/win64/WebView2LoaderStatic.lib
vendored
BIN
deps/+WebView2/lib/win64/WebView2LoaderStatic.lib
vendored
Binary file not shown.
666
deps/+wxWidgets/0001-wxWidget-fix.patch
vendored
666
deps/+wxWidgets/0001-wxWidget-fix.patch
vendored
@@ -1,666 +0,0 @@
|
||||
diff --git a/build/cmake/init.cmake b/build/cmake/init.cmake
|
||||
index 0bc4f934b9..479431a69c 100644
|
||||
--- a/build/cmake/init.cmake
|
||||
+++ b/build/cmake/init.cmake
|
||||
@@ -413,7 +413,11 @@ if(wxUSE_GUI)
|
||||
else()
|
||||
find_package(OpenGL)
|
||||
if(WXGTK3 AND OpenGL_EGL_FOUND AND wxUSE_GLCANVAS_EGL)
|
||||
+ if(UNIX AND NOT APPLE)
|
||||
+ set(OPENGL_LIBRARIES OpenGL EGL)
|
||||
+ else()
|
||||
set(OPENGL_LIBRARIES OpenGL::OpenGL OpenGL::EGL)
|
||||
+ endif()
|
||||
find_package(WAYLANDEGL)
|
||||
if(WAYLANDEGL_FOUND AND wxHAVE_GDK_WAYLAND)
|
||||
list(APPEND OPENGL_LIBRARIES ${WAYLANDEGL_LIBRARIES})
|
||||
diff --git a/build/cmake/lib/webview/CMakeLists.txt b/build/cmake/lib/webview/CMakeLists.txt
|
||||
index cc3298ff33..8adbeaea4f 100644
|
||||
--- a/build/cmake/lib/webview/CMakeLists.txt
|
||||
+++ b/build/cmake/lib/webview/CMakeLists.txt
|
||||
@@ -56,7 +56,7 @@ if(APPLE)
|
||||
elseif(WXMSW)
|
||||
if(wxUSE_WEBVIEW_EDGE)
|
||||
# Update the following variables if updating WebView2 SDK
|
||||
- set(WEBVIEW2_VERSION "1.0.705.50")
|
||||
+ set(WEBVIEW2_VERSION "1.0.1418.22")
|
||||
set(WEBVIEW2_URL "https://www.nuget.org/api/v2/package/Microsoft.Web.WebView2/${WEBVIEW2_VERSION}")
|
||||
set(WEBVIEW2_SHA256 "51d2ef56196e2a9d768a6843385bcb9c6baf9ed34b2603ddb074fb4995543a99")
|
||||
|
||||
diff --git a/include/wx/fontutil.h b/include/wx/fontutil.h
|
||||
index 09ad8c8ef3..3c0c2d8f7e 100644
|
||||
--- a/include/wx/fontutil.h
|
||||
+++ b/include/wx/fontutil.h
|
||||
@@ -294,7 +294,11 @@ public:
|
||||
wxFontEncoding GetEncoding() const;
|
||||
|
||||
void SetPointSize(int pointsize);
|
||||
- void SetFractionalPointSize(double pointsize);
|
||||
+ void SetFractionalPointSize(double pointsize
|
||||
+#if defined(__WXMSW__)
|
||||
+ , const wxWindow *window = nullptr
|
||||
+#endif
|
||||
+ );
|
||||
void SetPixelSize(const wxSize& pixelSize);
|
||||
void SetStyle(wxFontStyle style);
|
||||
void SetNumericWeight(int weight);
|
||||
@@ -307,12 +311,19 @@ public:
|
||||
|
||||
// Helper used in many ports: use the normal font size if the input is
|
||||
// negative, as we handle -1 as meaning this for compatibility.
|
||||
- void SetSizeOrDefault(double size)
|
||||
+ void SetSizeOrDefault(double size
|
||||
+#if defined(__WXMSW__)
|
||||
+ , const wxWindow *window = nullptr
|
||||
+#endif
|
||||
+ )
|
||||
{
|
||||
SetFractionalPointSize
|
||||
(
|
||||
size < 0 ? wxNORMAL_FONT->GetFractionalPointSize()
|
||||
: size
|
||||
+#if defined(__WXMSW__)
|
||||
+ ,window
|
||||
+#endif
|
||||
);
|
||||
}
|
||||
|
||||
diff --git a/include/wx/gdicmn.h b/include/wx/gdicmn.h
|
||||
index e29a77627c..dc48cf9451 100644
|
||||
--- a/include/wx/gdicmn.h
|
||||
+++ b/include/wx/gdicmn.h
|
||||
@@ -38,6 +38,7 @@ class WXDLLIMPEXP_FWD_CORE wxRegion;
|
||||
class WXDLLIMPEXP_FWD_BASE wxString;
|
||||
class WXDLLIMPEXP_FWD_CORE wxIconBundle;
|
||||
class WXDLLIMPEXP_FWD_CORE wxPoint;
|
||||
+class WXDLLIMPEXP_FWD_CORE wxWindow;
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// constants
|
||||
@@ -1092,7 +1093,9 @@ extern int WXDLLIMPEXP_CORE wxDisplayDepth();
|
||||
|
||||
// get the display size
|
||||
extern void WXDLLIMPEXP_CORE wxDisplaySize(int *width, int *height);
|
||||
+extern void WXDLLIMPEXP_CORE wxDisplaySize(const wxWindow *window, int *width, int *height);
|
||||
extern wxSize WXDLLIMPEXP_CORE wxGetDisplaySize();
|
||||
+extern wxSize WXDLLIMPEXP_CORE wxGetDisplaySize(const wxWindow *window);
|
||||
extern void WXDLLIMPEXP_CORE wxDisplaySizeMM(int *width, int *height);
|
||||
extern wxSize WXDLLIMPEXP_CORE wxGetDisplaySizeMM();
|
||||
extern wxSize WXDLLIMPEXP_CORE wxGetDisplayPPI();
|
||||
diff --git a/include/wx/generic/grid.h b/include/wx/generic/grid.h
|
||||
index d7a3890764..e4dee51d5a 100644
|
||||
--- a/include/wx/generic/grid.h
|
||||
+++ b/include/wx/generic/grid.h
|
||||
@@ -2951,9 +2951,11 @@ private:
|
||||
wxGridWindow* gridWindow);
|
||||
|
||||
// Update the width/height of the column/row being drag-resized.
|
||||
+ //BBS: add cursor mode for DoGridDragResize's paremeters
|
||||
void DoGridDragResize(const wxPoint& position,
|
||||
const wxGridOperations& oper,
|
||||
- wxGridWindow* gridWindow);
|
||||
+ wxGridWindow* gridWindow,
|
||||
+ CursorMode mode);
|
||||
|
||||
// process different clicks on grid cells
|
||||
void DoGridCellLeftDown(wxMouseEvent& event,
|
||||
diff --git a/include/wx/msw/font.h b/include/wx/msw/font.h
|
||||
index 0f9768b44e..094d774918 100644
|
||||
--- a/include/wx/msw/font.h
|
||||
+++ b/include/wx/msw/font.h
|
||||
@@ -23,7 +23,7 @@ public:
|
||||
// ctors and such
|
||||
wxFont() { }
|
||||
|
||||
- wxFont(const wxFontInfo& info);
|
||||
+ wxFont(const wxFontInfo& info, const wxWindow *window = nullptr);
|
||||
|
||||
wxFont(int size,
|
||||
wxFontFamily family,
|
||||
diff --git a/include/wx/msw/tooltip.h b/include/wx/msw/tooltip.h
|
||||
index 4c3be08cec..96fb378d01 100644
|
||||
--- a/include/wx/msw/tooltip.h
|
||||
+++ b/include/wx/msw/tooltip.h
|
||||
@@ -91,10 +91,10 @@ private:
|
||||
// the one and only one tooltip control we use - never access it directly
|
||||
// but use GetToolTipCtrl() which will create it when needed
|
||||
static WXHWND ms_hwndTT;
|
||||
-
|
||||
+public:
|
||||
// create the tooltip ctrl if it doesn't exist yet and return its HWND
|
||||
static WXHWND GetToolTipCtrl();
|
||||
-
|
||||
+private:
|
||||
// to be used in wxModule for deleting tooltip ctrl window when exiting mainloop
|
||||
static void DeleteToolTipCtrl();
|
||||
|
||||
diff --git a/include/wx/osx/app.h b/include/wx/osx/app.h
|
||||
index 317a0ca96f..58014ec1d4 100644
|
||||
--- a/include/wx/osx/app.h
|
||||
+++ b/include/wx/osx/app.h
|
||||
@@ -161,7 +161,7 @@ private:
|
||||
|
||||
public:
|
||||
bool OSXInitWasCalled() { return m_inited; }
|
||||
- void OSXStoreOpenFiles(const wxArrayString &files ) { m_openFiles = files ; }
|
||||
+ virtual void OSXStoreOpenFiles(const wxArrayString &files ) { m_openFiles = files ; }
|
||||
void OSXStorePrintFiles(const wxArrayString &files ) { m_printFiles = files ; }
|
||||
void OSXStoreOpenURL(const wxString &url ) { m_getURL = url ; }
|
||||
#endif
|
||||
diff --git a/src/common/combocmn.cpp b/src/common/combocmn.cpp
|
||||
index b61aac35bf..d12b745e8c 100644
|
||||
--- a/src/common/combocmn.cpp
|
||||
+++ b/src/common/combocmn.cpp
|
||||
@@ -2141,7 +2141,7 @@ void wxComboCtrlBase::CreatePopup()
|
||||
#if !USES_GENERICTLW
|
||||
m_winPopup = new wxComboPopupWindowBase2( this, wxNO_BORDER );
|
||||
#else
|
||||
- int tlwFlags = wxNO_BORDER;
|
||||
+ int tlwFlags = wxNO_BORDER | wxSTAY_ON_TOP;
|
||||
#ifdef wxCC_GENERIC_TLW_IS_FRAME
|
||||
tlwFlags |= wxFRAME_NO_TASKBAR;
|
||||
#endif
|
||||
@@ -2285,6 +2285,9 @@ void wxComboCtrlBase::ShowPopup()
|
||||
|
||||
SetFocus();
|
||||
|
||||
+ //int displayIdx = wxDisplay::GetFromWindow(this);
|
||||
+ //wxRect displayRect = wxDisplay(displayIdx != wxNOT_FOUND ? displayIdx : 0u).GetGeometry();
|
||||
+
|
||||
// Space above and below
|
||||
int screenHeight;
|
||||
wxPoint scrPos;
|
||||
@@ -2407,9 +2410,13 @@ void wxComboCtrlBase::ShowPopup()
|
||||
|
||||
int showFlags = CanDeferShow;
|
||||
|
||||
- if ( spaceBelow < szp.y )
|
||||
+ int anchorSideVertical = m_anchorSide & (wxUP | wxDOWN);
|
||||
+ if (// Pop up as asked for by the library user.
|
||||
+ (anchorSideVertical & wxUP) ||
|
||||
+ // Automatic: Pop up if it does not fit down.
|
||||
+ (anchorSideVertical == 0 && spaceBelow < szp.y ))
|
||||
{
|
||||
- popupY = scrPos.y - szp.y;
|
||||
+ popupY = scrPos.y - szp.y + displayRect.GetTop();
|
||||
showFlags |= ShowAbove;
|
||||
}
|
||||
|
||||
diff --git a/src/common/datavcmn.cpp b/src/common/datavcmn.cpp
|
||||
index 1f5fd4d66b..14ea2f8ef1 100644
|
||||
--- a/src/common/datavcmn.cpp
|
||||
+++ b/src/common/datavcmn.cpp
|
||||
@@ -1322,7 +1322,11 @@ wxDataViewItem wxDataViewCtrlBase::GetSelection() const
|
||||
|
||||
wxDataViewItemArray selections;
|
||||
GetSelections(selections);
|
||||
- return selections[0];
|
||||
+ // BBS
|
||||
+ if (!selections.empty())
|
||||
+ return selections[0];
|
||||
+ else
|
||||
+ return wxDataViewItem(0);
|
||||
}
|
||||
|
||||
namespace
|
||||
diff --git a/src/common/dcbufcmn.cpp b/src/common/dcbufcmn.cpp
|
||||
index 74958fce10..59844f4526 100644
|
||||
--- a/src/common/dcbufcmn.cpp
|
||||
+++ b/src/common/dcbufcmn.cpp
|
||||
@@ -82,9 +82,15 @@ private:
|
||||
const double scale = dc ? dc->GetContentScaleFactor() : 1.0;
|
||||
wxBitmap* const buffer = new wxBitmap;
|
||||
|
||||
+#if __WXMSW__
|
||||
// we must always return a valid bitmap but creating a bitmap of
|
||||
// size 0 would fail, so create a 1*1 bitmap in this case
|
||||
- buffer->CreateScaled(wxMax(w, 1), wxMax(h, 1), -1, scale);
|
||||
+ buffer->Create(wxMax(w, 1), wxMax(h, 1), 24);
|
||||
+#else
|
||||
+ // we must always return a valid bitmap but creating a bitmap of
|
||||
+ // size 0 would fail, so create a 1*1 bitmap in this case
|
||||
+ buffer->CreateScaled(wxMax(w, 1), wxMax(h, 1), -1, scale);
|
||||
+#endif
|
||||
|
||||
return buffer;
|
||||
}
|
||||
diff --git a/src/common/gdicmn.cpp b/src/common/gdicmn.cpp
|
||||
index 20442bbc73..9a24951ec7 100644
|
||||
--- a/src/common/gdicmn.cpp
|
||||
+++ b/src/common/gdicmn.cpp
|
||||
@@ -863,11 +863,25 @@ void wxDisplaySize(int *width, int *height)
|
||||
*height = size.y;
|
||||
}
|
||||
|
||||
+void wxDisplaySize(const wxWindow *window, int *width, int *height)
|
||||
+{
|
||||
+ const wxSize size = wxGetDisplaySize(window);
|
||||
+ if ( width )
|
||||
+ *width = size.x;
|
||||
+ if ( height )
|
||||
+ *height = size.y;
|
||||
+}
|
||||
+
|
||||
wxSize wxGetDisplaySize()
|
||||
{
|
||||
return wxDisplay().GetGeometry().GetSize();
|
||||
}
|
||||
|
||||
+wxSize wxGetDisplaySize(const wxWindow *window)
|
||||
+{
|
||||
+ return window ? wxDisplay(window).GetGeometry().GetSize() : wxDisplay().GetGeometry().GetSize();
|
||||
+}
|
||||
+
|
||||
void wxClientDisplayRect(int *x, int *y, int *width, int *height)
|
||||
{
|
||||
const wxRect rect = wxGetClientDisplayRect();
|
||||
diff --git a/src/common/intl.cpp b/src/common/intl.cpp
|
||||
index 0b0d8798f4..7072fab18a 100644
|
||||
--- a/src/common/intl.cpp
|
||||
+++ b/src/common/intl.cpp
|
||||
@@ -1628,6 +1628,12 @@ GetInfoFromLCID(LCID lcid,
|
||||
{
|
||||
str = buf;
|
||||
|
||||
+//FIXME Vojtech: We forcefully set the locales for a decimal point to "C", but this
|
||||
+// is not possible for the Win32 locales, therefore there is a discrepancy.
|
||||
+// It looks like we live with the discrepancy for at least half a year, so we will
|
||||
+// suppress the assert until we fix Slic3r to properly switch to "C" locales just
|
||||
+// for file import / export.
|
||||
+#if 0
|
||||
// As we get our decimal point separator from Win32 and not the
|
||||
// CRT there is a possibility of mismatch between them and this
|
||||
// can easily happen if the user code called setlocale()
|
||||
@@ -1641,6 +1647,7 @@ GetInfoFromLCID(LCID lcid,
|
||||
"Decimal separator mismatch -- did you use setlocale()?"
|
||||
"If so, use wxLocale to change the locale instead."
|
||||
);
|
||||
+#endif
|
||||
}
|
||||
break;
|
||||
|
||||
diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp
|
||||
index 41fd4524cf..f4a15cb839 100644
|
||||
--- a/src/generic/grid.cpp
|
||||
+++ b/src/generic/grid.cpp
|
||||
@@ -3824,7 +3824,8 @@ void wxGrid::ProcessRowLabelMouseEvent( wxMouseEvent& event, wxGridRowLabelWindo
|
||||
{
|
||||
case WXGRID_CURSOR_RESIZE_ROW:
|
||||
{
|
||||
- DoGridDragResize(event.GetPosition(), wxGridRowOperations(), gridWindow);
|
||||
+ //BBS: add cursor mode for DoGridDragResize's paremeters
|
||||
+ DoGridDragResize(event.GetPosition(), wxGridRowOperations(), gridWindow, WXGRID_CURSOR_RESIZE_ROW);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -4166,7 +4167,8 @@ void wxGrid::ProcessColLabelMouseEvent( wxMouseEvent& event, wxGridColLabelWindo
|
||||
switch ( m_cursorMode )
|
||||
{
|
||||
case WXGRID_CURSOR_RESIZE_COL:
|
||||
- DoGridDragResize(event.GetPosition(), wxGridColumnOperations(), gridWindow);
|
||||
+ //BBS: add cursor mode for DoGridDragResize's paremeters
|
||||
+ DoGridDragResize(event.GetPosition(), wxGridColumnOperations(), gridWindow, WXGRID_CURSOR_RESIZE_COL);
|
||||
break;
|
||||
|
||||
case WXGRID_CURSOR_SELECT_COL:
|
||||
@@ -4708,11 +4710,13 @@ bool wxGrid::DoGridDragEvent(wxMouseEvent& event,
|
||||
return DoGridCellDrag(event, coords, isFirstDrag);
|
||||
|
||||
case WXGRID_CURSOR_RESIZE_ROW:
|
||||
- DoGridDragResize(event.GetPosition(), wxGridRowOperations(), gridWindow);
|
||||
+ //BBS: add cursor mode for DoGridDragResize's paremeters
|
||||
+ DoGridDragResize(event.GetPosition(), wxGridRowOperations(), gridWindow, WXGRID_CURSOR_RESIZE_ROW);
|
||||
break;
|
||||
|
||||
case WXGRID_CURSOR_RESIZE_COL:
|
||||
- DoGridDragResize(event.GetPosition(), wxGridColumnOperations(), gridWindow);
|
||||
+ //BBS: add cursor mode for DoGridDragResize's paremeters
|
||||
+ DoGridDragResize(event.GetPosition(), wxGridColumnOperations(), gridWindow, WXGRID_CURSOR_RESIZE_COL);
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -4803,6 +4807,8 @@ wxGrid::DoGridCellLeftDown(wxMouseEvent& event,
|
||||
case wxGridSelectCells:
|
||||
case wxGridSelectRowsOrColumns:
|
||||
// nothing to do in these cases
|
||||
+ //BBS: select this cell when first click
|
||||
+ m_selection->SelectBlock(coords.GetRow(), coords.GetCol(), coords.GetRow(), coords.GetCol(), event);
|
||||
break;
|
||||
|
||||
case wxGridSelectRows:
|
||||
@@ -5044,9 +5050,11 @@ void wxGrid::ProcessGridCellMouseEvent(wxMouseEvent& event, wxGridWindow *eventG
|
||||
}
|
||||
}
|
||||
|
||||
+//BBS: add cursor mode for DoGridDragResize's paremeters
|
||||
void wxGrid::DoGridDragResize(const wxPoint& position,
|
||||
const wxGridOperations& oper,
|
||||
- wxGridWindow* gridWindow)
|
||||
+ wxGridWindow* gridWindow,
|
||||
+ CursorMode mode)
|
||||
{
|
||||
// Get the logical position from the physical one we're passed.
|
||||
const wxPoint
|
||||
@@ -5056,10 +5064,28 @@ void wxGrid::DoGridDragResize(const wxPoint& position,
|
||||
// orthogonal direction.
|
||||
const int linePos = oper.Dual().Select(logicalPos);
|
||||
|
||||
- const int lineStart = oper.GetLineStartPos(this, m_dragRowOrCol);
|
||||
- oper.SetLineSize(this, m_dragRowOrCol,
|
||||
+ //BBS: add logic for resize multiplexed cols
|
||||
+ if (mode == WXGRID_CURSOR_RESIZE_COL) {
|
||||
+ int col_to_resize = m_dragRowOrCol;
|
||||
+ int num_rows, num_cols;
|
||||
+ this->GetCellSize(0, m_dragRowOrCol, &num_rows, &num_cols);
|
||||
+ if (num_cols < 1)
|
||||
+ col_to_resize = m_dragRowOrCol - 1;
|
||||
+
|
||||
+ const int lineEnd = oper.GetLineEndPos(this, m_dragRowOrCol);
|
||||
+ const int lineSize = oper.GetLineSize(this, col_to_resize);
|
||||
+ int size = linePos - lineEnd + lineSize;
|
||||
+ oper.SetLineSize(this, col_to_resize,
|
||||
+ wxMax(size,
|
||||
+ oper.GetMinimalLineSize(this, col_to_resize)));
|
||||
+ }
|
||||
+ else {
|
||||
+ const int lineStart = oper.GetLineStartPos(this, m_dragRowOrCol);
|
||||
+
|
||||
+ oper.SetLineSize(this, m_dragRowOrCol,
|
||||
wxMax(linePos - lineStart,
|
||||
oper.GetMinimalLineSize(this, m_dragRowOrCol)));
|
||||
+ }
|
||||
|
||||
// TODO: generate RESIZING event, see #10754, if the size has changed.
|
||||
}
|
||||
@@ -5082,7 +5108,8 @@ wxPoint wxGrid::GetPositionForResizeEvent(int width) const
|
||||
|
||||
void wxGrid::DoEndDragResizeRow(const wxMouseEvent& event, wxGridWindow* gridWindow)
|
||||
{
|
||||
- DoGridDragResize(event.GetPosition(), wxGridRowOperations(), gridWindow);
|
||||
+ //BBS: add cursor mode for DoGridDragResize's paremeters
|
||||
+ DoGridDragResize(event.GetPosition(), wxGridRowOperations(), gridWindow, WXGRID_CURSOR_RESIZE_ROW);
|
||||
|
||||
SendGridSizeEvent(wxEVT_GRID_ROW_SIZE, m_dragRowOrCol, -1, event);
|
||||
|
||||
@@ -5091,7 +5118,8 @@ void wxGrid::DoEndDragResizeRow(const wxMouseEvent& event, wxGridWindow* gridWin
|
||||
|
||||
void wxGrid::DoEndDragResizeCol(const wxMouseEvent& event, wxGridWindow* gridWindow)
|
||||
{
|
||||
- DoGridDragResize(event.GetPosition(), wxGridColumnOperations(), gridWindow);
|
||||
+ //BBS: add cursor mode for DoGridDragResize's paremeters
|
||||
+ DoGridDragResize(event.GetPosition(), wxGridColumnOperations(), gridWindow, WXGRID_CURSOR_RESIZE_COL);
|
||||
|
||||
SendGridSizeEvent(wxEVT_GRID_COL_SIZE, -1, m_dragRowOrCol, event);
|
||||
|
||||
@@ -5105,9 +5133,10 @@ void wxGrid::DoHeaderStartDragResizeCol(int col)
|
||||
|
||||
void wxGrid::DoHeaderDragResizeCol(int width)
|
||||
{
|
||||
+ //BBS: add cursor mode for DoGridDragResize's paremeters
|
||||
DoGridDragResize(GetPositionForResizeEvent(width),
|
||||
wxGridColumnOperations(),
|
||||
- m_gridWin);
|
||||
+ m_gridWin, WXGRID_CURSOR_RESIZE_COL);
|
||||
}
|
||||
|
||||
void wxGrid::DoHeaderEndDragResizeCol(int width)
|
||||
@@ -5891,6 +5920,10 @@ void wxGrid::OnKeyDown( wxKeyEvent& event )
|
||||
DisableCellEditControl();
|
||||
|
||||
MoveCursorDown( event.ShiftDown() );
|
||||
+ //BBS: select this cell when first click
|
||||
+ m_selection->SelectBlock(m_currentCellCoords.GetRow(), m_currentCellCoords.GetCol(),
|
||||
+ m_currentCellCoords.GetRow(), m_currentCellCoords.GetCol(),
|
||||
+ event);
|
||||
}
|
||||
break;
|
||||
|
||||
diff --git a/src/msw/bmpcbox.cpp b/src/msw/bmpcbox.cpp
|
||||
index 0a2d167ad7..0aeba45ea9 100644
|
||||
--- a/src/msw/bmpcbox.cpp
|
||||
+++ b/src/msw/bmpcbox.cpp
|
||||
@@ -156,13 +156,20 @@ void wxBitmapComboBox::RecreateControl()
|
||||
|
||||
wxComboBox::DoClear();
|
||||
|
||||
- HWND hwnd = GetHwnd();
|
||||
+ WNDPROC wndproc_edit = nullptr;
|
||||
+ WinStruct<COMBOBOXINFO> combobox_info;
|
||||
+ HWND hwnd = GetHwnd();
|
||||
+if (::GetComboBoxInfo(hwnd, &combobox_info))
|
||||
+ wndproc_edit = (WNDPROC)wxGetWindowProc(combobox_info.hwndItem);
|
||||
DissociateHandle();
|
||||
::DestroyWindow(hwnd);
|
||||
|
||||
if ( !MSWCreateControl(wxT("COMBOBOX"), wxEmptyString, pos, size) )
|
||||
return;
|
||||
|
||||
+if (::GetComboBoxInfo(GetHwnd(), &combobox_info))
|
||||
+ wxSetWindowProc(combobox_info.hwndItem, wndproc_edit);
|
||||
+
|
||||
// initialize the controls contents
|
||||
for ( i = 0; i < numItems; i++ )
|
||||
{
|
||||
diff --git a/src/msw/font.cpp b/src/msw/font.cpp
|
||||
index 0bd240d79f..d38b1b00f5 100644
|
||||
--- a/src/msw/font.cpp
|
||||
+++ b/src/msw/font.cpp
|
||||
@@ -54,7 +54,7 @@ static const int PITCH_MASK = FIXED_PITCH | VARIABLE_PITCH;
|
||||
class WXDLLEXPORT wxFontRefData: public wxGDIRefData
|
||||
{
|
||||
public:
|
||||
- wxFontRefData(const wxFontInfo& info = wxFontInfo());
|
||||
+ wxFontRefData(const wxFontInfo& info = wxFontInfo(), const wxWindow* window = nullptr);
|
||||
|
||||
wxFontRefData(const wxNativeFontInfo& info, WXHFONT hFont = 0)
|
||||
{
|
||||
@@ -324,7 +324,7 @@ protected:
|
||||
// wxFontRefData
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
-wxFontRefData::wxFontRefData(const wxFontInfo& info)
|
||||
+wxFontRefData::wxFontRefData(const wxFontInfo& info, const wxWindow *window)
|
||||
{
|
||||
m_hFont = NULL;
|
||||
|
||||
@@ -335,7 +335,7 @@ wxFontRefData::wxFontRefData(const wxFontInfo& info)
|
||||
}
|
||||
else
|
||||
{
|
||||
- m_nativeFontInfo.SetSizeOrDefault(info.GetFractionalPointSize());
|
||||
+ m_nativeFontInfo.SetSizeOrDefault(info.GetFractionalPointSize(), window);
|
||||
}
|
||||
|
||||
SetStyle(info.GetStyle());
|
||||
@@ -518,12 +518,12 @@ wxFontEncoding wxNativeFontInfo::GetEncoding() const
|
||||
return wxGetFontEncFromCharSet(lf.lfCharSet);
|
||||
}
|
||||
|
||||
-void wxNativeFontInfo::SetFractionalPointSize(double pointSizeNew)
|
||||
+void wxNativeFontInfo::SetFractionalPointSize(double pointSizeNew, const wxWindow *window)
|
||||
{
|
||||
// We don't have the correct DPI to use here, so use that of the
|
||||
// primary screen and rely on WXAdjustToPPI() changing it later if
|
||||
// necessary.
|
||||
- const int ppi = ::GetDeviceCaps(ScreenHDC(), LOGPIXELSY);
|
||||
+ const int ppi = window ? window->GetDPI().GetY() : ::GetDeviceCaps(ScreenHDC(), LOGPIXELSY);
|
||||
lf.lfHeight = GetLogFontHeightAtPPI(pointSizeNew, ppi);
|
||||
|
||||
pointSize = pointSizeNew;
|
||||
@@ -812,9 +812,9 @@ wxFont::wxFont(const wxString& fontdesc)
|
||||
(void)Create(info);
|
||||
}
|
||||
|
||||
-wxFont::wxFont(const wxFontInfo& info)
|
||||
+wxFont::wxFont(const wxFontInfo& info, const wxWindow *window)
|
||||
{
|
||||
- m_refData = new wxFontRefData(info);
|
||||
+ m_refData = new wxFontRefData(info, window);
|
||||
}
|
||||
|
||||
bool wxFont::Create(const wxNativeFontInfo& info, WXHFONT hFont)
|
||||
diff --git a/src/msw/menuitem.cpp b/src/msw/menuitem.cpp
|
||||
index 9bb397d472..30af7154a7 100644
|
||||
--- a/src/msw/menuitem.cpp
|
||||
+++ b/src/msw/menuitem.cpp
|
||||
@@ -368,6 +368,8 @@ void MenuDrawData::Init(wxWindow const* window)
|
||||
// native menu uses small top margin for separator
|
||||
if ( SeparatorMargin.cyTopHeight >= 2 )
|
||||
SeparatorMargin.cyTopHeight -= 2;
|
||||
+
|
||||
+ SeparatorSize.cy = 0;
|
||||
}
|
||||
else
|
||||
#endif // wxUSE_UXTHEME
|
||||
diff --git a/src/msw/window.cpp b/src/msw/window.cpp
|
||||
index eadc2f5700..f64fea4446 100644
|
||||
--- a/src/msw/window.cpp
|
||||
+++ b/src/msw/window.cpp
|
||||
@@ -4773,33 +4773,49 @@ static wxSize GetWindowDPI(HWND hwnd)
|
||||
}
|
||||
|
||||
/*extern*/
|
||||
-int wxGetSystemMetrics(int nIndex, const wxWindow* window)
|
||||
+int wxGetSystemMetrics(int nIndex, const wxWindow* win)
|
||||
{
|
||||
#if wxUSE_DYNLIB_CLASS
|
||||
- if ( !window )
|
||||
- window = wxApp::GetMainTopWindow();
|
||||
+ const wxWindow* window = (!win && wxTheApp) ? wxTheApp->GetTopWindow() : win;
|
||||
|
||||
- if ( window )
|
||||
+ if (window)
|
||||
{
|
||||
- typedef int (WINAPI * GetSystemMetricsForDpi_t)(int nIndex, UINT dpi);
|
||||
- static GetSystemMetricsForDpi_t s_pfnGetSystemMetricsForDpi = NULL;
|
||||
- static bool s_initDone = false;
|
||||
-
|
||||
- if ( !s_initDone )
|
||||
- {
|
||||
- wxLoadedDLL dllUser32("user32.dll");
|
||||
- wxDL_INIT_FUNC(s_pfn, GetSystemMetricsForDpi, dllUser32);
|
||||
- s_initDone = true;
|
||||
+#if 1
|
||||
+ if (window->GetHWND() && (nIndex == SM_CXSCREEN || nIndex == SM_CYSCREEN)) {
|
||||
+ HDC hdc = GetDC(window->GetHWND());
|
||||
+#if 0
|
||||
+ double dim = GetDeviceCaps(hdc, nIndex == SM_CXSCREEN ? HORZRES : VERTRES);
|
||||
+ ReleaseDC(window->GetHWND(), hdc);
|
||||
+ wxSize dpi = window->GetDPI();
|
||||
+ dim *= 96.0 / (nIndex == SM_CXSCREEN ? dpi.x : dpi.y);
|
||||
+ return int(dim + 0.5);
|
||||
+#else
|
||||
+ return int(GetDeviceCaps(hdc, nIndex == SM_CXSCREEN ? HORZRES : VERTRES));
|
||||
+#endif
|
||||
}
|
||||
-
|
||||
- if ( s_pfnGetSystemMetricsForDpi )
|
||||
+ else
|
||||
+#endif
|
||||
{
|
||||
- const int dpi = window->GetDPI().y;
|
||||
- return s_pfnGetSystemMetricsForDpi(nIndex, (UINT)dpi);
|
||||
+ typedef int (WINAPI * GetSystemMetricsForDpi_t)(int nIndex, UINT dpi);
|
||||
+ static GetSystemMetricsForDpi_t s_pfnGetSystemMetricsForDpi = NULL;
|
||||
+ static bool s_initDone = false;
|
||||
+
|
||||
+ if ( !s_initDone )
|
||||
+ {
|
||||
+ wxLoadedDLL dllUser32("user32.dll");
|
||||
+ wxDL_INIT_FUNC(s_pfn, GetSystemMetricsForDpi, dllUser32);
|
||||
+ s_initDone = true;
|
||||
+ }
|
||||
+
|
||||
+ if ( s_pfnGetSystemMetricsForDpi )
|
||||
+ {
|
||||
+ const int dpi = window->GetDPI().y;
|
||||
+ return s_pfnGetSystemMetricsForDpi(nIndex, (UINT)dpi);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
#else
|
||||
- wxUnusedVar(window);
|
||||
+ wxUnusedVar(win);
|
||||
#endif // wxUSE_DYNLIB_CLASS
|
||||
|
||||
return ::GetSystemMetrics(nIndex);
|
||||
diff --git a/src/osx/cocoa/dataview.mm b/src/osx/cocoa/dataview.mm
|
||||
index 6ff0cc3088..4943f3ea38 100644
|
||||
--- a/src/osx/cocoa/dataview.mm
|
||||
+++ b/src/osx/cocoa/dataview.mm
|
||||
@@ -1734,12 +1734,22 @@ outlineView:(NSOutlineView*)outlineView
|
||||
if ( !dvc->GetEventHandler()->ProcessEvent(eventDV) )
|
||||
[super keyDown:event];
|
||||
}
|
||||
- else
|
||||
+ //FIXME Vojtech's hack to get the accelerators assigned to the wxDataViewControl working.
|
||||
+ else if (! implementation->DoHandleKeyEvent(event))
|
||||
{
|
||||
[super keyDown:event]; // all other keys
|
||||
}
|
||||
}
|
||||
|
||||
+//FIXME Vojtech: This is a workaround to get at least the "mouse move" events at the wxDataViewControl,
|
||||
+// so we can show the tooltips. The "mouse move" events are being send only if the wxDataViewControl
|
||||
+// has focus, which is a limitation of wxWidgets. We may grab focus on "mouse entry" though.
|
||||
+- (void)mouseMoved:(NSEvent *)event
|
||||
+{
|
||||
+if (! implementation->DoHandleMouseEvent(event))
|
||||
+ [super mouseMoved:event];
|
||||
+}
|
||||
+
|
||||
//
|
||||
// contextual menus
|
||||
//
|
||||
@@ -2672,12 +2682,22 @@ void wxCocoaDataViewControl::DoSetIndent(int indent)
|
||||
|
||||
void wxCocoaDataViewControl::HitTest(const wxPoint& point, wxDataViewItem& item, wxDataViewColumn*& columnPtr) const
|
||||
{
|
||||
- NSPoint const nativePoint = wxToNSPoint((NSScrollView*) GetWXWidget(),point);
|
||||
+ NSTableHeaderView *headerView = [m_OutlineView headerView];
|
||||
+ if (headerView && point.y < headerView.visibleRect.size.height) {
|
||||
+ // The point is inside the header area.
|
||||
+ columnPtr = NULL;
|
||||
+ item = wxDataViewItem();
|
||||
+ return;
|
||||
+ }
|
||||
+ // Convert from the window coordinates to the virtual scrolled view coordinates.
|
||||
+ NSScrollView *scrollView = [m_OutlineView enclosingScrollView];
|
||||
+ const NSRect &visibleRect = scrollView.contentView.visibleRect;
|
||||
+ NSPoint const nativePoint = wxToNSPoint((NSScrollView*) GetWXWidget(),
|
||||
+ wxPoint(point.x + visibleRect.origin.x, point.y + visibleRect.origin.y));
|
||||
|
||||
int indexColumn;
|
||||
int indexRow;
|
||||
|
||||
-
|
||||
indexColumn = [m_OutlineView columnAtPoint:nativePoint];
|
||||
indexRow = [m_OutlineView rowAtPoint: nativePoint];
|
||||
if ((indexColumn >= 0) && (indexRow >= 0))
|
||||
diff --git a/src/osx/cocoa/settings.mm b/src/osx/cocoa/settings.mm
|
||||
index de5f52860c..a9581174a4 100644
|
||||
--- a/src/osx/cocoa/settings.mm
|
||||
+++ b/src/osx/cocoa/settings.mm
|
||||
@@ -224,7 +224,7 @@ wxFont wxSystemSettingsNative::GetFont(wxSystemFont index)
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// Get a system metric, e.g. scrollbar size
|
||||
-int wxSystemSettingsNative::GetMetric(wxSystemMetric index, const wxWindow* WXUNUSED(win))
|
||||
+int wxSystemSettingsNative::GetMetric(wxSystemMetric index, const wxWindow* win)
|
||||
{
|
||||
int value;
|
||||
|
||||
@@ -259,11 +259,11 @@ int wxSystemSettingsNative::GetMetric(wxSystemMetric index, const wxWindow* WXUN
|
||||
// TODO case wxSYS_WINDOWMIN_Y:
|
||||
|
||||
case wxSYS_SCREEN_X:
|
||||
- wxDisplaySize(&value, NULL);
|
||||
+ wxDisplaySize(win, &value, NULL);
|
||||
return value;
|
||||
|
||||
case wxSYS_SCREEN_Y:
|
||||
- wxDisplaySize(NULL, &value);
|
||||
+ wxDisplaySize(win, NULL, &value);
|
||||
return value;
|
||||
|
||||
// TODO case wxSYS_FRAMESIZE_X:
|
||||
15
deps/+wxWidgets/webview.patch
vendored
Normal file
15
deps/+wxWidgets/webview.patch
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
diff -ur build.orig/cmake/lib/webview/CMakeLists.txt build/cmake/lib/webview/CMakeLists.txt
|
||||
--- wxWidgets.orig/build/cmake/lib/webview/CMakeLists.txt 2024-06-14 19:02:36.000000000 +0200
|
||||
+++ wxWidgets/build/cmake/lib/webview/CMakeLists.txt 2024-07-01 16:21:52.922737200 +0200
|
||||
@@ -46,9 +46,9 @@
|
||||
elseif(WXMSW)
|
||||
if(wxUSE_WEBVIEW_EDGE)
|
||||
# Update the following variables if updating WebView2 SDK
|
||||
- set(WEBVIEW2_VERSION "1.0.705.50")
|
||||
+ set(WEBVIEW2_VERSION "1.0.2592.51")
|
||||
set(WEBVIEW2_URL "https://www.nuget.org/api/v2/package/Microsoft.Web.WebView2/${WEBVIEW2_VERSION}")
|
||||
- set(WEBVIEW2_SHA256 "6a34bb553e18cfac7297b4031f3eac2558e439f8d16a45945c22945ac404105d")
|
||||
+ set(WEBVIEW2_SHA256 "805c79e05184fab18c9fe7b8ba820c598399b97adc1fbf5b0ea490efad91d5b8")
|
||||
|
||||
set(WEBVIEW2_DEFAULT_PACKAGE_DIR "${CMAKE_BINARY_DIR}/packages/Microsoft.Web.WebView2.${WEBVIEW2_VERSION}")
|
||||
|
||||
60
deps/+wxWidgets/wxWidgets.cmake
vendored
60
deps/+wxWidgets/wxWidgets.cmake
vendored
@@ -1,5 +1,3 @@
|
||||
set(_wx_git_tag v3.2.0)
|
||||
|
||||
set(_wx_toolkit "")
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
option(DEP_WX_GTK3 "Build wxWidgets for GTK3 instead of GTK2" OFF)
|
||||
@@ -9,46 +7,39 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
set(_gtk_ver 3)
|
||||
endif ()
|
||||
set(_wx_toolkit "-DwxBUILD_TOOLKIT=gtk${_gtk_ver}")
|
||||
set(_wx_private_font "-DwxUSE_PRIVATE_FONTS=1")
|
||||
else ()
|
||||
set(_wx_private_font "-DwxUSE_PRIVATE_FONTS=0")
|
||||
endif()
|
||||
|
||||
if (MSVC)
|
||||
set(_wx_edge "-DwxUSE_WEBVIEW_EDGE=ON")
|
||||
else ()
|
||||
set(_wx_edge "-DwxUSE_WEBVIEW_EDGE=OFF")
|
||||
endif ()
|
||||
|
||||
if (MSVC)
|
||||
set(_patch_cmd ${PATCH_CMD} ${CMAKE_CURRENT_LIST_DIR}/0001-wxWidget-fix.patch)
|
||||
else ()
|
||||
set(_patch_cmd test -f WXWIDGETS_PATCHED || ${PATCH_CMD} ${CMAKE_CURRENT_LIST_DIR}/0001-wxWidget-fix.patch && touch WXWIDGETS_PATCHED)
|
||||
endif ()
|
||||
|
||||
set(_unicode_utf8 OFF)
|
||||
if (UNIX AND NOT APPLE) # wxWidgets will not use char as the underlying type for wxString unless its forced to.
|
||||
set (_unicode_utf8 ON)
|
||||
endif()
|
||||
|
||||
if (MSVC)
|
||||
set(_wx_webview "-DwxUSE_WEBVIEW_EDGE=ON")
|
||||
|
||||
else ()
|
||||
set(_wx_webview "-DwxUSE_WEBVIEW=ON")
|
||||
endif ()
|
||||
|
||||
if (UNIX AND NOT APPLE)
|
||||
set(_wx_secretstore "-DwxUSE_SECRETSTORE=OFF")
|
||||
else ()
|
||||
set(_wx_secretstore "-DwxUSE_SECRETSTORE=ON")
|
||||
endif ()
|
||||
|
||||
add_cmake_project(wxWidgets
|
||||
URL https://github.com/prusa3d/wxWidgets/archive/78aa2dc0ea7ce99dc19adc1140f74c3e2e3f3a26.zip
|
||||
URL_HASH SHA256=94b7d972373503e380e5a8b0ca63b1ccb956da4006402298dd89a0c5c7041b1e
|
||||
URL https://github.com/prusa3d/wxWidgets/archive/323a465e577e03f330e2e6a4c78e564d125340cb.zip
|
||||
URL_HASH SHA256=B538E4AD3CC93117932F4DED70C476D6650F9C70A9D4055A08F3693864C47465
|
||||
PATCH_COMMAND COMMAND ${PATCH_CMD} ${CMAKE_CURRENT_LIST_DIR}/webview.patch
|
||||
CMAKE_ARGS
|
||||
"-DCMAKE_DEBUG_POSTFIX:STRING="
|
||||
-DwxBUILD_PRECOMP=ON
|
||||
${_wx_toolkit}
|
||||
-DwxUSE_MEDIACTRL=ON
|
||||
-DwxUSE_MEDIACTRL=OFF
|
||||
-DwxUSE_DETECT_SM=OFF
|
||||
-DwxUSE_UNICODE=ON
|
||||
${_wx_private_font}
|
||||
-DwxUSE_UNICODE_UTF8=${_unicode_utf8}
|
||||
-DwxUSE_OPENGL=ON
|
||||
-DwxUSE_WEBVIEW=ON
|
||||
${_wx_edge}
|
||||
-DwxUSE_WEBVIEW_IE=OFF
|
||||
-DwxUSE_STC=OFF
|
||||
-DwxUSE_AUI=ON
|
||||
-DwxUSE_LIBPNG=sys
|
||||
-DwxUSE_ZLIB=sys
|
||||
-DwxUSE_NANOSVG=sys
|
||||
@@ -56,12 +47,25 @@ add_cmake_project(wxWidgets
|
||||
-DwxUSE_REGEX=OFF
|
||||
-DwxUSE_LIBXPM=builtin
|
||||
-DwxUSE_LIBJPEG=sys
|
||||
-DwxUSE_LIBTIFF=sys
|
||||
-DwxUSE_LIBTIFF=OFF
|
||||
-DwxUSE_EXPAT=sys
|
||||
-DwxUSE_LIBSDL=OFF
|
||||
-DwxUSE_XTEST=OFF
|
||||
-DwxUSE_GLCANVAS_EGL=OFF
|
||||
-DwxUSE_WEBREQUEST=OFF
|
||||
${_wx_webview}
|
||||
${_wx_secretstore}
|
||||
)
|
||||
|
||||
set(DEP_wxWidgets_DEPENDS ZLIB PNG EXPAT TIFF JPEG NanoSVG)
|
||||
set(DEP_wxWidgets_DEPENDS ZLIB PNG EXPAT JPEG NanoSVG)
|
||||
|
||||
|
||||
if (MSVC)
|
||||
# After the build, copy the WebView2Loader.dll into the installation directory.
|
||||
# This should probably be done better.
|
||||
add_custom_command(TARGET dep_wxWidgets POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/builds/wxWidgets/lib/vc_x64_lib/WebView2Loader.dll"
|
||||
"${${PROJECT_NAME}_DEP_INSTALL_PREFIX}/bin/WebView2Loader.dll")
|
||||
endif()
|
||||
|
||||
|
||||
38
deps/CMakeLists.txt
vendored
38
deps/CMakeLists.txt
vendored
@@ -56,7 +56,7 @@ macro(list_projects result curdir)
|
||||
set(dirlist "")
|
||||
foreach(child ${children})
|
||||
if(IS_DIRECTORY ${curdir}/${child})
|
||||
string(REGEX MATCH "^\\+([a-zA-Z0-9]+)" is_package_dir ${child})
|
||||
string(REGEX MATCH "^\\+([a-zA-Z0-9_]+)" is_package_dir ${child})
|
||||
if(is_package_dir AND EXISTS ${curdir}/${child}/${CMAKE_MATCH_1}.cmake)
|
||||
list(APPEND dirlist ${CMAKE_MATCH_1})
|
||||
endif()
|
||||
@@ -123,25 +123,6 @@ list_projects(FOUND_PACKAGES ${CMAKE_CURRENT_LIST_DIR})
|
||||
|
||||
dep_message(STATUS "Found external package definitions: ${FOUND_PACKAGES}")
|
||||
|
||||
# Current list of all required dependencies for PS (top level)
|
||||
set(REQUIRED_PACKAGES
|
||||
Boost
|
||||
Catch2
|
||||
Cereal
|
||||
CURL
|
||||
EXPAT
|
||||
NLopt
|
||||
GLEW
|
||||
TBB
|
||||
Qhull
|
||||
wxWidgets
|
||||
OpenVDB
|
||||
CGAL
|
||||
OCCT
|
||||
ZLIB
|
||||
LibBGCode
|
||||
)
|
||||
|
||||
set(${PROJECT_NAME}_PLATFORM_PACKAGES "" CACHE STRING "Select packages which are provided by the platform" )
|
||||
set(SYSTEM_PROVIDED_PACKAGES OpenGL)
|
||||
|
||||
@@ -196,12 +177,21 @@ foreach (pkg ${FOUND_PACKAGES})
|
||||
|
||||
if (${pkg} IN_LIST SYSTEM_PROVIDED_PACKAGES)
|
||||
check_system_package(${pkg} _checked_list)
|
||||
elseif (${pkg} IN_LIST REQUIRED_PACKAGES)
|
||||
list(APPEND DEPS_TO_BUILD ${pkg})
|
||||
elseif (TARGET dep_${pkg})
|
||||
get_target_property(_is_excluded_from_all dep_${pkg} EXCLUDE_FROM_ALL)
|
||||
if (NOT _is_excluded_from_all)
|
||||
list(APPEND DEPS_TO_BUILD ${pkg})
|
||||
endif ()
|
||||
endif ()
|
||||
endif ()
|
||||
endforeach()
|
||||
|
||||
# This ugly append ensures that WebView2 was appended no matter what EXCLUDE_FROM_ALL is.
|
||||
# (Webview2 is not added by add_cmake_project)
|
||||
if (MSVC)
|
||||
list(APPEND DEPS_TO_BUILD WebView2)
|
||||
endif()
|
||||
|
||||
# Establish dependency graph
|
||||
foreach (pkg ${SUPPORTED_PACKAGES})
|
||||
if (${pkg} IN_LIST DEPS_TO_BUILD)
|
||||
@@ -214,9 +204,7 @@ foreach (pkg ${SUPPORTED_PACKAGES})
|
||||
elseif(TARGET dep_${deppkg})
|
||||
dep_message(STATUS "Mapping dep_${deppkg} => dep_${pkg}")
|
||||
add_dependencies(dep_${pkg} dep_${deppkg})
|
||||
if (${pkg} IN_LIST REQUIRED_PACKAGES)
|
||||
list(APPEND _build_list dep_${deppkg})
|
||||
endif ()
|
||||
list(APPEND _build_list dep_${deppkg})
|
||||
endif ()
|
||||
endforeach()
|
||||
endforeach()
|
||||
|
||||
Reference in New Issue
Block a user