]> git.saurik.com Git - wxWidgets.git/blame_incremental - docs/latex/wx/tlw.tex
MF_BYCOMMAND is zero so don't try to test it
[wxWidgets.git] / docs / latex / wx / tlw.tex
... / ...
CommitLineData
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: wxWindows license
10%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11
12\section{\class{wxTopLevelWindow}}\label{wxtoplevelwindow}
13
14wxTopLevelWindow is a common base class for \helpref{wxDialog}{wxdialog} and
15\helpref{wxFrame}{wxframe}. It is an abstract base class meaning that you never
16work with objects of this class directly, but all of its methods are also
17applicable for the two classes above.
18
19\wxheading{Derived from}
20
21\helpref{wxWindow}{wxwindow}\\
22\helpref{wxEvtHandler}{wxevthandler}\\
23\helpref{wxObject}{wxobject}
24
25\wxheading{Include files}
26
27<wx/toplevel.h>
28
29
30\latexignore{\rtfignore{\wxheading{Members}}}
31
32
33\membersection{wxTopLevelWindow::GetIcon}\label{wxtoplevelwindowgeticon}
34
35\constfunc{const wxIcon\&}{GetIcon}{\void}
36
37Returns the standard icon of the window. The icon will be invalid if it hadn't
38been previously set by \helpref{SetIcon}{wxtoplevelwindowseticon}.
39
40\wxheading{See also}
41
42\helpref{GetIcons}{wxtoplevelwindowgeticons}
43
44
45\membersection{wxTopLevelWindow::GetIcons}\label{wxtoplevelwindowgeticons}
46
47\constfunc{const wxIconBundle\&}{GetIcons}{\void}
48
49Returns all icons associated with the window, there will be none of them if
50neither \helpref{SetIcon}{wxtoplevelwindowseticon} nor
51\helpref{SetIcons}{wxtoplevelwindowseticons} had been called before.
52
53Use \helpref{GetIcon}{wxtoplevelwindowgeticon} to get the main icon of the
54window.
55
56\wxheading{See also}
57
58\helpref{wxIconBundle}{wxiconbundle}
59
60
61\membersection{wxTopLevelWindow::GetTitle}\label{wxtoplevelwindowgettitle}
62
63\constfunc{wxString}{GetTitle}{\void}
64
65Gets a string containing the window title.
66
67See \helpref{wxTopLevelWindow::SetTitle}{wxtoplevelwindowsettitle}.
68
69
70\membersection{wxTopLevelWindow::IsActive}\label{wxtoplevelwindowisactive}
71
72\constfunc{bool}{IsActive}{\void}
73
74Returns \true if this window is currently active, i.e. if the user is currently
75working with it.
76
77
78\membersection{wxTopLevelWindow::Iconize}\label{wxtoplevelwindowiconize}
79
80\func{void}{Iconize}{\param{bool}{ iconize}}
81
82Iconizes or restores the window.
83
84\wxheading{Parameters}
85
86\docparam{iconize}{If \true, iconizes the window; if \false, shows and restores it.}
87
88\wxheading{See also}
89
90\helpref{wxTopLevelWindow::IsIconized}{wxtoplevelwindowisiconized}, \helpref{wxTopLevelWindow::Maximize}{wxtoplevelwindowmaximize}.
91
92
93\membersection{wxTopLevelWindow::IsFullScreen}\label{wxtoplevelwindowisfullscreen}
94
95\func{bool}{IsFullScreen}{\void}
96
97Returns \true if the window is in fullscreen mode.
98
99\wxheading{See also}
100
101\helpref{wxTopLevelWindow::ShowFullScreen}{wxtoplevelwindowshowfullscreen}
102
103
104\membersection{wxTopLevelWindow::IsIconized}\label{wxtoplevelwindowisiconized}
105
106\constfunc{bool}{IsIconized}{\void}
107
108Returns \true if the window is iconized.
109
110
111\membersection{wxTopLevelWindow::IsMaximized}\label{wxtoplevelwindowismaximized}
112
113\constfunc{bool}{IsMaximized}{\void}
114
115Returns \true if the window is maximized.
116
117
118\membersection{wxTopLevelWindow::Maximize}\label{wxtoplevelwindowmaximize}
119
120\func{void}{Maximize}{\param{bool }{maximize}}
121
122Maximizes or restores the window.
123
124\wxheading{Parameters}
125
126\docparam{maximize}{If \true, maximizes the window, otherwise it restores it.}
127
128\wxheading{Remarks}
129
130This function only works under Windows.
131
132\wxheading{See also}
133
134\helpref{wxTopLevelWindow::Iconize}{wxtoplevelwindowiconize}
135
136
137\membersection{wxTopLevelWindow::RequestUserAttention}\label{wxtoplevelwindowrequestuserattention}
138
139\func{void}{RequestUserAttention}{\param{int }{flags = wxUSER\_ATTENTION\_INFO}}
140
141Use a system-dependent way to attract users attention to the window when it is
142in background.
143
144\arg{flags} may have the value of either \texttt{wxUSER\_ATTENTION\_INFO}
145(default) or \texttt{wxUSER\_ATTENTION\_ERROR} which results in a more drastic
146action. When in doubt, use the default value.
147
148Note that this function should normally be only used when the application is
149not already in foreground.
150
151This function is currently only implemented for Win32 where it flashes the
152window icon in the taskbar.
153
154
155\membersection{wxTopLevelWindow::SetIcon}\label{wxtoplevelwindowseticon}
156
157\func{void}{SetIcon}{\param{const wxIcon\& }{icon}}
158
159Sets the icon for this window.
160
161\wxheading{Parameters}
162
163\docparam{icon}{The icon to associate with this window.}
164
165\wxheading{Remarks}
166
167The window takes a `copy' of {\it icon}, but since it uses reference
168counting, the copy is very quick. It is safe to delete {\it icon} after
169calling this function.
170
171See also \helpref{wxIcon}{wxicon}.
172
173
174\membersection{wxTopLevelWindow::SetIcons}\label{wxtoplevelwindowseticons}
175
176\func{void}{SetIcons}{\param{const wxIconBundle\& }{icons}}
177
178Sets several icons of different sizes for this window: this allows to use
179different icons for different situations (e.g. task switching bar, taskbar,
180window title bar) instead of scaling, with possibly bad looking results, the
181only icon set by \helpref{SetIcon}{wxtoplevelwindowseticon}.
182
183\wxheading{Parameters}
184
185\docparam{icons}{The icons to associate with this window.}
186
187\wxheading{See also}
188
189\helpref{wxIconBundle}{wxiconbundle}.
190
191
192\membersection{wxTopLevelWindow::SetLeftMenu}\label{wxtoplevelwindowsetleftmenu}
193
194\func{void}{SetLeftMenu}{\param{int}{ id = wxID\_ANY}, \param{const wxString\&}{ label = wxEmptyString}, \param{wxMenu *}{ subMenu = NULL}}
195
196Sets action or menu activated by pressing left hardware button on the smart phones.
197Unavailable on full keyboard machines.
198
199\wxheading{Parameters}
200
201\docparam{id}{Identifier for this button.}
202
203\docparam{label}{Text to be displayed on the screen area dedicated to this hardware button.}
204
205\docparam{subMenu}{The menu to be opened after pressing this hardware button.}
206
207\wxheading{See also}
208
209\helpref{wxTopLevelWindow::SetRightMenu}{wxtoplevelwindowsetrightmenu}.
210
211
212\membersection{wxTopLevelWindow::SetRightMenu}\label{wxtoplevelwindowsetrightmenu}
213
214\func{void}{SetRightMenu}{\param{int}{ id = wxID\_ANY}, \param{const wxString\&}{ label = wxEmptyString}, \param{wxMenu *}{ subMenu = NULL}}
215
216Sets action or menu activated by pressing right hardware button on the smart phones.
217Unavailable on full keyboard machines.
218
219\wxheading{Parameters}
220
221\docparam{id}{Identifier for this button.}
222
223\docparam{label}{Text to be displayed on the screen area dedicated to this hardware button.}
224
225\docparam{subMenu}{The menu to be opened after pressing this hardware button.}
226
227\wxheading{See also}
228
229\helpref{wxTopLevelWindow::SetLeftMenu}{wxtoplevelwindowsetleftmenu}.
230
231
232\membersection{wxTopLevelWindow::SetShape}\label{wxtoplevelwindowsetshape}
233
234\func{bool}{SetShape}{\param{const wxRegion\&}{ region}}
235
236If the platform supports it, sets the shape of the window to that
237depicted by {\it region}. The system will not display or
238respond to any mouse event for the pixels that lie outside of the
239region. To reset the window to the normal rectangular shape simply
240call {\it SetShape} again with an empty region. Returns TRUE if the
241operation is successful.
242
243
244\membersection{wxTopLevelWindow::SetTitle}\label{wxtoplevelwindowsettitle}
245
246\func{virtual void}{SetTitle}{\param{const wxString\& }{ title}}
247
248Sets the window title.
249
250\wxheading{Parameters}
251
252\docparam{title}{The window title.}
253
254\wxheading{See also}
255
256\helpref{wxTopLevelWindow::GetTitle}{wxtoplevelwindowgettitle}
257
258
259\membersection{wxTopLevelWindow::ShowFullScreen}\label{wxtoplevelwindowshowfullscreen}
260
261\func{bool}{ShowFullScreen}{\param{bool}{ show}, \param{long}{ style = wxFULLSCREEN\_ALL}}
262
263Depending on the value of {\it show} parameter the window is either shown full
264screen or restored to its normal state. {\it style} is a bit list containing
265some or all of the following values, which indicate what elements of the window
266to hide in full-screen mode:
267
268\begin{itemize}\itemsep=0pt
269\item wxFULLSCREEN\_NOMENUBAR
270\item wxFULLSCREEN\_NOTOOLBAR
271\item wxFULLSCREEN\_NOSTATUSBAR
272\item wxFULLSCREEN\_NOBORDER
273\item wxFULLSCREEN\_NOCAPTION
274\item wxFULLSCREEN\_ALL (all of the above)
275\end{itemize}
276
277This function has not been tested with MDI frames.
278
279Note that showing a window full screen also actually
280\helpref{Show()s}{wxwindowshow} if it hadn't been shown yet.
281
282\wxheading{See also}
283
284\helpref{wxTopLevelWindow::IsFullScreen}{wxtoplevelwindowisfullscreen}
285