1wxFrame(3)                 Erlang Module Definition                 wxFrame(3)
2
3
4

NAME

6       wxFrame - Functions for wxFrame class
7

DESCRIPTION

9       A frame is a window whose size and position can (usually) be changed by
10       the user.
11
12       It usually has thick borders and a title bar, and can  optionally  con‐
13       tain a menu bar, toolbar and status bar. A frame can contain any window
14       that is not a frame or dialog.
15
16       A frame that has a status bar and toolbar, created via  the  createSta‐
17       tusBar/2  and  createToolBar/2 functions, manages these windows and ad‐
18       justs the value returned by wxWindow:getClientSize/1 to reflect the re‐
19       maining size available to application windows.
20
21       Remark:  An  application should normally define an wxCloseEvent handler
22       for the frame to respond to system close events, for  example  so  that
23       related data and subwindows can be cleaned up.
24
25       Default event processing
26
27       wxFrame processes the following events:
28
29       Styles
30
31       This class supports the following styles:
32
33       See also the overview_windowstyles.
34
35       Extra Styles
36
37       This class supports the following extra styles:
38
39       See: wxMDIParentFrame, wxMDIChildFrame, wxMiniFrame, wxDialog
40
41       This  class  is  derived (and can use functions) from: wxTopLevelWindow
42       wxWindow wxEvtHandler
43
44       wxWidgets docs: wxFrame
45

EVENTS

47       Event types emitted from this class: close_window, iconize,  menu_open,
48       menu_close, menu_highlight
49

DATA TYPES

51       wxFrame() = wx:wx_object()
52

EXPORTS

