mGNCS API Reference  v1.5.0
A new control set and a new framework for MiniGUI apps
miconview.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_ICONVIEW
55 
56 #ifndef _MGUI_CTRL_ICONV_H
57 #define _MGUI_CTRL_ICONV_H
58 
59 
60 #ifdef __cplusplus
61 extern "C" {
62 #endif /* __cplusplus */
63 
73 typedef struct _NCS_ICONV_ITEMINFO
74 {
78  int index;
79 
83  PBITMAP bmp;
84 
88  const char *label;
89 
91  DWORD addData;
92 }NCS_ICONV_ITEMINFO;
93 
94 typedef struct _mIconView mIconView;
95 typedef struct _mIconViewClass mIconViewClass;
96 typedef struct _mIconViewRenderer mIconViewRenderer;
97 
102 #define NCSCTRL_ICONVIEW NCSCLASSNAME("iconview")
103 
108 #define NCSS_ICONV_SHIFT (NCSS_SCRLV_SHIFT)
109 
114 #define NCSS_ICONV_SORT NCSS_ITEMV_AUTOSORT
115 
120 #define NCSS_ICONV_LOOP NCSS_ITEMV_LOOP
121 
122 #define mIconViewHeader(className) \
123  mItemViewHeader(className) \
124  int defItemWidth; \
125  int nrCol; \
126  DWORD flags;
127 
143 struct _mIconView
144 {
145  mIconViewHeader(mIconView)
146 };
147 
148 #define mIconViewClassHeader(clsName, parentClass) \
149  mItemViewClassHeader(clsName, parentClass) \
150  void (*setIconSize)(clsName*, int width, int height); \
151  HITEM (*addItem)(clsName*, NCS_ICONV_ITEMINFO *info, int *pos);
152 
153 
154 struct _mIconViewClass
155 {
156  mIconViewClassHeader(mIconView, mItemView)
157 };
158 
173 #define mIconViewRendererHeader(clsName, parentClass) \
174  mItemViewRendererHeader(clsName, parentClass)
175 
181 struct _mIconViewRenderer {
182  mIconViewRendererHeader(mIconView, mItemView)
183 };
184 
189 enum mIconViewProp
190 {
194  NCSP_ICONV_DEFICONHEIGHT = NCSP_ITEMV_DEFITEMHEIGHT,
195 
199  NCSP_ICONV_DEFICONWIDTH = NCSP_ITEMV_MAX + 1,
203  NCSP_ICONV_MAX,
204 };
205 
210 enum mIconViewNotify
211 {
212  NCSN_ICONV_CLICKED = NCSN_ITEMV_CLICKED,
213  NCSN_ICONV_SELCHANGED = NCSN_ITEMV_SELCHANGED,
217  NCSN_ICONV_MAX = NCSN_ITEMV_MAX + 1,
218 };
219 
226 MGNCS_EXPORT extern mIconViewClass g_stmIconViewCls;
229 #ifdef __cplusplus
230 }
231 #endif /* __cplusplus */
232 
233 #endif /* _MGUI_CTRL_ICONV_H */
234 #endif //_MGNCSCTRL_ICONVIEW
mItemView
The structure of mItemView control, which derived from mScrollWidget. It is the abstract superclass o...
NCSN_ITEMV_CLICKED
@ NCSN_ITEMV_CLICKED
Definition: mitemview.h:585
NCSN_ITEMV_SELCHANGED
@ NCSN_ITEMV_SELCHANGED
Definition: mitemview.h:595
NCSP_ITEMV_MAX
@ NCSP_ITEMV_MAX
Definition: mitemview.h:574
NCSP_ITEMV_DEFITEMHEIGHT
@ NCSP_ITEMV_DEFITEMHEIGHT
Definition: mitemview.h:565
NCSN_ITEMV_MAX
@ NCSN_ITEMV_MAX
Definition: mitemview.h:615