2022-07-15 15:37:19 +00:00
|
|
|
#ifndef slic3r_GUI_Label_hpp_
|
|
|
|
#define slic3r_GUI_Label_hpp_
|
|
|
|
|
|
|
|
#include <wx/stattext.h>
|
|
|
|
|
2022-11-28 10:32:50 +00:00
|
|
|
#define LB_HYPERLINK 0x0020
|
|
|
|
#define LB_PROPAGATE_MOUSE_EVENT 0x0040
|
2023-07-04 00:46:04 +00:00
|
|
|
#define LB_AUTO_WRAP 0x0080
|
2022-09-09 07:05:59 +00:00
|
|
|
|
|
|
|
|
2022-07-15 15:37:19 +00:00
|
|
|
class Label : public wxStaticText
|
|
|
|
{
|
|
|
|
public:
|
2022-09-09 07:05:59 +00:00
|
|
|
Label(wxWindow *parent, wxString const &text = {}, long style = 0);
|
|
|
|
|
|
|
|
Label(wxWindow *parent, wxFont const &font, wxString const &text = {}, long style = 0);
|
|
|
|
|
2022-10-19 05:35:04 +00:00
|
|
|
void SetLabel(const wxString& label) override;
|
|
|
|
|
2022-09-09 07:05:59 +00:00
|
|
|
void SetWindowStyleFlag(long style) override;
|
2022-07-15 15:37:19 +00:00
|
|
|
|
2022-11-03 03:56:49 +00:00
|
|
|
void Wrap(int width);
|
|
|
|
|
2022-09-09 07:05:59 +00:00
|
|
|
private:
|
2023-07-04 00:46:04 +00:00
|
|
|
void OnSize(wxSizeEvent & evt);
|
|
|
|
|
|
|
|
private:
|
|
|
|
wxFont m_font;
|
|
|
|
wxColour m_color;
|
|
|
|
wxString m_text;
|
|
|
|
bool m_skip_size_evt = false;
|
2022-07-15 15:37:19 +00:00
|
|
|
|
|
|
|
public:
|
2023-04-19 11:59:07 +00:00
|
|
|
static wxFont Head_48;
|
|
|
|
static wxFont Head_32;
|
2022-07-15 15:37:19 +00:00
|
|
|
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;
|
2023-03-24 08:08:20 +00:00
|
|
|
static wxFont Head_11;
|
2022-07-15 15:37:19 +00:00
|
|
|
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;
|
2022-08-23 10:47:41 +00:00
|
|
|
static wxFont Body_11;
|
2022-07-22 09:46:10 +00:00
|
|
|
static wxFont Body_9;
|
2023-08-23 08:43:59 +00:00
|
|
|
static wxFont Body_8;
|
2022-09-21 11:44:18 +00:00
|
|
|
|
2024-01-04 01:32:32 +00:00
|
|
|
static void initSysFont(std::string lang_code = "", bool load_font_resource = true);
|
2022-07-15 15:37:19 +00:00
|
|
|
|
2024-01-04 01:32:32 +00:00
|
|
|
static wxFont sysFont(int size, bool bold = false, std::string lang_code = "");
|
2022-07-22 09:46:10 +00:00
|
|
|
|
|
|
|
static wxSize split_lines(wxDC &dc, int width, const wxString &text, wxString &multiline_text);
|
2022-07-15 15:37:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // !slic3r_GUI_Label_hpp_
|