eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'SimpleView':

Home

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

Class: SimpleView


Inheritance:

   Object
   |
   +--GraphicsMedium
      |
      +--DisplaySurface
         |
         +--SimpleView
            |
            +--ClockView
            |
            +--DSVLabelView
            |
            +--DigitalClockView
            |
            +--FilenameWidgetWithHistory
            |
            +--FramedBox
            |
            +--InputView
            |
            +--InspectorView
            |
            +--PanelView
            |
            +--ScrollBar
            |
            +--ScrollableView
            |
            +--Separator
            |
            +--ShadowView
            |
            +--SyncedMultiColumnTextView
            |
            +--SystemStatusMonitor
            |
            +--TabSpecRuler
            |
            +--Tools::CodeView2
            |
            +--Tools::CodeView2::GutterView
            |
            +--VariablePanel
            |
            +--View
            |
            +--ViewScroller
            |
            +--ViewWithAcceptAndCancelBar
            |
            +--ViewWithAcceptAndCancelBar::AcceptAndCancelBar
            |
            +--VisualRegion
            |
            +--XEmbedContainerView
            |
            +--XEmbedContainerView::ClientView
            |
            +--XWorkstation::WindowGroupWindow

Package:
stx:libview
Category:
Views-Basic
Version:
rev: 1.1102 date: 2024/04/28 08:12:39
user: cg
file: SimpleView.st directory: libview
module: stx stc-classLibrary: libview

Description:


this class implements functions common to all Views which do not work on / show a model.
Previously, all of this functionality used to be in the old View class, but has been
separated into this new SimpleView (which does not know about models) and the new View,
which does so.
I'd prefer to call this class View and the current View class a ModelView,
but for backward compatibility it is better to leave things the way they are
(there are simply too many subclasses of View around...).

Instances of SimpleView are seldom used directly, most views in the system inherit
from this class. However, sometimes a view is needed to create a dummy view for framing
or layout purposes.

