XTkBitmapWidgets.mesa
Copyright Ó 1988, 1989, 1990, 1991 by Xerox Corporation. All rights reserved.
Christian Jacobi, October 21, 1988 1:13:50 pm PDT
Christian Jacobi, July 19, 1991 1:47 pm PDT
DIRECTORY
Imager USING [Context],
SF USING [Box, maxBox, Vec],
Xl USING [Point],
XlBitmap USING [Bitmap],
XTk USING [Widget, WidgetSpec];
XTkBitmapWidgets: CEDAR DEFINITIONS
~ BEGIN OPEN Xl;
BitmapWidget: TYPE = XTk.Widget;
BitmapEventReason: TYPE = {createWindow, resize, map, unmap, destroyWindow, destroyWidget};
BitmapEventProc: TYPE = PROC [widget: BitmapWidget, reason: BitmapEventReason, data: REF];
CreateBitmapWidget: PROC [widgetSpec: XTk.WidgetSpec ¬ [], notify: BitmapEventProc ¬ NIL, data: REF ¬ NIL] RETURNS [BitmapWidget];
Creates a bitmap widget.
No bitmap bound to widget yet.
SetCallbacks: PROC [bmw: BitmapWidget, notify: BitmapEventProc ¬ NIL, data: REF ¬ NIL];
Changes the registered callbacks.
Not monitored.
SetBitmap: PROC [widget: BitmapWidget, bitmap: XlBitmap.Bitmap, restrict: SF.Box ¬ SF.maxBox, origin: Xl.Point ¬ [0, 0], immediateRefresh: BOOL ¬ TRUE, retainRefreshs: BOOL ¬ FALSE];
Forces widget to display a new bitmap. Returns immediately, maybe before bits are painted.
Positions origin of sm at position "origin" of window.
Not monitored.
GetBitmap: PROC [widget: BitmapWidget] RETURNS [bitmap: XlBitmap.Bitmap, restrict: SF.Box, origin: Xl.Point];
Returns currently displayed bitmap.
Not monitored.
Wait: PROC [widget: BitmapWidget, server: BOOL ¬ FALSE];
Waits until all requests are "performed".
server: TRUE: waits until server acknowledges having seen requests.
server: FALSE: waits until requests are removed from internal buffer.
CreateContext: PROC [widget: BitmapWidget, surfaceUnitsPerPixel: NAT ¬ 1] RETURNS [context: Imager.Context];
Conveniance procedure: creates context drawing into current bitmap of widget.
widget must have bitmap "set".
CreateAndSetBitmap: PROC [widget: BitmapWidget, size: SF.Vec, bpp: NAT ¬ 1, origin: Xl.Point ¬ [0, 0]];
Conveniance procedure: creates bitmap and sets it
Not monitored.
GetImplData: PRIVATE PROC [widget: BitmapWidget] RETURNS [REF];
Wizards only.
END.