GGState.mesa
Contents: Routines for getting and setting values in the Gargoyle user interface state.
Copyright Ó 1986, 1987 by Xerox Corporation. All rights reserved.
Pier, September 18, 1990 11:09 am PDT
Bier, December 17, 1991 10:55 am PST
DIRECTORY
BiScrollers, GGFont, GGBasicTypes, GGCoreTypes, GGHistoryTypes, GGInterfaceTypes, GGModelTypes, Imager, ImagerTransformation, Rope;
GGState: CEDAR DEFINITIONS = BEGIN
Caret: TYPE = GGInterfaceTypes.Caret;
DefaultData: TYPE = GGModelTypes.DefaultData;
DisplayStyle: TYPE = GGModelTypes.DisplayStyle;
ExtendMode: TYPE = GGModelTypes.ExtendMode;
FeatureCycler: TYPE = GGInterfaceTypes.FeatureCycler;
FontData: TYPE = GGFont.FontData;
GGData: TYPE = GGInterfaceTypes.GGData;
GravityType: TYPE = GGInterfaceTypes.GravityType;
HistoryEvent: TYPE = GGHistoryTypes.HistoryEvent;
SelectMode: TYPE = GGModelTypes.SelectMode;
SequenceOfReal: TYPE = GGCoreTypes.SequenceOfReal;
SliceDescriptor: TYPE = GGModelTypes.SliceDescriptor;
StrokeEnd: TYPE = GGModelTypes.StrokeEnd;
StrokeJoint: TYPE = GGModelTypes.StrokeJoint;
Transformation: TYPE = ImagerTransformation.Transformation;
ROPE: TYPE = Rope.ROPE;
Vector: TYPE = GGBasicTypes.Vector;
NotNewVersion: PROC [ggData: GGData, op: ATOM];
Tells viewer it is unedited. op is either $clear or $clean. The unedited icon for a cleared or cleaned Viewer is used.
ChangeIcon: PROC [ggData: GGData, op: ATOM];
op is either $clear or $clean. The unedited icon for a cleared or cleaned Viewer is used.
ColorToolIsBound: PROC [ggData: GGData] RETURNS [BOOLFALSE];
GetViewport: PROC [ggData: GGData] RETURNS [rect: Imager.Rectangle];
Finds the rectangle representing the bounds of the current action area.
GetGGInputFocus: PROC RETURNS [focusData: GGData ← NIL];
GetAnchor: PROC [ggData: GGData] RETURNS [Caret];
GetBiScrollersTransform: PROC [ggData: GGData] RETURNS [clientToViewer: Transformation];
GetBiScrollersScale: PROC [ggData: GGData] RETURNS [s: REAL];
The larger of the two scaling components of clientToViewer.
GetBiScrollersTransforms: PROC [ggData: GGData] RETURNS [clientToViewer, viewerToClient: Transformation];
SetBiScrollersTransform: PROC [ggData: GGData, clientToViewer: Transformation];
BiScrollersShift: PROC [ggData: GGData, dx, dy: REAL];
BiScrollersScale: PROC [ggData: GGData, op: ScaleOp];
ScaleOp: TYPE = RECORD [variant: SELECT op: * FROM
reset => [],
byArg => [arg: REAL],
diff => [x, y: REAL],
ENDCASE];
BiScrollersRotate: PROC [ggData: GGData, op: RotateOp];
BiScrollersTransform: PROC [ggData: GGData, t: Transformation];
RotateOp: TYPE = RECORD [variant: SELECT op: * FROM
reset => [],
byArg => [arg: REAL--degrees--],
ENDCASE];
Alignment Menus
FilterLists: TYPE = REF FilterListsObj;
FilterListsObj: TYPE = RECORD [
onSlopes: LIST OF REAL,
onRadii: LIST OF REAL,
onAngles: LIST OF REAL,
onDistances: LIST OF REAL,
scaleUnit: REAL ← 72.0
];
GetFilterLists: PROC [filters: GGInterfaceTypes.Filters] RETURNS [filterLists: FilterLists];
GetFilterLists: PROC [ggData: GGData] RETURNS [filterLists: FilterLists];
AlignmentType: TYPE = {slope, angle, radius, lineDistance};
SetAllAlignmentStates: PROC [ggData: GGData, type: AlignmentType, state: BOOL];
DeleteSelectedAlignments: PROC [ggData: GGData, type: AlignmentType];
ToggleAlignment: PROC [ggData: GGData, alignVal: REAL, type: AlignmentType] RETURNS [menuValue: REAL, changedToOn: BOOLFALSE];
GetSlopeValue: PROC [ggData: GGData] RETURNS [degrees: REAL, success: BOOLTRUE];
SetSlopeValue: PROC [ggData: GGData, degrees: REAL];
SelectSlope: PROC [ggData: GGData] RETURNS [success: BOOLTRUE];
GetSlopeAlignments: PROC [ggData: GGData] RETURNS [values: LIST OF REAL, on: LIST OF BOOL];
AddSlope: PROC [ggData: GGData, degrees: REAL, on: BOOLTRUE] RETURNS [alreadyThere: BOOL];
AddSlopeList: PROC [ggData: GGData, degrees: LIST OF REAL, on: LIST OF BOOLNIL];
Add the listed slopes to the slopes that are currently in the slope alignment menu. "on" is the same length as "degrees" (or is of length 0). Each element of on is TRUE iff the corresponding slope button should be turned on. If on=NIL, then all added buttons will be off.
NewSlopeList: PROC [ggData: GGData, degrees: LIST OF REAL, on: LIST OF BOOLNIL];
Set the slope alignment menu from the lists given. "on" is the same length as "degrees". Each element of on is TRUE iff the corresponding slope button should be turned on. If on=NIL, then all slope buttons will be off.
GetAngleAlignments: PROC [ggData: GGData] RETURNS [values: LIST OF REAL, on: LIST OF BOOL];
GetAngleValue: PROC [ggData: GGData] RETURNS [degrees: REAL, success: BOOLTRUE];
SetAngleValue: PROC [ggData: GGData, degrees: REAL];
SelectAngle: PROC [ggData: GGData] RETURNS [success: BOOLTRUE];
AddAngle: PROC [ggData: GGData, degrees: REAL, on: BOOLTRUE] RETURNS [alreadyThere: BOOL];
AddAngleList: PROC [ggData: GGData, degrees: LIST OF REAL, on: LIST OF BOOLNIL];
Add the listed angles to the angles that are currently in the angle alignment menu. "on" is the same length as "degrees" (or of length 0). Each element of on is TRUE iff the corresponding angle button should be turned on. If on=NIL, then all angle buttons will be off.
NewAngleList: PROC [ggData: GGData, degrees: LIST OF REAL, on: LIST OF BOOLNIL];
Set the angle alignment menu from the lists given. "on" is the same length as "degrees" (or of length 0). Each element of on is TRUE iff the corresponding angle button should be turned on. If on=NIL, then all angle buttons will be off.
GetRadiusAlignments: PROC [ggData: GGData] RETURNS [names: LIST OF ROPE, values: LIST OF REAL, on: LIST OF BOOL];
GetRadiusValue: PROC [ggData: GGData] RETURNS [radius: REAL, success: BOOLTRUE];
SetRadiusValue: PROC [ggData: GGData, radius: REAL];
SelectRadius: PROC [ggData: GGData] RETURNS [success: BOOLTRUE];
AddRadius: PROC [ggData: GGData, name: ROPE, radius: REAL, on: BOOLTRUE] RETURNS [alreadyThere: BOOL];
AddRadiusList: PROC [ggData: GGData, names: LIST OF ROPE, radii: LIST OF REAL, on: LIST OF BOOLNIL];
Add the listed radii to the radii that are currently in the radius alignment menu. "on" is the same length as "radii" (or of length 0). Each element of on is TRUE iff the corresponding radius button should be turned on. If on=NIL, then added buttons will be off.
NewRadiusList: PROC [ggData: GGData, names: LIST OF ROPE, radii: LIST OF REAL, on: LIST OF BOOLNIL];
Set the radius alignment menu from the lists given. "on" is the same length as "radii". Each element of on is TRUE iff the corresponding radius button should be turned on. If on=NIL, then all radius buttons will be off.
GetLineDistanceAlignments: PROC [ggData: GGData] RETURNS [names: LIST OF ROPE, values: LIST OF REAL, on: LIST OF BOOL];
GetLineDistanceValue: PROC [ggData: GGData] RETURNS [distance: REAL, success: BOOLTRUE];
SetLineDistanceValue: PROC [ggData: GGData, distance: REAL];
SelectLineDistance: PROC [ggData: GGData] RETURNS [success: BOOLTRUE];
AddLineDistance: PROC [ggData: GGData, name: ROPE, distance: REAL, on: BOOLTRUE] RETURNS [alreadyThere: BOOL];
AddLineDistanceList: PROC [ggData: GGData, names: LIST OF ROPE, distances: LIST OF REAL, on: LIST OF BOOLNIL];
Add the listed distances to the distances that are currently in the distance alignment menu. "on" is the same length as "distances" (or of length 0). Each element of on is TRUE iff the corresponding distance button should be turned on. If on=NIL, then all distance buttons will be off.
NewLineDistanceList: PROC [ggData: GGData, names: LIST OF ROPE, distances: LIST OF REAL, on: LIST OF BOOLNIL];
Set the distance alignment menu from the lists given. "on" is the same length as "distances" (or of length 0). Each element of on is TRUE iff the corresponding distance button should be turned on. If on=NIL, then all distance buttons will be off.
GetMidpoints: PROC [ggData: GGData] RETURNS [BOOL];
SetMidpoints: PROC [ggData: GGData, midpointsOn: BOOL];
GetShowAlignments: PROC [ggData: GGData] RETURNS [BOOL];
SetShowAlignments: PROC [ggData: GGData, showAlignments: BOOL];
GetDoubleBuffer: PROC [ggData: GGData] RETURNS [BOOL];
SetDoubleBuffer: PROC [ggData: GGData, doubleBuffer: BOOL];
Gargoyle Behaviors
GetActive: PROC [ggData: GGData] RETURNS [BOOL];
SetActive: PROC [ggData: GGData, activeOn: BOOL];
GetReadOnly: PROC [ggData: GGData] RETURNS [BOOL];
SetReadOnly: PROC [ggData: GGData, readOnly: BOOL];
GetPalette: PROC [ggData: GGData] RETURNS [BOOL];
SetPalette: PROC [ggData: GGData, paletteOn: BOOL];
Graphical Style
GetDefaults: PROC [ggData: GGData] RETURNS [DefaultData];
SetDefaults: PROC [ggData: GGData, defaults: DefaultData];
GetDisplayStyle: PROC [ggData: GGData] RETURNS [DisplayStyle];
SetDisplayStyle: PROC [ggData: GGData, displayStyle: DisplayStyle];
CycleDisplayStyle: PROC [ggData: GGData, forward: BOOL];
GetDefaultDashPattern: PROC [ggData: GGData] RETURNS [dashed: BOOL, pattern: SequenceOfReal, offset: REAL, length: REAL];
SetDefaultDashPattern: PROC [ggData: GGData, dashed: BOOL, pattern: SequenceOfReal, offset: REAL, length: REAL];
GetDefaultFillColor: PROC [ggData: GGData] RETURNS [fillColor: Imager.Color];
SetDefaultFillColor: PROC [ggData: GGData, fillColor: Imager.Color];
GetDefaultStrokeColor: PROC [ggData: GGData] RETURNS [strokeColor: Imager.Color];
SetDefaultStrokeColor: PROC [ggData: GGData, strokeColor: Imager.Color];
GetDefaultStrokeJoint: PROC [ggData: GGData] RETURNS [strokeJoint: StrokeJoint];
SetDefaultStrokeJoint: PROC [ggData: GGData, strokeJoint: StrokeJoint];
GetDefaultStrokeEnd: PROC [ggData: GGData] RETURNS [strokeEnd: StrokeEnd];
SetDefaultStrokeEnd: PROC [ggData: GGData, strokeEnd: StrokeEnd];
GetDefaultDropShadows: PROC [ggData: GGData] RETURNS [dropShadowOn: BOOL, dropShadowOffset: Vector, dropShadowColor: Imager.Color];
SetDefaultDropShadows: PROC [ggData: GGData, dropShadowOn: BOOL, dropShadowOffset: Vector, dropShadowColor: Imager.Color];
GetDefaultFont: PROC [ggData: GGData] RETURNS [fontData: FontData];
SetDefaultFont: PROC [ggData: GGData, fontData: FontData];
Gravity
GetGravity: PROC [ggData: GGData] RETURNS [BOOL];
SetGravity: PROC [ggData: GGData, gravityOn: BOOL];
GetGravityExtent: PROC [ggData: GGData] RETURNS [inches: REAL];
SetGravityExtent: PROC [ggData: GGData, inches: REAL];
GetGravityType: PROC [ggData: GGData] RETURNS [gravityType: GravityType];
SetGravityType: PROC [ggData: GGData, gravityType: GravityType];
CycleGravityType: PROC [ggData: GGData, forward: BOOL];
GetHeuristics: PROC [ggData: GGData] RETURNS [BOOL];
SetHeuristics: PROC [ggData: GGData, heuristicsOn: BOOL];
GetScaleUnit: PROC [ggData: GGData] RETURNS [REAL]; -- in units of 1/72 of an inch
SetScaleUnit: PROC [ggData: GGData, unit: REAL, history: HistoryEvent]; -- in units of 1/72 of an inch
Other
GetSliceToExtend: PROC [ggData: GGData] RETURNS [sliceD: SliceDescriptor];
SetSliceToExtend: PROC [ggData: GGData, sliceD: SliceDescriptor];
Hidden State (yuk)
GetSelectMode: PROC [ggData: GGData] RETURNS [selectMode: SelectMode];
SetSelectMode: PROC [ggData: GGData, selectMode: SelectMode];
GetExtendMode: PROC [ggData: GGData] RETURNS [extendMode: ExtendMode];
SetExtendMode: PROC [ggData: GGData, extendMode: ExtendMode];
GetQuickClickMode: PROC RETURNS [on: BOOL];
SetQuickClickMode: PROC [on: BOOL];
GetSelectionCycler: PROC [ggData: GGData] RETURNS [featureCycler: GGInterfaceTypes.FeatureCycler];
SetSelectionCycler: PROC [ggData: GGData, featureCycler: GGInterfaceTypes.FeatureCycler];
Debugging and Experiments
PrecomputeMidpoints: PROC [] RETURNS [BOOL];
Names, files, windows
GetFullName: PROC [ggData: GGData] RETURNS [fullName: ROPE];
file name like /net/server/user/gargoyle/Foo.gargoyle
or /GargoylePics/MyPics/Foo.gargoyle!3
GetBiScroller: PROC [ggData: GGData] RETURNS [bs: BiScrollers.BiScroller];
GetWidth: PROC [ggData: GGData] RETURNS [width: INT]; -- actionArea, in "window" units
GetHeight: PROC [ggData: GGData] RETURNS [height: INT]; -- actionArea, in "window" units
GrabInputFocus: PROC [ggData: GGData]; -- actionArea ← input focus
PaintActionArea: PROC [ggData: GGData];
GetAdvisory: PROC [ggData: GGData, fullName: ROPE, versionSpecified: BOOL]; -- just read scene and options
StoreAdvisory: PROC [ggData: GGData, fullName: ROPE, versionSpecified: BOOL]; -- just stored scene and options
ClearAdvisory: PROC [ggData: GGData]; -- just cleared
AdviseRestore: PROC [ggData: GGData] RETURNS [ok: BOOLFALSE]; -- is restore safe??
ShowHelp: PROC [ggData: GGData, category: ATOM];
Typescript: PROC [ggData: GGData];
ReloadTipTable: PROC [ggData: GGData] RETURNS [success: BOOLTRUE];
GGEdited: PROC [ggData: GGData, clientData: REF];
ggData.scene has just been edited. Perform appropriate actions (e.g., flush scripts to disk and display the "[Edited]" symbol on the viewer, if any).
END.