mlistitem.h

Go to the documentation of this file.
00001 
00026 #ifndef _MGUI_WIDGET_LSTITM_H
00027 #define _MGUI_WIDGET_LSTITM_H
00028  
00029 
00030 #ifdef __cplusplus
00031 extern "C" {
00032 #endif  /* __cplusplus */
00033 
00039 typedef struct _mListItem mListItem;
00040 typedef struct _mListItemClass mListItemClass;
00041 
00046 #define NCSF_LSTITM_FOLD          (0x0001<<NCSF_ITMMNG_SHIFT)
00047 
00052 #define NCSF_LSTITM_PRIVBKCOL     (0x0002<<NCSF_ITMMNG_SHIFT)
00053 
00058 #define NCSF_LSTITM_PRIVFGCOL     (0x0004<<NCSF_ITMMNG_SHIFT)
00059 
00064 #define NCSF_LSTITM_SHIFT         (NCSF_ITMMNG_SHIFT + 3)
00065 
00066 #define mListItemHeader(className)  \
00067         mItemManagerHeader(className)   \
00068     mListItem *parent;      \
00069     HICON   foldIcon;       \
00070     HICON   unfoldIcon;     \
00071     int     showHeight;     \
00072     int     depth;          \
00073     int     bkColor;        \
00074     int     fgColor;        \
00075     int     nrChild;
00076 
00105 struct _mListItem
00106 {
00107         mListItemHeader(mListItem)
00108 };
00109 
00110 #define mListItemClassHeader(clsName, superCls)             \
00111         mItemManagerClassHeader(clsName, superCls)              \
00112     void (*setBackground)(clsName*, int index, int* color); \
00113     void (*setForeground)(clsName*, int index, int* color); \
00114     int (*getBackground)(clsName*, int index, int* color);  \
00115     int (*getForeground)(clsName*, int index, int* color);  \
00116     BOOL (*addChild)(clsName*, clsName *child);             \
00117     BOOL (*delChild)(clsName*, clsName *child);             \
00118     BOOL (*setFold)(clsName*, BOOL fold);                   \
00119     mListItem* (*getParent)(clsName*);                      \
00120     int (*getChildCount)(clsName*);                         \
00121     int (*getDepth)(clsName*);                              \
00122     BOOL (*isFold)(clsName*);                               \
00123 
00124 
00169 struct _mListItemClass
00170 {
00171         mListItemClassHeader(mListItem, mItemManager)
00172 };
00173 
00178 enum mListItemProp
00179 {
00183     NCSP_LSTITM_NRCHILD = NCSP_ITMMNG_MAX + 1,
00184 
00188     NCSP_LSTITM_DEPTH,
00189 
00193     NCSP_LSTITM_RHEIGHT,
00194 
00198         NCSP_LSTITM_MAX,
00199 };
00200 
00207 MGNCS_EXPORT extern mListItemClass g_stmListItemCls;
00208 
00211 #ifdef __cplusplus
00212 }
00213 #endif  /* __cplusplus */
00214 
00215 #endif /* _MGUI_WIDGET_LSTITM_H */
00216 
Generated on Fri Jun 10 11:18:06 2011 for New Control Set V1.0.0 API Reference by  doxygen 1.6.3