44 #ifndef _MGUI_NCSCTRL_BOXLAYOUTPIECE_H
45 #define _MGUI_NCSCTRL_BOXLAYOUTPIECE_H
51 typedef struct _mBoxLayoutPieceClass mBoxLayoutPieceClass;
52 typedef struct _mBoxLayoutPiece mBoxLayoutPiece;
54 #define mBoxLayoutPieceClassHeader(clss, superCls) \
55 mLayoutPieceClassHeader(clss, superCls) \
57 void (*recalcBox)(clss *); \
58 int (*getCellAutoSize)(clss *, int i); \
60 int (*setCellInfo)(clss *, int idx, int size, int type, BOOL bupdate); \
61 mHotPiece* (*setCell)(clss *, int idx, mHotPiece *cell); \
62 mHotPiece* (*getCell)(clss *, int idx);
64 struct _mBoxLayoutPieceClass
66 mBoxLayoutPieceClassHeader(mBoxLayoutPiece, mLayoutPiece)
69 MGNCS_EXPORT
extern mBoxLayoutPieceClass g_stmBoxLayoutPieceCls;
71 #define mBoxLayoutPieceHeader(clss) \
72 mLayoutPieceHeader(clss) \
77 unsigned short count; \
78 unsigned char margin; \
79 unsigned char space; \
80 unsigned short * cell_info; \
84 struct _mBoxLayoutPiece
86 mBoxLayoutPieceHeader(mBoxLayoutPiece)
89 #define mBoxLayoutPiece_getSizeType(size) mLayoutPiece_getSizeType(size)
90 #define mBoxLayoutPiece_setSizeType(size, type) mLayoutPiece_setSizeType(size, type)
91 #define mBoxLayoutPiece_setSize(size, value) mLayoutPiece_setSize(size, value)
92 #define mBoxLayoutPiece_getSize(size) mLayoutPiece_getSize(size)
95 enum mBoxLayoutPieceProps{
96 NCSP_BOXLAYOUTPIECE_COUNT = BOXLAYOUTPIECE_PROP_BEGIN,
97 NCSP_BOXLAYOUTPIECE_SPACE = PIECECOMM_PROP_SPACE,
98 NCSP_BOXLAYOUTPIECE_MARGIN = PIECECOMM_PROP_MARGIN
103 BOOL mBoxLayoutPiece_calcSize(mBoxLayoutPiece *
self,
int total_size,
int *sizes);