diff --git a/src/libslic3r/Arrange.cpp b/src/libslic3r/Arrange.cpp index 5b4aee507f1..2631b936edd 100644 --- a/src/libslic3r/Arrange.cpp +++ b/src/libslic3r/Arrange.cpp @@ -17,6 +17,7 @@ #define BOOST_NO_CXX17_HDR_STRING_VIEW #endif +#include #include #include diff --git a/src/libslic3r/Color.hpp b/src/libslic3r/Color.hpp index a1117463970..c13f0bd2c47 100644 --- a/src/libslic3r/Color.hpp +++ b/src/libslic3r/Color.hpp @@ -1,6 +1,8 @@ #ifndef slic3r_Color_hpp_ #define slic3r_Color_hpp_ +#include +#include #include #include diff --git a/src/libslic3r/Format/bbs_3mf.hpp b/src/libslic3r/Format/bbs_3mf.hpp index af6994b77ea..d2f46be3e09 100644 --- a/src/libslic3r/Format/bbs_3mf.hpp +++ b/src/libslic3r/Format/bbs_3mf.hpp @@ -8,6 +8,7 @@ namespace Slic3r { class Model; +class ModelObject; struct ConfigSubstitutionContext; class DynamicPrintConfig; class Preset; diff --git a/src/libslic3r/GCodeReader.cpp b/src/libslic3r/GCodeReader.cpp index 1a660b4c129..11683782862 100644 --- a/src/libslic3r/GCodeReader.cpp +++ b/src/libslic3r/GCodeReader.cpp @@ -1,6 +1,7 @@ #include "GCodeReader.hpp" #include #include +#include #include #include #include diff --git a/src/libslic3r/Orient.cpp b/src/libslic3r/Orient.cpp index a87694ad93d..ce448fc7e6c 100644 --- a/src/libslic3r/Orient.cpp +++ b/src/libslic3r/Orient.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include #if defined(_MSC_VER) && defined(__clang__) diff --git a/src/libslic3r/PNGReadWrite.cpp b/src/libslic3r/PNGReadWrite.cpp index e4b7489b85b..32b9a8f79e6 100644 --- a/src/libslic3r/PNGReadWrite.cpp +++ b/src/libslic3r/PNGReadWrite.cpp @@ -5,6 +5,7 @@ #include #include +#include #include #include diff --git a/src/libslic3r/PNGReadWrite.hpp b/src/libslic3r/PNGReadWrite.hpp index c76d7b16846..9a27fed4901 100644 --- a/src/libslic3r/PNGReadWrite.hpp +++ b/src/libslic3r/PNGReadWrite.hpp @@ -1,6 +1,7 @@ #ifndef PNGREAD_HPP #define PNGREAD_HPP +#include #include #include #include diff --git a/src/libslic3r/PerimeterGenerator.cpp b/src/libslic3r/PerimeterGenerator.cpp index c9b1d5d980b..0616ac5da64 100644 --- a/src/libslic3r/PerimeterGenerator.cpp +++ b/src/libslic3r/PerimeterGenerator.cpp @@ -23,6 +23,7 @@ #include #include +#include static const int overhang_sampling_number = 6; static const double narrow_loop_length_threshold = 10; diff --git a/src/libslic3r/Print.cpp b/src/libslic3r/Print.cpp index 7993f6a7ba2..da3a6da52c9 100644 --- a/src/libslic3r/Print.cpp +++ b/src/libslic3r/Print.cpp @@ -40,6 +40,7 @@ #include "Utils.hpp" #include "PrintConfig.hpp" #include "Model.hpp" +#include "format.hpp" #include #include @@ -49,6 +50,10 @@ #include #include #include +#include + +#include +#include //BBS: add json support #include "nlohmann/json.hpp" @@ -1117,8 +1122,8 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons* return // Test whether the last slicing plane is below or above the print volume. { 0.5 * (layers[layers.size() - 2] + layers.back()) > this->config().printable_height + EPSILON ? - format(_u8L("The object %1% exceeds the maximum build volume height."), print_object.model_object()->name) : - format(_u8L("While the object %1% itself fits the build volume, its last layer exceeds the maximum build volume height."), print_object.model_object()->name) + + Slic3r::format(_u8L("The object %1% exceeds the maximum build volume height."), print_object.model_object()->name) : + Slic3r::format(_u8L("While the object %1% itself fits the build volume, its last layer exceeds the maximum build volume height."), print_object.model_object()->name) + " " + _u8L("You might want to reduce the size of your model or change current print settings and retry.") }; } } @@ -1401,7 +1406,7 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons* } StringObjectException except; - except.string = format(L("Plate %d: %s does not support filament %s"), this->get_plate_index() + 1, L(bed_type_name), extruder_id + 1); + except.string = Slic3r::format(L("Plate %d: %s does not support filament %s"), this->get_plate_index() + 1, L(bed_type_name), extruder_id + 1); except.string += "\n"; except.type = STRING_EXCEPT_FILAMENT_NOT_MATCH_BED_TYPE; except.params.push_back(std::to_string(this->get_plate_index() + 1)); diff --git a/src/libslic3r/PrintApply.cpp b/src/libslic3r/PrintApply.cpp index 6664b28a3e2..76598cca220 100644 --- a/src/libslic3r/PrintApply.cpp +++ b/src/libslic3r/PrintApply.cpp @@ -1,6 +1,7 @@ #include "Model.hpp" #include "Print.hpp" +#include #include namespace Slic3r { diff --git a/src/libslic3r/PrintBase.cpp b/src/libslic3r/PrintBase.cpp index 5ba9306b5d0..25b282c7baf 100644 --- a/src/libslic3r/PrintBase.cpp +++ b/src/libslic3r/PrintBase.cpp @@ -3,6 +3,7 @@ #include #include +#include #include "I18N.hpp" diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index 45a7f926e9a..0e24a821fba 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -20,6 +20,7 @@ ///|/ PrusaSlicer is released under the terms of the AGPLv3 or higher ///|/ #include "PrintConfig.hpp" +#include "ClipperUtils.hpp" #include "Config.hpp" #include "I18N.hpp" diff --git a/src/libslic3r/PrintObject.cpp b/src/libslic3r/PrintObject.cpp index 0dabd5ea09f..8eada8cc42c 100644 --- a/src/libslic3r/PrintObject.cpp +++ b/src/libslic3r/PrintObject.cpp @@ -29,6 +29,7 @@ #include "Fill/FillLightning.hpp" #include "Format/STL.hpp" #include "TreeSupport.hpp" +#include "format.hpp" #include #include @@ -659,7 +660,7 @@ void PrintObject::generate_support_material() {SharpTail,L("floating regions")}, {Cantilever,L("floating cantilever")}, {LargeOverhang,L("large overhangs")} }; - std::string warning_message = format(L("It seems object %s has %s. Please re-orient the object or enable support generation."), + std::string warning_message = Slic3r::format(L("It seems object %s has %s. Please re-orient the object or enable support generation."), this->model_object()->name, reasons[sntype]); this->active_step_add_warning(PrintStateBase::WarningLevel::NON_CRITICAL, warning_message, PrintStateBase::SlicingNeedSupportOn); } diff --git a/src/libslic3r/ProjectTask.cpp b/src/libslic3r/ProjectTask.cpp index 622a20a85e8..fe5fd36a45e 100644 --- a/src/libslic3r/ProjectTask.cpp +++ b/src/libslic3r/ProjectTask.cpp @@ -9,6 +9,7 @@ #include #include +#include #include #include #include diff --git a/src/libslic3r/SVG.cpp b/src/libslic3r/SVG.cpp index 6377f405eda..9ccddcd4f22 100644 --- a/src/libslic3r/SVG.cpp +++ b/src/libslic3r/SVG.cpp @@ -1,6 +1,7 @@ #include "SVG.hpp" #include +#include #include namespace Slic3r { diff --git a/src/libslic3r/Shape/TextShape.cpp b/src/libslic3r/Shape/TextShape.cpp index e740905ce5c..63c5f96df22 100644 --- a/src/libslic3r/Shape/TextShape.cpp +++ b/src/libslic3r/Shape/TextShape.cpp @@ -28,6 +28,8 @@ #include "BRepPrimAPI_MakePrism.hxx" #include "Font_FontMgr.hxx" +#include + namespace Slic3r { static std::map g_occt_fonts_maps; //map diff --git a/src/libslic3r/Shape/TextShape.hpp b/src/libslic3r/Shape/TextShape.hpp index 75c93bc6411..d093c2da422 100644 --- a/src/libslic3r/Shape/TextShape.hpp +++ b/src/libslic3r/Shape/TextShape.hpp @@ -1,6 +1,8 @@ #ifndef slic3r_Text_Shape_hpp_ #define slic3r_Text_Shape_hpp_ +#include "libslic3r/TriangleMesh.hpp" + namespace Slic3r { class TriangleMesh; @@ -17,4 +19,4 @@ std::map get_occt_fonts_maps(); }; // namespace Slic3r -#endif // slic3r_Text_Shape_hpp_ \ No newline at end of file +#endif // slic3r_Text_Shape_hpp_ diff --git a/src/libslic3r/Support/SupportCommon.cpp b/src/libslic3r/Support/SupportCommon.cpp index 9b2610a4bd6..c494507c786 100644 --- a/src/libslic3r/Support/SupportCommon.cpp +++ b/src/libslic3r/Support/SupportCommon.cpp @@ -11,9 +11,11 @@ #include "../MutablePolygon.hpp" #include "../Geometry.hpp" #include "../Point.hpp" +#include "clipper/clipper_z.hpp" #include #include +#include #include diff --git a/src/libslic3r/TreeSupport.cpp b/src/libslic3r/TreeSupport.cpp index 5b3ec7049ac..71080cf20ea 100644 --- a/src/libslic3r/TreeSupport.cpp +++ b/src/libslic3r/TreeSupport.cpp @@ -12,6 +12,10 @@ #include "I18N.hpp" #include +#include +#include +#include + #define _L(s) Slic3r::I18N::translate(s) #define USE_PLAN_LAYER_HEIGHTS 1 diff --git a/src/libslic3r/TriangleSelector.cpp b/src/libslic3r/TriangleSelector.cpp index 6499215b2fb..e78dd878d93 100644 --- a/src/libslic3r/TriangleSelector.cpp +++ b/src/libslic3r/TriangleSelector.cpp @@ -2,6 +2,7 @@ #include "Model.hpp" #include +#include #ifndef NDEBUG // #define EXPENSIVE_DEBUG_CHECKS diff --git a/src/libslic3r/utils.cpp b/src/libslic3r/utils.cpp index 1a5422b7bb9..dae1c13e5ab 100644 --- a/src/libslic3r/utils.cpp +++ b/src/libslic3r/utils.cpp @@ -13,6 +13,7 @@ #include #include +#include "format.hpp" #include "Platform.hpp" #include "Time.hpp" #include "libslic3r.h" @@ -1510,7 +1511,7 @@ bool bbl_calc_md5(std::string &filename, std::string &md5_out) // SoftFever: copy directory recursively void copy_directory_recursively(const boost::filesystem::path &source, const boost::filesystem::path &target) { - BOOST_LOG_TRIVIAL(info) << format("copy_directory_recursively %1% -> %2%", source, target); + BOOST_LOG_TRIVIAL(info) << Slic3r::format("copy_directory_recursively %1% -> %2%", source, target); std::string error_message; if (boost::filesystem::exists(target)) @@ -1530,7 +1531,7 @@ void copy_directory_recursively(const boost::filesystem::path &source, const boo CopyFileResult cfr = copy_file(source_file, target_file, error_message, false); if (cfr != CopyFileResult::SUCCESS) { BOOST_LOG_TRIVIAL(error) << "Copying failed(" << cfr << "): " << error_message; - throw Slic3r::CriticalException(format( + throw Slic3r::CriticalException(Slic3r::format( ("Copying directory %1% to %2% failed: %3%"), source, target, error_message)); } diff --git a/src/slic3r/GUI/AMSMaterialsSetting.cpp b/src/slic3r/GUI/AMSMaterialsSetting.cpp index 8e11493b38d..ddbf120b21e 100644 --- a/src/slic3r/GUI/AMSMaterialsSetting.cpp +++ b/src/slic3r/GUI/AMSMaterialsSetting.cpp @@ -4,6 +4,8 @@ #include "GUI_App.hpp" #include "libslic3r/Preset.hpp" #include "I18N.hpp" +#include +#include #include #include "CalibUtils.hpp" diff --git a/src/slic3r/GUI/AMSMaterialsSetting.hpp b/src/slic3r/GUI/AMSMaterialsSetting.hpp index 06519886395..c66052a077f 100644 --- a/src/slic3r/GUI/AMSMaterialsSetting.hpp +++ b/src/slic3r/GUI/AMSMaterialsSetting.hpp @@ -5,6 +5,7 @@ #include "wxExtensions.hpp" #include "GUI_Utils.hpp" #include "DeviceManager.hpp" +#include "wx/colourdata.h" #include "wx/clrpicker.h" #include "Widgets/RadioBox.hpp" #include "Widgets/Button.hpp" diff --git a/src/slic3r/GUI/Auxiliary.cpp b/src/slic3r/GUI/Auxiliary.cpp index 623d39736dc..c28457ea030 100644 --- a/src/slic3r/GUI/Auxiliary.cpp +++ b/src/slic3r/GUI/Auxiliary.cpp @@ -21,6 +21,8 @@ #include #include +#include + #include "wxExtensions.hpp" #include "GUI_App.hpp" #include "GUI_ObjectList.hpp" diff --git a/src/slic3r/GUI/AuxiliaryDataViewModel.cpp b/src/slic3r/GUI/AuxiliaryDataViewModel.cpp index 212566338e8..50368b85443 100644 --- a/src/slic3r/GUI/AuxiliaryDataViewModel.cpp +++ b/src/slic3r/GUI/AuxiliaryDataViewModel.cpp @@ -3,6 +3,11 @@ #include "libslic3r/Model.hpp" #include "libslic3r/Format/bbs_3mf.hpp" + +#include + +#include + const static std::array s_default_folders = { _L("Model Pictures"), _L("Bill of Materials"), diff --git a/src/slic3r/GUI/AuxiliaryDataViewModel.hpp b/src/slic3r/GUI/AuxiliaryDataViewModel.hpp index 109b74a25af..76c046c5e0c 100644 --- a/src/slic3r/GUI/AuxiliaryDataViewModel.hpp +++ b/src/slic3r/GUI/AuxiliaryDataViewModel.hpp @@ -8,7 +8,7 @@ #include "I18N.hpp" -#include +#include class AuxiliaryModelNode; WX_DEFINE_ARRAY_PTR(AuxiliaryModelNode*, AuxiliaryModelNodePtrArray); diff --git a/src/slic3r/GUI/AuxiliaryDialog.cpp b/src/slic3r/GUI/AuxiliaryDialog.cpp index 5fadbf7ff1a..0fce2cc833b 100644 --- a/src/slic3r/GUI/AuxiliaryDialog.cpp +++ b/src/slic3r/GUI/AuxiliaryDialog.cpp @@ -4,6 +4,8 @@ #include "libslic3r/Utils.hpp" +#include + namespace pt = boost::property_tree; typedef pt::ptree JSON; @@ -33,4 +35,4 @@ void AuxiliaryDialog::on_dpi_changed(const wxRect& suggested_rect) } } // namespace GUI -} // namespace Slic3r \ No newline at end of file +} // namespace Slic3r diff --git a/src/slic3r/GUI/BBLStatusBar.hpp b/src/slic3r/GUI/BBLStatusBar.hpp index 02a3af3ca29..e643a9b536c 100644 --- a/src/slic3r/GUI/BBLStatusBar.hpp +++ b/src/slic3r/GUI/BBLStatusBar.hpp @@ -2,6 +2,7 @@ #define BBLSTATUSBAR_HPP #include +#include #include #include diff --git a/src/slic3r/GUI/BBLStatusBarSend.cpp b/src/slic3r/GUI/BBLStatusBarSend.cpp index 35ebd0f1b85..3976ae7bb19 100644 --- a/src/slic3r/GUI/BBLStatusBarSend.cpp +++ b/src/slic3r/GUI/BBLStatusBarSend.cpp @@ -12,7 +12,7 @@ #include "I18N.hpp" #include - +#include namespace Slic3r { diff --git a/src/slic3r/GUI/BBLTopbar.cpp b/src/slic3r/GUI/BBLTopbar.cpp index 7e33b8cd8f6..ee7c380a694 100644 --- a/src/slic3r/GUI/BBLTopbar.cpp +++ b/src/slic3r/GUI/BBLTopbar.cpp @@ -1,6 +1,7 @@ #include "BBLTopbar.hpp" #include "wx/artprov.h" #include "wx/aui/framemanager.h" +#include "wx/display.h" #include "I18N.hpp" #include "GUI_App.hpp" #include "GUI.hpp" @@ -10,6 +11,8 @@ #include "WebViewDialog.hpp" #include "PartPlate.hpp" +#include + #define TOPBAR_ICON_SIZE 18 #define TOPBAR_TITLE_WIDTH 300 diff --git a/src/slic3r/GUI/BindDialog.cpp b/src/slic3r/GUI/BindDialog.cpp index 3c97fdf3d1a..df52d84b142 100644 --- a/src/slic3r/GUI/BindDialog.cpp +++ b/src/slic3r/GUI/BindDialog.cpp @@ -5,6 +5,7 @@ #include #include #include "wx/evtloop.h" +#include #include #include #include diff --git a/src/slic3r/GUI/BitmapCache.cpp b/src/slic3r/GUI/BitmapCache.cpp index 318160f11f4..d5facd3f3f3 100644 --- a/src/slic3r/GUI/BitmapCache.cpp +++ b/src/slic3r/GUI/BitmapCache.cpp @@ -5,6 +5,7 @@ #include "GUI.hpp" #include "GUI_Utils.hpp" +#include #include #ifdef __WXGTK2__ diff --git a/src/slic3r/GUI/CameraPopup.hpp b/src/slic3r/GUI/CameraPopup.hpp index a256f317b0b..8135f41fa44 100644 --- a/src/slic3r/GUI/CameraPopup.hpp +++ b/src/slic3r/GUI/CameraPopup.hpp @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/src/slic3r/GUI/CreatePresetsDialog.cpp b/src/slic3r/GUI/CreatePresetsDialog.cpp index 628af9deb7d..a5b3635689a 100644 --- a/src/slic3r/GUI/CreatePresetsDialog.cpp +++ b/src/slic3r/GUI/CreatePresetsDialog.cpp @@ -6,6 +6,8 @@ #include #include #include +#include +#include #include "libslic3r/PresetBundle.hpp" #include "I18N.hpp" #include "GUI_App.hpp" diff --git a/src/slic3r/GUI/DeviceManager.hpp b/src/slic3r/GUI/DeviceManager.hpp index 1e142a97c30..1c3c5881b92 100644 --- a/src/slic3r/GUI/DeviceManager.hpp +++ b/src/slic3r/GUI/DeviceManager.hpp @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include "nlohmann/json.hpp" diff --git a/src/slic3r/GUI/ExtrusionCalibration.cpp b/src/slic3r/GUI/ExtrusionCalibration.cpp index f4c17b5b750..8d5a939cbad 100644 --- a/src/slic3r/GUI/ExtrusionCalibration.cpp +++ b/src/slic3r/GUI/ExtrusionCalibration.cpp @@ -3,6 +3,7 @@ #include "MsgDialog.hpp" #include "libslic3r/Preset.hpp" #include "I18N.hpp" +#include #include namespace Slic3r { namespace GUI { diff --git a/src/slic3r/GUI/GCodeViewer.cpp b/src/slic3r/GUI/GCodeViewer.cpp index 96e2963229d..cec2f1e4053 100644 --- a/src/slic3r/GUI/GCodeViewer.cpp +++ b/src/slic3r/GUI/GCodeViewer.cpp @@ -2,6 +2,7 @@ #include "GCodeViewer.hpp" #include "libslic3r/BuildVolume.hpp" +#include "libslic3r/ClipperUtils.hpp" #include "libslic3r/Print.hpp" #include "libslic3r/Geometry.hpp" #include "libslic3r/Model.hpp" diff --git a/src/slic3r/GUI/GLTexture.cpp b/src/slic3r/GUI/GLTexture.cpp index dba35234910..fcd9045cef6 100644 --- a/src/slic3r/GUI/GLTexture.cpp +++ b/src/slic3r/GUI/GLTexture.cpp @@ -33,6 +33,7 @@ #include "libslic3r/Utils.hpp" #include "GUI_App.hpp" +#include #include namespace Slic3r { namespace GUI { diff --git a/src/slic3r/GUI/GLTexture.hpp b/src/slic3r/GUI/GLTexture.hpp index 9af4f8a872e..41068a9fb72 100644 --- a/src/slic3r/GUI/GLTexture.hpp +++ b/src/slic3r/GUI/GLTexture.hpp @@ -6,6 +6,9 @@ #include #include +#include +#include + class wxImage; namespace Slic3r { diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp index 42c19513cfc..41e8a2c302f 100644 --- a/src/slic3r/GUI/GUI_App.cpp +++ b/src/slic3r/GUI/GUI_App.cpp @@ -28,6 +28,8 @@ #include #include #include +#include +#include #include #include diff --git a/src/slic3r/GUI/GUI_App.hpp b/src/slic3r/GUI/GUI_App.hpp index bd7868dbd73..893874ab390 100644 --- a/src/slic3r/GUI/GUI_App.hpp +++ b/src/slic3r/GUI/GUI_App.hpp @@ -1,6 +1,13 @@ #ifndef slic3r_GUI_App_hpp_ #define slic3r_GUI_App_hpp_ +#include +#include +#include +#include +#include +#include + #include #include #include "ImGuiWrapper.hpp" @@ -17,13 +24,6 @@ #include "slic3r/GUI/HttpServer.hpp" #include "../Utils/PrintHost.hpp" -#include -#include -#include -#include -#include -#include - #include #include diff --git a/src/slic3r/GUI/GUI_Colors.hpp b/src/slic3r/GUI/GUI_Colors.hpp index 0395e997c06..4da03360b91 100644 --- a/src/slic3r/GUI/GUI_Colors.hpp +++ b/src/slic3r/GUI/GUI_Colors.hpp @@ -3,6 +3,7 @@ #include "imgui/imgui.h" #include "libslic3r/Color.hpp" +#include enum RenderCol_ { RenderCol_3D_Background = 0, diff --git a/src/slic3r/GUI/GUI_ObjectTable.cpp b/src/slic3r/GUI/GUI_ObjectTable.cpp index eda7c15b71a..199be206236 100644 --- a/src/slic3r/GUI/GUI_ObjectTable.cpp +++ b/src/slic3r/GUI/GUI_ObjectTable.cpp @@ -1,4 +1,5 @@ #include "wx/clipbrd.h" +#include "wx/display.h" #include "SelectMachine.hpp" #include "I18N.hpp" diff --git a/src/slic3r/GUI/Gizmos/GLGizmoBase.hpp b/src/slic3r/GUI/Gizmos/GLGizmoBase.hpp index 9e7aa05209c..4ed37d5aeb4 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoBase.hpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoBase.hpp @@ -15,6 +15,8 @@ #include +#include + #define ENABLE_FIXED_GRABBER 1 class wxWindow; diff --git a/src/slic3r/GUI/Gizmos/GLGizmoFdmSupports.cpp b/src/slic3r/GUI/Gizmos/GLGizmoFdmSupports.cpp index ccf3956f381..0471d023588 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoFdmSupports.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoFdmSupports.cpp @@ -15,9 +15,9 @@ #include "slic3r/GUI/GUI.hpp" #include "slic3r/Utils/UndoRedo.hpp" - #include +#include namespace Slic3r::GUI { diff --git a/src/slic3r/GUI/Gizmos/GLGizmoText.cpp b/src/slic3r/GUI/Gizmos/GLGizmoText.cpp index e7793c017d9..7034b0eb270 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoText.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoText.cpp @@ -6,7 +6,7 @@ #include "slic3r/GUI/ImGuiWrapper.hpp" #include "slic3r/GUI/GUI_ObjectList.hpp" #include "slic3r/GUI/Plater.hpp" - +#include "libslic3r/ClipperUtils.hpp" #include "libslic3r/Geometry/ConvexHull.hpp" #include "libslic3r/Model.hpp" @@ -14,6 +14,8 @@ #include +#include + #include #ifndef IMGUI_DEFINE_MATH_OPERATORS diff --git a/src/slic3r/GUI/HMS.cpp b/src/slic3r/GUI/HMS.cpp index 2f9ad630de9..3e87d1fd23c 100644 --- a/src/slic3r/GUI/HMS.cpp +++ b/src/slic3r/GUI/HMS.cpp @@ -1,5 +1,6 @@ #include "HMS.hpp" +#include namespace Slic3r { diff --git a/src/slic3r/GUI/HttpServer.hpp b/src/slic3r/GUI/HttpServer.hpp index 2a6a980ecc6..c545ab9b2a4 100644 --- a/src/slic3r/GUI/HttpServer.hpp +++ b/src/slic3r/GUI/HttpServer.hpp @@ -1,6 +1,7 @@ #ifndef slic3r_Http_App_hpp_ #define slic3r_Http_App_hpp_ +#include #include #include @@ -12,7 +13,6 @@ #include #include -using namespace boost; using namespace boost::system; using namespace boost::asio; @@ -73,21 +73,21 @@ class http_headers class session { - asio::streambuf buff; + boost::asio::streambuf buff; http_headers headers; static void read_body(std::shared_ptr pThis) { int nbuffer = 1000; std::shared_ptr> bufptr = std::make_shared>(nbuffer); - asio::async_read(pThis->socket, boost::asio::buffer(*bufptr, nbuffer), [pThis](const boost::beast::error_code& e, std::size_t s) + boost::asio::async_read(pThis->socket, boost::asio::buffer(*bufptr, nbuffer), [pThis](const boost::beast::error_code& e, std::size_t s) { }); } static void read_next_line(std::shared_ptr pThis) { - asio::async_read_until(pThis->socket, pThis->buff, '\r', [pThis](const boost::beast::error_code& e, std::size_t s) + boost::asio::async_read_until(pThis->socket, pThis->buff, '\r', [pThis](const boost::beast::error_code& e, std::size_t s) { std::string line, ignore; std::istream stream{ &pThis->buff }; @@ -100,7 +100,7 @@ class session if (pThis->headers.content_length() == 0) { std::shared_ptr str = std::make_shared(pThis->headers.get_response()); - asio::async_write(pThis->socket, boost::asio::buffer(str->c_str(), str->length()), [pThis, str](const boost::beast::error_code& e, std::size_t s) + boost::asio::async_write(pThis->socket, boost::asio::buffer(str->c_str(), str->length()), [pThis, str](const boost::beast::error_code& e, std::size_t s) { std::cout << "done" << std::endl; }); @@ -119,7 +119,7 @@ class session static void read_first_line(std::shared_ptr pThis) { - asio::async_read_until(pThis->socket, pThis->buff, '\r', [pThis](const boost::beast::error_code& e, std::size_t s) + boost::asio::async_read_until(pThis->socket, pThis->buff, '\r', [pThis](const boost::beast::error_code& e, std::size_t s) { std::string line, ignore; std::istream stream{ &pThis->buff }; diff --git a/src/slic3r/GUI/IMSlider.hpp b/src/slic3r/GUI/IMSlider.hpp index 2bf700787fe..1b700d0d015 100644 --- a/src/slic3r/GUI/IMSlider.hpp +++ b/src/slic3r/GUI/IMSlider.hpp @@ -3,6 +3,7 @@ #include "TickCode.hpp" #include +#include #include diff --git a/src/slic3r/GUI/IconManager.cpp b/src/slic3r/GUI/IconManager.cpp index 896c5203f9f..f302f6ceba1 100644 --- a/src/slic3r/GUI/IconManager.cpp +++ b/src/slic3r/GUI/IconManager.cpp @@ -1,6 +1,9 @@ #include "IconManager.hpp" #include +#include #include +#include +#include #include "nanosvg/nanosvg.h" #include "nanosvg/nanosvgrast.h" #include "libslic3r/Utils.hpp" // ScopeGuard diff --git a/src/slic3r/GUI/ImGuiWrapper.hpp b/src/slic3r/GUI/ImGuiWrapper.hpp index 07ca5099091..c188f61cc69 100644 --- a/src/slic3r/GUI/ImGuiWrapper.hpp +++ b/src/slic3r/GUI/ImGuiWrapper.hpp @@ -7,6 +7,7 @@ #include #include +#include #include diff --git a/src/slic3r/GUI/ImageGrid.cpp b/src/slic3r/GUI/ImageGrid.cpp index 2ab6748f4e5..770d46ec008 100644 --- a/src/slic3r/GUI/ImageGrid.cpp +++ b/src/slic3r/GUI/ImageGrid.cpp @@ -8,6 +8,8 @@ #include +#include + wxDEFINE_EVENT(EVT_ITEM_ACTION, wxCommandEvent); BEGIN_EVENT_TABLE(Slic3r::GUI::ImageGrid, wxPanel) diff --git a/src/slic3r/GUI/ImageGrid.h b/src/slic3r/GUI/ImageGrid.h index 34e016c06f9..4bc17e4b6d3 100644 --- a/src/slic3r/GUI/ImageGrid.h +++ b/src/slic3r/GUI/ImageGrid.h @@ -9,6 +9,7 @@ #define ImageGrid_h #include +#include #include #include diff --git a/src/slic3r/GUI/Jobs/Job.hpp b/src/slic3r/GUI/Jobs/Job.hpp index 6c251cac31f..55c6196c355 100644 --- a/src/slic3r/GUI/Jobs/Job.hpp +++ b/src/slic3r/GUI/Jobs/Job.hpp @@ -9,6 +9,8 @@ #include #include +#include + #include "libslic3r/libslic3r.h" #include "ProgressIndicator.hpp" diff --git a/src/slic3r/GUI/Jobs/PrintJob.hpp b/src/slic3r/GUI/Jobs/PrintJob.hpp index e703f86fba1..7806a8623b5 100644 --- a/src/slic3r/GUI/Jobs/PrintJob.hpp +++ b/src/slic3r/GUI/Jobs/PrintJob.hpp @@ -3,6 +3,7 @@ #include #include +#include "libslic3r/PrintConfig.hpp" #include "Job.hpp" namespace fs = boost::filesystem; diff --git a/src/slic3r/GUI/Jobs/ProgressIndicator.hpp b/src/slic3r/GUI/Jobs/ProgressIndicator.hpp index 4aa5757d20e..4f7ec5d9ff4 100644 --- a/src/slic3r/GUI/Jobs/ProgressIndicator.hpp +++ b/src/slic3r/GUI/Jobs/ProgressIndicator.hpp @@ -7,6 +7,7 @@ #include #include +#include namespace Slic3r { diff --git a/src/slic3r/GUI/Jobs/SLAImportJob.hpp b/src/slic3r/GUI/Jobs/SLAImportJob.hpp index bb620c98262..62745233376 100644 --- a/src/slic3r/GUI/Jobs/SLAImportJob.hpp +++ b/src/slic3r/GUI/Jobs/SLAImportJob.hpp @@ -6,6 +6,7 @@ #define SLAIMPORTJOB_HPP #include "Job.hpp" +#include "libslic3r/Point.hpp" namespace Slic3r { namespace GUI { diff --git a/src/slic3r/GUI/Jobs/UpgradeNetworkJob.hpp b/src/slic3r/GUI/Jobs/UpgradeNetworkJob.hpp index 0af597d0fc2..5a531065f37 100644 --- a/src/slic3r/GUI/Jobs/UpgradeNetworkJob.hpp +++ b/src/slic3r/GUI/Jobs/UpgradeNetworkJob.hpp @@ -1,8 +1,11 @@ #ifndef __UpgradeNetworkJob_HPP__ #define __UpgradeNetworkJob_HPP__ +#include +#include #include #include "Job.hpp" +#include namespace fs = boost::filesystem; diff --git a/src/slic3r/GUI/MainFrame.cpp b/src/slic3r/GUI/MainFrame.cpp index 3b70614dae8..1dda42dbea2 100644 --- a/src/slic3r/GUI/MainFrame.cpp +++ b/src/slic3r/GUI/MainFrame.cpp @@ -27,6 +27,7 @@ #include #include +#include #include "libslic3r/Print.hpp" #include "libslic3r/Polygon.hpp" diff --git a/src/slic3r/GUI/MainFrame.hpp b/src/slic3r/GUI/MainFrame.hpp index 14f11f1a2b1..9ef81a8b086 100644 --- a/src/slic3r/GUI/MainFrame.hpp +++ b/src/slic3r/GUI/MainFrame.hpp @@ -26,6 +26,8 @@ #include "Widgets/SideButton.hpp" #include "Widgets/SideMenuPopup.hpp" +#include + // BBS #include "BBLTopbar.hpp" #include "PrinterWebView.hpp" diff --git a/src/slic3r/GUI/MarkdownTip.cpp b/src/slic3r/GUI/MarkdownTip.cpp index 63eafd361bc..7ffeae9e369 100644 --- a/src/slic3r/GUI/MarkdownTip.cpp +++ b/src/slic3r/GUI/MarkdownTip.cpp @@ -7,6 +7,8 @@ #include "libslic3r/Utils.hpp" #include "I18N.hpp" +#include + namespace fs = boost::filesystem; namespace Slic3r { namespace GUI { diff --git a/src/slic3r/GUI/MediaFilePanel.h b/src/slic3r/GUI/MediaFilePanel.h index 8b9d84ae473..1ae5df7916b 100644 --- a/src/slic3r/GUI/MediaFilePanel.h +++ b/src/slic3r/GUI/MediaFilePanel.h @@ -10,7 +10,7 @@ #include "GUI_Utils.hpp" #include "wxExtensions.hpp" - +#include #include class Button; diff --git a/src/slic3r/GUI/MediaPlayCtrl.cpp b/src/slic3r/GUI/MediaPlayCtrl.cpp index 7fb8392f6a6..b5ab46647e6 100644 --- a/src/slic3r/GUI/MediaPlayCtrl.cpp +++ b/src/slic3r/GUI/MediaPlayCtrl.cpp @@ -8,6 +8,9 @@ #include "MsgDialog.hpp" #include "DownloadProgressDialog.hpp" +#include +#include +#include #include #undef pid_t #include @@ -18,6 +21,8 @@ #include #endif +#include + namespace Slic3r { namespace GUI { diff --git a/src/slic3r/GUI/MonitorPage.hpp b/src/slic3r/GUI/MonitorPage.hpp index 9cb05eecc43..3efaccda310 100644 --- a/src/slic3r/GUI/MonitorPage.hpp +++ b/src/slic3r/GUI/MonitorPage.hpp @@ -2,6 +2,7 @@ #define slic3r_MonitorPage_hpp_ #include +#include namespace Slic3r { namespace GUI { diff --git a/src/slic3r/GUI/NetworkTestDialog.cpp b/src/slic3r/GUI/NetworkTestDialog.cpp index 195c0d55b4e..69be995e6f2 100644 --- a/src/slic3r/GUI/NetworkTestDialog.cpp +++ b/src/slic3r/GUI/NetworkTestDialog.cpp @@ -8,7 +8,7 @@ #include "slic3r/Utils/Http.hpp" #include "libslic3r/AppConfig.hpp" #include - +#include namespace Slic3r { namespace GUI { diff --git a/src/slic3r/GUI/Notebook.hpp b/src/slic3r/GUI/Notebook.hpp index d75898a7cd9..7e6e94da3a2 100644 --- a/src/slic3r/GUI/Notebook.hpp +++ b/src/slic3r/GUI/Notebook.hpp @@ -4,6 +4,7 @@ //#ifdef _WIN32 #include +#include class ModeSizer; class ScalableButton; diff --git a/src/slic3r/GUI/ObjectDataViewModel.hpp b/src/slic3r/GUI/ObjectDataViewModel.hpp index 8725645191f..47ac80d3d3b 100644 --- a/src/slic3r/GUI/ObjectDataViewModel.hpp +++ b/src/slic3r/GUI/ObjectDataViewModel.hpp @@ -5,6 +5,7 @@ #ifndef slic3r_GUI_ObjectDataViewModel_hpp_ #define slic3r_GUI_ObjectDataViewModel_hpp_ +#include #include #include #include diff --git a/src/slic3r/GUI/ParamsPanel.hpp b/src/slic3r/GUI/ParamsPanel.hpp index 1a20ec7d206..dfd3196f57e 100644 --- a/src/slic3r/GUI/ParamsPanel.hpp +++ b/src/slic3r/GUI/ParamsPanel.hpp @@ -20,6 +20,8 @@ #include #include #include +#include +#include #include #include #include diff --git a/src/slic3r/GUI/PartPlate.cpp b/src/slic3r/GUI/PartPlate.cpp index 940028bd77f..fc63dfce311 100644 --- a/src/slic3r/GUI/PartPlate.cpp +++ b/src/slic3r/GUI/PartPlate.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include #include "libslic3r/libslic3r.h" diff --git a/src/slic3r/GUI/PresetComboBoxes.hpp b/src/slic3r/GUI/PresetComboBoxes.hpp index 4598b3dc327..954c06862f1 100644 --- a/src/slic3r/GUI/PresetComboBoxes.hpp +++ b/src/slic3r/GUI/PresetComboBoxes.hpp @@ -4,6 +4,7 @@ //#include #include #include +#include #include "libslic3r/Preset.hpp" #include "wxExtensions.hpp" diff --git a/src/slic3r/GUI/Printer/PrinterFileSystem.cpp b/src/slic3r/GUI/Printer/PrinterFileSystem.cpp index aeba2483486..886421c65fc 100644 --- a/src/slic3r/GUI/Printer/PrinterFileSystem.cpp +++ b/src/slic3r/GUI/Printer/PrinterFileSystem.cpp @@ -7,10 +7,14 @@ #include "../../Utils/NetworkAgent.hpp" #include "../BitmapCache.hpp" +#include +#include #include #include #include +#include + #include "nlohmann/json.hpp" #include diff --git a/src/slic3r/GUI/Printer/PrinterFileSystem.h b/src/slic3r/GUI/Printer/PrinterFileSystem.h index 2900685f8cf..237378744c1 100644 --- a/src/slic3r/GUI/Printer/PrinterFileSystem.h +++ b/src/slic3r/GUI/Printer/PrinterFileSystem.h @@ -4,6 +4,7 @@ #define BAMBU_DYNAMIC #include "BambuTunnel.h" +#include #include #include diff --git a/src/slic3r/GUI/PrivacyUpdateDialog.hpp b/src/slic3r/GUI/PrivacyUpdateDialog.hpp index b737bcd4868..08491661910 100644 --- a/src/slic3r/GUI/PrivacyUpdateDialog.hpp +++ b/src/slic3r/GUI/PrivacyUpdateDialog.hpp @@ -6,6 +6,7 @@ #include "Widgets/Label.hpp" #include "Widgets/WebView.hpp" #include +#include #include namespace Slic3r { namespace GUI { @@ -53,4 +54,4 @@ class PrivacyUpdateDialog : public DPIDialog }} // namespace Slic3r::GUI -#endif \ No newline at end of file +#endif diff --git a/src/slic3r/GUI/Project.cpp b/src/slic3r/GUI/Project.cpp index 46e3c34429c..003d0e4cdde 100644 --- a/src/slic3r/GUI/Project.cpp +++ b/src/slic3r/GUI/Project.cpp @@ -4,6 +4,8 @@ #include "libslic3r/Model.hpp" #include "libslic3r/Format/bbs_3mf.hpp" +#include + #include #include #include diff --git a/src/slic3r/GUI/SavePresetDialog.cpp b/src/slic3r/GUI/SavePresetDialog.cpp index a4f5f250139..f3c8871e76e 100644 --- a/src/slic3r/GUI/SavePresetDialog.cpp +++ b/src/slic3r/GUI/SavePresetDialog.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include diff --git a/src/slic3r/GUI/SelectMachine.cpp b/src/slic3r/GUI/SelectMachine.cpp index bb0127fe7ee..9c9bfb259a8 100644 --- a/src/slic3r/GUI/SelectMachine.cpp +++ b/src/slic3r/GUI/SelectMachine.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include "Plater.hpp" diff --git a/src/slic3r/GUI/SliceInfoPanel.cpp b/src/slic3r/GUI/SliceInfoPanel.cpp index ddf9eb647a0..9aeb5f25a4b 100644 --- a/src/slic3r/GUI/SliceInfoPanel.cpp +++ b/src/slic3r/GUI/SliceInfoPanel.cpp @@ -1,5 +1,6 @@ #include "SliceInfoPanel.hpp" +#include #include "I18N.hpp" #include "Widgets/Label.hpp" #include "libslic3r/Utils.hpp" @@ -344,4 +345,4 @@ void SliceInfoPanel::msw_rescale() } -} \ No newline at end of file +} diff --git a/src/slic3r/GUI/StatusPanel.cpp b/src/slic3r/GUI/StatusPanel.cpp index 2557b019493..53394895f6c 100644 --- a/src/slic3r/GUI/StatusPanel.cpp +++ b/src/slic3r/GUI/StatusPanel.cpp @@ -18,6 +18,8 @@ #include "RecenterDialog.hpp" #include "CalibUtils.hpp" #include +#include +#include #include #include diff --git a/src/slic3r/GUI/TabButton.cpp b/src/slic3r/GUI/TabButton.cpp index b972c1401c5..98525ee0708 100644 --- a/src/slic3r/GUI/TabButton.cpp +++ b/src/slic3r/GUI/TabButton.cpp @@ -1,6 +1,7 @@ #include "TabButton.hpp" #include "Widgets/Label.hpp" +#include #include BEGIN_EVENT_TABLE(TabButton, StaticBox) diff --git a/src/slic3r/GUI/WebUserLoginDialog.hpp b/src/slic3r/GUI/WebUserLoginDialog.hpp index 6a820bef9af..3d0e2629db3 100644 --- a/src/slic3r/GUI/WebUserLoginDialog.hpp +++ b/src/slic3r/GUI/WebUserLoginDialog.hpp @@ -24,6 +24,7 @@ #include "wx/fs_mem.h" #include "wx/stdpaths.h" #include +#include "wx/timer.h" #include #include "wx/textctrl.h" diff --git a/src/slic3r/GUI/WebViewDialog.cpp b/src/slic3r/GUI/WebViewDialog.cpp index 98d24d4175a..9e956854467 100644 --- a/src/slic3r/GUI/WebViewDialog.cpp +++ b/src/slic3r/GUI/WebViewDialog.cpp @@ -7,6 +7,9 @@ #include "libslic3r_version.h" #include "../Utils/Http.hpp" +#include +#include + #include #include #include diff --git a/src/slic3r/GUI/Widgets/AMSControl.cpp b/src/slic3r/GUI/Widgets/AMSControl.cpp index f70d16a7f11..9b39a4bb546 100644 --- a/src/slic3r/GUI/Widgets/AMSControl.cpp +++ b/src/slic3r/GUI/Widgets/AMSControl.cpp @@ -4,6 +4,8 @@ #include "../I18N.hpp" #include "../GUI_App.hpp" +#include + #include #include #include "CalibUtils.hpp" diff --git a/src/slic3r/GUI/Widgets/AxisCtrlButton.cpp b/src/slic3r/GUI/Widgets/AxisCtrlButton.cpp index 193dd682e69..21a420f5e4e 100644 --- a/src/slic3r/GUI/Widgets/AxisCtrlButton.cpp +++ b/src/slic3r/GUI/Widgets/AxisCtrlButton.cpp @@ -1,6 +1,8 @@ #include "AxisCtrlButton.hpp" #include "Label.hpp" +#include "libslic3r/libslic3r.h" +#include #include StateColor blank_bg(StateColor(std::make_pair(wxColour("#FFFFFF"), (int)StateColor::Normal))); @@ -365,4 +367,4 @@ void AxisCtrlButton::sendButtonEvent() event.SetEventObject(this); event.SetInt(current_pos); GetEventHandler()->ProcessEvent(event); -} \ No newline at end of file +} diff --git a/src/slic3r/GUI/Widgets/DropDown.cpp b/src/slic3r/GUI/Widgets/DropDown.cpp index 03f8f366b04..23a344e5adc 100644 --- a/src/slic3r/GUI/Widgets/DropDown.cpp +++ b/src/slic3r/GUI/Widgets/DropDown.cpp @@ -1,6 +1,8 @@ #include "DropDown.hpp" #include "Label.hpp" +#include +#include #include #ifdef __WXGTK__ diff --git a/src/slic3r/GUI/Widgets/DropDown.hpp b/src/slic3r/GUI/Widgets/DropDown.hpp index 4ff909c8450..86f14aa2781 100644 --- a/src/slic3r/GUI/Widgets/DropDown.hpp +++ b/src/slic3r/GUI/Widgets/DropDown.hpp @@ -1,6 +1,7 @@ #ifndef slic3r_GUI_DropDown_hpp_ #define slic3r_GUI_DropDown_hpp_ +#include #include #include "../wxExtensions.hpp" #include "StateHandler.hpp" diff --git a/src/slic3r/GUI/Widgets/ErrorMsgStaticText.cpp b/src/slic3r/GUI/Widgets/ErrorMsgStaticText.cpp index cdcbf489c1a..dc6c2fc9ed1 100644 --- a/src/slic3r/GUI/Widgets/ErrorMsgStaticText.cpp +++ b/src/slic3r/GUI/Widgets/ErrorMsgStaticText.cpp @@ -1,4 +1,5 @@ #include "ErrorMsgStaticText.hpp" +#include ErrorMsgStaticText::ErrorMsgStaticText() {} @@ -51,4 +52,4 @@ void ErrorMsgStaticText::paintEvent(wxPaintEvent &evt) SetMinSize(wxSize(-1, line_count * text_height)); SetMaxSize(wxSize(-1, line_count * text_height)); dc.DrawText(out_txt, 0, 0); -} \ No newline at end of file +} diff --git a/src/slic3r/GUI/Widgets/ErrorMsgStaticText.hpp b/src/slic3r/GUI/Widgets/ErrorMsgStaticText.hpp index 6a455b208b1..735a118a20d 100644 --- a/src/slic3r/GUI/Widgets/ErrorMsgStaticText.hpp +++ b/src/slic3r/GUI/Widgets/ErrorMsgStaticText.hpp @@ -2,6 +2,7 @@ #ifndef _WX_ERRORMSGSTATTEXT_H_ #define _WX_ERRORMSGSTATTEXT_H_ +#include #include "wx/stattext.h" class WXDLLIMPEXP_CORE ErrorMsgStaticText : public wxPanel @@ -19,4 +20,4 @@ class WXDLLIMPEXP_CORE ErrorMsgStaticText : public wxPanel void SetLabel(wxString msg){m_msg = msg;}; }; -#endif \ No newline at end of file +#endif diff --git a/src/slic3r/GUI/Widgets/ImageSwitchButton.cpp b/src/slic3r/GUI/Widgets/ImageSwitchButton.cpp index 634d61e7938..af48b6d27ad 100644 --- a/src/slic3r/GUI/Widgets/ImageSwitchButton.cpp +++ b/src/slic3r/GUI/Widgets/ImageSwitchButton.cpp @@ -3,6 +3,7 @@ #include "StaticBox.hpp" #include "../wxExtensions.hpp" +#include #include BEGIN_EVENT_TABLE(ImageSwitchButton, StaticBox) @@ -369,4 +370,4 @@ void FanSwitchButton::sendButtonEvent() wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, GetId()); event.SetEventObject(this); GetEventHandler()->ProcessEvent(event); -} \ No newline at end of file +} diff --git a/src/slic3r/GUI/Widgets/Label.cpp b/src/slic3r/GUI/Widgets/Label.cpp index 8ac96e90382..f981cfaee5a 100644 --- a/src/slic3r/GUI/Widgets/Label.cpp +++ b/src/slic3r/GUI/Widgets/Label.cpp @@ -2,6 +2,10 @@ #include "Label.hpp" #include "StaticBox.hpp" #include // For wxLocale +#include +#include +#include + wxFont Label::sysFont(int size, bool bold) { diff --git a/src/slic3r/GUI/Widgets/ProgressBar.cpp b/src/slic3r/GUI/Widgets/ProgressBar.cpp index 9f11b682d7e..214e76db839 100644 --- a/src/slic3r/GUI/Widgets/ProgressBar.cpp +++ b/src/slic3r/GUI/Widgets/ProgressBar.cpp @@ -1,5 +1,6 @@ #include "ProgressBar.hpp" #include "../I18N.hpp" +#include #include #include "Label.hpp" diff --git a/src/slic3r/GUI/Widgets/ProgressDialog.hpp b/src/slic3r/GUI/Widgets/ProgressDialog.hpp index f67f6b89b35..eb62d27bdb0 100644 --- a/src/slic3r/GUI/Widgets/ProgressDialog.hpp +++ b/src/slic3r/GUI/Widgets/ProgressDialog.hpp @@ -2,6 +2,7 @@ #define slic3r_GUI_PROGRESSDIALOG_hpp_ #include "wx/dialog.h" +#include "wx/progdlg.h" #include "wx/weakref.h" #include "wx/simplebook.h" #include "Button.hpp" diff --git a/src/slic3r/GUI/Widgets/RoundedRectangle.cpp b/src/slic3r/GUI/Widgets/RoundedRectangle.cpp index a3c7c139a97..07f2aa0b305 100644 --- a/src/slic3r/GUI/Widgets/RoundedRectangle.cpp +++ b/src/slic3r/GUI/Widgets/RoundedRectangle.cpp @@ -1,6 +1,7 @@ #include "RoundedRectangle.hpp" #include "../wxExtensions.hpp" #include +#include BEGIN_EVENT_TABLE(RoundedRectangle, wxPanel) EVT_PAINT(RoundedRectangle::OnPaint) @@ -32,4 +33,4 @@ void RoundedRectangle::OnPaint(wxPaintEvent &evt) dc.SetBrush(wxBrush(*wxTRANSPARENT_BRUSH)); dc.DrawRoundedRectangle(0, 0, GetSize().GetWidth(), GetSize().GetHeight(), m_radius); } -} \ No newline at end of file +} diff --git a/src/slic3r/GUI/Widgets/SideButton.cpp b/src/slic3r/GUI/Widgets/SideButton.cpp index 4ea48d9a5e1..53d7725fb20 100644 --- a/src/slic3r/GUI/Widgets/SideButton.cpp +++ b/src/slic3r/GUI/Widgets/SideButton.cpp @@ -1,6 +1,7 @@ #include "SideButton.hpp" #include "Label.hpp" +#include #include BEGIN_EVENT_TABLE(SideButton, wxPanel) diff --git a/src/slic3r/GUI/Widgets/SideMenuPopup.cpp b/src/slic3r/GUI/Widgets/SideMenuPopup.cpp index b50ed6b6050..cde4fba39d1 100644 --- a/src/slic3r/GUI/Widgets/SideMenuPopup.cpp +++ b/src/slic3r/GUI/Widgets/SideMenuPopup.cpp @@ -1,6 +1,7 @@ #include "SideMenuPopup.hpp" #include "Label.hpp" +#include #include #include "../GUI_App.hpp" diff --git a/src/slic3r/GUI/Widgets/SpinInput.hpp b/src/slic3r/GUI/Widgets/SpinInput.hpp index 5b0868880c7..cc342276f9a 100644 --- a/src/slic3r/GUI/Widgets/SpinInput.hpp +++ b/src/slic3r/GUI/Widgets/SpinInput.hpp @@ -1,7 +1,10 @@ #ifndef slic3r_GUI_SpinInput_hpp_ #define slic3r_GUI_SpinInput_hpp_ +#include +#include #include +#include #include "StaticBox.hpp" class Button; diff --git a/src/slic3r/GUI/Widgets/StateHandler.cpp b/src/slic3r/GUI/Widgets/StateHandler.cpp index eb3d3be71e0..7b2e4cf6e8f 100644 --- a/src/slic3r/GUI/Widgets/StateHandler.cpp +++ b/src/slic3r/GUI/Widgets/StateHandler.cpp @@ -1,4 +1,5 @@ #include "StateHandler.hpp" +#include wxDEFINE_EVENT(EVT_ENABLE_CHANGED, wxCommandEvent); diff --git a/src/slic3r/GUI/Widgets/StateHandler.hpp b/src/slic3r/GUI/Widgets/StateHandler.hpp index c231b8f63f3..a0af2cc2857 100644 --- a/src/slic3r/GUI/Widgets/StateHandler.hpp +++ b/src/slic3r/GUI/Widgets/StateHandler.hpp @@ -1,6 +1,7 @@ #ifndef slic3r_GUI_StateHandler_hpp_ #define slic3r_GUI_StateHandler_hpp_ +#include #include #include "StateColor.hpp" diff --git a/src/slic3r/GUI/Widgets/StaticBox.cpp b/src/slic3r/GUI/Widgets/StaticBox.cpp index 00855eddf9f..6eae5b3d6c1 100644 --- a/src/slic3r/GUI/Widgets/StaticBox.cpp +++ b/src/slic3r/GUI/Widgets/StaticBox.cpp @@ -1,5 +1,6 @@ #include "StaticBox.hpp" #include "../GUI.hpp" +#include #include BEGIN_EVENT_TABLE(StaticBox, wxWindow) diff --git a/src/slic3r/GUI/Widgets/StaticLine.cpp b/src/slic3r/GUI/Widgets/StaticLine.cpp index d9b74f0ade3..3dd564c02b4 100644 --- a/src/slic3r/GUI/Widgets/StaticLine.cpp +++ b/src/slic3r/GUI/Widgets/StaticLine.cpp @@ -2,6 +2,7 @@ #include "Label.hpp" #include "StateColor.hpp" +#include #include BEGIN_EVENT_TABLE(StaticLine, wxWindow) diff --git a/src/slic3r/GUI/Widgets/StepCtrl.cpp b/src/slic3r/GUI/Widgets/StepCtrl.cpp index dfd38b14065..73a3e80dd31 100644 --- a/src/slic3r/GUI/Widgets/StepCtrl.cpp +++ b/src/slic3r/GUI/Widgets/StepCtrl.cpp @@ -1,6 +1,9 @@ #include "StepCtrl.hpp" #include "Label.hpp" +#include +#include + wxDEFINE_EVENT( EVT_STEP_CHANGING, wxCommandEvent ); wxDEFINE_EVENT( EVT_STEP_CHANGED, wxCommandEvent ); diff --git a/src/slic3r/GUI/Widgets/SwitchButton.cpp b/src/slic3r/GUI/Widgets/SwitchButton.cpp index e3b7a5fc829..f362221cf99 100644 --- a/src/slic3r/GUI/Widgets/SwitchButton.cpp +++ b/src/slic3r/GUI/Widgets/SwitchButton.cpp @@ -5,6 +5,8 @@ #include "../wxExtensions.hpp" #include "../Utils/MacDarkMode.hpp" +#include +#include #include SwitchButton::SwitchButton(wxWindow* parent, wxWindowID id) diff --git a/src/slic3r/GUI/Widgets/TabCtrl.cpp b/src/slic3r/GUI/Widgets/TabCtrl.cpp index 4600014ba3c..36778f68165 100644 --- a/src/slic3r/GUI/Widgets/TabCtrl.cpp +++ b/src/slic3r/GUI/Widgets/TabCtrl.cpp @@ -1,5 +1,7 @@ #include "TabCtrl.hpp" +#include + wxDEFINE_EVENT( wxEVT_TAB_SEL_CHANGING, wxCommandEvent ); wxDEFINE_EVENT( wxEVT_TAB_SEL_CHANGED, wxCommandEvent ); diff --git a/src/slic3r/GUI/Widgets/TempInput.hpp b/src/slic3r/GUI/Widgets/TempInput.hpp index 7829b10824f..09d89a72420 100644 --- a/src/slic3r/GUI/Widgets/TempInput.hpp +++ b/src/slic3r/GUI/Widgets/TempInput.hpp @@ -3,6 +3,7 @@ #include "../wxExtensions.hpp" #include +#include #include "StaticBox.hpp" wxDECLARE_EVENT(wxCUSTOMEVT_SET_TEMP_FINISH, wxCommandEvent); diff --git a/src/slic3r/GUI/Widgets/TextInput.cpp b/src/slic3r/GUI/Widgets/TextInput.cpp index 5cda9cbf04b..f8fb92939fd 100644 --- a/src/slic3r/GUI/Widgets/TextInput.cpp +++ b/src/slic3r/GUI/Widgets/TextInput.cpp @@ -3,6 +3,7 @@ #include "TextCtrl.h" #include "slic3r/GUI/Widgets/Label.hpp" +#include #include BEGIN_EVENT_TABLE(TextInput, wxPanel) diff --git a/src/slic3r/GUI/Widgets/WebView.cpp b/src/slic3r/GUI/Widgets/WebView.cpp index 5cb6eb4503a..11f431c308a 100644 --- a/src/slic3r/GUI/Widgets/WebView.cpp +++ b/src/slic3r/GUI/Widgets/WebView.cpp @@ -2,6 +2,8 @@ #include "slic3r/GUI/GUI_App.hpp" #include "slic3r/Utils/MacDarkMode.hpp" +#include + #include #include #if wxUSE_WEBVIEW_EDGE diff --git a/src/slic3r/GUI/WipeTowerDialog.cpp b/src/slic3r/GUI/WipeTowerDialog.cpp index eb5ea701ff7..8df5270a4c1 100644 --- a/src/slic3r/GUI/WipeTowerDialog.cpp +++ b/src/slic3r/GUI/WipeTowerDialog.cpp @@ -13,8 +13,6 @@ #include "MainFrame.hpp" #include "libslic3r/Config.hpp" -#include - using namespace Slic3r; using namespace Slic3r::GUI; diff --git a/src/slic3r/GUI/WipeTowerDialog.hpp b/src/slic3r/GUI/WipeTowerDialog.hpp index 71548eea3ba..ac58cf74f0c 100644 --- a/src/slic3r/GUI/WipeTowerDialog.hpp +++ b/src/slic3r/GUI/WipeTowerDialog.hpp @@ -3,6 +3,7 @@ #include "GUI_Utils.hpp" +#include #include #include #include @@ -127,4 +128,4 @@ class WipingDialog : public Slic3r::GUI::DPIDialog std::unordered_map m_button_list; }; -#endif // _WIPE_TOWER_DIALOG_H_ \ No newline at end of file +#endif // _WIPE_TOWER_DIALOG_H_ diff --git a/src/slic3r/GUI/wxExtensions.hpp b/src/slic3r/GUI/wxExtensions.hpp index 3859fb26f05..f388b52a60c 100644 --- a/src/slic3r/GUI/wxExtensions.hpp +++ b/src/slic3r/GUI/wxExtensions.hpp @@ -12,6 +12,7 @@ #include #include #include +#include #include #include diff --git a/src/slic3r/Utils/ColorSpaceConvert.cpp b/src/slic3r/Utils/ColorSpaceConvert.cpp index b0292a5153f..2634d1c4c1d 100644 --- a/src/slic3r/Utils/ColorSpaceConvert.cpp +++ b/src/slic3r/Utils/ColorSpaceConvert.cpp @@ -1,6 +1,7 @@ #include "ColorSpaceConvert.hpp" #include +#include const static float param_13 = 1.0f / 3.0f; const static float param_16116 = 16.0f / 116.0f; diff --git a/src/slic3r/Utils/ColorSpaceConvert.hpp b/src/slic3r/Utils/ColorSpaceConvert.hpp index 4f05379f084..9c3a659a0af 100644 --- a/src/slic3r/Utils/ColorSpaceConvert.hpp +++ b/src/slic3r/Utils/ColorSpaceConvert.hpp @@ -1,6 +1,8 @@ #ifndef slic3r_Utils_ColorSpaceConvert_hpp_ #define slic3r_Utils_ColorSpaceConvert_hpp_ +#include + std::tuple rgb_to_yuv(float r, float g, float b); double PivotRGB(double n); double PivotXYZ(double n); diff --git a/src/slic3r/Utils/FileHelp.cpp b/src/slic3r/Utils/FileHelp.cpp index c272112c732..5189635d7b0 100644 --- a/src/slic3r/Utils/FileHelp.cpp +++ b/src/slic3r/Utils/FileHelp.cpp @@ -1,5 +1,6 @@ #include "FileHelp.hpp" #include +#include #include namespace Slic3r { namespace Utils { @@ -23,4 +24,4 @@ void slash_to_back_slash(std::string &file_path) { file_path = std::regex_replace(file_path, regex, "/"); } -}} // namespace Slic3r::Utils \ No newline at end of file +}} // namespace Slic3r::Utils diff --git a/src/slic3r/Utils/Http.hpp b/src/slic3r/Utils/Http.hpp index e8e4f41c042..c7f7ac2cd95 100644 --- a/src/slic3r/Utils/Http.hpp +++ b/src/slic3r/Utils/Http.hpp @@ -1,11 +1,15 @@ #ifndef __Http_hpp__ #define __Http_hpp__ +#include #include #include #include #include +#include "libslic3r/Exception.hpp" +#include "libslic3r_version.h" + #define MAX_SIZE_TO_FILE 3*1024 namespace Slic3r { diff --git a/src/slic3r/Utils/PresetUpdater.cpp b/src/slic3r/Utils/PresetUpdater.cpp index e09bcbe227a..3ec79d17f21 100644 --- a/src/slic3r/Utils/PresetUpdater.cpp +++ b/src/slic3r/Utils/PresetUpdater.cpp @@ -818,9 +818,9 @@ void PresetUpdater::priv::sync_tooltip(std::string http_url, std::string languag fs::path cache_root = fs::path(data_dir()) / "resources/tooltip"; try { auto vf = cache_root / "common" / "version"; - if (fs::exists(vf)) load_string_file(vf, common_version); + if (fs::exists(vf)) Slic3r::load_string_file(vf, common_version); vf = cache_root / language / "version"; - if (fs::exists(vf)) load_string_file(vf, language_version); + if (fs::exists(vf)) Slic3r::load_string_file(vf, language_version); } catch (...) {} std::map resources { @@ -996,11 +996,11 @@ void PresetUpdater::priv::sync_printer_config(std::string http_url) auto cache_folder = data_dir_path / "ota" / "printers"; try { - load_string_file(config_folder / "version.txt", curr_version); + Slic3r::load_string_file(config_folder / "version.txt", curr_version); boost::algorithm::trim(curr_version); } catch (...) {} try { - load_string_file(cache_folder / "version.txt", cached_version); + Slic3r::load_string_file(cache_folder / "version.txt", cached_version); boost::algorithm::trim(cached_version); } catch (...) {} if (!cached_version.empty()) { @@ -1034,7 +1034,7 @@ void PresetUpdater::priv::sync_printer_config(std::string http_url) bool result = false; try { - load_string_file(cache_folder / "version.txt", cached_version); + Slic3r::load_string_file(cache_folder / "version.txt", cached_version); boost::algorithm::trim(cached_version); result = true; } catch (...) {} @@ -1137,11 +1137,11 @@ Updates PresetUpdater::priv::get_printer_config_updates(bool update) const std::string curr_version; std::string resc_version; try { - load_string_file(resc_folder / "version.txt", resc_version); + Slic3r::load_string_file(resc_folder / "version.txt", resc_version); boost::algorithm::trim(resc_version); } catch (...) {} try { - load_string_file(config_folder / "version.txt", curr_version); + Slic3r::load_string_file(config_folder / "version.txt", curr_version); boost::algorithm::trim(curr_version); } catch (...) {} diff --git a/src/slic3r/Utils/json_diff.cpp b/src/slic3r/Utils/json_diff.cpp index d82ef213420..171a44c63da 100644 --- a/src/slic3r/Utils/json_diff.cpp +++ b/src/slic3r/Utils/json_diff.cpp @@ -12,6 +12,10 @@ #include +#include +#include +#include + using namespace std; using json = nlohmann::json;