SyncedMultiColumnTextView.st
author Claus Gittinger <cg@exept.de>
Fri, 06 Oct 2006 14:32:10 +0200
changeset 3093 84ec3d9dd45c
parent 2432 ef8c696dd217
child 3159 c504c98aaa49
permissions -rw-r--r--
allow for the textViewClass to be specified
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
92
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     1
"
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     2
 COPYRIGHT (c) 1995 by Claus Gittinger
101
85422b262e51 my logical size-of-contents changes if any subview changes its contents
Claus Gittinger <cg@exept.de>
parents: 92
diff changeset
     3
	      All Rights Reserved
92
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     4
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     5
 This software is furnished under a license and may be used
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    10
 hereby transferred.
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    11
"
2432
ef8c696dd217 care for being asked to scroll, before my subviews are present.
penk
parents: 1384
diff changeset
    12
"{ Package: 'stx:libwidg2' }"
ef8c696dd217 care for being asked to scroll, before my subviews are present.
penk
parents: 1384
diff changeset
    13
92
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    14
SimpleView subclass:#SyncedMultiColumnTextView
3093
84ec3d9dd45c allow for the textViewClass to be specified
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
    15
	instanceVariableNames:'textViewClass textViews scrollLock'
158
431e38dfc5ab documentation
Claus Gittinger <cg@exept.de>
parents: 102
diff changeset
    16
	classVariableNames:''
431e38dfc5ab documentation
Claus Gittinger <cg@exept.de>
parents: 102
diff changeset
    17
	poolDictionaries:''
431e38dfc5ab documentation
Claus Gittinger <cg@exept.de>
parents: 102
diff changeset
    18
	category:'Views-Text'
92
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
!
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
!SyncedMultiColumnTextView class methodsFor:'documentation'!
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
copyright
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
"
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
 COPYRIGHT (c) 1995 by Claus Gittinger
101
85422b262e51 my logical size-of-contents changes if any subview changes its contents
Claus Gittinger <cg@exept.de>
parents: 92
diff changeset
    26
	      All Rights Reserved
92
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
 This software is furnished under a license and may be used
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
 only in accordance with the terms of that license and with the
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
 inclusion of the above copyright notice.   This software may not
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
 be provided or otherwise made available to, or used by, any
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
 other person.  No title to or ownership of the software is
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
 hereby transferred.
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    34
"
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    35
!
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    37
documentation
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    38
"
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
    abstract superclass for multi-col textviews.
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
    Scrolling is synced, by always scrolling all views.
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    41
    This type of view is especially useful to show diff-lists,
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    42
    code-versions, or other one-by-one viewable texts.
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    43
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    44
    Usually, it does not make much sense, to put totally different
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    45
    or unrelated texts into this kind of view.
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    46
102
f85d1c7ca56f fixed horizontal scrolling
Claus Gittinger <cg@exept.de>
parents: 101
diff changeset
    47
    See concrete examples in subclasses: TwoColumnTextView, DiffTextView etc.
168
85378c0e7dfc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 158
diff changeset
    48
85378c0e7dfc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 158
diff changeset
    49
    [see also:]
85378c0e7dfc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 158
diff changeset
    50
        TwoColumnTextView DiffTextView
85378c0e7dfc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 158
diff changeset
    51
85378c0e7dfc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 158
diff changeset
    52
    [author:]
85378c0e7dfc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 158
diff changeset
    53
        Claus Gittinger
92
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    54
"
158
431e38dfc5ab documentation
Claus Gittinger <cg@exept.de>
parents: 102
diff changeset
    55
! !
431e38dfc5ab documentation
Claus Gittinger <cg@exept.de>
parents: 102
diff changeset
    56
168
85378c0e7dfc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 158
diff changeset
    57
!SyncedMultiColumnTextView class methodsFor:'defaults'!
85378c0e7dfc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 158
diff changeset
    58
85378c0e7dfc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 158
diff changeset
    59
numberOfViews
85378c0e7dfc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 158
diff changeset
    60
    "return the number of the synced subViews.
85378c0e7dfc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 158
diff changeset
    61
     Usually redefined in subclasses"
85378c0e7dfc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 158
diff changeset
    62
