]> git.saurik.com Git - wxWidgets.git/blob - include/wx/univ/frame.h
Added MSWPositionForWxMenu() method which is used to translate wxWindows
[wxWidgets.git] / include / wx / univ / frame.h
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 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
16 #pragma interface "univframe.h"
17 #endif
18
19 // ----------------------------------------------------------------------------
20 // wxFrame
21 // ----------------------------------------------------------------------------
22
23 class WXDLLEXPORT 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 bool Create(wxWindow *parent,
36 wxWindowID id,
37 const wxString& title,
38 const wxPoint& pos = wxDefaultPosition,
39 const wxSize& size = wxDefaultSize,
40 long style = wxDEFAULT_FRAME_STYLE,
41 const wxString& name = wxFrameNameStr);
42
43 virtual wxPoint GetClientAreaOrigin() const;
44 virtual bool Enable(bool enable = TRUE);
45
46 #if wxUSE_STATUSBAR
47 virtual wxStatusBar* CreateStatusBar(int number = 1,
48 long style = wxST_SIZEGRIP,
49 wxWindowID id = 0,
50 const wxString& name = wxStatusLineNameStr);
51 #endif // wxUSE_STATUSBAR
52
53 #if wxUSE_TOOLBAR
54 // create main toolbar bycalling OnCreateToolBar()
55 virtual wxToolBar* CreateToolBar(long style = -1,
56 wxWindowID id = -1,
57 const wxString& name = wxToolBarNameStr);
58 virtual void PositionToolBar();
59 #endif // wxUSE_TOOLBAR
60
61 virtual int GetMinWidth() const;
62 virtual int GetMinHeight() const;
63
64 // sends wxSizeEvent to itself (used after attaching xxxBar)
65 virtual void SendSizeEvent();
66
67 protected:
68 void OnSize(wxSizeEvent& event);
69
70 virtual void DoGetClientSize(int *width, int *height) const;
71 virtual void DoSetClientSize(int width, int height);
72
73 #if wxUSE_MENUS
74 // override to update menu bar position when the frame size changes
75 virtual void PositionMenuBar();
76 virtual void DetachMenuBar();
77 virtual void AttachMenuBar(wxMenuBar *menubar);
78 #endif // wxUSE_MENUS
79
80 #if wxUSE_STATUSBAR
81 // override to update statusbar position when the frame size changes
82 virtual void PositionStatusBar();
83 #endif // wxUSE_MENUS
84
85 DECLARE_EVENT_TABLE()
86 DECLARE_DYNAMIC_CLASS(wxFrame)
87 };
88
89 #endif // _WX_UNIV_FRAME_H_