|
Class: TwoColumnTextView
Object
|
+--GraphicsMedium
|
+--DisplaySurface
|
+--SimpleView
|
+--SyncedMultiColumnTextView
|
+--TwoColumnTextView
|
+--DiffTextView
|
+--Tools::DiffCodeView2
- Package:
- stx:libwidg2
- Category:
- Views-Text
- Version:
- rev:
1.29
date: 2021/01/20 12:16:48
- user: cg
- file: TwoColumnTextView.st directory: libwidg2
- module: stx stc-classLibrary: libwidg2
a view showing two texts side-by-side.
Scrolling is synced, by always scrolling both views.
This type of view is especially useful to show diff-lists,
code-versions, or other one-by-one viewable texts.
Usually, it does not make much sense, to put totally different
or unrelated texts into this kind of view.
See subclass DiffTextView for a real class;
see ChangesBrowsers compare operation for a real application
of this kind of views.
copyrightCOPYRIGHT (c) 1994 by Claus Gittinger
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
instance creation
-
openOn: firstText and: secondText
-
open up a view showing firstText and secondText side-by-side.
This does not make much sense for unrelated texts - of course.
Usage example(s):
TwoColumnTextView
openOn:('smalltalk.rc' asFilename contentsOfEntireFile)
and:('display.rc' asFilename contentsOfEntireFile)
TwoColumnTextView
openOn:('display.rc' asFilename contentsOfEntireFile)
and:('smalltalk.rc' asFilename contentsOfEntireFile)
|
-
openOn: firstText and: secondText in: aView
-
open up a view showing firstText and secondText side-by-side.
This does not make much sense for unrelated texts - of course.
-
openOn: firstText and: secondText title: titleOrNil
-
open up a view showing firstText and secondText side-by-side.
This does not make much sense for unrelated texts - of course.
Usage example(s):
TwoColumnTextView
openOn:('smalltalk.rc' asFilename contentsOfEntireFile)
and:('display.rc' asFilename contentsOfEntireFile)
TwoColumnTextView
openOn:('display.rc' asFilename contentsOfEntireFile)
and:('smalltalk.rc' asFilename contentsOfEntireFile)
|
-
openOn: firstText label: firstLabel and: secondText label: secondLabel
-
open up a view showing firstText and secondText side-by-side,
and labels for both views.
This does not make much sense for unrelated texts - of course.
Usage example(s):
TwoColumnTextView
openOn:('smalltalk.rc' asFilename contentsOfEntireFile)
label:'smalltalk.rc'
and:('display.rc' asFilename contentsOfEntireFile)
label:'display.rc'
|
-
openOn: firstText label: firstLabel and: secondText label: secondLabel title: titleOrNil
-
open up a view showing firstText and secondText side-by-side,
and labels for both views.
This does not make much sense for unrelated texts - of course.
Usage example(s):
TwoColumnTextView
openOn:('smalltalk.rc' asFilename contentsOfEntireFile)
label:'smalltalk.rc'
and:('display.rc' asFilename contentsOfEntireFile)
label:'display.rc'
|
instance creation-basic
-
openOn: firstText label: firstLabel and: secondText label: secondLabel in: aView
-
open up a view showing firstText and secondText side-by-side,
and labels for both views. Return the (wrapped) diff-view.
This does not make much sense for unrelated texts - of course.
specification
-
numberOfViews
-
(comment from inherited method)
return the number of the synced subViews.
Usually redefined in subclasses
accessing
-
leftTextView
-
-
numberOfChanges
-
-
rightTextView
-
-
text1: t1 text2: t2
-
actions
-
moveToLine: aLineNr
-
-
moveToNextChanged
-
-
moveToNextChangedAfter: startLine
-
find the first line which is not a plain string
-
moveToPreviousChanged
-
initialization
-
addNextPreviousButtons
-
set up-down buttons
TwoColumnTextView are currently not directly used by the system.
However, it is used as an abstract superclass for DiffTextView.
See more examples there.
(you may find nice uses for it anyway ...)
TwoColumnTextView
openOn:('smalltalk.rc' asFilename contents)
and:('display.rc' asFilename contents)
|
TwoColumnTextView
openOn:('display.rc' asFilename contents)
and:('smalltalk.rc' asFilename contents)
|
TwoColumnTextView
openOn:('smalltalk.rc' asFilename contents)
label:'smalltalk.rc'
and:('display.rc' asFilename contents)
label:'display.rc'
|
|