mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-08-01 15:22:21 +00:00
ENH: add confirm dialog for cancel-print button
Change-Id: I0a97c7a3122b1b5dd0b306212292e8c51b9acd9b
This commit is contained in:
45
src/slic3r/GUI/ConfirmHintDialog.hpp
Normal file
45
src/slic3r/GUI/ConfirmHintDialog.hpp
Normal 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
|
||||
Reference in New Issue
Block a user