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/acme/frame.m | |
| parent | 54bc8ff236ac10b3eaa928fd6bcfc0cdb2ba46ae (diff) | |
20060303a
Diffstat (limited to 'appl/acme/frame.m')
| -rw-r--r-- | appl/acme/frame.m | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/appl/acme/frame.m b/appl/acme/frame.m new file mode 100644 index 00000000..c581e350 --- /dev/null +++ b/appl/acme/frame.m @@ -0,0 +1,54 @@ +Framem : module { + PATH : con "/dis/acme/frame.dis"; + + BACK, HIGH, BORD, TEXT, HTEXT, NCOL : con iota; + + FRTICKW : con 3; + + init : fn(mods : ref Dat->Mods); + + newframe : fn() : ref Frame; + + Frbox : adt { + wid : int; # in pixels + nrune : int; # <0 ==> negate and treat as break char + ptr : string; + bc : int; # break char + minwid : int; + }; + + Frame : adt { + font : ref Draw->Font; # of chars in the frame + b : ref Draw->Image; # on which frame appears + cols : array of ref Draw->Image; # colours + r : Draw->Rect; # in which text appears + entire : Draw->Rect; # of full frame + box : array of ref Frbox; + scroll : int; # call framescroll function + p0 : int; + p1 : int; # selection + nbox, nalloc : int; + maxtab : int; # max size of tab, in pixels + nchars : int; # runes in frame + nlines : int; # lines with text + maxlines : int; # total # lines in frame + lastlinefull : int; # last line fills frame + modified : int; # changed since frselect() + noglyph : int; # char to use when a char has 0 width glyph + tick : ref Draw->Image; # typing tick + tickback : ref Draw->Image; # saved image under tick + ticked : int; # is tick on screen ? + }; + + frcharofpt : fn(f : ref Frame, p : Draw->Point) : int; + frptofchar : fn(f : ref Frame, c : int) : Draw->Point; + frdelete : fn(f : ref Frame, c1 : int, c2 : int) : int; + frinsert : fn(f : ref Frame, s : string, l : int, i : int); + frselect : fn(f : ref Frame, m : ref Draw->Pointer); + frinit : fn(f : ref Frame, r : Draw->Rect, f : ref Draw->Font, b : ref Draw->Image, cols : array of ref Draw->Image); + frsetrects : fn(f : ref Frame, r : Draw->Rect, b : ref Draw->Image); + frclear : fn(f : ref Frame, x : int); + frdrawsel : fn(f : ref Frame, p : Draw->Point, p0 : int, p1 : int, n : int); + frdrawsel0 : fn(f : ref Frame, p : Draw->Point, p0 : int, p1 : int, i1 : ref Draw->Image, i2 : ref Draw->Image); + frtick : fn(f : ref Frame, p : Draw->Point, n : int); +}; |
