mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-06 07:11:10 +00:00
* Add Missing Includes Across src/slic3r/GUI Every GUI source and header now directly includes the headers declaring what it uses, rather than relying on the precompiled header or transitive includes. Generated with clang-tidy misc-include-cleaner, plus one hand edit making CalibrationPanel.hpp self-contained. * Drop the OS-Specific Includes Added Outside Their Platform Guards GLib, GTK, D-Bus and POSIX headers are only used inside platform #if blocks, which already include them. Added unconditionally at the top of the file they broke the Windows build. * Add the clang-tidy Configuration That Generated These Includes Only misc-include-cleaner's missing-include check, with the headers it must never suggest: per-platform, internal and OS-specific ones that would break other platforms or are not meant to be included directly. * Match Windows Paths in the clang-tidy Ignore List Header paths use backslashes on Windows, so every / in a pattern is now [/\\]. The Windows SDK headers are ignored alongside the other OS-specific ones, and the list is one pattern per line. Suggested by @raistlin7447 from a Windows clang-cl run.
63 lines
1.8 KiB
C++
63 lines
1.8 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/event.h>
|
|
#include <wx/string.h>
|
|
#include <wx/gdicmn.h>
|
|
#include <string>
|
|
#include <wx/sizer.h>
|
|
#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
|