00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef INC_MGUI_TOPSHELL_H
00022 #define INC_MGUI_TOPSHELL_H
00023
00024 #ifndef INC_MGUI_SHELLBASE_H
00025 #include <mgui/shell.h>
00026 #endif
00027
00028 #ifdef WIN32_MFC
00029 class CFrameWnd;
00030 #endif
00031
00032
00033 namespace MGUI {
00034
00035 enum DOCKEDGE {
00036 DOCKEDGE_Left = 0x1000,
00037 DOCKEDGE_Top = 0x2000,
00038 DOCKEDGE_Right = 0x4000,
00039 DOCKEDGE_Bottom = 0x8000,
00040 DOCKEDGE_Any = 0xF000
00041 };
00042 DEFINE_ENUM_OP_BITWISE(DOCKEDGE);
00043
00044
00045
00046
00047 class TOPSHELL : public MGUI::SHELL {
00048 public:
00049
00050 enum STYLE {
00051 STYLE_Default = 0x0000,
00052 STYLE_NoClose = 0x0001,
00053 STYLE_NoMinimize = 0x0002,
00054 STYLE_NoMaximize = 0x0004,
00055 STYLE_NoResize = 0x0008,
00056 };
00057
00058
00059 TOPSHELL (
00060 HELPID helpid
00061 );
00062
00063
00064 virtual ~TOPSHELL ();
00065
00066
00067 void Create (
00068 const char *PlacementKey = 0,
00069 TEXTID TitleID = TEXTID__None,
00070 STYLE style = TOPSHELL::STYLE_Default
00071 );
00072
00073
00074
00075
00076 void EnableDocking (
00077 DOCKEDGE dockedges = DOCKEDGE_Any
00078 );
00079
00080
00081 void SetVisible (
00082 bool visible = true
00083 );
00084
00085 protected:
00086
00087 private:
00088 #ifndef GENERATING_DOXYGEN_OUTPUT
00089
00090 #ifdef WIN32_MFC
00091 CFrameWnd *m_pFrame;
00092 #endif
00093 #ifdef X_NATIVE
00094 Widget m_form;
00095 #endif
00096
00097 #ifdef X_NATIVE
00098 void AdjustAttachments ();
00099 #endif
00100
00101
00102 virtual LAYOUT_PANE_MAIN& v_GetMainPane ();
00103 virtual void v_Destroy ();
00104
00105 #endif // GENERATING_DOXYGEN_OUTPUT
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115 virtual int v_CreateContent () = 0;
00116
00117
00118 virtual void v_OnClose ();
00119
00120
00121
00122
00123 virtual void v_OnCloseRequest () = 0;
00124
00125
00126 virtual void v_OnOpen ();
00127
00128 };
00129 DEFINE_ENUM_OP_BITWISE(TOPSHELL::STYLE);
00130
00131 }
00132
00133 #endif // INC_MGUI_TOPSHELL_H