@@ -66,10 +66,10 @@ \section{Standard module \sectcode{FrameWork}}
6666
6767The \code {FrameWork} is still very much work-in-progress, and the
6868documentation describes only the most important functionality, and not
69- in the most logical manner at that. Examine the source for more
70- esoteric needs.
69+ in the most logical manner at that. Examine the source or the examples
70+ for more details.
7171
72- The \code {EasyDialogs } module defines the following functions:
72+ The \code {FrameWork } module defines the following functions:
7373
7474\renewcommand {\indexsubitem }{(in module FrameWork)}
7575
@@ -117,6 +117,14 @@ \section{Standard module \sectcode{FrameWork}}
117117Creates a modeless dialog window.
118118\end {funcdesc }
119119
120+ \begin {funcdesc }{windowbounds}{width\, height}
121+ Return a \code {(left, top, right, bottom)} tuple suitable for creation
122+ of a window of given width and height. The window will be staggered
123+ with respect to previous windows, and an attempt is made to keep the
124+ whole window on-screen. The window will however always be exact the
125+ size given, so parts may be offscreen.
126+ \end {funcdesc }
127+
120128
121129\subsection {Application objects }
122130Application objects have the following methods, among others:
@@ -161,8 +169,9 @@ \subsection{Application objects}
161169need special handling of dialog events (keyboard shortcuts, etc).
162170\end {funcdesc }
163171
164- \begin {funcdesc }{idle}{}
165- Called by the main event loop when no events are available.
172+ \begin {funcdesc }{idle}{event}
173+ Called by the main event loop when no events are available. The
174+ null-event is passed (so you can look at mouse position, etc).
166175\end {funcdesc }
167176
168177\subsection {Window Objects }
@@ -202,6 +211,74 @@ \subsection{Window Objects}
202211(\code {activate==0}). Handle things like focus highlighting, etc.
203212\end {funcdesc }
204213
214+ \subsection {ControlsWindow Object }
215+
216+ ControlsWindow objects have the following methods besides those of
217+ \code {Window} objects:
218+
219+ \renewcommand {\indexsubitem }{(ControlsWindow method)}
220+
221+ \begin {funcdesc }{do_controlhit}{window\, control\, pcode\, event}
222+ Part \code {pcode} of control \code {control} was hit by the
223+ user. Tracking and such has already been taken care of.
224+ \end {funcdesc }
225+
226+ \subsection {ScrolledWindow Object }
227+
228+ ScrolledWindow objects are ControlsWindow objects with the following
229+ extra mathods:
230+
231+ \renewcommand {\indexsubitem }{(ScrolledWindow method)}
232+
233+ \begin {funcdesc }{scrollbars}{\optional {wantx\, wanty}}
234+ Create (or destroy) horizontal and vertical scrollbars. The arguments
235+ specify which you want (default: both). The scrollbars always have
236+ minimum \code {0} and maximum \code {32767}.
237+ \end {funcdesc }
238+
239+ \begin {funcdesc }{getscrollbarvalues}{}
240+ You must supply this method. It should return a tuple \code {x, y}
241+ giving the current position of the scrollbars (between \code {0} and
242+ \code {32767}). You can return \code {None} for either to indicate the
243+ whole document is visible in that direction.
244+ \end {funcdesc }
245+
246+ \begin {funcdesc }{updatescrollbars}{}
247+ Call this method when the document has changed. It will call
248+ \code {getscrollbarvalues} and update the scrollbars.
249+ \end {funcdesc }
250+
251+ \begin {funcdesc }{scrollbar_callback}{which\, what\, value}
252+ Supplied by you and called after user interaction. \code {Which} will
253+ be \code {'x'} or \code {'y'}, \code {what} will be \code {'-'},
254+ \code {'--'}, \code {'set'}, \code {'++'} or \code {'+'}. For
255+ \code {'set'}, \code {value} will contain the new scrollbar position.
256+ \end {funcdesc }
257+
258+ \begin {funcdesc }{scalebarvalues}{absmin\, absmax\, curmin\, curmax}
259+ Auxiliary method to help you calculate values to return from
260+ \code {getscrollbarvalues}. You pass document minimum and maximum value
261+ and topmost (leftmost) and bottommost (rightmost) visible values and
262+ it returns the correct number or \code {None}.
263+ \end {funcdesc }
264+
265+ \begin {funcdesc }{do_activate}{onoff\, event}
266+ Takes care of dimming/highlighting scrollbars when a window becomes
267+ frontmost vv. If you override this method call this one at the end of
268+ your method.
269+ \end {funcdesc }
270+
271+ \begin {funcdesc }{do_postresize}{width\, height\, window}
272+ Moves scrollbars to the correct position. Call this method initially
273+ if you override it.
274+ \end {funcdesc }
275+
276+ \begin {funcdesc }{do_controlhit}{window\, control\, pcode\, event}
277+ Handles scrollbar interaction. If you override it call this method
278+ first, a nonzero return value indicates the hit was in the scrollbars
279+ and has been handled.
280+ \end {funcdesc }
281+
205282\subsection {DialogWindow Objects }
206283
207284DialogWindow objects have the following methods besides those of
0 commit comments