]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk1/toplevel.h
Don't define __STRICT_ANSI__, we should build both with and without it.
[wxWidgets.git] / include / wx / gtk1 / toplevel.h
CommitLineData
7d9f12f3 1/////////////////////////////////////////////////////////////////////////////
8ef94bfc 2// Name: wx/gtk1/toplevel.h
7d9f12f3
VS
3// Purpose:
4// Author: Robert Roebling
7d9f12f3 5// Copyright: (c) 1998 Robert Roebling, Julian Smart
65571936 6// Licence: wxWindows licence
7d9f12f3
VS
7/////////////////////////////////////////////////////////////////////////////
8
7d9f12f3
VS
9#ifndef __GTKTOPLEVELH__
10#define __GTKTOPLEVELH__
11
7d9f12f3
VS
12//-----------------------------------------------------------------------------
13// wxTopLevelWindowGTK
14//-----------------------------------------------------------------------------
15
20123d49 16class WXDLLIMPEXP_CORE wxTopLevelWindowGTK : public wxTopLevelWindowBase
7d9f12f3
VS
17{
18public:
19 // construction
20 wxTopLevelWindowGTK() { Init(); }
21 wxTopLevelWindowGTK(wxWindow *parent,
22 wxWindowID id,
23 const wxString& title,
24 const wxPoint& pos = wxDefaultPosition,
25 const wxSize& size = wxDefaultSize,
26 long style = wxDEFAULT_FRAME_STYLE,
27 const wxString& name = wxFrameNameStr)
28 {
29 Init();
30
31 Create(parent, id, title, pos, size, style, name);
32 }
33
34 bool Create(wxWindow *parent,
35 wxWindowID id,
36 const wxString& title,
37 const wxPoint& pos = wxDefaultPosition,
38 const wxSize& size = wxDefaultSize,
39 long style = wxDEFAULT_FRAME_STYLE,
40 const wxString& name = wxFrameNameStr);
41
42 virtual ~wxTopLevelWindowGTK();
43
44 // implement base class pure virtuals
cb8cc250 45 virtual void Maximize(bool maximize = true);
7d9f12f3 46 virtual bool IsMaximized() const;
cb8cc250 47 virtual void Iconize(bool iconize = true);
7d9f12f3 48 virtual bool IsIconized() const;
f618020a 49 virtual void SetIcons(const wxIconBundle& icons);
7d9f12f3
VS
50 virtual void Restore();
51
52 virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL);
6dd0883d 53 virtual bool IsFullScreen() const { return m_fsIsShowing; }
7d9f12f3 54
1542ea39
RD
55 virtual bool SetShape(const wxRegion& region);
56
dca92ddf
MR
57 virtual void RequestUserAttention(int flags = wxUSER_ATTENTION_INFO);
58
015dca24
MR
59 virtual void SetWindowStyleFlag( long style );
60
cb8cc250 61 virtual bool Show(bool show = true);
7d9f12f3 62
a2ac55f5
RR
63 virtual void Raise();
64
6b30a44e 65 virtual bool IsActive();
35ff90a0 66
7d9f12f3
VS
67 virtual void SetTitle( const wxString &title );
68 virtual wxString GetTitle() const { return m_title; }
69
5152b0e5
JS
70 // Experimental, to allow help windows to be
71 // viewable from within modal dialogs
72 virtual void AddGrab();
73 virtual void RemoveGrab();
74 virtual bool IsGrabbed() const { return m_grabbed; }
75
7d9f12f3
VS
76 // implementation from now on
77 // --------------------------
78
79 // move the window to the specified location and resize it: this is called
80 // from both DoSetSize() and DoSetClientSize()
81 virtual void DoMoveWindow(int x, int y, int width, int height);
82
83 // GTK callbacks
84 virtual void GtkOnSize( int x, int y, int width, int height );
85 virtual void OnInternalIdle();
86
87 // do *not* call this to iconize the frame, this is a private function!
88 void SetIconizeState(bool iconic);
89
7d9f12f3
VS
90 int m_miniEdge,
91 m_miniTitle;
92 GtkWidget *m_mainWidget;
93 bool m_insertInClientArea; /* not from within OnCreateXXX */
94
95 bool m_fsIsShowing; /* full screen */
82f2d919 96 long m_fsSaveGdkFunc, m_fsSaveGdkDecor;
7d9f12f3
VS
97 long m_fsSaveFlag;
98 wxRect m_fsSaveFrame;
6aeb6f2a
VZ
99
100 // m_windowStyle translated to GDK's terms
101 long m_gdkFunc,
102 m_gdkDecor;
7d9f12f3 103
ef1a9be4
MR
104 // private gtk_timeout_add result for mimicing wxUSER_ATTENTION_INFO and
105 // wxUSER_ATTENTION_ERROR difference, -2 for no hint, -1 for ERROR hint, rest for GtkTimeout handle.
106 int m_urgency_hint;
107
7d9f12f3
VS
108protected:
109 // common part of all ctors
110 void Init();
111
112 // override wxWindow methods to take into account tool/menu/statusbars
113 virtual void DoSetSize(int x, int y,
114 int width, int height,
115 int sizeFlags = wxSIZE_AUTO);
116
117 virtual void DoSetClientSize(int width, int height);
118 virtual void DoGetClientSize( int *width, int *height ) const;
119
cb8cc250
WS
120 wxString m_title;
121
7d9f12f3
VS
122 // is the frame currently iconized?
123 bool m_isIconized;
5152b0e5
JS
124 // is the frame currently grabbed explicitly
125 // by the application?
126 bool m_grabbed;
7d9f12f3
VS
127};
128
129#endif // __GTKTOPLEVELH__