[Oberon] ETHO Display structure.
eas lab
lab.eas at gmail.com
Mon Mar 11 10:55:46 CET 2013
> > allowed me to:
> >
> > Repeat
> > get(ch);
> > writeCharAtCursor;
> > Until ch = "q"
> >
> > It's just that the resolution for fast navigating individual chars is
> > impractical. Words are more practical.
> > I was much influence by EditKeys, but forgot that the cursor 'snaps'
> > to the last-char-of-the-line, and positioning it quickly inside the
> > line is not so easy.
> >
----------
I've got some NEW confused ideas on this matter, but I'm going
to post my previous work, in order to clear my gmail for other needs:-
IMO the Pet* author wrongly names the 'caret' the cursor.
But I've notice mention of the "pointer" and the "marker".
For THIS PROJECT, I've considered the <pointer which moves with the mouse>
as the cursor. What is the "pointer"?
---------------> Bob Walkden wrote:-
> I haven't been following this closely, so forgive me if I've misunderstood
> what you're doing, but if it's really as simple as that bit of code
> suggests, then this is a very easy way to do it:
>
> MODULE Bob;
>
> IMPORT Oberon, Input;
>
> PROCEDURE Glur * ;
> VAR
> ch: CHAR;
> m: Oberon.InputMsg;
> BEGIN
> m.id := Oberon.consume;
> m.fnt := Oberon.CurFnt;
> m.col := Oberon.CurCol;
> m.voff := Oberon.CurOff;
> REPEAT
> Input.Read( ch );
> m.ch := CAP(ch); (* CAP proves that it's not the Oberon loop
> that's writing the text *)
> Oberon.FocusViewer.handle( Oberon.FocusViewer, m );
> UNTIL ch = 'q';
> END Glur;
>
> BEGIN
> END Bob.
>
> Bob.Glur
Watson 1.7 / PS January 95
reading Oberon.Def (Definitions.Arc)
=> Oberon.Def ==
CurFnt: Fonts.Font; (* Current input font when typing. *)
CurCol, CurOff: SHORTINT; (* Current color and
offset when typing. *)
And while Oberon.Def is showing:----
PROCEDURE DrawCursor (VAR c: Cursor; VAR m: Marker; X, Y: INTEGER);
(* Returns the star (F1) marked viewer. *)
PROCEDURE MarkedViewer (): Viewers.Viewer;
(* Returns the star (F1) marked frame. *)
PROCEDURE MarkedFrame (): Display.Frame;
look interesting, and relevant to my task.
-----------
IMO the essentials of this problem is relating
mouseXYcursor <---> correspondingChar at Display/Frame/Viewer
But [in principle] I've got a problem with the different Types:
Display, Viewers, TextFrames ....etc.
So if it's possible to GetMarkedObjType1,
I don't know how to pass that to a PROC which does:
LocateCharAt(X,Y, ObjType2)
In OOP principles different Types of objects can 'relate'
via inheritance. But this seems not to help here.
And just by luck AFAIR I found matching Types in TextFrames
where Paul Reed pointed me to.
The goal is to be able to roam the cursor around the screen
[or perhaps (now) only a Viewer] and instead of keying the
mouse; key the keybrd - with the other hand.
I failed to find the related code: where KeyBrd-Ctrl can
serve as the MidMouse to do <Call M.P> for 2 button mice.
== Chris Glur.
More information about the Oberon
mailing list