85378c0e7dfc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 158
diff changeset
    63
    ^ 2
85378c0e7dfc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 158
diff changeset
    64
!
85378c0e7dfc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 158
diff changeset
    65
85378c0e7dfc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 158
diff changeset
    66
textViewClass
85378c0e7dfc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 158
diff changeset
    67
    "return the type of the synced subViews.
85378c0e7dfc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 158
diff changeset
    68
     Can be redefined in subclasses"
85378c0e7dfc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 158
diff changeset
    69
85378c0e7dfc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 158
diff changeset
    70
    ^ TextView
85378c0e7dfc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 158
diff changeset
    71
! !
85378c0e7dfc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 158
diff changeset
    72
3093
84ec3d9dd45c allow for the textViewClass to be specified
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
    73
!SyncedMultiColumnTextView methodsFor:'accessing'!
84ec3d9dd45c allow for the textViewClass to be specified
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
    74
84ec3d9dd45c allow for the textViewClass to be specified
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
    75
textViewClass
84ec3d9dd45c allow for the textViewClass to be specified
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
    76
    textViewClass isNil ifTrue:[ ^ self class textViewClass ].
84ec3d9dd45c allow for the textViewClass to be specified
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
    77
    ^ textViewClass
84ec3d9dd45c allow for the textViewClass to be specified
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
    78
84ec3d9dd45c allow for the textViewClass to be specified
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
    79
    "Created: / 06-10-2006 / 14:28:53 / cg"
84ec3d9dd45c allow for the textViewClass to be specified
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
    80
!
84ec3d9dd45c allow for the textViewClass to be specified
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
    81
84ec3d9dd45c allow for the textViewClass to be specified
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
    82
textViewClass:aClass
84ec3d9dd45c allow for the textViewClass to be specified
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
    83
    textViewClass := aClass
84ec3d9dd45c allow for the textViewClass to be specified
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
    84
84ec3d9dd45c allow for the textViewClass to be specified
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
    85
    "Created: / 06-10-2006 / 14:29:04 / cg"
84ec3d9dd45c allow for the textViewClass to be specified
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
    86
! !
84ec3d9dd45c allow for the textViewClass to be specified
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
    87
158
431e38dfc5ab documentation
Claus Gittinger <cg@exept.de>
parents: 102
diff changeset
    88
!SyncedMultiColumnTextView methodsFor:'change & update'!
92
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    89
158
431e38dfc5ab documentation
Claus Gittinger <cg@exept.de>
parents: 102
diff changeset
    90
update:something with:someArgument from:changedObject
431e38dfc5ab documentation
Claus Gittinger <cg@exept.de>
parents: 102
diff changeset
    91
    "/
431e38dfc5ab documentation
Claus Gittinger <cg@exept.de>
parents: 102
diff changeset
    92
    "/ if any of my views changes its contents,
431e38dfc5ab documentation
Claus Gittinger <cg@exept.de>
parents: 102
diff changeset
    93
    "/ I have logically changed my contents -> to give scrollbar
431e38dfc5ab documentation
Claus Gittinger <cg@exept.de>
parents: 102
diff changeset
    94
    "/ a chance to update
431e38dfc5ab documentation
Claus Gittinger <cg@exept.de>
parents: 102
diff changeset
    95
    "/
431e38dfc5ab documentation
Claus Gittinger <cg@exept.de>
parents: 102
diff changeset
    96
    something == #sizeOfContents ifTrue:[
537
cd6bc3d8f9f6 Now sync origin of views even when searching or selecting.
Stefan Vogel <sv@exept.de>
parents: 168
diff changeset
    97
        self changed:something
cd6bc3d8f9f6 Now sync origin of views even when searching or selecting.
Stefan Vogel <sv@exept.de>
parents: 168
diff changeset
    98
    ].
cd6bc3d8f9f6 Now sync origin of views even when searching or selecting.
Stefan Vogel <sv@exept.de>
parents: 168
diff changeset
    99
cd6bc3d8f9f6 Now sync origin of views even when searching or selecting.
Stefan Vogel <sv@exept.de>
parents: 168
diff changeset
   100
    "/
