mmainwnd.h

00001 /*
00002  * \file mmainwnd.h
00003  * \author dongjunjie
00004  * \date 2009/01/01
00005  *
00006  * This file include the main window defines
00007  *
00008  * \verbatim
00009  *
00010  *      This file is part of mgncs, new control of MiniGUI
00011  *
00012  *      \endverbatim
00013  *
00014  */
00015 #ifndef _MGUI_CTRL_MNWND_H
00016 #define _MGUI_CTRL_MNWND_H
00017 
00018 #ifdef __cplusplus
00019 extern "C" {
00020 #endif
00021 
00031 #define NCSCTRL_MAINWND NCSCLASSNAME("mainwnd")
00032 
00033 typedef struct _mMainWnd mMainWnd;
00034 typedef struct _mMainWndClass mMainWndClass;
00035 typedef struct _mMainWndRenderer mMainWndRenderer;
00036 
00037 /*define mMainWndRender */
00038 #define mMainWndRendererHeader(clsName, parentClass) \
00039         mPanelRendererHeader(clsName, parentClass)
00040 
00048 struct _mMainWndRenderer
00049 {
00050         mMainWndRendererHeader(mMainWnd, mPanel)
00051 };
00052 
00053 /* define mMainWnd */
00054 #define mMainWndHeader(className) \
00055         mPanelHeader(className) \
00056         mComponent* parentCmp; \
00057         mComponent* nextCmp, *prevCmp;
00058 
00065 struct _mMainWnd {
00066         mMainWndHeader(mMainWnd)
00067 };
00068 
00069 #define MSG_MNWND_ENDDIALOG   MSG_LASTUSERMSG + 4
00070 //lParam is exit code
00071 //wParam is the special flag, used by interal
00072 
00073 /* define mMainWndClass */
00074 #define mMainWndClassHeader(clsName, parentClass) \
00075         mPanelClassHeader(clsName, parentClass) \
00076         DWORD (*doModal)(clsName*,BOOL AutoDestroy);    \
00077         BOOL (*endDialog)(clsName*, DWORD code);
00078 
00093 struct _mMainWndClass
00094 {
00095         mMainWndClassHeader(mMainWnd, mPanel)
00096 };
00097 
00098 #define DECLARE_MAINWND_CLASS(clss, clssSuper)      \
00099         typedef mMainWndRenderer clss##Renderer;        \
00100         DECLARE_CLASS(clss, clssSuper)
00101 
00102 #define NCS_MAINWND_ISMODE(obj)  (INSTANCEOF(obj, mMainWnd) && (GetWindowStyle(obj->hwnd) & NCSS_MNWND_MODE))
00103 
00107 MGNCS_EXPORT extern mMainWndClass g_stmMainWndCls; //Class(mMainWnd);
00108 
00109 enum enumMainWndProp {
00110         NCSP_MNWND_MAX = NCSP_PANEL_MAX + 1
00111 };
00112 
00119 #define NCSS_MNWND_MODE  (1<<NCSS_PANEL_SHIFT)
00120 #define NCSS_MNWND_SHIFT (NCSS_PANEL_SHIFT+1)
00121 enum enumMainWndNotify{
00122         NCSN_MNWND_MAX = NCSN_PANEL_MAX + 1
00123 };
00124 
00127 #ifdef __cplusplus
00128 }
00129 #endif
00130 
00131 #endif
00132 
Generated on Fri Jun 10 11:18:06 2011 for New Control Set V1.0.0 API Reference by  doxygen 1.6.3