-
Notifications
You must be signed in to change notification settings - Fork 71
Expand file tree
/
Copy pathIPAddress.h
More file actions
65 lines (50 loc) · 1.22 KB
/
IPAddress.h
File metadata and controls
65 lines (50 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#ifndef UI_CONTROL_IPADDRESS_H_
#define UI_CONTROL_IPADDRESS_H_
#include "duilib/Box/HBox.h"
namespace ui
{
/** IP地址控件
*/
class RichEdit;
class IPAddress: public HBox
{
typedef HBox BaseClass;
public:
explicit IPAddress(Window* pWindow);
/** 获取控件类型
*/
virtual DString GetType() const override;
virtual void SetAttribute(const DString& strName, const DString& strValue) override;
/** 让控件获取焦点
*/
virtual void SetFocus() override;
/** 设置IP地址
*/
void SetIPAddress(const DString& ipAddress);
/** 获取IP地址
*/
DString GetIPAddress() const;
protected:
/** 初始化接口
*/
virtual void OnInit() override;
/** 将消息派发到消息处理函数
* @param[in] msg 消息内容
*/
virtual void SendEventMsg(const EventArgs& msg) override;
/** 编辑框的焦点转移事件
*/
void OnKillFocusEvent(RichEdit* pRichEdit, Control* pNewFocus);
private:
/** 编辑框列表
*/
std::vector<RichEdit*> m_editList;
/** 上次焦点在哪个控件上
*/
RichEdit* m_pLastFocus;
/** IP地址
*/
UiString m_ipAddress;
};
}//namespace ui
#endif //UI_CONTROL_IPADDRESS_H_