cd6bc3d8f9f6 Now sync origin of views even when searching or selecting.
Stefan Vogel <sv@exept.de>
parents: 168
diff changeset
   101
    "/ if any of my views' changes the origin its contents,
cd6bc3d8f9f6 Now sync origin of views even when searching or selecting.
Stefan Vogel <sv@exept.de>
parents: 168
diff changeset
   102
    "/ I have logically changed my origin -> give the scrollbar
cd6bc3d8f9f6 Now sync origin of views even when searching or selecting.
Stefan Vogel <sv@exept.de>
parents: 168
diff changeset
   103
    "/ a chance to update and sync my views.
cd6bc3d8f9f6 Now sync origin of views even when searching or selecting.
Stefan Vogel <sv@exept.de>
parents: 168
diff changeset
   104
    "/
cd6bc3d8f9f6 Now sync origin of views even when searching or selecting.
Stefan Vogel <sv@exept.de>
parents: 168
diff changeset
   105
    something == #originOfContents ifTrue:[
cd6bc3d8f9f6 Now sync origin of views even when searching or selecting.
Stefan Vogel <sv@exept.de>
parents: 168
diff changeset
   106
        "/ beware of recursive calls
cd6bc3d8f9f6 Now sync origin of views even when searching or selecting.
Stefan Vogel <sv@exept.de>
parents: 168
diff changeset
   107
        scrollLock == true ifFalse:[
cd6bc3d8f9f6 Now sync origin of views even when searching or selecting.
Stefan Vogel <sv@exept.de>
parents: 168
diff changeset
   108
            scrollLock := true.
cd6bc3d8f9f6 Now sync origin of views even when searching or selecting.
Stefan Vogel <sv@exept.de>
parents: 168
diff changeset
   109
            textViews do:[:v|
cd6bc3d8f9f6 Now sync origin of views even when searching or selecting.
Stefan Vogel <sv@exept.de>
parents: 168
diff changeset
   110
                v ~~ changedObject ifTrue:[
cd6bc3d8f9f6 Now sync origin of views even when searching or selecting.
Stefan Vogel <sv@exept.de>
parents: 168
diff changeset
   111
                    v scrollTo:changedObject viewOrigin.
cd6bc3d8f9f6 Now sync origin of views even when searching or selecting.
Stefan Vogel <sv@exept.de>
parents: 168
diff changeset
   112
                ].
cd6bc3d8f9f6 Now sync origin of views even when searching or selecting.
Stefan Vogel <sv@exept.de>
parents: 168
diff changeset
   113
            ].
cd6bc3d8f9f6 Now sync origin of views even when searching or selecting.
Stefan Vogel <sv@exept.de>
parents: 168
diff changeset
   114
            self changed:something.
cd6bc3d8f9f6 Now sync origin of views even when searching or selecting.
Stefan Vogel <sv@exept.de>
parents: 168
diff changeset
   115
            scrollLock := false.
cd6bc3d8f9f6 Now sync origin of views even when searching or selecting.
Stefan Vogel <sv@exept.de>
parents: 168
diff changeset
   116
        ].
158
431e38dfc5ab documentation
Claus Gittinger <cg@exept.de>
parents: 102
diff changeset
   117
    ].
431e38dfc5ab documentation
Claus Gittinger <cg@exept.de>
parents: 102
diff changeset
   118
431e38dfc5ab documentation
Claus Gittinger <cg@exept.de>
parents: 102
diff changeset
   119
    "Created: 24.11.1995 / 11:11:22 / cg"
537
cd6bc3d8f9f6 Now sync origin of views even when searching or selecting.
Stefan Vogel <sv@exept.de>
parents: 168
diff changeset
   120
    "Modified: 25.9.1997 / 11:46:32 / stefan"
92
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   121
! !
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   122
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   123
!SyncedMultiColumnTextView methodsFor:'initialization'!
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   124
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   125
initialize
168
85378c0e7dfc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 158
diff changeset
   126
    |n wEach org crn cls|
92
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   127
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   128
    super initialize.
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   129
3093
84ec3d9dd45c allow for the textViewClass to be specified
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
   130
    cls := self textViewClass.
92
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   131
    n := self class numberOfViews.
168
85378c0e7dfc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 158
diff changeset
   132
