]> git.saurik.com Git - wxWidgets.git/blob - include/wx/palmos/frame.h
set m_isBeingDeleted to true (only) in SendDestroyEvent(); call it as early as possib...
[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 class WXDLLIMPEXP_CORE wxFrame : public wxFrameBase
16 {
17 public:
18 // construction
19 wxFrame() { Init(); }
20 wxFrame(wxWindow *parent,
21 wxWindowID id,
22 const wxString& title,
23 const wxPoint& pos = wxDefaultPosition,
24 const wxSize& size = wxDefaultSize,
25 long style = wxDEFAULT_FRAME_STYLE,
26 const wxString& name = wxFrameNameStr)
27 {
28 Init();
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 ~wxFrame();
42
43 // implement base class pure virtuals
44 virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL);
45 virtual void Raise();
46
47 // implementation only from now on
48 // -------------------------------
49
50 // event handlers
51 void OnPaint(wxPaintEvent& event);
52
53 // Toolbar
54 #if wxUSE_TOOLBAR
55 virtual wxToolBar* CreateToolBar(long style = -1,
56 wxWindowID id = wxID_ANY,
57 const wxString& name = wxToolBarNameStr);
58
59 virtual void PositionToolBar();
60 #endif // wxUSE_TOOLBAR
61
62 // event handlers
63 bool HandleMenuLoop(const wxEventType& evtType, WXWORD isPopup);
64
65 virtual wxPoint GetClientAreaOrigin() const;
66
67 #if wxUSE_MENUS_NATIVE
68 bool HandleMenuOpen();
69 bool HandleMenuSelect(WXEVENTPTR event);
70 #endif // wxUSE_MENUS_NATIVE
71
72 protected:
73 // common part of all ctors
74 void Init();
75
76 // override base class virtuals
77 virtual void DoGetClientSize(int *width, int *height) const;
78 virtual void DoSetClientSize(int width, int height);
79
80 #if wxUSE_MENUS_NATIVE
81 // a plug in for MDI frame classes which need to do something special when
82 // the menubar is set
83 virtual void InternalSetMenuBar();
84 #endif // wxUSE_MENUS_NATIVE
85
86 // propagate our state change to all child frames
87 void IconizeChildFrames(bool bIconize);
88
89 virtual bool IsMDIChild() const { return false; }
90
91 // Data to save/restore when calling ShowFullScreen
92 int m_fsStatusBarFields; // 0 for no status bar
93 int m_fsStatusBarHeight;
94 int m_fsToolBarHeight;
95
96 private:
97 // used by IconizeChildFrames(), see comments there
98 bool m_wasMinimized;
99
100 DECLARE_EVENT_TABLE()
101 DECLARE_DYNAMIC_CLASS_NO_COPY(wxFrame)
102 };
103
104 #endif
105 // _WX_FRAME_H_