home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-11-24 | 2.2 KB | 90 lines | [TEXT/MSET] |
- \ Window class.
-
- \ May 91 mrh Added NonScrollWind.
- \ Default grow and drag limits set at grow and drag time.
- \ Also fixed a number of long-standing bugs in draw:, enable:, disable:
- \ etc. New: deactivates current window. Added PenIntoWind:.
- \ July 91 mrh Moved Window class into module WindowMod.
-
-
- variable THEWINDOW
- -1 constant INFRONT
- variable THEPORT
- 129 constant THUMB
-
- 0 constant DOCWIND
- 16 constant RNDWIND
- 1 constant DLGWIND
-
- 0 value ACTW \ Indentifies any active Mops window which
- \ should be idled. Will be set zero if we have, say,
- \ a dialog as the front window, but NOT if we're
- \ switched into the background.
-
- 0 value SaveActW \ Saves actW over Suspend-Resume
-
- forward WHRFEV \ Will become where: fEvent
-
- \ NoClip is a very useful word...
-
- : NOCLIP 0 0 32766 dup put: tempRect addr: tempRect call ClipRect ;
-
-
- \ ( val -- ) These next words set text characteristics for current grafPort
-
- : TFONT makeInt call TextFont ;
- : TFACE makeInt call TextFace ;
- : TMODE makeInt call TextMode ;
- : TSIZE makeInt call TextSize ;
-
- : INITFONT 9 tsize 4 tfont ( Monaco ) 0 tMode 0 tFace ;
-
- : TBOOL \ ( b -- bool ) Makes a Mops boolean into a Toolbox boolean
- $ 100 and makeint ;
-
- \ Save and restore the GrafPort
-
- : SAVEPORT thePort call GetPort ;
- : RESTPORT thePort @ call SetPort ;
-
- \ Utility routines for calculating a scroll bar's position.
-
- : >VRECT { left top rt bot -- l' t' r' b' }
- rt 15 - top 1- rt 1+ bot 14 - ;
-
- : >HRECT { left top rt bot -- l' t' r' b' }
- left 1- bot 15 - rt 14 - bot 1+ ;
-
-
- syscall NewWindow
- sysCall NewCWindow
- syscall GetNewWindow
- syscall GetNewCWindow
-
-
- from WindowMod import{ WINDOW }
-
- compile: windowMod
- lock: windowMod
- true setinstall: windowMod
-
-
- \ NonScrollWind is a window that will not scroll. This preserves fprect which we
- \ may be using for scrolling text somewhere else.
-
- :class NONSCROLLWIND super{ window }
-
- :m CLASSINIT:
- classinit: super false setScroll: self ;m
-
- ;class
-
-
- fWind ' window set_class
- classinit: fWind markalive: fWind
-
-
- true value fWindActive? \ Will be true only when fwind is active.
- \ It is set/reset by enFW and disFW (see
- \ FEMod.txt).
-