mGNCS API Reference
v1.5.0
A new control set and a new framework for MiniGUI apps
include
mlistitem.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_WIDGET_LSTITM_H
55
#define _MGUI_WIDGET_LSTITM_H
56
57
58
#ifdef __cplusplus
59
extern
"C"
{
60
#endif
/* __cplusplus */
61
67
typedef
struct
_mListItem
mListItem
;
68
typedef
struct
_mListItemClass
mListItemClass
;
69
74
#define NCSF_LSTITM_FOLD (0x0001<<NCSF_ITMMNG_SHIFT)
75
80
#define NCSF_LSTITM_PRIVBKCOL (0x0002<<NCSF_ITMMNG_SHIFT)
81
86
#define NCSF_LSTITM_PRIVFGCOL (0x0004<<NCSF_ITMMNG_SHIFT)
87
92
#define NCSF_LSTITM_SHIFT (NCSF_ITMMNG_SHIFT + 3)
93
94
#define mListItemHeader(className) \
95
mItemManagerHeader(className) \
96
mListItem *parent; \
97
HICON foldIcon; \
98
HICON unfoldIcon; \
99
int showHeight; \
100
int depth; \
101
int bkColor; \
102
int fgColor; \
103
int nrChild;
104
133
struct
_mListItem
134
{
135
mListItemHeader(
mListItem
)
136
};
137
138
#define mListItemClassHeader(clsName, superCls) \
139
mItemManagerClassHeader(clsName, superCls) \
140
void (*setBackground)(clsName*, int index, int* color); \
141
void (*setForeground)(clsName*, int index, int* color); \
142
int (*getBackground)(clsName*, int index, int* color); \
143
int (*getForeground)(clsName*, int index, int* color); \
144
BOOL (*addChild)(clsName*, clsName *child); \
145
BOOL (*delChild)(clsName*, clsName *child); \
146
BOOL (*setFold)(clsName*, BOOL fold); \
147
mListItem* (*getParent)(clsName*); \
148
int (*getChildCount)(clsName*); \
149
int (*getDepth)(clsName*); \
150
BOOL (*isFold)(clsName*); \
151
152
197
struct
_mListItemClass
198
{
199
mListItemClassHeader(
mListItem
,
mItemManager
)
200
};
201
206
enum
mListItemProp
207
{
211
NCSP_LSTITM_NRCHILD
=
NCSP_ITMMNG_MAX
+ 1,
212
216
NCSP_LSTITM_DEPTH
,
217
221
NCSP_LSTITM_RHEIGHT
,
222
226
NCSP_LSTITM_MAX
,
227
};
228
235
MGNCS_EXPORT
extern
mListItemClass
g_stmListItemCls
;
236
239
#ifdef __cplusplus
240
}
241
#endif
/* __cplusplus */
242
243
#endif
/* _MGUI_WIDGET_LSTITM_H */
244
NCSP_ITMMNG_MAX
@ NCSP_ITMMNG_MAX
Definition:
mitem_manager.h:452
mListItem
The structure of mListItem. It's used as item by mListView.
NCSP_LSTITM_MAX
@ NCSP_LSTITM_MAX
Definition:
mlistitem.h:226
mListItemClass
The virtual function table of mListItem, which derived from mItemManagerClass.
g_stmListItemCls
MGNCS_EXPORT mListItemClass g_stmListItemCls
The instance of mListItemClass.
NCSP_LSTITM_NRCHILD
@ NCSP_LSTITM_NRCHILD
Definition:
mlistitem.h:211
NCSP_LSTITM_RHEIGHT
@ NCSP_LSTITM_RHEIGHT
Definition:
mlistitem.h:221
mItemManager
The structure of mItemManager control, which derived from mItem. It is the abstract superclass of all...
mListItemProp
mListItemProp
The properties id of mListItem.
Definition:
mlistitem.h:206
NCSP_LSTITM_DEPTH
@ NCSP_LSTITM_DEPTH
Definition:
mlistitem.h:216
Generated by
1.8.17