\begindata{hlptext,538811512} \textdsversion{12} \template{help} \define{description menu:[Region~4,Description~11] attr:[LeftMargin LeftMargin Cm 85541] attr:[Indent LeftMargin Cm -83230] attr:[Flags KeepPriorNL Int Set] attr:[Flags KeepNextNL Int Set]} \define{newprefs } \chapter{urlbutton: A button that opens a Mosaic window } \section{What urlbutton is }\leftindent{ The \italic{urlbutton} \helptopic{inset} is a button that sends a message to \helptopic{Mosaic} to go to a specific URL. The url button can either be defined interactively, or the button can be generated by the \italic{mkurlbutton} command (see below). } \section{Starting urlbutton }\leftindent{ To insert a urlbutton in a document either choose the \helptopic{ez} menu \bold{Media,URL Button} or press ESC-TAB and answer the ``Data object to insert here'' prompt with the word \italic{urlbutton}. A button will appear which is not configured to do anything. } \section{Working with a urlbutton }\leftindent{ Press the \italic{left} mouse button over a urlbutton to send a message to Mosaic to go to the URL encoded into the button. Mosaic must be running for this to work. Press the \italic{right} mouse button over a urlbutton to configure the button. When the right button is pressed, two things will happen. First, a message is written in the message line explaining what URL will be used when the button is pressed. Second, a new menu will appear with the title \bold{UrlButton} (see \bold{Pop-up menu meanings}). Other menus may disappear because they are no longer appropriate. Click somewhere else in the document to revert to the original menus. } \section{Pop-up menu meanings }\leftindent{ A \bold{UrlButton} menu will appear when the right mouse button is clicked somewhere over a urlbutton. The following items appear on this menu: \subsection{Set URL }Choose this item to set a new URL. A URL is a \italic{Uniform Resource Locator}. See the \helptopic{Mosaic} help for details. \subsection{Set Label }Choose this item to enter a string for use as the label. If a label is not set, the URL is shown instead. A label can be "unset" by entering an empty string. Hit Ctrl-G to abort changing the label. }\section{The \italic{mkurlbutton} command }\leftindent{ The \italic{mkurlbutton} command can produce a datastream for the urlbutton. A typical use for this command is to create a datastream that is placed into a cutbuffer and then pasted into a document. This function is trivial. USAGE: mkurlbutton[-t] [url-spec] The \italic{url-spec} is optional. If it is omitted, the url specification is read as a single line from stdin. A datastream is output. The -t option will generate a text inset with the url as plain text before the button. This is useful if the inset might be eliminated by conversion to plain text. Examples: \description{1) From a shell run \italic{mkurlbutton http:/www.rchland.ibm.com/xxx/yyy | xcut.} Now paste the button into a document. 2) Enter a url's text into a document, select it, run the filter-filter-region-formatted proc, and type \italic{mkurlbutton}. The url text will turn into a urlbutton. This function could be bound to a key or specific menu to avoid the prompt. }} \section{Related tools} \ \leftindent{Move your mouse cursor to one of the following names and click your left mouse button to see the help file for: }\leftindent{\helptopic{linkinset} \helptopic{runbutton} \helptopic{insets} \helptopic{preferences} } (c) Copyright IBM Corp 1995. All rights reserved. \ \enddata{hlptext,538811512}