![]() |
HiEasyX
Ver 0.3.0
EasyX 全面扩展库
|
静态(文本、图像)控件 更多...
#include <Static.h>
类 | |
| struct | Char |
Public 成员函数 | |
| Static () | |
| Static (int x, int y, int w, int h, std::wstring wstrText=L"") | |
| virtual std::vector< Char > | Convert (std::wstring wstrText) |
| virtual std::wstring | Convert (std::vector< Char > vecText) |
| virtual std::vector< Char > & | GetTextVector () |
| virtual void | ClearText () |
| virtual void | AddText (std::wstring wstr, bool isSetTextColor=false, COLORREF cText=0, bool isSetBkColor=false, COLORREF cBk=0) |
| 添加文本 更多... | |
| void | SetText (std::wstring wstrText) override |
| void | SetText (std::vector< Char > vecText) |
| virtual ImageBlock * | GetImage () |
| 获取缓存的图像 更多... | |
| virtual void | SetImage (ImageBlock *pImgBlockmg) |
| 设置显示图像 更多... | |
| void | Draw_Text (int nTextOffsetX=0, int nTextOffsetY=0) override |
| void | Draw (bool draw_child=true) override |
| 绘制控件 更多... | |
Public 成员函数 继承自 HiEasyX::ControlBase | |
| ControlBase () | |
| ControlBase (std::wstring wstrText) | |
| ControlBase (int x, int y, int w=0, int h=0, std::wstring wstrText=L"") | |
| virtual | ~ControlBase () |
| ControlBase * | GetParent () |
| virtual void | SetParent (ControlBase *p) |
| 设置父控件(父控件调用 AddChild) 更多... | |
| virtual bool | IsAutoSizeForChild () const |
| virtual void | EnableAutoSizeForChild (bool enable) |
| 为子控件自动改变大小以容纳控件(不容纳负坐标部分) 更多... | |
| std::list< ControlBase * > & | GetChildList () |
| size_t | GetChildCount () |
| 获取子控件总数 更多... | |
| virtual void | AddChild (ControlBase *p, int offset_x=0, int offset_y=0) |
| virtual void | RemoveChild (ControlBase *p) |
| virtual bool | IsEnabled () const |
| virtual void | SetEnable (bool enable) |
| virtual bool | IsVisible () const |
| virtual void | SetVisible (bool visible) |
| virtual bool | GetAutoRedrawState () const |
| virtual void | EnableAutoRedraw (bool enable) |
| 启用自动重绘(接受到基础消息事件时自动标识需要重绘) 更多... | |
| virtual Canvas & | GetCanvas () |
| virtual COLORREF | GetBkColor () const |
| virtual void | SetBkColor (COLORREF color) |
| virtual COLORREF | GetTextColor () const |
| virtual void | SetTextColor (COLORREF color) |
| virtual void | EnableBorder (bool bEnableBorder, COLORREF color=BLACK, int thickness=1) |
| virtual void | SetAlpha (BYTE alpha, bool bUseCanvasAlpha, bool isAlphaCalculated) |
| virtual std::wstring | GetText () const |
| virtual void | Redraw () |
| 重绘控件 更多... | |
| virtual void | Render (Canvas *dst, RECT *pRct=nullptr, int *pCount=0) |
| 渲染控件到外部 更多... | |
| virtual void | SetMsgProcFunc (MESSAGE_PROC_FUNC func) |
| 设置消息响应函数 更多... | |
| virtual void | SetMsgProcFunc (MESSAGE_PROC_FUNC_CLASS static_class_func, void *_this) |
| 设置消息响应函数为静态类函数 更多... | |
| virtual void | UpdateMessage (ExMessage msg) |
| 更新消息 更多... | |
| virtual bool | IsHovered () const |
| 判断鼠标是否悬停 更多... | |
| virtual bool | IsFocused () const |
| 判断是否拥有焦点 更多... | |
| virtual bool | IsPressed () const |
| 判断是否按下 更多... | |
Public 成员函数 继承自 HiEasyX::Container | |
| Container () | |
| virtual | ~Container () |
| RECT | GetRect () const |
| void | SetRect (int x, int y, int w, int h) |
| 设置位置和宽高 更多... | |
| void | SetRect (RECT rct) |
| 设置矩形区域 更多... | |
| POINT | GetPos () const |
| int | GetX () const |
| int | GetY () const |
| void | SetPos (int x, int y) |
| void | SetPos (POINT pt) |
| void | Move (int x, int y) |
| void | MoveRel (int dx, int dy) |
| int | GetWidth () const |
| void | SetWidth (int w) |
| int | GetHeight () const |
| void | SetHeight (int h) |
| void | Resize (int w, int h) |
Protected 成员函数 | |
| virtual void | Init () |
Protected 成员函数 继承自 HiEasyX::ControlBase | |
| void | UpdateRect (RECT rctOld) override |
| 更新区域消息处理 更多... | |
| void | MarkNeedRedrawAndRender () |
| 标记需要重绘和渲染 更多... | |
| void | MarkNeedClearRect (RECT rct) |
| 标记需要清空矩形区域 更多... | |
| virtual void | DrawChild () |
| 绘制子控件 更多... | |
| virtual ExMessage & | TransformMessage (ExMessage &msg) |
| 转换消息 更多... | |
| virtual void | CallUserMsgProcFunc (int msgid, ExMessage msg) |
| 分发消息到用户函数 更多... | |
| virtual void | ChildRectChanged (ControlBase *pChild) |
| 子控件区域变更 更多... | |
Protected 属性 | |
| std::vector< Char > | m_vecText |
| ImageBlock * | m_pImgBlock = nullptr |
Protected 属性 继承自 HiEasyX::ControlBase | |
| bool | m_bEnabled = true |
| 是否可用 更多... | |
| bool | m_bVisible = true |
| 是否可见 更多... | |
| bool | m_bAutoRedrawWhenReceiveMsg = true |
| 当默认消息处理函数接受到消息时,是否自动标识重绘和渲染 更多... | |
| bool | m_bRedraw = true |
| 标识需要重绘 更多... | |
| bool | m_bRender = true |
| 标识需要渲染 更多... | |
| bool | m_bClear = false |
| 标识需要清空某区域 更多... | |
| RECT | m_rctClear = { 0 } |
| 记录需要清空的区域 更多... | |
| bool | m_bAlwaysRedrawAndRender = false |
| 总是重绘和渲染(占用更高) 更多... | |
| std::wstring | m_wstrText |
| 控件文本 更多... | |
| Canvas | m_canvas |
| 画布 更多... | |
| BYTE | m_alpha = 255 |
| 透明度 更多... | |
| bool | m_bUseCanvasAlpha = false |
| 是否使用画布自身的透明度信息 更多... | |
| bool | m_isAlphaCalculated = false |
| 画布是否已经计算透明混合颜色 更多... | |
| COLORREF | m_cBorder = MODERN_BORDER_GRAY |
| 边框颜色 更多... | |
| COLORREF | m_cBackground = CLASSICGRAY |
| 背景色 更多... | |
| COLORREF | m_cText = BLACK |
| 文本颜色 更多... | |
| bool | m_bEnableBorder = true |
| 是否绘制边框 更多... | |
| int | m_nBorderThickness = 1 |
| 边框粗细 更多... | |
| bool | m_bCompleteFirstSetRect = false |
| 是否已经完成第一次设置区域 更多... | |
| ControlBase * | m_pParent = nullptr |
| 父控件 更多... | |
| std::list< ControlBase * > | m_listChild |
| 子控件 更多... | |
| bool | m_bAutoSizeForChild = false |
| 为子控件自动改变大小以容纳控件 更多... | |
| MESSAGE_PROC_FUNC | m_funcMessageProc = nullptr |
| 消息处理函数 更多... | |
| MESSAGE_PROC_FUNC_CLASS | m_funcMessageProc_Class = nullptr |
| 若绑定的消息处理函数是静态类函数,则记录其地址 更多... | |
| void * | m_pCalledClass = nullptr |
| 若绑定的消息处理函数是静态类函数,则记录该类指针 更多... | |
| bool | m_bHovered = false |
| 鼠标是否悬停 更多... | |
| bool | m_bPressed = false |
| 鼠标是否按下 更多... | |
| bool | m_bFocused = false |
| 是否拥有焦点 更多... | |
Protected 属性 继承自 HiEasyX::Container | |
| RECT | m_rct = { 0 } |
| 容器区域 更多... | |
| HiEasyX::Static::Static | ( | ) |
在文件 Static.cpp 第 11 行定义.
| HiEasyX::Static::Static | ( | int | x, |
| int | y, | ||
| int | w, | ||
| int | h, | ||
| std::wstring | wstrText = L"" |
||
| ) |
在文件 Static.cpp 第 16 行定义.
|
virtual |
添加文本
| [in] | wstr | 文本 |
| [in] | isSetTextColor | 是否设置此文本颜色 |
| [in] | cText | 文本颜色 |
| [in] | isSetBkColor | 是否设置此文本背景颜色 |
| [in] | cBk | 文本背景色 |
在文件 Static.cpp 第 53 行定义.
|
virtual |
在文件 Static.cpp 第 45 行定义.
|
virtual |
在文件 Static.cpp 第 34 行定义.
|
virtual |
在文件 Static.cpp 第 23 行定义.
|
overridevirtual |
|
overridevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
protectedvirtual |
在文件 Static.cpp 第 5 行定义.
|
virtual |
| void HiEasyX::Static::SetText | ( | std::vector< Char > | vecText | ) |
在文件 Static.cpp 第 74 行定义.
|
overridevirtual |
|
protected |