54       new() -> wxFrame()
55
56              Default constructor.
57
58       new(Parent, Id, Title) -> wxFrame()
59
60              Types:
61
62                 Parent = wxWindow:wxWindow()
63                 Id = integer()
64                 Title = unicode:chardata()
65
66       new(Parent, Id, Title, Options :: [Option]) -> wxFrame()
67
68              Types:
69
70                 Parent = wxWindow:wxWindow()
71                 Id = integer()
72                 Title = unicode:chardata()
73                 Option =
74                     {pos, {X :: integer(), Y :: integer()}} |
75                     {size, {W :: integer(), H :: integer()}} |
76                     {style, integer()}
77
78              Constructor, creating the window.
79
80              Remark: For Motif, MWM (the Motif Window Manager) should be run‐
81              ning for any window styles to work (otherwise  all  styles  take
82              effect).
83
84              See: create/5
85
86       destroy(This :: wxFrame()) -> ok
87
88              Destructor.
89
90              Destroys all child windows and menu bar if present.
91
92              See overview_windowdeletion for more info.
93
94       create(This, Parent, Id, Title) -> boolean()
95
96              Types:
97
98                 This = wxFrame()
99                 Parent = wxWindow:wxWindow()
100                 Id = integer()
101                 Title = unicode:chardata()
102
103       create(This, Parent, Id, Title, Options :: [Option]) -> boolean()
104
105              Types:
106
107                 This = wxFrame()
108                 Parent = wxWindow:wxWindow()
109                 Id = integer()
110                 Title = unicode:chardata()
111                 Option =
112                     {pos, {X :: integer(), Y :: integer()}} |
113                     {size, {W :: integer(), H :: integer()}} |
114                     {style, integer()}
115
116              Used in two-step frame construction.
117
118              See new/4 for further details.
119
120       createStatusBar(This) -> wxStatusBar:wxStatusBar()
121
122              Types:
123
124                 This = wxFrame()
125
126       createStatusBar(This, Options :: [Option]) ->
127                          wxStatusBar:wxStatusBar()
128
129              Types:
130
131                 This = wxFrame()
132                 Option =
133                     {number,  integer()}  |  {style,  integer()} | {id, inte‐
134                 ger()}
135
136              Creates a status bar at the bottom of the frame.
137
138              Return: A pointer to the status bar if it was  created  success‐
139              fully, NULL otherwise.
140
141              Remark:  The  width  of the status bar is the whole width of the
142              frame (adjusted automatically when resizing), and the height and
143              text size are chosen by the host windowing system.
144
145              See:  setStatusText/3,  OnCreateStatusBar()  (not implemented in
146              wx), getStatusBar/1
147
148       createToolBar(This) -> wxToolBar:wxToolBar()
149
150              Types:
151
152                 This = wxFrame()
153
154       createToolBar(This, Options :: [Option]) -> wxToolBar:wxToolBar()
155
156              Types:
157
158                 This = wxFrame()
159                 Option = {style, integer()} | {id, integer()}
160
161              Creates a toolbar at the top or left of the frame.
162
163              Return: A pointer to the toolbar if it was created successfully,
164              NULL otherwise.
165
166              Remark:  By default, the toolbar is an instance of wxToolBar. To
167              use a different class, override  OnCreateToolBar()  (not  imple‐
168              mented  in  wx). When a toolbar has been created with this func‐
169              tion, or made known to the frame with  setToolBar/2,  the  frame
170              will  manage  the  toolbar  position and adjust the return value
171              from wxWindow:getClientSize/1 to reflect the available space for
172              application windows. Under Pocket PC, you should always use this
173              function for creating the toolbar to be managed by the frame, so
174              that wxWidgets can use a combined menubar and toolbar. Where you
175              manage your own toolbars, create a wxToolBar as usual.
176
177              See: createStatusBar/2, OnCreateToolBar()  (not  implemented  in
178              wx), setToolBar/2, getToolBar/1
179
180       getClientAreaOrigin(This) -> {X :: integer(), Y :: integer()}
181
182              Types:
183
184                 This = wxFrame()
185
186              Returns  the  origin of the frame client area (in client coordi‐
187              nates).
188
189              It may be different from (0, 0) if the frame has a toolbar.
190
191       getMenuBar(This) -> wxMenuBar:wxMenuBar()
192
193              Types:
194
195                 This = wxFrame()
196
197              Returns a pointer to the menubar currently associated  with  the
198              frame (if any).
199
200              See: setMenuBar/2, wxMenuBar, wxMenu
201
202       getStatusBar(This) -> wxStatusBar:wxStatusBar()
203
204              Types:
205
206                 This = wxFrame()
207
208              Returns  a  pointer  to the status bar currently associated with
209              the frame (if any).
210
211              See: createStatusBar/2, wxStatusBar
212
213       getStatusBarPane(This) -> integer()
214
215              Types:
216
217                 This = wxFrame()
218
219              Returns the status bar pane used to  display  menu  and  toolbar
220              help.
221
222              See: setStatusBarPane/2
223
224       getToolBar(This) -> wxToolBar:wxToolBar()
225
226              Types:
227
228                 This = wxFrame()
229
230              Returns  a  pointer to the toolbar currently associated with the
231              frame (if any).
232
233              See: createToolBar/2, wxToolBar, setToolBar/2
234
235       processCommand(This, Id) -> boolean()
236
237              Types:
238
239                 This = wxFrame()
240                 Id = integer()
241
242              Simulate a menu command.
243
244       sendSizeEvent(This) -> ok
245
246              Types:
247
248                 This = wxFrame()
249
250       sendSizeEvent(This, Options :: [Option]) -> ok
251
252              Types:
253
254                 This = wxFrame()
255                 Option = {flags, integer()}
256
257              This function sends a dummy wxSizeEvent to the  window  allowing
258              it to re-layout its children positions.
259
260              It  is  sometimes  useful  to call this function after adding or
261              deleting a children after the frame creation or if a child  size
262              changes.  Note  that if the frame is using either sizers or con‐
263              straints for the children layout, it is enough  to  call  wxWin‐
264              dow:layout/1  directly  and  this function should not be used in
265              this case.
266
267              If flags includes wxSEND_EVENT_POST value, this  function  posts
268              the  event,  i.e.  schedules it for later processing, instead of
269              dispatching it directly. You can also use  PostSizeEvent()  (not
270              implemented in wx) as a more readable equivalent of calling this
271              function with this flag.
272
273       setMenuBar(This, MenuBar) -> ok
274
275              Types:
276
277                 This = wxFrame()
278                 MenuBar = wxMenuBar:wxMenuBar()
279
280              Tells the frame to show the given menu bar.
281
282              Remark: If the frame is destroyed, the menu bar  and  its  menus
283              will be destroyed also, so do not delete the menu bar explicitly
284              (except by resetting the frame's menu bar to  another  frame  or
285              NULL).  Under  Windows, a size event is generated, so be sure to
286              initialize data members properly  before  calling  setMenuBar/2.
287              Note  that  on  some  platforms, it is not possible to call this
288              function twice for the same frame object.
289
290              See: getMenuBar/1, wxMenuBar, wxMenu
291
292       setStatusBar(This, StatusBar) -> ok
293
294              Types:
295
296                 This = wxFrame()
297                 StatusBar = wxStatusBar:wxStatusBar()
298
299              Associates a status bar with the frame.
300
301              If statusBar is NULL, then the status bar, if  present,  is  de‐
302              tached from the frame, but not deleted.
303
304              See: createStatusBar/2, wxStatusBar, getStatusBar/1
305
306       setStatusBarPane(This, N) -> ok
307
308              Types:
309
310                 This = wxFrame()
311                 N = integer()
312
313              Set the status bar pane used to display menu and toolbar help.
314
315              Using -1 disables help display.
316
317       setStatusText(This, Text) -> ok
318
319              Types:
320
321                 This = wxFrame()
322                 Text = unicode:chardata()
323
324       setStatusText(This, Text, Options :: [Option]) -> ok
325
326              Types:
327
328                 This = wxFrame()
329                 Text = unicode:chardata()
330                 Option = {number, integer()}
331
332              Sets the status bar text and updates the status bar display.
333
334              This  is  a simple wrapper for wxStatusBar:setStatusText/3 which
335              doesn't do anything if the frame has no status bar, i.e. getSta‐
336              tusBar/1 returns NULL.
337
338              Remark: Use an empty string to clear the status bar.
339
340              See: createStatusBar/2, wxStatusBar
341
342       setStatusWidths(This, Widths_field) -> ok
343
344              Types:
345
346                 This = wxFrame()
347                 Widths_field = [integer()]
348
349              Sets the widths of the fields in the status bar.
350
351              Remark:  The  widths  of the variable fields are calculated from
352              the total width of all fields, minus the sum of  widths  of  the
353              non-variable fields, divided by the number of variable fields.
354
355       setToolBar(This, ToolBar) -> ok
356
357              Types:
358
359                 This = wxFrame()
360                 ToolBar = wxToolBar:wxToolBar()
361
362              Associates a toolbar with the frame.
363
364
365
366wxWidgets team.                    wx 2.2.2                         wxFrame(3)
Impressum