mGNCS API Reference  v1.2.0
A new control set and a new framework for MiniGUI apps
mlistitem.h
Go to the documentation of this file.
1 
42 #ifndef _MGUI_WIDGET_LSTITM_H
43 #define _MGUI_WIDGET_LSTITM_H
44 
45 
46 #ifdef __cplusplus
47 extern "C" {
48 #endif /* __cplusplus */
49 
55 typedef struct _mListItem mListItem;
56 typedef struct _mListItemClass mListItemClass;
57 
62 #define NCSF_LSTITM_FOLD (0x0001<<NCSF_ITMMNG_SHIFT)
63 
68 #define NCSF_LSTITM_PRIVBKCOL (0x0002<<NCSF_ITMMNG_SHIFT)
69 
74 #define NCSF_LSTITM_PRIVFGCOL (0x0004<<NCSF_ITMMNG_SHIFT)
75 
80 #define NCSF_LSTITM_SHIFT (NCSF_ITMMNG_SHIFT + 3)
81 
82 #define mListItemHeader(className) \
83  mItemManagerHeader(className) \
84  mListItem *parent; \
85  HICON foldIcon; \
86  HICON unfoldIcon; \
87  int showHeight; \
88  int depth; \
89  int bkColor; \
90  int fgColor; \
91  int nrChild;
92 
121 struct _mListItem
122 {
123  mListItemHeader(mListItem)
124 };
125 
126 #define mListItemClassHeader(clsName, superCls) \
127  mItemManagerClassHeader(clsName, superCls) \
128  void (*setBackground)(clsName*, int index, int* color); \
129  void (*setForeground)(clsName*, int index, int* color); \
130  int (*getBackground)(clsName*, int index, int* color); \
131  int (*getForeground)(clsName*, int index, int* color); \
132  BOOL (*addChild)(clsName*, clsName *child); \
133  BOOL (*delChild)(clsName*, clsName *child); \
134  BOOL (*setFold)(clsName*, BOOL fold); \
135  mListItem* (*getParent)(clsName*); \
136  int (*getChildCount)(clsName*); \
137  int (*getDepth)(clsName*); \
138  BOOL (*isFold)(clsName*); \
139 
140 
185 struct _mListItemClass
186 {
187  mListItemClassHeader(mListItem, mItemManager)
188 };
189 
195 {
200 
205 
210 
215 };
216 
223 MGNCS_EXPORT extern mListItemClass g_stmListItemCls;
224 
227 #ifdef __cplusplus
228 }
229 #endif /* __cplusplus */
230 
231 #endif /* _MGUI_WIDGET_LSTITM_H */
232 
The virtual function table of mListItem, which derived from mItemManagerClass.
MGNCS_EXPORT mListItemClass g_stmListItemCls
The instance of mListItemClass.
mListItemProp
The properties id of mListItem.
Definition: mlistitem.h:194
The structure of mListItem. It&#39;s used as item by mListView.
The structure of mItemManager control, which derived from mItem. It is the abstract superclass of all...