Remove all lines containing cvs/svn "$Id$" keyword.
[wxWidgets.git] / include / wx / gtk1 / frame.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk1/frame.h
3 // Purpose:
4 // Author: Robert Roebling
5 // Copyright: (c) 1998 Robert Roebling, Julian Smart
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
8
9 #ifndef __GTKFRAMEH__
10 #define __GTKFRAMEH__
11
12 //-----------------------------------------------------------------------------
13 // classes
14 //-----------------------------------------------------------------------------
15
16 class WXDLLIMPEXP_FWD_CORE wxMDIChildFrame;
17 class WXDLLIMPEXP_FWD_CORE wxMDIClientWindow;
18 class WXDLLIMPEXP_FWD_CORE wxMenu;
19 class WXDLLIMPEXP_FWD_CORE wxMenuBar;
20 class WXDLLIMPEXP_FWD_CORE wxToolBar;
21 class WXDLLIMPEXP_FWD_CORE wxStatusBar;
22
23 //-----------------------------------------------------------------------------
24 // wxFrame
25 //-----------------------------------------------------------------------------
26
27 class WXDLLIMPEXP_CORE wxFrame : public wxFrameBase
28 {
29 public:
30 // construction
31 wxFrame() { Init(); }
32 wxFrame(wxWindow *parent,
33 wxWindowID id,
34 const wxString& title,
35 const wxPoint& pos = wxDefaultPosition,
36 const wxSize& size = wxDefaultSize,
37 long style = wxDEFAULT_FRAME_STYLE,
38 const wxString& name = wxFrameNameStr)
39 {
40 Init();
41
42 Create(parent, id, title, pos, size, style, name);
43 }
44
45 bool Create(wxWindow *parent,
46 wxWindowID id,
47 const wxString& title,
48 const wxPoint& pos = wxDefaultPosition,
49 const wxSize& size = wxDefaultSize,
50 long style = wxDEFAULT_FRAME_STYLE,
51 const wxString& name = wxFrameNameStr);
52
53 virtual ~wxFrame();
54
55 #if wxUSE_STATUSBAR
56 virtual void PositionStatusBar();
57
58 virtual wxStatusBar* CreateStatusBar(int number = 1,
59 long style = wxSTB_DEFAULT_STYLE,
60 wxWindowID id = 0,
61 const wxString& name = wxStatusLineNameStr);
62
63 void SetStatusBar(wxStatusBar *statbar);
64 #endif // wxUSE_STATUSBAR
65
66 #if wxUSE_TOOLBAR
67 virtual wxToolBar* CreateToolBar(long style = -1,
68 wxWindowID id = -1,
69 const wxString& name = wxToolBarNameStr);
70 void SetToolBar(wxToolBar *toolbar);
71 #endif // wxUSE_TOOLBAR
72
73 wxPoint GetClientAreaOrigin() const { return wxPoint(0, 0); }
74
75 // implementation from now on
76 // --------------------------
77
78 // GTK callbacks
79 virtual void GtkOnSize( int x, int y, int width, int height );
80 virtual void OnInternalIdle();
81
82 bool m_menuBarDetached;
83 int m_menuBarHeight;
84 bool m_toolBarDetached;
85
86 protected:
87 // common part of all ctors
88 void Init();
89
90 // override wxWindow methods to take into account tool/menu/statusbars
91 virtual void DoSetClientSize(int width, int height);
92 virtual void DoGetClientSize( int *width, int *height ) const;
93
94 #if wxUSE_MENUS_NATIVE
95
96 virtual void DetachMenuBar();
97 virtual void AttachMenuBar(wxMenuBar *menubar);
98
99 public:
100 // Menu size is dynamic now, call this whenever it might change.
101 void UpdateMenuBarSize();
102
103 #endif // wxUSE_MENUS_NATIVE
104
105 DECLARE_DYNAMIC_CLASS(wxFrame)
106 };
107
108 #endif // __GTKFRAMEH__