miconview.h
Go to the documentation of this file.00001
00025 #ifdef _MGNCSCTRL_ICONVIEW
00026
00027 #ifndef _MGUI_CTRL_ICONV_H
00028 #define _MGUI_CTRL_ICONV_H
00029
00030
00031 #ifdef __cplusplus
00032 extern "C" {
00033 #endif
00034
00044 typedef struct _NCS_ICONV_ITEMINFO
00045 {
00049 int index;
00050
00054 PBITMAP bmp;
00055
00059 const char *label;
00060
00062 DWORD addData;
00063 }NCS_ICONV_ITEMINFO;
00064
00065 typedef struct _mIconView mIconView;
00066 typedef struct _mIconViewClass mIconViewClass;
00067 typedef struct _mIconViewRenderer mIconViewRenderer;
00068
00073 #define NCSCTRL_ICONVIEW NCSCLASSNAME("iconview")
00074
00079 #define NCSS_ICONV_SHIFT (NCSS_SCRLV_SHIFT)
00080
00085 #define NCSS_ICONV_SORT NCSS_ITEMV_AUTOSORT
00086
00091 #define NCSS_ICONV_LOOP NCSS_ITEMV_LOOP
00092
00093 #define mIconViewHeader(className) \
00094 mItemViewHeader(className) \
00095 int defItemWidth; \
00096 int nrCol; \
00097 DWORD flags;
00098
00114 struct _mIconView
00115 {
00116 mIconViewHeader(mIconView)
00117 };
00118
00119 #define mIconViewClassHeader(clsName, parentClass) \
00120 mItemViewClassHeader(clsName, parentClass) \
00121 void (*setIconSize)(clsName*, int width, int height); \
00122 HITEM (*addItem)(clsName*, NCS_ICONV_ITEMINFO *info, int *pos);
00123
00124
00125 struct _mIconViewClass
00126 {
00127 mIconViewClassHeader(mIconView, mItemView)
00128 };
00129
00144 #define mIconViewRendererHeader(clsName, parentClass) \
00145 mItemViewRendererHeader(clsName, parentClass)
00146
00152 struct _mIconViewRenderer {
00153 mIconViewRendererHeader(mIconView, mItemView)
00154 };
00155
00160 enum mIconViewProp
00161 {
00165 NCSP_ICONV_DEFICONHEIGHT = NCSP_ITEMV_DEFITEMHEIGHT,
00166
00170 NCSP_ICONV_DEFICONWIDTH = NCSP_ITEMV_MAX + 1,
00174 NCSP_ICONV_MAX,
00175 };
00176
00181 enum mIconViewNotify
00182 {
00183 NCSN_ICONV_CLICKED = NCSN_ITEMV_CLICKED,
00184 NCSN_ICONV_SELCHANGED = NCSN_ITEMV_SELCHANGED,
00188 NCSN_ICONV_MAX = NCSN_ITEMV_MAX + 1,
00189 };
00190
00197 MGNCS_EXPORT extern mIconViewClass g_stmIconViewCls;
00200 #ifdef __cplusplus
00201 }
00202 #endif
00203
00204 #endif
00205 #endif //_MGNCSCTRL_ICONVIEW