]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk1/frame.h
Fix wxPropertyGrid::GetPropertyRect when the last item is collapsed.
[wxWidgets.git] / include / wx / gtk1 / frame.h
CommitLineData
c801d85f 1/////////////////////////////////////////////////////////////////////////////
8ef94bfc 2// Name: wx/gtk1/frame.h
c801d85f
KB
3// Purpose:
4// Author: Robert Roebling
58614078 5// Copyright: (c) 1998 Robert Roebling, Julian Smart
65571936 6// Licence: wxWindows licence
c801d85f
KB
7/////////////////////////////////////////////////////////////////////////////
8
c801d85f
KB
9#ifndef __GTKFRAMEH__
10#define __GTKFRAMEH__
11
c801d85f
KB
12//-----------------------------------------------------------------------------
13// classes
14//-----------------------------------------------------------------------------
15
b5dbe15d
VS
16class WXDLLIMPEXP_FWD_CORE wxMDIChildFrame;
17class WXDLLIMPEXP_FWD_CORE wxMDIClientWindow;
18class WXDLLIMPEXP_FWD_CORE wxMenu;
19class WXDLLIMPEXP_FWD_CORE wxMenuBar;
20class WXDLLIMPEXP_FWD_CORE wxToolBar;
21class WXDLLIMPEXP_FWD_CORE wxStatusBar;
c801d85f 22
c801d85f 23//-----------------------------------------------------------------------------
0d53fc34 24// wxFrame
c801d85f
KB
25//-----------------------------------------------------------------------------
26
20123d49 27class WXDLLIMPEXP_CORE wxFrame : public wxFrameBase
c801d85f 28{
bfc6fde4 29public:
7c0ea335 30 // construction
0d53fc34
VS
31 wxFrame() { Init(); }
32 wxFrame(wxWindow *parent,
1e6feb95
VZ
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)
7c0ea335
VZ
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
0d53fc34 53 virtual ~wxFrame();
7c0ea335 54
88ac883a 55#if wxUSE_STATUSBAR
8febdd39
RR
56 virtual void PositionStatusBar();
57
7c0ea335 58 virtual wxStatusBar* CreateStatusBar(int number = 1,
c4c178c1 59 long style = wxSTB_DEFAULT_STYLE,
7c0ea335
VZ
60 wxWindowID id = 0,
61 const wxString& name = wxStatusLineNameStr);
8ef94bfc 62
3851e479 63 void SetStatusBar(wxStatusBar *statbar);
88ac883a 64#endif // wxUSE_STATUSBAR
bfc6fde4 65
88ac883a 66#if wxUSE_TOOLBAR
f9dae779 67 virtual wxToolBar* CreateToolBar(long style = -1,
7c0ea335
VZ
68 wxWindowID id = -1,
69 const wxString& name = wxToolBarNameStr);
307f16e8 70 void SetToolBar(wxToolBar *toolbar);
88ac883a 71#endif // wxUSE_TOOLBAR
8ef94bfc 72
b9f29261 73 wxPoint GetClientAreaOrigin() const { return wxPoint(0, 0); }
bfc6fde4 74
7c0ea335
VZ
75 // implementation from now on
76 // --------------------------
bfc6fde4 77
7c0ea335 78 // GTK callbacks
bfc6fde4 79 virtual void GtkOnSize( int x, int y, int width, int height );
bfc6fde4
VZ
80 virtual void OnInternalIdle();
81
16bcc879 82 bool m_menuBarDetached;
2b5f62a0 83 int m_menuBarHeight;
16bcc879 84 bool m_toolBarDetached;
3d0c4d2e 85
bfc6fde4 86protected:
ddb6bc71
RR
87 // common part of all ctors
88 void Init();
7c0ea335 89
1c4f8f8d 90 // override wxWindow methods to take into account tool/menu/statusbars
bfc6fde4 91 virtual void DoSetClientSize(int width, int height);
f9241296 92 virtual void DoGetClientSize( int *width, int *height ) const;
bfc6fde4 93
6522713c 94#if wxUSE_MENUS_NATIVE
2b5f62a0 95
6522713c
VZ
96 virtual void DetachMenuBar();
97 virtual void AttachMenuBar(wxMenuBar *menubar);
2b5f62a0
VZ
98
99public:
100 // Menu size is dynamic now, call this whenever it might change.
101 void UpdateMenuBarSize();
102
6522713c 103#endif // wxUSE_MENUS_NATIVE
0d53fc34
VS
104
105 DECLARE_DYNAMIC_CLASS(wxFrame)
c801d85f
KB
106};
107
108#endif // __GTKFRAMEH__