1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 %% Purpose: wxTopLevelWindow documentation
4 %% Author: Vadim Zeitlin
6 %% Created: 2004-09-07 (partly extracted from frame.tex)
8 %% Copyright: (c) 2004 Vadim Zeitlin
9 %% License: wxWindows license
10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
12 \section{\class{wxTopLevelWindow
}}\label{wxtoplevelwindow
}
14 wxTopLevelWindow is a common base class for
\helpref{wxDialog
}{wxdialog
} and
15 \helpref{wxFrame
}{wxframe
}. 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.
19 \wxheading{Derived from
}
21 \helpref{wxWindow
}{wxwindow
}\\
22 \helpref{wxEvtHandler
}{wxevthandler
}\\
23 \helpref{wxObject
}{wxobject
}
25 \wxheading{Include files
}
30 \latexignore{\rtfignore{\wxheading{Members
}}}
33 \membersection{wxTopLevelWindow::GetIcon
}\label{wxtoplevelwindowgeticon
}
35 \constfunc{const wxIcon\&
}{GetIcon
}{\void}
37 Returns the standard icon of the window. The icon will be invalid if it hadn't
38 been previously set by
\helpref{SetIcon
}{wxtoplevelwindowseticon
}.
42 \helpref{GetIcons
}{wxtoplevelwindowgeticons
}
45 \membersection{wxTopLevelWindow::GetIcons
}\label{wxtoplevelwindowgeticons
}
47 \constfunc{const wxIconBundle\&
}{GetIcons
}{\void}
49 Returns all icons associated with the window, there will be none of them if
50 neither
\helpref{SetIcon
}{wxtoplevelwindowseticon
} nor
51 \helpref{SetIcons
}{wxtoplevelwindowseticons
} had been called before.
53 Use
\helpref{GetIcon
}{wxtoplevelwindowgeticon
} to get the main icon of the
58 \helpref{wxIconBundle
}{wxiconbundle
}
61 \membersection{wxTopLevelWindow::GetTitle
}\label{wxtoplevelwindowgettitle
}
63 \constfunc{wxString
}{GetTitle
}{\void}
65 Gets a string containing the window title.
67 See
\helpref{wxTopLevelWindow::SetTitle
}{wxtoplevelwindowsettitle
}.
70 \membersection{wxTopLevelWindow::IsActive
}\label{wxtoplevelwindowisactive
}
72 \constfunc{bool
}{IsActive
}{\void}
74 Returns
\true if this window is currently active, i.e. if the user is currently
78 \membersection{wxTopLevelWindow::Iconize
}\label{wxtoplevelwindowiconize
}
80 \func{void
}{Iconize
}{\param{bool
}{ iconize
}}
82 Iconizes or restores the window.
84 \wxheading{Parameters
}
86 \docparam{iconize
}{If
\true, iconizes the window; if
\false, shows and restores it.
}
90 \helpref{wxTopLevelWindow::IsIconized
}{wxtoplevelwindowisiconized
},
\helpref{wxTopLevelWindow::Maximize
}{wxtoplevelwindowmaximize
}.
93 \membersection{wxTopLevelWindow::IsFullScreen
}\label{wxtoplevelwindowisfullscreen
}
95 \func{bool
}{IsFullScreen
}{\void}
97 Returns
\true if the window is in fullscreen mode.
101 \helpref{wxTopLevelWindow::ShowFullScreen
}{wxtoplevelwindowshowfullscreen
}
104 \membersection{wxTopLevelWindow::IsIconized
}\label{wxtoplevelwindowisiconized
}
106 \constfunc{bool
}{IsIconized
}{\void}
108 Returns
\true if the window is iconized.
111 \membersection{wxTopLevelWindow::IsMaximized
}\label{wxtoplevelwindowismaximized
}
113 \constfunc{bool
}{IsMaximized
}{\void}
115 Returns
\true if the window is maximized.
118 \membersection{wxTopLevelWindow::Maximize
}\label{wxtoplevelwindowmaximize
}
120 \func{void
}{Maximize
}{\param{bool
}{maximize
}}
122 Maximizes or restores the window.
124 \wxheading{Parameters
}
126 \docparam{maximize
}{If
\true, maximizes the window, otherwise it restores it.
}
130 This function only works under Windows.
134 \helpref{wxTopLevelWindow::Iconize
}{wxtoplevelwindowiconize
}
137 \membersection{wxTopLevelWindow::RequestUserAttention
}\label{wxtoplevelwindowrequestuserattention
}
139 \func{void
}{RequestUserAttention
}{\param{int
}{flags = wxUSER
\_ATTENTION\_INFO}}
141 Use a system-dependent way to attract users attention to the window when it is
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
146 action. When in doubt, use the default value.
148 Note that this function should normally be only used when the application is
149 not already in foreground.
151 This function is currently only implemented for Win32 where it flashes the
152 window icon in the taskbar.
155 \membersection{wxTopLevelWindow::SetIcon
}\label{wxtoplevelwindowseticon
}
157 \func{void
}{SetIcon
}{\param{const wxIcon\&
}{icon
}}
159 Sets the icon for this window.
161 \wxheading{Parameters
}
163 \docparam{icon
}{The icon to associate with this window.
}
167 The window takes a `copy' of
{\it icon
}, but since it uses reference
168 counting, the copy is very quick. It is safe to delete
{\it icon
} after
169 calling this function.
171 See also
\helpref{wxIcon
}{wxicon
}.
174 \membersection{wxTopLevelWindow::SetIcons
}\label{wxtoplevelwindowseticons
}
176 \func{void
}{SetIcons
}{\param{const wxIconBundle\&
}{icons
}}
178 Sets several icons of different sizes for this window: this allows to use
179 different icons for different situations (e.g. task switching bar, taskbar,
180 window title bar) instead of scaling, with possibly bad looking results, the
181 only icon set by
\helpref{SetIcon
}{wxtoplevelwindowseticon
}.
183 \wxheading{Parameters
}
185 \docparam{icons
}{The icons to associate with this window.
}
189 \helpref{wxIconBundle
}{wxiconbundle
}.
192 \membersection{wxTopLevelWindow::SetLeftMenu
}\label{wxtoplevelwindowsetleftmenu
}
194 \func{void
}{SetLeftMenu
}{\param{int
}{ id = wxID
\_ANY},
\param{const wxString\&
}{ label = wxEmptyString
},
\param{wxMenu *
}{ subMenu = NULL
}}
196 Sets action or menu activated by pressing left hardware button on the smart phones.
197 Unavailable on full keyboard machines.
199 \wxheading{Parameters
}
201 \docparam{id
}{Identifier for this button.
}
203 \docparam{label
}{Text to be displayed on the screen area dedicated to this hardware button.
}
205 \docparam{subMenu
}{The menu to be opened after pressing this hardware button.
}
209 \helpref{wxTopLevelWindow::SetRightMenu
}{wxtoplevelwindowsetrightmenu
}.
212 \membersection{wxTopLevelWindow::SetRightMenu
}\label{wxtoplevelwindowsetrightmenu
}
214 \func{void
}{SetRightMenu
}{\param{int
}{ id = wxID
\_ANY},
\param{const wxString\&
}{ label = wxEmptyString
},
\param{wxMenu *
}{ subMenu = NULL
}}
216 Sets action or menu activated by pressing right hardware button on the smart phones.
217 Unavailable on full keyboard machines.
219 \wxheading{Parameters
}
221 \docparam{id
}{Identifier for this button.
}
223 \docparam{label
}{Text to be displayed on the screen area dedicated to this hardware button.
}
225 \docparam{subMenu
}{The menu to be opened after pressing this hardware button.
}
229 \helpref{wxTopLevelWindow::SetLeftMenu
}{wxtoplevelwindowsetleftmenu
}.
232 \membersection{wxTopLevelWindow::SetShape
}\label{wxtoplevelwindowsetshape
}
234 \func{bool
}{SetShape
}{\param{const wxRegion\&
}{ region
}}
236 If the platform supports it, sets the shape of the window to that
237 depicted by
{\it region
}. The system will not display or
238 respond to any mouse event for the pixels that lie outside of the
239 region. To reset the window to the normal rectangular shape simply
240 call
{\it SetShape
} again with an empty region. Returns TRUE if the
241 operation is successful.
244 \membersection{wxTopLevelWindow::SetTitle
}\label{wxtoplevelwindowsettitle
}
246 \func{virtual void
}{SetTitle
}{\param{const wxString\&
}{ title
}}
248 Sets the window title.
250 \wxheading{Parameters
}
252 \docparam{title
}{The window title.
}
256 \helpref{wxTopLevelWindow::GetTitle
}{wxtoplevelwindowgettitle
}
259 \membersection{wxTopLevelWindow::ShowFullScreen
}\label{wxtoplevelwindowshowfullscreen
}
261 \func{bool
}{ShowFullScreen
}{\param{bool
}{ show
},
\param{long
}{ style = wxFULLSCREEN
\_ALL}}
263 Depending on the value of
{\it show
} parameter the window is either shown full
264 screen or restored to its normal state.
{\it style
} is a bit list containing
265 some or all of the following values, which indicate what elements of the window
266 to hide in full-screen mode:
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)
277 This function has not been tested with MDI frames.
279 Note that showing a window full screen also actually
280 \helpref{Show()s
}{wxwindowshow
} if it hadn't been shown yet.
284 \helpref{wxTopLevelWindow::IsFullScreen
}{wxtoplevelwindowisfullscreen
}