]>
Commit | Line | Data |
---|---|---|
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 | |
442b35b5 | 7 | // Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com) |
65571936 | 8 | // Licence: wxWindows licence |
1e6feb95 VZ |
9 | /////////////////////////////////////////////////////////////////////////////// |
10 | ||
11 | #ifndef _WX_UNIV_FRAME_H_ | |
12 | #define _WX_UNIV_FRAME_H_ | |
13 | ||
1e6feb95 VZ |
14 | // ---------------------------------------------------------------------------- |
15 | // wxFrame | |
16 | // ---------------------------------------------------------------------------- | |
17 | ||
53a2db12 | 18 | class WXDLLIMPEXP_CORE wxFrame : public wxFrameBase |
1e6feb95 VZ |
19 | { |
20 | public: | |
6463b9f5 | 21 | wxFrame() {} |
1e6feb95 VZ |
22 | wxFrame(wxWindow *parent, |
23 | wxWindowID id, | |
24 | const wxString& title, | |
25 | const wxPoint& pos = wxDefaultPosition, | |
26 | const wxSize& size = wxDefaultSize, | |
27 | long style = wxDEFAULT_FRAME_STYLE, | |
6463b9f5 JS |
28 | const wxString& name = wxFrameNameStr) |
29 | { | |
30 | Create(parent, id, title, pos, size, style, name); | |
31 | } | |
f417f1d5 | 32 | |
b85a6d85 VS |
33 | bool Create(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); | |
1e6feb95 VZ |
40 | |
41 | virtual wxPoint GetClientAreaOrigin() const; | |
a290fa5a | 42 | virtual bool Enable(bool enable = true); |
1e6feb95 | 43 | |
6821401b VS |
44 | #if wxUSE_STATUSBAR |
45 | virtual wxStatusBar* CreateStatusBar(int number = 1, | |
c4c178c1 | 46 | long style = wxSTB_DEFAULT_STYLE, |
6821401b VS |
47 | wxWindowID id = 0, |
48 | const wxString& name = wxStatusLineNameStr); | |
49 | #endif // wxUSE_STATUSBAR | |
50 | ||
857dab7d VS |
51 | #if wxUSE_TOOLBAR |
52 | // create main toolbar bycalling OnCreateToolBar() | |
f9dae779 | 53 | virtual wxToolBar* CreateToolBar(long style = -1, |
a290fa5a | 54 | wxWindowID id = wxID_ANY, |
857dab7d | 55 | const wxString& name = wxToolBarNameStr); |
857dab7d | 56 | #endif // wxUSE_TOOLBAR |
6821401b | 57 | |
894057d1 | 58 | virtual wxSize GetMinSize() const; |
e7dda1ff | 59 | |
1e6feb95 VZ |
60 | protected: |
61 | void OnSize(wxSizeEvent& event); | |
afad4a88 | 62 | void OnSysColourChanged(wxSysColourChangedEvent& event); |
f417f1d5 | 63 | |
a9152a05 VS |
64 | virtual void DoGetClientSize(int *width, int *height) const; |
65 | virtual void DoSetClientSize(int width, int height); | |
66 | ||
1e6feb95 VZ |
67 | #if wxUSE_MENUS |
68 | // override to update menu bar position when the frame size changes | |
69 | virtual void PositionMenuBar(); | |
6821401b VS |
70 | virtual void DetachMenuBar(); |
71 | virtual void AttachMenuBar(wxMenuBar *menubar); | |
1e6feb95 VZ |
72 | #endif // wxUSE_MENUS |
73 | ||
d08e6e59 VS |
74 | #if wxUSE_STATUSBAR |
75 | // override to update statusbar position when the frame size changes | |
76 | virtual void PositionStatusBar(); | |
77 | #endif // wxUSE_MENUS | |
78 | ||
6f02a879 VZ |
79 | protected: |
80 | #if wxUSE_TOOLBAR | |
81 | virtual void PositionToolBar(); | |
82 | #endif // wxUSE_TOOLBAR | |
83 | ||
1e6feb95 VZ |
84 | DECLARE_EVENT_TABLE() |
85 | DECLARE_DYNAMIC_CLASS(wxFrame) | |
86 | }; | |
87 | ||
88 | #endif // _WX_UNIV_FRAME_H_ |