]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/frame.h
added support for 2 extra mouse buttons (patch 1757630)
[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
7c0ea335 57 virtual wxStatusBar* CreateStatusBar(int number = 1,
73bb6776 58 long style = wxST_SIZEGRIP|wxFULL_REPAINT_ON_RESIZE,
7c0ea335
VZ
59 wxWindowID id = 0,
60 const wxString& name = wxStatusLineNameStr);
1d66b099 61
3851e479 62 void SetStatusBar(wxStatusBar *statbar);
88ac883a 63#endif // wxUSE_STATUSBAR
bfc6fde4 64
88ac883a 65#if wxUSE_TOOLBAR
f9dae779 66 virtual wxToolBar* CreateToolBar(long style = -1,
7c0ea335
VZ
67 wxWindowID id = -1,
68 const wxString& name = wxToolBarNameStr);
307f16e8 69 void SetToolBar(wxToolBar *toolbar);
88ac883a 70#endif // wxUSE_TOOLBAR
1d66b099 71
1529bc41 72 virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL);
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
b5e31cc8 79 virtual void GtkOnSize();
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
6f02a879
VZ
90#if wxUSE_STATUSBAR
91 virtual void PositionStatusBar();
92#endif // wxUSE_STATUSBAR
93
1c4f8f8d 94 // override wxWindow methods to take into account tool/menu/statusbars
f9241296 95 virtual void DoGetClientSize( int *width, int *height ) const;
bfc6fde4 96
6522713c
VZ
97#if wxUSE_MENUS_NATIVE
98 virtual void DetachMenuBar();
99 virtual void AttachMenuBar(wxMenuBar *menubar);
1d66b099
PC
100 // Whether frame has a menubar showing
101 // (needed to deal with perverted MDI menubar handling)
102 virtual bool HasVisibleMenubar() const;
2b5f62a0
VZ
103
104public:
105 // Menu size is dynamic now, call this whenever it might change.
106 void UpdateMenuBarSize();
6522713c 107#endif // wxUSE_MENUS_NATIVE
0d53fc34 108
1529bc41
PC
109private:
110 long m_fsSaveFlag;
111
0d53fc34 112 DECLARE_DYNAMIC_CLASS(wxFrame)
c801d85f
KB
113};
114
b5e31cc8 115#endif // _WX_GTK_FRAME_H_