]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/frame.h
added wxUSE_REGKEY option
[wxWidgets.git] / include / wx / gtk / frame.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk/frame.h
3 // Purpose:
4 // Author: Robert Roebling
5 // Id: $Id$
6 // Copyright: (c) 1998 Robert Roebling, Julian Smart
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
9
10 #ifndef _WX_GTK_FRAME_H_
11 #define _WX_GTK_FRAME_H_
12
13 //-----------------------------------------------------------------------------
14 // classes
15 //-----------------------------------------------------------------------------
16
17 class WXDLLIMPEXP_FWD_CORE wxMDIChildFrame;
18 class WXDLLIMPEXP_FWD_CORE wxMDIClientWindow;
19 class WXDLLIMPEXP_FWD_CORE wxMenu;
20 class WXDLLIMPEXP_FWD_CORE wxMenuBar;
21 class WXDLLIMPEXP_FWD_CORE wxToolBar;
22 class WXDLLIMPEXP_FWD_CORE wxStatusBar;
23
24 //-----------------------------------------------------------------------------
25 // wxFrame
26 //-----------------------------------------------------------------------------
27
28 class WXDLLIMPEXP_CORE wxFrame : public wxFrameBase
29 {
30 public:
31 // construction
32 wxFrame() { Init(); }
33 wxFrame(wxWindow *parent,
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)
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
54 virtual ~wxFrame();
55
56 #if wxUSE_STATUSBAR
57 virtual wxStatusBar* CreateStatusBar(int number = 1,
58 long style = wxST_SIZEGRIP|wxFULL_REPAINT_ON_RESIZE,
59 wxWindowID id = 0,
60 const wxString& name = wxStatusLineNameStr);
61
62 void SetStatusBar(wxStatusBar *statbar);
63 #endif // wxUSE_STATUSBAR
64
65 #if wxUSE_TOOLBAR
66 virtual wxToolBar* CreateToolBar(long style = -1,
67 wxWindowID id = -1,
68 const wxString& name = wxToolBarNameStr);
69 void SetToolBar(wxToolBar *toolbar);
70 #endif // wxUSE_TOOLBAR
71
72 virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL);
73 wxPoint GetClientAreaOrigin() const { return wxPoint(0, 0); }
74
75 // implementation from now on
76 // --------------------------
77
78 // GTK callbacks
79 virtual void GtkOnSize();
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 #if wxUSE_STATUSBAR
91 virtual void PositionStatusBar();
92 #endif // wxUSE_STATUSBAR
93
94 // override wxWindow methods to take into account tool/menu/statusbars
95 virtual void DoGetClientSize( int *width, int *height ) const;
96
97 #if wxUSE_MENUS_NATIVE
98 virtual void DetachMenuBar();
99 virtual void AttachMenuBar(wxMenuBar *menubar);
100 // Whether frame has a menubar showing
101 // (needed to deal with perverted MDI menubar handling)
102 virtual bool HasVisibleMenubar() const;
103
104 public:
105 // Menu size is dynamic now, call this whenever it might change.
106 void UpdateMenuBarSize();
107 #endif // wxUSE_MENUS_NATIVE
108
109 private:
110 long m_fsSaveFlag;
111
112 DECLARE_DYNAMIC_CLASS(wxFrame)
113 };
114
115 #endif // _WX_GTK_FRAME_H_