Files
OrcaSlicer/src/slic3r/GUI/HMSPanel.hpp
T
HanifKoh 1a5f91d727 Add Missing Includes Across src/slic3r/GUI (#16048)
* 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.
2026-10-02 14:56:56 +08:00

88 lines
1.9 KiB
C++

#ifndef slic3r_HMSPanel_hpp_
#define slic3r_HMSPanel_hpp_
#include <string>
#include <wx/event.h>
#include <wx/gdicmn.h>
#include <map>
#include <wx/panel.h>
#include <wx/scrolwin.h>
#include <wx/sizer.h>
#include <wx/textctrl.h>
#include <slic3r/GUI/Widgets/Button.hpp>
#include <slic3r/GUI/DeviceManager.hpp>
#include <slic3r/GUI/Widgets/ScrolledWindow.hpp>
#include <slic3r/GUI/StatusPanel.hpp>
#include <wx/html/htmlwin.h>
#include "DeviceCore/DevHMS.h"
namespace Slic3r {
namespace GUI {
class HMSNotifyItem : public wxPanel
{
DevHMSItem & m_hms_item;
std::string m_url;
std::string dev_id;
std::string long_error_code;
wxPanel * m_panel_hms;
wxStaticBitmap *m_bitmap_notify;
wxStaticBitmap *m_bitmap_arrow;
wxStaticText * m_hms_content;
wxPanel * m_staticline;
wxBitmap m_img_notify_lv1;
wxBitmap m_img_notify_lv2;
wxBitmap m_img_notify_lv3;
wxBitmap m_img_arrow;
void init_bitmaps();
wxBitmap & get_notify_bitmap();
public:
HMSNotifyItem(const std::string& dev_id, wxWindow *parent, DevHMSItem& item);
~HMSNotifyItem();
void msw_rescale() {}
};
class HMSPanel : public wxPanel
{
protected:
wxScrolledWindow *m_scrolledWindow;
wxBoxSizer * m_top_sizer;
int last_status;
void append_hms_panel(const std::string& dev_id, DevHMSItem &item);
void delete_hms_panels();
public:
HMSPanel(wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = wxTAB_TRAVERSAL);
~HMSPanel();
void msw_rescale() {}
bool Show(bool show = true) override;
void update(MachineObject *obj_);
void show_status(int status);
void clear_hms_tag();
MachineObject *obj { nullptr };
std::map<std::string, DevHMSItem> temp_hms_list;
};
wxDECLARE_EVENT(EVT_ALREADY_READ_HMS, wxCommandEvent);
}
}
#endif