[clean-list] stdScrollFunction
Peter Achten
peter88@cs.kun.nl
Mon, 01 Sep 2003 16:46:04 +0200
--=====================_20296815==_.ALT
Content-Type: text/plain; charset="iso-8859-1"; format=flowed
Content-Transfer-Encoding: quoted-printable
At 17:19 29-8-03 -0300, Alves da Silva Cruz Willer wrote:
>I'm getting in some troubles using stdScrollFunction. When I use it, it=20
>does the scrolling, but the screen is not actually updated in the new=20
>area. So, I'm getting a confused image when I do the scrolling.
>
>What am I supposed to do?
>
>Thanks
>
>Willer Alves
>Uberl=E2ndia, MG, Brazil
Dear Willer Alves,
In order to answer your question I need to know more in what situation you=
=20
use this function. Can you tell me which Clean version you use, and what=20
Object I/O component?
The stdScrollFunction is used to associate scrolling behaviour to a window=
=20
or compound control. It only computes new origin points for the indicated=20
axis (horizontal/vertical). The actual update is done by means of the=20
WindowLook/ControlLook attribute. These are defined as:
| ...
| WindowLook Bool Look
| ...
for windows, and
| ...
| ControlLook Bool Look
| ...
for compound controls. The Bool argument should be True iff changing the=20
view frame of the window/compound control does not affect the content of=20
the complete document that is displayed by the window/compound control. In=
=20
all other cases the Bool argument should be False.
Regardless of the value of the Boolean, it is the responsibility of the=20
Look function to define proper content for the 'new' areas that are=20
collected in the updArea field of the UpdateState record that is passed to=
=20
the Look function. Usually some code such as below is sufficient:
look :: SelectState UpdateState *Picture -> *Picture
look selectState updateState=3D:{updArea} picture
# picture =3D foldr unfill picture updArea
# ... your actual drawing code ...
=3D picture
Section 6.4.1. of the Tutorial to the CLEAN Object I/O Library explains=20
this in more detail.
Hope this helps,
Peter
--=====================_20296815==_.ALT
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
At 17:19 29-8-03 -0300, Alves da Silva Cruz Willer wrote:
I'm getting in some troubles using
stdScrollFunction. When I use it, it does the scrolling, but the screen
is not actually updated in the new area. So, I'm getting a confused image
when I do the scrolling.
What am I supposed to do?
Thanks
Willer Alves
Uberl=E2ndia, MG, Brazil
Dear Willer Alves,
In order to answer your question I need to know more in what situation
you use this function. Can you tell me which Clean version you use, and
what Object I/O component?
The stdScrollFunction is used to associate scrolling behaviour to a
window or compound control. It only computes new origin points for the
indicated axis (horizontal/vertical). The actual update is done by means
of the WindowLook/ControlLook attribute. These are defined as:
| =
; ...
| =
; WindowLook
Bool Look
| =
; ...
for windows, and
| =
; ...
| =
; ControlLook
Bool Look
| =
; ...
for compound controls. The Bool argument should be True iff changing the
view frame of the window/compound control does not affect the content of
the complete document that is displayed by the window/compound control.
In all other cases the Bool argument should be False.
Regardless of the value of the Boolean, it is the responsibility of the
Look function to define proper content for the 'new' areas that are
collected in the updArea field of the UpdateState record that is passed
to the Look function. Usually some code such as below is=20
sufficient:
- look :: SelectState UpdateState *Picture -> *Picture
- look selectState updateState=3D:{updArea} picture
- #
picture =3D foldr
unfill picture updArea
- # ...
your actual drawing code ...
- =3D
picture
Section 6.4.1. of the Tutorial to the CLEAN Object I/O Library
explains this in more detail.
Hope this helps,
Peter