]> git.saurik.com Git - wxWidgets.git/blame - include/wx/univ/frame.h
fix gpf in mdi sample with motif when child is closed
[wxWidgets.git] / include / wx / univ / frame.h
CommitLineData
1e6feb95
VZ
1///////////////////////////////////////////////////////////////////////////////
2// Name: wx/univ/frame.h
3// Purpose: wxFrame class for wxUniversal
4// Author: Vadim Zeitlin
5// Modified by:
6// Created: 19.05.01
7// RCS-ID: $Id$
442b35b5 8// Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com)
65571936 9// Licence: wxWindows licence
1e6feb95
VZ
10///////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_UNIV_FRAME_H_
13#define _WX_UNIV_FRAME_H_
14
12028905 15#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
a3870b2f 16 #pragma interface "univframe.h"
1e6feb95
VZ
17#endif
18
19// ----------------------------------------------------------------------------
20// wxFrame
21// ----------------------------------------------------------------------------
22
f417f1d5 23class WXDLLEXPORT wxFrame : public wxFrameBase
1e6feb95
VZ
24{
25public:
6463b9f5 26 wxFrame() {}
1e6feb95
VZ
27 wxFrame(wxWindow *parent,
28 wxWindowID id,
29 const wxString& title,
30 const wxPoint& pos = wxDefaultPosition,
31 const wxSize& size = wxDefaultSize,
32 long style = wxDEFAULT_FRAME_STYLE,
6463b9f5
JS
33 const wxString& name = wxFrameNameStr)
34 {
35 Create(parent, id, title, pos, size, style, name);
36 }
f417f1d5 37
b85a6d85
VS
38 bool Create(wxWindow *parent,
39 wxWindowID id,
40 const wxString& title,
41 const wxPoint& pos = wxDefaultPosition,
42 const wxSize& size = wxDefaultSize,
43 long style = wxDEFAULT_FRAME_STYLE,
44 const wxString& name = wxFrameNameStr);
1e6feb95
VZ
45
46 virtual wxPoint GetClientAreaOrigin() const;
a290fa5a 47 virtual bool Enable(bool enable = true);
1e6feb95 48
6821401b
VS
49#if wxUSE_STATUSBAR
50 virtual wxStatusBar* CreateStatusBar(int number = 1,
51 long style = wxST_SIZEGRIP,
52 wxWindowID id = 0,
53 const wxString& name = wxStatusLineNameStr);
54#endif // wxUSE_STATUSBAR
55
857dab7d
VS
56#if wxUSE_TOOLBAR
57 // create main toolbar bycalling OnCreateToolBar()
f9dae779 58 virtual wxToolBar* CreateToolBar(long style = -1,
a290fa5a 59 wxWindowID id = wxID_ANY,
857dab7d
VS
60 const wxString& name = wxToolBarNameStr);
61 virtual void PositionToolBar();
62#endif // wxUSE_TOOLBAR
6821401b 63
e7dda1ff
VS
64 virtual int GetMinWidth() const;
65 virtual int GetMinHeight() const;
66
dda4f6c0
JS
67 // sends wxSizeEvent to itself (used after attaching xxxBar)
68 virtual void SendSizeEvent();
69
1e6feb95
VZ
70protected:
71 void OnSize(wxSizeEvent& event);
afad4a88 72 void OnSysColourChanged(wxSysColourChangedEvent& event);
f417f1d5 73
a9152a05
VS
74 virtual void DoGetClientSize(int *width, int *height) const;
75 virtual void DoSetClientSize(int width, int height);
76
1e6feb95
VZ
77#if wxUSE_MENUS
78 // override to update menu bar position when the frame size changes
79 virtual void PositionMenuBar();
6821401b
VS
80 virtual void DetachMenuBar();
81 virtual void AttachMenuBar(wxMenuBar *menubar);
1e6feb95
VZ
82#endif // wxUSE_MENUS
83
d08e6e59
VS
84#if wxUSE_STATUSBAR
85 // override to update statusbar position when the frame size changes
86 virtual void PositionStatusBar();
87#endif // wxUSE_MENUS
88
1e6feb95
VZ
89 DECLARE_EVENT_TABLE()
90 DECLARE_DYNAMIC_CLASS(wxFrame)
91};
92
93#endif // _WX_UNIV_FRAME_H_