We shouldavoid treating graphics as a special case of text or text as a specialcase of graphics otherwise we'll end up with redundant formatting andmanipulation mechanisms. The application's interface letsthe user embed text within graphics freely and vice versa. First, we shouldtreat text and graphics uniformly. ![]() In addition to these goals are some constraints. This lets Lexi determine what the user isreferring to when he points to something in the visual representation. Mapping positions on the display to elements in the internalrepresentation.Generating and presenting the document visually.Maintaining the document's physical structure, that is, thearrangement of text and graphics into lines, columns, tables, etc.In particular, the internal representation should support thefollowing: To give Lexi's implementationsimilar qualities, we'll choose an internal representation thatmatches the document's physical structure. That helps make theinterface simple and intuitive. The user should be able to refer to a table as a whole,not as an unstructured mass of text and graphics. For example, a user should be able to treat adiagram as a unit rather than as a collection of individual graphicalprimitives. Lexi's user interface should let users manipulate thesesubstructures directly. 2In turn, these substructures have substructures of theirown, and so on. Yet anauthor often views these elements not in graphical terms but in termsof the document's physical structurelines, columns, figures,tables, and other substructures. ![]() Theseelements capture the total information content of the document. Document StructureĪ document is ultimately just an arrangement of basic graphicalelements such as characters, lines, polygons, and other shapes. The discussion for eachproblem will culminate in a brief introduction to the relevantpatterns. The problem and its solutionwill illustrate one or more design patterns. We explain the goals and constraints in detailbefore proposing a specific solution. Eachproblem has an associated set of goals plus constraints on how weachieve those goals. We discuss these design problems in the sections that follow. Spelling checking and hyphenation.How does Lexi support analytical operations such as checking formisspelled words and determining hyphenation points? How can weminimize the number of classes we have to modify to add a newanalytical operation?.The functionality behind theseinterfaces is scattered throughout the objects in the application.The challenge here is to provide a uniform mechanism both foraccessing this scattered functionality and for undoing its effects. User operations.Users control Lexi through various user interfaces, includingbuttons and pull-down menus.Lexi's design should be as independent of the windowsystem as possible. Supporting multiple window systems.Different look-and-feel standards are usually implemented on differentwindow systems.Supporting multiple look-and-feel standards.Lexi should adapt easily to different look-and-feel standardssuch as Motif and Presentation Manager (PM) without major modification.Hence it'simportant to be able to add and remove embellishments easily withoutaffecting the rest of the application. Such embellishments arelikely to change as Lexi's user interface evolves. ![]() Embellishing the user interface.Lexi's user interface includes scroll bars, borders, and drop shadowsthat embellish the WYSIWYG document interface.Formatting.How does Lexi actually arrange text and graphics into lines andcolumns? What objects are responsible for carrying out differentformatting policies? How do these policies interact with thedocument's internal representation?.Theway we organize this information will impact the design of the rest ofthe application. All editing, formatting, displaying,and textual analysis will require traversing the representation. Document structure.The choice of internal representation for the document affects nearlyevery aspect of Lexi's design.We will examine seven problems in Lexi's design: Surrounding the document are theusual pull-down menus and scroll bars, plus a collection of page iconsfor jumping to a particular page in the document.įigure 2.1: Lexi's user interface Design Problems The document can mix text and graphics freely ina variety of formatting styles. AWYSIWYG representation of the document occupies the large rectangulararea in the center. By the end of this chapter you willhave gained experience with eight patterns, learning them byexample.įigure 2.1 depicts Lexi's user interface. 1 We'llsee how design patterns capture solutions to design problems inLexi and applications like it. This chapter presents a case study in the design of a"What-You-See-Is-What-You-Get" (or "WYSIWYG") document editor called Lexi. A Case Study: Designing a Document Editor
0 Comments
Leave a Reply. |