1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk/frame.h
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling, Julian Smart
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
10 #ifndef _WX_GTK_FRAME_H_
11 #define _WX_GTK_FRAME_H_
13 //-----------------------------------------------------------------------------
15 //-----------------------------------------------------------------------------
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
;
24 //-----------------------------------------------------------------------------
26 //-----------------------------------------------------------------------------
28 class WXDLLIMPEXP_CORE wxFrame
: public wxFrameBase
33 wxFrame(wxWindow
*parent
,
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
)
43 Create(parent
, id
, title
, pos
, size
, style
, name
);
46 bool Create(wxWindow
*parent
,
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
);
57 void SetStatusBar(wxStatusBar
*statbar
);
58 #endif // wxUSE_STATUSBAR
61 void SetToolBar(wxToolBar
*toolbar
);
62 #endif // wxUSE_TOOLBAR
64 virtual bool ShowFullScreen(bool show
, long style
= wxFULLSCREEN_ALL
);
65 wxPoint
GetClientAreaOrigin() const { return wxPoint(0, 0); }
67 // implementation from now on
68 // --------------------------
71 virtual void GtkOnSize();
72 virtual void OnInternalIdle();
74 bool m_menuBarDetached
;
76 bool m_toolBarDetached
;
79 // common part of all ctors
82 // override wxWindow methods to take into account tool/menu/statusbars
83 virtual void DoGetClientSize( int *width
, int *height
) const;
85 #if wxUSE_MENUS_NATIVE
86 virtual void DetachMenuBar();
87 virtual void AttachMenuBar(wxMenuBar
*menubar
);
88 // Whether frame has a menubar showing
89 // (needed to deal with perverted MDI menubar handling)
90 virtual bool HasVisibleMenubar() const;
93 // Menu size is dynamic now, call this whenever it might change.
94 void UpdateMenuBarSize();
95 #endif // wxUSE_MENUS_NATIVE
100 DECLARE_DYNAMIC_CLASS(wxFrame
)
103 #endif // _WX_GTK_FRAME_H_