]> git.saurik.com Git - wxWidgets.git/blob - wxPython/wxPython/lib/PyCrust/wxd/Frames.py
94c0e72074ce4c6f134c1255e1e52ee071e42080
[wxWidgets.git] / wxPython / wxPython / lib / PyCrust / wxd / Frames.py
1 """Decorator classes for documentation and shell scripting.
2 """
3
4 __author__ = "Patrick K. O'Brien <pobrien@orbtech.com>"
5 __cvsid__ = "$Id$"
6 __revision__ = "$Revision$"[11:-2]
7
8
9 # These are not the real wxPython classes. These are Python versions
10 # for documentation purposes. They are also used to apply docstrings
11 # to the real wxPython classes, which are SWIG-generated wrappers for
12 # C-language classes.
13
14
15 from Base import Object
16 import Parameters as wx
17 from Window import TopLevelWindow, Window
18
19
20 class Frame(TopLevelWindow):
21 """A frame is a window whose size and position can (usually) be
22 changed by the user. It usually has thick borders and a title bar,
23 and can optionally contain a menu bar, toolbar and status bar. A
24 frame can contain any window that is not a frame or dialog.
25
26 A frame that has a status bar and toolbar created via the
27 CreateStatusBar/CreateToolBar functions manages these windows, and
28 adjusts the value returned by GetClientSize to reflect the
29 remaining size available to application windows.
30
31 An application should normally define a CloseEvent handler for the
32 frame to respond to system close events, for example so that
33 related data and subwindows can be cleaned up."""
34
35 def __init__(self, parent, id, title, pos=wx.DefaultPosition,
36 size=wx.DefaultSize, style=wx.DEFAULT_FRAME_STYLE,
37 name=wx.PyFrameNameStr):
38 """Create a Frame instance.
39
40 parent - The window parent. This may be NULL. If it is
41 non-NULL, the frame will always be displayed on top of the
42 parent window on Windows.
43
44 id - The window identifier. It may take a value of -1 to
45 indicate a default value.
46
47 title - The caption to be displayed on the frame's title bar.
48
49 pos - The window position. A value of (-1, -1) indicates a
50 default position, chosen by either the windowing system or
51 wxWindows, depending on platform.
52
53 size - The window size. A value of (-1, -1) indicates a
54 default size, chosen by either the windowing system or
55 wxWindows, depending on platform.
56
57 style - The window style.
58
59 name - The name of the window. This parameter is used to
60 associate a name with the item, allowing the application user
61 to set Motif resource values for individual windows."""
62 pass
63
64 def Create(self, parent, id, title, pos=wx.DefaultPosition,
65 size=wx.DefaultSize, style=wx.DEFAULT_FRAME_STYLE,
66 name=wx.PyFrameNameStr):
67 """Create a Frame instance."""
68 pass
69
70 def Command(self, id):
71 """Simulate a menu command; id is a menu item identifier."""
72 pass
73
74 def CreateStatusBar(self, number=1, style=wx.ST_SIZEGRIP, id=-1,
75 name=wx.PyStatusLineNameStr):
76 """Create a status bar at the bottom of frame.
77
78 number - The number of fields to create. Specify a value
79 greater than 1 to create a multi-field status bar.
80
81 style - The status bar style. See wx.StatusBar for a list of
82 valid styles.
83
84 id - The status bar window identifier. If -1, an identifier
85 will be chosen by wxWindows.
86
87 name - The status bar window name.
88
89 The width of the status bar is the whole width of the frame
90 (adjusted automatically when resizing), and the height and
91 text size are chosen by the host windowing system.
92
93 By default, the status bar is an instance of wx.StatusBar."""
94 pass
95
96 def CreateToolBar(self, style=wx.NO_BORDER|wx.TB_HORIZONTAL, id=-1,
97 name=wx.PyToolBarNameStr):
98 """Create a toolbar at the top or left of frame.
99
100 style - The toolbar style. See wxToolBar for a list of valid
101 styles.
102
103 id - The toolbar window identifier. If -1, an identifier will
104 be chosen by wxWindows.
105
106 name - The toolbar window name.
107
108 By default, the toolbar is an instance of wx.ToolBar (which is
109 defined to be a suitable toolbar class on each platform, such
110 as wx.ToolBar95).
111
112 When a toolbar has been created with this function, or made
113 known to the frame with wx.Frame.SetToolBar, the frame will
114 manage the toolbar position and adjust the return value from
115 wx.Window.GetClientSize to reflect the available space for
116 application windows."""
117 pass
118
119 def DoGiveHelp(self, text, show):
120 """Show help text (typically in the statusbar).
121
122 show is False if you are hiding the help, True otherwise.
123
124 Meant to be overridden if a derived frame wants to do
125 something else with help text from menus and etc. The default
126 implementation simply calls Frame.SetStatusText."""
127 pass
128
129 def GetClientAreaOrigin(self):
130 """Return origin of frame client area (in client coordinates).
131
132 It may be different from (0, 0) if the frame has a toolbar."""
133 pass
134
135 def GetMenuBar(self):
136 """Return menubar currently associated with frame (if any)."""
137 pass
138
139 def GetStatusBar(self):
140 """Return status bar currently associated with frame (if any)."""
141 pass
142
143 def GetStatusBarPane(self):
144 """Return status bar pane used to display menu and toolbar
145 help."""
146 pass
147
148 def GetToolBar(self):
149 """Return toolbar currently associated with frame (if any)."""
150 pass
151
152 def PopStatusText(self, number=0):
153 """Redraw status bar with previous status text.
154
155 number - The status field (starting from zero)."""
156 pass
157
158 def ProcessCommand(self, id):
159 """Process menu command; return True if processed.
160
161 id is the menu command identifier."""
162 pass
163
164 def PushStatusText(self, text, number=0):
165 """Set status bar text and redraw status bar, remembering
166 previous text.
167
168 text - The text for the status field.
169
170 number - The status field (starting from zero).
171
172 Use an empty string to clear the status bar."""
173 pass
174
175 def SendSizeEvent(self):
176 """Send a dummy size event to the frame forcing it to
177 reevaluate its children positions. It is sometimes useful to
178 call this function after adding or deleting a children after
179 the frame creation or if a child size changes.
180
181 Note that if the frame is using either sizers or constraints
182 for the children layout, it is enough to call Frame.Layout()
183 directly and this function should not be used in this case."""
184 pass
185
186 def SetMenuBar(self, menubar):
187 """Show the menu bar in the frame.
188
189 menuBar - The menu bar to associate with the frame.
190
191 If the frame is destroyed, the menu bar and its menus will be
192 destroyed also, so do not delete the menu bar explicitly
193 (except by resetting the frame's menu bar to another frame or
194 NULL).
195
196 Under Windows, a call to Frame.OnSize is generated, so be sure
197 to initialize data members properly before calling SetMenuBar.
198
199 Note that it is not possible to call this function twice for
200 the same frame object."""
201 pass
202
203 def SetStatusBar(self, statBar):
204 """Associate a status bar with the frame."""
205 pass
206
207 def SetStatusBarPane(self, n):
208 """Set the status bar pane used to display menu and toolbar
209 help. Using -1 disables help display."""
210 pass
211
212 def SetStatusText(self, text, number=0):
213 """Set status bar text and redraw status bar.
214
215 text - The text for the status field.
216
217 number - The status field (starting from zero).
218
219 Use an empty string to clear the status bar."""
220 pass
221
222 def SetStatusWidths(self, choices):
223 """Sets the widths of the fields in the status bar.
224
225 choices - a Python list of integers, each of which is a status
226 field width in pixels. A value of -1 indicates that the field
227 is variable width; at least one field must be -1.
228
229 The widths of the variable fields are calculated from the
230 total width of all fields, minus the sum of widths of the
231 non-variable fields, divided by the number of variable fields."""
232 pass
233
234 def SetToolBar(self, toolbar):
235 """Associate a toolbar with the frame."""
236 pass
237
238
239 class LayoutAlgorithm(Object):
240 """"""
241
242 def __init__(self):
243 """"""
244 pass
245
246 def LayoutFrame(self):
247 """"""
248 pass
249
250 def LayoutMDIFrame(self):
251 """"""
252 pass
253
254 def LayoutWindow(self):
255 """"""
256 pass
257
258
259 class MDIChildFrame(Frame):
260 """"""
261
262 def __init__(self):
263 """"""
264 pass
265
266 def Create(self):
267 """"""
268 pass
269
270 def Activate(self):
271 """"""
272 pass
273
274 def Maximize(self):
275 """"""
276 pass
277
278 def Restore(self):
279 """"""
280 pass
281
282
283 class MDIClientWindow(Window):
284 """"""
285
286 def __init__(self):
287 """"""
288 pass
289
290 def Create(self):
291 """"""
292 pass
293
294
295 class MDIParentFrame(Frame):
296 """"""
297
298 def __init__(self):
299 """"""
300 pass
301
302 def Create(self):
303 """"""
304 pass
305
306 def ActivateNext(self):
307 """"""
308 pass
309
310 def ActivatePrevious(self):
311 """"""
312 pass
313
314 def ArrangeIcons(self):
315 """"""
316 pass
317
318 def Cascade(self):
319 """"""
320 pass
321
322 def GetActiveChild(self):
323 """"""
324 pass
325
326 def GetClientWindow(self):
327 """"""
328 pass
329
330 def GetToolBar(self):
331 """"""
332 pass
333
334 def Tile(self):
335 """"""
336 pass
337
338
339 class MiniFrame(Frame):
340 """"""
341
342 def __init__(self):
343 """"""
344 pass
345
346 def Create(self):
347 """"""
348 pass
349
350
351 class SplashScreen(Frame):
352 """"""
353
354 def __init__(self):
355 """"""
356 pass
357
358 def GetSplashStyle(self):
359 """"""
360 pass
361
362 def GetSplashWindow(self):
363 """"""
364 pass
365
366 def GetTimeout(self):
367 """"""
368 pass
369
370
371 class SplashScreenWindow(Window):
372 """"""
373
374 def __init__(self):
375 """"""
376 pass
377
378 def GetBitmap(self):
379 """"""
380 pass
381
382 def SetBitmap(self):
383 """"""
384 pass
385
386
387 class StatusBar(Window):
388 """"""
389
390 def __init__(self):
391 """"""
392 pass
393
394 def Create(self):
395 """"""
396 pass
397
398 def GetBorderX(self):
399 """"""
400 pass
401
402 def GetBorderY(self):
403 """"""
404 pass
405
406 def GetFieldRect(self):
407 """"""
408 pass
409
410 def GetFieldsCount(self):
411 """"""
412 pass
413
414 def GetStatusText(self):
415 """"""
416 pass
417
418 def PopStatusText(self):
419 """"""
420 pass
421
422 def PushStatusText(self):
423 """"""
424 pass
425
426 def SetFieldsCount(self):
427 """"""
428 pass
429
430 def SetMinHeight(self):
431 """"""
432 pass
433
434 def SetStatusText(self):
435 """"""
436 pass
437
438 def SetStatusWidths(self):
439 """"""
440 pass