Files
OrcaSlicer/src/slic3r/GUI/Widgets/Label.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

69 lines
1.5 KiB
C++

#ifndef slic3r_GUI_Label_hpp_
#define slic3r_GUI_Label_hpp_
#include <wx/gdicmn.h>
#include <wx/event.h>
#include <wx/colour.h>
#include <wx/stattext.h>
#include <wx/string.h>
#define LB_HYPERLINK 0x0020
#define LB_PROPAGATE_MOUSE_EVENT 0x0040
#define LB_AUTO_WRAP 0x0080
class Label : public wxStaticText
{
public:
Label(wxWindow *parent, wxString const &text = {}, long style = 0, wxSize size = wxDefaultSize);
Label(wxWindow *parent, wxFont const &font, wxString const &text = {}, long style = 0, wxSize size = wxDefaultSize);
void SetLabel(const wxString& label) override;
void SetWindowStyleFlag(long style) override;
void Wrap(int width);
private:
void OnSize(wxSizeEvent & evt);
private:
wxFont m_font;
wxColour m_color;
wxString m_text;
bool m_skip_size_evt = false;
public:
static wxFont Head_48;
static wxFont Head_32;
static wxFont Head_24;
static wxFont Head_20;
static wxFont Head_18;
static wxFont Head_16;
static wxFont Head_15;
static wxFont Head_14;
static wxFont Head_13;
static wxFont Head_12;
static wxFont Head_11;
static wxFont Head_10;
static wxFont Body_16;
static wxFont Body_15;
static wxFont Body_14;
static wxFont Body_13;
static wxFont Body_12;
static wxFont Body_10;
static wxFont Body_11;
static wxFont Body_9;
static wxFont Body_8;
static void initSysFont();
static wxFont sysFont(int size, bool bold = false);
static wxSize split_lines(wxDC &dc, int width, const wxString &text, wxString &multiline_text, int max_count = 0);
};
#endif // !slic3r_GUI_Label_hpp_