Home
Up
Intro
Contents
Chapter
1
2
3
4
5
6
7
8
9
10
Design
Assert
Timing
EBNF
Report
Pas
Last Changed: July 12th, 1997
This is a conversion from Oberon text to HTML, and from German to English. The converter software is still under development,
and some features or information may be missing in this converted version.
HTML hypertext facilities are not yet active in this document.
To exploit the interactive facilities, use Oberon System 3 and the source of this text,
available for download using binary ftp as Oberon System 3 archive.
The converter from German to English is still under development as well.
A previous version is also available for Oberon V4.
To access this and other additional material use
ftp.
For the convenience of our students, most of this information and the related material is available
in German as well.
Introduction to Oberon
The Oberon Programming Language
02: Frames and Tracks
This chapter introduces the Oberon user interface elements. We already have
met the "activate" action. Besides this, there are two more basic actions,
position and select. Again the implementation details depend on the system
you are using. These are the keys to keep in mind:
(Macintosh) Note:
Position =>
mouse button
Activate =>
ctrl key
Select =>
option/alt key
(X Windows etc.) Note:
Position =>
left mouse button
Activate
=> middle mouse button
Select
=> right mouse button
For other systems and various mouse configurations you find corresponding
information in the introduction which comes with your Oberon system.
If you use "position" in the text contents, an insertion mark is shown
at the selected position. If you enter additional text, using the keyboard
for example, it will be inserted at this position.
"Select" is used in texts to mark a text sequence for further processing.
Select comes in two variants: you move the cursor to a certain position before
pressing "select" (this variant is often used to select graphical elements).
Or you drag the cursor from one position to a different one: move the mouse
pointer to a position, press "select" and move the cursor to a different
position while select is kept pressed.
Oberon has a special window system. Each window (viewer)
can have several frames. The scroll bar which we already have met is but
a special frame. Another frame may show the proper contents of the window,
a text for example. Usually a window has an additional frame, called the
menu frame (for example a narrow frame at the upper end of the window, shown
in inverted colors or with grey or colored background).
Oberon divides the screen into tracks. On the right
side, you see the system track. This is where system messages, warnings etc.
will appear. At this point of the course, this track will contain two or
more text viewers. On the left side you see the user track in which the viewer
with this text should be open now.
You can change the arrangement by dragging a menu viewer to a new location:
position the mouse pointer inside the menu frame and drag the viewer to the
new position (keeping "position" pressed). If you release "position", the
frame gets a new position and size. Try this yourself.
The placement in tracks is guarded in this action. To move
a window from one track to a different track, interclick "activate" before
releasing "position". Interclicking, i.e. pressing one or more keys
while another key is kept pressed, is used frequently in Oberon.
Instead of moving a window manually to change position and size, you
can activate the commands shown in the menu frame. If you activate System.Grow,
the corresponding frame is grown to a larger size. If you activate System.Close,
the frame is closed, or the size is reduced one size step if the frame has
been grown. Please close the frame from the first chapter,
and grow this frame for chapter 02. You are not warned if you are
closing a frame (maybe you just wanted to reduce the size). But if you regret
your action immediately, there is one "undo" possibility. The command
System.Recall
recovers the most recently closed viewer and makes it accessible again.
Like all of the Oberon system, windows and frames are extensible. The user
can modify or extend the functionality. So instead of System.Grow
you may find only Grow in the menu frame, depending
on your local configuration. Internally, this entry may be redireceted again
to System.Grow. The appearance is in the hand of
whoever has configured your Oberon system. Oberon has proposals for consistency,
but it does not impose these as obligatory. Consistency is in the responsibility
of the user and/or the programmer.
All components of Oberon are valid sources for commands. It does not matter
where the command is entered. If you see a command text somewhere on the
screen, you can activate it wherever you find it. Or you can enter the command
text anywhere, in a the system frame for example, and then activate it wherever
you have entered it For example, if you activate
Desktops.OpenDoc ItO/Ch01.Start
in this current text, you get a new viewer showing the start of this course
(which you may close immediately again. We do not need it anymore.).
Besides the proper command, Desktops.OpenDoc, the command Desktops.OpenDoc
ItO/Ch01.Start has additional information, specifying what should
be opened (the chapter Ch01.Start). This additional information is a parameter
for the command Desktops.OpenDoc.
Commands with parameters:
xxxx.yyyy par
Commands and parameters need not follow on the screen one after the other.
Some commands allow for a list of several parameters. For commands using
a list of variable length, Oberon needs a hint marking the end of this list.
By convention the character ~ is used to mark the end
of a list. (Macintosh key combination: option n, then space)
End of parameter list:
xxxx.yyyy par1 par2 par3 ~
Command conventions:
An up arrow ^
in the parameter list indicates that the parameter list is to
be continued with the current selection (the most recent text selection).
Current selection used as parameter continuation:
xxxx.yyyy ^
Move the cursor to the start of a text section, "select" and move
the cursor to the end of a text section to select it.
Commands can use the current selection as input area using only the selected
section. Commands can also redirect the input to begin at the selection,
starting there but continuing possibly beyond the selected range. There is
no unified convention for this. To safeguard against unwanted risks, in particular
for critical commands like file deletion, the end of the parameter list should
always be marked as discussed above, in particular if redirection to current
selections is used.
An "at sign" @ in
the parameter list indicates that the current selection (the most recent
text selection) is to be inserted in the parameter list. Current
selection used as parameter insertion:
xxx.yyy @ par2 par3
This convention is only implemented in a few commands.
A * in the
parameter list represents the currently marked viewer. This is commonly used
as an alternative to using the name of the viewer. The command is to operate
on the contents of the currently marked viewer.
Current viewer as a parameter:
xxx.yyy
* par2
To mark a viewer, move the mouse cursor to the viewer and press "mark".
A star mark will show up temporarily in the marked viewer. To remove marks
and selections, press "escape".
(Macintosh) Note:
Mark =>
"Enter" key (in the numerical key pad)
or
"F1" key
(X Windows etc.) Note:
Mark =>
"Setup" key
(Oberon for Windows) Note:
Mark =>
"F1" key
In the Desktops.Tool viewer you find an entry Desktops.OpenDoc
^. Use this entry to access subsequent parts of the course material.
Activate
System.Open ItO/ItO.Contents
to get a table of contents. Select the chapter you are interested
in. Activate Desktops.OpenDoc ^ in the Desktops.Tool
viewer to see that chapter.
Introduction to the Oberon programming language. ItO/Ch02.Text
gs (c) G. Sawitzki, StatLab Heidelberg
<http://statlab.uni heidelberg.de/projects/Oberon/intro/>
Home
Up
Intro
Contents
Chapter
1
2
3
4
5
6
7
8
9
10
Design
Assert
Timing
EBNF
Report
Pas