PRUSA 2.7.0

This commit is contained in:
sunsets
2023-12-27 18:02:35 +08:00
parent b33112327f
commit 0a3c63dcb1
488 changed files with 92371 additions and 29443 deletions

View File

@@ -13,13 +13,20 @@
#include <wx/statline.h>
class wxBoxSizer;
class wxCheckBox;
class CheckBox;
class wxStaticBitmap;
namespace Slic3r {
namespace GUI {
struct HtmlContent
{
wxString msg{ wxEmptyString };
bool is_monospaced_font{ false };
bool is_marked_msg{ false };
std::function<void(const std::string&)> on_link_clicked{ nullptr };
};
// A message / query dialog with a bitmap on the left and any content on the right
// with buttons underneath.
struct MsgDialog : wxDialog
@@ -63,6 +70,7 @@ public:
// If monospaced_font is true, the error message is displayed using html <code><pre></pre></code> tags,
// so that the code formatting will be preserved. This is useful for reporting errors from the placeholder parser.
ErrorDialog(wxWindow *parent, const wxString &msg, bool courier_font);
ErrorDialog(wxWindow *parent, const wxString &msg, const std::function<void(const std::string&)>& on_link_clicked);
ErrorDialog(ErrorDialog &&) = delete;
ErrorDialog(const ErrorDialog &) = delete;
ErrorDialog &operator=(ErrorDialog &&) = delete;
@@ -70,7 +78,9 @@ public:
virtual ~ErrorDialog() = default;
private:
wxString msg;
void create(const HtmlContent& content, int icon_width);
HtmlContent m_content;
};
@@ -128,7 +138,7 @@ public:
// Generic rich message dialog, used intead of wxRichMessageDialog
class RichMessageDialog : public MsgDialog
{
wxCheckBox* m_checkBox{ nullptr };
CheckBox* m_checkBox{ nullptr };
wxString m_checkBoxText;
bool m_checkBoxValue{ false };
@@ -316,6 +326,7 @@ public:
InfoDialog&operator=(const InfoDialog&) = delete;
virtual ~InfoDialog() = default;
void set_caption(const wxString& caption) { this->SetTitle(caption); }
private:
wxString msg;
};