]>
Commit | Line | Data |
---|---|---|
1 | ///////////////////////////////////////////////////////////////////////////// | |
2 | // Name: wx/mgl/toplevel.h | |
3 | // Purpose: Top level window, abstraction of wxFrame and wxDialog | |
4 | // Author: Vaclav Slavik | |
5 | // Id: $Id$ | |
6 | // Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com) | |
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 | ||
61 | virtual bool Show(bool show = TRUE); | |
62 | ||
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; | |
74 | bool m_fsIsShowing; /* full screen */ | |
75 | long m_fsSaveStyle; | |
76 | long m_fsSaveFlag; | |
77 | wxRect m_fsSaveFrame; | |
78 | ||
79 | // is the frame currently iconized? | |
80 | bool m_isIconized; | |
81 | // and maximized? | |
82 | bool m_isMaximized; | |
83 | wxRect m_savedFrame; | |
84 | }; | |
85 | ||
86 | #endif // __WX_TOPLEVEL_H__ |