1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk1/frame.h
4 // Author: Robert Roebling
5 // Copyright: (c) 1998 Robert Roebling, Julian Smart
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
12 //-----------------------------------------------------------------------------
14 //-----------------------------------------------------------------------------
16 class WXDLLIMPEXP_FWD_CORE wxMDIChildFrame
;
17 class WXDLLIMPEXP_FWD_CORE wxMDIClientWindow
;
18 class WXDLLIMPEXP_FWD_CORE wxMenu
;
19 class WXDLLIMPEXP_FWD_CORE wxMenuBar
;
20 class WXDLLIMPEXP_FWD_CORE wxToolBar
;
21 class WXDLLIMPEXP_FWD_CORE wxStatusBar
;
23 //-----------------------------------------------------------------------------
25 //-----------------------------------------------------------------------------
27 class WXDLLIMPEXP_CORE wxFrame
: public wxFrameBase
32 wxFrame(wxWindow
*parent
,
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
)
42 Create(parent
, id
, title
, pos
, size
, style
, name
);
45 bool Create(wxWindow
*parent
,
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
);
56 virtual void PositionStatusBar();
58 virtual wxStatusBar
* CreateStatusBar(int number
= 1,
59 long style
= wxSTB_DEFAULT_STYLE
,
61 const wxString
& name
= wxStatusLineNameStr
);
63 void SetStatusBar(wxStatusBar
*statbar
);
64 #endif // wxUSE_STATUSBAR
67 virtual wxToolBar
* CreateToolBar(long style
= -1,
69 const wxString
& name
= wxToolBarNameStr
);
70 void SetToolBar(wxToolBar
*toolbar
);
71 #endif // wxUSE_TOOLBAR
73 wxPoint
GetClientAreaOrigin() const { return wxPoint(0, 0); }
75 // implementation from now on
76 // --------------------------
79 virtual void GtkOnSize( int x
, int y
, int width
, int height
);
80 virtual void OnInternalIdle();
82 bool m_menuBarDetached
;
84 bool m_toolBarDetached
;
87 // common part of all ctors
90 // override wxWindow methods to take into account tool/menu/statusbars
91 virtual void DoSetClientSize(int width
, int height
);
92 virtual void DoGetClientSize( int *width
, int *height
) const;
94 #if wxUSE_MENUS_NATIVE
96 virtual void DetachMenuBar();
97 virtual void AttachMenuBar(wxMenuBar
*menubar
);
100 // Menu size is dynamic now, call this whenever it might change.
101 void UpdateMenuBarSize();
103 #endif // wxUSE_MENUS_NATIVE
105 DECLARE_DYNAMIC_CLASS(wxFrame
)
108 #endif // __GTKFRAMEH__