(* * Module Sbd contains storyboarding objects and operations that are not part * of the standard drawing editor functionality defined in module * IdrawInterface. *) module Sbd; from IdrawInterface import Selection, GestureMap, Gesture, GestureName; from Interp import Eval; from Environment import Environment; op Sensitize(s:Selection, gm:GestureMap)->s':Selection description: (* Sensitize the given selection by storing the given gesture map as the map of the output selection. *); post: s'.map = s.map (* and all other components of s' are the same as s *) ; end; op Run(s:Selection, gn:GestureName, e:Environment)->e':Environment description: (* Evaluate the interface procedure associated with the given gesture of the given selection. The output of Run is the same as the output of the interface procedure. *); post: e' = Eval(FindGesture(s.map, gn).procname); end; function FindGesture(gm:GestureMap, gn:GestureName)->Gesture = if (gm[1].name = gn) then gm[1] else FindGesture(gm[2:#gm], gn); end Sbd;