Object <- Canvas <- PixelMap <- IndirectPixelMap <- MacintoshWindow |
|
|
CopyPixelsToWindow DirtyGrowBox Init MacPointFromDot MacPointToDot MacRectFromBox MacRectToBox RefreshPixelBox RefreshWindow ReinitializeClass |
|
CanvasSize HeightResizable WindowRect |
| Field | Type | |
|---|---|---|
| PixelMap: | portPixels: | Pixels |
| portBounds: | PixelBox | |
| portPower: | UnsignedShort | |
| portRow: | UnsignedShort | |
| portDepth: | Unsigned | |
| portRes: | PixelDot | |
| portResHRound: | SignedShort | |
| portResVRound: | SignedShort | |
| portOrigin: | Dot | |
| portDither: | PixelDot | |
| MacintoshWindow: | echoWindow: | Pointer |
instance MacintoshWindow tag; portPixels: nilObject; portBounds: <0,0,0,0>; portPower: 0; portRow: 0; portDepth: 0; portRes: <0,0>; portResHRound: 0; portResVRound: 0; portOrigin: <0.0,0.0>; portDither: <0,0>; echoWindow: nil; end instance;
Define Class MacintoshWindow; inherits from IndirectPixelMap; #ifdef RESIZABLE_SCREEN inherits from ResizableCanvas; #endif field echoWindow: Pointer; overrides ReinitializeClass; overrides Init; operation MacPointToDot(src: Point; var dst: Dot); operation MacPointFromDot(var dst: Point; src: Dot); operation MacRectToBox(src: Rect; var dst: Box); operation MacRectFromBox(var dst: Rect; src: Box); overrides RefreshWindow, RefreshPixelBox; operation CopyPixelsToWindow(source: Box; offset: Dot); #ifdef RESIZABLE_SCREEN attribute HeightResizable: Boolean, readOnly; // boolean that determines whether you see a grow box in the window operation DirtyGrowBox(); // call to dirty the grow-box section of a window attribute WindowRect: Rect; // changes both size and position of window on the screen overrides SetCanvasSize; // changes the size of the window, but does not change the size // of the off-screen pixels #endif end class;