1wxTopLevelWindow(3) Erlang Module Definition wxTopLevelWindow(3)
2
3
4
6 wxTopLevelWindow - Functions for wxTopLevelWindow class
7
9 wxTopLevelWindow is a common base class for wxDialog and wxFrame. It is
10 an abstract base class meaning that you never work with objects of this
11 class directly, but all of its methods are also applicable for the two
12 classes above.
13
14 Note that the instances of wxTopLevelWindow are managed by wxWidgets in
15 the internal top level window list.
16
17 See: wxDialog, wxFrame
18
19 This class is derived (and can use functions) from: wxWindow wx‐
20 EvtHandler
21
22 wxWidgets docs: wxTopLevelWindow
23
25 Event types emitted from this class: maximize, move, show
26
28 wxTopLevelWindow() = wx:wx_object()
29
31 getIcon(This) -> wxIcon:wxIcon()
32
33 Types:
34
35 This = wxTopLevelWindow()
36
37 Returns the standard icon of the window.
38
39 The icon will be invalid if it hadn't been previously set by
40 setIcon/2.
41
42 See: getIcons/1
43
44 getIcons(This) -> wxIconBundle:wxIconBundle()
45
46 Types:
47
48 This = wxTopLevelWindow()
49
50 Returns all icons associated with the window, there will be none
51 of them if neither setIcon/2 nor setIcons/2 had been called be‐
52 fore.
53
54 Use getIcon/1 to get the main icon of the window.
55
56 See: wxIconBundle
57
58 getTitle(This) -> unicode:charlist()
59
60 Types:
61
62 This = wxTopLevelWindow()
63
64 Gets a string containing the window title.
65
66 See: setTitle/2
67
68 isActive(This) -> boolean()
69
70 Types:
71
72 This = wxTopLevelWindow()
73
74 Returns true if this window is currently active, i.e. if the
75 user is currently working with it.
76
77 iconize(This) -> ok
78
79 Types:
80
81 This = wxTopLevelWindow()
82
83 iconize(This, Options :: [Option]) -> ok
84
85 Types:
86
87 This = wxTopLevelWindow()
88 Option = {iconize, boolean()}
89
90 Iconizes or restores the window.
91
92 Note that in wxGTK the change to the window state is not immedi‐
93 ate, i.e. isIconized/1 will typically return false right after a
94 call to iconize/2 and its return value will only change after
95 the control flow returns to the event loop and the notification
96 about the window being really iconized is received.
97
98 See: isIconized/1, Restore() (not implemented in wx), (), wxI‐
99 conizeEvent
100
101 isFullScreen(This) -> boolean()
102
103 Types:
104
105 This = wxTopLevelWindow()
106
107 Returns true if the window is in fullscreen mode.
108
109 See: showFullScreen/3
110
111 isIconized(This) -> boolean()
112
113 Types:
114
115 This = wxTopLevelWindow()
116
117 Returns true if the window is iconized.
118
119 isMaximized(This) -> boolean()
120
121 Types:
122
123 This = wxTopLevelWindow()
124
125 Returns true if the window is maximized.
126
127 maximize(This) -> ok
128
129 Types:
130
131 This = wxTopLevelWindow()
132
133 maximize(This, Options :: [Option]) -> ok
134
135 Types:
136
137 This = wxTopLevelWindow()
138 Option = {maximize, boolean()}
139
140 Maximizes or restores the window.
141
142 Note that, just as with iconize/2, the change to the window
143 state is not immediate in at least wxGTK port.
144
145 See: Restore() (not implemented in wx), iconize/2
146
147 requestUserAttention(This) -> ok
148
149 Types:
150
151 This = wxTopLevelWindow()
152
153 requestUserAttention(This, Options :: [Option]) -> ok
154
155 Types:
156
157 This = wxTopLevelWindow()
158 Option = {flags, integer()}
159
160 Use a system-dependent way to attract users attention to the
161 window when it is in background.
162
163 flags may have the value of either ?wxUSER_ATTENTION_INFO (de‐
164 fault) or ?wxUSER_ATTENTION_ERROR which results in a more dras‐
165 tic action. When in doubt, use the default value.
166
167 Note: This function should normally be only used when the appli‐
168 cation is not already in foreground.
169
170 This function is currently implemented for Win32 where it
171 flashes the window icon in the taskbar, and for wxGTK with task
172 bars supporting it.
173
174 setIcon(This, Icon) -> ok
175
176 Types:
177
178 This = wxTopLevelWindow()
179 Icon = wxIcon:wxIcon()
180
181 Sets the icon for this window.
182
183 Remark: The window takes a 'copy' of icon, but since it uses
184 reference counting, the copy is very quick. It is safe to delete
185 icon after calling this function.
186
187 Note: In wxMSW, icon must be either 16x16 or 32x32 icon.
188
189 See: wxIcon, setIcons/2
190
191 setIcons(This, Icons) -> ok
192
193 Types:
194
195 This = wxTopLevelWindow()
196 Icons = wxIconBundle:wxIconBundle()
197
198 Sets several icons of different sizes for this window: this al‐
199 lows using different icons for different situations (e.g.
200
201 task switching bar, taskbar, window title bar) instead of scal‐
202 ing, with possibly bad looking results, the only icon set by
203 setIcon/2.
204
205 Note: In wxMSW, icons must contain a 16x16 or 32x32 icon,
206 preferably both.
207
208 See: wxIconBundle
209
210 centerOnScreen(This) -> ok
211
212 Types:
213
214 This = wxTopLevelWindow()
215
216 centreOnScreen(This) -> ok
217
218 Types:
219
220 This = wxTopLevelWindow()
221
222 centerOnScreen(This, Options :: [Option]) -> ok
223
224 Types:
225
226 This = wxTopLevelWindow()
227 Option = {dir, integer()}
228
229 See: centreOnScreen/2.
230
231 centreOnScreen(This, Options :: [Option]) -> ok
232
233 Types:
234
235 This = wxTopLevelWindow()
236 Option = {dir, integer()}
237
238 Centres the window on screen.
239
240 See: wxWindow:centreOnParent/2
241
242 setShape(This, Region) -> boolean()
243
244 Types:
245
246 This = wxTopLevelWindow()
247 Region = wxRegion:wxRegion() | wxGraphicsPath:wxGraphic‐
248 sPath()
249
250 If the platform supports it, sets the shape of the window to
251 that depicted by region.
252
253 The system will not display or respond to any mouse event for
254 the pixels that lie outside of the region. To reset the window
255 to the normal rectangular shape simply call setShape/2 again
256 with an empty wxRegion. Returns true if the operation is suc‐
257 cessful.
258
259 This method is available in this class only since wxWidgets
260 2.9.3, previous versions only provided it in wxTopLevelWindow.
261
262 Note that windows with non default shape have a fixed size and
263 can't be resized using wxWindow:setSize/6.
264
265 setTitle(This, Title) -> ok
266
267 Types:
268
269 This = wxTopLevelWindow()
270 Title = unicode:chardata()
271
272 Sets the window title.
273
274 See: getTitle/1
275
276 showFullScreen(This, Show) -> boolean()
277
278 Types:
279
280 This = wxTopLevelWindow()
281 Show = boolean()
282
283 showFullScreen(This, Show, Options :: [Option]) -> boolean()
284
285 Types:
286
287 This = wxTopLevelWindow()
288 Show = boolean()
289 Option = {style, integer()}
290
291 Depending on the value of show parameter the window is either
292 shown full screen or restored to its normal state.
293
294 style is a bit list containing some or all of the following val‐
295 ues, which indicate what elements of the window to hide in full-
296 screen mode:
297
298 This function has not been tested with MDI frames.
299
300 Note: Showing a window full screen also actually wxWin‐
301 dow:show/2s the window if it isn't shown.
302
303 See: EnableFullScreenView() (not implemented in wx), is‐
304 FullScreen/1
305
306
307
308wxWidgets team. wx 2.1 wxTopLevelWindow(3)