mGNCS API Reference  v1.2.5
A new control set and a new framework for MiniGUI apps
mcolorbutton.h
Go to the documentation of this file.
1 //
3 // IMPORTANT NOTICE
4 //
5 // The following open source license statement does not apply to any
6 // entity in the Exception List published by FMSoft.
7 //
8 // For more information, please visit:
9 //
10 // https://www.fmsoft.cn/exception-list
11 //
13 
54 #ifdef _MGNCSCTRL_COLORBUTTON
55 
56 #ifndef _MGUI_NCSCTRL_CLRBTN_H
57 #define _MGUI_NCSCTRL_CLRBTN_H
58 
59 
60 #ifdef __cplusplus
61 extern "C" {
62 #endif /* __cplusplus */
63 
73 #define NCSCTRL_COLORBUTTON NCSCLASSNAME("colorbutton")
74 
75 typedef struct _mColorButton mColorButton;
76 typedef struct _mColorButtonClass mColorButtonClass;
77 typedef struct _mColorButtonRenderer mColorButtonRenderer;
78 
79 #define mColorButtonHeader(clsName) \
80  mWidgetHeader(clsName)
81 
88 struct _mColorButton
89 {
90  mColorButtonHeader(mColorButton)
91 };
92 
93 #define mColorButtonClassHeader(clsName, parentClass) \
94  mWidgetClassHeader(clsName, parentClass)
95 
103 struct _mColorButtonClass
104 {
105  mColorButtonClassHeader(mColorButton, mWidget)
106 };
107 
108 #define mColorButtonRendererHeader(clsName, parentClass) \
109  mWidgetRendererHeader(clsName, parentClass)
110 
115 /* define the render of colorbutton */
116 struct _mColorButtonRenderer {
117  mColorButtonRendererHeader(mColorButton, mWidget)
118 };
119 
124 MGNCS_EXPORT extern mColorButtonClass g_stmColorButtonCls;
125 
130 enum mColorButtonProp {
137  NCSP_CLRBTN_CURCOLOR = NCSP_WIDGET_MAX + 1,
138  NCSP_CLRBTN_MAX
139 };
140 
141 #define NCSS_CLRBTN_SHIFT NCSS_WIDGET_SHIFT
142 #define NCSS_CLRBTN_FLAT (1<<NCSS_WIDGET_SHIFT)
143 
148 enum enumColorButtonNotify{
155  NCSN_CLRBTN_COLORCHANGED = NCSN_WIDGET_MAX + 1,
156  NCSN_CLRBTN_MAX
157 };
158 
162 #ifdef __cplusplus
163 }
164 #endif /* __cplusplus */
165 
166 #endif /* _MGUI_NCSCTRL_CLRBTN_H */
167 #endif //_MGNCSCTRL_COLORBUTTON
168 
define the mWidget members, inherit from mComponent