mitem.h

Go to the documentation of this file.
00001 
00026 #ifndef _MGUI_WIDGET_ITEM_H
00027 #define _MGUI_WIDGET_ITEM_H
00028  
00029 
00030 #ifdef __cplusplus
00031 extern "C" {
00032 #endif  /* __cplusplus */
00033 
00039 typedef struct _mItem mItem;
00040 typedef struct _mItemClass mItemClass;
00041 
00046 typedef GHANDLE HITEM;
00047 
00052 #define hEditor HWND
00053 
00058 #define NCSF_ITEM_SHIFT             4
00059 
00064 #define NCSF_ITEM_MASK              0xFFFF
00065 
00070 #define NCSF_ITEM_NORMAL            0x0000
00071 
00076 #define NCSF_ITEM_SELECTED          0x0001
00077 
00082 #define NCSF_ITEM_DISABLED          0x0002
00083 
00088 #define NCSF_ITEM_USEBITMAP         0x0004
00089 
00094 #define NCSF_ITEM_USEICON           0x0008
00095 
00100 #define NCSF_ITEM_IMAGEMASK         (NCSF_ITEM_USEBITMAP | NCSF_ITEM_USEICON)
00101 
00102 #define mItemHeader(className)  \
00103         mObjectHeader(className)    \
00104     list_t  list;               \
00105     list_t  selList;            \
00106     DWORD   flags;              \
00107     char    *string;            \
00108     DWORD   image;              \
00109     hEditor editor;             \
00110     int     height;             \
00111     DWORD   addData;
00112 
00150 struct _mItem
00151 {
00152         mItemHeader(mItem)
00153 };
00154 
00155 #define mItemClassHeader(clsName, superCls)             \
00156         mObjectClassHeader(clsName, superCls)               \
00157         BOOL (*setProperty)(clsName*, int id, DWORD value); \
00158         DWORD (*getProperty)(clsName*, int id);             \
00159     BOOL (*isSelectedItem)(clsName*);                   \
00160     BOOL (*isEnabledItem)(clsName*);                    \
00161     void (*setItemEditor)(clsName*, hEditor editor);    \
00162     hEditor (*getItemEditor)(clsName*);                 \
00163     void (*setItemAddData)(clsName*, DWORD addData);    \
00164     DWORD (*getItemAddData)(clsName*);                  \
00165     void (*setItemImage)(clsName*, DWORD image);        \
00166     DWORD (*getItemImage)(clsName*);                    \
00167     void (*setItemFlags)(clsName*, DWORD flags);        \
00168     DWORD (*getItemFlags)(clsName*);                    \
00169     BOOL (*setItemHeight)(clsName*, int height);        \
00170     int (*getItemHeight)(clsName*);                     \
00171     BOOL (*setItemString)(clsName*, const char* string);\
00172     char* (*getItemString)(clsName*);
00173 
00245 struct _mItemClass
00246 {
00247         mItemClassHeader(mItem, mObject)
00248 };
00249 
00254 enum mItemProp
00255 {
00259     NCSP_ITEM_HEIGHT = 1,
00260 
00264     NCSP_ITEM_FLAGS,
00265 
00269         NCSP_ITEM_MAX,
00270 };
00271 
00278 MGNCS_EXPORT extern mItemClass g_stmItemCls;
00279 
00282 #ifdef __cplusplus
00283 }
00284 #endif  /* __cplusplus */
00285 
00286 #endif /* _MGUI_WIDGET_ITEM_H */
00287 
Generated on Fri Jun 10 11:18:06 2011 for New Control Set V1.0.0 API Reference by  doxygen 1.6.3