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.
69 \helpref{wxTopLevelWindow::SetTitle
}{wxtoplevelwindowsettitle
}
72 \membersection{wxTopLevelWindow::IsActive
}\label{wxtoplevelwindowisactive
}
74 \constfunc{bool
}{IsActive
}{\void}
76 Returns
\true if this window is currently active, i.e. if the user is currently
80 \membersection{wxTopLevelWindow::Iconize
}\label{wxtoplevelwindowiconize
}
82 \func{void
}{Iconize
}{\param{bool
}{ iconize
}}
84 Iconizes or restores the window.
86 \wxheading{Parameters
}
88 \docparam{iconize
}{If
\true, iconizes the window; if
\false, shows and restores it.
}
92 \helpref{wxTopLevelWindow::IsIconized
}{wxtoplevelwindowisiconized
},
\helpref{wxTopLevelWindow::Maximize
}{wxtoplevelwindowmaximize
}.
95 \membersection{wxTopLevelWindow::IsFullScreen
}\label{wxtoplevelwindowisfullscreen
}
97 \func{bool
}{IsFullScreen
}{\void}
99 Returns
\true if the window is in fullscreen mode.
103 \helpref{wxTopLevelWindow::ShowFullScreen
}{wxtoplevelwindowshowfullscreen
}
106 \membersection{wxTopLevelWindow::IsIconized
}\label{wxtoplevelwindowisiconized
}
108 \constfunc{bool
}{IsIconized
}{\void}
110 Returns
\true if the window is iconized.
113 \membersection{wxTopLevelWindow::IsMaximized
}\label{wxtoplevelwindowismaximized
}
115 \constfunc{bool
}{IsMaximized
}{\void}
117 Returns
\true if the window is maximized.
120 \membersection{wxTopLevelWindow::Maximize
}\label{wxtoplevelwindowmaximize
}
122 \func{void
}{Maximize
}{\param{bool
}{maximize
}}
124 Maximizes or restores the window.
126 \wxheading{Parameters
}
128 \docparam{maximize
}{If
\true, maximizes the window, otherwise it restores it.
}
132 This function only works under Windows.
136 \helpref{wxTopLevelWindow::Iconize
}{wxtoplevelwindowiconize
}
139 \membersection{wxTopLevelWindow::RequestUserAttention
}\label{wxtoplevelwindowrequestuserattention
}
141 \func{void
}{RequestUserAttention
}{\param{int
}{flags = wxUSER
\_ATTENTION\_INFO}}
143 Use a system-dependent way to attract users attention to the window when it is
146 \arg{flags
} may have the value of either
\texttt{wxUSER
\_ATTENTION\_INFO}
147 (default) or
\texttt{wxUSER
\_ATTENTION\_ERROR} which results in a more drastic
148 action. When in doubt, use the default value.
150 Note that this function should normally be only used when the application is
151 not already in foreground.
153 This function is currently implemented for Win32 where it flashes the
154 window icon in the taskbar, and for wxGTK with task bars supporting it.
157 \membersection{wxTopLevelWindow::SetIcon
}\label{wxtoplevelwindowseticon
}
159 \func{void
}{SetIcon
}{\param{const wxIcon\&
}{icon
}}
161 Sets the icon for this window.
163 \wxheading{Parameters
}
165 \docparam{icon
}{The icon to associate with this window.
}
169 The window takes a `copy' of
{\it icon
}, but since it uses reference
170 counting, the copy is very quick. It is safe to delete
{\it icon
} after
171 calling this function.
173 See also
\helpref{wxIcon
}{wxicon
}.
176 \membersection{wxTopLevelWindow::SetIcons
}\label{wxtoplevelwindowseticons
}
178 \func{void
}{SetIcons
}{\param{const wxIconBundle\&
}{icons
}}
180 Sets several icons of different sizes for this window: this allows to use
181 different icons for different situations (e.g. task switching bar, taskbar,
182 window title bar) instead of scaling, with possibly bad looking results, the
183 only icon set by
\helpref{SetIcon
}{wxtoplevelwindowseticon
}.
185 \wxheading{Parameters
}
187 \docparam{icons
}{The icons to associate with this window.
}
191 \helpref{wxIconBundle
}{wxiconbundle
}.
194 \membersection{wxTopLevelWindow::SetLeftMenu
}\label{wxtoplevelwindowsetleftmenu
}
196 \func{void
}{SetLeftMenu
}{\param{int
}{ id = wxID
\_ANY},
\param{const wxString\&
}{ label = wxEmptyString
},
\param{wxMenu *
}{ subMenu = NULL
}}
198 Sets action or menu activated by pressing left hardware button on the smart phones.
199 Unavailable on full keyboard machines.
201 \wxheading{Parameters
}
203 \docparam{id
}{Identifier for this button.
}
205 \docparam{label
}{Text to be displayed on the screen area dedicated to this hardware button.
}
207 \docparam{subMenu
}{The menu to be opened after pressing this hardware button.
}
211 \helpref{wxTopLevelWindow::SetRightMenu
}{wxtoplevelwindowsetrightmenu
}.
214 \membersection{wxTopLevelWindow::SetRightMenu
}\label{wxtoplevelwindowsetrightmenu
}
216 \func{void
}{SetRightMenu
}{\param{int
}{ id = wxID
\_ANY},
\param{const wxString\&
}{ label = wxEmptyString
},
\param{wxMenu *
}{ subMenu = NULL
}}
218 Sets action or menu activated by pressing right hardware button on the smart phones.
219 Unavailable on full keyboard machines.
221 \wxheading{Parameters
}
223 \docparam{id
}{Identifier for this button.
}
225 \docparam{label
}{Text to be displayed on the screen area dedicated to this hardware button.
}
227 \docparam{subMenu
}{The menu to be opened after pressing this hardware button.
}
231 \helpref{wxTopLevelWindow::SetLeftMenu
}{wxtoplevelwindowsetleftmenu
}.
234 \membersection{wxTopLevelWindow::SetShape
}\label{wxtoplevelwindowsetshape
}
236 \func{bool
}{SetShape
}{\param{const wxRegion\&
}{ region
}}
238 If the platform supports it, sets the shape of the window to that
239 depicted by
{\it region
}. The system will not display or
240 respond to any mouse event for the pixels that lie outside of the
241 region. To reset the window to the normal rectangular shape simply
242 call
{\it SetShape
} again with an empty region. Returns true if the
243 operation is successful.
246 \membersection{wxTopLevelWindow::SetTitle
}\label{wxtoplevelwindowsettitle
}
248 \func{virtual void
}{SetTitle
}{\param{const wxString\&
}{ title
}}
250 Sets the window title.
252 \wxheading{Parameters
}
254 \docparam{title
}{The window title.
}
258 \helpref{wxTopLevelWindow::GetTitle
}{wxtoplevelwindowgettitle
}
261 \membersection{wxTopLevelWindow::ShowFullScreen
}\label{wxtoplevelwindowshowfullscreen
}
263 \func{bool
}{ShowFullScreen
}{\param{bool
}{ show
},
\param{long
}{ style = wxFULLSCREEN
\_ALL}}
265 Depending on the value of
{\it show
} parameter the window is either shown full
266 screen or restored to its normal state.
{\it style
} is a bit list containing
267 some or all of the following values, which indicate what elements of the window
268 to hide in full-screen mode:
270 \begin{itemize
}\itemsep=
0pt
271 \item wxFULLSCREEN
\_NOMENUBAR
272 \item wxFULLSCREEN
\_NOTOOLBAR
273 \item wxFULLSCREEN
\_NOSTATUSBAR
274 \item wxFULLSCREEN
\_NOBORDER
275 \item wxFULLSCREEN
\_NOCAPTION
276 \item wxFULLSCREEN
\_ALL (all of the above)
279 This function has not been tested with MDI frames.
281 Note that showing a window full screen also actually
282 \helpref{Show()s
}{wxwindowshow
} if it hadn't been shown yet.
286 \helpref{wxTopLevelWindow::IsFullScreen
}{wxtoplevelwindowisfullscreen
}