mlist_layout.h

Go to the documentation of this file.
00001 
00026 #ifndef _MGUI_WIDGET_LAYOUT_H
00027 #define _MGUI_WIDGET_LAYOUT_H
00028 
00029 #ifdef _MGNCSCTRL_LIST
00030 
00031 #ifdef __cplusplus
00032 extern "C" {
00033 #endif  /* __cplusplus */
00034 
00040 typedef struct _mListLayout mListLayout;
00041 typedef struct _mListLayoutClass mListLayoutClass;
00042 
00043 #define mListLayoutHeader(className)\
00044         mObjectHeader(className) \
00045     mAbstractList *list;            \
00046     Uint16  itemHeight;             \
00047     Uint16  itemWidth;
00048 
00049 struct _mListLayout
00050 {
00051         mListLayoutHeader(mListLayout)
00052 };
00053 
00054 #define mListLayoutClassHeader(clsName, superCls)           \
00055         mObjectClassHeader(clsName, superCls)            \
00056         BOOL (*setProperty)(clsName*, int id, DWORD value);     \
00057         DWORD (*getProperty)(clsName*, int id);                 \
00058     mNode* (*onDirKey)(clsName*,mNode* refNode, int direct);\
00059     mNode* (*onMouseHit)(clsName*, int mouseX, int mouseY); \
00060     int (*getNodeRect)(clsName*, mNode *node, RECT *rcNode);\
00061     BOOL (*recalcContSize)(clsName*, int flags);            \
00062     void (*init)(clsName*, mAbstractList *list, int defItemW, int defItemH);\
00063     void (*update)(clsName*, HDC hdc, const RECT* rcVis, RECT *rcCont);     \
00064     void (*nodeEvent)(clsName*, int eventId, DWORD eventInfo);
00065 
00066 struct _mListLayoutClass
00067 {
00068         mListLayoutClassHeader(mListLayout, mObject)
00069 };
00070 
00071 enum mListLayoutStatus
00072 {
00073      NCSF_LIST_LAYOUT_ITEMHCHANGED = 0x01,
00074      NCSF_LIST_LAYOUT_ITEMWCHANGED = 0x02,
00075 };
00076 
00081 enum mListLayoutProp
00082 {
00083 
00084     NCSP_LIST_LAYOUT_DEFITEMHEIGHT = 10,//RW
00085     NCSP_LIST_LAYOUT_DEFITEMWIDTH, //RW
00089         NCSP_LIST_LAYOUT_MAX,
00090 };
00091 
00098 MGNCS_EXPORT extern mListLayoutClass g_stmListLayoutCls;
00099 
00102 /*=========================================================*/
00103 typedef struct _mLVIconLayout mLVIconLayout;
00104 typedef struct _mLVIconLayoutClass mLVIconLayoutClass;
00105 
00106 #define mLVIconLayoutHeader(className)  \
00107     mListLayoutHeader(className)        \
00108     int nrCol;
00109 
00110 struct _mLVIconLayout
00111 {
00112         mLVIconLayoutHeader(mLVIconLayout)
00113 };
00114 
00115 #define mLVIconLayoutClassHeader(clsName, superCls) \
00116         mListLayoutClassHeader(clsName, superCls)
00117 
00118 struct _mLVIconLayoutClass
00119 {
00120         mLVIconLayoutClassHeader(mLVIconLayout, mListLayout)
00121 };
00122 
00123 MGNCS_EXPORT extern mLVIconLayoutClass g_stmLVIconLayoutCls;
00124 
00125 /*=========================================================*/
00126 typedef struct _mLHIconLayout mLHIconLayout;
00127 typedef struct _mLHIconLayoutClass mLHIconLayoutClass;
00128 
00129 #define mLHIconLayoutHeader(className)  \
00130     mListLayoutHeader(className)        \
00131     Uint16 nrRow;
00132 
00133 struct _mLHIconLayout
00134 {
00135         mLHIconLayoutHeader(mLHIconLayout)
00136 };
00137 
00138 #define mLHIconLayoutClassHeader(clsName, superCls) \
00139         mListLayoutClassHeader(clsName, superCls)
00140 
00141 struct _mLHIconLayoutClass
00142 {
00143         mLHIconLayoutClassHeader(mLHIconLayout, mListLayout)
00144 };
00145 
00146 MGNCS_EXPORT extern mLHIconLayoutClass g_stmLHIconLayoutCls;
00147 
00148 /*=========================================================*/
00149 typedef struct _mLHCenterBoxLayout mLHCenterBoxLayout;
00150 typedef struct _mLHCenterBoxLayoutClass mLHCenterBoxLayoutClass;
00151 
00152 #define mLHCenterBoxLayoutHeader(className)     \
00153     mLHIconLayoutHeader(className)              \
00154     int offx;
00155 
00156 struct _mLHCenterBoxLayout
00157 {
00158         mLHCenterBoxLayoutHeader(mLHIconLayout)
00159 };
00160 
00161 #define mLHCenterBoxLayoutClassHeader(clsName, superCls) \
00162         mLHIconLayoutClassHeader(clsName, superCls)
00163 
00164 struct _mLHCenterBoxLayoutClass
00165 {
00166         mLHCenterBoxLayoutClassHeader(mLHCenterBoxLayout, mLHIconLayout)
00167 };
00168 
00173 enum mLHCenterBoxLayoutProp
00174 {
00178     NCSP_HCBOX_LAYOUT_OFFX = NCSP_LIST_LAYOUT_MAX + 1, //RO
00182         NCSP_HCBOX_LAYOUT_MAX,
00183 };
00184 
00185 MGNCS_EXPORT extern mLHCenterBoxLayoutClass g_stmLHCenterBoxLayoutCls;
00186 
00187 /*=========================================================*/
00188 typedef struct _NCS_GROUP_INFO
00189 {
00190     int id;
00191     char *text;
00192     DWORD addData;
00193 }NCS_GROUP_INFO;
00194 
00195 typedef struct _mLGroupLayout mLGroupLayout;
00196 typedef struct _mLGroupLayoutClass mLGroupLayoutClass;
00197 
00198 #define NCSID_UNNAMED_GROUP         0
00199 #define NCSID_UNNAMED_GROUPTEXT     "Unnamed"
00200 //return group id, if no group return NCSID_UNNAMED_GROUP
00201 typedef int (*NCS_CB_INGROUP)(mNode *node);
00202 
00203 #define mLGroupLayoutHeader(className)  \
00204     mLVIconLayoutHeader(className)      \
00205     NCS_CB_CMPNODE  cbCmpNode;          \
00206     NCS_CB_CMPNODE  cbCmpGroup;         \
00207     NCS_CB_INGROUP  cbInGroup;          \
00208     BOOL            defaultGroup;       \
00209     mNode           *groupRoot;         \
00210     int             defGroupH;
00211 
00212 struct _mLGroupLayout
00213 {
00214         mLGroupLayoutHeader(mLGroupLayout)
00215 };
00216 
00217 #define mLGroupLayoutClassHeader(clsName, superCls) \
00218         mLVIconLayoutClassHeader(clsName, superCls)       \
00219     void (*setGroupInfo)(clsName*, NCS_CB_INGROUP inGroup, NCS_GROUP_INFO *groupInfo, int groupSize);\
00220     NCS_CB_CMPNODE (*decorateNodeCmp)(clsName*, NCS_CB_CMPNODE func);   \
00221     NCS_CB_INGROUP (*setInGroupFunc)(clsName*, NCS_CB_INGROUP func);    \
00222     BOOL (*resetGroup)(clsName*, NCS_GROUP_INFO *groupInfo, int groupSize);
00223 
00224 struct _mLGroupLayoutClass
00225 {
00226         mLGroupLayoutClassHeader(mLGroupLayout, mLVIconLayout)
00227 };
00228 
00229 
00234 enum mLGroupLayoutProp
00235 {
00236 
00237     NCSP_LGROUP_LAYOUT_NODECMPFUNC = NCSP_LIST_LAYOUT_MAX + 1, //RO
00238 
00239     NCSP_LGROUP_LAYOUT_GROUPCMPFUNC,//RW
00243         NCSP_LGROUP_LAYOUT_MAX,
00244 };
00245 
00246 MGNCS_EXPORT extern mLGroupLayoutClass g_stmLGroupLayoutCls;
00247 
00248 #ifdef __cplusplus
00249 }
00250 #endif  /* __cplusplus */
00251 
00252 #endif /* _MGUI_WIDGET_LAYOUT_H */
00253 #endif //_MGNCSCTRL_LIST
00254 
Generated on Fri Jun 10 11:18:06 2011 for New Control Set V1.0.0 API Reference by  doxygen 1.6.3