[Instance variables:]

    superView               <View>                  my superview i.e. the view I am in

    subViews                <Collection>            the collection of subviews
                                                    These are the views proper.

    components              <Collection>            collection of gadgets (will be merged with subViews, soon)
                                                    These are lightweight gadgets (not seen by windows/x11).

    styleSheet              <ResourcePack>          contains widget attributes (see libview/styles/*.style)

    resources               <ResourcePack>          contains national language translations (see lib*/resources/*.rs)

    border                  <Border>                color and width of border

    unused                  <nil>                   to keep the instVar size constant

    viewShape               <Form>                  shape of view & border (if device supports it)

    top                     <Number>                actual top coordinate (pixels) in superview

    left                    <Number>                actual left coordinate (pixels) in superview

    flagBits                <Integer>               flag bits (used to be individual booleans)
        extendChanged                                   true if extend changed during setup
        originChanged                                   true if origin changed during setup

    relativeOrigin          <Number>                relative origin in percent within superview

    relativeExtent          <Number>                relative extent in percent within superview

    relativeCorner          <Number>                relative corner in percent within superview

    originRule              <Block>                 rule to compute origin if superview changes size

    extentRule              <Block>                 rule to compute extent if superview changes size

    cornerRule              <Block>                 rule to compute corner if superview changes size

    insets                  <Array>                 array with top, left, bottom & right insets (or nil)

    layout                  <LayoutObject>          not yet implemented - will replace the above layout
                                                    variables.

    shown                   <Boolean>               true if visible (false if iconified, unmapped or covered)

    unused_hiddenOnRealize  <Boolean>               don't show automatically when superview is realized.
                                                    now encoded in the flags.
                                                    (kept to keep the instVar size constant)

    name                    <String>                my name (future use for resources)

    level (**)              <Number>                3D level relative to superview

    margin                  <Number>                convenient margin; that is the number of pixels
                                                    which are taken up by border plus 3D level
                                                    (i.e. borderWidth + level abs)

    innerClipRect           <Rectangle>             convenient inner clip (minus margin)

    shadowColor (**)        <Color>                 color used to draw 3D shadowed edges

    lightColor (**)         <Color>                 color used to draw 3D lighted edges

    bitGravity              <nil | Symbol>          gravity of contents (if device supports it)

    viewGravity             <nil | Symbol>          gravity of view (if device supports it)

    controller              <nil | Controller>      the controller (if any)

    windowGroup             <WindowGroup>           the windowGroup

    preferredExtent(*)      <nil | Point>           preferredExtent overWrite
                                                    if nonNil, the widget will not compute
                                                    its pref-extent, but use that value.

    explicitExtent(*)       <nil | Point>           preferredExtent overWrite
                                                    if nonNil, the widget will not compute
                                                    its pref-extent, but use that value.

    dependents              <nil | Collection>      who depends on me

    layoutManager                                   currently unused; will be responsible for
                                                    child layout management

    visibilityChannel                               valueHolder to control the visiblity

    helpKey                                         for tooltips

    dropTarget                                      for drag&drop

(*) about to be changed to use preferredExtent as a cache and explicitExtent as
    an overwrite value.

(**) We have recently started to change the system to use borders instead of separate
     borderWidth, borderColor, level, shadow- and lightColors.
     Expect more changes here in the near future..

[Class variables:]

    Grey                    <Color>                 the color grey - its used so often

    ViewSpacing             <Number>                preferred spacing between views; 1mm

    CentPoint               <Point>                 100 @ 100 - its used so often

    StyleSheet              <ResourcePack>          contains all view-style specifics

    ReturnFocusWhenClosingModalBoxes                if true, a closing modalBox returns
                            <Boolean>               the keyboard focus to the view which was
                                                    active when the box was opened.
                                                    If false (the default), it is left to
                                                    window manager to assign a new focus.
                                                    If running on olwm/olvwm (which requires an
                                                    explicit click to reassign a focus), it is
                                                    better to turn this on in a private.rc file.

[styleSheet parameters:]

    popupShadow             <Boolean>               if true, popupViews show a shadow below

    popupLevel              <nil | Integer>         3D level

    borderWidth             <nil | Integer>         borderWidth (ignored in 3D styles)

    borderColor             <nil | Color>           borderColor (ignored in 3D styles)

    viewBackground          <nil | Color>           views background

    shadowColor             <nil | Color>           color for shadow edges (ignored in 2D styles)

    lightColor              <nil | Color>           color for light edges (ignored in 2D styles)

    font                    <nil | Font>            font to use


TODO:
    get rid of relativeOrigin, relativeCorner, originRule, extentRule,
    and insets; replace by a single object which defines the size
    (mhmh - ST-80 seems to call this LayoutFrame ?)
    -> be prepared for a change here in the near future and ONLY use
       access methods to get those instance variables' values

    get rid of 3D level & margin, move it to extra wrappers
    (although this will make view setup more complicated, it will remove
     complexity from the internals of view. Also, it will allow for more
     varieties of borders.)

    add components (could also call them gadgets or lightweight views)
    - views are expensive in terms of X resources. This would make all
    framing/edge and panel helper views become cheap ST objects, instead
    of views.

copyright

COPYRIGHT (c) 1989 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.

examples_MDI

Currently, these are experimental and work under Windows only an MDI child: [exBegin] |top v1 v2| top := StandardSystemView new. top extent:450 @ 300. top name:'MDI Client'. top beMDIClientView. top open. v1 := View new. v1 viewBackground:Color red. v1 origin:50 @ 50 corner:150 @ 100. v1 beMDIChildView. top addSubView:v1. v2 := View new. v2 viewBackground:Color green. v2 origin:50 @ 50 corner:150 @ 100. v2 beMDIChildView. top addSubView:v2. [exEnd]

layoutComputation

Due to historic reasons, there are 2 mechanisms to resize a view: - (old, to be eliminated mechanism) based upon info found in relativeOrigin / relativeCorner / relativeExtent originRule / cornerRule / extentRule - (new, will migrate to that one) letting a layoutObject compute things Actually, the old mechanism is just as powerful, as the new (layoutObject based) mechanism; with the help of block=rules, you can compute whatever geometry is desired. However, having 6 instance variables in every view creates some overhead, which can be avoided in most cases (most views are either fixed-size or relative-sized). Therefore (and also to make porting of ST-80 apps easier), ST/X will migrate to use layoutObjects. You will not see a difference at the view's protocol level, since existing interfaces will (silently) create layoutObjects as appropriate. However, you should remove all direct accesses to the above mentioned instance variables, to be prepared for that change. Notice, that a view recomputes its size whenever its superview changes size. This is done via: sizeChanged -> allSubviews: superViewChangedSize If the geometry computation as performed in superViewChangedSize is not powerful enough for your application, you can either: - redefine superViewChangedSize - create a special layoutObject which computes a new layout.

popupMenus

Due to historic reasons, there are multiple mechanisms for popupMenu definition: - static menus - dynamic menus from the view - dynamic menus from the model / menuHolder static menus ------------ The easiest to use is a static menu; this is useful, if some view has a constant menu which never changes. It can be defined at initialization time or redefined any time later. The menu is defined with: someView middleButtonMenu:<aPopUpMenu> Compatibility note: static menus should no longer be used - their operation is incompatible with ST-80 and ST/X's dynamic menus. Do not use them if you care for compatibility. Also, they do not care for any menuPerformers or menuHolders. (instead, they use a receiver instance variable, which gets the messages). example: |top v1 v2| top := StandardSystemView new. top extent:300@300. v1 := View origin:0.0@0.0 corner:0.5@1.0 in:top. v1 viewBackground:Color red. v2 := View origin:0.5@0.0 corner:1.0@1.0 in:top. v2 viewBackground:Color yellow. v1 middleButtonMenu:( PopUpMenu labels:#('foo' 'bar') selectors:#(foo bar) receiver:v1 ). top open. dynamic menus ------------- A dynamic menu can be provided by the view itself, or by the model. In addition, TextViews allow a separate menuHolder to provide the menu (i.e. it may be different from the model). If the model shall provide the menu, set the view's menuMessage to a selector which is sent to the model. This message should return a popUpMenu. For textViews, the above is also valid, except if the menuHolder is explicitely set - in this case, that one provides the menu; not the model. Don't get confused by the fact that menuHolders are only supported by textViews. example: (in your application, the plug would be your application, topView or model) Notice, that all menu messages are sent to the view (because no model was set) - so the textView still performs the copy-function correctly (but of course, does not respond to the fooBar messages). If a model was set, the menu would try the model first, but send its messages to the view IFF the model would not respond to the menu message. (this allows mixing of menu messages for the view AND the model). |top v1 v2 holder| holder := Plug new. holder respondTo:#menu1 with:[ v1 menuMessage:#otherMenu1. PopUpMenu labels:#('foo' 'bar') selectors:#(foo bar). ]. holder respondTo:#otherMenu1 with:[ v1 menuMessage:#menu1. PopUpMenu labels:#('other foo' 'other bar') selectors:#(foo bar). ]. holder respondTo:#menu2 with:[ PopUpMenu labels:#('copy' 'bar2') selectors:#(copySelection bar2) ]. top := StandardSystemView new. top extent:300@300. v1 := View origin:0.0@0.0 corner:0.5@1.0 in:top. v1 viewBackground:Color red. v2 := TextView origin:0.5@0.0 corner:1.0@1.0 in:top. v2 contents:'pop me up'. v1 model:holder; menuMessage:#menu1. v2 menuHolder:holder; menuMessage:#menu2. top open. an additional goody is the possibility, to change the menuPerformer (textViews only). If defined, that one will get the menus message (instead of the model/view). However, like above, if it does not respond to the message, its still sent to the view. Notice, that with non-textViews, the menuPerformer is always the model. example: (Notice: the executor understands the #copySelection message - therefore, the views built-in copy is NOT performed - it could be forwarded to the view, though. This could be useful to intercept/filter things). |top v menuProvider menuExecutor | menuProvider := Plug new. menuProvider respondTo:#menu with:[ PopUpMenu labels:#('copy' 'foo') selectors:#(copySelection foo) ]. menuExecutor := Plug new. menuExecutor respondTo:#copySelection with:[Transcript showCR:'copy function']. menuExecutor respondTo:#foo with:[Transcript showCR:'foo function']. top := StandardSystemView new. top extent:300@300. v := TextView origin:0.0@0.0 corner:1.0@1.0 in:top. v contents:'pop me up'. v menuHolder:menuProvider; menuMessage:#menu. v menuPerformer:menuExecutor. top open.

Class protocol:

Signal constants
o  aboutToOpenBoxNotificationSignal
the following allows for knowledgable programmers to suppress dialog boxes,
(by proceeding with #abort) or to patch common controls right before opening...

o  boxClosedNotificationSignal
the following allows for knowledgable programmers to handle closed dialog boxes,
this is raised right after closing...

o  closeBoxNotificationSignal

** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  closeBoxRequestSignal
this can be used (by some) to force closing a box
without terminating the modal action.

Special: useful only if another modal box is shown from inside a modal box,
where the second opened box wants to hide the first one.
This cannot be done via abort, as that would close both boxes.
Instead, use this signal to hide the first box, while the second is shown,
and still handled by a still-alive windowGroup.
Currently, the only box which supports this is the ProgressIndicator;
code will be moved to support all dialog boxes in the near future.

change & update
o  update: something with: aParameter from: changedObject
flush resources on language changes

defaults
o  defaultBackgroundColor
return the default background color for drawing - usually,
that is the same as the viewBackgroundColor.

Usage example(s):

     View defaultBackgroundColor

o  defaultExtent
return the default extent of my instances.
The value returned here is usually ignored, and
the value from preferredExtent taken instead.

o  defaultFont
(comment from inherited method)
get the default font used for drawing

o  defaultFont: aFont
set the default font used for drawing

o  defaultForegroundColor
return the default background color for drawing - usually,
that is the same as the viewBackgroundColor.

Usage example(s):

     View defaultForegroundColor

o  defaultStyle
return the default view style

Usage example(s):

     View defaultStyle

o  defaultStyle: aStyle
set the view style for new views

Usage example(s):

     View defaultStyle:#next. SystemBrowser start
     View defaultStyle:#motif. SystemBrowser start
     View defaultStyle:#iris. SystemBrowser start
     View defaultStyle:#st80. SystemBrowser start
     View defaultStyle:#normal. SystemBrowser start

o  defaultViewBackgroundColor
return the default view background

Usage example(s):

     View defaultViewBackgroundColor

o  readStyleSheet
(re)load the styleSheet.

o  readStyleSheetAndUpdateAllStyleCaches
reload all style caches in all view classes.
Needed after a style change or when a style file has been changed

Usage example(s):

        self readStyleSheetAndUpdateAllStyleCaches

o  returnFocusWhenClosingModalBoxes
return the current focus-return behavior.
See #returnFocusWhenClosingModalBoxes: for a description.

o  returnFocusWhenClosingModalBoxes: aBoolean
control the keyboard-focus behavior when a modal dialog
is closed. The default (true) is to return the focus to the view
which was active when the dialog was opened.
If false, it is left up to the display to set the focus.
For owm / ovwm (which requires an explicit click for the focus),
it is better to return the focus automatically.
For managers which assign the focus according the pointer position,
it may be better to turn the focus-return off.
You should add a corresponding expression into your private.rc or
display.rc file.

Usage example(s):

     Dialog returnFocusWhenClosingModalBoxes:false
     Dialog returnFocusWhenClosingModalBoxes:true

o  setDefaultStyle
set a default style as appropriate for the underlying system.
This is used if no setting is coming from a startup file or a preferences,
i.e. for standalone apps (with no .rc file)

o  styleSheet
return the view style sheet information (a dictionary).
Notice: returns a dummy styleSheet if headless

Usage example(s):

     View styleSheet

o  styleSheet: aViewStyle
set the view style from a style-sheet

o  updateAllStyleCaches
reload all style caches in all view classes.
Needed after a style change or when a style file has been changed.
Reminder: updateStyleCache is only called for those who implement it!
(i.e. it is not required to inherit it)

Usage example(s):

     View updateAllStyleCaches

o  updateStyleCache
this method gets some heavily used style stuff and keeps
it in class-variables for faster access.
Subclasses should redefine this to load any cached style-values
into faster class variables as well. These should NOT do a
super updateStyleCache, since this method is called for all view-classes
anyway.

o  viewSpacing
return a convenient number of pixels used to separate views (usually 1mm).
Having this value here at a common place makes certain that all views
get a common look

help specs
o  helpSpec
default is: no help-spec (should be redefined by concrete class if help is wanted).

initialization
o  initialize
to get language changes

o  postAutoload
(comment from inherited method)
postAutoload is sent to a class after it has been autoloaded.
This gives it a chance to arrange for automatic unloading to be done
after a while ...
This is NOT sent to statically compiled in or explicitely filedIn
classes.
The default action here is to do nothing.

instance creation
o  extent: extent
create a new view with given extent

o  extent: extent in: aView
create a new view as a subview of aView with given extent

o  extent: extent label: label
create a new view with given extent and label

o  in: aView
return a new view as a subview of aView.
If aView is nil, it is left unspecified, in which superview
the new view will be placed. The view can later be assigned
by adding it to the superview via #addSubView:.
If it's later realized and no superview has ever been set,
it will come up as a topview.

o  label: label
create a new view with given label

o  label: label in: aView
create a new view as subview of aView with given label

o  model: aModel
st-80 style view creation: create a new view and set its model.
Notice, that simpleViews do not understand #model:; however,
subclasses may.

o  on: aModel
create a new drawable on aModel

Usage example(s):

although this one does not know about models,
     it can still send the model-assign message. This was done
     to catch obsolete calls to on:aDevice.

o  onSameDeviceAs: anotherView
create a view on the same device as anotherView.
Used with popUpMenus, which should be created on the device of
its masterView.

o  origin: origin corner: corner
create a new view with given origin and extent

o  origin: anOrigin corner: aCorner borderWidth: bw font: aFont label: aLabel in: aView

o  origin: origin corner: corner borderWidth: bw in: aView
create a new view as a subview of aView with given origin and extent

o  origin: origin corner: corner in: aView
create a new view as a subview of aView with given origin and extent

o  origin: origin extent: extent
create a new view with given origin and extent

o  origin: origin extent: extent borderWidth: bw
create a new view with given origin, extent and borderWidth

o  origin: anOrigin extent: anExtent borderWidth: bw font: aFont label: aLabel in: aView

o  origin: origin extent: extent borderWidth: bw in: aView
create a new view as a subview of aView with given origin, extent
and borderWidth

o  origin: origin extent: extent font: aFont label: label

o  origin: origin extent: extent font: aFont label: label in: aView

o  origin: origin extent: extent in: aView
create a new view as a subview of aView with given origin and extent

o  origin: origin extent: extent label: label
create a new view with given origin, extent and label

o  origin: anOrigin extent: anExtent label: aLabel icon: aForm minExtent: minExtent maxExtent: maxExtent
onDevice:Screen current.

o  origin: origin in: aView
create a new view as a subview of aView with given origin

misc ui support
o  iconInBrowserSymbol
( an extension from the stx:libtool package )
the browser will use this as index into the toolbariconlibrary

resources
o  classResources
if not already loaded, get the classes resourcePack and return it

o  classResources: aResourcePack
allow setting of the cached classResources

o  flushAllClassResources
flush all classes resource translations.
Needed after a resource file has changed.

Usage example(s):

     View flushAllClassResources

Usage example(s):

to change the language:
	Language := #en.
	Smalltalk changed:#Language.
	View flushAllClassResources
     or:
	Language := #de.
	Smalltalk changed:#Language.
	View flushAllClassResources

o  flushClassResources
flush classes resource string translations.
Needed whenever a resource file or language has changed

o  updateClassResources
flush classes resource string translations and reload them.
Needed whenever a resource file or language has changed

startup
o  open
create, realize the view - this topview and all its subviews will
run as a separate process with its own windowGroup

o  openOnXScreenNamed: aScreenName
create an instance of the view and open it
on some X display screen. The argument aScreenName must be
a valid x-display name (i.e. of the form '<host>:<screenNr>' as in 'foo:0').
For more info, read the document on multiple display
support and the documentation of the DeviceWorkstation class.

Usage example(s):

     FileBrowser openOnXScreenNamed:'bitsy:0'
     FileBrowser openOnXScreenNamed:':0'
     View openOnXScreenNamed:'bitsy:0'

testing
o  hasOwnScrollbars
a hack for codeView2, which behaves like a TextView, but has its own
scrollbars embedded - sigh (an extra load one).
This allows for the UIBuilder to avoid creating an extra set around such
a view (as is the case with TextSpec with scrollbars when using CodeView2)


Instance protocol:

Compatibility-ST80
o  checkForEvents
ST-80 compatibility:
check for any pending events and process them

o  closeAndUnschedule
actually sent to a controller in VW...
however, #open returns the view in ST/X, so we respond here

o  displayPendingInvalidation
dummy - for ST-80 compatibility

o  invalidateRectangle: aRectangle repairNow: doRepairNow

o  isEnabled
return true, if this view is enabled (i.e. accepts user interaction).
Most views are enabled - only a few (buttons, SelectionInList etc.) can
be disabled.
#isEnabled is ST-80's equivalent of #enabled

o  isOpen
ST80 compatibility

o  isVisualWorksController

o  lookPreferences: prefs
ignored - but required for some apps

o  newLayout: aLayoutObject
set the layout object which controls my geometry.
ST80-compatibility.

o  refresh

o  takeKeyboardFocus

Compatibility-Squeak
o  insetDisplayBox
Squeak mimicri: return my bounds

o  openInWorld

accessing
o  actionAt: aPoint
if aPoint is over a clickable (anchor-) link, return its action.
Otherwise, return nil.
The action will be something responding to #value;
i.e. a block or Explainer::ActionWithInfo or similar

o  client: anApplicationModel
release existing components and generate new components from
the applications windowSpec.
ATTENTION: this is a low level interface; postBuild is NOT invoked

o  client: anApplication spec: aWindowSpecOrSelector
release existing components and generate new components from
the applications windowSpec.
ATTENTION: this is a low level interface; postBuild is NOT invoked

o  client: anApplication spec: aWindowSpecOrSpecSymbol builder: aBuilder
release existing components and generate new components from
the given windowSpec, using the given builder.

o  client: anApplication spec: aWindowSpecOrSpecSymbol builder: aBuilder withMenu: withMenuBoolean
release existing components and generate new components from
the given windowSpec, using the given builder.
ATTENTION: this is a low level interface.
TODO: this code is so ugly and badly designed - it must be redesigned
or at least well documented.

o  helpKey
The helpKey (symbol) or nil.
This can be set programatically, in views which are constructed
'by hand' - i.e. not via the UI painter.
When constructed from a UI-spec, this key is typically specified there (activeHelpKey)
(however, special apps may change it dynamically, if a component changes
its semantic meaning dynamically)

o  helpKey: aSymbolOrNil
The helpKey (symbol) or nil.
This can be set programatically, in views which are constructed
'by hand' - i.e. not via the UI painter.
When constructed from a UI-spec, this key is typically specified there
(however, special apps may change it dynamically, if a component changes
its semantic meaning dynamically)

o  helpText
Any optional, dynamically assigned helptext.
If it was never set (via helpText:), then the normal mechanism
(using a helpKey and asking the app for the corresponding text) is used.

o  helpText: aString
Any optional, dynamically assigned helptext.
If it is never set (via helpText:), then the normal mechanism
(using a helpKey and asking the app for the corresponding text) is used.
Warning:
Only use explicit helpTexts for very dynamic tooltips, which cannot be generated via
the regular (language-xlated) helpKey mechanism.

o  helpTextAt: srcPoint
fallback to avoid DNU for those which do a super (which they should not)

o  keyboardProcessor
return my keyboard processor.
If non-nil, that one gets a chance to intercept and deal with things like
escape or return in modal boxes.

accessing-behavior
o  deadKeysEnabled: aBoolean
set to true if dead key processing is to be enabled
(for all windows - not only for me)

o  disable
alternative method; redirected to basic mechanism

o  disableDeadKeys
disable dead key processing
(for all windows - not only for me)

o  enable
alternative method; redirected to basic mechanism

o  enableDeadKeys
enable dead key processing
(for all windows - not only for me)

o  enabled
views are enabled by default

o  enabled: bool
this is the basic machanism to enable/disable a view.
empty in this class; redefined by many subclasses

o  isEnabled: aBoolean
ST-80 compatibility; set enabled state

o  preferFirstInputFieldWhenAssigningInitialFocus
define the focus behavior for dialogs.
If true is returned, input fields take precedence over other keyboard consumers.
This used to return true, but the behavior is somewhat ugly.

o  readOnly: aBoolean
ignored here; present for compatibility with some textView subclasses,
so that UIPainter can handle it in its TextView spec (which contains a
readOnly field)

accessing-bg & border
o  allSubViewsBackground: aColorOrImageOrForm
set the viewBackground to aColorOrImageOrForm, a color, image or form,
recursively in all of my subviews

o  allSubViewsBackground: aColorOrImageOrForm if: condition
set the viewBackground to aColorOrImageOrForm, a color, image or form,
recursively in all of my subviews

o  allSubViewsForeground: aColorOrImageOrForm
set the foreground to aColorOrImageOrForm, a color, image or form,
recursively in all of my subviews

o  allViewBackground: aColorOrImageOrForm
set the viewBackground to aColorOrImageOrForm, a color, image or form,
in myself and recursively in all of my subviews

o  allViewBackground: aColorOrImageOrForm if: condition
set the viewBackground to aColorOrImageOrForm, a color, image or form,
in myself and recursively in all of my subviews

o  allViewForeground: aColorOrImageOrForm
set the foreground to aColorOrImageOrForm, a color, image or form,
in myself and recursively in all of my subviews

o  backgroundColor
return the background color of the contents -
here, (since there is no contents), the viewBackground is returned.

o  backgroundColor: aColor
set the background color of the contents -
here, (since there is no contents), the viewBackground is changed.

o  border
return my border

o  border: aBorder
set my border

o  borderColor
return my borderColor

Usage example(s):

^ borderColor

o  borderColor: aColor
set my borderColor

o  borderShape: aForm
set the borderShape to aForm

o  borderWidth
return my borderWidth

o  borderWidth: aNumberOrNil
set my borderWidth

o  borderWidth: bwNumberOrNil level: levelIntegerNr
set my borderWidth and level

o  computeMargin

o  fillFormWithBorderShape: aForm
fill aForm with my borderShape

o  foregroundColor
return the foreground color of the contents -
here, (since there is no contents), some default is returned.

o  foregroundColor: aColor
set the foreground color of the contents -
ignored here, since there is no contents.

o  foregroundColor: fgColor backgroundColor: bgColor
set both the foreground and background colors of the contents

o  level
return my level relative to superView (3D)

o  level: anInteger
set my 3D effect level relative to superView in nr of pixels

o  lightColor
return the color to be used for lighted edges (3D only)

o  lightColor: aColorOrImage
set the color to be used for lighted edges (3D only)

o  margin
return my inner margin - this is usually the level,
but can be more for some views
(textViews which add more margin between the border and the text)

o  setBorderWidth
set my borderWidth in the devices physical view

o  setBorderWidth: aNumber
set my borderWidth without affecting the real view (private only)

o  shadowColor
return the color to be used for shadowed edges (3D only)

o  shadowColor: aColorOrImage
set the color to be used for shadowed edges (3D only)

o  viewBackground: aColorOrFormOrViewBackground
set the viewBackground to something, a color, image or form.
If it's a color and we run on a color display, also set shadow and light
colors - this means, that a red view will get light-red and dark-red
edges.

o  viewBackground: aColorOrImageOrForm if: condition
set the viewBackground to aColorOrImageOrForm, a color, image or form,
in myself and recursively in all of my subviews

o  viewShape: aForm
set the viewShape to aForm

accessing-channels
o  setupChannel: newChannel for: changeSelector withOld: oldChannel
common code to change a channel.
If changeSelector is non-nil, arrange for it to be sent when
the channel changes its value; otherwise, arrange for a simple update.
This is so common, that it's worth a helper method:
release any old channel (if non-nil),
arrange for changeSelector (or #update) to be sent for the new channel.

accessing-contents
o  heightOfContentsDependsOnWidth
a very special query which is used by the scrollableView,
to check if it should NOT automatically hide scrollbars, when the
pointer leaves the view.
Currently, there are only a small number of views which return true here,
one being the HTML view, which rearranges its text depending on the width,
and therefore, it is a bad idea to hide/show scrollbars dynamically
(as this might lead to annoying flicker if the hiding of the scrollbar
rearranges the contents)

o  widthOfContentsDependsOnHeight
a very special query which is only used by the scrollableView,
to check if it should NOT automatically hide scrollbars, when the
pointer leaves the view.
Currently, there is no view, which returns true
(maybe if we ever support chinese writing top to bottom...

accessing-dimensions
o  allInset: aNumber
set all insets; positive makes the view smaller,
negative makes it larger..
Obsolete: please use a layout object.

o  bottom
return the y position of the actual bottom edge (in pixels)

o  bottom: aNumber
set the corner's y position;
leaves the top unchanged

o  bottomInset
return the inset of the bottom edge; positive is to the top,
negative to the bottom.
Obsolete: please use a layout object.

o  bottomInset: aNumber
set the inset of the bottom edge;
positive is to the top (view becomes smaller),
negative to the bottom (becomes larger).
Obsolete: please use a layout object.

o  bounds
ST-80 compatibility: return my bounds

o  bounds: aRectangle
ST-80 compatibility: change my bounds

o  center
return the point at the center of the receiver (in pixels)

o  center: newCenter
move the receiver so that newCenter, aPoint becomes the center point

o  computeCorner
compute my corner;
if I have a layoutObject, relative origins or blocks to evaluate, compute it now ..
Blocks may return relative values or nil; nil means: take current value.
Returns the corner point in device coordinates (pixels).

o  computeExtent
compute my extent;
if I have a layoutObject, a relative extent or blocks to evaluate, compute it now ..
There is one catch here, if the dimension was defined
by origin/corner, compute them here and take that value.
I.e. origin/corner definition has precedence over extent definition.
Returns the extent in device coordinates (pixels).

o  computeOrigin
compute my origin;
if I have a layoutObject, a relative origin or blocks to evaluate, compute it now ..
Blocks may return relative values or nil; nil means: take current value.
Returns the origin point in device coordinates (pixels).

o  computePreferredExtent
return my computed preferred extent - this is the minimum size I would like to have.
If there are any components, a rectangle enclosing them
is returned. Otherwise, the actual extent is returned.

o  corner
return the lower right corner-point (in pixels)

o  corner: corner
set the view's corner;
the corner argument may be:
a point
where integer fields mean 'pixel-values'
and float values mean 'relative-to-superview'
and nil means 'take current value';
or a block returning a point which is interpreted as above.
Please migrate to use layoutObjects, if possible.

o  cornerRule
return the corner block - non public; this will vanish without notice

o  extent: extent
set the view's extent;
extent may be:
a point
where integer fields mean 'pixel-values'
and float values mean 'relative-to-superview'
and nil means 'leave current value';
or a block returning a point which is interpreted as above.
Be careful when using relative extents: rounding errors may
accumulate. Better use origin/corner.
Best: migrate to use layour objects.

Notice: this sets the view's explicitExtent flag, which prevents it normally
from resizing itself to its preferredExtent.
See initialExtent: for a variation.

o  extentRule
return the extent block - non public; this will vanish without notice

o  flushCachedPreferredExtent

o  frame
compatibility with displayObjects: returns my bounds

o  geometryLayout
this method will vanish, as soon as all implementations of
#layout: are removed ...
(conflict for example in label>>layout:).
DO NOT USE #geometryLayout: in your code; it will be removed without
notice.

o  geometryLayout: aLayoutObject
this method will vanish, as soon as all implementations of
#layout: are removed ...
(conflict for example in label>>layout:).
DO NOT USE #geometryLayout: in your code; it will be removed without
notice.

o  hasExplicitExtent
If set, this prevents the extent from being changed automatically

o  height: aNumber
set the view's height in pixels

o  heightIncludingBorder
return my height including border
(this is my height as seen from the outside view;
while #height returns the height as seen by myself)

o  horizontalInset: aNumber
set the insets of the left/right edge;
positive makes it smaller, negative makes it larger.
Obsolete: please use a layout object.

o  initialExtent: extent
set the view's extent, but don't change its explicitExtent setting.
a variant of #extent.

o  initialHeight: aNumber
set the view's height in pixels, but don't change its explicitExtent setting

o  initialWidth: aNumber
set the view's width in pixels, but don't change its explicitExtent setting

o  innerHeight
return the height of the view minus any 3D-shadow-borders

o  innerHeight: pixels
set the height of the view plus any 3D-shadow-borders.
This does not work with a relative size.

o  innerHorizontalMargin
return any additional inner margin (i.e. contents margin).
This should be redefined by views which do add margins
(for example: textViews do this)

o  innerVerticalMargin
return any additional inner margin (i.e. contents margin).
This should be redefined by views which do add margins
(for example: textViews do this)

o  innerWidth
return the width of the view minus any 3D-shadow-borders

o  innerWidth: pixels
set the width of the view plus any 3D-shadow-borders.
This does not work with a relative size.

o  inset: aNumber
set all insets; positive makes the view smaller,
negative makes it larger..
Obsolete: please use a layout object.

o  layout
return the layout object which controls my geometry.
Currently, this is nil in most cases, and my geometry is
defined by relativeOrigin/relativeCorner/relativeExtent,
originRule/extentRule/cornerRule and inset.
Applications should be changed to use layoutObjects,
since the above listed instance variables will vanish.

o  layout: aLayoutObject
set the layout object which controls my geometry.

o  layoutChanged

o  left
return the x position of the left border (in pixels)

o  left: aNumber
set the x position

o  left: newLeft top: newTop width: newWidth height: newHeight
another way of specifying origin and extent

o  leftInset
return the inset of the left edge; positive is to the right,
negative to the left.
Obsolete: please use a layout object.

o  leftInset: aNumber
set the inset of the left edge;
positive is to the right (view becomes smaller),
negative to the left (becomes larger).
Obsolete: please use a layout object.

o  leftInset: lNumber rightInset: rNumber
set the inset of the left edge;
positive is to the right (view becomes smaller),
negative to the left (becomes larger).
Obsolete: please use a layout object.

o  makeFullyVisible
make sure that the view is fully visible by shifting it
into the visible screen area if necessary.

o  makeRoundViewShapeWithBorder: bw
setup my window for a round shaped view;
this is not supported by all devices

o  makeRoundViewShapeWithBorder: bw opaque: opaque
setup my window for a round shaped view;
this is not supported by all devices

o  makeTransparentRectangularViewShapeWithBorder: bw
setup my window for a rectangluar transparent shaped view;
this is not supported by all devices

o  maxExtent
(comment from inherited method)
return the view's maximum extent - this is nil here.
Only standardSystemViews support this.

o  maxExtent: aPoint
(comment from inherited method)
set the view's maximum extent - ignored here.
Only standardSystemViews support this.

o  minExtent
(comment from inherited method)
return the view's minimum extent - this is nil here.
Only standardSystemViews support this.

o  minExtent: aPoint
(comment from inherited method)
set the view's minimum extent - ignored here.
Only standardSystemViews support this.

o  origin
return the origin (in pixels)

o  origin: origin
set the view's origin;
origin may be:
a point
where integer fields mean 'pixel-values'
and float values mean 'relative-to-superview'
and nil means 'take current value';
or a block returning a point which is interpreted as above.
Please migrate to use layout objects.

o  origin: origin corner: corner
set both origin and extent

o  origin: origin extent: extent
set both origin and extent

o  originRelativeTo: aView
return the origin (in pixels) relative to a superView,
or relative to the rootView (if the aView argument is nil).
If the receiver is nonNil and not a subview of aView, return nil.

Usage example(s):

     |top sub1 sub2 sub2ScreenOrg|

     top := StandardSystemView new.
     top origin:0@0 extent:200@200.
     sub1 := View origin:0.2 @ 0.2 corner:0.8 @ 0.8 in:top.
     sub2 := Button origin:0.3 @ 0.3 corner:0.7 @ 0.7 in:sub1.
     top openAndWaitUntilVisible.
     Transcript show:'button in top:'; showCR:(sub2 originRelativeTo:top).
     sub2ScreenOrg := sub2 originRelativeTo:nil.
     Transcript show:'button on screen:'; showCR:sub2ScreenOrg.

     Transcript show:'move to: %1' with:sub2ScreenOrg.
     top device setPointerPosition:sub2ScreenOrg.
     Transcript show:'pointer now at %1' with:top device pointerPosition.

o  originRelativeToTopView
return the origin (in pixels) within my topView

o  originRule
return the origin block - non public; this will vanish without notice

o  preferredBounds
ST-80 compatibility.

o  preferredExtent
return my preferred extent - this is the minimum size I would like to have.
If the preferredExtent has been set already, that one is returned.
Otherwise, if there are any components, a rectangle enclosing them
is returned.
Otherwise, the actual extent is returned.

Usage example(s):

If I have an explicit preferredExtent..

Usage example(s):

If I have a cached preferredExtent value..

Usage example(s):

Transcript showCR: e'{self className} preferred:{preferredExtent}'.

o  preferredExtent: anExtentPoint
override the view's own preferredExtent computation,
and let it prefer the size given by the argument.

o  preferredHeight

o  preferredHeightIncludingBorder
return my preferred height including border
(this is my preferred height as seen from the outside view;
while #preferredHeight returns the height as seen by myself)

o  preferredWidth

o  preferredWidthIncludingBorder
return my preferred width including border
(this is my preferred width as seen from the outside view;
while #preferredWidth returns the width as seen by myself)

o  relativeCorner
return the relative corner or nil

o  relativeCorner: aPoint
set the relative corner;
does not resize the view (i.e. to be done before the view is shown,
or must be followed by containerChangedSize to force it)

o  relativeExtent
return the relative extent or nil.
Obsolete: please use a layout object.

o  relativeExtent: aPoint
set the relative extent.
does not resize the view (i.e. to be done before the view is shown,
or must be followed by containerChangedSize to force it).

Obsolete: please use a layout object.

o  relativeOrigin
return the relative corner or nil

o  relativeOrigin: aPoint
set the relative origin.
does not resize the view (i.e. to be done before the view is shown,
or must be followed by containerChangedSize to force it).

o  right
return the x position of the right edge (in pixels)

o  right: aNumber
set the corners x position

o  rightInset
return the inset of the right edge; positive is to the left,
negative to the right.
Obsolete: please use a layout object.

o  rightInset: aNumber
set the inset of the right edge;
positive is to the left (view becomes smaller),
negative to the right (becomes larger).
Obsolete: please use a layout object.

o  screenBounds
return my bounds on the screen

o  setOrigin: aPoint
set the origin only

o  sizeFixed
return true, if this view wants its size to remain unchanged
(or it was explicitly set for a panel to not resize it in a fit layout).
Used by panels, to check if their components want to keep their size.

o  sizeFixed: aBoolean
set/clear the fix-size attribute, if supported by concrete subclasses.
Views which want to resize themselfes as appropriate to their contents
should cease to do so and take their current size if sizeFixed is set to
true. Currently, only supported by Labels.
This does NOT prevent the window manager from resizing the view,
instead it tell the view to NOT resize ITSELF.
Added here to provide a common protocol for all views.

o  superViewRectangle
return the inside area of the superView.

o  top
return the y position of the top border

o  top: aNumber
set the y position

o  topInset
return the inset of the top edge; positive is to the bottom,
negative to the top.
Obsolete: please use a layout object.

o  topInset: aNumber
set the inset of the top edge;
positive is to the bottom (view becomes smaller),
negative to the top (becomes larger).
Obsolete: please use a layout object.

o  verticalInset: aNumber
set the insets of the top/bottom edge;
positive makes it smaller, negative makes it larger.
Obsolete: please use a layout object.

o  viewRectangle
return the inside area.
This is used by relative sized subviews and layout-computations
to base relative coordinates on.
For most views, the value returned here (actual extent minus any
margins required for 3D levels) is ok.
However, views which want some extra area around (for example: FramedBox)
may redefine this method to return a rectangle without this area
(thus, a relative sized subviews coordinates will be based on this net area)

o  width: aNumber
set the view's width in pixels

o  widthIncludingBorder
return my width including border
(this is my width as seen from the outside view;
while #width returns the width as seen by myself)

accessing-display attributes
o  beMDIChildView

o  beNativeWidget

o  beNonNativeWidget

o  isMDIChildView

o  isMarkedAsUnmappedModalBox

o  isNativeWidget

o  markAsUnmappedModalBox

o  unmarkAsUnmappedModalBox

accessing-hierarchy
o  components
return the collection of non-view components.
For now, ST/X does not use those (instead real native views are used).
However, this is provided as a hook for VW compatible applications.

o  container
return my container

o  container: aContainer
set my container (i.e. superView) to be aContainer

o  hierarchicalIndex

o  hierarchicalIndexInList: aViewCollection
no conflict

o  hierarchicalIndexOfChild: aView

o  hierarchicalUUID

o  lower
bring to back

Usage example(s):

     Transcript topView lower

o  raise
bring to front

Usage example(s):

     Transcript topView raise

o  scrolledView
for compatibility with scrolledView, return myself.
So you can ignore the scrollability of a component when accessing it,
without a need to ask for being a scrollwrapper first.
Eg, you can send someView scrolledView to get the underlying view,
without a danger of a DNU, if the component is not scrolled.

o  setContainer: aContainer
set my container (i.e. superView) to be aContainer

o  subViews
return the collection of subviews

o  subViews: aListOfViews
set the collection of subviews

** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  superView
return my superView

o  superView: aView
set my superView to be aView

** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  topComponent
return the topmost component - that's the one with no superview.
For ST-80 compatibility.

o  topView
return the topView - that's the one with no superview

o  uuidStringOrName

o  view
return my view - for real views, that's the receiver.
For wrappers, its the real view that contains it

accessing-menus
o  menuHolder
who has the menu ?
By default, I have it.

o  menuMessage
Return the symbol sent to myself to acquire the menu

o  menuPerformer
who should perform the menu actions ?
By default, I do it.

o  yellowButtonMenu
actually, this should be called 'middleButtonMenu'.
But for ST-80 compatibility ....
This method will vanish, once all views have controllers
associated with them; for now, duplicate some code also found in
controller.

accessing-misc
o  bitGravity
return the bitGravity - that's the direction where the contents will move
when the view is resized.

o  bitGravity: gravity
set the bitGravity - that's the direction where the contents will move
when the view is resized.

o  clippingBounds: aRectangleOrNil
set the clipping rectangle for drawing (in logical coordinates);
a nil argument turns off clipping (i.e. whole view is drawable).
Redefined to care for any margin.

o  fullName
return my full name to be used for resource-access

o  fullXPath
return my full xPath to be used for resource-access

o  name
return my name component to be used for resource-access

o  name: aString
set my name component to be used for resource-access

o  processName
return a string to be shown for my process in the
process monitor. This has no semantic meaning, but exists
for your convenience only.
Normally, we should not arrive here, as this is defined in StandardSystemView;
however, just in case another view is opened as non-modal top view.

o  reverseOrderIfOKAtLeft: aBoolean
for compatibility with PanelView - so this message can be sent to any view

o  styleSheet
return the styleSheet. This is set at early view-creation time,
from the defaultStyleSheet which is valid at that time.
It is not affected by later defaultStyle changes

o  styleSheet: aStyleSheet
change the styleSheet. Knowledgable users only, please.

o  viewGravity
return the viewGravity - that's the direction where the view will move
when the superView is resized.

o  viewGravity: gravitySymbol
Modified (format): / 05-04-2021 / 10:23:03 / cg

accessing-mvc
o  application
return the application, under which this view was opened,
or nil, if there is no application

o  controller
return the controller. For views which implement the controller
functionality themself, return the receiver itself

o  controller: aController
set the controller - that's the one handling user events

o  model
return nil - simpleViews have no model (only providing geometric)

o  sensor
return the view's sensor.
Attention: if there is no windowGroup yet
(i.e. the view is initializing and not yet realized),
then a synchronous sensor is returned in order to handle
pushed events.
Don't use this to check for a sensor being present.
Use sensorOrNil for that.

Usage example(s):

The synchronous sensor would execute the pushed action immediately.

Usage example(s):

Logger warn:'Sensor assumes active WG''s sensor'.

Usage example(s):

^ wg sensor.

o  sensorOrNil
return the view's sensor if there is one.
Attention: if there is no windowGroup yet
(i.e. the view is initializing and not yet realized),
then nil is returned

o  setController: aController
set the controller but do not affect the model/view releationship

o  setWindowGroup: aGroup
set the window group.
Unsafe; do not use.

o  windowGroup
return the window group. For old style views, return nil

o  windowGroup: newGroup
set the window group of myself and recursively of any children.
If I am currently in a group, remove me from it it.

accessing-transformation
o  maxComponentBottom
return the maximum of all components bottoms

o  maxComponentRight
return the maximum of all components rights

o  maxSubViewBottom
subViews isNil ifTrue:[^ 0].

o  maxSubViewRight
subViews isNil ifTrue:[^ 0].

o  scale: aPoint
set the scale factor of the transformation

o  setViewOrigin: aPoint
set the viewOrigin - i.e. virtually scroll without redrawing

o  viewOrigin
return the viewOrigin; that's the coordinate of the contents
which is shown topLeft in the view
(i.e. the origin of the visible part of the contents).

o  visibleArea
return the rectangle that contains the visible part
of the view in user coordinates.

o  xOriginOfContents
return the x coordinate of the viewOrigin in pixels;
used by scrollBars to compute thumb position within the document.

o  yOriginOfContents
return the y coordinate of the viewOrigin in pixels;
used by scrollBars to compute thumb position within the document.

accessing-visibility
o  beInvisible
make the view invisible; if my container is visible,
change visibility immediately;
otherwise, arrange for the receiver to be not realized,
when the container is made visible.

o  beVisible
make the view visible; if my container is already visible,
change visibility immediately; otherwise, arrange for the receiver
to be made visible when the container is made visible.
Notice, that the command may not be sent immediately to the display,
and that ST/X considers the view to be still invisible until a
visibility event arrives from the display.
Thus, the view may remain logically invisible
for a while. (see #beVisibleNow for more on this)

Usage example(s):

     |top topFrame check list|

     top := StandardSystemView new.
     top extent:150@400.
     topFrame := VerticalPanelView origin:0.0@0.0 corner:1.0@0.4 in:top.
     topFrame horizontalLayout:#leftSpace.

     topFrame add:(check := CheckBox label:'hidden').
     check pressAction:[list beInvisible].
     check releaseAction:[list beVisible].

     list := ScrollableView for:SelectionInListView.
     list origin:0.0@0.4 corner:1.0@1.0.
     list list:#('foo' 'bar' 'baz').
     top add:list.

     check turnOn.
     list beInvisible.

     top open

o  beVisibleNow
make the view visible immediately.
In contrast to #beVisible, this waits until the view is really
visible.

o  hidden
return true, if the view does not want to be realized
automatically when superview is realized

** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  hidden: aBoolean
if the argument is true, the receiver view will not
be realized automatically when superview is realized

** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  hiddenOnRealize: aBoolean
if the argument is true, the receiver view will not
be mapped (i.e. shown) automatically when the superview is realized.
The hiddenOnRealize flag is useful to create views which are
to be made visible conditionally or later.
Notice: if there is a visibilityChanne, this static flag is ignored.
For ST-80 compatibility, please use #beVisible / #beInvisible.

o  isBeingDestroyed
a flag which is set, when the view is being destroyed.
Can be checked to avoid some resizing and other layout reorganizations
(especially in panels), which otherwise occur while subviews are removed.

o  isBeingDestroyed: aBoolean
a flag which is set, when the view is being destroyed.
Can be checked to avoid some resizing and other layout reorganizations
(especially in panels), which otherwise occur while subviews are removed.

o  isHiddenOnRealize
return true, if the receiver will NOT be mapped when realized.
False otherwise.
The hiddenOnRealize flag is useful to create views which are
to be made visible conditionally or later.
Notice: if there is a visibilityChanne, the static flag is ignored.

o  isReallyShown
return true, if the view is visible AND all of its containers are

o  isVisible
return true, if the view is visible

o  isVisible: aBoolean
make the view visible or invisible

o  setVisibilityChannel: aValueHolder
set the valueHolder, which holds the visible boolean value

o  shown
return true if the view is shown; false if not.
Shown means: the view is mapped and is not completely covered.

o  visibilityChannel
return a valueHolder for visible/invisible

o  visibilityChannel: aValueHolder
set the valueHolder, which holds the visible boolean value

Usage example(s):

      |v h|

      v := View new.
      v visibilityChannel:(h := ValueHolder with:true).
      v open.
      Delay waitForSeconds:2.
      h value:false.
      Delay waitForSeconds:2.
      h value:true.
      Delay waitForSeconds:2.

adding & removing components
o  add: aComponent
add a component (either a view or gadget) to the collection of
subComponents.

o  add: aComponent at: anOrigin
for ST-80 compatibility.
add a component at some origin

o  add: aComponentOrCollection in: aRectangleOrLayoutFrame
for ST-80 compatibility.
add a component in some frame; the argument may be either a rectangle
with relative coordinates, or an instance of LayoutFrame, specifying
both relative coordinates and the insets.

o  addComponent: aComponent
components (i.e. gadgets or lightweight views) are being prepared.
Don't use this right now for non-views

o  addSubView: newView
add a view to the collection of subviews

o  addSubView: newView after: aViewOrNil
add a view to the collection of subviews after another view.
If the argument aViewOrNil is nil, the newView is added at the end.
This makes sense, in Panels and other layout views, to enter a new
element at some defined place.

o  addSubView: newView before: aViewOrNil
add a view to the collection of subviews before another view.
If the argument aViewOrNil is nil, the newView is added at the beginning.
This makes sense, in Panels and other layout views, to enter a new
element at some defined place.

o  addSubView: aView in: bounds borderWidth: bw
for ST-80 V2.x compatibility

o  addSubViewFirst: newView
add a view to the front of the collection of subviews

o  component: aComponent
components (i.e. gadgets or lightweight views) are being prepared.
Don't use this right now for non-views

o  destroySubViews
remove all subviews

o  removeComponent: aComponent
components (i.e. gadgets or lightweight views) are being prepared.
Don't use this right now for non-views

o  removeSubView: aView
remove a view from the collection of subviews

o  setContainerIn: aView
common code for addSubView* methods

change & update
o  accept
accept the current contents by executing the accept-action and/or changeMessage.

o  acceptIsUserAction: isUserAction
accept the current contents by executing the accept-action and/or changeMessage.
isUserAction is false, if indirectly accepted
(only when coming via a dialog's ok button)

o  borderChanged
top margin

o  borderChanged: aspect
top margin

o  changedPreferredBounds: someArgument
tell any dependents, that I have changed my preferred bounds;
Interface is provided mostly provided for ST80 compatibility;
here, translate into ST/X's mechanism for telling others about this.

o  languageChanged
intentionally empty

o  update: aspect with: aParameter from: changedObject
an update request

cursor animation
o  showBusyWhile: aBlock
evaluate some time consuming block, while doing this,
show a spinning wheel cursor. If those bitmaps are not found,
fallback to the standard busy cursor.
Experimental.

Usage example(s):

     View new realize showBusyWhile:[ Delay waitForSeconds:5 ]
     Transcript showBusyWhile:[ Delay waitForSeconds:5 ]

dependents access
o  addDependent: anObject
make the argument, anObject be a dependent of the receiver

o  breakDependents
remove all dependencies from the receiver

o  dependents
return a Collection of dependents.
Views keep them in an instance variable to avoid overhead.

o  dependents: aCollectionOrNil
set the collection of dependents.
Views keep them in an instance variable to avoid overhead.

o  dependentsDo: aBlock
evaluate aBlock for all of my dependents.
Views keep them in an instance variable to avoid overhead.

o  removeDependent: anObject
make the argument, anObject be independent of the receiver

dependents access (non weak)
o  addNonWeakDependent: anObject
make the argument, anObject be a dependent of the receiver.
Since all dependencies are nonWeak in Model, this is simply
forwarded to addDependent:

o  interests
return a Collection of interests - empty if there is none.
Here, we use the normal dependents collection for interests.

o  nonWeakDependents
return a Collection of dependents - empty if there is none.
Since all dependencies are nonWeak in Model, this is a dummy.

o  removeNonWeakDependent: anObject
make the argument, anObject be independent of the receiver.
Since all dependencies are nonWeak in Model, this is simply
forwarded to removeDependent:

drag & drop
o  canDrop: aDropContext
return true, if we can drop using a dropContexts information (the new drop interface).
This method should be redefined in views which can take objects

o  canDrop: aDropContext at: positionInView
return true, if we can drop using a dropContexts information (the new drop interface).
This method should be redefined in views which can take objects

o  canDropObjects: aCollectionOfDropObjects
return true, if we can drop aCollectionOfDropObjects
(the OLD drop interface invoked for internal (stx->stx) drops).
This method should be redefined in views which can take objects

o  canDropObjects: aCollectionOfDropObjects at: positionInView
return true, if we can drop aCollectionOfDropObjects (the OLD drop interface).
This method should be redefined in views which can take objects

o  dragAutoScroll: aDropContext
called by the DragAndDropManager to scroll during a drag/drop operation
if required (decided by the widget itself).
If a scroll is done, return true;
otherwise false (used to restore the background).

o  drop: aDropContext
drop manager wants to drop using info in aDropContext (the new drop interface).
An error here, because this is only sent, if #canDrop: returned true;
if you redefined #canDrop: in a subclass, #drop: must also be redefined.

** This method must be redefined in concrete classes (subclassResponsibility) **

o  drop: aDropContext at: aPoint
drop manager wants to drop using info in aDropContext (the new drop interface).
If I have an application, forward the request.
Otherwise, ignore it. This is only sent, if #canDrop: returned true;
if you redefined #canDrop: in a subclass, #drop:at: must also be redefined.

o  dropObjects: aCollectionOfDropObjects
someone wants to drop aCollectionOfDropObjects (the OLD drop interface).
An error here, because this is only sent, if #canDrop: returned true;
if you redefined #canDropObjects: in a subclass, #dropObjects: must also be redefined.

** This method must be redefined in concrete classes (subclassResponsibility) **

o  dropObjects: aCollectionOfDropObjects at: aPoint
someone wants to drop aCollectionOfDropObjects (the OLD drop interface).
An error here, because this is only sent, if #canDrop: returned true;
if you redefined #canDropObjects: in a subclass, #dropObjects: must also be redefined.

o  dropTarget
returns the dropTarget (a DropTarget instance) or nil.
Can be either set statically (at init time), or created dynamically,
(by redefining this method to return a DropTarget instance).
The dropTarget object provides info about enter/leave/over/drop selectors,
to be sent to the view for a drag&drop operation.
If nil is returned, a default dropTarget instance is created by the DnD manager.
Notice, that if it is created dynamically, it should be remembered somewhere
inside the instance, and the identical object should be returned as long as
the drop operation is moving over the same item within a view.
Otherwise (if new objects are returned), the old dropTarget will get a
dropLeave and the new one a dropEnter with every motion.
Notice that the dropTarget is explicitly cleared at the end of the d&d operation.

o  dropTarget: aDropTragetOrNil
set the dropTarget (a DropTarget instance) or nil.
The dropTarget object provides info about enter/leave/over/drop selectors,
to be sent to the view for a drag&drop operation.
If nil is returned, a default dropTarget instance is created by the DnD manager.
Notice that the dropTarget is explicitly cleared at the end of the d&d operation.

edge drawing
o  drawBottomEdge
draw bottom 3D edge into window frame

o  drawBottomEdgeLevel: levelArg shadow: shadowColorArg light: lightColorArg halfShadow: halfShadowColor halfLight: halfLightColor style: edgeStyle

o  drawEdges
draw all of my 3D edges

o  drawEdgesForX: x y: y width: w height: h level: level
draw 3D edges into a rectangle

o  drawLeftEdge
draw left 3D edge into window frame

o  drawLeftEdgeLevel: levelArg shadow: shadowColorArg light: lightColorArg halfShadow: halfShadowColor halfLight: halfLightColor style: edgeStyle

o  drawRightEdge
draw right 3D edge into window frame

o  drawRightEdgeLevel: levelArg shadow: shadowColorArg light: lightColorArg halfShadow: halfShadowColor halfLight: halfLightColor style: edgeStyle

o  drawTopEdge
draw top 3D edge into window frame

o  drawTopEdgeLevel: levelArg atY: y shadow: shadowColorArg light: lightColorArg halfShadow: halfShadowColor halfLight: halfLightColor style: edgeStyle

o  drawTopEdgeLevel: level shadow: shadowColor light: lightColor halfShadow: halfShadowColor halfLight: halfLightColor style: edgeStyle

o  drawTopEdgeLevel: levelArg y: y shadow: shadowColorArg light: lightColorArg halfShadow: halfShadowColor halfLight: halfLightColor style: edgeStyle

o  redrawEdges
redraw my edges (if any)

enumerating view hierarchy
o  allSubViewsChildrenFirstDo: aBlock
evaluate aBlock for all subviews (recursively);
subviews are evaluated before superviews

o  allSubViewsDetect: aBlock ifNone: exceptionValue
find a subview for which aBlock returns true (recursively).
If there is none, return the value from exceptionValue

o  allSubViewsDo: aBlock
evaluate aBlock for all subviews (recursively)

o  allSuperViewsDetect: aBlock ifNone: exceptionValue
find a container for which aBlock returns true (recursively).
If there is none, return the value from exceptionValue

o  allSuperViewsDo: aBlock
evaluate aBlock for all superviews (recursively)

o  allVisibleSubViewsDetect: aBlock ifNone: exceptionBlock
find a visible subview for which aBlock returns true (recursively)

o  changeSequenceOrderFor: aSubViewOrComponent to: anIndex
change a subview's position in the subviews collection.
Usually, this only affects the order of components in a panelView,
unless they overlap. In that case, the later view is placed above the earlier.

o  changeSequenceOrderForComponent: aComponent to: anIndex
change a components's position in the components collection.
The later components is drawn above the earlier.

o  changeSequenceOrderForView: aSubView to: anIndex
change a subview's position in the subviews collection.
Usually, this only affects the order of components in a panelView,
unless they overlap. In that case, the later view is placed above the earlier.

o  subViewsDo: aBlock
evaluate aBlock for all of my direct subviews (non-recursively)

o  withAllSubViewsDo: aBlock
evaluate aBlock for the receiver and all subviews (recursively)

event handling
o  alienDrop: aCollectionOfDropObjects position: positionOrNil
a drop from some other non-ST/X application.

o  buttonMotion: state x: x y: y
button was moved

o  buttonMultiPress: button x: x y: y
button was pressed quickly again - check my components for a hit.

o  buttonPress: button x: x y: y
button was pressed - check my components for a hit.

o  buttonRelease: button x: x y: y
button was released - check my components for a hit.

o  changeScaleForMouseWheelZoom: amount
CTRL-wheel action.
ignored here - redefined in views which can zoom

o  clientMessage: msgType format: msgFormat eventData: msgData
a client message - very X-specific and only useful for special applications.
Forwarded to my application (if I have one)

o  closeRequest
programmatic close request.
Normally, this is not needed/called in subviews;
however, it is defined here to allow for any view to be
opened as a topView; i.e. (Button label:'foo') open

o  configureX: x y: y width: newWidth height: newHeight
my size has changed by window manager action

o  containerChangedSize
my container has changed size; if I have relative
origin/extent or blocks to evaluate, do it now ..

o  containerMapped
my container was mapped (became visible).
If I was previously realized, this implies that I myself
am now mapped as well.

Usage example(s):

v containerMapped

o  containerUnmapped
my container was unmapped
- this implies that the receiver is now also unmapped.

o  copyDataEvent: parameter eventData: msgData
a copyData message - very Win32-specific and only useful for special applications.
Forwarded to my application (If I have one)

o  createWindowX: x y: y width: w height: h
A window has been created in myself, nothing to do here.
Note, that SubstructureNotify events must be enabled to get
this event. To enable, do:

self enableEvent: #substructureNotify


o  destroyed
view has been destroyed by someone else (usually window system)

o  dropMessage: dropTypeSymbol data: dropValue position: dropPosition handle: dropHandle
a drop from some other window (X: DND or Win32 drag&drop).
Convert to the ST/X drag and drop protocol here.

o  exposeX: x y: y width: w height: h
a low level redraw event from device
- let subclass handle the redraw and take care of edges here

o  focusOut
lost keyboard focus (via the window manager).
Nothing done here

o  hasKeyboardFocus: aBoolean
notification from the windowGroup that I got the keyboardFocus.

o  keyPress: key x: x y: y
a key has been pressed. If there are components,
pass it to the corresponding one.
Otherwise, forward it to the superview, if there is any.

o  keyRelease: key x: x y: y
a key has been released. If there are components,
pass it to the corresponding one.
Otherwise, do whatever my superclass would do.

o  keyboardZoom: largerBoolean
ALT+/- (was: CTRL+/-) action.
ignored here - redefined in views which can zoom

o  keyboardZoomInAllViews: largerBoolean
CTRL+/- zoom action for this windowGroup.
Sent to all windows; some may ignore it.

o  keyboardZoomReset
CTRL0 action

o  keyboardZoomkeyboardZoomReset
CTRL0 action.
ignored here - redefined in views which can zoom

o  mapped
the view has been mapped (by some outside
action - i.e. window manager de-iconified me)

Usage example(s):

     the old code was:

	realized := true.
	shown := true.
	...

     this created a race condition, if the view was
     realized and shortly after unrealized - before the mapped event
     arrived. This lead to realized being set to true even thought the
     view was not.
     Boy - that was a bad one (hard to reproduce and hard to find).

Usage example(s):

Also, when remapped, X11 only sends a mapped event for the topView.

o  mouseWheelMotion: buttonState x: x y: y amount: amount deltaTime: dTime
the mouseWheel was turned - handle as a scroll operation.
Specialized application windows may redefine this for any other operation.
Here, we scroll some amount which depends upon the view's contents (but never too much);

If ctrl is pressed, always scroll one page;
this can be changed to zoom in/out with ctrl (as in OSX)
by:
UserPreferences current allowMouseWheelZoom:false
UserPreferences current allowMouseWheelZoom:true

If shift is pressed, always scroll a single scroll-step;
this can be changed to scroll horizontally with shift (as in OSX)
by:
UserPreferences current shiftMouseWheelScrollsHorizontally:false
UserPreferences current shiftMouseWheelScrollsHorizontally:true

o  mouseWheelZoom: amount
CTRL-wheel action.
ignored here - redefined in views which can zoom

o  openDocumentation
sent by the tooltip manager (FlyByHelp), when F1 is pressed

o  pointerEnter: state x: x y: y
mouse pointer entered - request the keyboard focus (sometimes)

o  pointerLeave: buttonState
mouse pointer left

o  processOutsideButtonEventWhileModal: anEvent
a button event (press/release) arrived for another view,
while I (a topView) am open as modal view.
Can be redefined to react on clicks outside (eg. CriticsWindow);
if handled, the redefining method should return true.
If not handled, it should return false.

o  propertyChange: propertyId state: state
A property has changed, nothing to do here.
Note:
This is very X specific. PropertyChange events must be enabled
to get this event. To enable, do:

self enableEvent: #propertyChange


o  reparented
the view has changed its parent by some outside
action - i.e. window manager has added a frame.
nothing done here

o  requestAutoAccept
request to accept: this is invoked when a dialog closes via accept or cancel.
This forces my value to be accepted into my model.
Any widget may suppress the ok/cancel, by returning false.

o  saveAndTerminate
window manager wants me to save and go away;
- notice, that not all window managers are nice enough to
send this event, but simply destroy the view instead.
Can be redefined in subclasses to do whatever is required
to prepare for restart.

o  scaleMouseWheelHorizontalScrollAmount: amountToScroll
scale a mouse-wheel scrollAmount according
to the width of the scrolled view

o  scaleMouseWheelScrollAmount: amountToScroll
scale a mouse-wheel scrollAmount according
to the height of the scrolled view

o  sizeChanged: how
my view has changed the size (not the contents);
tell subviews that I changed size.
How is either #smaller, #larger or nil, and is used to control the order,
in which subviews are notified (possibly reducing redraw activity)

o  sizeChanged: how from: oldExtent
my view has changed the size (not the contents)
Tell subviews that I changed size.
How is either #smaller, #larger or nil, and is used to control the order,
in which subviews are notified (possibly reducing redraw activity).

In previous versions, there was only one argument, how,
which was either #smaller or #larger or nil (if not known).
This argument was used in some widgets to optimize (avoid) some recomputations.
However, it was too unspecific on which dimension changed;
therefore, now this method is called.
For backward compatibility, it calls the old sizeChanged: method.
If you redefine this, make sure to either call super sizeChanged:,
not super sizeChanged:from: or to not redefine sizeChange:,
to avoid an endless recursion.

o  subViewChangedSize
some subview has changed its size; we are not interested
in that here, but some geometry managers redefine this, to reorganize
components if that happens.

o  terminate
window manager wants me to go away;
- notice, that not all window managers are nice enough to
send this event, but simply destroy the view instead.
Can be redefined in subclasses to do whatever cleanup is
required.

o  unmapped
the view has been unmapped
(either by some outside action - i.e. window manager iconified me,
or due to unmapping of my parentView).

o  visibilityChange: how
the visibility of the view has changed (by some outside
action - i.e. window manager rearranged things).
Using this knowledge avoids useless redraw in obscured views.

o  visibilityStateChanged
this is called when our visibilityChannel changes

o  win32NativeScroll: scrollCode position: newPosition
this is generated by a native scrollBar widget.
We should never arrive here, as its only supposed to be
sent to scrollableViews...

event simulation
o  pushEvent: aSelectorOrWindowEvent
if the argument is a windowEvent, push it onto my event queue;
Otherwise, it must be a message selector,
and a messageSend to myself is pushed onto my event queue -
I will perform the corresponding method when its time
to handle events (useful to update low-prio views from
a higher prio process, to avoid blocking in the high prio one).
Also useful to synchronize access to critical objects inside an app or view,
eg. if coming via a change-update notification)

Usage example(s):

     |v|

     v := View new openAndWaitUntilVisible.
     v fill:Color red.
     v pushEvent:#redraw

o  pushEvent: aSelector with: arg
push some 1-arg messageSend into my event queue -
I will perform the corresponding method when its time
to handle events (useful to update low-prio views from
a higher prio process, to avoid blocking in the high prio one).
Also useful to synchronize access to critical objects inside an app or view,
eg. if coming via a change-update notification)

o  pushEvent: aSelector with: arg1 with: arg2
push some 1-arg messageSend into my event queue -
I will perform the corresponding method when its time
to handle events (useful to update low-prio views from
a higher prio process, to avoid blocking in the high prio one).
Also useful to synchronize access to critical objects inside an app or view,
eg. if coming via a change-update notification)

o  pushEvent: aSelector withArguments: args
push some messageSend into my event queue -
I will perform the corresponding method when its time
to handle events (useful to update low-prio views from
a higher prio process, to avoid blocking in the high prio one.
Also useful to synchronize access to critical objects inside an app or view,
eg. if coming via a change-update notification)

Usage example(s):

     |v|

     v := (Button label:'hello') openAndWaitUntilVisible.
     Delay waitForSeconds:1.
     v pushEvent:#buttonPress:x:y: withArguments:#(1 10 10).
     Delay waitForSeconds:1.
     v pushEvent:#buttonRelease:x:y: withArguments:#(1 10 10).

o  startButtonLongPressedHandlerProcess
start a process, which simulates a right-button press if the left-button
has been pressed, but not released, and stayed pressed for a while.
This is very handy for single-button-mice, as used with the MAC

o  stopButtonLongPressedHandlerProcess
stop any long-button-pressed process

focus handling
o  assignKeyboardFocusTo: aConsumer
assign the keyboard focus to me or one of my subviews

o  assignKeyboardFocusToFirstInputField
assign the keyboard focus to the first first keyboardConsumer.
(in older versions, this used to favour inputfields over editFields;
see (or redefine) preferFirstInputFieldWhenAssigningInitialFocus)

** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  assignKeyboardFocusToFirstKeyboardConsumer
assign the keyboard focus to the first first keyboardConsumer.
(in older versions, this used to favour inputfields over editFields;
see (or redefine) preferFirstInputFieldWhenAssigningInitialFocus)

o  canTab
returns true if the widget is tabable

Usage example(s):

^ canTab == true

o  canTab: aBoolean
set widget tabable or not

o  doNotRequestFocusOnPointerEnter
returns true if widget SHOULD NOT request the focus on pointer enter;
if false is returned, the behavior depends upon the settings.

o  doNotRequestFocusOnPointerEnter: aBoolean
if true, setup that the widget SHOULD NOT request the focus on pointer enter;
if false, the behavior depends upon the settings.

o  focusNext
get next focus view to self
Skip invisible, disabled or widgets the extent is to small

o  focusNextChildAfter: aChildView
get the next focus view after aChildView in mySelf or nil,
if there is none.
Skip invisible or disabled widgets

o  focusNextForWhich: aCondition
get next focus view to self
Skip invisible, disabled or widgets the extent is to small

o  focusPrevious
get previous focus view to self
Skip invisible & disabled widgets.

o  focusPreviousChildBefore: aChildView
get the previous focus view before aChildView in mySelf or nil, if there is none.
Skip invisible or disabled widgets

o  requestDoNotFocusOnPointerEnter

** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  requestDoNotFocusOnPointerEnter: aBoolean
very bad naming - wrong english

** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  requestFocus
request focus from my windowGroup;
typically, this is invoked when the mouse pointer enters a
widget. The request may or may not be ignored by the wGroup
(it will be ignored, if an explicit focus-change is currently
active - i.e. if the user tabbed into a widget)

o  requestFocusOnPointerEnter
returns true if widget SHOULD request the focus on pointer enter;
if false is returned, the behavior depends upon the settings.

o  requestFocusOnPointerEnter: aBoolean
if true, setup that the widget SHOULD request the focus on pointer enter;
if false, the behavior depends upon the settings.

o  showFocus: explicit
highlight myself somehow to tell user that I have the focus.
If explicit is true, the focus came via focusStepping (i.e. tabbing);
if false, it came via the window manager (i.e. pointer entering).
Only change my border, if this is an explicit focusChange.

o  showNoFocus: explicit
undo the effect of showFocus.
Explicit tells if the focus came via focusStepping (i.e. tabbing)
or via the window manager (i.e. pointer entering).
Only change my border, if this is an explicit focusChange.

o  subviewsInFocusOrder

o  takeFocus
Unconditionally take the focus from my windowGroup

o  takeFocusWhenMapped

o  takeFocusWhenMapped: aBoolean

o  topViewWasMapped
invoked when my topView is mapped

o  wantsFocusWithButtonPress
views which do not like to take the keyboard focus
with buttonPress can do so by redefining this
to return false
(actually: they should, because it is quite annoying
in the UI, if a menuPanel or button takes my keyboard focus.
So we should consider making the default false here, so every
widget writer has to think twice...
Can we do such a major change?)

o  wantsFocusWithPointerEnter
views which like to take the keyboard focus
when the pointer enters can do so by redefining this
to return true

grabbing
o  forceUngrabKeyboard
force a keyboard ungrab - even if I was not the grabber

o  forceUngrabPointer
force a pointer ungrab - even if I was not the grabber

o  grabKeyboard
grab the keyboard - that is: report all keyboard events to myself,
even if the mouse moved out of myself.
Returns true if the grab was successful (could fail, if some other
application has a grab - but that is very unlikely).

o  grabPointer
grab the pointer - that is: report all motion events relative to
myself, even if moved out of myself.
Returns true if the grab was successful (could fail, if some other
application has a grab - but that is very unlikely).

o  grabPointerWithCursor: aCursorOrNil
grab the pointer - that is: report all motion events relative to
myself, even if moved out of myself.
Show aCursor during the grab, if the cursor argument is not nil.
Returns true if the grab was successful (could fail, if some other
application has a grab - but that is very unlikely).

o  ungrabKeyboard
ungrab the keyboard - but only if I was the grabber

o  ungrabPointer
ungrab the pointer - but only if I was the grabber

informing others of changes
o  contentsChanged
this one is sent, whenever my contents changes its size -
tell dependents about the change (i.e. scrollers).

o  noticeOfWindowClose

o  noticeOfWindowOpen

o  originChanged: delta
this one is sent, after the origin of my contents has changed -
tell dependents (i.e. scrollers) about this

o  originWillChange
this one is sent, just before the viewOrigin changes -
gives subclasses a chance to catch scrolls easily
(for example to hide the cursor before the scroll)

initialization & release
o  defaultControllerClass
Controller

o  defaultExtent
return the default extent of my instances.

o  destroy
unmap & destroy - make me invisible, destroy subviews then
make me unknown to the device

o  initEvents
will be sent by create - can be redefined by subclasses to enable
view events

o  initStyle
this method sets up all style dependent things.
If redefined, make sure that super initStyle is sent

o  initStyleSheet
this method gets the styleSheet

o  initialize
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)

Usage example(s):

fill in some defaults - some of them are usually redefined in subclasses
     initialize methods

o  initializeAndAddTo: aView
add me (uninitialized) as a subview of aView.
If aView is nil, it is left unspecified, in which superview
the new view will be placed. The view can later be assigned
by adding it to the superview via #addSubView:.
If it's later realized and no superview has ever been set,
it will come up as a topview.

o  initializeMiddleButtonMenu
a place to initialize menu - this one is sent once when the view-object is initialized.
usually redefined in subclasses; default here is no menu.
Notice, that static middleButtonmenus are a historic thing in ST/X;
you may prefer to create the menu dynamically.

o  initializeResources

o  prepareForReinit

o  reinitStyle
this method is called for a style change

o  reinitialize
this is called right after snapIn

o  release
remove all dependencies from the receiver

o  restarted
sent by my windowGroup, when restarted from an image.
Nothing done here, but can be redefined to perform any actions
required to reset some state after an image-restart.

Only top views (usually instances of TopView) get this message sent.
Since SimpleViews can act as a top view, too this message is implemented
in SimpleView

o  subViewsHaveBeenReparented

inspecting
o  inspectorExtraAttributes
( an extension from the stx:libtool package )
extra (pseudo instvar) entries to be shown in an inspector.

o  inspectorExtraMenuOperations
( an extension from the stx:libtool package )
extra operation-menu entries to be shown in an inspector.
Answers a collection of pairs containing aString and action aBlock.
aString is the label of the menu item.
aBlock is evaluated when the menu item is selected.

keyboard control
o  defineShortcutAndTranslateLabelStringFrom: aString

o  mnemonicKey
get the mnemonic key or nil if undefined

o  mnemonicKey: aSymbolOrNil
set or clear the mnemonic key

o  mnemonicViewNext: aKeyEvent
a mnemonicKey event as forwarded from the keyboardProcessor - if there
is the mnemonic-key defined for a subView return the view otherwise nil.

o  performShortcutAction
perform my shortcutKey action.

o  processShortcut: aKeyEvent
a shortcutKey event as forwarded from the keyboardProcessor - if there is the
shortcut-key defined process the shortcut and return true otherwise false.

o  shortcutAndTranslatedStringFrom: aString
return an array filled with an extracted shortcut key and a translated string;
looks for and reemoves any ampercent character from aString, and adds underline emphasis to the
following character

Usage example(s):

     Transcript showCR:(self basicNew shortcutAndTranslatedStringFrom:'hello'        ) last
     Transcript showCR:(self basicNew shortcutAndTranslatedStringFrom:'he&llo'       ) last
     Transcript showCR:(self basicNew shortcutAndTranslatedStringFrom:'he&&llo'      ) last
     Transcript showCR:(self basicNew shortcutAndTranslatedStringFrom:'he& llo'      ) last
     Transcript showCR:(self basicNew shortcutAndTranslatedStringFrom:'he&123llo'    ) last
     Transcript showCR:(self basicNew shortcutAndTranslatedStringFrom:'hello &'      ) last
     Transcript showCR:(self basicNew shortcutAndTranslatedStringFrom:'hello &&'     ) last

o  shortcutKey
get the shortcut key

o  shortcutKey: aSymbolOrNil
set or clear the shortcut key

menu & menu actions
o  fontLargerOrSmaller: largerBoolean
sent via the CTRL+/CTRL- or SHIFT-CTRL+ / SHIFT-CTRL- keys.
Make my font larger or smaller (within a reasonable range)

menu handling
o  activateMenu
activate my menu.
This code will move into the controller ASAP
If there is a static middleButtonMenu, that one is taken,
and handled in the superClass (static menus are a historic leftOver).
Otherwise, the following steps are performed:

- ask the receiver for the menu (via #yellowButtonMenu)
- ask the receiver for the menuPerformer.
- startUp the menu - it is supposed to return an actionSelector
- if the menuPerformer responds to the selector,
send it to the performer;
otherwise send it to the view (the receiver)
This is funny, it allows additional menuItems to be added
AND still get the view's copy/cut/paste functionality.
Without this, you had to redefine and forward all of those
messages in the performer.

o  dispatchMenuSelection: menuSelection to: aMenuPerformerOrNil
dispatch a menu message.
This code will move into the controller ASAP

o  menuFromSpec: aMenuOrMenuSpec
create a menu for the receiver from a spec

o  startUpMenu: aMenu

native widget support
o  nativeWindowType
return a symbol describing my native window type - here, nil is returned
(may be used internally by the device as a native window creation hint,
iff native windows are enabled AND the device supports it)

printing & storing
o  displayOn: aGCOrStream
redefined to also give a hint of where I am

private
o  componentsContainingX: x y: y do: aBlock
delegated

o  computeInnerClip
compute, but do not set the inside clip-area, in device coordinates

o  cornerFromRelativeCorner
compute & return pixel corner from relativeCorner

o  cornerFromRelativeCorner: aPoint
compute & return pixel corner from a relativeCorner, aPoint

o  detectViewAt: aPoint
find the subView which contains aPoint - invisible components are ignored.
This is almost the same as #componentContainingX:y: (if that existed)

o  detectViewAt: aPoint ignoreInvisible: ignoreInvisible
find the subView which contains aPoint - invisible components are ignored if
the ignoreInvisible argument is true.
This is almost the same as #componentContainingX:y: (if that existed)

o  explicitExtent: aBoolean
marked as obsolete by cg at 24-Aug-2021

** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  extentFromRelativeExtent
compute & return pixel extent from relativeExtent

o  extentFromRelativeExtent: aPoint
compute & return the pixel extent from relativeExtent, aPoint

o  hasExplicitExtent: aBoolean
set the has explicit extent flag to aBoolean.
If set, this prevents the extent from being changed automatically

o  originFromRelativeOrigin
compute & return pixel origin from relativeOrigin

o  originFromRelativeOrigin: aPoint
compute & return pixel origin from relativeOrigin, aPoint

o  pixelCorner: corner
set the view's corner in pixels

o  pixelExtent: extent
set the view's extent in pixels

o  pixelOrigin
return the view's origin in pixels. For subviews. the origin is relative
to the superview's top-left. For topViews, it's the screen origin.

o  pixelOrigin: origin
set the view's origin in pixels. For subviews. the origin is relative
to the superview's top-left. For topViews, it's the screen origin.

o  pixelOrigin: origin corner: corner
set the view's origin and corner in pixels

o  pixelOrigin: origin extent: extent
set the view's origin and extent in pixels

o  pointFromRelative: p
compute absolute coordinate from p

o  setBorderColor
set my borderColor in the physical view (if supported by the device)

o  setInnerClip
compute, and set the inside clip-area

o  setShown: aBoolean
Modified (format): / 04-02-2017 / 21:34:42 / cg

o  setViewShape

o  windowGroupClass

queries
o  anyComponentHasFocus
return true, if the receiver or any of my components has the keyboard focus
(either via the focusView mechanism in the windowGroup,
or via delegation)

o  canHandle: aKey
return true, if I like to handle the key (from a keyPress event).
OBSOLETE: do not use & depend on this method, it is a historic
leftOver and will be removed. Use the delegation mechanism for this.

o  canHandle: aKey from: aView
return true, if I like to handle the key (from a keyPress event)
in aView.
OBSOLETE: do not use & depend on this method, it is a historic
leftOver and will be removed. Use the delegation mechanism for this.

o  cornerChangedFlag
^ cornerChangedFlag == true

o  cornerChangedFlag: aBoolean
cornerChangedFlag := aBoolean

o  delegatesTo: someone
return true, if I delegate events to someone

o  escapeIsCancel
return the escapeIsCancel setting - defaults to true for popupViews here.

o  extentChangedBeforeCreatedFlag

o  extentChangedBeforeCreatedFlag: aBoolean

o  extentChangedFlag
^ extentChangedFlag == true

o  extentChangedFlag: aBoolean
extentChangedFlag := aBoolean

o  hasExplicitFocus
return true, if the receiver has the keyboard focus
via the focusView mechanism in the windowGroup

o  hasFocus
return true, if the receiver has the keyboard focus
(either via the focusView mechanism in the windowGroup,
or via delegation)

o  is3D
marked as obsolete by Stefan Vogel at 5-Okt-2023

** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  isActive
true, if I have the focus (w.r.t the windowing system);
i.e. if one of my subViews actually has the real focus.
With click-to-focus behavior, this is obviously the current application.
Use this query with caution, for example, to suppress tooltips for inactive apps.

o  isBorderedWrapper

o  isComponentOf: aViewOrComponent
return true, if I am a (direct or indirect) component of aViewOrComponent

o  isCursorKeyConsumer
return true, if the receiver can be controlled by cursor keys;
i.e. it can handle some keyboard input,
isCursorKeyConsumer are potential candidates for getting the keyboard
focus initially within dialogBoxes, or when the focus-follows-pointer
mode is off.
Return false here, this is redefined in SelectionInListView.

o  isICCCWindowGroupWindow
needed for checkForEndOfDispatch

o  isReadOnly
stupid default - there are queries for this in keyboardProcessor

o  isSameOrComponentOf: aView
return true, if I am aView or a (direct or indirect) component of aView

o  isSubViewOf: aView
return true, if I am a (direct or indirect) subview of aView

** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  mainWindow
for compatibility with applicationModels ... return the receiver's topView

o  originChangedFlag
^ originChangedFlag == true

o  originChangedFlag: aBoolean
originChangedFlag := aBoolean

o  originChangedFlag: originChanged extentChangedFlag: extentChanged

o  originChangedFlag: originChanged extentChangedFlag: extentChanged cornerChangedFlag: cornerChanged

o  originOrExtentChanged
^ originChanged or:[extentChanged].

o  originOrExtentOrCornerChanged
^ originChanged or:[extentChanged or:[cornerChanged]].

o  reallyRealized
return true, if the receiver is realized and all containers are realized.
Realized means that it has been mapped (i.e. made visible) on
the display (as opposed to being only created and possibly invisible)

o  resources
return the view's resources -
that's a ResourcePack containing national language strings

o  startWindowMoveOnButtonPress
if another view is used as topView

o  tabRequiresControl
returns true, if a focus tabbing requires a control-key to be pressed.
The default is true for editTextView, false for other widgets,
to allow for easier text entry

o  window
for compatibility with applicationModels...
return the receiver

o  windowSensor
for compatibility with applicationModels...

queries-contents
o  heightOfContents
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  widthOfContents
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.

queries-events
o  buttonMotionEventPending
return true, if a button motion event is pending.
Normally, you don't want to use this, since no polling is needed
(not even for mouse-tracking).
Actually, its a historical leftover

queries-internal
o  specClass
fallback - heuristics to get a specClass for some viewClass.
Based upon my className, look for a corresponding Spec-class.
If there is none, return ArbiraryComponentSpec as a fallBack

Usage example(s):

     FramedBox new specClass

o  windowStyle
return a symbol describing my style (one of: #dialog, #popUp or #normal)

o  windowType
return a symbol describing my type (one of: #mdichild or nil)

realization
o  activate
noop for protocol compatibility with TopViews (in case you do a Button new open)

o  basicUnmap
unmap the view, independent of its mapped state.
The view stays created (but invisible),
and can be remapped again later.
This can be called even if a map operation is underway,
and the view is not yet mapped in the Display

o  closeCancel
for protocol compatibility with modal dialogs

o  create
create (i.e. tell my device about me) if not already created.
This does not make the view visible (needs a #map for that)

Usage example(s):

	 make certain that superview is created also

Usage example(s):

this view was created (and therefore, no sizeChangeEvent

Usage example(s):

	 this is the first create,
	 force sizechange messages to be sent to the view

o  createWithAllSubViews
create, then create all subviews

o  fetchDeviceResources
fetch all device specific resources. This is invoked,
when the view is made visible on some device for the very first
time, to allocate device specific colors, fonts, bitmaps etc.
The view may keep those in instance variables, to avoid reallocating
those with every redraw.
If you omit to do this, the views will still be able to display themself,
but possibly slower, since resources are reallocated over and over.
If you redefine this method, make certain that 'super fetchDeviceResources'
is always sent.

o  fixSize
This is called right before the view is made visible.
Adjust the size of the view according to either relative/abs or
block extent; also set origin. Also, subclasses may redefine this
method to adjust the size based on some extent (for example, PopUpMenus
do so to take care of changed number of menu entries).

o  forceResize
force resizing - even if already done

o  hide
only useful with modal views: hide the view and return control
back to the suspended main view. Ignored for non-modal views.

Usage example(s):

	 this is a kludge for IRIS and others which do not provide backingstore:
	 when we hide a modalbox (such as a searchbox) which covered
	 a scrollbar, the scrollbar's bitblt-method will copy from the
	 not-yet redrawn area - effectively clearing the scroller.
	 We need a short delay here, since at this time, the expose event has
	 not yet arrived.

o  hideForAction
for popUpMenu compatibility;
this is invoked to hide a when it is going to perform its action
(in contrast to the generic hide).

o  hideRequest
for protocol compatibility with modal dialogs;
ignored here.

o  map
make the view visible on the screen.
For topViews, the windowManager will choose (or ask for) the
views position on the screen.
Notice:
Actually, this method is only valid for topViews;
however, it is defined here to allow things like 'Button new realize'

o  mapAt: aPoint
make the view visible on the screen.
For topViews, if aPoint is nonNil, the view's origin is located there
(unless you have a dictator as windowManager ;-)
Notice:
Actually, this method is only valid for topViews;
however, it is defined here to allow things like 'Button new realize'

o  mapAt: aPoint iconified: iconified
make the view visible on the screen.
For topViews, if aPoint is nonNil, the view's origin is located there
(unless you have a dictator as windowManager ;-).
If the iconified argument is true, the window is created as icon initially.
Notice:
Actually, this method is only valid for topViews;
however, it is defined here to allow things like 'Button new realize'

o  mapIconified
make the view visible on the screen.
For topViews, the view is created in iconified state

o  physicalCreate
common code for create & recreate:
physically create (but do not map) the view on the device.

o  postRealize
invoked after a view was realized.
Can be redefined in subclasses to perform delayed actions.

o  preRealize
invoked right before a view is realized.
Can be redefined in subclasses to perform delayed actions.

o  realize
realize - make visible;
realizing is done very late (after layout is fixed) to avoid
visible rearranging of windows on the screen

Usage example(s):

in case a view gets rerealized

o  realizeAllSubViews
realize all my subviews - but not myself.

o  realizeAt: aPoint
realize - make visible;
realizing is done very late (after layout is fixed) to avoid
visible rearranging of windows on the screen

o  realizeInGroup
special realize - leave windowgroup as is;
This allows a view to be realized in any windowgroup;
for special applications, like the kill button in the Filebrowser which has
a windowGroup different from its superview's and is handled as a separate process.

o  realizeKeepingGroup: keepGroupAsIs at: position iconified: iconified
common helper for realize and realizeInGroup.
Create the view; if the keepGroupAsIs argument is not true,
assign my windowGroup.

o  recreate
recreate (i.e. tell X about me) after a snapin or a migration

o  recursiveRealizeAllSubViews
realize all my subviews and all of their subviews - but not myself.

o  remap
make the view visible on the screen at its previous position.
In contrast to map, this asks the windowManager to show the view
immediately (instead of asking for a frame).
However, some windowManagers are known to ignore this ...

o  remap: id atX: x y: y
separat to allow redefinition in StandardSystemView

o  rerealize
rerealize at old position in (a possibly different) windowGroup.

o  rerealizeInGroup: aWindowGroup
rerealize at old position in (a possibly different) windowGroup.

o  rerealizeWithAllSubViews
rerealize myself with all subviews

o  resize
resize myself to make everything fit into me.
Here, nothing special is done (except for setting my extent to the
preferredExtent), but may be redefined in some subclasses.

o  setForegroundWindow
noop for protocol compatibility with TopViews (in case you do a Button new open)

o  unmap
unmap the view - the view stays created (but invisible),
and can be remapped again later.

Usage example(s):

unmap is an asynchronous operation.

Usage example(s):

(shown is cleared also in unmapped event)

Usage example(s):

     |top sub|

     top := StandardSystemView new.
     top extent:200@200.

     sub := View
                origin:0.2@0.2
                corner:0.8@0.8
                in:top.

     sub viewBackground:Color red.
     sub hiddenOnRealize:true.

     top open.
     (Delay forSeconds:5) wait.
     sub map.
     (Delay forSeconds:3) wait.
     sub unmap.
     sub viewBackground:(Color green).
     (Delay forSeconds:3) wait.
     sub map.

o  unrealize
alias for unmap, for historic reasons

** This is an obsolete interface - do not use it (it may vanish in future versions) **

redrawing
o  clearExposedAreaInRedraw
return true here, if the exposed area should be cleared here
or not. In almost every situation, it makes sense to do so...

o  flash
flash the view - fill it black, then white, finally
redraw completely.
Can be used to wakeup the user :-)
when problem or warning conditions arise.
Someone may redefine this to flash its contents (instead of black/white).

Usage example(s):

     |v|

     v := View new openAndWaitUntilVisible.
     Delay waitForSeconds:2.
     v flash.
     Delay waitForSeconds:2.
     v destroy

o  flash: messageOrNil
flash the view - fill it black, then white, finally
redraw completely.
Can be used to wakeup the user :-)
when problem or warning conditions arise.
Someone may redefine this to flash its contents (instead of black/white).

Usage example(s):

     |v|

     v := View new openAndWaitUntilVisible.
     Delay waitForSeconds:2.
     v flash:'Hello World'.
     Delay waitForSeconds:2.
     v destroy

o  flash: messageOrNil withColor: flashColor
flash the view - fill it flashColor, then white,
finally redraw completely.
Can be used to wakeup the user :-)
when problem or warning conditions arise.
Someone may redefine this to flash its contents (instead of black/white).

Usage example(s):

     |v|

     v := View new openAndWaitUntilVisible.
     Delay waitForSeconds:2.
     5 timesRepeat:[ v flash:'Hello World' withColor:Color red. Delay waitForSeconds:0.5].
     Delay waitForSeconds:2.
     v destroy

o  flashReadOnly
flash the view and show 'Read Only' for a moment.

o  flashRectangle: rect
flash part of the view - fill it black, then white, finally redraw.
Can be used to bring attention to some line/part of view

Usage example(s):

     |v|

     v := View new openAndWaitUntilVisible.
     Delay waitForSeconds:2.
     v flashRectangle:(10@10 corner:50@50).
     Delay waitForSeconds:2.
     v destroy

o  flashRectangle: rect withColor: flashColor
flash part of the view - fill it flashColor, then white,
finally redraw.
Can be used to bring attention to some line/part of view

Usage example(s):

     |v|

     v := View new openAndWaitUntilVisible.
     Delay waitForSeconds:2.
     v flashRectangle:(10@10 corner:50@50) withColor:Color red.
     Delay waitForSeconds:2.
     v destroy

o  invalidate
add a damage to redraw the receiver to its input event queue.
This is preferable to calling redraw directly, in that the drawing is done by
the view's process itself, and there is a possibilty to merge
multiple damage rectangles into single redraws.
However, be aware, that the redrawing may be delayed for some time,
until the receiver's windowGroupProcess gets rescheduled.

o  invalidate: aRectangle
add a damage to redraw part of the receiver, to its input event queue.
This is preferable to calling redraw directly,
in that the drawing is done by the view's process itself,
and there is a possibilty to merge multiple damage rectangles into
single redraws.
However, be aware, that the redrawing may be delayed for some time,
intil the receiver's windowGroupProcess gets rescheduled.

o  invalidate: aRectangle repairNow: doRepairNow
add a damage to redraw part of the receiver, to its input event queue.
and (if repairNow is true), force the receiver to repair all of its
damaged areas right now.
The given rectangle is in logical coordinate space.

o  invalidateDeviceRectangle: aRectangle repairNow: doRepairNow
add a damage to redraw part of the receiver, to its input event queue.
and (if repairNow is true), force the receiver to repair all of its
damaged areas right now.
The given rectangle is in device coordinate space.

o  invalidateRepairNow: doRepair
add a damage to redraw all of the receiver, to its input event queue.
and (if repairNow is true), force the receiver to repair all of its
damaged areas right now.

o  invalidateX: x y: y width: w height: h
add a damage to redraw all of the receiver, to its input event queue.

o  invalidateX: x y: y width: w height: h repairNow: doRepair
add a damage to redraw all of the receiver, to its input event queue.
and (if repairNow is true), force the receiver to repair all of its
damaged areas right now.

o  redraw
redraw myself completely - this is sent by redrawX:y:width:height:
as a fallback.
Cannot do much here - is redefined in subclasses which don't care for
updating regions but instead update everything.

o  redraw: aRectangle
redraw a part of the view immediately.

o  redrawComponentsIn: aRectangle
Modified (format): / 25-10-2023 / 17:58:24 / Stefan Vogel

o  redrawDeviceX: x y: y width: w height: h
have to redraw part of the view.
The coordinates are in device space - if there is a transformation,
must inverse-transform back to logical coordinates. (since the view thinks
in its coordinate space)

o  redrawX: x y: y width: w height: h
redraw part of myself immediately, given logical coordinates
(if transformation is nonNil)
The default here is to redraw everything
- subclasses usually redefine this, adding more intelligence

o  renderOrRedraw
experimental feature

o  repairDamage
force the receiver to repair all of its
damaged areas right now.

o  showActive
redraw myself as active (i.e. busy).
Nothing done here, but redefined in some classes.

o  showPassive
redraw myself as inactive (i.e. nonbusy).
Nothing done here, but redefined in some classes.

scrolling
o  halfPageDown
scroll down half a page

o  halfPageUp
scroll up half a page

o  horizontalScrollStep
return the amount to scroll when stepping left/right.
Subclasses may want to redefine this.

o  mouseWheelScrollDown: units

o  mouseWheelScrollLeft: units

o  mouseWheelScrollRight: units

o  mouseWheelScrollUp: units

o  pageDown

o  pageLeft

o  pageRight

o  pageUp

o  scrollDown
scroll down by some amount; this is called when the scrollbars
scroll-step down button is pressed.

o  scrollDown: nPixels
change origin to scroll down some pixels

o  scrollHorizontalTo: aPixelOffset
change origin to make aPixelOffset be the left col

o  scrollHorizontalToPercent: percent
scroll to a position given in percent of total

o  scrollLeft
scroll left by some amount; this is called when the scrollbars
scroll-step left button is pressed.

o  scrollLeft: nPixels
change origin to scroll left some pixels

o  scrollRelative: nPixels
change origin to scroll up (nPixels < 0) or down (nPixels > 0)

o  scrollRight
scroll right by some amount; this is called when the scrollbars
scroll-step right button is pressed.

o  scrollRight: nPixels
change origin to scroll right some pixels

o  scrollTo: newOrigin
change origin to have newOrigin be visible at the top-left.
The argument defines the integer device coordinates of the new top-left
point.

o  scrollTo: newOrigin redraw: doRedraw
change origin to have newOrigin be visible at the top-left.
The argument defines the integer device coordinates of the new top-left
point.
If doRedraw is true, and any new areas are exposed, these are invalidated
(i.e. there may be pending redraw events in the event queue).

o  scrollTo: newOrigin waitForDrawingFinished: doWait
change origin to have newOrigin be visible at the top-left.
The argument defines the integer device coordinates of the new top-left
point.
If any new areas are exposed, invalidate them.
If doWait is true, wait until all draws are completed,
otherwise, possible redraws may still be in the event queue.

o  scrollToBottom
scroll to the left
and last shown viewfull of my contents

o  scrollToLeft
move viewOrigin to the left

o  scrollToPercent: originAsPercent
scroll to a position given in percent of total (x and y as a Point)

o  scrollToRight
move viewOrigin to the right

o  scrollToTop
move viewOrigin to top

o  scrollToTopLeft
move viewOrigin to top/left

o  scrollUp
scroll up by some amount; this is called when the scrollbars
scroll-step up button is pressed.

o  scrollUp: nPixels
change origin to scroll up (towards the origin) by some pixels

o  scrollVerticalTo: aPixelOffset
change origin to make aPixelOffset be the top line

o  scrollVerticalToBottom
scroll to the last shown viewfull of my contents,
keeping the horizontal scroll position

o  scrollVerticalToPercent: percent
scroll to a position given in percent of total

o  verticalScrollStep
return the amount to scroll when stepping up/down (also used for mouseWheel).
Subclasses may want to redefine this.

o  widthForScrollBetween: yStart and: yEnd
return the width in pixels for a scroll between yStart and yEnd
- return full width here since we do not know how wide contents is.
Views which only use part of their space (short lists, text) may redefine
this method and return the number of pixels that have to be scrolled.
On slow displays, this may make a difference; on fast ones you will probably
not notice any difference.

scrolling-basic
o  scrollTo: newOrigin redraw: doRedraw allowScrollBeyondContents: allowScrollBeyondContents
change origin to have newOrigin be visible at the top-left.
The argument defines the integer device coordinates of the new top-left
point.
If doRedraw is true, and any new areas are exposed, these are invalidated
(i.e. there may be pending redraw events in the event queue).

startup
o  open
open up the view - for normal views, this is a modeless open
(i.e. the new view comes up as independent process).
Although #open is only to be sent to topviews (i.e. it could have been
implemented in TopView), it is implemented here - therefore, every view
can be opened as a topView.
This is redefined in ModalBox, which comes up modal (i.e.
control is under the current process, so that interaction with the
current group is blocked while the modalBox is active).

Notice: after the open, you cannot be sure that the view is really open and
visible, since #open forks a new process, which does the actual window opening.
To ensure visibility, use #openAndWaitUntilVisible or #waitUntilVisible after the open.

Usage example(s):

     View new open

Usage example(s):

     (Button label:'hello') open

Usage example(s):

     |top|
     top := StandardSystemView new.
     top extent:200@200.
     Button label:'hello' in:top.
     top open

Usage example(s):

     YesNoBox new open

o  openAndWait
open up the view - wait until it is visible.
In normal applications, you do not need to wait till the view is
open - it should do all of its drawing itself when it gets the
first expose event.
However, if you want to 'manually' draw into the view from 'outside'
(for example, in doIt expressions),
the view must be visible (realized) before doing so.
Use this in those situations, to ensure that the view is visible when drawing.

** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  openAndWaitUntilVisible
open up the view - wait until it is visible.
In normal applications, you do not need to wait till the view is
open - it should do all of its drawing itself when it gets the
first expose event.
However, if you want to 'manually' draw into the view from 'outside'
(for example, in doIt expressions),
the view must be visible (realized) before doing so.
Use this in those situations, to ensure that the view is visible when drawing.

o  openAt: aPoint
open up the view modeless - positions the view

Usage example(s):

     (Button label:'hello') open

     (Button label:'hello') openAt:(100@100)

o  openAtCenter
open up the view modeless - positions the view

Usage example(s):

     (Button label:'hello') open

     (Button label:'hello') openAtCenter

o  openAutonomous
create and schedule a new windowgroup for me and open the view.
The view will be handled by its own process, effectively running in
parallel.
Notice:
This entry is for NON-topviews, which want to be served
autonomous from their real topview.
(see the fileBrowser's kill-button
when executing unix commands as an example)

o  openInGroup: aGroup
special open within another windowGroup.
This allows a view to be realized in any windowgroup;
for applications where multiple views act as a group
(i.e. close and iconify together).

o  openModal
create a new windowgroup, but start processing in the current process,
actually suspending event processing for the currently active group.
Stay in the modalLoop while the view is visible.
(i.e. control is returned to the sender when the receiver is closed)

Usage example(s):

     the same:
	 YesNoBox new open

	 YesNoBox new openModal

     different:
	 (Button label:'hello') open

	 (Button label:'hello') openModal

o  openModal: stayInEventLoopCheckBlock
create a new windowgroup, but start processing in the current process -
actually suspending event processing for the currently active group.
Stay in this modal loop while aBlock evaluates to true AND the receiver is visible.
(i.e. control is returned to the sender when the receiver is closed)
This makes any interaction with the current window impossible -
however, other views (in other windowgroups) still work.

o  openModal: stayInEventLoopCheckBlock inGroup: activeWindowGroup
create a new windowgroup, but start processing in the current process,
actually suspending event processing for the main group.
Stay in this modal loop while aBlock evaluates to true AND the receiver is
visible.
(i.e. control is returned to the sender when the receiver is closed)
This makes any interaction with the current window impossible -
however, other views (in other windowgroups) still work.

o  openModal: stayInEventLoopCheckBlock inGroup: activeWindowGroup asPopup: asPopup
create a new windowgroup, but start processing in the current process,
actually suspending event processing for the main group.
Stay in this modal loop while aBlock evaluates to true AND the receiver is
visible.
(i.e. control is returned to the sender when the receiver is closed)
This makes any interaction with the current window impossible -
however, other views (in other windowgroups) still work.

o  openModalAt: aPoint
open up the view modeless - positions the view
(i.e. circumvents window managers positioning)

Usage example(s):

     View new openModalAt:100@100

o  openModalAtCenter
open up the view modeless - positions the view
(i.e. circumvents window managers positioning)

Usage example(s):

     View new openModalAtCenter

o  openModalAtPointer
View new openModalAtPointer

o  openModeless
create and schedule a new windowgroup for me and open the view.
The view will be handled by its own process, effectively running in
parallel (i.e. control is returned to the sender immediately).

Usage example(s):

     the same:
	 (Button label:'hello') open

	 (Button label:'hello') openModeless

     different:
	 YesNoBox new open

	 YesNoBox new openModeless

o  openModelessAt: aPoint
open up the view modeless - positions the view
(i.e. tries to circumvent the window managers positioning)
Notice: some windowManagers seem to ignore this and always
ask the user to position the view.

Usage example(s):

     View new openModeless

     View new openModelessAt:100@100

o  openModelessAt: aPoint iconified: iconified
open up the view modeless - positions the view
(i.e. tries to circumvent the window manager's positioning)
Notice: some windowManagers seem to ignore this and always
ask the user to position the view.

Usage example(s):

     StandardSystemView new openModeless

     StandardSystemView new openModelessAt:100@100

     StandardSystemView new openModelessAt:100@100 iconified:true

o  openModelessAtCenter
open up the view modeless - positions the view
(i.e. circumvents window managers positioning)

Usage example(s):

     View new openModeless

     View new openModelessAtCenter

o  openModelessAtPointer
create and schedule a new windowgroup for me and open the view.
The view will be handled by its own process, effectively running in
parallel (i.e. control is returned to the sender immediately).

Usage example(s):

     (Button label:'hello') openModelessAtPointer

o  waitUntilVisible
wait until the receiver is visible.
In normal applications, you do not need to wait till a view is
open - it should do all of its drawing itself when it gets the
first expose event.
However, if you want to 'manually' draw into the view (for example,
in doIt expressions), or subsequent views depend on some state of
another view (which is only available once visible),
use this to suspend the current process until the receiver is shown.
Caveat:
we poll here for the view to be shown - we need a semaphore
which is raised by the view in order to do it right.

Usage example(s):

Example where this is useful:
     The following does not work, because the view is in its opening phase,
     when we attempt to draw a line.
     This either gives an error or will be drawn into the void, since
     its internals are not yet correctly setup
     (the view has its own async process, which gets forked with the open):

	|v|

	v := View new open.
	v displayLineFrom:0@0 to:50@50

     the following does work (since we wait until the view has completely finished its startup phase):

	|v|

	v := View new open.
	v waitUntilVisible.
	v displayLineFrom:0@0 to:50@50

     or, a combined open and waitUntilVisible:

	|v|

	v := View new openAndWaitUntilVisible.
	v displayLineFrom:0@0 to:50@50.

o  waitUntilVisibleWithTimeoutMS: timeoutMS
wait until the receiver is visible,but not longer than timeoutMS.
In normal applications, you do not need to wait till a view is
open - it should do all of its drawing itself when it gets the
first expose event.
However, if you want to 'manually' draw into the view (for example,
in doIt expressions), or subsequent views depend on some state of
another view (which is only available once visible),
use this to suspend the current process until the receiver is shown.
Returns true if the view is shown, false if it is not (after a timeout).
With a timeoutMS of zero, this will result in a single poll;
with a nil timeoutMS,it will wait forever.

Caveat:
we poll here for the view to be shown - we need a semaphore
which is raised by the view in order to do it right.

testing
o  hasOwnScrollbars
a hack for codeView2, which behaves like a TextView, but has its own
scrollbars embedded - sigh (an extra load one).
This allows for the UIBuilder to avoid creating an extra set around such
a view (as is the case with TextSpec with scrollbars when using CodeView2)

o  isApplicationSubView

o  isCodeView2
( an extension from the stx:libtool package )
codeview2 seems to require some extra hacks

o  isComboView
true if I am a comboBox-like widget

o  isDefault
return true, if I am a default widget;
Used with autoAccept. Currently only default buttons are supposed to return
true here

o  isDialogBox

o  isExternalTopView
return true, if this is an external topView - always false here

o  isInfoOrWarningBox

o  isInputField
return true, if the receiver is some kind of input view,
i.e. it should (can) be part of an enterGroup.
Return false here, this is redefined in EnterField.

o  isJavaView

o  isKeyboardConsumer
return true, if the receiver is a keyboard consumer;
i.e. it can handle (non-shortkey) keyboard input,
keyboardConsumer are potential candidates for getting the keyboard
focus initially within dialogBoxes, or when the focus-follows-pointer
mode is off.
Return false here, this is redefined in EditTextView and EditField.

o  isLabel

o  isLayoutWrapper
answer true, if this view defines the layout of it's subviews

o  isMDIClientView

o  isModal
return true, if the receiver has been opened modal.
For compatibility with topView (if regular views are the window of an application),
return false here.

o  isPopUpList

o  isTextLabel
return true, if the receiver is a text label.
Return false here, this is redefined in Label.

o  isTextView
Returns true, if the view displays text

o  isTransparentBox

o  isWarningBox

o  isWrapper

user interaction & notifications
o  openHTMLDocument: anHTMLFilename
open a HTMLDocumentView on anHTMLFilename

o  showInfoInApplication: message
iff my application responds to showInfo:,
then send a message to it

o  showNotFound
something was not found - tell user by beeping and changing
cursor for a while (sometimes I work with a headset :-)
(used to be: tell user by changing cursor for a while).
Beep can be disabled via the settings

o  warn: aString
like Objects warn, but translates the string via the
resourcePack, thus giving a translated string automatically

o  warn: aString with: argument
like Objects warn, but translates the string via the
resourcePack, thus giving a translated string automatically

o  warn: aString with: arg1 with: arg2
like Objects warn, but translates the string via the
resourcePack, thus giving a translated string automatically

o  warn: aString with: arg1 with: arg2 with: arg3
like Objects warn, but translates the string via the
resourcePack, thus giving a translated string automatically


Private classes:

    AboutToOpenBoxNotificationSignal
    ArbitraryViewShape
    BoxClosedNotificationSignal
    CloseBoxRequestSignal
    RoundViewShape
    ViewShape

Examples:


(all examples below use different viewBackgrounds, to make the individual subviews visible) a subView in a topView:
    |top v|

    top := StandardSystemView new.
    v := View new.
    v origin:0.25 @ 0.25 corner:0.75 @ 0.75.
    top addSubView:v.
    top open
the same, a bit more compact:
    |top v|

    top := StandardSystemView new.
    v := View origin:0.25 @ 0.25 corner:0.75 @ 0.75 in:top.
    top open
fixed position/size:
   |top v1 v2|

   top := StandardSystemView new.
   top extent:300@300.

   v1 := View origin:10@10
              corner:50@50
                  in:top.
   v2 := View origin:60@10
              corner:150@100
                  in:top.

   v1 viewBackground:(Color red).
   v2 viewBackground:(Color yellow).

   top open
same, using ST-80 way of bulding up view hierarchies (recommended, if you plan to port applications later)
   |top v1 v2|

   top := StandardSystemView new.
   top extent:300@300.

   v1 := View new.
   v1 origin:10@10 corner:50@50.

   v2 := View new.
   v2 origin:60@10 corner:150@100.

   v1 viewBackground:(Color red).
   v2 viewBackground:(Color yellow).

   top add:v1.
   top add:v2.

   v1 viewBackground:(Color red).
   v2 viewBackground:(Color yellow).

   top open
fixed origin, variable size:
   |top v1 v2|

   top := StandardSystemView new.
   top extent:300@300.

   v1 := View new.
   v1 origin:10@10 corner:50@0.5.

   v2 := View new.
   v2 origin:60@10 corner:150@0.5.

   v1 viewBackground:(Color red).
   v2 viewBackground:(Color yellow).

   top add:v1.
   top add:v2.

   top open
fixed origin, variable size, bottomInset for constant distance from bottom:
   |top v1 v2|

   top := StandardSystemView new.
   top extent:300@300.

   v1 := View new.
   v1 origin:10@10 corner:50@1.0.
   v1 bottomInset:10.

   v2 := View new.
   v2 origin:60@10 corner:150@1.0.
   v2 bottomInset:10.

   v1 viewBackground:(Color red).
   v2 viewBackground:(Color yellow).

   top add:v1.
   top add:v2.

   top open
variable origin, variable size,
   |top v1 v2|

   top := StandardSystemView new.
   top extent:300@300.

   v1 := View new.
   v1 origin:0.0@0.0 corner:0.5@0.5.

   v2 := View new.
   v2 origin:0.5@0.0 corner:1.0@0.5.

   v1 viewBackground:(Color red).
   v2 viewBackground:(Color yellow).

   top add:v1.
   top add:v2.

   top open
variable origin, variable size, insets for some constant distance
   |top v1 v2|

   top := StandardSystemView new.
   top extent:300@300.

   v1 := View new.
   v1 origin:0.0@0.0 corner:0.5@0.5.
   v1 rightInset:5.

   v2 := View new.
   v2 origin:0.5@0.0 corner:1.0@0.5.
   v2 leftInset:5.

   v1 viewBackground:(Color red).
   v2 viewBackground:(Color yellow).

   top add:v1.
   top add:v2.

   top open
using layout objects (ST-80 style): fully specifying the frame
   |top v1 v2|

   top := StandardSystemView new.
   top extent:300@300.

   v1 := View new.
   v2 := View new.

   v1 viewBackground:(Color red).
   v2 viewBackground:(Color yellow).

   top add:v1 in:(LayoutFrame new
                    leftFraction:0.25;
                    rightFraction:0.75;
                    topFraction:0.0;
                    bottomFraction:0.5).
   top add:v2 in:(LayoutFrame new
                    leftFraction:0.5;
                    rightFraction:1.0;
                    topFraction:0.5;
                    bottomFraction:0.75).

   top open
another one, with offsets:
   |top v1 v2|

   top := StandardSystemView new.
   top extent:300@300.

   v1 := View new.
   v2 := View new.

   v1 viewBackground:(Color red).
   v2 viewBackground:(Color yellow).

   top add:v1 in:(LayoutFrame new
                    leftFraction:0.0 offset:10;
                    rightFraction:1.0 offset:-10;
                    topFraction:0.0 offset:10;
                    bottomFraction:0.5).
   top add:v2 in:(LayoutFrame new
                    leftFraction:0.0 offset:30;
                    rightFraction:1.0 offset:-30;
                    topFraction:0.5 offset:10;
                    bottomFraction:0.75).

   top open
specifying origin only. Extent is views preferred (notice, that plain views have some defaultExtent of 100@100)
   |top v1 v2|

   top := StandardSystemView new.
   top extent:300@300.

   v1 := View new.
   v2 := View new.

   v1 viewBackground:(Color red).
   v2 viewBackground:(Color yellow).

   top add:v1 in:(LayoutOrigin new
                    leftFraction:0.25;
                    topFraction:0.0).
   top add:v2 in:(LayoutOrigin new
                    leftFraction:0.5;
                    topFraction:0.5).

   top open
same example, using buttons which compute their preferredBounds:
   |top v1 v2|

   top := StandardSystemView new.
   top extent:300@300.

   v1 := Button label:'foo'.
   v2 := Button label:'a very long buttonLabel'.

   v1 backgroundColor:(Color red).
   v2 backgroundColor:(Color yellow).

   top add:v1 in:(LayoutOrigin new
                    leftFraction:0.25;
                    topFraction:0.0).
   top add:v2 in:(LayoutOrigin new
                    leftFraction:0.5;
                    topFraction:0.5).

   top open
border:
   |top v1 v2|

   top := StandardSystemView new.
   top extent:300@300.

   v1 := View new.
   top add:v1 in:(10@10 corner: 30@30).
   v2 := View new.
   top add:v2 in:(30@30 corner: 50@50).

   v1 border:(SimpleBorder width:1 color:Color red).
   v2 border:(SimpleBorder width:1 color:Color blue).
   top open
individual coordinates:
   |top v1 v2|

   top := StandardSystemView new.
   top extent:300@300.

   v1 := View new.
   v1 viewBackground:(Color red).
   v1 origin:(10@10).
   v1 corner:(30@30).
   top add:v1.

   v2 := View new.
   v2 viewBackground:(Color blue).
   v2 origin:(30@30).
   v2 corner:(50@50).
   top add:v2.

   top openAndWaitUntilVisible.
   5 timesRepeat:[
    Delay waitForSeconds:2.
    v2 bottom:100.
    Delay waitForSeconds:2.
    v2 bottom:50.
   ]


ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Mon, 18 Nov 2024 04:47:44 GMT