TextRuler.st
changeset 36 160b8f0dfd7d
parent 28 ca403f4c5b86
child 40 2248adab2995
equal deleted inserted replaced
35:556d556efefc 36:160b8f0dfd7d
     1 'From Smalltalk/X, Version:2.10.4 on 18-nov-1994 at 16:11:48'!
     1 "
       
     2  COPYRIGHT (c) 1994 by Claus Gittinger
       
     3 	      All Rights Reserved
       
     4 
       
     5  This software is furnished under a license and may be used
       
     6  only in accordance with the terms of that license and with the
       
     7  inclusion of the above copyright notice.   This software may not
       
     8  be provided or otherwise made available to, or used by, any
       
     9  other person.  No title to or ownership of the software is
       
    10  hereby transferred.
       
    11 "
     2 
    12 
     3 Ruler subclass:#TextRuler
    13 Ruler subclass:#TextRuler
     4 	 instanceVariableNames:'leftMargin rightMargin spec moving settingTab'
    14 	 instanceVariableNames:'leftMargin rightMargin spec moving settingTab'
     5 	 classVariableNames:'LeftAlignForm RightAlignForm AlignForm CenterForm LeftMarginForm
    15 	 classVariableNames:'LeftAlignForm RightAlignForm AlignForm CenterForm LeftMarginForm
     6 		RightMarginForm LeftTabForm RightTabForm CenterTabForm
    16 		RightMarginForm LeftTabForm RightTabForm CenterTabForm
    11 
    21 
    12 TextRuler comment:'
    22 TextRuler comment:'
    13 COPYRIGHT (c) 1991 by Claus Gittinger
    23 COPYRIGHT (c) 1991 by Claus Gittinger
    14 	      All Rights Reserved
    24 	      All Rights Reserved
    15 
    25 
    16 a Ruler for page layout showing tabs., margins etc.
    26 $Header: /cvs/stx/stx/libwidg2/TextRuler.st,v 1.9 1995-02-17 13:24:17 claus Exp $
    17 
       
    18 $Header: /cvs/stx/stx/libwidg2/TextRuler.st,v 1.8 1994-11-21 16:48:42 claus Exp $
       
    19 written oct 91 by claus
    27 written oct 91 by claus
    20 '!
    28 '!
    21 
    29 
    22 !TextRuler class methodsFor:'documentation'!
    30 !TextRuler class methodsFor:'documentation'!
    23 
    31 
       
    32 copyright
       
    33 "
       
    34  COPYRIGHT (c) 1994 by Claus Gittinger
       
    35 	      All Rights Reserved
       
    36 
       
    37  This software is furnished under a license and may be used
       
    38  only in accordance with the terms of that license and with the
       
    39  inclusion of the above copyright notice.   This software may not
       
    40  be provided or otherwise made available to, or used by, any
       
    41  other person.  No title to or ownership of the software is
       
    42  hereby transferred.
       
    43 "
       
    44 !
       
    45 
    24 documentation
    46 documentation
    25 "
    47 "
    26     This is a special ruler built for text processing
    48     This is a special ruler built for text processing
    27     applications. Currently, it is not used in the system.
    49     applications. Currently, it is not used in the system.
    28     It allows setting of margins, tabs and text-layout.
    50     It will allow setting of margins, tabs and text-layout.
       
    51 
       
    52     The implementation is not yet finished - take it as example
       
    53     goody ...
    29 
    54 
    30     TextRuler new open
    55     TextRuler new open
    31 "
    56 "
    32 
       
    33 ! !
    57 ! !
    34 
    58 
    35 !TextRuler class methodsFor:'defaults'!
    59 !TextRuler class methodsFor:'defaults'!
    36 
    60 
    37 rightMarginForm
    61 rightMarginForm
   134 
   158 
   135 redraw
   159 redraw
   136     "redraw margin & tab marks"
   160     "redraw margin & tab marks"
   137 
   161 
   138     |x top form tab type tabStops tabAlign viewOrigin orgX orgY|
   162     |x top form tab type tabStops tabAlign viewOrigin orgX orgY|
       
   163 
       
   164     self clear.
   139 
   165 
   140     super redraw.
   166     super redraw.
   141 
   167 
   142     viewOrigin := self viewOrigin.
   168     viewOrigin := self viewOrigin.
   143     orgX := viewOrigin x.
   169     orgX := viewOrigin x.