documentation comments
authorClaus Gittinger <cg@exept.de>
Fri, 27 Feb 1998 14:03:57 +0100
changeset 1459 2e96c4f14554
parent 1458 76e820fde1e7
child 1460 b9929a029249
documentation comments
ScrView.st
ScrollableView.st
--- a/ScrView.st	Thu Feb 26 14:12:26 1998 +0100
+++ b/ScrView.st	Fri Feb 27 14:03:57 1998 +0100
@@ -45,21 +45,23 @@
     The scrollbars are setup to send scrollUp/scrollDown/scrollVerticalTo
     and scrollLeft/scrollRight/scrollHorizontalTo- messages whenever moved.
     The view itself has to implement these (there is a default implementation
-    in the common View class for this).
+    in the common View class for this - so your widgets usually dont have to
+    care for this).
 
     For the scrollbars to know about the full (maximum) size, the view
-    must implement #heightOfContents and/or #widthOfContents.
-    The values returned by these methods are used to compute the fraction
+    MUST implement #heightOfContents and/or #widthOfContents.
+    The values returned by those methods are used to compute the fraction
     which is visible (i.e. the scrollers thumb heights).
 
-    There are two ways to create a ScrollableView:
+    There are three ways to setup a scrollableView:
     if the type of the view to be scrolled is known in advance,
     use:
         v := ScrollableView for:<ViewClass>
     or:
         v := ScrollableView for:<ViewClass> in:someSuperView
 
-    otherwise, create the scrollableView empty with:
+
+    otherwise, create an empty scrollableView with:
 
         v := ScrollableView new
     or:
@@ -69,6 +71,7 @@
 
         v scrolledView:aViewToBeScrolled
 
+
     Finally, if the view to be scrolled has been already created,
     use:
 
@@ -79,10 +82,10 @@
     It is also possible to change the scrolledView later (even multiple times).
     This may be useful, if different views are needed to display different types
     of data (see example2) and at creation time, it is not known what type
-    of view is required (multimedia applications).
+    of view is required (multidocument format applications).
 
-    If you want to scroll views (instead of a views contents), you need a 
-    companion class (ViewScroller). See the documentation there.
+    If you want to scroll a bucnh of other views (instead of a views contents),
+    you need a companion class (ViewScroller). See the documentation there.
 
     If you need horizontal scrolling too, use an instance of HVScrollableView.
 
@@ -106,6 +109,15 @@
 
         Expect the above things to be fixed in an upcoming version.
 
+    Recent changes:
+        Originally, there where two classes, for vertical-only and
+        horizontal+vertical scrollability.
+        These have now been merged into the common ScrollableView class,
+        and each scrollability can be controlled individually.
+        The original HVScrollableView class is almost empty, but remains
+        for backward compatibility (it simply initializes the scrollability
+        flags for H+V scrollability).
+
     [author:]
         Claus Gittinger
 
@@ -347,6 +359,36 @@
                   ).
         top open
                                                                         [exEnd]
+  autohiding scrollbars (edit the text to make scrollbars visible/invisible)
+  (NOTICE:
+        this is controlled by the styleSheet and 
+        should normally NOT be done by the program):
+                                                                        [exBegin]
+        |top scr txt|
+
+        top := StandardSystemView label:'scroll example6'.
+        top extent:200@100.
+
+        txt := EditTextView new.
+
+        scr := ScrollableView forView:txt in:top.
+        scr origin:0.0@0.0 corner:1.0@1.0.
+        scr horizontalScrollable:true; horizontalMini:false.
+        scr verticalScrollable:true; verticalMini:true.
+        scr autoHideScrollBars:true.
+
+        txt list:#('line1'
+                   'line2'
+                   'line3'
+                   'line4'
+                   'line5'
+                   'line7'
+                   'line8'
+                   'line9'
+                   'line10'
+                  ).
+        top open
+                                                                        [exEnd]
 "
 ! !
 
