12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- #ifndef __UILABEL_H__
- #define __UILABEL_H__
- #pragma once
- #include <GdiPlus.h>
- #pragma comment( lib, "GdiPlus.lib" )
- using namespace Gdiplus;
- class UILIB_API Gdiplus::RectF;
- struct UILIB_API Gdiplus::GdiplusStartupInput;
- namespace DuiLib
- {
- class UILIB_API CLabelUI : public CControlUI
- {
- public:
- CLabelUI();
- ~CLabelUI();
- LPCTSTR GetClass() const;
- LPVOID GetInterface(LPCTSTR pstrName);
- void SetText(LPCTSTR pstrText);
- void SetText (LPCSTR pstrText);
- void SetTextStyle(UINT uStyle);
- UINT GetTextStyle() const;
- void SetTextColor(DWORD dwTextColor);
- DWORD GetTextColor() const;
- void SetDisabledTextColor(DWORD dwTextColor);
- DWORD GetDisabledTextColor() const;
- void SetFont(int index);
- int GetFont() const;
- RECT GetTextPadding() const;
- void SetTextPadding(RECT rc);
- bool IsShowHtml();
- void SetShowHtml(bool bShowHtml = true);
- SIZE EstimateSize(SIZE szAvailable);
- void DoEvent(TEventUI& event);
- void SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);
- void PaintText(HDC hDC);
- void SetEnabledEffect(bool _EnabledEffect);
- bool GetEnabledEffect();
- void SetEnabledLuminous(bool bEnableLuminous);
- bool GetEnabledLuminous();
- void SetLuminousFuzzy(float fFuzzy);
- float GetLuminousFuzzy();
- void SetGradientLength(int _GradientLength);
- int GetGradientLength();
- void SetShadowOffset(int _offset,int _angle);
- RectF GetShadowOffset();
- void SetTextColor1(DWORD _TextColor1);
- DWORD GetTextColor1();
- void SetTextShadowColorA(DWORD _TextShadowColorA);
- DWORD GetTextShadowColorA();
- void SetTextShadowColorB(DWORD _TextShadowColorB);
- DWORD GetTextShadowColorB();
- void SetStrokeColor(DWORD _StrokeColor);
- DWORD GetStrokeColor();
- void SetGradientAngle(int _SetGradientAngle);
- int GetGradientAngle();
- void SetEnabledStroke(bool _EnabledStroke);
- bool GetEnabledStroke();
- void SetEnabledShadow(bool _EnabledShadowe);
- bool GetEnabledShadow();
-
- protected:
- LPWSTR m_pWideText;
- DWORD m_dwTextColor;
- DWORD m_dwDisabledTextColor;
- int m_iFont;
- UINT m_uTextStyle;
- RECT m_rcTextPadding;
- bool m_bShowHtml;
- float m_fLuminousFuzzy;
- int m_GradientLength;
- int m_GradientAngle;
- bool m_EnableEffect;
- bool m_bEnableLuminous;
- bool m_EnabledStroke;
- bool m_EnabledShadow;
- DWORD m_dwTextColor1;
- DWORD m_dwTextShadowColorA;
- DWORD m_dwTextShadowColorB;
- DWORD m_dwStrokeColor;
- RectF m_ShadowOffset;
- ULONG_PTR m_gdiplusToken;
- GdiplusStartupInput m_gdiplusStartupInput;
- };
- }
- #endif // __UILABEL_H__
|