<> <> <> <> DIRECTORY BasicTime USING[GMT], DBDefs USING [Entity, RelshipSet], Rope USING [ROPE], ViewerTools USING [TiogaContents]; WhiteboardDBPrivate: CEDAR DEFINITIONS = BEGIN Whiteboard: TYPE = DBDefs.Entity; WBIcon: TYPE = DBDefs.Entity; WBNote: TYPE = DBDefs.Entity; WBItem: TYPE = DBDefs.Entity; ItemType: TYPE = {icon, note}; ChildSet: TYPE = REF ChildSetObject; ChildSetObject: TYPE = RECORD[rs: DBDefs.RelshipSet, screen: BOOL _ FALSE]; wbType: ATOM; <> ROPE: TYPE = Rope.ROPE; <> <> <<>> <> <<>> <> <<>> <> <<"Display properties": the name of the icon to be used and the label to be painted on the icon. The icon names are mapped to icon flavors through the DBIcons database>> <<"Icon properties": the name and type of the icon to be used when "opening" it. The current icon types used are $Whiteboard, $Tool (the name is used to lookup a tool in the DBTools database and the label becomes the argument to the tool), $Text (the name is taken as the name of a file), $ToolRope (the name is taken as the name of a tool that does not create a new viewer, but instead uses a Commander to get its arguments), and $Entity (the name is taken as the name of another database entity, eg., a calendar entry or Walnut message set). The use of these icon properties can be found in WhiteboardOpsImpl. >> <> DeclareWhiteboard: PROC[name: ROPE] RETURNS[wb: Whiteboard]; <> NameOf: PROC[wb: Whiteboard] RETURNS[name: ROPE]; <> GetVersion: PROC[wb: Whiteboard] RETURNS[version: INT]; <> SetVersion: PROC[wb: Whiteboard, version: INT]; <> GetCreateDate: PROC[wb: Whiteboard] RETURNS[date: BasicTime.GMT]; <> SetCreateDate: PROC[wb: Whiteboard, date: BasicTime.GMT]; <> GetGridSize: PROC[wb: Whiteboard] RETURNS[gridSize: INT]; <> SetGridSize: PROC[wb: Whiteboard, gridSize: INT]; <> DestroyWhiteboard: PROC[wb: Whiteboard]; <> Exists: PROC[name: ROPE] RETURNS[BOOL]; <> Enumerate: PROC[pattern: Rope.ROPE] RETURNS[wbList: LIST OF Whiteboard]; <> <> FetchWBItem: PROC[name: ROPE, type: ItemType] RETURNS[item: WBItem]; <> Parent: PROC[item: WBItem] RETURNS[wb: Whiteboard]; <> Children: PROC[wb: Whiteboard, onlyWhiteboards: BOOL _ FALSE] RETURNS[children: ChildSet]; <> NextChild: PROC[children: ChildSet] RETURNS[child: WBItem]; <> TypeOf: PROC[item: WBItem] RETURNS[type: ItemType]; <> Position: PROC[item: WBItem] RETURNS[x, y: INT]; <> Size: PROC[item: WBItem] RETURNS[w, h: INT]; <> Move: PROC[item: WBItem, newX, newY: INT]; <> Destroy: PROC[item: WBItem]; <> <> NewNote: PROC[parent: Whiteboard, x, y, w, h: INT, content: ViewerTools.TiogaContents] RETURNS[newNote: WBNote]; <> <<>> GetContents: PROC[note: WBNote] RETURNS[content: ViewerTools.TiogaContents]; <> <<>> SetContents: PROC[note: WBNote, content: ViewerTools.TiogaContents]; <> <<>> Grow: PROC[note: WBNote, newW, newH: INT]; <> <> NewIcon: PROC[parent: Whiteboard, x, y: INT, name, label, icon, argument: ROPE, type: ATOM] RETURNS[newIcon: WBIcon]; <> GetDisplayProps: PROC[wbIcon: WBIcon] RETURNS[label, icon: ROPE]; <> <<>> GetToolArgument: PROC[wbIcon: WBIcon] RETURNS[argument: ROPE]; <> <<>> GetIconProps: PROC[wbIcon: WBIcon] RETURNS[name: ROPE, type: ATOM]; <> SetProps: PROC[wbIcon: WBIcon, name, label, icon: ROPE, type: ATOM]; <> <> OpenTransaction: PROC[]; AbortTransaction: PROC[]; CloseTransaction: PROC[]; MarkTransaction: PROC[unlock: BOOL _ TRUE]; <> Initialize: PROC[DBFile: ROPE] RETURNS[serverDown: BOOL]; <> readOnly: BOOL; -- Is the current segment readOnly WBSegment: ROPE; <> END...