6.1. UI-Overview (eClass.rsl)

(****
 *
 * This file defines the objs and ops related to eClass.
 *
 *)

object eClass is 
    components: Roster and OutlinePreview  and Chat and MainView;
    operations: FileNew, FileOpen, FileSave, FileSaveAs, FilePrint,
                FileQuit,EditUndo, EditRedo, EditCut, EditCopy, 
                EditPaste, EditDelete, EditSelectAll, EditFind;
end eClass;


object Classroom is InstructoreClass and eClass*;

object InstructoreClass inherits from eClass
	components: Roster;
end InstructoreClass;

operation showMainView is
	inputs: mv:MainView;
	outputs: mv':MainView;
	description: (*
		showMainView shows or hides the MainView window in eClass,
		when it is checked or unchecked in the View command menu.
		It is toggled in the window via the isVisible boolean.
	*);

	precondition:
		(*
		 * Under the View command menu in eClass, MainView must
		 * have been either checked or unchecked
		 *);

	postcondition:

		if( mv.isVisible = true) then( 
		  (mv.isVisible = false)
		)
		else ( 
		  (mv.isVisible = true)
		)

		and
		
		mv' = mv;

end showMainView;

operation showRoster is
	inputs: r:Roster;
	outputs: r':Roster;
	description: (*
		showRoster shows or hides the Roster window in eClass,
		when it is checked or unchecked in the View command menu.
		It is toggled in the window via the isVisible boolean.
	*);

	precondition:
		(*
		 * Under the View command menu in eClass, Roster must
		 * have been either checked or unchecked
		 *);

	postcondition:

		if( r.isVisible = true)	then( 
		  (r.isVisible = false)
		)
		else (
		  ( r.isVisible = true)
		)

		and
		
		r' = r;

end showRoster;

operation showChat is
	inputs: c:Chat;
	outputs: c':Chat;
	description: (*
		showChat shows or hides the Chat window in eClass,
		when it is checked or unchecked in the View command menu.
		It is toggled in the window via the isVisible boolean.
	*);

	precondition:
		(*
		 * Under the View command menu in eClass, Chat must
		 * have been either checked or unchecked
		 *);

	postcondition:

		if( c.isVisible = true) then (
		  ( c.isVisible = false)
		)
		else (
		  ( c.isVisible = true)
		)

		and
		
		c' = c;

end showChat;

operation showOutlinePreview is
	inputs: oprev:OutlinePreview;
	outputs: oprev':OutlinePreview;
	description: (*
		showOutlinePreview shows or hides the OutlinePreview window in eClass,
		when it is checked or unchecked in the View command menu.
		It is toggled in the window via the isVisible boolean.
	*);

	precondition:
		(*
		 * Under the View command menu in eClass, OutlinePreview must
		 * have been either checked or unchecked
		 *);

	postcondition:

		if( oprev.isVisible = true) then (
		  ( oprev.isVisible = false)
		)
		else (
		  ( oprev.isVisible = true)
		)

		and
		
		oprev' = oprev;

end showOutlinePreview;

operation login is
	inputs: clsroom:Classroom;
    outputs: clsroom':Classroom , rst:Roster;
end login;





Prev: formal specification | Next: roster.rsl | Up: formal specification | Top: index