From c6edbd1df725b75f0b1ed97ca178ea4e3231b25f Mon Sep 17 00:00:00 2001
From: LAPTOP-T815PCOQ\25526 <mr.liuyang@126.com>
Date: 星期一, 09 十二月 2024 14:18:11 +0800
Subject: [PATCH] 1. axis设定先写入PLC,间隔2秒后更新界面和配方 2. IO模块如果是可以点击的信号,移动到控件上鼠标显示点击图标 3. io模块添加圆角功能
---
SourceCode/Bond/BLControlsSDK/include/BLLabel.h | 91 +++++++++++++++++++++++++++++----------------
1 files changed, 59 insertions(+), 32 deletions(-)
diff --git a/SourceCode/Bond/BLControlsSDK/include/BLLabel.h b/SourceCode/Bond/BLControlsSDK/include/BLLabel.h
index e8f35f8..88ff5d0 100644
--- a/SourceCode/Bond/BLControlsSDK/include/BLLabel.h
+++ b/SourceCode/Bond/BLControlsSDK/include/BLLabel.h
@@ -24,50 +24,77 @@
void SetClickCallback(std::function<void()> callback); // 璁剧疆鐐瑰嚮浜嬩欢鐨勫洖璋冨嚱鏁�
// 灞炴�ц缃帴鍙�
- CBLLabel& SetBkColor(COLORREF crBkgnd); // 璁剧疆鑳屾櫙棰滆壊
- CBLLabel& SetTextColor(COLORREF crText); // 璁剧疆鏂囨湰棰滆壊
- CBLLabel& SetText(const CString& strText); // 璁剧疆鏂囨湰鍐呭
- CBLLabel& SetFontBold(BOOL bBold); // 璁剧疆瀛椾綋鍔犵矖
- CBLLabel& SetFontName(const CString& strFont); // 璁剧疆瀛椾綋鍚嶇О
- CBLLabel& SetFontUnderline(BOOL bSet); // 璁剧疆涓嬪垝绾�
- CBLLabel& SetFontItalic(BOOL bSet); // 璁剧疆鏂滀綋
- CBLLabel& SetFontSize(int nSize); // 璁剧疆瀛椾綋澶у皬
- CBLLabel& SetAlignment(TextAlign alignment); // 璁剧疆鏂囨湰瀵归綈鏂瑰紡
- CBLLabel& SetDynamicFont(BOOL bDynamic); // 璁剧疆鏄惁鍔ㄦ�佽皟鏁村瓧浣�
- CBLLabel& FlashText(BOOL bActivate); // 闂儊鏂囨湰
- CBLLabel& FlashBackground(BOOL bActivate); // 闂儊鑳屾櫙
- CBLLabel& SetLink(BOOL bLink); // 璁剧疆鏄惁鍚敤瓒呴摼鎺�
- CBLLabel& SetLinkCursor(HCURSOR hCursor); // 璁剧疆瓒呴摼鎺ュ厜鏍�
+ CBLLabel& SetBkColor(COLORREF crBkgnd); // 璁剧疆鑳屾櫙棰滆壊
+ CBLLabel& SetTextColor(COLORREF crText); // 璁剧疆鏂囨湰棰滆壊
+ CBLLabel& SetText(const CString& strText); // 璁剧疆鏂囨湰鍐呭
+ CBLLabel& SetFontBold(BOOL bBold); // 璁剧疆瀛椾綋鍔犵矖
+ CBLLabel& SetFontName(const CString& strFont); // 璁剧疆瀛椾綋鍚嶇О
+ CBLLabel& SetFontUnderline(BOOL bSet); // 璁剧疆涓嬪垝绾�
+ CBLLabel& SetFontItalic(BOOL bSet); // 璁剧疆鏂滀綋
+ CBLLabel& SetFontSize(int nSize); // 璁剧疆瀛椾綋澶у皬
+ CBLLabel& SetAlignment(TextAlign alignment); // 璁剧疆鏂囨湰瀵归綈鏂瑰紡
+ CBLLabel& SetDynamicFont(BOOL bDynamic); // 璁剧疆鏄惁鍔ㄦ�佽皟鏁村瓧浣�
+ CBLLabel& FlashText(BOOL bActivate); // 闂儊鏂囨湰
+ CBLLabel& FlashBackground(BOOL bActivate); // 闂儊鑳屾櫙
+ CBLLabel& SetLink(BOOL bLink); // 璁剧疆鏄惁鍚敤瓒呴摼鎺�
+ CBLLabel& SetLinkCursor(HCURSOR hCursor); // 璁剧疆瓒呴摼鎺ュ厜鏍�
+ CBLLabel& DisableBorder(); // 绂佺敤杈规
+ CBLLabel& SetBorderColor(COLORREF crBorder); // 璁剧疆杈规棰滆壊
+ CBLLabel& SetBorderWidth(int nWidth); // 璁剧疆杈规瀹藉害
+ CBLLabel& SetBorderStyle(int nStyle); // 璁剧疆杈规鏍峰紡
+ CBLLabel& SetDefaultCursor(HCURSOR hCursor); // 璁剧疆榛樿鍏夋爣
+ CBLLabel& SetHandCursor(HCURSOR hCursor); // 璁剧疆鎵嬪瀷鍏夋爣
+ CBLLabel& SetRoundedCorners(BOOL bEnable, int nRadius); // 璁剧疆鍦嗚鍙婂崐寰�
+ CBLLabel& SetCornerRadius(int nTopLeft, int nTopRight, int nBottomRight, int nBottomLeft); // 璁剧疆鍚勮鍦嗚鍗婂緞
protected:
// 宸ュ叿鍑芥暟
- void ReconstructFont(); // 閲嶆柊鏋勯�犲瓧浣�
- void UpdateFontSize(); // 鍔ㄦ�佽皟鏁村瓧浣撳ぇ灏�
- virtual void OnPaint(); // 鑷畾涔夌粯鍒舵枃鏈�
+ void ReconstructFont(); // 閲嶆柊鏋勯�犲瓧浣�
+ void UpdateFontSize(); // 鍔ㄦ�佽皟鏁村瓧浣撳ぇ灏�
+ void CreateRoundedRegion(CRgn& rgn, const CRect& rect); // 鍒涘缓鍦嗚鍖哄煙
+ virtual void OnPaint(); // 鑷畾涔夌粯鍒舵枃鏈�
// 灞炴��
- COLORREF m_crText; // 鏂囨湰棰滆壊
- COLORREF m_crBkColor; // 鑳屾櫙棰滆壊
- HBRUSH m_hBrush; // 鑳屾櫙鐢诲埛
- LOGFONT m_lf; // 瀛椾綋淇℃伅
- CFont m_font; // 瀛椾綋瀵硅薄
- CString m_strText; // 鏂囨湰鍐呭
- BOOL m_bState; // 鐘舵�侊紝鐢ㄤ簬闂儊
- BOOL m_bTimer; // 瀹氭椂鍣ㄧ姸鎬�
- BOOL m_bLink; // 鏄惁涓鸿秴閾炬帴
- BOOL m_bDynamicFont; // 鏄惁鍔ㄦ�佽皟鏁村瓧浣撳ぇ灏�
+ COLORREF m_crText; // 鏂囨湰棰滆壊
+ COLORREF m_crBkColor; // 鑳屾櫙棰滆壊
+ HBRUSH m_hBrush; // 鑳屾櫙鐢诲埛
+ LOGFONT m_lf; // 瀛椾綋淇℃伅
+ CFont m_font; // 瀛椾綋瀵硅薄
+ CString m_strText; // 鏂囨湰鍐呭
+ BOOL m_bState; // 鐘舵�侊紝鐢ㄤ簬闂儊
+ BOOL m_bTimer; // 瀹氭椂鍣ㄧ姸鎬�
+ BOOL m_bLink; // 鏄惁涓鸿秴閾炬帴
+ BOOL m_bDynamicFont; // 鏄惁鍔ㄦ�佽皟鏁村瓧浣撳ぇ灏�
TextAlign m_alignment; // 鏂囨湰瀵归綈鏂瑰紡
FlashType m_Type; // 闂儊绫诲瀷
- HCURSOR m_hCursor; // 瓒呴摼鎺ュ厜鏍�
+ HCURSOR m_hCursor; // 瓒呴摼鎺ュ厜鏍�
+
+ // 杈规灞炴��
+ COLORREF m_crBorderColor; // 杈规棰滆壊
+ int m_nBorderWidth; // 杈规瀹藉害
+ int m_nBorderStyle; // 杈规鏍峰紡锛堜娇鐢� GDI 鏍峰紡锛歅S_SOLID, PS_DASH 绛夛級
+
+ // 鍦嗚鐩稿叧灞炴��
+ BOOL m_bRoundedCorners; // 鏄惁鍚敤鍦嗚
+ int m_nTopLeftRadius; // 宸︿笂瑙掑渾瑙掑崐寰�
+ int m_nTopRightRadius; // 鍙充笂瑙掑渾瑙掑崐寰�
+ int m_nBottomRightRadius; // 鍙充笅瑙掑渾瑙掑崐寰�
+ int m_nBottomLeftRadius; // 宸︿笅瑙掑渾瑙掑崐寰�
+
+ // 榧犳爣浜嬩欢鐩稿叧灞炴��
+ BOOL m_bMouseIn; // 榧犳爣鏄惁鍦ㄦ帶浠朵笂
+ HCURSOR m_hHandCursor; // 鎵嬪瀷鍏夋爣
+ HCURSOR m_hDefaultCursor; // 榛樿鍏夋爣
std::function<void()> m_clickCallback; // 鐐瑰嚮浜嬩欢鐨勫洖璋冨嚱鏁�
protected:
// MFC 娑堟伅鏄犲皠
- virtual HBRUSH CtlColor(CDC* pDC, UINT nCtlColor); // 鑳屾櫙鍜屾枃鏈鑹茶缃�
- afx_msg void OnTimer(UINT_PTR nIDEvent); // 瀹氭椂鍣ㄤ簨浠�
- afx_msg void OnLButtonDown(UINT nFlags, CPoint point); // 榧犳爣鐐瑰嚮浜嬩欢
+ virtual HBRUSH CtlColor(CDC* pDC, UINT nCtlColor); // 鑳屾櫙鍜屾枃鏈鑹茶缃�
+ afx_msg void OnTimer(UINT_PTR nIDEvent); // 瀹氭椂鍣ㄤ簨浠�
+ afx_msg void OnLButtonDown(UINT nFlags, CPoint point); // 榧犳爣鐐瑰嚮浜嬩欢
+ afx_msg void OnMouseMove(UINT nFlags, CPoint point); // 榧犳爣绉诲姩浜嬩欢
+ afx_msg void OnMouseLeave(); // 榧犳爣绂诲紑浜嬩欢
afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message); // 璁剧疆鍏夋爣浜嬩欢
-
DECLARE_MESSAGE_MAP()
};
--
Gitblit v1.9.3