]> git.saurik.com Git - wxWidgets.git/blob - include/wx/univ/frame.h
use LLONG_MIN instead of -1 (which is a valid time value corresponding to 1ms before...
[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 // ----------------------------------------------------------------------------
16 // wxFrame
17 // ----------------------------------------------------------------------------
18
19 class WXDLLEXPORT wxFrame : public wxFrameBase
20 {
21 public:
22 wxFrame() {}
23 wxFrame(wxWindow *parent,
24 wxWindowID id,
25 const wxString& title,
26 const wxPoint& pos = wxDefaultPosition,
27 const wxSize& size = wxDefaultSize,
28 long style = wxDEFAULT_FRAME_STYLE,
29 const wxString& name = wxFrameNameStr)
30 {
31 Create(parent, id, title, pos, size, style, name);
32 }
33
34 bool Create(wxWindow *parent,
35 wxWindowID id,
36 const wxString& title,
37 const wxPoint& pos = wxDefaultPosition,
38 const wxSize& size = wxDefaultSize,
39 long style = wxDEFAULT_FRAME_STYLE,
40 const wxString& name = wxFrameNameStr);
41
42 virtual wxPoint GetClientAreaOrigin() const;
43 virtual bool Enable(bool enable = true);
44
45 #if wxUSE_STATUSBAR
46 virtual wxStatusBar* CreateStatusBar(int number = 1,
47 long style = wxST_SIZEGRIP,
48 wxWindowID id = 0,
49 const wxString& name = wxStatusLineNameStr);
50 #endif // wxUSE_STATUSBAR
51
52 #if wxUSE_TOOLBAR
53 // create main toolbar bycalling OnCreateToolBar()
54 virtual wxToolBar* CreateToolBar(long style = -1,
55 wxWindowID id = wxID_ANY,
56 const wxString& name = wxToolBarNameStr);
57 #endif // wxUSE_TOOLBAR
58
59 virtual wxSize GetMinSize() const;
60
61 // sends wxSizeEvent to itself (used after attaching xxxBar)
62 virtual void SendSizeEvent();
63
64 protected:
65 void OnSize(wxSizeEvent& event);
66 void OnSysColourChanged(wxSysColourChangedEvent& event);
67
68 virtual void DoGetClientSize(int *width, int *height) const;
69 virtual void DoSetClientSize(int width, int height);
70
71 #if wxUSE_MENUS
72 // override to update menu bar position when the frame size changes
73 virtual void PositionMenuBar();
74 virtual void DetachMenuBar();
75 virtual void AttachMenuBar(wxMenuBar *menubar);
76 #endif // wxUSE_MENUS
77
78 #if wxUSE_STATUSBAR
79 // override to update statusbar position when the frame size changes
80 virtual void PositionStatusBar();
81 #endif // wxUSE_MENUS
82
83 protected:
84 #if wxUSE_TOOLBAR
85 virtual void PositionToolBar();
86 #endif // wxUSE_TOOLBAR
87
88 DECLARE_EVENT_TABLE()
89 DECLARE_DYNAMIC_CLASS(wxFrame)
90 };
91
92 #endif // _WX_UNIV_FRAME_H_