module Lecture; from File import all; from Layers import all; from Navigation import all; from View import all; from Draw import all; from Insert import all; from Format import all; export all; object CreateLectureWizardDB components: bg:LectureBackground, title:TitleofLecture; description: (* All data gathered from the CreateLectureWizard is stored here for later synchronization with a lecture object. *); end CreateLectureWizardDB; operation WizardSync inputs: wizDB:CreateLectureWizardDB, lect:Lecture; outputs: lect':Lecture; precondition: (* Lecture is constructed in this operation and cannot be instantiated prior. The wizard data base should have a background color or picture and a title. *) ((lect = nil) and (wizDB != nil)) and (wizDB.bg != nil) and (wizDB.title != nil); postcondition: (* The newly created lecture object must be equipped with the color or a picture as a background (embedded into the coding as standard html) and a title as specified in the wizard data base. *) (lect'.bg = wizDB.bg) and (lect'.title = wizDB.title); end WizardSync; operation CreateLectureWizard1 description: (* The first step of the wizard is the introduction, no inputs from the user are required. *); end CreateLectureWizard1; operation CreateLectureWizard2 inputs: c:Color, pict:Picture, wiz:CreateLectureWizardDB; outputs: wiz':CreateLectureWizardDB; description: (* The second step of the wizard sets up the background of the lecture, whether it is a picture or a color, and stores it in the wizard data base. *); end CreateLectureWizard2; operation CreateLectureWizard3 inputs: c:Color, title:string, wiz:CreateLectureWizardDB; outputs: wiz':CreateLectureWizardDB; description: (* The third step of the wizard aqcuires the title and color of the title of the lecture from the user. *); end CreateLectureWizard3; object Lecture inherits from RenderedHtmlContent components : file:File, save:NeedToSave, title:TitleofLecture; operations: DisplayHtmlContent; description: (* This object is responsible for reading the xhtml lecture file and displaying it on an actual tangible window. The ReadLecture operation reads lecture data from an .html file. *); end Lecture; object TitleofLecture is string; object NeedToSave is boolean description: (* True if a lecture needs to be saved. Is true if an edit operation has been preformed. *); end NeedToSave; object LectureToolbar is components: cPrev:ColorPreviewWindow, fPrev:FontPreviewWindow; operations: ColorSelect, FontSizeSelect, FontSelect, PictureInsert, SlideInsert, AutoSlideInsert, TopicInsert, SubTopicInsert; description: (* This object is responsible for the operations of the Lecture Toolbar and allowing users to select the operations. It also has the current color and current font. *); end LectureToolbar; object LinePosition is components: lPos:integer; description: (* This object contains the integer value that represents the number of lines. This object works with positioning object. *); end Line; object Location is components: vertical:LinePosition, horizontal:ColumnPosition; description: (* The location within a lecture is specified by how many lines down it is located, and how many columns to the right that it is positioned. *); end Location; object ColumnPosition is components: cPos:integer; description: (* This object contains the integer value that represents the number of columns. This object works with positioning of objects. *); end ColumnPosition; object ColorPreviewWindow is components: c:PrimaryColor; description: (* The color preview window simply stores the current color, which the PrimaryColor. *); end ColorPreviewWindow; object FontPreviewWindow is components: font:CurrentFont; description: (* The font preview window simply stores the current name and type of font which should be readable from the Font file. *); end FontPreviewWindow; object HtmlContent inherits from File components: tag:Tag, text:HtmlText; description: (* HTML content consists of command tags and text, interspersed. It is also a file that was obtained through from the ImportDialogue. *); end HtmlContent; object Tag is components: tCare:TagsWeCareAbout, tDont:TagsWeDontCareAbout; description: (* HTML tags are subdivided into two broad categories -- those that we care about in the EClass tool, and the rest of the HTML tags that we don't care about because they are not used directly by this tool. *); end Tag; object TagsWeCareAbout is SlideBreakTag and NoteTag and TopicTag description: (* These are tags that need to be modeled for a particular tool's use of HTML, i.e., tags that the tool uses explicitly. The EClass uses standard HTML list tags and a XHTML slide break tag. *); end TagsWeCareAbout; object SlideBreakTag; object NoteTag; object TopicTag; object TagsWeDontCareAbout description: (* The complete specification of HTML is published by the W3C organization, at http://www.w3.org/MarkUp". *); end TagsWeDontCareAbout; object HtmlText is string; operation DisplayHtmlContent inputs: html:HtmlContent; outputs: rhtml:RenderedHtmlContent; precondition: (* There aren't any requirements of the html content as the EClass is programmed to interpret the any html file as a file with potential lecture data. *); postcondition: (* As the precondition. *); end DisplayHtmlContent; object RenderedHtmlContent is components: lectItems:LectureElement*, bg:LectureBackground; description: (* RenderedHtmlContent consists of a collection of SlideBreaks, Topcs, Notes, and Pictures. *); end RenderedHtmlContent; object LectureElement is SlideBreak or Topic or StickyNote or Picture; object LectureBackground is BackgroundColor or BackgroundPicture; object BackgroundPicture is components: pict:Picture; description: (* The lecture's background, if a picture, is specified by the Picture contained within this object. *); end BackgroundPicture; operation ColorSelect inputs: whichColor:integer, newColor:Color, current:PrimaryColor, secondary:SecondaryColor; outputs: current':PrimaryColor, secondary':SecondaryColor; precondition: (* In order to select a color it must be known if either the primary or secondary color must be changed and the new color in which to replace that color with. *) ((whichColor = 1) or (whichColor = 2)) and (newColor != nil) and (if (whichColor = 1) then (newColor != current.col)) and (if (whichColor = 2) then (newColor != secondary.col)); postcondition: (* The new color must be now within either the secondary or current color. *) ((current'.col = newColor) or (secondary'.col = newColor)); end ColorSelect; object TeacherScreen components: lecscr:LectureScreen and cp:ColorPalette and slicon:SlideControl; description: (* The teacher screen is the main teacher interface. *); end TeacherScreen; object LectureScreen components: lay:Layer* and curlay:CurrentLayer and leclay:LectureLayer and bro:Broadcast; description: (* The lecture screen is the window in which the main lecture slide is shown. *); end LectureScreen; object Scrollable components: boolean; description: (* Whether the current slide shown is scrollable, meaning no height/width limitations. *); end Scrollable; object Height components: integer; description: (* The height of the layer in pixels. *); end Height; object Width components: integer; description: (* The width of the layer in pixels. *); end Width; object ExpandableAccess components: boolean; description: (* Whether the text on the screen is allowed to be expanded or not. *); end ExpandableAccess; object Text components: exp:Expandable and expacc:ExpandableAccess and string and align:Alignment and lSpacing:LineSpacing and fStyles:FontStyle*; description: (* The text that appears on a layer, it has a collection (size 3) of FontStyles, first bold, second italics, third underline. *); end Text; object Expandable components: boolean; description: (* Whether the text on the screen is expandable or non-expandable. *); end Expandable; end Lecture;