DEFINITION MODULE GKSMenu;

(*
    Title: 	menu manipulation under GKS
    LastEdit:	"Tue Feb 26 16:33:52 1985"
    Author: 	pr
		Cambridge University Computer Laboratory
*)


FROM Streams IMPORT Stream;
FROM Context IMPORT Context;
FROM GKSTypes IMPORT WS;

EXPORT QUALIFIED 
    BindMenu, MenuInput, CancelMenu, RedrawMenu, ArgumentsMenu;


PROCEDURE BindMenu (immediate: Context; display, select: ARRAY OF CHAR; 
        enabled: BOOLEAN);

PROCEDURE MenuInput (ws: WS; normalization: INTEGER; enabled: BOOLEAN);
(*  Specifies the work station and normalization transformation to be
    used when displaying menus - actually only the viewport is relevant	  *)

PROCEDURE CancelMenu;
(*  call this when you want to have a menu explicitly removed from view
    - like on a context change						  *)

PROCEDURE RedrawMenu;
(*  Call this to tell the menu package that its screen area has been cleared
    under its feet							  *)

PROCEDURE ArgumentsMenu (in, out: Stream; format: ARRAY OF CHAR): BOOLEAN;
(*  This works like Arguments, but detects an empty set of arguments to
    a command (which is presumed to have just been executed) and causes
    a menu to be displayed so that a selection can be made and switches
    set and so on							  *)


END GKSMenu.
