next node: WinText,
prev node: WinScrollbar,
up to node: Subsystem Opal Windows


WinScroller

Signature of WinScroller

List of Import References :
See BOOL
See BTUnion
See Char
See Com
See DENOTATION
See Int
See Nat
See Option
See Real
See Seq
See Set
See String
See Void
See WinConfig
See WinInternal
See WinTclTk

This structure provides the gates of scrollers.

SIGNATURE WinScroller

$Date: 2010-09-30 18:24:17 +0200 (Do, 30. Sep 2010) $ ($Revision: 616 $)

IMPORT  Void                            ONLY void
        Real                            ONLY real
        Int                             ONLY int

IMPORT  Com[scroller]                   ONLY com
        Com[void]                       ONLY com
        Com[scrollWindow]               ONLY com
        Com[scrollView]                 ONLY com

IMPORT  WinConfig                       ONLY orient:SORT
        WinInternal                     ONLY config:SORT

Scroller Gate

A scroller gate represents an adjustable viewpoint on a linear piece of information. It is used e.g. as a mediator between views such as canvases and scrollbars.

SORT scroller

A new scroller is created by the command scroller:

FUN  scroller           : com[scroller]

A scrollbar-like view is managed by the commands below. The command setWindow defines the visual window as it is shown by the slider of the scrollbar. The command awaitWindow is enabled every time the command setWindow has been called. The window is specified as a pair of fractions in range 0.0 .. 1.0: window(0.5,0.75), for example, defines a window which covers 50-75% percent of the displayed information.

 

TYPE scrollWindow       == window (first: real, last: real)

FUN  setWindow          : scroller ** scrollWindow      -> com[void]
FUN  awaitWindow        : scroller                      -> com[scrollWindow]

The view which displays the scrolled information is managed by the commands below. The command setView adjusts the scrolling position, the command awaitView is enabled every time setView has been called. The scrolling position may be adjusted either absolutely by moveto(First), where First is a fraction in range 0.0 .. 1.0, or relatively by specifying a unit (e.g. line) or page offset.

TYPE scrollView         == moveto       (pos: real)  
                           shiftUnits   (int: int)
                           shiftPages   (int: int)

FUN  setView            : scroller ** scrollView        -> com[void]
FUN  awaitView          : scroller                      -> com[scrollView]

Attaching Scroller Gates

The configuration scroll(Scroller, Orient) attaches a scroller gate to a view which displays scrollable information, such as a canvas. The configuration scrollControl(Scroller) attaches to a scrollbar-like view.

FUN scroll              : scroller ** orient    -> config
FUN scrollControl       : scroller              -> config


next node: WinText,
prev node: WinScrollbar,
up to node: Subsystem Opal Windows