Files
OrcaSlicer-KX/src/slic3r/GUI/PrivacyUpdateDialog.hpp
yw4z 00ff06a5d3 Match button styles on whole UI and fixes for button class (#11233)
* init

* web buttons

* Bind Dialog & Fix states

* update

* update

* Update common.css

* objcolordialog

* privacy update dialog

* Update CaliHistoryDialog.cpp

* Update MultiMachineManagerPage.cpp

* Update AMSControl.cpp

* TipsDialog

* Update AMSMaterialsSetting.cpp

* extrusion calibration

* Update UpdateDialogs.cpp

* recenterdialog

* update

* Update Calibration.cpp

* update

* update

* update

* fix

* update

* ReleaseNote

* update

* update

* fix remember checkbox position

* add comments
2025-12-18 12:14:56 +00:00

58 lines
1.7 KiB
C++

#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/progdlg.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 VisibleButtons { // ORCA VisibleButtons instead ButtonStyle
ONLY_CONFIRM = 0,
CONFIRM_AND_CANCEL = 1,
MAX_STYLE_NUM = 2
};
PrivacyUpdateDialog(
wxWindow* parent,
wxWindowID id = wxID_ANY,
const wxString& title = wxEmptyString,
enum VisibleButtons btn_style = CONFIRM_AND_CANCEL, // ORCA VisibleButtons instead ButtonStyle
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxPD_APP_MODAL| wxCAPTION
);
wxWebView* CreateTipView(wxWindow* parent);
void OnNavigating(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;
std::string m_host_url;
};
}} // namespace Slic3r::GUI
#endif