-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathmainframeinterface.h
99 lines (83 loc) · 3.08 KB
/
mainframeinterface.h
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#ifndef MAINWINDOWINTERFACE
#define MAINWINDOWINTERFACE
class IModule;
//界面框架接口
//接口中所有const char*类型均为UTF8编码。
class IMainFrame
{
public:
/**
* @brief 设置主窗口Ribbin工具栏命令的启用/禁用状态
* @param[in] strId: 命令的ID
* @param[in] enable: 是否启用
*/
virtual void SetItemEnable(const char* strId, bool enable) = 0;
/**
* @brief 判断主窗口Ribbin工具栏的一个命令是否被被启用
* @param[in] strId: 命令的ID
* @return 是否被启用
*/
virtual bool IsItemEnable(const char* strId) = 0;
/*
* 函数说明: 设置主窗口Ribbin工具栏命令的选中状态
* 输入参数:
* strId: 命令的ID
* enable: 是否选中
*/
virtual void SetItemChecked(const char* strId, bool checked) = 0;
/**
* @brief 判断主窗口Ribbin工具栏的一个命令是否被选中
* @param[in] strId: 命令的ID
* @return 是否被选中
*/
virtual bool IsItemChecked(const char* strId) = 0;
/**
* @brief 获取Ribbon标签中一个元素的文本
* @param[in] strId: 命令的ID
* @return 获取的文本
*/
virtual const char* GetItemText(const char* strId) = 0;
/**
* @brief 设置Ribbon标签中一个元素的文本
* @param[in] strId: 命令的ID
* @param[in] text: 设置的文本
*/
virtual void SetItemText(const char* strId, const char* text) = 0;
/**
* @brief 设置Ribbon标签中一个元素的图标
* @param[in] strId: 命令的ID
* @param[in] iconPath: 图标的路径
* @param[in] iconSize: 图标的大小
*/
virtual void SetItemIcon(const char* strId, const char* iconPath, int iconSize) = 0;
/**
* @brief 获取Ribbon标签中Combox或ListWidget当前选中项
* @param[in] strId: 命令的ID
* @return 选中项的序号
*/
virtual int GetItemCurIndex(const char* strId) = 0;
/**
* @brief 设置Ribbon标签中Combox或ListWidget当前选中项
* @param[in] strId: 命令的ID
* @param[in] index: 选中项的序号
*/
virtual void SetItemCurIIndex(const char* strId, int index) = 0;
/**
* @brief 根据模块名称获取模块对象的指针
* @param[in] moduleName 模块名称,由模块接口GetModuleName()返回。
* @return 模块对象的指针
*/
virtual IModule *GetModule(const char* strModuleName) const = 0;
/**
* @brief 向一个模块发送消息
* @param[in] moduleName 模块名称
* @param[in] msgType 消息类型
* @param[in] para1 para2 可选参数
* @return 返回的消息
*/
virtual void* SendModuleMessage(const char* moduleName, const char* msgType, void* para1 = nullptr, void* para2 = nullptr) = 0;
virtual void* GetAcion(const char* strId) = 0;
virtual void* GetWidget(const char* strId) = 0;
virtual void SetStatusBarText(const char* text, int timeOut) = 0;
};
#endif // MAINWINDOWINTERFACE