-- BBFocus.mesa
-- Russ Atkinson, September 2, 1982 5:45 pm
DIRECTORY
BBAction USING [Action],
BBContext USING [Context],
RTBasic USING [TV],
WorldVM USING [World];
BBFocus: CEDAR DEFINITIONS
= BEGIN OPEN BBAction, BBContext, RTBasic, WorldVM;
-- Focus routines
GetDefaultActionAndContext: PROC
RETURNS [action: Action, ctx: Context];
-- gives the current "place" for the user
SetDefaultActionAndContext: PROC [action: Action, ctx: Context];
-- sets the default action and context
SetOctalContextFromGF: PROC
[gf: CARDINAL, world: World ← NIL] RETURNS [tv: TV];
-- set the context to the given global frame in the given world (NIL => use current world)
-- returns NIL if given frame not valid in any way
SetOctalContextFromLF: PROC
[lf: CARDINAL, world: World ← NIL, anyAction: BOOL ← TRUE] RETURNS [tv: TV];
-- set the context to the given local frame in the given world (NIL => use current world)
-- the frame also must be under some action
-- if anyAction = FALSE, must be under current action
-- returns NIL if given frame not valid in any way
GetCurrentWorld: PROC RETURNS [world: World];
-- inherits world from current context or action
-- a couple of minor uilities
FrameTVFromAction: PROC [action: Action] RETURNS [lf: TV];
-- get the local frame for the given action
-- can be NIL if the action is no longer valid
SameLocalFrame: PROC [lf1,lf2: TV] RETURNS [BOOL];
-- tests two local frame TVs for equality
END.