Follow-up of dcf68aefd7
- disable old from builds against wxWidgets 3.1.3
This commit is contained in:
parent
dcf68aefd7
commit
af5c3583e8
@ -106,6 +106,7 @@ wxString file_wildcards(FileType file_type, const std::string &custom_extension)
|
|||||||
static std::string libslic3r_translate_callback(const char *s) { return wxGetTranslation(wxString(s, wxConvUTF8)).utf8_str().data(); }
|
static std::string libslic3r_translate_callback(const char *s) { return wxGetTranslation(wxString(s, wxConvUTF8)).utf8_str().data(); }
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
#if !wxVERSION_EQUAL_OR_GREATER_THAN(3,1,3)
|
||||||
static void register_win32_dpi_event()
|
static void register_win32_dpi_event()
|
||||||
{
|
{
|
||||||
enum { WM_DPICHANGED_ = 0x02e0 };
|
enum { WM_DPICHANGED_ = 0x02e0 };
|
||||||
@ -121,6 +122,7 @@ static void register_win32_dpi_event()
|
|||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
#endif // !ENABLE_WX_3_1_3_DPI_CHANGED_EVENT
|
||||||
|
|
||||||
static GUID GUID_DEVINTERFACE_HID = { 0x4D1E55B2, 0xF16F, 0x11CF, 0x88, 0xCB, 0x00, 0x11, 0x11, 0x00, 0x00, 0x30 };
|
static GUID GUID_DEVINTERFACE_HID = { 0x4D1E55B2, 0xF16F, 0x11CF, 0x88, 0xCB, 0x00, 0x11, 0x11, 0x00, 0x00, 0x30 };
|
||||||
|
|
||||||
@ -408,7 +410,9 @@ bool GUI_App::on_init_inner()
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
#if !wxVERSION_EQUAL_OR_GREATER_THAN(3,1,3)
|
||||||
register_win32_dpi_event();
|
register_win32_dpi_event();
|
||||||
|
#endif // !ENABLE_WX_3_1_3_DPI_CHANGED_EVENT
|
||||||
register_win32_device_notification_event();
|
register_win32_device_notification_event();
|
||||||
#endif // WIN32
|
#endif // WIN32
|
||||||
|
|
||||||
|
@ -61,7 +61,9 @@ void on_window_geometry(wxTopLevelWindow *tlw, std::function<void()> callback)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !wxVERSION_EQUAL_OR_GREATER_THAN(3,1,3)
|
||||||
wxDEFINE_EVENT(EVT_DPI_CHANGED_SLICER, DpiChangedEvent);
|
wxDEFINE_EVENT(EVT_DPI_CHANGED_SLICER, DpiChangedEvent);
|
||||||
|
#endif // !wxVERSION_EQUAL_OR_GREATER_THAN
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
template<class F> typename F::FN winapi_get_function(const wchar_t *dll, const char *fn_name) {
|
template<class F> typename F::FN winapi_get_function(const wchar_t *dll, const char *fn_name) {
|
||||||
|
@ -25,7 +25,7 @@ class wxTopLevelWindow;
|
|||||||
class wxRect;
|
class wxRect;
|
||||||
|
|
||||||
#if ENABLE_WX_3_1_3_DPI_CHANGED_EVENT
|
#if ENABLE_WX_3_1_3_DPI_CHANGED_EVENT
|
||||||
#define wxVERSION_EQUAL_OR_GREATER_THAN(major, minor, release) ((wxMAJOR_VERSION >= major) && (wxMINOR_VERSION >= minor) && (wxRELEASE_NUMBER >= release))
|
#define wxVERSION_EQUAL_OR_GREATER_THAN(major, minor, release) ((wxMAJOR_VERSION > major) || ((wxMAJOR_VERSION == major) && (wxMINOR_VERSION > minor)) || ((wxMAJOR_VERSION == major) && (wxMINOR_VERSION == minor) && (wxRELEASE_NUMBER >= release)))
|
||||||
#else
|
#else
|
||||||
#define wxVERSION_EQUAL_OR_GREATER_THAN(major, minor, release) 0
|
#define wxVERSION_EQUAL_OR_GREATER_THAN(major, minor, release) 0
|
||||||
#endif // ENABLE_WX_3_1_3_DPI_CHANGED_EVENT
|
#endif // ENABLE_WX_3_1_3_DPI_CHANGED_EVENT
|
||||||
@ -56,6 +56,7 @@ enum { DPI_DEFAULT = 96 };
|
|||||||
int get_dpi_for_window(wxWindow *window);
|
int get_dpi_for_window(wxWindow *window);
|
||||||
wxFont get_default_font_for_dpi(int dpi);
|
wxFont get_default_font_for_dpi(int dpi);
|
||||||
|
|
||||||
|
#if !wxVERSION_EQUAL_OR_GREATER_THAN(3,1,3)
|
||||||
struct DpiChangedEvent : public wxEvent {
|
struct DpiChangedEvent : public wxEvent {
|
||||||
int dpi;
|
int dpi;
|
||||||
wxRect rect;
|
wxRect rect;
|
||||||
@ -71,6 +72,7 @@ struct DpiChangedEvent : public wxEvent {
|
|||||||
};
|
};
|
||||||
|
|
||||||
wxDECLARE_EVENT(EVT_DPI_CHANGED_SLICER, DpiChangedEvent);
|
wxDECLARE_EVENT(EVT_DPI_CHANGED_SLICER, DpiChangedEvent);
|
||||||
|
#endif // !wxVERSION_EQUAL_OR_GREATER_THAN
|
||||||
|
|
||||||
template<class P> class DPIAware : public P
|
template<class P> class DPIAware : public P
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user