A popup window displays a topic when the user clicks a hot spot (such as a word, phrase, or bitmap). Popup windows don't include title bars or scroll bars, and they are not sizable. They disappear as soon as the user clicks the mouse or presses any key. A popup-window topic usually contains text, but it can also include hot spots, bitmaps, audio segments, or animation sequences like any other topic.
The following sample screen includes a hot spot that displays a window for the term “Mexican War.” Popup-window hot spots appear within the topic as green text with dotted underlines. The mouse pointer also changes shape from an arrow pointer to a pointing finger when it moves over a popup-window hot spot. Authors can also make popup-window hot spots invisible in the topic. This pointer change identifies invisible hot spots in the title.
To see the popup window, the user clicks the hot spot, which causes the window to be displayed on top of the current topic, as shown in the following illustration:
The window remains visible until the user clicks the mouse button again or presses
any key.
To code a popup window, you must code the topic that will appear in the window and assign it a context string. The coding for the hot spot that pops up the window is made up of the following parts.
A word, phrase, or bitmap reference formatted as underline text
The context string for the destination topic formatted as hidden text
The following example shows how this might look in the topic file:
Mexican WarMexicanWar
{\ul hot-spot text}{\v [%]destination-context-string}
hot-spot text
Hot-spot text or reference to a hot bitmap in the topic. When the user clicks this text or bitmap, Viewer displays in a popup window the topic indicated by the immediately following context string. See “Bitmaps (16 Colors),” later in this chapter, for more information on coding for bitmap references.
destination-context-string
Context string of the topic Viewer displays in a popup window. If the first character in this context string is a percent sign (%), the hot spot is invisible in the topic.
The following example shows the RTF for the popup-window example shown earlier. It displays the topic with context string “MexicanWar” in a popup window. The text “Mexican War” in the topic becomes the hot spot for the popup window.
{\ul Mexican War}{\v MexicanWar}