{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

project3 - CSE 335 Fall 2009 Project 3 1 Objectives 1...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
CSE 335 Fall 2009 Project 3 1 Objectives 1. Develop an application with a graphical user interface. 2. Work with the Adapter, Mediator, and Observer patterns. 2 Description In the last two projects, you designed programs to run on the command line. Such applications are still useful, but they have largely been replaced in popular usage by interactive software with a graphical user interface (GUI). You will now bring your work into a more modern form by developing an interactive application of your own. Like in Project 2, your program will load XML documents, search through their nodes, and print matches in context. Unlike in Project 2, however, your program will be able to load different XML documents before exiting, and allow the user to choose which matches they would like to see. This will make your application more useful than in past projects, and teach you about how similar GUI applications can be developed. 2.1 User Interface The goal of your user interface will be to expose the same features as your application from Project 2, only in a friendlier way. To do this, you will be working with the Fast Light Tool Kit (FLTK), a C++-based library for GUI development. Your interface should be designed to meet the following specification. For information on using FLTK, consult the resources in Appendix A. A mockup of the desired GUI is shown in Figure 1. Your GUI does not have to look exactly like this, but it does need to offer the same functionality. There should be a menu bar across the top with which the user can control the operation of the application and load XML files for viewing. Once a file is loaded, its contents should be displayed in a large output box in the center of the window. There should also be a text box into which the user can enter search queries, and another widget with which the user can select from among the available search results. These search controls should cause the appropriate result to be printed to the output box. Finally, there should be a text box at the bottom of the window that displays the current status of the search. 2.1.1 Main Widgets The user’s primary interaction with your program will be done through the various boxes and widgets under the menu. To make this interaction easy, these widgets should work together in the following way: A query should be handled whenever the user types something into the output box and presses the Enter key. 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Figure 1: Mockup of the user interface for this project. If the user enters a blank query — or if the user has not yet entered a query — the root node of the file should be printed to the output box. The result chooser widget should be deactivated , to make it clear to the user that there are no results from which to choose. The status bar should indicate that the full contents of the file are being shown.
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}