mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 07:27:41 -06:00
NEW: check privacy update
Change-Id: I260fbc20cdddbdadd38f1470a2e7050ee1ed14cd Signed-off-by: Stone Li <stone.li@bambulab.com>
This commit is contained in:
parent
b1a310cf74
commit
240d106d58
10 changed files with 460 additions and 6 deletions
57
src/slic3r/GUI/PrivacyUpdateDialog.hpp
Normal file
57
src/slic3r/GUI/PrivacyUpdateDialog.hpp
Normal file
|
@ -0,0 +1,57 @@
|
|||
#ifndef slic3r_GUI_PrivacyUpdateDialog_hpp_
|
||||
#define slic3r_GUI_PrivacyUpdateDialog_hpp_
|
||||
|
||||
#include "GUI_Utils.hpp"
|
||||
#include "Widgets/Button.hpp"
|
||||
#include "Widgets/Label.hpp"
|
||||
#include "Widgets/WebView.hpp"
|
||||
#include <wx/webview.h>
|
||||
#include <wx/simplebook.h>
|
||||
|
||||
namespace Slic3r { namespace GUI {
|
||||
|
||||
wxDECLARE_EVENT(EVT_PRIVACY_UPDATE_CONFIRM, wxCommandEvent);
|
||||
wxDECLARE_EVENT(EVT_PRIVACY_UPDATE_CANCEL, wxCommandEvent);
|
||||
|
||||
class PrivacyUpdateDialog : public DPIDialog
|
||||
{
|
||||
public:
|
||||
enum ButtonStyle {
|
||||
ONLY_CONFIRM = 0,
|
||||
CONFIRM_AND_CANCEL = 1,
|
||||
MAX_STYLE_NUM = 2
|
||||
};
|
||||
PrivacyUpdateDialog(
|
||||
wxWindow* parent,
|
||||
wxWindowID id = wxID_ANY,
|
||||
const wxString& title = wxEmptyString,
|
||||
enum ButtonStyle btn_style = CONFIRM_AND_CANCEL,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxPD_APP_MODAL| wxCAPTION
|
||||
);
|
||||
wxWebView* CreateTipView(wxWindow* parent);
|
||||
void OnLoaded(wxWebViewEvent& event);
|
||||
void OnTitleChanged(wxWebViewEvent& event);
|
||||
void OnError(wxWebViewEvent& event);
|
||||
bool ShowReleaseNote(std::string content);
|
||||
void RunScript(std::string script);
|
||||
void set_text(std::string str) { m_mkdown_text = str; };
|
||||
void on_show();
|
||||
void on_hide();
|
||||
void update_btn_label(wxString ok_btn_text, wxString cancel_btn_text);
|
||||
void rescale();
|
||||
~PrivacyUpdateDialog();
|
||||
void on_dpi_changed(const wxRect& suggested_rect);
|
||||
|
||||
wxBoxSizer* m_sizer_main;
|
||||
wxWebView* m_vebview_release_note{ nullptr };
|
||||
Label* m_staticText_release_note{ nullptr };
|
||||
Button* m_button_ok;
|
||||
Button* m_button_cancel;
|
||||
std::string m_mkdown_text;
|
||||
};
|
||||
|
||||
}} // namespace Slic3r::GUI
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue