mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-04 22:31:02 +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.
76 lines
1.6 KiB
C++
76 lines
1.6 KiB
C++
#ifndef slic3r_PrinterWebView_hpp_
|
|
#define slic3r_PrinterWebView_hpp_
|
|
|
|
|
|
#include "wx/artprov.h"
|
|
#include "wx/cmdline.h"
|
|
#include "wx/notifmsg.h"
|
|
#include "wx/settings.h"
|
|
#include <wx/setup.h>
|
|
#include <wx/event.h>
|
|
#include <wx/webview.h>
|
|
#include <wx/string.h>
|
|
|
|
#if wxUSE_WEBVIEW_EDGE
|
|
#include "wx/msw/webview_edge.h"
|
|
#endif
|
|
|
|
#include "wx/webviewarchivehandler.h"
|
|
#include "wx/webviewfshandler.h"
|
|
#include "wx/numdlg.h"
|
|
#include "wx/infobar.h"
|
|
#include "wx/filesys.h"
|
|
#include "wx/fs_arc.h"
|
|
#include "wx/fs_mem.h"
|
|
#include "wx/stdpaths.h"
|
|
#include <wx/panel.h>
|
|
#include <wx/tbarbase.h>
|
|
#include "wx/textctrl.h"
|
|
#include <wx/timer.h>
|
|
#include <memory>
|
|
#include "Lazy.hpp"
|
|
|
|
|
|
namespace Slic3r {
|
|
namespace GUI {
|
|
|
|
class PrinterWebViewHandler;
|
|
|
|
|
|
class PrinterWebView : public wxPanel, public LazyInstance<PrinterWebView> {
|
|
public:
|
|
PrinterWebView(wxWindow *parent);
|
|
virtual ~PrinterWebView();
|
|
|
|
void load_url(wxString& url, wxString apikey = "");
|
|
void UpdateState();
|
|
void OnClose(wxCloseEvent& evt);
|
|
void OnError(wxWebViewEvent& evt);
|
|
void OnLoaded(wxWebViewEvent& evt);
|
|
void OnNewWindow(wxWebViewEvent& evt);
|
|
void OnScriptMessage(wxWebViewEvent& evt);
|
|
void reload();
|
|
void update_mode();
|
|
|
|
bool Show(bool show = true) override;
|
|
|
|
private:
|
|
friend class PrinterWebViewHandler;
|
|
|
|
void SendAPIKey();
|
|
|
|
wxWebView* m_browser;
|
|
long m_zoomFactor;
|
|
wxString m_apikey;
|
|
bool m_apikey_sent;
|
|
wxString m_url_deferred;
|
|
std::unique_ptr<PrinterWebViewHandler> m_handler;
|
|
|
|
// DECLARE_EVENT_TABLE()
|
|
};
|
|
|
|
} // GUI
|
|
} // Slic3r
|
|
|
|
#endif /* slic3r_Tab_hpp_ */
|