ENH: add confirm dialog for cancel-print button

Change-Id: I0a97c7a3122b1b5dd0b306212292e8c51b9acd9b
This commit is contained in:
tao.jin
2022-09-22 15:06:34 +08:00
committed by Lane.Wei
parent 1b4486cc5d
commit 8386b48554
5 changed files with 40 additions and 33 deletions

View File

@@ -0,0 +1,45 @@
#ifndef slic3r_GUI_ConfirmHintDialog_hpp_
#define slic3r_GUI_ConfirmHintDialog_hpp_
#include "GUI_Utils.hpp"
#include <wx/statbmp.h>
#include "Widgets/Button.hpp"
#include <wx/stattext.h>
namespace Slic3r { namespace GUI {
wxDECLARE_EVENT(EVT_CONFIRM_HINT, wxCommandEvent);
class ConfirmHintDialog : public DPIDialog
{
private:
wxStaticText* m_staticText_hint;
Button* m_button_confirm;
Button* m_button_close;
wxStaticBitmap* m_bitmap_home;
ScalableBitmap m_home_bmp;
wxString firm_up_hint = "";
void OnPaint(wxPaintEvent& event);
void render(wxDC& dc);
void on_button_confirm(wxCommandEvent& event);
void on_button_close(wxCommandEvent& event);
void on_dpi_changed(const wxRect& suggested_rect) override;
public:
ConfirmHintDialog(wxWindow* parent,
wxWindowID id = wxID_ANY,
const wxString& title = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxCLOSE_BOX | wxCAPTION);
const wxColour text_color = wxColour(107, 107, 107);
void SetHint(const wxString &hint);
~ConfirmHintDialog();
};
}} // namespace Slic3r::GUI
#endif