annotate Doc/mac/libframework.tex @ 7833:643e9728aa49 legacy-trunk

Lots of markup consistency nits. Logical markup.
author Fred Drake <fdrake@acm.org>
date Fri, 03 Apr 1998 07:16:46 +0000
parents 0cbc9df882b6
children b69fa9d142ca
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7372
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
1 \section{Standard Module \sectcode{FrameWork}}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
2 \stmodindex{FrameWork}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
3 \label{module-FrameWork}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
4
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
5 The \code{FrameWork} module contains classes that together provide a
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
6 framework for an interactive Macintosh application. The programmer
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
7 builds an application by creating subclasses that override various
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
8 methods of the bases classes, thereby implementing the functionality
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
9 wanted. Overriding functionality can often be done on various
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
10 different levels, i.e. to handle clicks in a single dialog window in a
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
11 non-standard way it is not necessary to override the complete event
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
12 handling.
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
13
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
14 The \code{FrameWork} is still very much work-in-progress, and the
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
15 documentation describes only the most important functionality, and not
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
16 in the most logical manner at that. Examine the source or the examples
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
17 for more details.
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
18
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
19 The \code{FrameWork} module defines the following functions:
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
20
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
21 \setindexsubitem{(in module FrameWork)}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
22
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
23 \begin{funcdesc}{Application}{}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
24 An object representing the complete application. See below for a
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
25 description of the methods. The default \code{__init__} routine
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
26 creates an empty window dictionary and a menu bar with an apple menu.
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
27 \end{funcdesc}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
28
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
29 \begin{funcdesc}{MenuBar}{}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
30 An object representing the menubar. This object is usually not created
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
31 by the user.
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
32 \end{funcdesc}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
33
7712
0cbc9df882b6 Change "\," to just "," in function signatures. This is easier to maintain,
Fred Drake <fdrake@acm.org>
parents: 7372
diff changeset
34 \begin{funcdesc}{Menu}{bar, title\optional{, after}}
7372
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
35 An object representing a menu. Upon creation you pass the
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
36 \code{MenuBar} the menu appears in, the \var{title} string and a
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
37 position (1-based) \var{after} where the menu should appear (default:
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
38 at the end).
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
39 \end{funcdesc}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
40
7712
0cbc9df882b6 Change "\," to just "," in function signatures. This is easier to maintain,
Fred Drake <fdrake@acm.org>
parents: 7372
diff changeset
41 \begin{funcdesc}{MenuItem}{menu, title\optional{, shortcut, callback}}
7372
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
42 Create a menu item object. The arguments are the menu to crate the
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
43 item it, the item title string and optionally the keyboard shortcut
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
44 and a callback routine. The callback is called with the arguments
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
45 menu-id, item number within menu (1-based), current front window and
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
46 the event record.
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
47
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
48 In stead of a callable object the callback can also be a string. In
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
49 this case menu selection causes the lookup of a method in the topmost
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
50 window and the application. The method name is the callback string
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
51 with \code{'domenu_'} prepended.
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
52
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
53 Calling the \code{MenuBar} \code{fixmenudimstate} method sets the
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
54 correct dimming for all menu items based on the current front window.
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
55 \end{funcdesc}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
56
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
57 \begin{funcdesc}{Separator}{menu}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
58 Add a separator to the end of a menu.
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
59 \end{funcdesc}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
60
7712
0cbc9df882b6 Change "\," to just "," in function signatures. This is easier to maintain,
Fred Drake <fdrake@acm.org>
parents: 7372
diff changeset
61 \begin{funcdesc}{SubMenu}{menu, label}
7372
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
62 Create a submenu named \var{label} under menu \var{menu}. The menu
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
63 object is returned.
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
64 \end{funcdesc}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
65
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
66 \begin{funcdesc}{Window}{parent}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
67 Creates a (modeless) window. \var{Parent} is the application object to
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
68 which the window belongs. The window is not displayed until later.
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
69 \end{funcdesc}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
70
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
71 \begin{funcdesc}{DialogWindow}{parent}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
72 Creates a modeless dialog window.
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
73 \end{funcdesc}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
74
7712
0cbc9df882b6 Change "\," to just "," in function signatures. This is easier to maintain,
Fred Drake <fdrake@acm.org>
parents: 7372
diff changeset
75 \begin{funcdesc}{windowbounds}{width, height}
7372
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
76 Return a \code{(left, top, right, bottom)} tuple suitable for creation
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
77 of a window of given width and height. The window will be staggered
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
78 with respect to previous windows, and an attempt is made to keep the
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
79 whole window on-screen. The window will however always be exact the
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
80 size given, so parts may be offscreen.
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
81 \end{funcdesc}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
82
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
83 \begin{funcdesc}{setwatchcursor}{}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
84 Set the mouse cursor to a watch.
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
85 \end{funcdesc}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
86
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
87 \begin{funcdesc}{setarrowcursor}{}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
88 Set the mouse cursor to an arrow.
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
89 \end{funcdesc}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
90
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
91 \subsection{Application objects}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
92 Application objects have the following methods, among others:
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
93
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
94 \setindexsubitem{(Application method)}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
95
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
96 \begin{funcdesc}{makeusermenus}{}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
97 Override this method if you need menus in your application. Append the
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
98 menus to \code{self.menubar}.
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
99 \end{funcdesc}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
100
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
101 \begin{funcdesc}{getabouttext}{}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
102 Override this method to return a text string describing your
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
103 application. Alternatively, override the \code{do_about} method for
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
104 more elaborate about messages.
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
105 \end{funcdesc}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
106
7712
0cbc9df882b6 Change "\," to just "," in function signatures. This is easier to maintain,
Fred Drake <fdrake@acm.org>
parents: 7372
diff changeset
107 \begin{funcdesc}{mainloop}{\optional{mask, wait}}
7372
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
108 This routine is the main event loop, call it to set your application
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
109 rolling. \var{Mask} is the mask of events you want to handle,
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
110 \var{wait} is the number of ticks you want to leave to other
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
111 concurrent application (default 0, which is probably not a good
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
112 idea). While raising \code{self} to exit the mainloop is still
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
113 supported it is not recommended, call \code{self._quit} instead.
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
114
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
115 The event loop is split into many small parts, each of which can be
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
116 overridden. The default methods take care of dispatching events to
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
117 windows and dialogs, handling drags and resizes, Apple Events, events
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
118 for non-FrameWork windows, etc.
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
119
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
120 In general, all event handlers should return 1 if the event is fully
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
121 handled and 0 otherwise (because the front window was not a FrameWork
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
122 window, for instance). This is needed so that update events and such
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
123 can be passed on to other windows like the Sioux console window.
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
124 Calling \code{MacOS.HandleEvent} is not allowed within \var{our_dispatch}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
125 or its callees, since this may result in an infinite loop if the
7833
643e9728aa49 Lots of markup consistency nits.
Fred Drake <fdrake@acm.org>
parents: 7712
diff changeset
126 code is called through the Python inner-loop event handler.
7372
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
127 \end{funcdesc}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
128
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
129 \begin{funcdesc}{asyncevents}{onoff}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
130 Call this method with a nonzero parameter to enable
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
131 asynchronous event handling. This will tell the inner interpreter loop
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
132 to call the application event handler \var{async_dispatch} whenever events
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
133 are available. This will cause FrameWork window updates and the user
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
134 interface to remain working during long computations, but will slow the
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
135 interpreter down and may cause surprising results in non-reentrant code
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
136 (such as FrameWork itself). By default \var{async_dispatch} will immedeately
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
137 call \var{our_dispatch} but you may override this to handle only certain
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
138 events asynchronously. Events you do not handle will be passed to Sioux
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
139 and such.
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
140
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
141 The old on/off value is returned.
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
142 \end{funcdesc}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
143
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
144 \begin{funcdesc}{_quit}{}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
145 Terminate the event \code{mainloop} at the next convenient moment.
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
146 \end{funcdesc}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
147
7712
0cbc9df882b6 Change "\," to just "," in function signatures. This is easier to maintain,
Fred Drake <fdrake@acm.org>
parents: 7372
diff changeset
148 \begin{funcdesc}{do_char}{c, event}
7372
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
149 The user typed character \var{c}. The complete details of the event
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
150 can be found in the \var{event} structure. This method can also be
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
151 provided in a \code{Window} object, which overrides the
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
152 application-wide handler if the window is frontmost.
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
153 \end{funcdesc}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
154
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
155 \begin{funcdesc}{do_dialogevent}{event}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
156 Called early in the event loop to handle modeless dialog events. The
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
157 default method simply dispatches the event to the relevant dialog (not
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
158 through the the \code{DialogWindow} object involved). Override if you
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
159 need special handling of dialog events (keyboard shortcuts, etc).
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
160 \end{funcdesc}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
161
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
162 \begin{funcdesc}{idle}{event}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
163 Called by the main event loop when no events are available. The
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
164 null-event is passed (so you can look at mouse position, etc).
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
165 \end{funcdesc}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
166
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
167 \subsection{Window Objects}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
168
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
169 Window objects have the following methods, among others:
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
170
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
171 \setindexsubitem{(Window method)}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
172
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
173 \begin{funcdesc}{open}{}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
174 Override this method to open a window. Store the MacOS window-id in
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
175 \code{self.wid} and call \code{self.do_postopen} to register the
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
176 window with the parent application.
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
177 \end{funcdesc}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
178
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
179 \begin{funcdesc}{close}{}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
180 Override this method to do any special processing on window
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
181 close. Call \code{self.do_postclose} to cleanup the parent state.
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
182 \end{funcdesc}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
183
7712
0cbc9df882b6 Change "\," to just "," in function signatures. This is easier to maintain,
Fred Drake <fdrake@acm.org>
parents: 7372
diff changeset
184 \begin{funcdesc}{do_postresize}{width, height, macoswindowid}
7372
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
185 Called after the window is resized. Override if more needs to be done
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
186 than calling \code{InvalRect}.
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
187 \end{funcdesc}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
188
7712
0cbc9df882b6 Change "\," to just "," in function signatures. This is easier to maintain,
Fred Drake <fdrake@acm.org>
parents: 7372
diff changeset
189 \begin{funcdesc}{do_contentclick}{local, modifiers, event}
7372
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
190 The user clicked in the content part of a window. The arguments are
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
191 the coordinates (window-relative), the key modifiers and the raw
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
192 event.
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
193 \end{funcdesc}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
194
7712
0cbc9df882b6 Change "\," to just "," in function signatures. This is easier to maintain,
Fred Drake <fdrake@acm.org>
parents: 7372
diff changeset
195 \begin{funcdesc}{do_update}{macoswindowid, event}
7372
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
196 An update event for the window was received. Redraw the window.
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
197 \end{funcdesc}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
198
7712
0cbc9df882b6 Change "\," to just "," in function signatures. This is easier to maintain,
Fred Drake <fdrake@acm.org>
parents: 7372
diff changeset
199 \begin{funcdesc}{do_activate}{activate, event}
7372
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
200 The window was activated (\code{activate==1}) or deactivated
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
201 (\code{activate==0}). Handle things like focus highlighting, etc.
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
202 \end{funcdesc}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
203
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
204 \subsection{ControlsWindow Object}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
205
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
206 ControlsWindow objects have the following methods besides those of
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
207 \code{Window} objects:
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
208
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
209 \setindexsubitem{(ControlsWindow method)}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
210
7712
0cbc9df882b6 Change "\," to just "," in function signatures. This is easier to maintain,
Fred Drake <fdrake@acm.org>
parents: 7372
diff changeset
211 \begin{funcdesc}{do_controlhit}{window, control, pcode, event}
7372
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
212 Part \code{pcode} of control \code{control} was hit by the
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
213 user. Tracking and such has already been taken care of.
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
214 \end{funcdesc}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
215
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
216 \subsection{ScrolledWindow Object}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
217
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
218 ScrolledWindow objects are ControlsWindow objects with the following
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
219 extra methods:
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
220
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
221 \setindexsubitem{(ScrolledWindow method)}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
222
7712
0cbc9df882b6 Change "\," to just "," in function signatures. This is easier to maintain,
Fred Drake <fdrake@acm.org>
parents: 7372
diff changeset
223 \begin{funcdesc}{scrollbars}{\optional{wantx, wanty}}
7372
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
224 Create (or destroy) horizontal and vertical scrollbars. The arguments
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
225 specify which you want (default: both). The scrollbars always have
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
226 minimum \code{0} and maximum \code{32767}.
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
227 \end{funcdesc}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
228
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
229 \begin{funcdesc}{getscrollbarvalues}{}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
230 You must supply this method. It should return a tuple \code{x, y}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
231 giving the current position of the scrollbars (between \code{0} and
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
232 \code{32767}). You can return \code{None} for either to indicate the
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
233 whole document is visible in that direction.
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
234 \end{funcdesc}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
235
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
236 \begin{funcdesc}{updatescrollbars}{}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
237 Call this method when the document has changed. It will call
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
238 \code{getscrollbarvalues} and update the scrollbars.
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
239 \end{funcdesc}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
240
7712
0cbc9df882b6 Change "\," to just "," in function signatures. This is easier to maintain,
Fred Drake <fdrake@acm.org>
parents: 7372
diff changeset
241 \begin{funcdesc}{scrollbar_callback}{which, what, value}
7372
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
242 Supplied by you and called after user interaction. \code{Which} will
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
243 be \code{'x'} or \code{'y'}, \code{what} will be \code{'-'},
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
244 \code{'--'}, \code{'set'}, \code{'++'} or \code{'+'}. For
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
245 \code{'set'}, \code{value} will contain the new scrollbar position.
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
246 \end{funcdesc}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
247
7712
0cbc9df882b6 Change "\," to just "," in function signatures. This is easier to maintain,
Fred Drake <fdrake@acm.org>
parents: 7372
diff changeset
248 \begin{funcdesc}{scalebarvalues}{absmin, absmax, curmin, curmax}
7372
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
249 Auxiliary method to help you calculate values to return from
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
250 \code{getscrollbarvalues}. You pass document minimum and maximum value
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
251 and topmost (leftmost) and bottommost (rightmost) visible values and
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
252 it returns the correct number or \code{None}.
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
253 \end{funcdesc}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
254
7712
0cbc9df882b6 Change "\," to just "," in function signatures. This is easier to maintain,
Fred Drake <fdrake@acm.org>
parents: 7372
diff changeset
255 \begin{funcdesc}{do_activate}{onoff, event}
7372
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
256 Takes care of dimming/highlighting scrollbars when a window becomes
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
257 frontmost vv. If you override this method call this one at the end of
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
258 your method.
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
259 \end{funcdesc}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
260
7712
0cbc9df882b6 Change "\," to just "," in function signatures. This is easier to maintain,
Fred Drake <fdrake@acm.org>
parents: 7372
diff changeset
261 \begin{funcdesc}{do_postresize}{width, height, window}
7372
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
262 Moves scrollbars to the correct position. Call this method initially
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
263 if you override it.
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
264 \end{funcdesc}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
265
7712
0cbc9df882b6 Change "\," to just "," in function signatures. This is easier to maintain,
Fred Drake <fdrake@acm.org>
parents: 7372
diff changeset
266 \begin{funcdesc}{do_controlhit}{window, control, pcode, event}
7372
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
267 Handles scrollbar interaction. If you override it call this method
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
268 first, a nonzero return value indicates the hit was in the scrollbars
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
269 and has been handled.
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
270 \end{funcdesc}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
271
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
272 \subsection{DialogWindow Objects}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
273
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
274 DialogWindow objects have the following methods besides those of
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
275 \code{Window} objects:
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
276
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
277 \setindexsubitem{(DialogWindow method)}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
278
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
279 \begin{funcdesc}{open}{resid}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
280 Create the dialog window, from the DLOG resource with id
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
281 \var{resid}. The dialog object is stored in \code{self.wid}.
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
282 \end{funcdesc}
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
283
7712
0cbc9df882b6 Change "\," to just "," in function signatures. This is easier to maintain,
Fred Drake <fdrake@acm.org>
parents: 7372
diff changeset
284 \begin{funcdesc}{do_itemhit}{item, event}
7372
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
285 Item number \var{item} was hit. You are responsible for redrawing
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
286 toggle buttons, etc.
1e66c4e31d15 Separate Mac user interface modules into separate files, to better support
Fred Drake <fdrake@acm.org>
parents:
diff changeset
287 \end{funcdesc}