]> git.saurik.com Git - wxWidgets.git/blob - include/wx/palmos/frame.h
define wxUSE_CRASHREPORT as 0 for non-MSW
[wxWidgets.git] / include / wx / palmos / frame.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/palmos/frame.h
3 // Purpose: wxFrame class
4 // Author: William Osborne - minimal working wxPalmOS port
5 // Modified by:
6 // Created: 10/13/04
7 // RCS-ID: $Id$
8 // Copyright: (c) William Osborne
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_FRAME_H_
13 #define _WX_FRAME_H_
14
15 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
16 #pragma interface "frame.h"
17 #endif
18
19 class WXDLLEXPORT wxFrame : public wxFrameBase
20 {
21 public:
22 // construction
23 wxFrame() { Init(); }
24 wxFrame(wxWindow *parent,
25 wxWindowID id,
26 const wxString& title,
27 const wxPoint& pos = wxDefaultPosition,
28 const wxSize& size = wxDefaultSize,
29 long style = wxDEFAULT_FRAME_STYLE,
30 const wxString& name = wxFrameNameStr)
31 {
32 Init();
33
34 Create(parent, id, title, pos, size, style, name);
35 }
36
37 bool Create(wxWindow *parent,
38 wxWindowID id,
39 const wxString& title,
40 const wxPoint& pos = wxDefaultPosition,
41 const wxSize& size = wxDefaultSize,
42 long style = wxDEFAULT_FRAME_STYLE,
43 const wxString& name = wxFrameNameStr);
44
45 virtual ~wxFrame();
46
47 // implement base class pure virtuals
48 virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL);
49 virtual void Raise();
50
51 // implementation only from now on
52 // -------------------------------
53
54 // event handlers
55 void OnPaint(wxPaintEvent& event);
56
57 // Toolbar
58 #if wxUSE_TOOLBAR
59 virtual wxToolBar* CreateToolBar(long style = -1,
60 wxWindowID id = wxID_ANY,
61 const wxString& name = wxToolBarNameStr);
62
63 virtual void PositionToolBar();
64 #endif // wxUSE_TOOLBAR
65
66 // event handlers
67 bool HandleMenuLoop(const wxEventType& evtType, WXWORD isPopup);
68
69 virtual wxPoint GetClientAreaOrigin() const;
70
71 #if wxUSE_MENUS_NATIVE
72 bool HandleMenuOpen();
73 bool HandleMenuSelect(EventType* event);
74 #endif // wxUSE_MENUS_NATIVE
75
76 protected:
77 // common part of all ctors
78 void Init();
79
80 // override base class virtuals
81 virtual void DoGetClientSize(int *width, int *height) const;
82 virtual void DoSetClientSize(int width, int height);
83
84 #if wxUSE_MENUS_NATIVE
85 // a plug in for MDI frame classes which need to do something special when
86 // the menubar is set
87 virtual void InternalSetMenuBar();
88 #endif // wxUSE_MENUS_NATIVE
89
90 // propagate our state change to all child frames
91 void IconizeChildFrames(bool bIconize);
92
93 virtual bool IsMDIChild() const { return false; }
94
95 // Data to save/restore when calling ShowFullScreen
96 int m_fsStatusBarFields; // 0 for no status bar
97 int m_fsStatusBarHeight;
98 int m_fsToolBarHeight;
99
100 private:
101 // used by IconizeChildFrames(), see comments there
102 bool m_wasMinimized;
103
104 DECLARE_EVENT_TABLE()
105 DECLARE_DYNAMIC_CLASS_NO_COPY(wxFrame)
106 };
107
108 #endif
109 // _WX_FRAME_H_