A *lot* of import fixes for flatpak (#3909)

* A *lot* of import fixes for flatpak

Aside, thank you @hadess for the majority of these fixes. You are the
base point for a lot of issues fixed during the creation of this
flatpak.

* Use slic3r::load_string_file

Boost 1.84 removed `boost::fs::load_string_file` so use the func located
in Utils.hpp
This commit is contained in:
Aidan 2024-01-31 05:23:29 -06:00 committed by GitHub
parent 4110ecc968
commit 951fc8e98a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
114 changed files with 214 additions and 45 deletions

View file

@ -4,6 +4,8 @@
#include "GUI_App.hpp"
#include "libslic3r/Preset.hpp"
#include "I18N.hpp"
#include <boost/log/trivial.hpp>
#include <wx/colordlg.h>
#include <wx/dcgraph.h>
#include "CalibUtils.hpp"

View file

@ -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"

View file

@ -21,6 +21,8 @@
#include <wx/arrstr.h>
#include <wx/tglbtn.h>
#include <boost/log/trivial.hpp>
#include "wxExtensions.hpp"
#include "GUI_App.hpp"
#include "GUI_ObjectList.hpp"

View file

@ -3,6 +3,11 @@
#include "libslic3r/Model.hpp"
#include "libslic3r/Format/bbs_3mf.hpp"
#include <boost/log/trivial.hpp>
#include <wx/log.h>
const static std::array<wxString, 4> s_default_folders = {
_L("Model Pictures"),
_L("Bill of Materials"),

View file

@ -8,7 +8,7 @@
#include "I18N.hpp"
#include <filesystem>
#include <boost/filesystem.hpp>
class AuxiliaryModelNode;
WX_DEFINE_ARRAY_PTR(AuxiliaryModelNode*, AuxiliaryModelNodePtrArray);

View file

@ -4,6 +4,8 @@
#include "libslic3r/Utils.hpp"
#include <boost/property_tree/ptree.hpp>
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
} // namespace Slic3r

View file

@ -2,6 +2,7 @@
#define BBLSTATUSBAR_HPP
#include <wx/panel.h>
#include <wx/sizer.h>
#include <wx/stattext.h>
#include <memory>

View file

@ -12,7 +12,7 @@
#include "I18N.hpp"
#include <iostream>
#include <regex>
namespace Slic3r {

View file

@ -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 <boost/log/trivial.hpp>
#define TOPBAR_ICON_SIZE 18
#define TOPBAR_TITLE_WIDTH 300

View file

@ -5,6 +5,7 @@
#include <wx/sizer.h>
#include <wx/statbox.h>
#include "wx/evtloop.h"
#include <wx/mstream.h>
#include <wx/tokenzr.h>
#include <wx/richmsgdlg.h>
#include <wx/richtext/richtextctrl.h>

View file

@ -5,6 +5,7 @@
#include "GUI.hpp"
#include "GUI_Utils.hpp"
#include <boost/nowide/cstdio.hpp>
#include <boost/filesystem.hpp>
#ifdef __WXGTK2__

View file

@ -7,6 +7,7 @@
#include <wx/panel.h>
#include <wx/bitmap.h>
#include <wx/image.h>
#include <wx/timer.h>
#include <wx/sizer.h>
#include <wx/gbsizer.h>
#include <wx/webrequest.h>

View file

@ -6,6 +6,8 @@
#include <openssl/md5.h>
#include <openssl/evp.h>
#include <wx/dcgraph.h>
#include <wx/tooltip.h>
#include <boost/nowide/cstdio.hpp>
#include "libslic3r/PresetBundle.hpp"
#include "I18N.hpp"
#include "GUI_App.hpp"

View file

@ -6,6 +6,7 @@
#include <string>
#include <memory>
#include <chrono>
#include <mutex>
#include <boost/thread.hpp>
#include <boost/nowide/fstream.hpp>
#include "nlohmann/json.hpp"

View file

@ -3,6 +3,7 @@
#include "MsgDialog.hpp"
#include "libslic3r/Preset.hpp"
#include "I18N.hpp"
#include <boost/log/trivial.hpp>
#include <wx/dcgraph.h>
namespace Slic3r { namespace GUI {

View file

@ -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"

View file

@ -33,6 +33,7 @@
#include "libslic3r/Utils.hpp"
#include "GUI_App.hpp"
#include <boost/log/trivial.hpp>
#include <wx/dcgraph.h>
namespace Slic3r {
namespace GUI {

View file

@ -6,6 +6,9 @@
#include <vector>
#include <thread>
#include <wx/colour.h>
#include <wx/font.h>
class wxImage;
namespace Slic3r {

View file

@ -28,6 +28,8 @@
#include <boost/lexical_cast.hpp>
#include <boost/log/trivial.hpp>
#include <boost/nowide/convert.hpp>
#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/json_parser.hpp>
#include <wx/stdpaths.h>
#include <wx/imagpng.h>

View file

@ -1,6 +1,13 @@
#ifndef slic3r_GUI_App_hpp_
#define slic3r_GUI_App_hpp_
#include <wx/app.h>
#include <wx/colour.h>
#include <wx/font.h>
#include <wx/string.h>
#include <wx/snglinst.h>
#include <wx/msgdlg.h>
#include <memory>
#include <string>
#include "ImGuiWrapper.hpp"
@ -17,13 +24,6 @@
#include "slic3r/GUI/HttpServer.hpp"
#include "../Utils/PrintHost.hpp"
#include <wx/app.h>
#include <wx/colour.h>
#include <wx/font.h>
#include <wx/string.h>
#include <wx/snglinst.h>
#include <wx/msgdlg.h>
#include <mutex>
#include <stack>

View file

@ -3,6 +3,7 @@
#include "imgui/imgui.h"
#include "libslic3r/Color.hpp"
#include <array>
enum RenderCol_ {
RenderCol_3D_Background = 0,

View file

@ -1,4 +1,5 @@
#include "wx/clipbrd.h"
#include "wx/display.h"
#include "SelectMachine.hpp"
#include "I18N.hpp"

View file

@ -15,6 +15,8 @@
#include <cereal/archives/binary.hpp>
#include <wx/event.h>
#define ENABLE_FIXED_GRABBER 1
class wxWindow;

View file

@ -15,9 +15,9 @@
#include "slic3r/GUI/GUI.hpp"
#include "slic3r/Utils/UndoRedo.hpp"
#include <GL/glew.h>
#include <boost/log/trivial.hpp>
namespace Slic3r::GUI {

View file

@ -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 <numeric>
#include <boost/log/trivial.hpp>
#include <GL/glew.h>
#ifndef IMGUI_DEFINE_MATH_OPERATORS

View file

@ -1,5 +1,6 @@
#include "HMS.hpp"
#include <boost/log/trivial.hpp>
namespace Slic3r {

View file

@ -1,6 +1,7 @@
#ifndef slic3r_Http_App_hpp_
#define slic3r_Http_App_hpp_
#include <iostream>
#include <mutex>
#include <stack>
@ -12,7 +13,6 @@
#include <string>
#include <memory>
using namespace boost;
using namespace boost::system;
using namespace boost::asio;
@ -73,21 +73,21 @@ public:
class session
{
asio::streambuf buff;
boost::asio::streambuf buff;
http_headers headers;
static void read_body(std::shared_ptr<session> pThis)
{
int nbuffer = 1000;
std::shared_ptr<std::vector<char>> bufptr = std::make_shared<std::vector<char>>(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<session> 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<std::string> str = std::make_shared<std::string>(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<session> 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 };

View file

@ -3,6 +3,7 @@
#include "TickCode.hpp"
#include <imgui/imgui.h>
#include <wx/slider.h>
#include <set>

View file

@ -1,6 +1,9 @@
#include "IconManager.hpp"
#include <cmath>
#include <numeric>
#include <boost/log/trivial.hpp>
#include <boost/filesystem.hpp>
#include <boost/nowide/cstdio.hpp>
#include "nanosvg/nanosvg.h"
#include "nanosvg/nanosvgrast.h"
#include "libslic3r/Utils.hpp" // ScopeGuard

View file

@ -7,6 +7,7 @@
#include <string>
#include <map>
#include <cstdlib>
#include <imgui/imgui.h>

View file

@ -8,6 +8,8 @@
#include <wx/dcgraph.h>
#include <boost/log/trivial.hpp>
wxDEFINE_EVENT(EVT_ITEM_ACTION, wxCommandEvent);
BEGIN_EVENT_TABLE(Slic3r::GUI::ImageGrid, wxPanel)

View file

@ -9,6 +9,7 @@
#define ImageGrid_h
#include <wx/window.h>
#include <wx/timer.h>
#include <wx/arrstr.h>
#include <boost/shared_ptr.hpp>

View file

@ -9,6 +9,8 @@
#include <exception>
#include <future>
#include <wx/window.h>
#include "libslic3r/libslic3r.h"
#include "ProgressIndicator.hpp"

View file

@ -3,6 +3,7 @@
#include <boost/filesystem/path.hpp>
#include <boost/filesystem/operations.hpp>
#include "libslic3r/PrintConfig.hpp"
#include "Job.hpp"
namespace fs = boost::filesystem;

View file

@ -7,6 +7,7 @@
#include <string>
#include <functional>
#include <wx/string.h>
namespace Slic3r {

View file

@ -6,6 +6,7 @@
#define SLAIMPORTJOB_HPP
#include "Job.hpp"
#include "libslic3r/Point.hpp"
namespace Slic3r { namespace GUI {

View file

@ -1,8 +1,11 @@
#ifndef __UpgradeNetworkJob_HPP__
#define __UpgradeNetworkJob_HPP__
#include <boost/filesystem.hpp>
#include <boost/log/trivial.hpp>
#include <functional>
#include "Job.hpp"
#include <wx/window.h>
namespace fs = boost::filesystem;

View file

@ -27,6 +27,7 @@
#include <boost/algorithm/string/predicate.hpp>
#include <boost/log/trivial.hpp>
#include <boost/property_tree/ptree.hpp>
#include "libslic3r/Print.hpp"
#include "libslic3r/Polygon.hpp"

View file

@ -26,6 +26,8 @@
#include "Widgets/SideButton.hpp"
#include "Widgets/SideMenuPopup.hpp"
#include <boost/property_tree/ptree_fwd.hpp>
// BBS
#include "BBLTopbar.hpp"
#include "PrinterWebView.hpp"

View file

@ -7,6 +7,8 @@
#include "libslic3r/Utils.hpp"
#include "I18N.hpp"
#include <wx/display.h>
namespace fs = boost::filesystem;
namespace Slic3r { namespace GUI {

View file

@ -10,7 +10,7 @@
#include "GUI_Utils.hpp"
#include "wxExtensions.hpp"
#include <set>
#include <wx/frame.h>
class Button;

View file

@ -8,6 +8,9 @@
#include "MsgDialog.hpp"
#include "DownloadProgressDialog.hpp"
#include <boost/lexical_cast.hpp>
#include <boost/log/trivial.hpp>
#include <boost/nowide/cstdio.hpp>
#include <boost/nowide/utf8_codecvt.hpp>
#undef pid_t
#include <boost/process.hpp>
@ -18,6 +21,8 @@
#include <sys/shm.h>
#endif
#include <wx/clipbrd.h>
namespace Slic3r {
namespace GUI {

View file

@ -2,6 +2,7 @@
#define slic3r_MonitorPage_hpp_
#include <wx/panel.h>
#include <wx/sizer.h>
namespace Slic3r {
namespace GUI {

View file

@ -8,7 +8,7 @@
#include "slic3r/Utils/Http.hpp"
#include "libslic3r/AppConfig.hpp"
#include <boost/asio/ip/address.hpp>
#include <boost/log/trivial.hpp>
namespace Slic3r {
namespace GUI {

View file

@ -4,6 +4,7 @@
//#ifdef _WIN32
#include <wx/bookctrl.h>
#include <wx/sizer.h>
class ModeSizer;
class ScalableButton;

View file

@ -5,6 +5,7 @@
#ifndef slic3r_GUI_ObjectDataViewModel_hpp_
#define slic3r_GUI_ObjectDataViewModel_hpp_
#include <boost/log/trivial.hpp>
#include <wx/dataview.h>
#include <vector>
#include <map>

View file

@ -20,6 +20,8 @@
#include <wx/image.h>
#include <wx/icon.h>
#include <wx/button.h>
#include <wx/timer.h>
#include <wx/wupdlock.h>
#include <wx/sizer.h>
#include <wx/statline.h>
#include <wx/scrolwin.h>

View file

@ -12,6 +12,7 @@
#include <boost/filesystem/operations.hpp>
#include <boost/log/trivial.hpp>
#include <boost/nowide/convert.hpp>
#include <boost/nowide/cstdio.hpp>
#include <boost/algorithm/string/predicate.hpp>
#include "libslic3r/libslic3r.h"

View file

@ -4,6 +4,7 @@
//#include <wx/bmpcbox.h>
#include <wx/gdicmn.h>
#include <wx/clrpicker.h>
#include <wx/colourdata.h>
#include "libslic3r/Preset.hpp"
#include "wxExtensions.hpp"

View file

@ -7,10 +7,14 @@
#include "../../Utils/NetworkAgent.hpp"
#include "../BitmapCache.hpp"
#include <boost/endian/conversion.hpp>
#include <boost/log/trivial.hpp>
#include <boost/algorithm/hex.hpp>
#include <boost/uuid/detail/md5.hpp>
#include <boost/regex.hpp>
#include <wx/mstream.h>
#include "nlohmann/json.hpp"
#include <cstring>

View file

@ -4,6 +4,7 @@
#define BAMBU_DYNAMIC
#include "BambuTunnel.h"
#include <wx/bitmap.h>
#include <wx/event.h>
#include <boost/thread.hpp>

View file

@ -6,6 +6,7 @@
#include "Widgets/Label.hpp"
#include "Widgets/WebView.hpp"
#include <wx/webview.h>
#include <wx/progdlg.h>
#include <wx/simplebook.h>
namespace Slic3r { namespace GUI {
@ -53,4 +54,4 @@ public:
}} // namespace Slic3r::GUI
#endif
#endif

View file

@ -4,6 +4,8 @@
#include "libslic3r/Model.hpp"
#include "libslic3r/Format/bbs_3mf.hpp"
#include <boost/log/trivial.hpp>
#include <wx/app.h>
#include <wx/button.h>
#include <wx/scrolwin.h>

View file

@ -4,6 +4,7 @@
#include <vector>
#include <string>
#include <boost/algorithm/string.hpp>
#include <boost/log/trivial.hpp>
#include <wx/sizer.h>
#include <wx/stattext.h>

View file

@ -20,6 +20,7 @@
#include <wx/progdlg.h>
#include <wx/clipbrd.h>
#include <wx/dcgraph.h>
#include <wx/mstream.h>
#include <miniz.h>
#include <algorithm>
#include "Plater.hpp"

View file

@ -1,5 +1,6 @@
#include "SliceInfoPanel.hpp"
#include <boost/log/trivial.hpp>
#include "I18N.hpp"
#include "Widgets/Label.hpp"
#include "libslic3r/Utils.hpp"
@ -344,4 +345,4 @@ void SliceInfoPanel::msw_rescale()
}
}
}

View file

@ -18,6 +18,8 @@
#include "RecenterDialog.hpp"
#include "CalibUtils.hpp"
#include <slic3r/GUI/Widgets/ProgressDialog.hpp>
#include <wx/display.h>
#include <wx/mstream.h>
#include <wx/sstream.h>
#include <wx/zstream.h>

View file

@ -1,6 +1,7 @@
#include "TabButton.hpp"
#include "Widgets/Label.hpp"
#include <wx/dcclient.h>
#include <wx/dcgraph.h>
BEGIN_EVENT_TABLE(TabButton, StaticBox)

View file

@ -24,6 +24,7 @@
#include "wx/fs_mem.h"
#include "wx/stdpaths.h"
#include <wx/frame.h>
#include "wx/timer.h"
#include <wx/tbarbase.h>
#include "wx/textctrl.h"

View file

@ -7,6 +7,9 @@
#include "libslic3r_version.h"
#include "../Utils/Http.hpp"
#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/json_parser.hpp>
#include <wx/sizer.h>
#include <wx/toolbar.h>
#include <wx/textdlg.h>

View file

@ -4,6 +4,8 @@
#include "../I18N.hpp"
#include "../GUI_App.hpp"
#include <boost/log/trivial.hpp>
#include <wx/simplebook.h>
#include <wx/dcgraph.h>
#include "CalibUtils.hpp"

View file

@ -1,6 +1,8 @@
#include "AxisCtrlButton.hpp"
#include "Label.hpp"
#include "libslic3r/libslic3r.h"
#include <wx/dcclient.h>
#include <wx/dcgraph.h>
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);
}
}

View file

@ -1,6 +1,8 @@
#include "DropDown.hpp"
#include "Label.hpp"
#include <wx/display.h>
#include <wx/dcbuffer.h>
#include <wx/dcgraph.h>
#ifdef __WXGTK__

View file

@ -1,6 +1,7 @@
#ifndef slic3r_GUI_DropDown_hpp_
#define slic3r_GUI_DropDown_hpp_
#include <boost/date_time/posix_time/posix_time.hpp>
#include <wx/stattext.h>
#include "../wxExtensions.hpp"
#include "StateHandler.hpp"

View file

@ -1,4 +1,5 @@
#include "ErrorMsgStaticText.hpp"
#include <wx/dcclient.h>
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);
}
}

View file

@ -2,6 +2,7 @@
#ifndef _WX_ERRORMSGSTATTEXT_H_
#define _WX_ERRORMSGSTATTEXT_H_
#include <wx/panel.h>
#include "wx/stattext.h"
class WXDLLIMPEXP_CORE ErrorMsgStaticText : public wxPanel
@ -19,4 +20,4 @@ public:
void SetLabel(wxString msg){m_msg = msg;};
};
#endif
#endif

View file

@ -3,6 +3,7 @@
#include "StaticBox.hpp"
#include "../wxExtensions.hpp"
#include <wx/dcclient.h>
#include <wx/dcgraph.h>
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);
}
}

View file

@ -2,6 +2,10 @@
#include "Label.hpp"
#include "StaticBox.hpp"
#include <wx/intl.h> // For wxLocale
#include <wx/dcclient.h>
#include <wx/settings.h>
#include <boost/log/trivial.hpp>
wxFont Label::sysFont(int size, bool bold)
{

View file

@ -1,5 +1,6 @@
#include "ProgressBar.hpp"
#include "../I18N.hpp"
#include <wx/dcclient.h>
#include <wx/dcgraph.h>
#include "Label.hpp"

View file

@ -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"

View file

@ -1,6 +1,7 @@
#include "RoundedRectangle.hpp"
#include "../wxExtensions.hpp"
#include <wx/dcgraph.h>
#include <wx/dcclient.h>
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);
}
}
}

View file

@ -1,6 +1,7 @@
#include "SideButton.hpp"
#include "Label.hpp"
#include <wx/dcclient.h>
#include <wx/dcgraph.h>
BEGIN_EVENT_TABLE(SideButton, wxPanel)

View file

@ -1,6 +1,7 @@
#include "SideMenuPopup.hpp"
#include "Label.hpp"
#include <wx/display.h>
#include <wx/dcgraph.h>
#include "../GUI_App.hpp"

View file

@ -1,7 +1,10 @@
#ifndef slic3r_GUI_SpinInput_hpp_
#define slic3r_GUI_SpinInput_hpp_
#include <wx/dcclient.h>
#include <wx/timer.h>
#include <wx/textctrl.h>
#include <wx/valtext.h>
#include "StaticBox.hpp"
class Button;

View file

@ -1,4 +1,5 @@
#include "StateHandler.hpp"
#include <wx/window.h>
wxDEFINE_EVENT(EVT_ENABLE_CHANGED, wxCommandEvent);

View file

@ -1,6 +1,7 @@
#ifndef slic3r_GUI_StateHandler_hpp_
#define slic3r_GUI_StateHandler_hpp_
#include <memory>
#include <wx/event.h>
#include "StateColor.hpp"

View file

@ -1,5 +1,6 @@
#include "StaticBox.hpp"
#include "../GUI.hpp"
#include <wx/dcclient.h>
#include <wx/dcgraph.h>
BEGIN_EVENT_TABLE(StaticBox, wxWindow)

View file

@ -2,6 +2,7 @@
#include "Label.hpp"
#include "StateColor.hpp"
#include <wx/dcclient.h>
#include <wx/dcgraph.h>
BEGIN_EVENT_TABLE(StaticLine, wxWindow)

View file

@ -1,6 +1,9 @@
#include "StepCtrl.hpp"
#include "Label.hpp"
#include <wx/dc.h>
#include <wx/pen.h>
wxDEFINE_EVENT( EVT_STEP_CHANGING, wxCommandEvent );
wxDEFINE_EVENT( EVT_STEP_CHANGED, wxCommandEvent );

View file

@ -5,6 +5,8 @@
#include "../wxExtensions.hpp"
#include "../Utils/MacDarkMode.hpp"
#include <wx/dcmemory.h>
#include <wx/dcclient.h>
#include <wx/dcgraph.h>
SwitchButton::SwitchButton(wxWindow* parent, wxWindowID id)

View file

@ -1,5 +1,7 @@
#include "TabCtrl.hpp"
#include <wx/dc.h>
wxDEFINE_EVENT( wxEVT_TAB_SEL_CHANGING, wxCommandEvent );
wxDEFINE_EVENT( wxEVT_TAB_SEL_CHANGED, wxCommandEvent );

View file

@ -3,6 +3,7 @@
#include "../wxExtensions.hpp"
#include <wx/textctrl.h>
#include <wx/stattext.h>
#include "StaticBox.hpp"
wxDECLARE_EVENT(wxCUSTOMEVT_SET_TEMP_FINISH, wxCommandEvent);

View file

@ -3,6 +3,7 @@
#include "TextCtrl.h"
#include "slic3r/GUI/Widgets/Label.hpp"
#include <wx/dcclient.h>
#include <wx/dcgraph.h>
BEGIN_EVENT_TABLE(TextInput, wxPanel)

View file

@ -2,6 +2,8 @@
#include "slic3r/GUI/GUI_App.hpp"
#include "slic3r/Utils/MacDarkMode.hpp"
#include <boost/log/trivial.hpp>
#include <wx/webviewarchivehandler.h>
#include <wx/webviewfshandler.h>
#if wxUSE_WEBVIEW_EDGE

View file

@ -13,8 +13,6 @@
#include "MainFrame.hpp"
#include "libslic3r/Config.hpp"
#include <wx/sizer.h>
using namespace Slic3r;
using namespace Slic3r::GUI;

View file

@ -3,6 +3,7 @@
#include "GUI_Utils.hpp"
#include <wx/sizer.h>
#include <wx/spinctrl.h>
#include <wx/stattext.h>
#include <wx/textctrl.h>
@ -127,4 +128,4 @@ private:
std::unordered_map<int, Button *> m_button_list;
};
#endif // _WIPE_TOWER_DIALOG_H_
#endif // _WIPE_TOWER_DIALOG_H_

View file

@ -12,6 +12,7 @@
#include <wx/popupwin.h>
#include <wx/spinctrl.h>
#include <wx/artprov.h>
#include <wx/scrolwin.h>
#include <vector>
#include <functional>

View file

@ -1,6 +1,7 @@
#include "ColorSpaceConvert.hpp"
#include <algorithm>
#include <cmath>
const static float param_13 = 1.0f / 3.0f;
const static float param_16116 = 16.0f / 116.0f;

View file

@ -1,6 +1,8 @@
#ifndef slic3r_Utils_ColorSpaceConvert_hpp_
#define slic3r_Utils_ColorSpaceConvert_hpp_
#include <tuple>
std::tuple<int, int, int> rgb_to_yuv(float r, float g, float b);
double PivotRGB(double n);
double PivotXYZ(double n);

View file

@ -1,5 +1,6 @@
#include "FileHelp.hpp"
#include <boost/filesystem.hpp>
#include <boost/log/trivial.hpp>
#include <regex>
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
}} // namespace Slic3r::Utils

View file

@ -1,11 +1,15 @@
#ifndef __Http_hpp__
#define __Http_hpp__
#include <map>
#include <memory>
#include <string>
#include <functional>
#include <boost/filesystem/path.hpp>
#include "libslic3r/Exception.hpp"
#include "libslic3r_version.h"
#define MAX_SIZE_TO_FILE 3*1024
namespace Slic3r {

View file

@ -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<std::string, Resource> 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 (...) {}

View file

@ -12,6 +12,10 @@
#include <libslic3r/Utils.hpp>
#include <boost/log/trivial.hpp>
#include <boost/nowide/iostream.hpp>
#include <boost/nowide/fstream.hpp>
using namespace std;
using json = nlohmann::json;