mGNCS API Reference  v1.5.0
A new control set and a new framework for MiniGUI apps
mmenubutton.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_MENUBUTTON
55 
56 #ifndef _MGUI_NCSCTRL_MNUBTN_H
57 #define _MGUI_NCSCTRL_MNUBTN_H
58 
59 
60 #ifdef __cplusplus
61 extern "C" {
62 #endif /* __cplusplus */
63 
74 #define NCSCTRL_MENUBUTTON NCSCLASSNAME("menubutton")
75 
76 typedef struct _mMenuButton mMenuButton;
77 typedef struct _mMenuButtonClass mMenuButtonClass;
78 typedef struct _mMenuButtonRenderer mMenuButtonRenderer;
79 
80 #define mMenuButtonHeader(className) \
81  mButtonHeader(className) \
82  mPopMenuMgr * popmenu; \
83  int cur_item;
84 
94 struct _mMenuButton
95 {
96  mMenuButtonHeader(mMenuButton)
97 };
98 
99 #define mMenuButtonClassHeader(className, parentClass) \
100  mButtonClassHeader(className, parentClass)
101 
107 struct _mMenuButtonClass
108 {
109  mMenuButtonClassHeader(mMenuButton, mButton)
110 };
111 
112 #define mMenuButtonRendererHeader(clsName, parentClass) \
113  mButtonRendererHeader(clsName, parentClass)
114 
123 /* define the render of image static */
124 struct _mMenuButtonRenderer {
125  mMenuButtonRendererHeader(mMenuButton, mButton)
126 };
127 
132 MGNCS_EXPORT extern mMenuButtonClass g_stmMenuButtonCls;
133 
138 enum mMenuButtonProp{
146  NCSP_MNUBTN_POPMENU = NCSP_BUTTON_MAX + 1,
154  NCSP_MNUBTN_CURITEM,
155  NCSP_MNUBTN_MAX
156 };
157 
163 enum eMenuButtonNotify{
169  NCSN_MNUBTN_ITEMCHANGED = NCSN_BUTTON_MAX + 1,
170  NCSN_MNUBTN_MAX
171 };
172 
173 #define NCSS_MNUBTN_SHIFT NCSS_BUTTON_SHIFT
174 
175 
179 #ifdef __cplusplus
180 }
181 #endif /* __cplusplus */
182 
183 #endif /* _MGUI_NCSCTRL_RECTANGLE_H */
184 #endif //_MGNCSCTRL_MENUBUTTON
mButton
Button class, derived from mWidget.