92
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   133
    textViews := Array new:n.
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   134
    wEach := (1 / n) asFloat.
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   135
    org := 0.0.
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   136
    1 to:n do:[:i |
168
85378c0e7dfc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 158
diff changeset
   137
        |textView|
92
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   138
168
85378c0e7dfc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 158
diff changeset
   139
        i == n ifTrue:[
85378c0e7dfc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 158
diff changeset
   140
            crn := 1.0
85378c0e7dfc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 158
diff changeset
   141
        ] ifFalse:[
85378c0e7dfc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 158
diff changeset
   142
            crn := org + wEach
85378c0e7dfc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 158
diff changeset
   143
        ].
85378c0e7dfc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 158
diff changeset
   144
        textView:= cls 
85378c0e7dfc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 158
diff changeset
   145
                        origin:org @ 0.0
85378c0e7dfc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 158
diff changeset
   146
                        corner:crn @ 1.0
85378c0e7dfc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 158
diff changeset
   147
                            in:self.
92
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   148
168
85378c0e7dfc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 158
diff changeset
   149
        textView borderWidth:1.
85378c0e7dfc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 158
diff changeset
   150
        textView level:0.
85378c0e7dfc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 158
diff changeset
   151
        textView addDependent:self.
85378c0e7dfc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 158
diff changeset
   152
        textViews at:i put:textView.
85378c0e7dfc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 158
diff changeset
   153
        org := org + wEach
92
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   154
    ].
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   155
3093
84ec3d9dd45c allow for the textViewClass to be specified
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
   156
    "Created: / 20-11-1995 / 13:06:16 / cg"
84ec3d9dd45c allow for the textViewClass to be specified
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
   157
    "Modified: / 06-10-2006 / 14:29:13 / cg"
101
85422b262e51 my logical size-of-contents changes if any subview changes its contents
Claus Gittinger <cg@exept.de>
parents: 92
diff changeset
   158
! !
85422b262e51 my logical size-of-contents changes if any subview changes its contents
Claus Gittinger <cg@exept.de>
parents: 92
diff changeset
   159
92
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   160
!SyncedMultiColumnTextView methodsFor:'queries'!
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   161
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   162
heightOfContents
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   163
    ^ textViews inject:0 into:[:maxSoFar :thisView | maxSoFar max:(thisView heightOfContents)]
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   164
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   165
    "Created: 20.11.1995 / 13:08:25 / cg"
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   166
!
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   167
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   168
innerHeight 
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   169
    ^ textViews inject:0 into:[:maxSoFar :thisView | maxSoFar max:(thisView innerHeight)]
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   170
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   171
    "Created: 20.11.1995 / 13:08:42 / cg"
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   172
!
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   173
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   174
innerWidth 
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   175
    ^ textViews inject:0 into:[:maxSoFar :thisView | maxSoFar max:(thisView innerWidth)]
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   176
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   177
    "Created: 20.11.1995 / 13:08:49 / cg"
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   178
!
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   179
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   180
widthOfContents 
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   181
    ^ textViews inject:0 into:[:maxSoFar :thisView | maxSoFar max:(thisView widthOfContents)]
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   182
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   183
    "Created: 20.11.1995 / 13:08:59 / cg"
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   184
!
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   185
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   186
xOriginOfContents
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   187
    ^ textViews inject:0 into:[:maxSoFar :thisView | maxSoFar max:(thisView xOriginOfContents)]
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   188
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   189
    "Created: 20.11.1995 / 13:09:11 / cg"
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   190
!
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   191
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   192
yOriginOfContents
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   193
    ^ textViews inject:0 into:[:maxSoFar :thisView | maxSoFar max:(thisView yOriginOfContents)]
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   194
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   195
    "Created: 20.11.1995 / 13:09:18 / cg"
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   196
! !
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   197
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   198
!SyncedMultiColumnTextView methodsFor:'scrolling'!
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   199
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   200
scrollDown:nLines
537
cd6bc3d8f9f6 Now sync origin of views even when searching or selecting.
Stefan Vogel <sv@exept.de>
parents: 168
diff changeset
   201
    textViews first scrollDown:nLines.
