mGNCS4Touch API Reference  v1.5.0
A set of mGNCS-compliant controls for devices with a touch screen.
miconflow.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 #ifndef _MGUI_CTRL_ICONFLOW_H
55 #define _MGUI_CTRL_ICONFLOW_H
56 
57 #ifdef __cplusplus
58 extern "C" {
59 #endif /* __cplusplus */
60 
70 typedef struct _NCS_ICONFLOW_ITEMINFO
71 {
75  int index;
76 
80  PBITMAP bmp;
81 
85  const char *label;
86 
88  DWORD addData;
90 
91 typedef struct _mIconFlow mIconFlow;
92 typedef struct _mIconFlowClass mIconFlowClass;
93 typedef struct _mIconFlowRenderer mIconFlowRenderer;
94 
99 #define NCSCTRL_ICONFLOW NCSCLASSNAME("iconflow")
100 
105 #define NCSS_ICONFLOW_SHIFT (NCSS_ITEMV_SHIFT+1)
106 
111 #define NCSS_ICONFLOW_SORT (NCSS_ITEMV_AUTOSORT)
112 
113 #define NCSS_ICONFLOW_VERTICAL (0x0001<<NCSS_ITEMV_SHIFT)
114 
115 enum ICONFLOW_DIRECTION
116 {
117  ICONFLOW_DIR_NONE,
118  ICONFLOW_DIR_PREV,
119  ICONFLOW_DIR_NEXT
120 };
121 
122 typedef struct _ICONFLOW_POINT3D {
123  int x;
124  int y;
125  float z;
126 } ICONFLOW_POINT3D;
127 
132 #define NCSS_ICONFLOW_LOOP NCSS_ITEMV_LOOP
133 
134 #define mIconFlowHeader(className) \
135  mItemViewHeader(className) \
136  mHotPiece *bkgndPiece; \
137  HDC iconFrameDC; \
138  HDC drawBuffDC; \
139  float key; \
140  int visItemCount; \
141  int prevIndex; \
142  ICONFLOW_POINT3D point3d[20]; \
143  int defItemWidth; \
144  unsigned span; \
145  POINT mouse; \
146  BOOL isVertical; \
147  unsigned iconBorder; \
148  BOOL iconUseZoom; \
149  enum ICONFLOW_DIRECTION direction;
150 
166 struct _mIconFlow
167 {
168  mIconFlowHeader(mIconFlow)
169 };
170 
171 #define mIconFlowClassHeader(clsName, parentClass) \
172  mItemViewClassHeader(clsName, parentClass) \
173  void (*beginAnimation)(clsName*, float startvalue, float endvalue); \
174  void (*endAnimation)(clsName*); \
175  void (*drawItem)(clsName*, HITEM hItem, HDC hdc, RECT *rcDraw); \
176  void (*runAnimation)(clsName*, float startvalue, float endvalue); \
177  void (*setVisItemCenter)(clsName*, int count ,int width, int height); \
178  void (*setIconSize)(clsName*, int width, int height); \
179  void (*setVisItemCount)(clsName*, int count); \
180  void (*setSpan)(clsName*, int span); \
181  HITEM (*addItem)(clsName*, NCS_ICONFLOW_ITEMINFO *info, int *pos);
182 
183 struct _mIconFlowClass
184 {
185  mIconFlowClassHeader(mIconFlow, mItemView)
186 };
187 
202 #define mIconFlowRendererHeader(clsName, parentClass) \
203  mItemViewRendererHeader(clsName, parentClass)
204 
210 struct _mIconFlowRenderer {
211  mIconFlowRendererHeader(mIconFlow, mItemView)
212 };
213 
219 {
223  NCSP_ICONFLOW_DEFICONHEIGHT = NCSP_ITEMV_DEFITEMHEIGHT,
224 
228  NCSP_ICONFLOW_DEFICONWIDTH = NCSP_ITEMV_MAX + 1,
229  NCSP_ICONFLOW_BKGNDPIECE,
230  NCSP_ICONFLOW_VISITEMCOUNT,
231  NCSP_ICONFLOW_ICONFRAME,
232  NCSP_ICONFLOW_SPAN,
233  NCSP_ICONFLOW_ICONBORDER,
234  NCSP_ICONFLOW_ICONUSEZOOM,
239 };
240 
246 {
247  NCSN_ICONFLOW_ENTER = NCSN_ITEMV_ENTER,
248  NCSN_ICONFLOW_CLICKED = NCSN_ITEMV_CLICKED,
249  NCSN_ICONFLOW_SELCHANGED = NCSN_ITEMV_SELCHANGED,
253  NCSN_ICONFLOW_MAX = NCSN_ITEMV_MAX + 1,
254 };
255 
262 MGNCS_EXPORT extern mIconFlowClass g_stmIconFlowCls;
265 #ifdef __cplusplus
266 }
267 #endif /* __cplusplus */
268 
269 #endif /* _MGUI_CTRL_ICONFLOW_H */
mIconFlowProp
mIconFlowProp
The properties id of mIconFlow.
Definition: miconflow.h:218
g_stmIconFlowCls
MGNCS_EXPORT mIconFlowClass g_stmIconFlowCls
The instance of mIconFlowClass.
_NCS_ICONFLOW_ITEMINFO::addData
DWORD addData
Definition: miconflow.h:88
mIconFlowRenderer
The structure of mIconFlow effector, which derived from mItemViewRenderer.
mIconFlowClass
The virtual function table of mIconFlow, which derived from mItemViewClass.
_NCS_ICONFLOW_ITEMINFO::index
int index
Definition: miconflow.h:75
NCSN_ICONFLOW_MAX
@ NCSN_ICONFLOW_MAX
Definition: miconflow.h:253
NCSP_ICONFLOW_DEFICONHEIGHT
@ NCSP_ICONFLOW_DEFICONHEIGHT
Definition: miconflow.h:223
NCS_ICONFLOW_ITEMINFO
struct _NCS_ICONFLOW_ITEMINFO NCS_ICONFLOW_ITEMINFO
NCSP_ICONFLOW_MAX
@ NCSP_ICONFLOW_MAX
Definition: miconflow.h:238
NCSP_ICONFLOW_DEFICONWIDTH
@ NCSP_ICONFLOW_DEFICONWIDTH
Definition: miconflow.h:228
mIconFlow
The structure of mIconFlow control, which derived from mItemView. It is the abstract superclass of al...
_NCS_ICONFLOW_ITEMINFO::bmp
PBITMAP bmp
Definition: miconflow.h:80
mIconFlowNotify
mIconFlowNotify
The notification code id of mIconFlow.
Definition: miconflow.h:245
_NCS_ICONFLOW_ITEMINFO
Definition: miconflow.h:70
_NCS_ICONFLOW_ITEMINFO::label
const char * label
Definition: miconflow.h:85