initial commit

This commit is contained in:
Ysm-04
2025-09-07 00:22:33 +08:00
parent d62d8a90d6
commit a29b4371fb
16 changed files with 481 additions and 461 deletions
+7 -7
View File
@@ -6,7 +6,7 @@
// - 不支持用户交互(无事件处理)
// - 自动适应文本内容大小
class label : public Control
class Label : public Control
{
std::string text; //标签文本
COLORREF textColor; //标签文本颜色
@@ -16,18 +16,18 @@ class label : public Control
//标签事件处理(标签无事件)不实现具体代码
void handleEvent(const ExMessage& msg) override {}
public:
StellarX::controlText textStyle; //标签文本样式
StellarX::ControlText textStyle; //标签文本样式
public:
label();
label(int x, int y, std::string text = "标签",COLORREF textcolor = BLACK, COLORREF bkColor= RGB(255,255,255));
Label();
Label(int x, int y, std::string text = "标签",COLORREF textcolor = BLACK, COLORREF bkColor= RGB(255,255,255));
//绘标签
void draw() override;
//设置标签背景是否透明
void setTxtdisap(bool key);
void setTextdisap(bool key);
//设置标签文本颜色
void setTxtColor(COLORREF color);
void setTextColor(COLORREF color);
//设置标签背景颜色
void setTxtBkColor(COLORREF color);
void setTextBkColor(COLORREF color);
//设置标签文本
void setText(std::string text);