@@ -1909,5 +1951,5 @@
 !ScrollableView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/Attic/ScrView.st,v 1.76 1997-11-02 17:55:35 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/Attic/ScrView.st,v 1.77 1998-02-27 13:03:57 cg Exp $'
 ! !
--- a/ScrollableView.st	Thu Feb 26 14:12:26 1998 +0100
+++ b/ScrollableView.st	Fri Feb 27 14:03:57 1998 +0100
@@ -45,21 +45,23 @@
     The scrollbars are setup to send scrollUp/scrollDown/scrollVerticalTo
     and scrollLeft/scrollRight/scrollHorizontalTo- messages whenever moved.
     The view itself has to implement these (there is a default implementation
-    in the common View class for this).
+    in the common View class for this - so your widgets usually dont have to
+    care for this).
 
     For the scrollbars to know about the full (maximum) size, the view
-    must implement #heightOfContents and/or #widthOfContents.
-    The values returned by these methods are used to compute the fraction
+    MUST implement #heightOfContents and/or #widthOfContents.
+    The values returned by those methods are used to compute the fraction
     which is visible (i.e. the scrollers thumb heights).
 
-    There are two ways to create a ScrollableView:
+    There are three ways to setup a scrollableView:
     if the type of the view to be scrolled is known in advance,
     use:
         v := ScrollableView for:<ViewClass>
     or:
         v := ScrollableView for:<ViewClass> in:someSuperView
 
-    otherwise, create the scrollableView empty with:
+
+    otherwise, create an empty scrollableView with:
 
         v := ScrollableView new
     or:
@@ -69,6 +71,7 @@
 
         v scrolledView:aViewToBeScrolled
 
+
     Finally, if the view to be scrolled has been already created,
     use:
 
@@ -79,10 +82,10 @@
     It is also possible to change the scrolledView later (even multiple times).
     This may be useful, if different views are needed to display different types
     of data (see example2) and at creation time, it is not known what type
-    of view is required (multimedia applications).
+    of view is required (multidocument format applications).
 
-    If you want to scroll views (instead of a views contents), you need a 
-    companion class (ViewScroller). See the documentation there.
+    If you want to scroll a bucnh of other views (instead of a views contents),
+    you need a companion class (ViewScroller). See the documentation there.
 
     If you need horizontal scrolling too, use an instance of HVScrollableView.
 
@@ -106,6 +109,15 @@
 
         Expect the above things to be fixed in an upcoming version.
 
+    Recent changes:
+        Originally, there where two classes, for vertical-only and
+        horizontal+vertical scrollability.
+        These have now been merged into the common ScrollableView class,
+        and each scrollability can be controlled individually.
+        The original HVScrollableView class is almost empty, but remains
+        for backward compatibility (it simply initializes the scrollability
+        flags for H+V scrollability).
+
     [author:]
         Claus Gittinger
 
@@ -347,6 +359,36 @@
                   ).
         top open
                                                                         [exEnd]
+  autohiding scrollbars (edit the text to make scrollbars visible/invisible)
+  (NOTICE:
+        this is controlled by the styleSheet and 
+        should normally NOT be done by the program):
+                                                                        [exBegin]
+        |top scr txt|
+
+        top := StandardSystemView label:'scroll example6'.
+        top extent:200@100.
+
+        txt := EditTextView new.
+
+        scr := ScrollableView forView:txt in:top.
+        scr origin:0.0@0.0 corner:1.0@1.0.
+        scr horizontalScrollable:true; horizontalMini:false.
+        scr verticalScrollable:true; verticalMini:true.
+        scr autoHideScrollBars:true.
+
+        txt list:#('line1'
+                   'line2'
+                   'line3'
+                   'line4'
+                   'line5'
+                   'line7'
+                   'line8'
+                   'line9'
+                   'line10'
+                  ).
+        top open
+                                                                        [exEnd]
 "
 ! !
 
@@ -1909,5 +1951,5 @@
 !ScrollableView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/ScrollableView.st,v 1.76 1997-11-02 17:55:35 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/ScrollableView.st,v 1.77 1998-02-27 13:03:57 cg Exp $'
 ! !