]>
Commit | Line | Data |
---|---|---|
7d9f12f3 VS |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: wx/mgl/toplevel.h | |
3 | // Purpose: Top level window, abstraction of wxFrame and wxDialog | |
4 | // Author: Vaclav Slavik | |
5 | // Id: $Id$ | |
52750c2e | 6 | // Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com) |
7d9f12f3 VS |
7 | // Licence: wxWindows licence |
8 | ///////////////////////////////////////////////////////////////////////////// | |
9 | ||
10 | ||
11 | #ifndef __WX_TOPLEVEL_H__ | |
12 | #define __WX_TOPLEVEL_H__ | |
13 | ||
14 | #ifdef __GNUG__ | |
15 | #pragma interface "toplevel.h" | |
16 | #endif | |
17 | ||
18 | ||
19 | //----------------------------------------------------------------------------- | |
20 | // wxTopLevelWindowMGL | |
21 | //----------------------------------------------------------------------------- | |
22 | ||
23 | class wxTopLevelWindowMGL : public wxTopLevelWindowBase | |
24 | { | |
25 | public: | |
26 | // construction | |
27 | wxTopLevelWindowMGL() { Init(); } | |
28 | wxTopLevelWindowMGL(wxWindow *parent, | |
29 | wxWindowID id, | |
30 | const wxString& title, | |
31 | const wxPoint& pos = wxDefaultPosition, | |
32 | const wxSize& size = wxDefaultSize, | |
33 | long style = wxDEFAULT_FRAME_STYLE, | |
34 | const wxString& name = wxFrameNameStr) | |
35 | { | |
36 | Init(); | |
37 | ||
38 | Create(parent, id, title, pos, size, style, name); | |
39 | } | |
40 | ||
41 | bool Create(wxWindow *parent, | |
42 | wxWindowID id, | |
43 | const wxString& title, | |
44 | const wxPoint& pos = wxDefaultPosition, | |
45 | const wxSize& size = wxDefaultSize, | |
46 | long style = wxDEFAULT_FRAME_STYLE, | |
47 | const wxString& name = wxFrameNameStr); | |
48 | ||
49 | virtual ~wxTopLevelWindowMGL(); | |
50 | ||
51 | // implement base class pure virtuals | |
52 | virtual void Maximize(bool maximize = TRUE); | |
53 | virtual bool IsMaximized() const; | |
54 | virtual void Iconize(bool iconize = TRUE); | |
55 | virtual bool IsIconized() const; | |
56 | virtual void Restore(); | |
57 | ||
58 | virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL); | |
59 | virtual bool IsFullScreen() const { return m_fsIsShowing; } | |
60 | ||
917afc7b VS |
61 | virtual bool Show(bool show = TRUE); |
62 | ||
7d9f12f3 VS |
63 | virtual void SetTitle(const wxString &title) { m_title = title; } |
64 | virtual wxString GetTitle() const { return m_title; } | |
65 | ||
66 | // implementation from now on | |
67 | // -------------------------- | |
68 | ||
69 | protected: | |
70 | // common part of all ctors | |
71 | void Init(); | |
72 | ||
73 | wxString m_title; | |
f41ed3c4 | 74 | bool m_fsIsShowing:1; /* full screen */ |
7d9f12f3 VS |
75 | long m_fsSaveStyle; |
76 | long m_fsSaveFlag; | |
77 | wxRect m_fsSaveFrame; | |
78 | ||
79 | // is the frame currently iconized? | |
f41ed3c4 | 80 | bool m_isIconized:1; |
7d9f12f3 | 81 | // and maximized? |
f41ed3c4 | 82 | bool m_isMaximized:1; |
7d9f12f3 | 83 | wxRect m_savedFrame; |
f41ed3c4 VS |
84 | |
85 | // did we sent wxSizeEvent at least once? | |
86 | bool m_sizeSet:1; | |
7d9f12f3 VS |
87 | }; |
88 | ||
89 | #endif // __WX_TOPLEVEL_H__ |