eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'SyncedMultiColumnTextView':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: SyncedMultiColumnTextView


Inheritance:

   Object
   |
   +--GraphicsMedium
      |
      +--DisplaySurface
         |
         +--SimpleView
            |
            +--SyncedMultiColumnTextView
               |
               +--ThreeColumnTextView
               |
               +--TwoColumnTextView

Package:
stx:libwidg2
Category:
Views-Text
Version:
rev: 1.14 date: 2018/06/13 21:00:55
user: cg
file: SyncedMultiColumnTextView.st directory: libwidg2
module: stx stc-classLibrary: libwidg2
Author:
Claus Gittinger

Description:


abstract superclass for multi-col textviews.
Scrolling is synced, by always scrolling all 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 concrete examples in subclasses: TwoColumnTextView, DiffTextView etc.


Related information:

    TwoColumnTextView
    DiffTextView

Class protocol:

defaults
o  numberOfViews
return the number of the synced subViews.
Usually redefined in subclasses

o  textViewClass
return the type of the synced subViews.
Can be redefined in subclasses


Instance protocol:

accessing
o  textViewClass

o  textViewClass: aClass

o  textViews

change & update
o  update: something with: someArgument from: changedObject
(comment from inherited method)
an update request

initialization
o  initialize
(comment from inherited method)
initialize all state of the view - usually redefined in subclasses,
but always doing a 'super initialize'. Each class should setup its
locals - and not forget the others.
View setup is separated into two parts, the general setup done here
and the style specific setup in initStyle. Each view should be prepared
for a stylechange by being sent another initStyle with a new style value.
(in this case, it should set all of its style-dependent things, but
leave the state and contents as-is)

queries
o  heightOfContents
(comment from inherited method)
return the height of the contents in logical units
- defaults to view's visible area here.
This method MUST be redefined in all view classess which are
going to be scrolled AND show data which has different size than
the view. For example, a view showing A4-size documents should return
the number of vertical pixels such a document has on this device.
A view showing a bitmap of height 1000 should return 1000.
If not redefined, scrollbars have no way of knowing the actual size
of the contents being shown. This is called by scrollBars to compute
the relative height of the document vs. the view's actual size.
The value returned here must be based on a scale of 1, since users
of this will scale as appropriate.

o  innerHeight
(comment from inherited method)
return the height of the view minus any 3D-shadow-borders

o  innerWidth
(comment from inherited method)
return the width of the view minus any 3D-shadow-borders

o  widthOfContents
(comment from inherited method)
return the width of the contents in logical units
- defaults to views visible area here.
This method MUST be redefined in all view classess which are
going to be scrolled AND show data which has different size than
the view. For example, a view showing A4-size documents should return
the number of horizontal pixels such a document has on this device.
A view showing a bitmap of width 500 should return 500.
If not redefined, scrollbars have no way of knowing the actual size
of the contents being shown. This is called by scrollBars to compute
the relative width of the document vs. the view's actual width.
The value returned here must be based on a scale of 1, since users
of this will scale as appropriate.

o  xOriginOfContents
(comment from inherited method)
return the x coordinate of the viewOrigin in pixels;
used by scrollBars to compute thumb position within the document.

o  yOriginOfContents
(comment from inherited method)
return the y coordinate of the viewOrigin in pixels;
used by scrollBars to compute thumb position within the document.

scrolling
o  scrollDown: nLines
(comment from inherited method)
change origin to scroll down some pixels

o  scrollDownLines: nLines

o  scrollHorizontalToPercent: p
since the percentage given is based on the widest text
of my subvies, scroll the view containing the widest first,
and take that scroll-offset for the others.

o  scrollLeft
(comment from inherited method)
scroll left by some amount; this is called when the scrollbars
scroll-step left button is pressed.

o  scrollLeft: nPixels
(comment from inherited method)
change origin to scroll left some pixels

o  scrollRight
(comment from inherited method)
scroll right by some amount; this is called when the scrollbars
scroll-step right button is pressed.

o  scrollRight: nPixels
(comment from inherited method)
change origin to scroll right some pixels

o  scrollToLine: lineNr

o  scrollUp: nLines
(comment from inherited method)
change origin to scroll up (towards the origin) by some pixels

o  scrollUpLines: nLines

o  scrollVerticalToPercent: p
since the percentage given is based on the longest text
of my subvies, scroll the view containing the longest first,
and take that scroll-offset for the others.

o  verticalScrollStep
return the amount to scroll when stepping up/down (also used for mouseWheel).



ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Tue, 23 Apr 2024 19:41:45 GMT