]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/tlw.tex
f2e2fa1c038139aa929e1839ecd035b3c7e20903
[wxWidgets.git] / docs / latex / wx / tlw.tex
1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 %% Name: tlw.tex
3 %% Purpose: wxTopLevelWindow documentation
4 %% Author: Vadim Zeitlin
5 %% Modified by:
6 %% Created: 2004-09-07 (partly extracted from frame.tex)
7 %% RCS-ID: $Id$
8 %% Copyright: (c) 2004 Vadim Zeitlin
9 %% License: wxWidgets license
10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11
12 \section{\class{wxTopLevelWindow}}\label{wxtoplevelwindow}
13
14 wxTopLevelWindow is a common base class for \helpref{wxDialog}{wxdialog} and
15 \helpref{wxTopLevelWindow}{wxtoplevelwindow}. It is an abstract base class meaning that you never
16 work with objects of this class directly, but all of its methods are also
17 applicable for the two classes above.
18
19
20 \latexignore{\rtfignore{\wxheading{Members}}}
21
22
23 \membersection{wxTopLevelWindow::GetIcon}\label{wxtoplevelwindowgeticon}
24
25 \constfunc{const wxIcon\&}{GetIcon}{\void}
26
27 Returns the standard icon of the window. The icon will be invalid if it hadn't
28 been previously set by \helpref{SetIcon}{wxtoplevelwindowseticon}.
29
30 \wxheading{See also}
31
32 \helpref{GetIcons}{wxtoplevelwindowgeticons}
33
34
35 \membersection{wxTopLevelWindow::GetIcons}\label{wxtoplevelwindowgeticons}
36
37 \constfunc{const wxIconBundle\&}{GetIcons}{\void}
38
39 Returns all icons associated with the window, there will be none of them if
40 neither \helpref{SetIcon}{wxtoplevelwindowseticon} nor
41 \helpref{SetIcons}{wxtoplevelwindowseticons} had been called before.
42
43 Use \helpref{GetIcon}{wxtoplevelwindowgeticon} to get the main icon of the
44 window.
45
46 \wxheading{See also}
47
48 \helpref{wxIconBundle}{wxiconbundle}
49
50
51 \membersection{wxTopLevelWindow::GetTitle}\label{wxtoplevelwindowgettitle}
52
53 \constfunc{wxString}{GetTitle}{\void}
54
55 Gets a string containing the window title.
56
57 See \helpref{wxTopLevelWindow::SetTitle}{wxtoplevelwindowsettitle}.
58
59
60 \membersection{wxTopLevelWindow::Iconize}\label{wxtoplevelwindowiconize}
61
62 \func{void}{Iconize}{\param{bool}{ iconize}}
63
64 Iconizes or restores the window.
65
66 \wxheading{Parameters}
67
68 \docparam{iconize}{If \true, iconizes the window; if \false, shows and restores it.}
69
70 \wxheading{See also}
71
72 \helpref{wxTopLevelWindow::IsIconized}{wxtoplevelwindowisiconized}, \helpref{wxTopLevelWindow::Maximize}{wxtoplevelwindowmaximize}.
73
74
75 \membersection{wxTopLevelWindow::IsFullScreen}\label{wxtoplevelwindowisfullscreen}
76
77 \func{bool}{IsFullScreen}{\void}
78
79 Returns \true if the window is in fullscreen mode.
80
81 \wxheading{See also}
82
83 \helpref{wxTopLevelWindow::ShowFullScreen}{wxtoplevelwindowshowfullscreen}
84
85
86 \membersection{wxTopLevelWindow::IsIconized}\label{wxtoplevelwindowisiconized}
87
88 \constfunc{bool}{IsIconized}{\void}
89
90 Returns \true if the window is iconized.
91
92
93 \membersection{wxTopLevelWindow::IsMaximized}\label{wxtoplevelwindowismaximized}
94
95 \constfunc{bool}{IsMaximized}{\void}
96
97 Returns \true if the window is maximized.
98
99
100 \membersection{wxTopLevelWindow::Maximize}\label{wxtoplevelwindowmaximize}
101
102 \func{void}{Maximize}{\param{bool }{maximize}}
103
104 Maximizes or restores the window.
105
106 \wxheading{Parameters}
107
108 \docparam{maximize}{If \true, maximizes the window, otherwise it restores it.}
109
110 \wxheading{Remarks}
111
112 This function only works under Windows.
113
114 \wxheading{See also}
115
116 \helpref{wxTopLevelWindow::Iconize}{wxtoplevelwindowiconize}
117
118
119 \membersection{wxTopLevelWindow::RequestUserAttention}\label{wxtoplevelwindowrequestuserattention}
120
121 \func{void}{RequestUserAttention}{\param{int }{flags = wxUSER\_ATTENTION\_INFO}}
122
123 Use a system-dependent way to attract users attention to the window when it is
124 in background.
125
126 \arg{flags} may have the value of either \texttt{wxUSER\_ATTENTION\_INFO}
127 (default) or \texttt{wxUSER\_ATTENTION\_ERROR} which results in a more drastic
128 action. When in doubt, use the default value.
129
130 Note that this function should normally be only used when the application is
131 not already in foreground.
132
133 This function is currently only implemented for Win32 where it flashes the
134 window icon in the taskbar.
135
136
137 \membersection{wxTopLevelWindow::SetIcon}\label{wxtoplevelwindowseticon}
138
139 \func{void}{SetIcon}{\param{const wxIcon\& }{icon}}
140
141 Sets the icon for this window.
142
143 \wxheading{Parameters}
144
145 \docparam{icon}{The icon to associate with this window.}
146
147 \wxheading{Remarks}
148
149 The window takes a `copy' of {\it icon}, but since it uses reference
150 counting, the copy is very quick. It is safe to delete {\it icon} after
151 calling this function.
152
153 See also \helpref{wxIcon}{wxicon}.
154
155
156 \membersection{wxTopLevelWindow::SetIcons}\label{wxtoplevelwindowseticons}
157
158 \func{void}{SetIcons}{\param{const wxIconBundle\& }{icons}}
159
160 Sets several icons of different sizes for this window: this allows to use
161 different icons for different situations (e.g. task switching bar, taskbar,
162 window title bar) instead of scaling, with possibly bad looking results, the
163 only icon set by \helpref{SetIcon}{wxtoplevelwindowseticon}.
164
165 \wxheading{Parameters}
166
167 \docparam{icons}{The icons to associate with this window.}
168
169 \wxheading{See also}
170
171 \helpref{wxIconBundle}{wxiconbundle}.
172
173
174 \membersection{wxTopLevelWindow::SetShape}\label{wxtoplevelwindowsetshape}
175
176 \func{bool}{SetShape}{\param{const wxRegion\&}{ region}}
177
178 If the platform supports it, sets the shape of the window to that
179 depicted by {\it region}. The system will not display or
180 respond to any mouse event for the pixels that lie outside of the
181 region. To reset the window to the normal rectangular shape simply
182 call {\it SetShape} again with an empty region. Returns TRUE if the
183 operation is successful.
184
185
186 \membersection{wxTopLevelWindow::SetTitle}\label{wxtoplevelwindowsettitle}
187
188 \func{virtual void}{SetTitle}{\param{const wxString\& }{ title}}
189
190 Sets the window title.
191
192 \wxheading{Parameters}
193
194 \docparam{title}{The window title.}
195
196 \wxheading{See also}
197
198 \helpref{wxTopLevelWindow::GetTitle}{wxtoplevelwindowgettitle}
199
200
201 \membersection{wxTopLevelWindow::ShowFullScreen}\label{wxtoplevelwindowshowfullscreen}
202
203 \func{bool}{ShowFullScreen}{\param{bool}{ show}, \param{long}{ style = wxFULLSCREEN\_ALL}}
204
205 Depending on the value of {\it show} parameter the window is either shown full
206 screen or restored to its normal state. {\it style} is a bit list containing
207 some or all of the following values, which indicate what elements of the window
208 to hide in full-screen mode:
209
210 \begin{itemize}\itemsep=0pt
211 \item wxFULLSCREEN\_NOMENUBAR
212 \item wxFULLSCREEN\_NOTOOLBAR
213 \item wxFULLSCREEN\_NOSTATUSBAR
214 \item wxFULLSCREEN\_NOBORDER
215 \item wxFULLSCREEN\_NOCAPTION
216 \item wxFULLSCREEN\_ALL (all of the above)
217 \end{itemize}
218
219 This function has not been tested with MDI frames.
220
221 Note that showing a window full screen also actually
222 \helpref{Show()s}{wxwindowshow} if it hadn't been shown yet.
223
224 \wxheading{See also}
225
226 \helpref{wxTopLevelWindow::IsFullScreen}{wxtoplevelwindowisfullscreen}
227