]>
Commit | Line | Data |
---|---|---|
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$ | |
8 | // Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com) | |
9 | // Licence: wxWindows licence | |
10 | /////////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | #ifndef _WX_UNIV_FRAME_H_ | |
13 | #define _WX_UNIV_FRAME_H_ | |
14 | ||
15 | #ifdef __GNUG__ | |
16 | #pragma interface "univframe.h" | |
17 | #endif | |
18 | ||
19 | // ---------------------------------------------------------------------------- | |
20 | // wxFrame | |
21 | // ---------------------------------------------------------------------------- | |
22 | ||
23 | class wxFrame : public wxFrameBase | |
24 | { | |
25 | public: | |
26 | wxFrame() {} | |
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, | |
33 | const wxString& name = wxFrameNameStr) | |
34 | { | |
35 | Create(parent, id, title, pos, size, style, name); | |
36 | } | |
37 | ||
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); | |
45 | ||
46 | virtual wxPoint GetClientAreaOrigin() const; | |
47 | virtual bool Enable(bool enable = TRUE); | |
48 | ||
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 | ||
56 | ||
57 | protected: | |
58 | void OnSize(wxSizeEvent& event); | |
59 | ||
60 | // sends wxSizeEvent to itself (used after attaching xxxBar) | |
61 | void SendSizeEvent(); | |
62 | ||
63 | virtual void DoGetClientSize(int *width, int *height) const; | |
64 | virtual void DoSetClientSize(int width, int height); | |
65 | ||
66 | #if wxUSE_MENUS | |
67 | // override to update menu bar position when the frame size changes | |
68 | virtual void PositionMenuBar(); | |
69 | virtual void DetachMenuBar(); | |
70 | virtual void AttachMenuBar(wxMenuBar *menubar); | |
71 | #endif // wxUSE_MENUS | |
72 | ||
73 | #if wxUSE_STATUSBAR | |
74 | // override to update statusbar position when the frame size changes | |
75 | virtual void PositionStatusBar(); | |
76 | #endif // wxUSE_MENUS | |
77 | ||
78 | DECLARE_EVENT_TABLE() | |
79 | DECLARE_DYNAMIC_CLASS(wxFrame) | |
80 | }; | |
81 | ||
82 | #endif // _WX_UNIV_FRAME_H_ |