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

hilighting



I'm trying to figure out how to hilight an object using the hilite
mode described in IM V, 61-62.  It says:

"There are two ways to use hilite mode.  The easiest is to call

    BitClr (Ptr(HiliteMode,pHiliteBit))

just before calling InvertRect..."

On the next page it says:

"The constants used with hilite mode are listed below:

  CONST
    hilite     = 50;
    pHiliteBit = 0;"


Well, I couldn't figure this out, so I searched files for "hilite" and
found this example, in MCL:library:Inspector
Folder:inspector-window.lisp:

; Invert a region using the highlight color (see Inside Mac V-62).
(defun %invert-region (rgn)
  (with-macptrs ((hiliteMode (%int-to-ptr #x938)))
    (%put-byte hiliteMode (logand #x7f (%get-byte hiliteMode))))
  (#_InvertRgn :ptr rgn))


The connection between this code and what IM-V says could use some
hilighting!

Thanks.

-----------------------------------------------------------
Tom McDougal   mcdougal@cs.uchicago.edu   +1 (312) 702-9923