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: wxWidgets 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::Iconize
}\label{wxtoplevelwindowiconize
}
72 \func{void
}{Iconize
}{\param{bool
}{ iconize
}}
74 Iconizes or restores the window.
76 \wxheading{Parameters
}
78 \docparam{iconize
}{If
\true, iconizes the window; if
\false, shows and restores it.
}
82 \helpref{wxTopLevelWindow::IsIconized
}{wxtoplevelwindowisiconized
},
\helpref{wxTopLevelWindow::Maximize
}{wxtoplevelwindowmaximize
}.
85 \membersection{wxTopLevelWindow::IsFullScreen
}\label{wxtoplevelwindowisfullscreen
}
87 \func{bool
}{IsFullScreen
}{\void}
89 Returns
\true if the window is in fullscreen mode.
93 \helpref{wxTopLevelWindow::ShowFullScreen
}{wxtoplevelwindowshowfullscreen
}
96 \membersection{wxTopLevelWindow::IsIconized
}\label{wxtoplevelwindowisiconized
}
98 \constfunc{bool
}{IsIconized
}{\void}
100 Returns
\true if the window is iconized.
103 \membersection{wxTopLevelWindow::IsMaximized
}\label{wxtoplevelwindowismaximized
}
105 \constfunc{bool
}{IsMaximized
}{\void}
107 Returns
\true if the window is maximized.
110 \membersection{wxTopLevelWindow::Maximize
}\label{wxtoplevelwindowmaximize
}
112 \func{void
}{Maximize
}{\param{bool
}{maximize
}}
114 Maximizes or restores the window.
116 \wxheading{Parameters
}
118 \docparam{maximize
}{If
\true, maximizes the window, otherwise it restores it.
}
122 This function only works under Windows.
126 \helpref{wxTopLevelWindow::Iconize
}{wxtoplevelwindowiconize
}
129 \membersection{wxTopLevelWindow::RequestUserAttention
}\label{wxtoplevelwindowrequestuserattention
}
131 \func{void
}{RequestUserAttention
}{\param{int
}{flags = wxUSER
\_ATTENTION\_INFO}}
133 Use a system-dependent way to attract users attention to the window when it is
136 \arg{flags
} may have the value of either
\texttt{wxUSER
\_ATTENTION\_INFO}
137 (default) or
\texttt{wxUSER
\_ATTENTION\_ERROR} which results in a more drastic
138 action. When in doubt, use the default value.
140 Note that this function should normally be only used when the application is
141 not already in foreground.
143 This function is currently only implemented for Win32 where it flashes the
144 window icon in the taskbar.
147 \membersection{wxTopLevelWindow::SetIcon
}\label{wxtoplevelwindowseticon
}
149 \func{void
}{SetIcon
}{\param{const wxIcon\&
}{icon
}}
151 Sets the icon for this window.
153 \wxheading{Parameters
}
155 \docparam{icon
}{The icon to associate with this window.
}
159 The window takes a `copy' of
{\it icon
}, but since it uses reference
160 counting, the copy is very quick. It is safe to delete
{\it icon
} after
161 calling this function.
163 See also
\helpref{wxIcon
}{wxicon
}.
166 \membersection{wxTopLevelWindow::SetIcons
}\label{wxtoplevelwindowseticons
}
168 \func{void
}{SetIcons
}{\param{const wxIconBundle\&
}{icons
}}
170 Sets several icons of different sizes for this window: this allows to use
171 different icons for different situations (e.g. task switching bar, taskbar,
172 window title bar) instead of scaling, with possibly bad looking results, the
173 only icon set by
\helpref{SetIcon
}{wxtoplevelwindowseticon
}.
175 \wxheading{Parameters
}
177 \docparam{icons
}{The icons to associate with this window.
}
181 \helpref{wxIconBundle
}{wxiconbundle
}.
184 \membersection{wxTopLevelWindow::SetShape
}\label{wxtoplevelwindowsetshape
}
186 \func{bool
}{SetShape
}{\param{const wxRegion\&
}{ region
}}
188 If the platform supports it, sets the shape of the window to that
189 depicted by
{\it region
}. The system will not display or
190 respond to any mouse event for the pixels that lie outside of the
191 region. To reset the window to the normal rectangular shape simply
192 call
{\it SetShape
} again with an empty region. Returns TRUE if the
193 operation is successful.
196 \membersection{wxTopLevelWindow::SetTitle
}\label{wxtoplevelwindowsettitle
}
198 \func{virtual void
}{SetTitle
}{\param{const wxString\&
}{ title
}}
200 Sets the window title.
202 \wxheading{Parameters
}
204 \docparam{title
}{The window title.
}
208 \helpref{wxTopLevelWindow::GetTitle
}{wxtoplevelwindowgettitle
}
211 \membersection{wxTopLevelWindow::ShowFullScreen
}\label{wxtoplevelwindowshowfullscreen
}
213 \func{bool
}{ShowFullScreen
}{\param{bool
}{ show
},
\param{long
}{ style = wxFULLSCREEN
\_ALL}}
215 Depending on the value of
{\it show
} parameter the window is either shown full
216 screen or restored to its normal state.
{\it style
} is a bit list containing
217 some or all of the following values, which indicate what elements of the window
218 to hide in full-screen mode:
220 \begin{itemize
}\itemsep=
0pt
221 \item wxFULLSCREEN
\_NOMENUBAR
222 \item wxFULLSCREEN
\_NOTOOLBAR
223 \item wxFULLSCREEN
\_NOSTATUSBAR
224 \item wxFULLSCREEN
\_NOBORDER
225 \item wxFULLSCREEN
\_NOCAPTION
226 \item wxFULLSCREEN
\_ALL (all of the above)
229 This function has not been tested with MDI frames.
231 Note that showing a window full screen also actually
232 \helpref{Show()s
}{wxwindowshow
} if it hadn't been shown yet.
236 \helpref{wxTopLevelWindow::IsFullScreen
}{wxtoplevelwindowisfullscreen
}