



    ________________________________________________________________________
                             Chapter 11: HyperPAD's Building Blocks   187
    ________________________________________________________________________


    CHAPTER 11:  HYPERPAD'S BUILDING BLOCKS

    This chapter describes the elements of a HyperPAD application and
    explains how to use these elements as building blocks for your own pads.
    A pad is nothing more than a collection of pages, organized on
    backgrounds, each of which can contain paint, buttons, and fields. These
    building blocks are the basic structure of every pad.

    As a pad user, you're already familiar with some of these elements. For
    example, in navigating around the pads, you've selected buttons, typed
    into fields, and moved between pages. You may have been using some other
    elements all along, such as the background, without even realizing they
    were there.

    In the following sections, we'll introduce you to all of HyperPAD's
    building blocks and show you how they interact with each other.



    ________________________________________________________________________
                             Chapter 11: HyperPAD's Building Blocks   188
    ________________________________________________________________________


    OBJECTS

    All of the building blocks used in pad construction are called objects.
    However, simply being part of a pad does not qualify an element for the
    family of objects. What distinguishes an object, like a button, from
    paint or text is the ability of an object to respond in some way to
    events happening within the HyperPAD environment.


    PADS

    A pad (or personal application design), like a notepad, is comprised of
    one or more pages containing information. Each page in a pad is layered
    on top of a similar object called the background. Together with buttons
    and fields, these objects determine the structure of a pad.


    BACKGROUNDS

    Backgrounds provide a backdrop onto which the pages are placed.
    Different types of information can be placed on the
    background--including paint, text, buttons, and fields--all of which
    will appear on every page associated with that background. The only time
    that elements on the background are not visible is when a portion of the
    page hides them.


    PAGES

    A page is a layer containing buttons, fields, and paint that is situated
    on top of a background. Unlike a background, the elements on a page are
    only visible when you're  viewing that page.

    You can think of the page as a transparency on top of the background.
    For example, you could create a pad that has a fancy border on the
    background while each page displays different information within that
    border.


    BUTTONS

    A button is an object on either the page or the background that you can
    select to carry out an action. The actions taken by a button may be
    simple, such as causing your computer to beep, or more complex, such as
    placing numeric values into variables.

    Many of the buttons you used throughout Part 1 served as navigation
    devices; selecting them allowed you to travel to other pages or pads, or
    even to other programs. Other buttons activated commands, such as
    finding text or sorting the pages of a pad. In short, buttons provide a
    mechanism for you to deliver commands to HyperPAD.



    ________________________________________________________________________
                             Chapter 11: HyperPAD's Building Blocks   189
    ________________________________________________________________________


    FIELDS

    Fields are containers for text. A field can be placed on the page or on
    the background, depending on whether or not you want pages to share the
    field.

    A field placed on the page contains text visible only when you view that
    page. For example, on the Customize HyperPAD page of the Home pad, there
    is a field that contains the user's name.

    A field placed on a background can be seen and typed into from any page
    that uses that background. The content of the field can be different for
    each page on which the field appears. For example, the Phone pad
    contains many background fields, such as the First name and Last name
    fields, that appear on every page in that pad.

    In addition to providing the pad user with an area in which to enter and
    edit text, fields can also be used solely to display text. For example,
    there are many fields in the Tutorial that only display information.
    These fields are considered locked because the user is unable to type
    text into them.

    As a pad author, you'll find that fields offer you a flexible
    environment for handling text, since all fields can be resized, moved,
    copied, cut, and pasted regardless of whether they contain text. And
    when you modify a field, text is immediately reformatted to fit within
    its new dimensions.


    WHAT IS PAINTING?

    In the section above, we discussed the objects that are used to
    construct pads. HyperPAD also offers you tools to make your applications
    visually appealing and easier to use. Painting is the process by which
    you use these tools to modify the appearance of a page or background.
    With HyperPAD's painting tools, you can add and remove text, paint,
    ASCII characters, and lines.



    ________________________________________________________________________
                             Chapter 11: HyperPAD's Building Blocks   190
    ________________________________________________________________________


    TO BEGIN DESIGNING

    In order to utilize HyperPAD's painting tools and work with objects, you
    have to switch out of Browse mode and into Authoring mode.


    To set the user level to Scripting:

    1.  Press SHIFT+ALT+F to open the extended File menu.

    2.  Press T to select the Protect command.

    The Protect dialog box will appear.

    3.  Select the scripting user level.

    The scripting user level gives you access to all of HyperPAD's tools and
    object-manipulation capabilities. Additionally, you can modify and
    create scripts that control the functionality of the HyperPAD
    environment.


    SWITCH FROM BROWSING TO AUTHORING

    Once you begin modifying the pads, you'll need to switch back and forth
    between authoring and browsing in order to experiment with the pad
    you're working on. One way to do so is by selecting different tools from
    the Tools menu, such as Paint and Browse. You can quickly toggle between
    the current authoring tool and the Browse tool by pressing ALT+ESC.


    CONCLUSION

    Now that you've learned about HyperPAD's building blocks, you're ready
    to put these elements to work in creating your own pads. Throughout the
    remainder of Part 2, we'll discuss the features and functionality
    available in HyperPAD's authoring environment.
