mbuttongroup.h

00001 
00002 #ifndef _MGUI_NCSCTRL_BTNGRP_H
00003 #define _MGUI_NCSCTRL_BTNGRP_H
00004 
00005 #ifdef __cplusplus
00006 extern "C" {
00007 #endif  /* __cplusplus */
00008 
00018 #define NCSCTRL_BUTTONGROUP        NCSCLASSNAME("buttongroup")
00019 
00020 typedef struct _mButtonGroup mButtonGroup;
00021 typedef struct _mButtonGroupClass mButtonGroupClass;
00022 typedef struct _mButtonGroupRenderer mButtonGroupRenderer;
00023 
00024 typedef struct _mButtonNode mButtonNode;
00035 struct _mButtonNode
00036 {
00037         mWidget         *pbtn;
00038         mButtonNode     *next;
00039 };
00040 
00041 #define mButtonGroupHeader(clsName) \
00042         mGroupBoxHeader(clsName) \
00043     mButtonNode *pBtnList; 
00044 
00053 struct _mButtonGroup
00054 {
00055         mButtonGroupHeader(mButtonGroup)
00056 };
00057 
00058 #define mButtonGroupClassHeader(clsName, parentClass) \
00059         mGroupBoxClassHeader(clsName, parentClass) \
00060 /*private*/ \
00061     BOOL (*addButton)(clsName *group, mWidget *button); \
00062         BOOL (*checkBtn)(clsName *group, mWidget *btn_to_check);
00063 
00082 struct _mButtonGroupClass
00083 {
00084         mButtonGroupClassHeader(mButtonGroup, mGroupBox)
00085 };
00086 
00087 #define mButtonGroupRendererHeader(clsName, parentClass) \
00088         mGroupBoxRendererHeader(clsName, parentClass) \
00089     void (*drawButtongroup)(clsName *self, HDC, const RECT*);
00090 
00102 /* define the render of image static */
00103 struct _mButtonGroupRenderer {
00104         mButtonGroupRendererHeader(mButtonGroup, mGroupBox)
00105 };
00106 
00111 MGNCS_EXPORT extern mButtonGroupClass g_stmButtonGroupCls;
00112 
00117 enum mButtonGroupProp {
00125         NCSP_BTNGRP_SELID = NCSP_GRPBOX_MAX + 1,
00134         NCSP_BTNGRP_SELIDX,
00142         NCSP_BTNGRP_SELOBJ,
00143         NCSP_BTNGRP_MAX
00144 };
00145 
00146 #define NCSS_BTNGRP_SHIFT NCSS_GRPBOX_SHIFT
00147 
00152 enum enumButtonGroupNotify{
00159         NCSN_BTNGRP_SELCHANGED = NCSN_GRPBOX_MAX + 1,
00160         NCSN_BTNGRP_MAX
00161 };
00162 
00166 #ifdef __cplusplus
00167 }
00168 #endif  /* __cplusplus */
00169 
00170 #endif /* _MGUI_NCSCTRL_BTNGRP_H */
00171 
Generated on Fri Jun 10 11:18:06 2011 for New Control Set V1.0.0 API Reference by  doxygen 1.6.3