92
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   202
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   203
    "Created: 20.11.1995 / 13:09:40 / cg"
537
cd6bc3d8f9f6 Now sync origin of views even when searching or selecting.
Stefan Vogel <sv@exept.de>
parents: 168
diff changeset
   204
    "Modified: 25.9.1997 / 11:39:59 / stefan"
92
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   205
!
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   206
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   207
scrollHorizontalToPercent:p
102
f85d1c7ca56f fixed horizontal scrolling
Claus Gittinger <cg@exept.de>
parents: 101
diff changeset
   208
    "since the percentage given is based on the widest text
f85d1c7ca56f fixed horizontal scrolling
Claus Gittinger <cg@exept.de>
parents: 101
diff changeset
   209
     of my subvies, scroll the view containing the widest first,
f85d1c7ca56f fixed horizontal scrolling
Claus Gittinger <cg@exept.de>
parents: 101
diff changeset
   210
     and take that scroll-offset for the others."
f85d1c7ca56f fixed horizontal scrolling
Claus Gittinger <cg@exept.de>
parents: 101
diff changeset
   211
537
cd6bc3d8f9f6 Now sync origin of views even when searching or selecting.
Stefan Vogel <sv@exept.de>
parents: 168
diff changeset
   212
    |master max|
102
f85d1c7ca56f fixed horizontal scrolling
Claus Gittinger <cg@exept.de>
parents: 101
diff changeset
   213
f85d1c7ca56f fixed horizontal scrolling
Claus Gittinger <cg@exept.de>
parents: 101
diff changeset
   214
    max := 0.
f85d1c7ca56f fixed horizontal scrolling
Claus Gittinger <cg@exept.de>
parents: 101
diff changeset
   215
    textViews do:[:thisView |
537
cd6bc3d8f9f6 Now sync origin of views even when searching or selecting.
Stefan Vogel <sv@exept.de>
parents: 168
diff changeset
   216
        |wThis|
92
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   217
537
cd6bc3d8f9f6 Now sync origin of views even when searching or selecting.
Stefan Vogel <sv@exept.de>
parents: 168
diff changeset
   218
        (wThis := thisView widthOfContents) > max ifTrue:[
cd6bc3d8f9f6 Now sync origin of views even when searching or selecting.
Stefan Vogel <sv@exept.de>
parents: 168
diff changeset
   219
            max := wThis.
cd6bc3d8f9f6 Now sync origin of views even when searching or selecting.
Stefan Vogel <sv@exept.de>
parents: 168
diff changeset
   220
            master := thisView
cd6bc3d8f9f6 Now sync origin of views even when searching or selecting.
Stefan Vogel <sv@exept.de>
parents: 168
diff changeset
   221
        ]
102
f85d1c7ca56f fixed horizontal scrolling
Claus Gittinger <cg@exept.de>
parents: 101
diff changeset
   222
    ].
2432
ef8c696dd217 care for being asked to scroll, before my subviews are present.
penk
parents: 1384
diff changeset
   223
    master notNil ifTrue:[
ef8c696dd217 care for being asked to scroll, before my subviews are present.
penk
parents: 1384
diff changeset
   224
        master scrollHorizontalToPercent:p.
ef8c696dd217 care for being asked to scroll, before my subviews are present.
penk
parents: 1384
diff changeset
   225
    ].
92
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   226
102
f85d1c7ca56f fixed horizontal scrolling
Claus Gittinger <cg@exept.de>
parents: 101
diff changeset
   227
    "Created: 20.11.1995 / 13:14:41 / cg"
f85d1c7ca56f fixed horizontal scrolling
Claus Gittinger <cg@exept.de>
parents: 101
diff changeset
   228
    "Modified: 24.11.1995 / 14:22:27 / cg"
537
cd6bc3d8f9f6 Now sync origin of views even when searching or selecting.
Stefan Vogel <sv@exept.de>
parents: 168
diff changeset
   229
    "Modified: 25.9.1997 / 11:42:46 / stefan"
92
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   230
!
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   231
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   232
scrollLeft
537
cd6bc3d8f9f6 Now sync origin of views even when searching or selecting.
Stefan Vogel <sv@exept.de>
parents: 168
diff changeset
   233
    textViews first scrollLeft.
