Shaun McCance
shaunm@gnome.org 2008-2009
Mark up control labels from a graphical user interface.

# GUI Labels

    mal_inline_gui = element gui {
      mal_attr_link ?,
      attribute style { xsd:NMTOKENS } ?,
      attribute * - (mal:* | local:*) { text } *,

      mal_inline
    }

Use the `gui` element to mark up the label of a control in a graphical user interface. You can use `gui` for all sorts of controls, including buttons, check boxes, and menu items. If necessary, you can use the `style` attribute to indicate what kind of control is being marked up.

# Notas

The `gui` element can contain a mixture of text and any general inline elements.

The `gui` element can occur in any general inline context, including inside most inline elements, some basic block elements, and certain informational elements.

The `gui` element can also occur inside the `guiseq` element, where it has special meaning.

The `gui` element can link to other pages or documents. See for more information.

The `style` attribute takes a space-separated list of style hints. Processing tools should adjust their behavior according to those style hints they understand.

Typical style hints include:

`botón` | The text of a button
`checkbox` | The label for a check box
`grupo` | The label for a group of controls
`input` | The label for any text entry control
`menú` | The name of a menu
`menuitem` | The name of an item in a menu
`radiobutton` | The label for a radio button
`tab` | The label on a tab

The `gui` element can have attributes from external namespaces. See for more information on external-namespace attributes.

# Ejemplos

Use `gui` to mark up the text of a button:

Click the <gui>Close</gui> button to close the window.

Click the Close button to close the window.

Use `gui` to mark up the label on a tab:

The <gui>Filters</gui> tab contains options to change the behavior of your keyboard to meet certain accessibility needs.

The Filters tab contains options to change the behavior of your keyboard to meet certain accessibility needs.

# Processing Expectations

No particular special rendering is required for `gui` elements. Interface labels may be rendered with lightened text or other sublte styling effects to distinguish them from the surrounding text.

In certain environments, interface labels may be decorated with an icon or other effect based on the `style` attribute. For example, in a table of options where the first element of each row is a `gui` element, those with the `checkbox` style hint could be decorated with a check box icon.

# Comparison to Other Formats

The `gui` element is similar to the deprecated `interface` element in DocBook. DocBook 3 introduced more specific elements for marking up parts of a user interface: `guibutton`, `guiicon`, `guilabel`, `guimenu`, `guimenuitem`, and `guisubmenu`. In practice, there is rarely a need to distinguish between types of interface elements in markup. When such a need arises, it can be handled using attributes on a single element. Furthermore, DocBook's various elements are nowhere near exhaustive. Thus, authors must frequently either abuse a specific element or use the deprecated `interface` element.