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


WinView

This structure provides basic views and operations on them.

Signature of WinView

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

SIGNATURE WinView

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

IMPORT  WinInternal     ONLY    view:SORT
        WinConfig       ONLY    anchor:SORT

Views in General

A view is an abstract type which describes the layout of the contents of a window. Note that this layout description is not the contents of the window itself: rather, the contents is created on the base of the layout by the command window (see WinWindow).

Some basic views are provided by this structure, other ones elsewhere. Views can be configured by a general configuration mechanism (see WinConfig).

The following functions allow to modify and compose given views:

FUN  expand             : view                          -> view
FUN  fillX              : view                          -> view
FUN  fillY              : view                          -> view
FUN  fill               : view                          -> view
FUN  anchor             : anchor ** view                -> view
FUN  << ^^              : view  ** view                 -> view
FUN  @< @/\ @\/ @>      : view  ** view                 -> view

      

expand(View) lets the view demand all available space in its context (though it does not necessarily fill out the space). fillX(View) and fillY(View) define a view which will be streched to fill out the acquired space in the horizontal or vertical direction, respectively. anchor(Dir, View) defines how to position a view in its parcel if it doesn't fills out the acquired space.

View1 << View2 provides the horizontal composition of views, placing View2 at the right side of View1. View1 ^^ View2 is vertical composition. The operators starting with @ provide hierarchical composition: in Master @< Slave, slave is placed at the left side of the master, in Master @> Slave at the right side, in Master @/\ Slave at the upper side, and in Master @\/ Slave at the lower side. An expression such as Master @< Slave1 @< Slave2 ... behaves as to be expected, in that all slaves are packed in the given master.

A view composed by << or ^^ does by default fills out its acquired space. It will expand if one of its components does expand. The compositions << and ^^ are associative.

The following shortcuts are provided:

FUN  * | - + *+         : view                          -> view
FUN  <|< <-< <+< <*+<   : view  ** view                 -> view
FUN  ^|^ ^-^ ^+^ ^*+^   : view  ** view                 -> view

Here, * abbreviates expansion, | vertical fill, - horzontal fill, + fill in both directions and *+ expansion and fill. The versions for binary composition apply the according modifications to their operands. These operations behave associative: the expression V1 <|< V2 <|< V3, for example, equals to fillX(V1) << fillX(V2) << fillX(V3), and not to fillX(V1 << V2) << fillX(V3).

Frame Views

The constant frame represents a frame view.

FUN frame       : view

The following configurations are sensitive:

Graphical Appearence
background borderWidth cursor geo relief unitGeo
Dynamic Behavior
bind regulate 

Label Views

The constant label represents a label view.

FUN label : view

The following configurations are sensitive:

Graphical Appearence
anchor background bitmap borderWidth cursor font foreground
height padX padY relief text unitWidth unitHeight width
Dynamic Behavior
bind regulate 


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