The Facts for the Traveler Window

You’ll need a window to display some interesting facts for the prospective moon traveler. Figure 2.4 shows a sketch of what you’ll create in the Moon Travel Planner application. You’ll display the facts in a window that has an attractive border.

The Facts for the Traveler window for the Moon Travel Planner application

Figure 2-4. The Facts for the Traveler window for the Moon Travel Planner application

Behavior

The window will open when the user chooses Show Facts from the Moon menu. The window’s title bar should display the words “Facts for the Traveler.” The user will be able to close and minimize the window. The user won’t be able to modify or copy the text displayed in the window or to resize the window. The window should be movable and will become inactive when the user makes the main or itinerary window active.

Implementation

Except where indicated, everything you need to implement the Facts for the Traveler window is described later, in Chapter 8. In Interface Builder, you’ll need to:

  • Create the window; define the window size, background, and title.

  • Add a text field; assign an ID and signature to the text field; adjust the layout of the window.

In Project Builder, you’ll need to:

  • Create content to display in the text field.

  • Add code to the main function to create the window from the nib file.

  • Write a function that gets the ID and signature of the text field, reads text from a localizable file, and displays the text in the text field.

  • Write a handler that closes the window when the user clicks the close button and one that responds to the Page Setup and Print commands by calling your functions for page setup and printing.

  • Write functions to handle the Page Setup and Print commands. See Chapter 9 for details.

You won’t need to write code to minimize the window. The operating system takes care of that.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.221.197.95