mGNCS API Reference  v1.2.0
A new control set and a new framework for MiniGUI apps
miconview.h
Go to the documentation of this file.
1 
42 #ifdef _MGNCSCTRL_ICONVIEW
43 
44 #ifndef _MGUI_CTRL_ICONV_H
45 #define _MGUI_CTRL_ICONV_H
46 
47 
48 #ifdef __cplusplus
49 extern "C" {
50 #endif /* __cplusplus */
51 
61 typedef struct _NCS_ICONV_ITEMINFO
62 {
66  int index;
67 
71  PBITMAP bmp;
72 
76  const char *label;
77 
79  DWORD addData;
80 }NCS_ICONV_ITEMINFO;
81 
82 typedef struct _mIconView mIconView;
83 typedef struct _mIconViewClass mIconViewClass;
84 typedef struct _mIconViewRenderer mIconViewRenderer;
85 
90 #define NCSCTRL_ICONVIEW NCSCLASSNAME("iconview")
91 
96 #define NCSS_ICONV_SHIFT (NCSS_SCRLV_SHIFT)
97 
102 #define NCSS_ICONV_SORT NCSS_ITEMV_AUTOSORT
103 
108 #define NCSS_ICONV_LOOP NCSS_ITEMV_LOOP
109 
110 #define mIconViewHeader(className) \
111  mItemViewHeader(className) \
112  int defItemWidth; \
113  int nrCol; \
114  DWORD flags;
115 
131 struct _mIconView
132 {
133  mIconViewHeader(mIconView)
134 };
135 
136 #define mIconViewClassHeader(clsName, parentClass) \
137  mItemViewClassHeader(clsName, parentClass) \
138  void (*setIconSize)(clsName*, int width, int height); \
139  HITEM (*addItem)(clsName*, NCS_ICONV_ITEMINFO *info, int *pos);
140 
141 
142 struct _mIconViewClass
143 {
144  mIconViewClassHeader(mIconView, mItemView)
145 };
146 
161 #define mIconViewRendererHeader(clsName, parentClass) \
162  mItemViewRendererHeader(clsName, parentClass)
163 
169 struct _mIconViewRenderer {
170  mIconViewRendererHeader(mIconView, mItemView)
171 };
172 
177 enum mIconViewProp
178 {
182  NCSP_ICONV_DEFICONHEIGHT = NCSP_ITEMV_DEFITEMHEIGHT,
183 
187  NCSP_ICONV_DEFICONWIDTH = NCSP_ITEMV_MAX + 1,
191  NCSP_ICONV_MAX,
192 };
193 
198 enum mIconViewNotify
199 {
200  NCSN_ICONV_CLICKED = NCSN_ITEMV_CLICKED,
201  NCSN_ICONV_SELCHANGED = NCSN_ITEMV_SELCHANGED,
205  NCSN_ICONV_MAX = NCSN_ITEMV_MAX + 1,
206 };
207 
214 MGNCS_EXPORT extern mIconViewClass g_stmIconViewCls;
217 #ifdef __cplusplus
218 }
219 #endif /* __cplusplus */
220 
221 #endif /* _MGUI_CTRL_ICONV_H */
222 #endif //_MGNCSCTRL_ICONVIEW
The structure of mItemView control, which derived from mScrollWidget. It is the abstract superclass o...