@@ -2,7 +2,7 @@ \section{Standard Module \sectcode{FrameWork}}
22\stmodindex {FrameWork}
33\label {module-FrameWork }
44
5- The \code {FrameWork} module contains classes that together provide a
5+ The \module {FrameWork} module contains classes that together provide a
66framework for an interactive Macintosh application. The programmer
77builds an application by creating subclasses that override various
88methods of the bases classes, thereby implementing the functionality
@@ -11,18 +11,17 @@ \section{Standard Module \sectcode{FrameWork}}
1111non-standard way it is not necessary to override the complete event
1212handling.
1313
14- The \code {FrameWork} is still very much work-in-progress, and the
14+ The \module {FrameWork} is still very much work-in-progress, and the
1515documentation describes only the most important functionality, and not
1616in the most logical manner at that. Examine the source or the examples
1717for more details.
1818
19- The \code {FrameWork} module defines the following functions:
19+ The \module {FrameWork} module defines the following functions:
2020
21- \setindexsubitem {(in module FrameWork)}
2221
2322\begin {funcdesc }{Application}{}
2423An object representing the complete application. See below for a
25- description of the methods. The default \code {__init__} routine
24+ description of the methods. The default \method {__init__() } routine
2625creates an empty window dictionary and a menu bar with an apple menu.
2726\end {funcdesc }
2827
@@ -88,23 +87,25 @@ \section{Standard Module \sectcode{FrameWork}}
8887Set the mouse cursor to an arrow.
8988\end {funcdesc }
9089
91- \subsection {Application objects }
90+ \subsection {Application Objects }
91+ \label {application-objects }
92+
9293Application objects have the following methods, among others:
9394
9495\setindexsubitem {(Application method)}
9596
9697\begin {funcdesc }{makeusermenus}{}
9798Override this method if you need menus in your application. Append the
98- menus to \code {self. menubar}.
99+ menus to the attribute \member { menubar}.
99100\end {funcdesc }
100101
101102\begin {funcdesc }{getabouttext}{}
102103Override this method to return a text string describing your
103- application. Alternatively, override the \code {do_about} method for
104- more elaborate about messages.
104+ application. Alternatively, override the \method {do_about() } method
105+ for more elaborate `` about'' messages.
105106\end {funcdesc }
106107
107- \begin {funcdesc }{mainloop}{\optional {mask, wait}}
108+ \begin {funcdesc }{mainloop}{\optional {mask\optional { , wait} }}
108109This routine is the main event loop, call it to set your application
109110rolling. \var {Mask} is the mask of events you want to handle,
110111\var {wait} is the number of ticks you want to leave to other
@@ -117,13 +118,14 @@ \subsection{Application objects}
117118windows and dialogs, handling drags and resizes, Apple Events, events
118119for non-FrameWork windows, etc.
119120
120- In general, all event handlers should return 1 if the event is fully
121- handled and 0 otherwise (because the front window was not a FrameWork
121+ In general, all event handlers should return \code {1} if the event is fully
122+ handled and \code {0} otherwise (because the front window was not a FrameWork
122123window, for instance). This is needed so that update events and such
123124can be passed on to other windows like the Sioux console window.
124- Calling \code {MacOS.HandleEvent} is not allowed within \var {our_dispatch}
125- or its callees, since this may result in an infinite loop if the
126- code is called through the Python inner-loop event handler.
125+ Calling \function {MacOS.HandleEvent()} is not allowed within
126+ \var {our_dispatch} or its callees, since this may result in an
127+ infinite loop if the code is called through the Python inner-loop
128+ event handler.
127129\end {funcdesc }
128130
129131\begin {funcdesc }{asyncevents}{onoff}
@@ -142,7 +144,8 @@ \subsection{Application objects}
142144\end {funcdesc }
143145
144146\begin {funcdesc }{_quit}{}
145- Terminate the event \code {mainloop} at the next convenient moment.
147+ Terminate the running \method {mainloop()} call at the next convenient
148+ moment.
146149\end {funcdesc }
147150
148151\begin {funcdesc }{do_char}{c, event}
@@ -165,6 +168,7 @@ \subsection{Application objects}
165168\end {funcdesc }
166169
167170\subsection {Window Objects }
171+ \label {window-objects }
168172
169173Window objects have the following methods, among others:
170174
@@ -202,6 +206,7 @@ \subsection{Window Objects}
202206\end {funcdesc }
203207
204208\subsection {ControlsWindow Object }
209+ \label {controlswindow-object }
205210
206211ControlsWindow objects have the following methods besides those of
207212\code {Window} objects:
@@ -214,40 +219,41 @@ \subsection{ControlsWindow Object}
214219\end {funcdesc }
215220
216221\subsection {ScrolledWindow Object }
222+ \label {scrolledwindow-object }
217223
218224ScrolledWindow objects are ControlsWindow objects with the following
219225extra methods:
220226
221227\setindexsubitem {(ScrolledWindow method)}
222228
223- \begin {funcdesc }{scrollbars}{\optional {wantx, wanty}}
229+ \begin {funcdesc }{scrollbars}{\optional {wantx\optional { , wanty} }}
224230Create (or destroy) horizontal and vertical scrollbars. The arguments
225231specify which you want (default: both). The scrollbars always have
226232minimum \code {0} and maximum \code {32767}.
227233\end {funcdesc }
228234
229235\begin {funcdesc }{getscrollbarvalues}{}
230- You must supply this method. It should return a tuple \code {x, y}
231- giving the current position of the scrollbars (between \code {0} and
232- \code {32767}). You can return \code {None} for either to indicate the
233- whole document is visible in that direction.
236+ You must supply this method. It should return a tuple \code {( \var {x},
237+ \var {y})} giving the current position of the scrollbars (between
238+ \code {0} and \code { 32767}). You can return \code {None} for either to
239+ indicate the whole document is visible in that direction.
234240\end {funcdesc }
235241
236242\begin {funcdesc }{updatescrollbars}{}
237243Call this method when the document has changed. It will call
238- \code {getscrollbarvalues} and update the scrollbars.
244+ \method {getscrollbarvalues() } and update the scrollbars.
239245\end {funcdesc }
240246
241247\begin {funcdesc }{scrollbar_callback}{which, what, value}
242- Supplied by you and called after user interaction. \code {Which } will
243- be \code {'x'} or \code {'y'}, \code {what} will be \code {'-'},
248+ Supplied by you and called after user interaction. \var {which } will
249+ be \code {'x'} or \code {'y'}, \var {what} will be \code {'-'},
244250\code {'--'}, \code {'set'}, \code {'++'} or \code {'+'}. For
245- \code {'set'}, \code {value} will contain the new scrollbar position.
251+ \code {'set'}, \var {value} will contain the new scrollbar position.
246252\end {funcdesc }
247253
248254\begin {funcdesc }{scalebarvalues}{absmin, absmax, curmin, curmax}
249255Auxiliary method to help you calculate values to return from
250- \code {getscrollbarvalues}. You pass document minimum and maximum value
256+ \method {getscrollbarvalues() }. You pass document minimum and maximum value
251257and topmost (leftmost) and bottommost (rightmost) visible values and
252258it returns the correct number or \code {None}.
253259\end {funcdesc }
@@ -270,6 +276,7 @@ \subsection{ScrolledWindow Object}
270276\end {funcdesc }
271277
272278\subsection {DialogWindow Objects }
279+ \label {dialogwindow-objects }
273280
274281DialogWindow objects have the following methods besides those of
275282\code {Window} objects:
0 commit comments