]> git.saurik.com Git - wxWidgets.git/blob - include/wx/mgl/toplevel.h
process one event at once in wxEvtHandler::ProcessPendingEvents() to prevent crashes...
[wxWidgets.git] / include / wx / mgl / toplevel.h
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-2002 SciTech Software, Inc. (www.scitechsoft.com)
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
9
10 #ifndef __WX_TOPLEVEL_H__
11 #define __WX_TOPLEVEL_H__
12
13 //-----------------------------------------------------------------------------
14 // wxTopLevelWindowMGL
15 //-----------------------------------------------------------------------------
16
17 class wxTopLevelWindowMGL : public wxTopLevelWindowBase
18 {
19 public:
20 // construction
21 wxTopLevelWindowMGL() { Init(); }
22 wxTopLevelWindowMGL(wxWindow *parent,
23 wxWindowID id,
24 const wxString& title,
25 const wxPoint& pos = wxDefaultPosition,
26 const wxSize& size = wxDefaultSize,
27 long style = wxDEFAULT_FRAME_STYLE,
28 const wxString& name = wxFrameNameStr)
29 {
30 Init();
31
32 Create(parent, id, title, pos, size, style, name);
33 }
34
35 bool Create(wxWindow *parent,
36 wxWindowID id,
37 const wxString& title,
38 const wxPoint& pos = wxDefaultPosition,
39 const wxSize& size = wxDefaultSize,
40 long style = wxDEFAULT_FRAME_STYLE,
41 const wxString& name = wxFrameNameStr);
42
43 // implement base class pure virtuals
44 virtual void Maximize(bool maximize = true);
45 virtual bool IsMaximized() const;
46 virtual void Iconize(bool iconize = true);
47 virtual bool IsIconized() const;
48 virtual void Restore();
49
50 virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL);
51 virtual bool IsFullScreen() const { return m_fsIsShowing; }
52
53 virtual bool Show(bool show = true);
54
55 virtual void SetTitle(const wxString &title) { m_title = title; }
56 virtual wxString GetTitle() const { return m_title; }
57
58 // implementation from now on
59 // --------------------------
60
61 protected:
62 // common part of all ctors
63 void Init();
64
65 wxString m_title;
66 bool m_fsIsShowing:1; /* full screen */
67 long m_fsSaveStyle;
68 long m_fsSaveFlag;
69 wxRect m_fsSaveFrame;
70
71 // is the frame currently iconized?
72 bool m_isIconized:1;
73 // and maximized?
74 bool m_isMaximized:1;
75 wxRect m_savedFrame;
76
77 // did we sent wxSizeEvent at least once?
78 bool m_sizeSet:1;
79 };
80
81 #endif // __WX_TOPLEVEL_H__