Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Annotation of /sml/trunk/src/eXene/widgets/composite/viewport-sig.sml
ViewVC logotype

Annotation of /sml/trunk/src/eXene/widgets/composite/viewport-sig.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2 - (view) (download)

1 : monnier 2 (* viewport-sig.sml
2 :     *
3 :     * COPYRIGHT (c) 1994 by AT&T Bell Laboratories See COPYRIGHT file for details.
4 :     *
5 :     * Viewport widget, for panning over a child widget.
6 :     *
7 :     * TODO:
8 :     * Allow child window to vary within bounds.
9 :     * Parameterize by child (granularity, specific scroll function)
10 :     *)
11 :    
12 :     signature VIEWPORT =
13 :     sig
14 :     structure W : WIDGET
15 :     structure CML : CML
16 :    
17 :     type viewport
18 :    
19 :     val viewport : (W.root * W.view * W.arg list) -> W.widget -> viewport
20 :     val mkViewport : W.widget -> viewport
21 :     (* Create a viewport (a classical window) on the virtual graphical
22 :     * space provides by the widget. In the current model, the viewport
23 :     * cannot extend beyond the underlying widget boundaries. In
24 :     * particular, it can be no larger than the widget. The viewport
25 :     * determines a rectangle in the underlying widgets coordinate system.
26 :     *)
27 :    
28 :     val getGeometry : viewport -> { rect : W.G.rect, childSz : W.G.size }
29 :     (* Return the underlying widget's current size, and the position
30 :     * of the viewport rectangle in the widget's coordinates.
31 :     *)
32 :    
33 :     val widgetOf : viewport -> W.widget
34 :     (* Convert a viewport into a widget *)
35 :    
36 :     val setOrig : viewport -> W.G.point -> unit
37 :     (* Set the position of the view by specifying the view's origin.
38 :     * This raises LibBase.BadArg, if the new rectangle is illegal.
39 :     *)
40 :     val setHorz : viewport -> int -> unit
41 :     (* Set the horizontal position of the view (the x-coord of the origin)
42 :     * This raises LibBase.BadArg, if the new rectangle is illegal.
43 :     *)
44 :     val setVert : viewport -> int -> unit
45 :     (* Set the vertical position of the view (the y-coord of the origin)
46 :     * This raises LibBase.BadArg, if the new rectangle is illegal.
47 :     *)
48 :    
49 :     val evtOf : viewport -> { rect : W.G.rect, childSz : W.G.size } CML.event
50 :     (* Return an event that fires whenever the viewport
51 :     * configuration changes.
52 :     *)
53 :    
54 :     end (* VIEWPORT *)

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0