diff options
| author | Charles.Forsyth <devnull@localhost> | 2006-12-22 17:07:39 +0000 |
|---|---|---|
| committer | Charles.Forsyth <devnull@localhost> | 2006-12-22 17:07:39 +0000 |
| commit | 37da2899f40661e3e9631e497da8dc59b971cbd0 (patch) | |
| tree | cbc6d4680e347d906f5fa7fca73214418741df72 /appl/wm/samterm.m | |
| parent | 54bc8ff236ac10b3eaa928fd6bcfc0cdb2ba46ae (diff) | |
20060303a
Diffstat (limited to 'appl/wm/samterm.m')
| -rw-r--r-- | appl/wm/samterm.m | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/appl/wm/samterm.m b/appl/wm/samterm.m new file mode 100644 index 00000000..34c82095 --- /dev/null +++ b/appl/wm/samterm.m @@ -0,0 +1,75 @@ +include "tk.m"; +include "wmlib.m"; + +Samterm: module +{ + + PATH: con "/dis/wm/sam.dis"; + + Section: adt + { + nrunes: int; + text: string; # if null, we haven't got it + }; + + Range: adt { + first, last: int; + }; + + Flayer: adt { + tag: int; + t: ref Tk->Toplevel; + tkwin: string; # tk window name + scope: Range; # part of file in range + dot: Range; # cursor position wrt file, not scope + width: int; # window width (not used yet) + lineheigth: int; # height of a single line (for resize) + lines: int; # window height in lines + scrollbar: Range; # current position of scrollbar + typepoint: int; # -1, or pos of first unsent char typed + }; + + Text: adt { + tag: int; + lock: int; + flayers: list of ref Flayer; # hd flayers is current + nrunes: int; + sects: list of ref Section; + state: int; + }; + + Dirty: con 1; + LDirty: con 2; + + Menu: adt { + tag: int; + name: string; + text: ref Text; + }; + + Context: adt { + ctxt: ref Draw->Context; + tag: int; # globally unique tag generator + lock: int; # global lock + + keysel: array of chan of string; + scrollsel: array of chan of string; + buttonsel: array of chan of string; + menu2sel: array of chan of string; + menu3sel: array of chan of string; + titlesel: array of chan of string; + flayers: array of ref Flayer; + + menus: array of ref Menu; + texts: array of ref Text; + + cmd: ref Text; # sam command window + which: ref Flayer; # current flayer (sam or work) + work: ref Flayer; # current work flayer + + pgrp: int; # process group + logfd: ref FD; + }; + + init: fn(ctxt: ref Draw->Context, args: list of string); +}; |