92
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   234
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   235
    "Created: 20.11.1995 / 13:09:40 / cg"
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   236
    "Modified: 20.11.1995 / 13:15:45 / cg"
537
cd6bc3d8f9f6 Now sync origin of views even when searching or selecting.
Stefan Vogel <sv@exept.de>
parents: 168
diff changeset
   237
    "Modified: 25.9.1997 / 11:41:04 / stefan"
92
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   238
!
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   239
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   240
scrollLeft:nPixels
537
cd6bc3d8f9f6 Now sync origin of views even when searching or selecting.
Stefan Vogel <sv@exept.de>
parents: 168
diff changeset
   241
    textViews first scrollLeft:nPixels.
92
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   242
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   243
    "Created: 20.11.1995 / 13:09:40 / cg"
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   244
    "Modified: 20.11.1995 / 13:15:49 / cg"
537
cd6bc3d8f9f6 Now sync origin of views even when searching or selecting.
Stefan Vogel <sv@exept.de>
parents: 168
diff changeset
   245
    "Modified: 25.9.1997 / 11:41:17 / stefan"
92
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   246
!
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   247
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   248
scrollRight
537
cd6bc3d8f9f6 Now sync origin of views even when searching or selecting.
Stefan Vogel <sv@exept.de>
parents: 168
diff changeset
   249
    textViews first scrollRight.
92
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   250
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   251
    "Created: 20.11.1995 / 13:09:40 / cg"
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   252
    "Modified: 20.11.1995 / 13:15:39 / cg"
537
cd6bc3d8f9f6 Now sync origin of views even when searching or selecting.
Stefan Vogel <sv@exept.de>
parents: 168
diff changeset
   253
    "Modified: 25.9.1997 / 11:41:30 / stefan"
92
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   254
!
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   255
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   256
scrollRight:nPixels
537
cd6bc3d8f9f6 Now sync origin of views even when searching or selecting.
Stefan Vogel <sv@exept.de>
parents: 168
diff changeset
   257
    textViews first scrollRight:nPixels.
92
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   258
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   259
    "Created: 20.11.1995 / 13:09:40 / cg"
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   260
    "Modified: 20.11.1995 / 13:15:27 / cg"
537
cd6bc3d8f9f6 Now sync origin of views even when searching or selecting.
Stefan Vogel <sv@exept.de>
parents: 168
diff changeset
   261
    "Modified: 25.9.1997 / 11:41:43 / stefan"
92
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   262
!
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   263
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   264
scrollToLine:lineNr
537
cd6bc3d8f9f6 Now sync origin of views even when searching or selecting.
Stefan Vogel <sv@exept.de>
parents: 168
diff changeset
   265
    textViews first scrollToLine:lineNr.
92
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   266
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   267
    "Created: 20.11.1995 / 13:09:40 / cg"
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   268
    "Modified: 20.11.1995 / 13:15:07 / cg"
537
cd6bc3d8f9f6 Now sync origin of views even when searching or selecting.
Stefan Vogel <sv@exept.de>
parents: 168
diff changeset
   269
    "Modified: 25.9.1997 / 11:41:56 / stefan"
92
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   270
!
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   271
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   272
scrollUp:nLines
537
cd6bc3d8f9f6 Now sync origin of views even when searching or selecting.
Stefan Vogel <sv@exept.de>
parents: 168
diff changeset
   273
    textViews first scrollUp:nLines.
92
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   274
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   275
    "Created: 20.11.1995 / 13:09:40 / cg"
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   276
    "Modified: 20.11.1995 / 13:14:51 / cg"
537
cd6bc3d8f9f6 Now sync origin of views even when searching or selecting.
Stefan Vogel <sv@exept.de>
parents: 168
diff changeset
   277
    "Modified: 25.9.1997 / 11:42:10 / stefan"
92
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   278
!
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   279
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   280
scrollVerticalToPercent:p
102
f85d1c7ca56f fixed horizontal scrolling
Claus Gittinger <cg@exept.de>
parents: 101
diff changeset
   281
    "since the percentage given is based on the longest text
