mirror of
https://github.com/QIDITECH/QIDISlicer.git
synced 2026-01-31 16:08:43 +03:00
PRUSA 2.7.0
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user