summaryrefslogtreecommitdiff
path: root/examples/AGRS/TextFrames.Def
blob: 51696d631ba7c053ee38dfdf09c59dc306ddf40a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
(*
https://web.archive.org/web/20041227181940/http://www.oberon.ethz.ch:80/ethoberon/defs/TextFrames.Def.html
*)

DEFINITION TextFrames; (* portable *)

 IMPORT Objects, Display, Texts, Oberon;

 TYPE
  Location = RECORD
   org, pos: LONGINT;
   dx, x, y: INTEGER;
  END;

  Frame = POINTER TO FrameDesc;
  FrameDesc = RECORD ( Display.FrameDesc ) 
   text: Texts.Text;
   org: LONGINT;
   col: INTEGER;
   lsp: INTEGER;
   left, right, top, bot: INTEGER;
   markH: INTEGER;
   time: LONGINT;
   mark, car, sel: INTEGER;
   carloc: Location;
   selbeg, selend: Location;
  END;

 VAR 
  menuH, barW, left, right, top, bot, lsp: INTEGER;
 PROCEDURE Mark (F: Frame; mark: INTEGER);
 PROCEDURE Restore (F: Frame);
 PROCEDURE Suspend (F: Frame);
 PROCEDURE Extend (F: Frame; newY: INTEGER);
 PROCEDURE Reduce (F: Frame; newY: INTEGER);
 PROCEDURE Show (F: Frame; pos: LONGINT);
 PROCEDURE Pos (F: Frame; X, Y: INTEGER): LONGINT;
 PROCEDURE SetCaret (F: Frame; pos: LONGINT);
 PROCEDURE TrackCaret (F: Frame; X, Y: INTEGER; VAR keysum: SET);
 PROCEDURE RemoveCaret (F: Frame);
 PROCEDURE SetSelection (F: Frame; beg, end: LONGINT);
 PROCEDURE TrackSelection (F: Frame; X, Y: INTEGER; VAR keysum: SET);
 PROCEDURE RemoveSelection (F: Frame);
 PROCEDURE TrackLine (F: Frame; X, Y: INTEGER; VAR org: LONGINT; VAR keysum: SET);
 PROCEDURE TrackWord (F: Frame; X, Y: INTEGER; VAR pos: LONGINT; VAR keysum: SET);
 PROCEDURE GetAttr (F: Frame; VAR s: ARRAY OF CHAR);
 PROCEDURE Call (F: Frame; pos: LONGINT; new: BOOLEAN);
 PROCEDURE Write (F: Frame; ch: CHAR; lib: Objects.Library; col, voff: SHORTINT);
 PROCEDURE Defocus (F: Frame);
 PROCEDURE Neutralize (F: Frame);
 PROCEDURE Modify (F: Frame; id, dY, Y, H: INTEGER);
 PROCEDURE Open (
        F: Frame; H: Objects.Handler; T: Texts.Text; org: LONGINT; 
        col, left, right, top, bot, lsp: INTEGER);
 PROCEDURE Copy (F: Frame; VAR F1: Frame);
 PROCEDURE CopyOver (F: Frame; text: Texts.Text; beg, end: LONGINT);
 PROCEDURE GetSelection (F: Frame; VAR M: Oberon.SelectMsg);
 PROCEDURE GetCaret (F: Frame; VAR M: Oberon.CaretMsg);
 PROCEDURE Update (F: Frame; beg, end, len: LONGINT);
 PROCEDURE Edit (F: Frame; X, Y: INTEGER; Keys: SET);
 PROCEDURE Handle (F: Objects.Object; VAR M: Objects.ObjMsg);
 PROCEDURE Text (name: ARRAY OF CHAR): Texts.Text;
 PROCEDURE NewMenu (name, commands: ARRAY OF CHAR): Frame;
 PROCEDURE NewText (text: Texts.Text; pos: LONGINT): Frame;

(* Replace the default system editor with a textframe. *)
 PROCEDURE ReplaceSystemEditor;

END TextFrames.