]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/frame.h
update to 2.9.0
[wxWidgets.git] / include / wx / gtk / frame.h
CommitLineData
c801d85f 1/////////////////////////////////////////////////////////////////////////////
7c0ea335 2// Name: wx/gtk/frame.h
c801d85f
KB
3// Purpose:
4// Author: Robert Roebling
58614078
RR
5// Id: $Id$
6// Copyright: (c) 1998 Robert Roebling, Julian Smart
65571936 7// Licence: wxWindows licence
c801d85f
KB
8/////////////////////////////////////////////////////////////////////////////
9
b5e31cc8
PC
10#ifndef _WX_GTK_FRAME_H_
11#define _WX_GTK_FRAME_H_
c801d85f 12
c801d85f
KB
13//-----------------------------------------------------------------------------
14// classes
15//-----------------------------------------------------------------------------
16
b5dbe15d
VS
17class WXDLLIMPEXP_FWD_CORE wxMDIChildFrame;
18class WXDLLIMPEXP_FWD_CORE wxMDIClientWindow;
19class WXDLLIMPEXP_FWD_CORE wxMenu;
20class WXDLLIMPEXP_FWD_CORE wxMenuBar;
21class WXDLLIMPEXP_FWD_CORE wxToolBar;
22class WXDLLIMPEXP_FWD_CORE wxStatusBar;
c801d85f 23
c801d85f 24//-----------------------------------------------------------------------------
0d53fc34 25// wxFrame
c801d85f
KB
26//-----------------------------------------------------------------------------
27
20123d49 28class WXDLLIMPEXP_CORE wxFrame : public wxFrameBase
c801d85f 29{
bfc6fde4 30public:
7c0ea335 31 // construction
0d53fc34
VS
32 wxFrame() { Init(); }
33 wxFrame(wxWindow *parent,
1e6feb95
VZ
34 wxWindowID id,
35 const wxString& title,
36 const wxPoint& pos = wxDefaultPosition,
37 const wxSize& size = wxDefaultSize,
38 long style = wxDEFAULT_FRAME_STYLE,
39 const wxString& name = wxFrameNameStr)
7c0ea335
VZ
40 {
41 Init();
42
43 Create(parent, id, title, pos, size, style, name);
44 }
45
46 bool Create(wxWindow *parent,
47 wxWindowID id,
48 const wxString& title,
49 const wxPoint& pos = wxDefaultPosition,
50 const wxSize& size = wxDefaultSize,
51 long style = wxDEFAULT_FRAME_STYLE,
52 const wxString& name = wxFrameNameStr);
53
0d53fc34 54 virtual ~wxFrame();
7c0ea335 55
88ac883a 56#if wxUSE_STATUSBAR
3851e479 57 void SetStatusBar(wxStatusBar *statbar);
88ac883a 58#endif // wxUSE_STATUSBAR
bfc6fde4 59
88ac883a 60#if wxUSE_TOOLBAR
307f16e8 61 void SetToolBar(wxToolBar *toolbar);
88ac883a 62#endif // wxUSE_TOOLBAR
1d66b099 63
1529bc41 64 virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL);
b9f29261 65 wxPoint GetClientAreaOrigin() const { return wxPoint(0, 0); }
bfc6fde4 66
7c0ea335
VZ
67 // implementation from now on
68 // --------------------------
bfc6fde4 69
7c0ea335 70 // GTK callbacks
b5e31cc8 71 virtual void GtkOnSize();
bfc6fde4
VZ
72 virtual void OnInternalIdle();
73
16bcc879 74 bool m_menuBarDetached;
2b5f62a0 75 int m_menuBarHeight;
16bcc879 76 bool m_toolBarDetached;
3d0c4d2e 77
bfc6fde4 78protected:
ddb6bc71
RR
79 // common part of all ctors
80 void Init();
7c0ea335 81
1c4f8f8d 82 // override wxWindow methods to take into account tool/menu/statusbars
f9241296 83 virtual void DoGetClientSize( int *width, int *height ) const;
bfc6fde4 84
6522713c
VZ
85#if wxUSE_MENUS_NATIVE
86 virtual void DetachMenuBar();
87 virtual void AttachMenuBar(wxMenuBar *menubar);
1d66b099
PC
88 // Whether frame has a menubar showing
89 // (needed to deal with perverted MDI menubar handling)
90 virtual bool HasVisibleMenubar() const;
2b5f62a0
VZ
91
92public:
93 // Menu size is dynamic now, call this whenever it might change.
94 void UpdateMenuBarSize();
6522713c 95#endif // wxUSE_MENUS_NATIVE
0d53fc34 96
1529bc41
PC
97private:
98 long m_fsSaveFlag;
99
0d53fc34 100 DECLARE_DYNAMIC_CLASS(wxFrame)
c801d85f
KB
101};
102
b5e31cc8 103#endif // _WX_GTK_FRAME_H_