]>
Commit | Line | Data |
---|---|---|
ffecfa5a JS |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: wx/palmos/frame.h | |
3 | // Purpose: wxFrame class | |
e1d63b79 | 4 | // Author: William Osborne - minimal working wxPalmOS port |
ffecfa5a JS |
5 | // Modified by: |
6 | // Created: 10/13/04 | |
e1d63b79 | 7 | // RCS-ID: $Id$ |
ffecfa5a JS |
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 OnSysColourChanged(wxSysColourChangedEvent& event); | |
e1d63b79 | 56 | void OnPaint(wxPaintEvent& event); |
ffecfa5a JS |
57 | |
58 | // Toolbar | |
59 | #if wxUSE_TOOLBAR | |
60 | virtual wxToolBar* CreateToolBar(long style = -1, | |
be7c2a20 | 61 | wxWindowID id = wxID_ANY, |
ffecfa5a JS |
62 | const wxString& name = wxToolBarNameStr); |
63 | ||
64 | virtual void PositionToolBar(); | |
65 | #endif // wxUSE_TOOLBAR | |
66 | ||
ffecfa5a JS |
67 | // event handlers |
68 | bool HandlePaint(); | |
69 | bool HandleSize(int x, int y, WXUINT flag); | |
ffecfa5a JS |
70 | bool HandleMenuLoop(const wxEventType& evtType, WXWORD isPopup); |
71 | ||
ffecfa5a JS |
72 | virtual wxPoint GetClientAreaOrigin() const; |
73 | ||
74 | #if wxUSE_MENUS_NATIVE | |
75 | bool HandleMenuOpen(); | |
a152561c | 76 | bool HandleMenuSelect(EventType* event); |
ffecfa5a | 77 | #endif // wxUSE_MENUS_NATIVE |
e1d63b79 | 78 | |
ffecfa5a JS |
79 | protected: |
80 | // common part of all ctors | |
81 | void Init(); | |
82 | ||
83 | // override base class virtuals | |
84 | virtual void DoGetClientSize(int *width, int *height) const; | |
85 | virtual void DoSetClientSize(int width, int height); | |
86 | ||
87 | #if wxUSE_MENUS_NATIVE | |
ffecfa5a JS |
88 | // a plug in for MDI frame classes which need to do something special when |
89 | // the menubar is set | |
90 | virtual void InternalSetMenuBar(); | |
91 | #endif // wxUSE_MENUS_NATIVE | |
92 | ||
93 | // propagate our state change to all child frames | |
94 | void IconizeChildFrames(bool bIconize); | |
95 | ||
a152561c | 96 | virtual bool IsMDIChild() const { return false; } |
ffecfa5a | 97 | |
ffecfa5a JS |
98 | // Data to save/restore when calling ShowFullScreen |
99 | int m_fsStatusBarFields; // 0 for no status bar | |
100 | int m_fsStatusBarHeight; | |
101 | int m_fsToolBarHeight; | |
102 | ||
103 | private: | |
ffecfa5a JS |
104 | // used by IconizeChildFrames(), see comments there |
105 | bool m_wasMinimized; | |
e1d63b79 | 106 | |
ffecfa5a JS |
107 | DECLARE_EVENT_TABLE() |
108 | DECLARE_DYNAMIC_CLASS_NO_COPY(wxFrame) | |
109 | }; | |
110 | ||
111 | #endif | |
112 | // _WX_FRAME_H_ |