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