[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

text area size of fred window



At 11:42 PM 7/16/93 +0900, Yasuaki Honda wrote:
>Hi Lispers,
>
>I wanted to get the actual text area size of fred window, excluding
>mini-buffer and scroll bars. A fred record, associated with a fred
>window in slot 'frec', seemed to have the size value in its 'fr.size'
>record slot. However, I could not find the right function to access
>that slot. Off course, I tried:
>
>        (slot-value (frec (find-window "xxx")) 'ccl::fr.size)
>
>only to get an error saying that the second argument of slot-value was
>not of the expected type.
>
>Could someone tell me how to access fields of fred record, or
>alternatively, how to get the actual text area size of a fred window?
>
>Yasuaki Honda // honda@csl.SONY.co.jp
>It's Sony Computer Science Laboratory Inc.

The accessor is CCL::FR.SIZE. It is defined in the file:

"MCL 2.0 CD:Additional MCL Source Code:Lib:fredenv.lisp"

After loading this file, you can say (ccl::fr.size (frec (find-window ...)))
to get the size of a FRED-WINDOW's display area. Standard disclaimer:
this is an undocumented internal macro that may change in future
versions of MCL (we currently do not plan to change this for MCL 3.0).

Here's the definition of a FRED-RECORD (FREC) in case you don't
have access to the MCL 2.0 CD. Watch out for wrapped comment lines
inserted by "smart" mailers.

----------------------------------------------------------------------

(in-package :ccl)

(def-accessors (fred-record) %svref
  nil                                   ; 'fred-record
  (fr.buffer fr.cursor)                 ; The buffer displayed in this frec
  fr.wptr                               ; Our wptr
  fr.position                           ; Our position in the window (point)
  fr.size                               ; Our size (point)
  fr.wposm                              ; Desired window position (mark)
  fr.selmarks                           ; Desired selection rgns, list of (b . z) marks
  fr.lead                               ; Additional distance between lines (pixels)
  fr.tabcount                           ; Number of spaces per tab (max 128)
  fr.hscroll                            ; Desired amount of horizontal scroll (pixels)
  fr.margin                             ; Size of left margin (and right, if wrapping)
  fr.plist                              ; plist, for the user
  fr.bticks                             ; Tick count at last blink
  fr.cticks                             ; Tick count at last click
  fr.cposn                              ; Position at last click
  fr.bpoint                             ; Screen position of blinking char
  fr.bpos                               ; Buffer position of blinking char
  fr.curpoint                           ; Screen position of cursor at last display
  fr.curcpos                            ; Buffer position of cursor at last display
  fr.lineht                             ; Line height at last display
  fr.hpos                               ; margin-hscroll at last display
  fr.linevec                            ; vector of screen line lengths at last display
  fr.numlines                           ; number of lines in linevec
  fr.bwin                               ; pos of first char in window at last display
  fr.zwin                               ; pos after last char in window at last display
  fr.bmod                               ; unchanged top area since last display
  fr.zmod                               ; unchanged bottom area since last display
  fr.selrgn                             ; selection at last display (mac region)
  fr.selposns                           ; positions of selections at last redisplay
  fr.flags                              ; assorted flags
  fr.bpchar                             ; blinking char
  fr.bp-ff                              ; blinking char font&face
  fr.bp-ms                              ; blinking char mode&size
  fr.next-frec                          ; Link for %frec-list%
  fr.owner)