]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk1/frame.h
added define for Aug 2003 gcc update compatibility with Jaguar
[wxWidgets.git] / include / wx / gtk1 / 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
ab16f4a3 7// Licence: wxWindows licence
c801d85f
KB
8/////////////////////////////////////////////////////////////////////////////
9
10
11#ifndef __GTKFRAMEH__
12#define __GTKFRAMEH__
13
12028905 14#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
7c0ea335 15 #pragma interface "frame.h"
c801d85f
KB
16#endif
17
c801d85f
KB
18//-----------------------------------------------------------------------------
19// classes
20//-----------------------------------------------------------------------------
21
716b7364 22class wxMDIChildFrame;
cf4219e7
RR
23class wxMDIClientWindow;
24class wxMenu;
25class wxMenuBar;
26class wxToolBar;
27class wxStatusBar;
c801d85f 28
c801d85f 29//-----------------------------------------------------------------------------
0d53fc34 30// wxFrame
c801d85f
KB
31//-----------------------------------------------------------------------------
32
0d53fc34 33class wxFrame : public wxFrameBase
c801d85f 34{
bfc6fde4 35public:
7c0ea335 36 // construction
0d53fc34
VS
37 wxFrame() { Init(); }
38 wxFrame(wxWindow *parent,
1e6feb95
VZ
39 wxWindowID id,
40 const wxString& title,
41 const wxPoint& pos = wxDefaultPosition,
42 const wxSize& size = wxDefaultSize,
43 long style = wxDEFAULT_FRAME_STYLE,
44 const wxString& name = wxFrameNameStr)
7c0ea335
VZ
45 {
46 Init();
47
48 Create(parent, id, title, pos, size, style, name);
49 }
50
51 bool Create(wxWindow *parent,
52 wxWindowID id,
53 const wxString& title,
54 const wxPoint& pos = wxDefaultPosition,
55 const wxSize& size = wxDefaultSize,
56 long style = wxDEFAULT_FRAME_STYLE,
57 const wxString& name = wxFrameNameStr);
58
0d53fc34 59 virtual ~wxFrame();
7c0ea335 60
88ac883a 61#if wxUSE_STATUSBAR
8febdd39
RR
62 virtual void PositionStatusBar();
63
7c0ea335 64 virtual wxStatusBar* CreateStatusBar(int number = 1,
73bb6776 65 long style = wxST_SIZEGRIP|wxFULL_REPAINT_ON_RESIZE,
7c0ea335
VZ
66 wxWindowID id = 0,
67 const wxString& name = wxStatusLineNameStr);
3851e479
RR
68
69 void SetStatusBar(wxStatusBar *statbar);
88ac883a 70#endif // wxUSE_STATUSBAR
bfc6fde4 71
88ac883a 72#if wxUSE_TOOLBAR
f9dae779 73 virtual wxToolBar* CreateToolBar(long style = -1,
7c0ea335
VZ
74 wxWindowID id = -1,
75 const wxString& name = wxToolBarNameStr);
307f16e8 76 void SetToolBar(wxToolBar *toolbar);
88ac883a 77#endif // wxUSE_TOOLBAR
b9f29261
VS
78
79 wxPoint GetClientAreaOrigin() const { return wxPoint(0, 0); }
bfc6fde4 80
7c0ea335
VZ
81 // implementation from now on
82 // --------------------------
bfc6fde4 83
7c0ea335 84 // GTK callbacks
bfc6fde4 85 virtual void GtkOnSize( int x, int y, int width, int height );
bfc6fde4
VZ
86 virtual void OnInternalIdle();
87
16bcc879 88 bool m_menuBarDetached;
2b5f62a0 89 int m_menuBarHeight;
16bcc879 90 bool m_toolBarDetached;
3d0c4d2e 91
bfc6fde4 92protected:
ddb6bc71
RR
93 // common part of all ctors
94 void Init();
7c0ea335 95
1c4f8f8d 96 // override wxWindow methods to take into account tool/menu/statusbars
bfc6fde4 97 virtual void DoSetClientSize(int width, int height);
f9241296 98 virtual void DoGetClientSize( int *width, int *height ) const;
bfc6fde4 99
6522713c 100#if wxUSE_MENUS_NATIVE
2b5f62a0 101
6522713c
VZ
102 virtual void DetachMenuBar();
103 virtual void AttachMenuBar(wxMenuBar *menubar);
2b5f62a0
VZ
104
105public:
106 // Menu size is dynamic now, call this whenever it might change.
107 void UpdateMenuBarSize();
108
6522713c 109#endif // wxUSE_MENUS_NATIVE
0d53fc34
VS
110
111 DECLARE_DYNAMIC_CLASS(wxFrame)
c801d85f
KB
112};
113
114#endif // __GTKFRAMEH__