eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'TwoColumnTextView':

Home

everywhere
www.exept.de
for:
[back]

Class: TwoColumnTextView


Inheritance:

   Object
   |
   +--GraphicsContext
      |
      +--DeviceGraphicsContext
         |
         +--GraphicsMedium
            |
            +--DisplaySurface
               |
               +--SimpleView
                  |
                  +--SyncedMultiColumnTextView
                     |
                     +--TwoColumnTextView
                        |
                        +--DiffTextView

Package:
stx:libwidg2
Category:
Views-Text
Version:
rev: 1.24 date: 2009/10/06 10:26:19
user: cg
file: TwoColumnTextView.st directory: libwidg2
module: stx stc-classLibrary: libwidg2
Author:
Claus Gittinger

Description:


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.


Related information:

    DiffTextView
    TextView
    EditTextView

Class protocol:

instance creation
o  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.

o  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.

o  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.

o  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.

o  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.

o  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.

specification
o  numberOfViews


Instance protocol:

accessing
o  leftTextView

o  numberOfChanges

o  rightTextView

o  text1: t1 text2: t2

actions
o  moveToLine: aLineNr

o  moveToNextChanged

o  moveToPreviousChanged

initialization
o  addNextPreviousButtons
set up-down buttons


Examples:


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'


ST/X 6.1.1; WebServer 1.620 at exept:8081; Thu, 24 May 2012 04:43:48 GMT