1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk/frame.h
4 // Author: Vaclav Slavik
6 // Copyright: (c) 2001 Vaclav Slavik
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
11 #ifndef __MGL_FRAME_H__
12 #define __MGL_FRAME_H__
15 #pragma interface "frame.h"
18 //-----------------------------------------------------------------------------
20 //-----------------------------------------------------------------------------
22 class WXDLLEXPORT wxMDIChildFrame
;
23 class WXDLLEXPORT wxMDIClientWindow
;
24 class WXDLLEXPORT wxMenu
;
25 class WXDLLEXPORT wxMenuBar
;
26 class WXDLLEXPORT wxToolBar
;
27 class WXDLLEXPORT wxStatusBar
;
29 class WXDLLEXPORT wxFrame
;
31 //-----------------------------------------------------------------------------
33 //-----------------------------------------------------------------------------
36 class WXDLLEXPORT wxFrame
: public wxFrameBase
41 wxFrame(wxWindow
*parent
,
43 const wxString
& title
,
44 const wxPoint
& pos
= wxDefaultPosition
,
45 const wxSize
& size
= wxDefaultSize
,
46 long style
= wxDEFAULT_FRAME_STYLE
,
47 const wxString
& name
= wxFrameNameStr
)
51 Create(parent
, id
, title
, pos
, size
, style
, name
);
54 bool Create(wxWindow
*parent
,
56 const wxString
& title
,
57 const wxPoint
& pos
= wxDefaultPosition
,
58 const wxSize
& size
= wxDefaultSize
,
59 long style
= wxDEFAULT_FRAME_STYLE
,
60 const wxString
& name
= wxFrameNameStr
) {}
64 // implement base class pure virtuals
65 virtual void Maximize(bool maximize
= TRUE
) {}
66 virtual bool IsMaximized() const {}
67 virtual void Iconize(bool iconize
= TRUE
) {}
68 virtual bool IsIconized() const {}
69 virtual void SetIcon(const wxIcon
& icon
) {}
70 virtual void MakeModal(bool modal
= TRUE
) {}
71 virtual void Restore() {}
74 virtual void SetMenuBar( wxMenuBar
*menuBar
) {}
78 virtual void PositionStatusBar() {}
80 virtual wxStatusBar
* CreateStatusBar(int number
= 1,
81 long style
= wxST_SIZEGRIP
,
83 const wxString
& name
= wxStatusLineNameStr
) {}
84 #endif // wxUSE_STATUSBAR
87 virtual wxToolBar
* CreateToolBar(long style
= wxNO_BORDER
| wxTB_HORIZONTAL
| wxTB_FLAT
,
89 const wxString
& name
= wxToolBarNameStr
) {}
90 void SetToolBar(wxToolBar
*toolbar
) {}
91 #endif // wxUSE_TOOLBAR
93 virtual bool Show(bool show
= TRUE
) {}
95 virtual void SetTitle( const wxString
&title
) {}
96 virtual wxString
GetTitle() const { return m_title
; }
98 // implementation from now on
99 // --------------------------
101 // move the window to the specified location and resize it: this is called
102 // from both DoSetSize() and DoSetClientSize()
103 virtual void DoMoveWindow(int x
, int y
, int width
, int height
) {}
106 virtual void GtkOnSize( int x
, int y
, int width
, int height
) {}
107 virtual void OnInternalIdle() {}
112 bool m_menuBarDetached
;
113 bool m_toolBarDetached
;
114 bool m_insertInClientArea
; /* not from within OnCreateXXX */
117 // common part of all ctors
120 // override wxWindow methods to take into account tool/menu/statusbars
121 virtual void DoSetSize(int x
, int y
,
122 int width
, int height
,
123 int sizeFlags
= wxSIZE_AUTO
) {}
125 virtual void DoSetClientSize(int width
, int height
) {}
126 virtual void DoGetClientSize( int *width
, int *height
) const {}
129 DECLARE_DYNAMIC_CLASS(wxFrame
)
132 #endif // __WX_FRAME_H__