Removed some obsolete Perl bindings.
Removed libslic3r from the default include paths for all modules but libslic3r. Now headers from libslic3r need to be included with an explicit path (libslic3r/libslic3r.h etc) Split the localization macros into I18N.{cpp,h}
This commit is contained in:
parent
63faa917a9
commit
a378bb7bed
@ -129,7 +129,7 @@ set(LIBDIR ${CMAKE_CURRENT_SOURCE_DIR}/src/)
|
|||||||
# For the bundled boost libraries (boost::nowide)
|
# For the bundled boost libraries (boost::nowide)
|
||||||
include_directories(${LIBDIR})
|
include_directories(${LIBDIR})
|
||||||
# For libslic3r.h
|
# For libslic3r.h
|
||||||
include_directories(${LIBDIR}/libslic3r ${LIBDIR}/clipper ${LIBDIR}/polypartition)
|
include_directories(${LIBDIR}/clipper ${LIBDIR}/polypartition)
|
||||||
#set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
#set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
|
@ -174,7 +174,7 @@ if (NOT SLIC3R_SYNTAXONLY)
|
|||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
target_compile_definitions(libslic3r PUBLIC -DUSE_TBB ${PNG_DEFINITIONS})
|
target_compile_definitions(libslic3r PUBLIC -DUSE_TBB ${PNG_DEFINITIONS})
|
||||||
target_include_directories(libslic3r PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${LIBNEST2D_INCLUDES} ${PNG_INCLUDE_DIRS})
|
target_include_directories(libslic3r PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${LIBNEST2D_INCLUDES} ${PNG_INCLUDE_DIRS} PUBLIC ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
target_link_libraries(libslic3r
|
target_link_libraries(libslic3r
|
||||||
libnest2d
|
libnest2d
|
||||||
admesh
|
admesh
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#ifndef slic3r_ClipperUtils_hpp_
|
#ifndef slic3r_ClipperUtils_hpp_
|
||||||
#define slic3r_ClipperUtils_hpp_
|
#define slic3r_ClipperUtils_hpp_
|
||||||
|
|
||||||
#include <libslic3r.h>
|
#include "libslic3r.h"
|
||||||
#include "clipper.hpp"
|
#include "clipper.hpp"
|
||||||
#include "ExPolygon.hpp"
|
#include "ExPolygon.hpp"
|
||||||
#include "Polygon.hpp"
|
#include "Polygon.hpp"
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
#include "../PrintConfig.hpp"
|
#include "../PrintConfig.hpp"
|
||||||
#include "../ExtrusionEntity.hpp"
|
#include "../ExtrusionEntity.hpp"
|
||||||
|
|
||||||
#include "Point.hpp"
|
#include "../Point.hpp"
|
||||||
#include "GCodeReader.hpp"
|
#include "../GCodeReader.hpp"
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
|
|
||||||
|
@ -3,8 +3,7 @@
|
|||||||
|
|
||||||
#include "../libslic3r.h"
|
#include "../libslic3r.h"
|
||||||
#include "../ExtrusionEntity.hpp"
|
#include "../ExtrusionEntity.hpp"
|
||||||
|
#include "../Point.hpp"
|
||||||
#include "Point.hpp"
|
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
|
|
||||||
|
@ -12,15 +12,6 @@
|
|||||||
__declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
|
__declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
|
||||||
#endif /* WIN32 */
|
#endif /* WIN32 */
|
||||||
|
|
||||||
#include "libslic3r/libslic3r_version.h.in"
|
|
||||||
#include "Config.hpp"
|
|
||||||
#include "Geometry.hpp"
|
|
||||||
#include "Model.hpp"
|
|
||||||
#include "Print.hpp"
|
|
||||||
#include "TriangleMesh.hpp"
|
|
||||||
#include "Format/3mf.hpp"
|
|
||||||
#include "libslic3r.h"
|
|
||||||
#include "Utils.hpp"
|
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
@ -31,9 +22,15 @@
|
|||||||
#include <boost/nowide/cenv.hpp>
|
#include <boost/nowide/cenv.hpp>
|
||||||
#include <boost/nowide/iostream.hpp>
|
#include <boost/nowide/iostream.hpp>
|
||||||
|
|
||||||
#ifdef USE_WX
|
#include "libslic3r/libslic3r.h"
|
||||||
// #include "GUI/GUI.hpp"
|
#include "libslic3r/Config.hpp"
|
||||||
#endif
|
#include "libslic3r/Geometry.hpp"
|
||||||
|
#include "libslic3r/Model.hpp"
|
||||||
|
#include "libslic3r/Print.hpp"
|
||||||
|
#include "libslic3r/TriangleMesh.hpp"
|
||||||
|
#include "libslic3r/Format/3mf.hpp"
|
||||||
|
#include "libslic3r/Utils.hpp"
|
||||||
|
|
||||||
#include "slic3r/GUI/GUI.hpp"
|
#include "slic3r/GUI/GUI.hpp"
|
||||||
#include "slic3r/GUI/GUI_App.hpp"
|
#include "slic3r/GUI/GUI_App.hpp"
|
||||||
|
|
||||||
|
@ -48,6 +48,8 @@ add_library(libslic3r_gui STATIC
|
|||||||
GUI/GUI_App.hpp
|
GUI/GUI_App.hpp
|
||||||
GUI/GUI_Utils.cpp
|
GUI/GUI_Utils.cpp
|
||||||
GUI/GUI_Utils.hpp
|
GUI/GUI_Utils.hpp
|
||||||
|
GUI/I18N.cpp
|
||||||
|
GUI/I18N.hpp
|
||||||
GUI/MainFrame.cpp
|
GUI/MainFrame.cpp
|
||||||
GUI/MainFrame.hpp
|
GUI/MainFrame.hpp
|
||||||
GUI/Plater.cpp
|
GUI/Plater.cpp
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
#include "2DBed.hpp"
|
#include "2DBed.hpp"
|
||||||
|
|
||||||
#include <wx/dcbuffer.h>
|
#include <wx/dcbuffer.h>
|
||||||
#include "BoundingBox.hpp"
|
|
||||||
#include "Geometry.hpp"
|
#include "libslic3r/BoundingBox.hpp"
|
||||||
#include "ClipperUtils.hpp"
|
#include "libslic3r/Geometry.hpp"
|
||||||
|
#include "libslic3r/ClipperUtils.hpp"
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
namespace GUI {
|
namespace GUI {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#define slic3r_2DBed_hpp_
|
#define slic3r_2DBed_hpp_
|
||||||
|
|
||||||
#include <wx/wx.h>
|
#include <wx/wx.h>
|
||||||
#include "Config.hpp"
|
#include "libslic3r/Config.hpp"
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
namespace GUI {
|
namespace GUI {
|
||||||
|
@ -9,8 +9,8 @@
|
|||||||
#include "libslic3r/Print.hpp"
|
#include "libslic3r/Print.hpp"
|
||||||
#include "libslic3r/SLAPrint.hpp"
|
#include "libslic3r/SLAPrint.hpp"
|
||||||
#include "libslic3r/Slicing.hpp"
|
#include "libslic3r/Slicing.hpp"
|
||||||
|
#include "libslic3r/GCode/Analyzer.hpp"
|
||||||
#include "slic3r/GUI/PresetBundle.hpp"
|
#include "slic3r/GUI/PresetBundle.hpp"
|
||||||
#include "GCode/Analyzer.hpp"
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#include "AboutDialog.hpp"
|
#include "AboutDialog.hpp"
|
||||||
|
#include "I18N.hpp"
|
||||||
|
|
||||||
#include "../../libslic3r/Utils.hpp"
|
#include "libslic3r/Utils.hpp"
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
namespace GUI {
|
namespace GUI {
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
#include <wx/event.h>
|
#include <wx/event.h>
|
||||||
|
|
||||||
#include "Print.hpp"
|
#include "libslic3r/Print.hpp"
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
|
|
||||||
|
@ -1,12 +1,14 @@
|
|||||||
#include "BedShapeDialog.hpp"
|
#include "BedShapeDialog.hpp"
|
||||||
|
|
||||||
|
#include <wx/wx.h>
|
||||||
|
#include <wx/numformatter.h>
|
||||||
#include <wx/sizer.h>
|
#include <wx/sizer.h>
|
||||||
#include <wx/statbox.h>
|
#include <wx/statbox.h>
|
||||||
#include <wx/wx.h>
|
|
||||||
#include "Polygon.hpp"
|
#include "libslic3r/BoundingBox.hpp"
|
||||||
#include "BoundingBox.hpp"
|
#include "libslic3r/Model.hpp"
|
||||||
#include <wx/numformatter.h>
|
#include "libslic3r/Polygon.hpp"
|
||||||
#include "Model.hpp"
|
|
||||||
#include "boost/nowide/iostream.hpp"
|
#include "boost/nowide/iostream.hpp"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
#include "OptionsGroup.hpp"
|
#include "OptionsGroup.hpp"
|
||||||
#include "2DBed.hpp"
|
#include "2DBed.hpp"
|
||||||
|
#include "I18N.hpp"
|
||||||
|
|
||||||
#include <wx/dialog.h>
|
#include <wx/dialog.h>
|
||||||
#include <wx/choicebk.h>
|
#include <wx/choicebk.h>
|
||||||
|
@ -12,9 +12,9 @@
|
|||||||
#include <wx/timer.h>
|
#include <wx/timer.h>
|
||||||
|
|
||||||
#include "slic3r/GUI/GUI.hpp"
|
#include "slic3r/GUI/GUI.hpp"
|
||||||
|
#include "slic3r/GUI/I18N.hpp"
|
||||||
#include "slic3r/Utils/Bonjour.hpp"
|
#include "slic3r/Utils/Bonjour.hpp"
|
||||||
|
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
|
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
#include "GUI.hpp"
|
#include "GUI.hpp"
|
||||||
#include "GUI_App.hpp"
|
#include "GUI_App.hpp"
|
||||||
|
#include "I18N.hpp"
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
namespace GUI {
|
namespace GUI {
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
#include "ConfigSnapshotDialog.hpp"
|
#include "ConfigSnapshotDialog.hpp"
|
||||||
|
#include "I18N.hpp"
|
||||||
|
|
||||||
#include "../Config/Snapshot.hpp"
|
#include "../Config/Snapshot.hpp"
|
||||||
#include "../Utils/Time.hpp"
|
#include "../Utils/Time.hpp"
|
||||||
|
|
||||||
#include "../../libslic3r/Utils.hpp"
|
#include "libslic3r/Utils.hpp"
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
namespace GUI {
|
namespace GUI {
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
#include "GUI.hpp"//"slic3r_gui.hpp"
|
#include "GUI.hpp"
|
||||||
|
#include "GUI_App.hpp"
|
||||||
|
#include "I18N.hpp"
|
||||||
#include "Field.hpp"
|
#include "Field.hpp"
|
||||||
|
|
||||||
//#include <wx/event.h>
|
#include "libslic3r/PrintConfig.hpp"
|
||||||
|
|
||||||
#include <regex>
|
#include <regex>
|
||||||
#include <wx/numformatter.h>
|
#include <wx/numformatter.h>
|
||||||
#include <wx/tooltip.h>
|
#include <wx/tooltip.h>
|
||||||
#include "PrintConfig.hpp"
|
|
||||||
#include <boost/algorithm/string/predicate.hpp>
|
#include <boost/algorithm/string/predicate.hpp>
|
||||||
#include "GUI_App.hpp"
|
|
||||||
|
|
||||||
namespace Slic3r { namespace GUI {
|
namespace Slic3r { namespace GUI {
|
||||||
|
|
||||||
|
@ -13,12 +13,11 @@
|
|||||||
#include <wx/spinctrl.h>
|
#include <wx/spinctrl.h>
|
||||||
#include <wx/clrpicker.h>
|
#include <wx/clrpicker.h>
|
||||||
|
|
||||||
#include "../../libslic3r/libslic3r.h"
|
#include "libslic3r/libslic3r.h"
|
||||||
#include "../../libslic3r/Config.hpp"
|
#include "libslic3r/Config.hpp"
|
||||||
|
#include "libslic3r/Utils.hpp"
|
||||||
|
|
||||||
//#include "slic3r_gui.hpp"
|
|
||||||
#include "GUI.hpp"
|
#include "GUI.hpp"
|
||||||
#include "Utils.hpp"
|
|
||||||
|
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
#define wxMSW true
|
#define wxMSW true
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
#include "libslic3r/Utils.hpp"
|
#include "libslic3r/Utils.hpp"
|
||||||
#include "avrdude/avrdude-slic3r.hpp"
|
#include "avrdude/avrdude-slic3r.hpp"
|
||||||
#include "GUI.hpp"
|
#include "GUI.hpp"
|
||||||
|
#include "I18N.hpp"
|
||||||
#include "MsgDialog.hpp"
|
#include "MsgDialog.hpp"
|
||||||
#include "../Utils/HexFile.hpp"
|
#include "../Utils/HexFile.hpp"
|
||||||
#include "../Utils/Serial.hpp"
|
#include "../Utils/Serial.hpp"
|
||||||
|
@ -3,18 +3,20 @@
|
|||||||
|
|
||||||
#include "admesh/stl.h"
|
#include "admesh/stl.h"
|
||||||
#include "libslic3r/libslic3r.h"
|
#include "libslic3r/libslic3r.h"
|
||||||
|
#include "libslic3r/ClipperUtils.hpp"
|
||||||
|
#include "libslic3r/PrintConfig.hpp"
|
||||||
|
#include "libslic3r/GCode/PreviewData.hpp"
|
||||||
|
#include "libslic3r/Geometry.hpp"
|
||||||
#include "slic3r/GUI/3DScene.hpp"
|
#include "slic3r/GUI/3DScene.hpp"
|
||||||
#include "slic3r/GUI/BackgroundSlicingProcess.hpp"
|
#include "slic3r/GUI/BackgroundSlicingProcess.hpp"
|
||||||
#include "slic3r/GUI/GLShader.hpp"
|
#include "slic3r/GUI/GLShader.hpp"
|
||||||
#include "slic3r/GUI/GUI.hpp"
|
#include "slic3r/GUI/GUI.hpp"
|
||||||
#include "slic3r/GUI/PresetBundle.hpp"
|
#include "slic3r/GUI/PresetBundle.hpp"
|
||||||
#include "libslic3r/ClipperUtils.hpp"
|
//#include "slic3r/GUI/GLGizmo.hpp"
|
||||||
#include "libslic3r/PrintConfig.hpp"
|
|
||||||
#include "libslic3r/GCode/PreviewData.hpp"
|
|
||||||
#include "libslic3r/Geometry.hpp"
|
|
||||||
#include "GUI_App.hpp"
|
#include "GUI_App.hpp"
|
||||||
#include "GUI_ObjectList.hpp"
|
#include "GUI_ObjectList.hpp"
|
||||||
#include "GUI_ObjectManipulation.hpp"
|
#include "GUI_ObjectManipulation.hpp"
|
||||||
|
#include "I18N.hpp"
|
||||||
|
|
||||||
#include <GL/glew.h>
|
#include <GL/glew.h>
|
||||||
|
|
||||||
|
@ -1,18 +1,11 @@
|
|||||||
#include "libslic3r/libslic3r.h"
|
// #include <igl/unproject_onto_mesh.h>
|
||||||
#include "GLGizmo.hpp"
|
|
||||||
|
|
||||||
#include "GUI.hpp"
|
|
||||||
#include "GUI_App.hpp"
|
|
||||||
|
|
||||||
#include "../../libslic3r/Utils.hpp"
|
|
||||||
#include "PresetBundle.hpp"
|
|
||||||
|
|
||||||
#include <Eigen/Dense>
|
|
||||||
#include "libslic3r/Geometry.hpp"
|
|
||||||
|
|
||||||
#include <GL/glew.h>
|
#include <GL/glew.h>
|
||||||
|
#include <Eigen/Dense>
|
||||||
|
|
||||||
#include <SLA/SLASupportTree.hpp>
|
#include "libslic3r/libslic3r.h"
|
||||||
|
#include "libslic3r/Geometry.hpp"
|
||||||
|
#include "libslic3r/Utils.hpp"
|
||||||
|
#include "libslic3r/SLA/SLASupportTree.hpp"
|
||||||
|
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <numeric>
|
#include <numeric>
|
||||||
@ -28,6 +21,9 @@
|
|||||||
#include "GUI.hpp"
|
#include "GUI.hpp"
|
||||||
#include "GUI_Utils.hpp"
|
#include "GUI_Utils.hpp"
|
||||||
#include "GUI_App.hpp"
|
#include "GUI_App.hpp"
|
||||||
|
#include "I18N.hpp"
|
||||||
|
#include "GLGizmo.hpp"
|
||||||
|
#include "PresetBundle.hpp"
|
||||||
|
|
||||||
#if ENABLE_GIZMOS_SHORTCUT
|
#if ENABLE_GIZMOS_SHORTCUT
|
||||||
#include <wx/defs.h>
|
#include <wx/defs.h>
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include "GUI.hpp"
|
#include "GUI.hpp"
|
||||||
#include "GUI_App.hpp"
|
#include "GUI_App.hpp"
|
||||||
|
#include "I18N.hpp"
|
||||||
#include "WipeTowerDialog.hpp"
|
#include "WipeTowerDialog.hpp"
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
@ -33,8 +34,8 @@
|
|||||||
#include "PresetBundle.hpp"
|
#include "PresetBundle.hpp"
|
||||||
#include "UpdateDialogs.hpp"
|
#include "UpdateDialogs.hpp"
|
||||||
|
|
||||||
#include "../../libslic3r/Utils.hpp"
|
#include "libslic3r/Utils.hpp"
|
||||||
#include "../../libslic3r/Print.hpp"
|
#include "libslic3r/Print.hpp"
|
||||||
|
|
||||||
namespace Slic3r { namespace GUI {
|
namespace Slic3r { namespace GUI {
|
||||||
|
|
||||||
@ -307,12 +308,6 @@ AppConfig* get_app_config()
|
|||||||
return wxGetApp().app_config;
|
return wxGetApp().app_config;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString L_str(const std::string &str)
|
|
||||||
{
|
|
||||||
//! Explicitly specify that the source string is already in UTF-8 encoding
|
|
||||||
return wxGetTranslation(wxString(str.c_str(), wxConvUTF8));
|
|
||||||
}
|
|
||||||
|
|
||||||
wxString from_u8(const std::string &str)
|
wxString from_u8(const std::string &str)
|
||||||
{
|
{
|
||||||
return wxString::FromUTF8(str.c_str());
|
return wxString::FromUTF8(str.c_str());
|
||||||
|
@ -1,16 +1,14 @@
|
|||||||
#ifndef slic3r_GUI_hpp_
|
#ifndef slic3r_GUI_hpp_
|
||||||
#define slic3r_GUI_hpp_
|
#define slic3r_GUI_hpp_
|
||||||
|
|
||||||
#include "Config.hpp"
|
#include "libslic3r/Config.hpp"
|
||||||
#include "callback.hpp"
|
|
||||||
|
|
||||||
#include <wx/intl.h>
|
|
||||||
|
|
||||||
class wxWindow;
|
class wxWindow;
|
||||||
class wxMenuBar;
|
class wxMenuBar;
|
||||||
class wxNotebook;
|
class wxNotebook;
|
||||||
class wxComboCtrl;
|
class wxComboCtrl;
|
||||||
class wxFileDialog;
|
class wxFileDialog;
|
||||||
|
class wxString;
|
||||||
class wxTopLevelWindow;
|
class wxTopLevelWindow;
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
@ -19,32 +17,6 @@ class AppConfig;
|
|||||||
class DynamicPrintConfig;
|
class DynamicPrintConfig;
|
||||||
class Print;
|
class Print;
|
||||||
class GCodePreviewData;
|
class GCodePreviewData;
|
||||||
class AppControllerBase;
|
|
||||||
|
|
||||||
using AppControllerPtr = std::shared_ptr<AppControllerBase>;
|
|
||||||
|
|
||||||
#define _(s) Slic3r::GUI::I18N::translate((s))
|
|
||||||
|
|
||||||
namespace GUI { namespace I18N {
|
|
||||||
inline wxString translate(const char *s) { return wxGetTranslation(wxString(s, wxConvUTF8)); }
|
|
||||||
inline wxString translate(const wchar_t *s) { return wxGetTranslation(s); }
|
|
||||||
inline wxString translate(const std::string &s) { return wxGetTranslation(wxString(s.c_str(), wxConvUTF8)); }
|
|
||||||
inline wxString translate(const std::wstring &s) { return wxGetTranslation(s.c_str()); }
|
|
||||||
} }
|
|
||||||
|
|
||||||
// !!! If you needed to translate some wxString,
|
|
||||||
// !!! please use _(L(string))
|
|
||||||
// !!! _() - is a standard wxWidgets macro to translate
|
|
||||||
// !!! L() is used only for marking localizable string
|
|
||||||
// !!! It will be used in "xgettext" to create a Locating Message Catalog.
|
|
||||||
#define L(s) s
|
|
||||||
|
|
||||||
//! macro used to localization, return wxScopedCharBuffer
|
|
||||||
//! With wxConvUTF8 explicitly specify that the source string is already in UTF-8 encoding
|
|
||||||
#define _CHB(s) wxGetTranslation(wxString(s, wxConvUTF8)).utf8_str()
|
|
||||||
|
|
||||||
// Minimal buffer length for translated string (char buf[MIN_BUF_LENGTH_FOR_L])
|
|
||||||
#define MIN_BUF_LENGTH_FOR_L 512
|
|
||||||
|
|
||||||
namespace GUI {
|
namespace GUI {
|
||||||
|
|
||||||
@ -55,10 +27,6 @@ void break_to_debugger();
|
|||||||
|
|
||||||
AppConfig* get_app_config();
|
AppConfig* get_app_config();
|
||||||
|
|
||||||
AppControllerPtr get_appctl();
|
|
||||||
void set_cli_appctl();
|
|
||||||
void set_gui_appctl();
|
|
||||||
|
|
||||||
extern void add_menus(wxMenuBar *menu, int event_preferences_changed, int event_language_change);
|
extern void add_menus(wxMenuBar *menu, int event_preferences_changed, int event_language_change);
|
||||||
|
|
||||||
// Checks if configuration wizard needs to run, calls config_wizard if so.
|
// Checks if configuration wizard needs to run, calls config_wizard if so.
|
||||||
@ -86,16 +54,11 @@ void create_combochecklist(wxComboCtrl* comboCtrl, std::string text, std::string
|
|||||||
// encoded inside an int.
|
// encoded inside an int.
|
||||||
int combochecklist_get_flags(wxComboCtrl* comboCtrl);
|
int combochecklist_get_flags(wxComboCtrl* comboCtrl);
|
||||||
|
|
||||||
// Return translated std::string as a wxString
|
|
||||||
wxString L_str(const std::string &str);
|
|
||||||
// Return wxString from std::string in UTF8
|
// Return wxString from std::string in UTF8
|
||||||
wxString from_u8(const std::string &str);
|
wxString from_u8(const std::string &str);
|
||||||
// Return std::string in UTF8 from wxString
|
// Return std::string in UTF8 from wxString
|
||||||
std::string into_u8(const wxString &str);
|
std::string into_u8(const wxString &str);
|
||||||
|
|
||||||
// Callback to trigger a configuration update timer on the Plater.
|
|
||||||
static PerlCallback g_on_request_update_callback;
|
|
||||||
|
|
||||||
// Returns the dimensions of the screen on which the main frame is displayed
|
// Returns the dimensions of the screen on which the main frame is displayed
|
||||||
bool get_current_screen_size(wxWindow *window, unsigned &width, unsigned &height);
|
bool get_current_screen_size(wxWindow *window, unsigned &width, unsigned &height);
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#include "GUI_App.hpp"
|
#include "GUI_App.hpp"
|
||||||
#include "GUI_ObjectList.hpp"
|
#include "GUI_ObjectList.hpp"
|
||||||
#include "GUI_ObjectManipulation.hpp"
|
#include "GUI_ObjectManipulation.hpp"
|
||||||
|
#include "I18N.hpp"
|
||||||
|
|
||||||
#include <boost/lexical_cast.hpp>
|
#include <boost/lexical_cast.hpp>
|
||||||
#include <boost/algorithm/string.hpp>
|
#include <boost/algorithm/string.hpp>
|
||||||
@ -13,14 +14,17 @@
|
|||||||
#include <wx/menuitem.h>
|
#include <wx/menuitem.h>
|
||||||
#include <wx/filedlg.h>
|
#include <wx/filedlg.h>
|
||||||
#include <wx/dir.h>
|
#include <wx/dir.h>
|
||||||
|
#include <wx/wupdlock.h>
|
||||||
|
|
||||||
|
#include "libslic3r/Utils.hpp"
|
||||||
|
#include "libslic3r/Model.hpp"
|
||||||
|
#include "libslic3r/I18N.hpp"
|
||||||
|
|
||||||
#include "Utils.hpp"
|
|
||||||
#include "GUI.hpp"
|
#include "GUI.hpp"
|
||||||
#include "GUI_Utils.hpp"
|
#include "GUI_Utils.hpp"
|
||||||
#include "AppConfig.hpp"
|
#include "AppConfig.hpp"
|
||||||
#include "PresetBundle.hpp"
|
#include "PresetBundle.hpp"
|
||||||
#include "3DScene.hpp"
|
#include "3DScene.hpp"
|
||||||
#include "Model.hpp"
|
|
||||||
|
|
||||||
#include "../Utils/PresetUpdater.hpp"
|
#include "../Utils/PresetUpdater.hpp"
|
||||||
#include "ConfigWizard_private.hpp"
|
#include "ConfigWizard_private.hpp"
|
||||||
@ -29,8 +33,6 @@
|
|||||||
#include "FirmwareDialog.hpp"
|
#include "FirmwareDialog.hpp"
|
||||||
#include "Preferences.hpp"
|
#include "Preferences.hpp"
|
||||||
#include "Tab.hpp"
|
#include "Tab.hpp"
|
||||||
#include <I18N.hpp>
|
|
||||||
#include <wx/wupdlock.h>
|
|
||||||
#include "SysInfoDialog.hpp"
|
#include "SysInfoDialog.hpp"
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include "PrintConfig.hpp"
|
#include "libslic3r/PrintConfig.hpp"
|
||||||
#include "MainFrame.hpp"
|
#include "MainFrame.hpp"
|
||||||
#if ENABLE_IMGUI
|
#if ENABLE_IMGUI
|
||||||
#include "ImGuiWrapper.hpp"
|
#include "ImGuiWrapper.hpp"
|
||||||
@ -12,6 +12,7 @@
|
|||||||
#include <wx/app.h>
|
#include <wx/app.h>
|
||||||
#include <wx/colour.h>
|
#include <wx/colour.h>
|
||||||
#include <wx/font.h>
|
#include <wx/font.h>
|
||||||
|
#include <wx/string.h>
|
||||||
|
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
#include <stack>
|
#include <stack>
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
#include "GUI_ObjectList.hpp"
|
#include "GUI_ObjectList.hpp"
|
||||||
#include "GUI_ObjectManipulation.hpp"
|
#include "GUI_ObjectManipulation.hpp"
|
||||||
#include "GUI_App.hpp"
|
#include "GUI_App.hpp"
|
||||||
|
#include "I18N.hpp"
|
||||||
|
|
||||||
#include "OptionsGroup.hpp"
|
#include "OptionsGroup.hpp"
|
||||||
#include "PresetBundle.hpp"
|
#include "PresetBundle.hpp"
|
||||||
#include "Tab.hpp"
|
#include "Tab.hpp"
|
||||||
#include "wxExtensions.hpp"
|
#include "wxExtensions.hpp"
|
||||||
#include "Model.hpp"
|
#include "libslic3r/Model.hpp"
|
||||||
#include "LambdaObjectDialog.hpp"
|
#include "LambdaObjectDialog.hpp"
|
||||||
#include "GLCanvas3D.hpp"
|
#include "GLCanvas3D.hpp"
|
||||||
|
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
#include "GUI_ObjectManipulation.hpp"
|
#include "GUI_ObjectManipulation.hpp"
|
||||||
#include "GUI_ObjectList.hpp"
|
#include "GUI_ObjectList.hpp"
|
||||||
|
#include "I18N.hpp"
|
||||||
|
|
||||||
#include "OptionsGroup.hpp"
|
#include "OptionsGroup.hpp"
|
||||||
#include "wxExtensions.hpp"
|
#include "wxExtensions.hpp"
|
||||||
#include "PresetBundle.hpp"
|
#include "PresetBundle.hpp"
|
||||||
#include "Model.hpp"
|
#include "libslic3r/Model.hpp"
|
||||||
#include "Geometry.hpp"
|
#include "libslic3r/Geometry.hpp"
|
||||||
|
|
||||||
#include <boost/algorithm/string.hpp>
|
#include <boost/algorithm/string.hpp>
|
||||||
|
|
||||||
|
@ -4,10 +4,12 @@
|
|||||||
#include "OptionsGroup.hpp"
|
#include "OptionsGroup.hpp"
|
||||||
#include "wxExtensions.hpp"
|
#include "wxExtensions.hpp"
|
||||||
#include "PresetBundle.hpp"
|
#include "PresetBundle.hpp"
|
||||||
#include "Model.hpp"
|
#include "libslic3r/Model.hpp"
|
||||||
|
|
||||||
#include <boost/algorithm/string.hpp>
|
#include <boost/algorithm/string.hpp>
|
||||||
|
|
||||||
|
#include "I18N.hpp"
|
||||||
|
|
||||||
namespace Slic3r
|
namespace Slic3r
|
||||||
{
|
{
|
||||||
namespace GUI
|
namespace GUI
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
#include "GUI_Preview.hpp"
|
#include "GUI_Preview.hpp"
|
||||||
#include "GUI_App.hpp"
|
#include "GUI_App.hpp"
|
||||||
#include "GUI.hpp"
|
#include "GUI.hpp"
|
||||||
|
#include "I18N.hpp"
|
||||||
#include "AppConfig.hpp"
|
#include "AppConfig.hpp"
|
||||||
#include "3DScene.hpp"
|
#include "3DScene.hpp"
|
||||||
#include "BackgroundSlicingProcess.hpp"
|
#include "BackgroundSlicingProcess.hpp"
|
||||||
@ -20,7 +21,7 @@
|
|||||||
#include <wx/checkbox.h>
|
#include <wx/checkbox.h>
|
||||||
|
|
||||||
// this include must follow the wxWidgets ones or it won't compile on Windows -> see http://trac.wxwidgets.org/ticket/2421
|
// this include must follow the wxWidgets ones or it won't compile on Windows -> see http://trac.wxwidgets.org/ticket/2421
|
||||||
#include "../../libslic3r/Print.hpp"
|
#include "libslic3r/Print.hpp"
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
namespace GUI {
|
namespace GUI {
|
||||||
|
11
src/slic3r/GUI/I18N.cpp
Normal file
11
src/slic3r/GUI/I18N.cpp
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#include "I18N.hpp"
|
||||||
|
|
||||||
|
namespace Slic3r { namespace GUI {
|
||||||
|
|
||||||
|
wxString L_str(const std::string &str)
|
||||||
|
{
|
||||||
|
//! Explicitly specify that the source string is already in UTF-8 encoding
|
||||||
|
return wxGetTranslation(wxString(str.c_str(), wxConvUTF8));
|
||||||
|
}
|
||||||
|
|
||||||
|
} }
|
39
src/slic3r/GUI/I18N.hpp
Normal file
39
src/slic3r/GUI/I18N.hpp
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
#ifndef _
|
||||||
|
#define _(s) Slic3r::GUI::I18N::translate((s))
|
||||||
|
#endif /* _ */
|
||||||
|
|
||||||
|
#ifndef L
|
||||||
|
// !!! If you needed to translate some wxString,
|
||||||
|
// !!! please use _(L(string))
|
||||||
|
// !!! _() - is a standard wxWidgets macro to translate
|
||||||
|
// !!! L() is used only for marking localizable string
|
||||||
|
// !!! It will be used in "xgettext" to create a Locating Message Catalog.
|
||||||
|
#define L(s) s
|
||||||
|
#endif /* L */
|
||||||
|
|
||||||
|
#ifndef _CHB
|
||||||
|
//! macro used to localization, return wxScopedCharBuffer
|
||||||
|
//! With wxConvUTF8 explicitly specify that the source string is already in UTF-8 encoding
|
||||||
|
#define _CHB(s) wxGetTranslation(wxString(s, wxConvUTF8)).utf8_str()
|
||||||
|
#endif /* _CHB */
|
||||||
|
|
||||||
|
#ifndef slic3r_GUI_I18N_hpp_
|
||||||
|
#define slic3r_GUI_I18N_hpp_
|
||||||
|
|
||||||
|
#include <wx/intl.h>
|
||||||
|
|
||||||
|
namespace Slic3r { namespace GUI {
|
||||||
|
|
||||||
|
namespace I18N {
|
||||||
|
inline wxString translate(const char *s) { return wxGetTranslation(wxString(s, wxConvUTF8)); }
|
||||||
|
inline wxString translate(const wchar_t *s) { return wxGetTranslation(s); }
|
||||||
|
inline wxString translate(const std::string &s) { return wxGetTranslation(wxString(s.c_str(), wxConvUTF8)); }
|
||||||
|
inline wxString translate(const std::wstring &s) { return wxGetTranslation(s.c_str()); }
|
||||||
|
}
|
||||||
|
|
||||||
|
// Return translated std::string as a wxString
|
||||||
|
wxString L_str(const std::string &str);
|
||||||
|
|
||||||
|
} }
|
||||||
|
|
||||||
|
#endif /* slic3r_GUI_I18N_hpp_ */
|
@ -12,8 +12,8 @@
|
|||||||
#include <GL/glew.h>
|
#include <GL/glew.h>
|
||||||
|
|
||||||
#include "libslic3r/libslic3r.h"
|
#include "libslic3r/libslic3r.h"
|
||||||
|
#include "libslic3r/Utils.hpp"
|
||||||
#include "GUI.hpp"
|
#include "GUI.hpp"
|
||||||
#include "Utils.hpp"
|
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
namespace GUI {
|
namespace GUI {
|
||||||
@ -88,7 +88,7 @@ bool ImGuiWrapper::update_mouse_data(wxMouseEvent& evt)
|
|||||||
io.MouseDown[1] = evt.RightDown();
|
io.MouseDown[1] = evt.RightDown();
|
||||||
io.MouseDown[2] = evt.MiddleDown();
|
io.MouseDown[2] = evt.MiddleDown();
|
||||||
|
|
||||||
unsigned buttons = evt.LeftDown() | evt.RightDown() << 1 | evt.MiddleDown() << 2;
|
unsigned buttons = (evt.LeftDown() ? 1 : 0) | (evt.RightDown() ? 2 : 0) | (evt.MiddleDown() ? 4 : 0);
|
||||||
bool res = buttons != m_mouse_buttons;
|
bool res = buttons != m_mouse_buttons;
|
||||||
m_mouse_buttons = buttons;
|
m_mouse_buttons = buttons;
|
||||||
return res;
|
return res;
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
#include <wx/window.h>
|
#include <wx/window.h>
|
||||||
#include <wx/button.h>
|
#include <wx/button.h>
|
||||||
#include "OptionsGroup.hpp"
|
#include "OptionsGroup.hpp"
|
||||||
|
#include "I18N.hpp"
|
||||||
|
|
||||||
namespace Slic3r
|
namespace Slic3r
|
||||||
{
|
{
|
||||||
|
@ -10,14 +10,16 @@
|
|||||||
#include <wx/glcanvas.h>
|
#include <wx/glcanvas.h>
|
||||||
#include <wx/debug.h>
|
#include <wx/debug.h>
|
||||||
|
|
||||||
|
#include "libslic3r/Print.hpp"
|
||||||
|
#include "libslic3r/Polygon.hpp"
|
||||||
|
|
||||||
#include "Tab.hpp"
|
#include "Tab.hpp"
|
||||||
#include "PresetBundle.hpp"
|
#include "PresetBundle.hpp"
|
||||||
#include "ProgressStatusBar.hpp"
|
#include "ProgressStatusBar.hpp"
|
||||||
#include "3DScene.hpp"
|
#include "3DScene.hpp"
|
||||||
#include "Print.hpp"
|
|
||||||
#include "Polygon.hpp"
|
|
||||||
#include "AppConfig.hpp"
|
#include "AppConfig.hpp"
|
||||||
#include "wxExtensions.hpp"
|
#include "wxExtensions.hpp"
|
||||||
|
#include "I18N.hpp"
|
||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include "GUI_App.hpp"
|
#include "GUI_App.hpp"
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
#ifndef slic3r_MainFrame_hpp_
|
#ifndef slic3r_MainFrame_hpp_
|
||||||
#define slic3r_MainFrame_hpp_
|
#define slic3r_MainFrame_hpp_
|
||||||
|
|
||||||
#include "PrintConfig.hpp"
|
#include "libslic3r/PrintConfig.hpp"
|
||||||
|
|
||||||
#include <wx/frame.h>
|
#include <wx/frame.h>
|
||||||
|
#include <wx/string.h>
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
#include "libslic3r/libslic3r.h"
|
#include "libslic3r/libslic3r.h"
|
||||||
#include "libslic3r/Utils.hpp"
|
#include "libslic3r/Utils.hpp"
|
||||||
#include "GUI.hpp"
|
#include "GUI.hpp"
|
||||||
|
#include "I18N.hpp"
|
||||||
#include "ConfigWizard.hpp"
|
#include "ConfigWizard.hpp"
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
|
@ -5,7 +5,8 @@
|
|||||||
#include <wx/numformatter.h>
|
#include <wx/numformatter.h>
|
||||||
#include <boost/algorithm/string/split.hpp>
|
#include <boost/algorithm/string/split.hpp>
|
||||||
#include <boost/algorithm/string/classification.hpp>
|
#include <boost/algorithm/string/classification.hpp>
|
||||||
#include "Utils.hpp"
|
#include "libslic3r/Utils.hpp"
|
||||||
|
#include "I18N.hpp"
|
||||||
|
|
||||||
namespace Slic3r { namespace GUI {
|
namespace Slic3r { namespace GUI {
|
||||||
|
|
||||||
|
@ -24,17 +24,19 @@
|
|||||||
#include <wx/debug.h>
|
#include <wx/debug.h>
|
||||||
|
|
||||||
#include "libslic3r/libslic3r.h"
|
#include "libslic3r/libslic3r.h"
|
||||||
#include "libslic3r/PrintConfig.hpp"
|
|
||||||
#include "libslic3r/Model.hpp"
|
|
||||||
#include "libslic3r/ModelArrange.hpp"
|
|
||||||
#include "libslic3r/Print.hpp"
|
|
||||||
#include "libslic3r/SLAPrint.hpp"
|
|
||||||
#include "libslic3r/GCode/PreviewData.hpp"
|
|
||||||
#include "libslic3r/Utils.hpp"
|
|
||||||
#include "libslic3r/Polygon.hpp"
|
|
||||||
#include "libslic3r/Format/STL.hpp"
|
#include "libslic3r/Format/STL.hpp"
|
||||||
#include "libslic3r/Format/AMF.hpp"
|
#include "libslic3r/Format/AMF.hpp"
|
||||||
#include "libslic3r/Format/3mf.hpp"
|
#include "libslic3r/Format/3mf.hpp"
|
||||||
|
#include "libslic3r/GCode/PreviewData.hpp"
|
||||||
|
#include "libslic3r/Model.hpp"
|
||||||
|
#include "libslic3r/ModelArrange.hpp"
|
||||||
|
#include "libslic3r/Polygon.hpp"
|
||||||
|
#include "libslic3r/Print.hpp"
|
||||||
|
#include "libslic3r/PrintConfig.hpp"
|
||||||
|
#include "libslic3r/SLAPrint.hpp"
|
||||||
|
#include "libslic3r/SLA/SLARotfinder.hpp"
|
||||||
|
#include "libslic3r/Utils.hpp"
|
||||||
|
|
||||||
#include "GUI.hpp"
|
#include "GUI.hpp"
|
||||||
#include "GUI_App.hpp"
|
#include "GUI_App.hpp"
|
||||||
#include "GUI_ObjectList.hpp"
|
#include "GUI_ObjectList.hpp"
|
||||||
@ -50,9 +52,8 @@
|
|||||||
#include "PresetBundle.hpp"
|
#include "PresetBundle.hpp"
|
||||||
#include "BackgroundSlicingProcess.hpp"
|
#include "BackgroundSlicingProcess.hpp"
|
||||||
#include "ProgressStatusBar.hpp"
|
#include "ProgressStatusBar.hpp"
|
||||||
#include "slic3r/Utils/ASCIIFolding.hpp"
|
#include "../Utils/ASCIIFolding.hpp"
|
||||||
#include "../Utils/FixModelByWin10.hpp"
|
#include "../Utils/FixModelByWin10.hpp"
|
||||||
#include "SLA/SLARotfinder.hpp"
|
|
||||||
|
|
||||||
#include <wx/glcanvas.h> // Needs to be last because reasons :-/
|
#include <wx/glcanvas.h> // Needs to be last because reasons :-/
|
||||||
#include "WipeTowerDialog.hpp"
|
#include "WipeTowerDialog.hpp"
|
||||||
@ -66,9 +67,10 @@ using Slic3r::Preset;
|
|||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
namespace GUI {
|
namespace GUI {
|
||||||
|
|
||||||
wxDEFINE_EVENT(EVT_SLICING_UPDATE, SlicingStatusEvent);
|
wxDEFINE_EVENT(EVT_SCHEDULE_BACKGROUND_PROCESS, SimpleEvent);
|
||||||
wxDEFINE_EVENT(EVT_SLICING_COMPLETED, wxCommandEvent);
|
wxDEFINE_EVENT(EVT_SLICING_UPDATE, SlicingStatusEvent);
|
||||||
wxDEFINE_EVENT(EVT_PROCESS_COMPLETED, wxCommandEvent);
|
wxDEFINE_EVENT(EVT_SLICING_COMPLETED, wxCommandEvent);
|
||||||
|
wxDEFINE_EVENT(EVT_PROCESS_COMPLETED, wxCommandEvent);
|
||||||
|
|
||||||
// Sidebar widgets
|
// Sidebar widgets
|
||||||
|
|
||||||
@ -392,7 +394,7 @@ FreqChangedParams::FreqChangedParams(wxWindow* parent, const int label_width) :
|
|||||||
std::vector<float> extruders = dlg.get_extruders();
|
std::vector<float> extruders = dlg.get_extruders();
|
||||||
(config.option<ConfigOptionFloats>("wiping_volumes_matrix"))->values = std::vector<double>(matrix.begin(), matrix.end());
|
(config.option<ConfigOptionFloats>("wiping_volumes_matrix"))->values = std::vector<double>(matrix.begin(), matrix.end());
|
||||||
(config.option<ConfigOptionFloats>("wiping_volumes_extruders"))->values = std::vector<double>(extruders.begin(), extruders.end());
|
(config.option<ConfigOptionFloats>("wiping_volumes_extruders"))->values = std::vector<double>(extruders.begin(), extruders.end());
|
||||||
g_on_request_update_callback.call();
|
wxPostEvent(parent, SimpleEvent(EVT_SCHEDULE_BACKGROUND_PROCESS, parent));
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
return sizer;
|
return sizer;
|
||||||
@ -1129,6 +1131,7 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame)
|
|||||||
sidebar->Bind(wxEVT_COMBOBOX, &priv::on_select_preset, this);
|
sidebar->Bind(wxEVT_COMBOBOX, &priv::on_select_preset, this);
|
||||||
|
|
||||||
sidebar->Bind(EVT_OBJ_LIST_OBJECT_SELECT, [this](wxEvent&) { priv::selection_changed(); });
|
sidebar->Bind(EVT_OBJ_LIST_OBJECT_SELECT, [this](wxEvent&) { priv::selection_changed(); });
|
||||||
|
sidebar->Bind(EVT_SCHEDULE_BACKGROUND_PROCESS, &priv::on_schedule_background_process, this);
|
||||||
|
|
||||||
// 3DScene events:
|
// 3DScene events:
|
||||||
canvas3Dwidget->Bind(EVT_GLCANVAS_SCHEDULE_BACKGROUND_PROCESS, &priv::on_schedule_background_process, this);
|
canvas3Dwidget->Bind(EVT_GLCANVAS_SCHEDULE_BACKGROUND_PROCESS, &priv::on_schedule_background_process, this);
|
||||||
|
@ -14,6 +14,7 @@ class wxButton;
|
|||||||
class wxBoxSizer;
|
class wxBoxSizer;
|
||||||
class wxGLCanvas;
|
class wxGLCanvas;
|
||||||
class wxScrolledWindow;
|
class wxScrolledWindow;
|
||||||
|
class wxString;
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#include "Preferences.hpp"
|
#include "Preferences.hpp"
|
||||||
#include "AppConfig.hpp"
|
#include "AppConfig.hpp"
|
||||||
#include "OptionsGroup.hpp"
|
#include "OptionsGroup.hpp"
|
||||||
|
#include "I18N.hpp"
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
namespace GUI {
|
namespace GUI {
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
//#undef NDEBUG
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
#include "Preset.hpp"
|
#include "Preset.hpp"
|
||||||
#include "AppConfig.hpp"
|
#include "AppConfig.hpp"
|
||||||
#include "BitmapCache.hpp"
|
#include "BitmapCache.hpp"
|
||||||
|
#include "I18N.hpp"
|
||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
@ -25,9 +25,9 @@
|
|||||||
#include <wx/bmpcbox.h>
|
#include <wx/bmpcbox.h>
|
||||||
#include <wx/wupdlock.h>
|
#include <wx/wupdlock.h>
|
||||||
|
|
||||||
#include "../../libslic3r/libslic3r.h"
|
#include "libslic3r/libslic3r.h"
|
||||||
#include "../../libslic3r/Utils.hpp"
|
#include "libslic3r/Utils.hpp"
|
||||||
#include "../../libslic3r/PlaceholderParser.hpp"
|
#include "libslic3r/PlaceholderParser.hpp"
|
||||||
#include "Plater.hpp"
|
#include "Plater.hpp"
|
||||||
|
|
||||||
using boost::property_tree::ptree;
|
using boost::property_tree::ptree;
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
//#undef NDEBUG
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
#include "PresetBundle.hpp"
|
#include "PresetBundle.hpp"
|
||||||
#include "BitmapCache.hpp"
|
#include "BitmapCache.hpp"
|
||||||
#include "Plater.hpp"
|
#include "Plater.hpp"
|
||||||
|
#include "I18N.hpp"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
@ -25,9 +25,9 @@
|
|||||||
#include <wx/bmpcbox.h>
|
#include <wx/bmpcbox.h>
|
||||||
#include <wx/wupdlock.h>
|
#include <wx/wupdlock.h>
|
||||||
|
|
||||||
#include "../../libslic3r/libslic3r.h"
|
#include "libslic3r/libslic3r.h"
|
||||||
#include "../../libslic3r/PlaceholderParser.hpp"
|
#include "libslic3r/PlaceholderParser.hpp"
|
||||||
#include "../../libslic3r/Utils.hpp"
|
#include "libslic3r/Utils.hpp"
|
||||||
|
|
||||||
// Store the print/filament/printer presets into a "presets" subdirectory of the Slic3rPE config dir.
|
// Store the print/filament/printer presets into a "presets" subdirectory of the Slic3rPE config dir.
|
||||||
// This breaks compatibility with the upstream Slic3r if the --datadir is used to switch between the two versions.
|
// This breaks compatibility with the upstream Slic3r if the --datadir is used to switch between the two versions.
|
||||||
|
@ -1,15 +1,16 @@
|
|||||||
//#undef NDEBUG
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
|
#include "libslic3r/Flow.hpp"
|
||||||
|
#include "libslic3r/libslic3r.h"
|
||||||
|
|
||||||
#include "PresetBundle.hpp"
|
#include "PresetBundle.hpp"
|
||||||
#include "PresetHints.hpp"
|
#include "PresetHints.hpp"
|
||||||
#include "Flow.hpp"
|
|
||||||
|
|
||||||
#include <boost/algorithm/string/predicate.hpp>
|
#include <boost/algorithm/string/predicate.hpp>
|
||||||
#include <wx/intl.h>
|
#include <wx/intl.h>
|
||||||
|
|
||||||
#include "../../libslic3r/libslic3r.h"
|
|
||||||
#include "GUI.hpp"
|
#include "GUI.hpp"
|
||||||
|
#include "I18N.hpp"
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
#include "RammingChart.hpp"
|
#include "RammingChart.hpp"
|
||||||
#include "GUI.hpp"
|
#include "GUI.hpp"
|
||||||
|
#include "I18N.hpp"
|
||||||
|
|
||||||
wxDEFINE_EVENT(EVT_WIPE_TOWER_CHART_CHANGED, wxCommandEvent);
|
wxDEFINE_EVENT(EVT_WIPE_TOWER_CHART_CHANGED, wxCommandEvent);
|
||||||
|
|
||||||
|
@ -1,13 +1,11 @@
|
|||||||
#include "SysInfoDialog.hpp"
|
#include "SysInfoDialog.hpp"
|
||||||
// #include "AboutDialog.hpp"
|
#include "I18N.hpp"
|
||||||
|
#include "3DScene.hpp"
|
||||||
|
#include "GUI.hpp"
|
||||||
|
|
||||||
#include <wx/clipbrd.h>
|
#include <wx/clipbrd.h>
|
||||||
#include <wx/platinfo.h>
|
#include <wx/platinfo.h>
|
||||||
|
|
||||||
// #include "../../libslic3r/Utils.hpp"
|
|
||||||
#include "3DScene.hpp"
|
|
||||||
#include "GUI.hpp"
|
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
namespace GUI {
|
namespace GUI {
|
||||||
|
|
||||||
|
@ -2017,7 +2017,7 @@ void TabPrinter::build_extruder_pages()
|
|||||||
|
|
||||||
for (auto extruder_idx = m_extruders_count_old; extruder_idx < m_extruders_count; ++extruder_idx) {
|
for (auto extruder_idx = m_extruders_count_old; extruder_idx < m_extruders_count; ++extruder_idx) {
|
||||||
//# build page
|
//# build page
|
||||||
char buf[MIN_BUF_LENGTH_FOR_L];
|
char buf[512];
|
||||||
sprintf(buf, _CHB(L("Extruder %d")), extruder_idx + 1);
|
sprintf(buf, _CHB(L("Extruder %d")), extruder_idx + 1);
|
||||||
auto page = add_options_page(from_u8(buf), "funnel.png", true);
|
auto page = add_options_page(from_u8(buf), "funnel.png", true);
|
||||||
m_pages.insert(m_pages.begin() + n_before_extruders + extruder_idx, page);
|
m_pages.insert(m_pages.begin() + n_before_extruders + extruder_idx, page);
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
#include "libslic3r/libslic3r.h"
|
#include "libslic3r/libslic3r.h"
|
||||||
#include "libslic3r/Utils.hpp"
|
#include "libslic3r/Utils.hpp"
|
||||||
#include "GUI.hpp"
|
#include "GUI.hpp"
|
||||||
|
#include "I18N.hpp"
|
||||||
#include "ConfigWizard.hpp"
|
#include "ConfigWizard.hpp"
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include "WipeTowerDialog.hpp"
|
#include "WipeTowerDialog.hpp"
|
||||||
#include "GUI.hpp"
|
#include "GUI.hpp"
|
||||||
|
#include "I18N.hpp"
|
||||||
|
|
||||||
#include <wx/sizer.h>
|
#include <wx/sizer.h>
|
||||||
|
|
||||||
|
@ -1,32 +0,0 @@
|
|||||||
// I AM A PHONY PLACEHOLDER FOR THE PERL CALLBACK.
|
|
||||||
// GET RID OF ME!
|
|
||||||
|
|
||||||
#ifndef slic3r_GUI_PerlCallback_phony_hpp_
|
|
||||||
#define slic3r_GUI_PerlCallback_phony_hpp_
|
|
||||||
|
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
namespace Slic3r {
|
|
||||||
|
|
||||||
class PerlCallback {
|
|
||||||
public:
|
|
||||||
// PerlCallback(void *) {}
|
|
||||||
PerlCallback() {}
|
|
||||||
void register_callback(void *) {}
|
|
||||||
void deregister_callback() {}
|
|
||||||
void call() const {}
|
|
||||||
void call(int) const {}
|
|
||||||
void call(int, int) const {}
|
|
||||||
void call(const std::vector<int>&) const {}
|
|
||||||
void call(double) const {}
|
|
||||||
void call(double, double) const {}
|
|
||||||
void call(double, double, double) const {}
|
|
||||||
void call(double, double, double, double) const {}
|
|
||||||
void call(double, double, double, double, double) const {}
|
|
||||||
void call(double, double, double, double, double, double) const {}
|
|
||||||
void call(bool b) const {}
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace Slic3r
|
|
||||||
|
|
||||||
#endif /* slic3r_GUI_PerlCallback_phony_hpp_ */
|
|
@ -1,15 +1,16 @@
|
|||||||
#include "wxExtensions.hpp"
|
#include "wxExtensions.hpp"
|
||||||
|
|
||||||
#include "../../libslic3r/Utils.hpp"
|
#include "libslic3r/Utils.hpp"
|
||||||
#include "BitmapCache.hpp"
|
#include "libslic3r/Model.hpp"
|
||||||
|
|
||||||
#include <wx/sizer.h>
|
#include <wx/sizer.h>
|
||||||
#include <wx/statline.h>
|
#include <wx/statline.h>
|
||||||
#include <wx/dcclient.h>
|
#include <wx/dcclient.h>
|
||||||
#include <wx/numformatter.h>
|
#include <wx/numformatter.h>
|
||||||
|
|
||||||
|
#include "BitmapCache.hpp"
|
||||||
#include "GUI_App.hpp"
|
#include "GUI_App.hpp"
|
||||||
#include "GUI_ObjectList.hpp"
|
#include "GUI_ObjectList.hpp"
|
||||||
#include "Model.hpp"
|
|
||||||
|
|
||||||
wxDEFINE_EVENT(wxCUSTOMEVT_TICKSCHANGED, wxEvent);
|
wxDEFINE_EVENT(wxCUSTOMEVT_TICKSCHANGED, wxEvent);
|
||||||
wxDEFINE_EVENT(wxCUSTOMEVT_LAST_VOLUME_IS_DELETED, wxCommandEvent);
|
wxDEFINE_EVENT(wxCUSTOMEVT_LAST_VOLUME_IS_DELETED, wxCommandEvent);
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
#include "libslic3r/PrintConfig.hpp"
|
#include "libslic3r/PrintConfig.hpp"
|
||||||
#include "slic3r/GUI/GUI.hpp"
|
#include "slic3r/GUI/GUI.hpp"
|
||||||
|
#include "slic3r/GUI/I18N.hpp"
|
||||||
#include "slic3r/GUI/MsgDialog.hpp"
|
#include "slic3r/GUI/MsgDialog.hpp"
|
||||||
#include "Http.hpp"
|
#include "Http.hpp"
|
||||||
|
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
#include "libslic3r/Print.hpp"
|
#include "libslic3r/Print.hpp"
|
||||||
#include "libslic3r/Format/3mf.hpp"
|
#include "libslic3r/Format/3mf.hpp"
|
||||||
#include "../GUI/GUI.hpp"
|
#include "../GUI/GUI.hpp"
|
||||||
|
#include "../GUI/I18N.hpp"
|
||||||
#include "../GUI/PresetBundle.hpp"
|
#include "../GUI/PresetBundle.hpp"
|
||||||
|
|
||||||
#include <wx/msgdlg.h>
|
#include <wx/msgdlg.h>
|
||||||
|
@ -8,6 +8,8 @@
|
|||||||
#include "libslic3r/PrintConfig.hpp"
|
#include "libslic3r/PrintConfig.hpp"
|
||||||
#include "Http.hpp"
|
#include "Http.hpp"
|
||||||
|
|
||||||
|
#include "slic3r/GUI/I18N.hpp"
|
||||||
|
|
||||||
namespace fs = boost::filesystem;
|
namespace fs = boost::filesystem;
|
||||||
|
|
||||||
|
|
||||||
|
@ -18,13 +18,14 @@
|
|||||||
#include "libslic3r/libslic3r.h"
|
#include "libslic3r/libslic3r.h"
|
||||||
#include "libslic3r/Utils.hpp"
|
#include "libslic3r/Utils.hpp"
|
||||||
#include "slic3r/GUI/GUI.hpp"
|
#include "slic3r/GUI/GUI.hpp"
|
||||||
|
#include "slic3r/GUI/I18N.hpp"
|
||||||
#include "slic3r/GUI/PresetBundle.hpp"
|
#include "slic3r/GUI/PresetBundle.hpp"
|
||||||
#include "slic3r/GUI/UpdateDialogs.hpp"
|
#include "slic3r/GUI/UpdateDialogs.hpp"
|
||||||
#include "slic3r/GUI/ConfigWizard.hpp"
|
#include "slic3r/GUI/ConfigWizard.hpp"
|
||||||
|
#include "slic3r/GUI/GUI_App.hpp"
|
||||||
#include "slic3r/Utils/Http.hpp"
|
#include "slic3r/Utils/Http.hpp"
|
||||||
#include "slic3r/Config/Version.hpp"
|
#include "slic3r/Config/Version.hpp"
|
||||||
#include "slic3r/Config/Snapshot.hpp"
|
#include "slic3r/Config/Snapshot.hpp"
|
||||||
#include "slic3r/GUI/GUI_App.hpp"
|
|
||||||
|
|
||||||
namespace fs = boost::filesystem;
|
namespace fs = boost::filesystem;
|
||||||
using Slic3r::GUI::Config::Index;
|
using Slic3r::GUI::Config::Index;
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
#include "slic3r/GUI/GUI.hpp"
|
#include "slic3r/GUI/GUI.hpp"
|
||||||
#include "slic3r/GUI/MsgDialog.hpp"
|
#include "slic3r/GUI/MsgDialog.hpp"
|
||||||
|
#include "slic3r/GUI/I18N.hpp"
|
||||||
|
|
||||||
namespace fs = boost::filesystem;
|
namespace fs = boost::filesystem;
|
||||||
|
|
||||||
|
@ -99,11 +99,7 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
add_library(XS ${XS_SHARED_LIBRARY_TYPE}
|
add_library(XS ${XS_SHARED_LIBRARY_TYPE}
|
||||||
${XS_MAIN_CPP}
|
${XS_MAIN_CPP}
|
||||||
# ${LIBDIR}/libslic3r/utils.cpp
|
|
||||||
# ${LIBDIR}/slic3r/GUI/wxPerlIface.cpp
|
|
||||||
src/perlglue.cpp
|
src/perlglue.cpp
|
||||||
# src/callback.cpp
|
|
||||||
# src/callback.hpp
|
|
||||||
src/ppport.h
|
src/ppport.h
|
||||||
src/xsinit.h
|
src/xsinit.h
|
||||||
xsp/my.map
|
xsp/my.map
|
||||||
@ -119,7 +115,7 @@ if(APPLE)
|
|||||||
endif()
|
endif()
|
||||||
target_link_libraries(XS libslic3r)
|
target_link_libraries(XS libslic3r)
|
||||||
|
|
||||||
target_include_directories(XS PRIVATE src)
|
target_include_directories(XS PRIVATE src ${LIBDIR}/libslic3r)
|
||||||
target_compile_definitions(XS PRIVATE -DSLIC3RXS)
|
target_compile_definitions(XS PRIVATE -DSLIC3RXS)
|
||||||
set_target_properties(XS PROPERTIES PREFIX "") # Prevent cmake from generating libXS.so instead of XS.so
|
set_target_properties(XS PROPERTIES PREFIX "") # Prevent cmake from generating libXS.so instead of XS.so
|
||||||
|
|
||||||
|
@ -1,175 +0,0 @@
|
|||||||
#include "callback.hpp"
|
|
||||||
|
|
||||||
#include <xsinit.h>
|
|
||||||
|
|
||||||
void PerlCallback::register_callback(void *sv)
|
|
||||||
{
|
|
||||||
if (! SvROK((SV*)sv) || SvTYPE(SvRV((SV*)sv)) != SVt_PVCV)
|
|
||||||
croak("Not a Callback %_ for PerlFunction", (SV*)sv);
|
|
||||||
if (m_callback)
|
|
||||||
SvSetSV((SV*)m_callback, (SV*)sv);
|
|
||||||
else
|
|
||||||
m_callback = newSVsv((SV*)sv);
|
|
||||||
}
|
|
||||||
|
|
||||||
void PerlCallback::deregister_callback()
|
|
||||||
{
|
|
||||||
if (m_callback) {
|
|
||||||
sv_2mortal((SV*)m_callback);
|
|
||||||
m_callback = nullptr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void PerlCallback::call() const
|
|
||||||
{
|
|
||||||
if (! m_callback)
|
|
||||||
return;
|
|
||||||
dSP;
|
|
||||||
ENTER;
|
|
||||||
SAVETMPS;
|
|
||||||
PUSHMARK(SP);
|
|
||||||
PUTBACK;
|
|
||||||
perl_call_sv(SvRV((SV*)m_callback), G_DISCARD);
|
|
||||||
FREETMPS;
|
|
||||||
LEAVE;
|
|
||||||
}
|
|
||||||
|
|
||||||
void PerlCallback::call(int i) const
|
|
||||||
{
|
|
||||||
if (! m_callback)
|
|
||||||
return;
|
|
||||||
dSP;
|
|
||||||
ENTER;
|
|
||||||
SAVETMPS;
|
|
||||||
PUSHMARK(SP);
|
|
||||||
XPUSHs(sv_2mortal(newSViv(i)));
|
|
||||||
PUTBACK;
|
|
||||||
perl_call_sv(SvRV((SV*)m_callback), G_DISCARD);
|
|
||||||
FREETMPS;
|
|
||||||
LEAVE;
|
|
||||||
}
|
|
||||||
|
|
||||||
void PerlCallback::call(int i, int j) const
|
|
||||||
{
|
|
||||||
if (! m_callback)
|
|
||||||
return;
|
|
||||||
dSP;
|
|
||||||
ENTER;
|
|
||||||
SAVETMPS;
|
|
||||||
PUSHMARK(SP);
|
|
||||||
XPUSHs(sv_2mortal(newSViv(i)));
|
|
||||||
XPUSHs(sv_2mortal(newSViv(j)));
|
|
||||||
PUTBACK;
|
|
||||||
perl_call_sv(SvRV((SV*)m_callback), G_DISCARD);
|
|
||||||
FREETMPS;
|
|
||||||
LEAVE;
|
|
||||||
}
|
|
||||||
|
|
||||||
void PerlCallback::call(const std::vector<int>& ints) const
|
|
||||||
{
|
|
||||||
if (! m_callback)
|
|
||||||
return;
|
|
||||||
dSP;
|
|
||||||
ENTER;
|
|
||||||
SAVETMPS;
|
|
||||||
PUSHMARK(SP);
|
|
||||||
for (int i : ints)
|
|
||||||
{
|
|
||||||
XPUSHs(sv_2mortal(newSViv(i)));
|
|
||||||
}
|
|
||||||
PUTBACK;
|
|
||||||
perl_call_sv(SvRV((SV*)m_callback), G_DISCARD);
|
|
||||||
FREETMPS;
|
|
||||||
LEAVE;
|
|
||||||
}
|
|
||||||
|
|
||||||
void PerlCallback::call(double a) const
|
|
||||||
{
|
|
||||||
if (!m_callback)
|
|
||||||
return;
|
|
||||||
dSP;
|
|
||||||
ENTER;
|
|
||||||
SAVETMPS;
|
|
||||||
PUSHMARK(SP);
|
|
||||||
XPUSHs(sv_2mortal(newSVnv(a)));
|
|
||||||
PUTBACK;
|
|
||||||
perl_call_sv(SvRV((SV*)m_callback), G_DISCARD);
|
|
||||||
FREETMPS;
|
|
||||||
LEAVE;
|
|
||||||
}
|
|
||||||
|
|
||||||
void PerlCallback::call(double a, double b) const
|
|
||||||
{
|
|
||||||
if (!m_callback)
|
|
||||||
return;
|
|
||||||
dSP;
|
|
||||||
ENTER;
|
|
||||||
SAVETMPS;
|
|
||||||
PUSHMARK(SP);
|
|
||||||
XPUSHs(sv_2mortal(newSVnv(a)));
|
|
||||||
XPUSHs(sv_2mortal(newSVnv(b)));
|
|
||||||
PUTBACK;
|
|
||||||
perl_call_sv(SvRV((SV*)m_callback), G_DISCARD);
|
|
||||||
FREETMPS;
|
|
||||||
LEAVE;
|
|
||||||
}
|
|
||||||
|
|
||||||
void PerlCallback::call(double a, double b, double c) const
|
|
||||||
{
|
|
||||||
if (!m_callback)
|
|
||||||
return;
|
|
||||||
dSP;
|
|
||||||
ENTER;
|
|
||||||
SAVETMPS;
|
|
||||||
PUSHMARK(SP);
|
|
||||||
XPUSHs(sv_2mortal(newSVnv(a)));
|
|
||||||
XPUSHs(sv_2mortal(newSVnv(b)));
|
|
||||||
XPUSHs(sv_2mortal(newSVnv(c)));
|
|
||||||
PUTBACK;
|
|
||||||
perl_call_sv(SvRV((SV*)m_callback), G_DISCARD);
|
|
||||||
FREETMPS;
|
|
||||||
LEAVE;
|
|
||||||
}
|
|
||||||
|
|
||||||
void PerlCallback::call(double a, double b, double c, double d) const
|
|
||||||
{
|
|
||||||
if (!m_callback)
|
|
||||||
return;
|
|
||||||
dSP;
|
|
||||||
ENTER;
|
|
||||||
SAVETMPS;
|
|
||||||
PUSHMARK(SP);
|
|
||||||
XPUSHs(sv_2mortal(newSVnv(a)));
|
|
||||||
XPUSHs(sv_2mortal(newSVnv(b)));
|
|
||||||
XPUSHs(sv_2mortal(newSVnv(c)));
|
|
||||||
XPUSHs(sv_2mortal(newSVnv(d)));
|
|
||||||
PUTBACK;
|
|
||||||
perl_call_sv(SvRV((SV*)m_callback), G_DISCARD);
|
|
||||||
FREETMPS;
|
|
||||||
LEAVE;
|
|
||||||
}
|
|
||||||
|
|
||||||
void PerlCallback::call(double a, double b, double c, double d, double e, double f) const
|
|
||||||
{
|
|
||||||
if (!m_callback)
|
|
||||||
return;
|
|
||||||
dSP;
|
|
||||||
ENTER;
|
|
||||||
SAVETMPS;
|
|
||||||
PUSHMARK(SP);
|
|
||||||
XPUSHs(sv_2mortal(newSVnv(a)));
|
|
||||||
XPUSHs(sv_2mortal(newSVnv(b)));
|
|
||||||
XPUSHs(sv_2mortal(newSVnv(c)));
|
|
||||||
XPUSHs(sv_2mortal(newSVnv(d)));
|
|
||||||
XPUSHs(sv_2mortal(newSVnv(e)));
|
|
||||||
XPUSHs(sv_2mortal(newSVnv(f)));
|
|
||||||
PUTBACK;
|
|
||||||
perl_call_sv(SvRV((SV*)m_callback), G_DISCARD);
|
|
||||||
FREETMPS;
|
|
||||||
LEAVE;
|
|
||||||
}
|
|
||||||
|
|
||||||
void PerlCallback::call(bool b) const
|
|
||||||
{
|
|
||||||
call(b ? 1 : 0);
|
|
||||||
}
|
|
@ -1,33 +0,0 @@
|
|||||||
#ifndef slic3r_PerlCallback_hpp_
|
|
||||||
#define slic3r_PerlCallback_hpp_
|
|
||||||
|
|
||||||
#include <locale>
|
|
||||||
|
|
||||||
#include "libslic3r.h"
|
|
||||||
|
|
||||||
namespace Slic3r {
|
|
||||||
|
|
||||||
class PerlCallback {
|
|
||||||
public:
|
|
||||||
PerlCallback(void *sv) : m_callback(nullptr) { this->register_callback(sv); }
|
|
||||||
PerlCallback() : m_callback(nullptr) {}
|
|
||||||
~PerlCallback() { this->deregister_callback(); }
|
|
||||||
void register_callback(void *sv);
|
|
||||||
void deregister_callback();
|
|
||||||
void call() const;
|
|
||||||
void call(int i) const;
|
|
||||||
void call(int i, int j) const;
|
|
||||||
void call(const std::vector<int>& ints) const;
|
|
||||||
void call(double a) const;
|
|
||||||
void call(double a, double b) const;
|
|
||||||
void call(double a, double b, double c) const;
|
|
||||||
void call(double a, double b, double c, double d) const;
|
|
||||||
void call(double a, double b, double c, double d, double e, double f) const;
|
|
||||||
void call(bool b) const;
|
|
||||||
private:
|
|
||||||
void *m_callback;
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace Slic3r
|
|
||||||
|
|
||||||
#endif /* slic3r_PerlCallback_hpp_ */
|
|
Loading…
Reference in New Issue
Block a user