f85d1c7ca56f fixed horizontal scrolling
Claus Gittinger <cg@exept.de>
parents: 101
diff changeset
   282
     of my subvies, scroll the view containing the longest first,
f85d1c7ca56f fixed horizontal scrolling
Claus Gittinger <cg@exept.de>
parents: 101
diff changeset
   283
     and take that scroll-offset for the others."
f85d1c7ca56f fixed horizontal scrolling
Claus Gittinger <cg@exept.de>
parents: 101
diff changeset
   284
537
cd6bc3d8f9f6 Now sync origin of views even when searching or selecting.
Stefan Vogel <sv@exept.de>
parents: 168
diff changeset
   285
    |master max|
92
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   286
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   287
    max := 0.
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   288
    textViews do:[:thisView |
537
cd6bc3d8f9f6 Now sync origin of views even when searching or selecting.
Stefan Vogel <sv@exept.de>
parents: 168
diff changeset
   289
        |hThis|
102
f85d1c7ca56f fixed horizontal scrolling
Claus Gittinger <cg@exept.de>
parents: 101
diff changeset
   290
537
cd6bc3d8f9f6 Now sync origin of views even when searching or selecting.
Stefan Vogel <sv@exept.de>
parents: 168
diff changeset
   291
        (hThis := thisView heightOfContents) > max ifTrue:[
cd6bc3d8f9f6 Now sync origin of views even when searching or selecting.
Stefan Vogel <sv@exept.de>
parents: 168
diff changeset
   292
            max := hThis.
cd6bc3d8f9f6 Now sync origin of views even when searching or selecting.
Stefan Vogel <sv@exept.de>
parents: 168
diff changeset
   293
            master := thisView
cd6bc3d8f9f6 Now sync origin of views even when searching or selecting.
Stefan Vogel <sv@exept.de>
parents: 168
diff changeset
   294
        ]
92
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   295
    ].
102
f85d1c7ca56f fixed horizontal scrolling
Claus Gittinger <cg@exept.de>
parents: 101
diff changeset
   296
2432
ef8c696dd217 care for being asked to scroll, before my subviews are present.
penk
parents: 1384
diff changeset
   297
    master notNil ifTrue:[
ef8c696dd217 care for being asked to scroll, before my subviews are present.
penk
parents: 1384
diff changeset
   298
        master scrollVerticalToPercent:p.
ef8c696dd217 care for being asked to scroll, before my subviews are present.
penk
parents: 1384
diff changeset
   299
    ]
92
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   300
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   301
    "Created: 20.11.1995 / 13:14:41 / cg"
102
f85d1c7ca56f fixed horizontal scrolling
Claus Gittinger <cg@exept.de>
parents: 101
diff changeset
   302
    "Modified: 24.11.1995 / 14:22:19 / cg"
537
cd6bc3d8f9f6 Now sync origin of views even when searching or selecting.
Stefan Vogel <sv@exept.de>
parents: 168
diff changeset
   303
    "Modified: 25.9.1997 / 11:42:34 / stefan"
1384
6177a99d7246 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   304
!
6177a99d7246 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   305
6177a99d7246 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   306
verticalScrollStep    
6177a99d7246 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   307
    ^ 1.
6177a99d7246 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   308
6177a99d7246 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   309
    "Created: / 21.5.1999 / 19:18:09 / cg"
92
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   310
! !
ca6389321c2a new (abstract) class for multiple sync-scrolled textviews
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   311
158
431e38dfc5ab documentation
Claus Gittinger <cg@exept.de>
parents: 102
diff changeset
   312
!SyncedMultiColumnTextView class methodsFor:'documentation'!
431e38dfc5ab documentation
Claus Gittinger <cg@exept.de>
parents: 102
diff changeset
   313
431e38dfc5ab documentation
Claus Gittinger <cg@exept.de>
parents: 102
diff changeset
   314
version
3093
84ec3d9dd45c allow for the textViewClass to be specified
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
   315
^ '$Header: /cvs/stx/stx/libwidg2/SyncedMultiColumnTextView.st,v 1.9 2006-10-06 12:32:10 cg Exp $'
158
431e38dfc5ab documentation
Claus Gittinger <cg@exept.de>
parents: 102
diff changeset
   316
! !