]> git.saurik.com Git - wxWidgets.git/blob - include/wx/univ/frame.h
wxMessageBox off the main thread lost result code.
[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 // Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com)
8 // Licence: wxWindows licence
9 ///////////////////////////////////////////////////////////////////////////////
10
11 #ifndef _WX_UNIV_FRAME_H_
12 #define _WX_UNIV_FRAME_H_
13
14 // ----------------------------------------------------------------------------
15 // wxFrame
16 // ----------------------------------------------------------------------------
17
18 class WXDLLIMPEXP_CORE wxFrame : public wxFrameBase
19 {
20 public:
21 wxFrame() {}
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,
28 const wxString& name = wxFrameNameStr)
29 {
30 Create(parent, id, title, pos, size, style, name);
31 }
32
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);
40
41 virtual wxPoint GetClientAreaOrigin() const;
42 virtual bool Enable(bool enable = true);
43
44 #if wxUSE_STATUSBAR
45 virtual wxStatusBar* CreateStatusBar(int number = 1,
46 long style = wxSTB_DEFAULT_STYLE,
47 wxWindowID id = 0,
48 const wxString& name = wxStatusLineNameStr);
49 #endif // wxUSE_STATUSBAR
50
51 #if wxUSE_TOOLBAR
52 // create main toolbar bycalling OnCreateToolBar()
53 virtual wxToolBar* CreateToolBar(long style = -1,
54 wxWindowID id = wxID_ANY,
55 const wxString& name = wxToolBarNameStr);
56 #endif // wxUSE_TOOLBAR
57
58 virtual wxSize GetMinSize() const;
59
60 protected:
61 void OnSize(wxSizeEvent& event);
62 void OnSysColourChanged(wxSysColourChangedEvent& event);
63
64 virtual void DoGetClientSize(int *width, int *height) const;
65 virtual void DoSetClientSize(int width, int height);
66
67 #if wxUSE_MENUS
68 // override to update menu bar position when the frame size changes
69 virtual void PositionMenuBar();
70 virtual void DetachMenuBar();
71 virtual void AttachMenuBar(wxMenuBar *menubar);
72 #endif // wxUSE_MENUS
73
74 #if wxUSE_STATUSBAR
75 // override to update statusbar position when the frame size changes
76 virtual void PositionStatusBar();
77 #endif // wxUSE_MENUS
78
79 protected:
80 #if wxUSE_TOOLBAR
81 virtual void PositionToolBar();
82 #endif // wxUSE_TOOLBAR
83
84 DECLARE_EVENT_TABLE()
85 DECLARE_DYNAMIC_CLASS(wxFrame)
86 };
87
88 #endif // _WX_UNIV_FRAME_H_