[ Previous | Next | Contents | Glossary | Home | Search ]
Motif 2.1 User's Guide



Specifying Window Decorations

Window decorations include a border, a maximize button, a minimize button, a Window Menu button, a title bar, and resize handles. Table 5-9 shows the values that may be used to set the window decorations for a window.

Table 17. Valid Window Frame Elements

Frame Element Description
all Includes all decoration elements (default)
border Window border
maximize Maximize button (includes title bar)
minimize Minimize button (includes title bar)
none No decorations
resizeh Resize handles (includes border)
menu Window Menu button (includes title bar)
title Title bar (includes border)

For some applications, the full complement of window decorations may not be desirable. For example, a clock may not need resize handles. The Motif Window Manager has two resources for such situations: clientDecoration and transientDecoration.

The clientDecoration resource allows the user to choose how much decoration to put around each client. The default value is all, meaning that windows include all decorations unless the application removes one or more of them.

The transientDecoration resource allows you to choose the decorations around each transient window. A transient window is a relatively short-lived window, such as a DialogBox. The default value for this resource is menu title resizeh, meaning that transient windows have a title bar with a Window Menu button and resize borders. Even if a decoration is specified by the transientDecoration resource, mwm does not put it around a transient window unless that decoration is also specified by the clientDecoration resource.

The clientDecoration and transientDecoration resources can have more than one value specified at a time:

  1. If the first value in the list is preceded by nothing or by a
    +
    (plus sign), the window manager starts with no frame and assumes that the list contains those elements to be added.

  2. If the list begins with a - (minus sign), the window manager starts with a complete frame and assumes that the list contains elements to be removed from the frame.

    The clientDecoration resource can have any of the following formats.

    To add or remove elements from all classes of clients, the syntax is

    Mwm*clientDecoration: 
     
    value

    For example, remove the maximize button from all windows with the following specification in a resource file:

    Mwm*clientDecoration: -maximize

    To add or remove elements from specific classes of clients, the syntax is

    Mwm*
     
    Clientclass.clientDecoration: 
     
    value

    For example, to remove the resize handles and the maximize button from all clocks displayed on the screen, use the following specification:

    Mwm*XClock.clientDecoration: -resizeh -maximize

    To add or remove elements from any client with an unknown class, the syntax is

    Mwm*defaults*clientDecoration: 
     
    value

    The transientDecoration resource has the following syntax:

    Mwm*transientDecoration: 
     
    value

    For example, to remove the menu button from all transient windows, use the following specification in a resource file:

    Mwm*transientDecoration: title resizeh

    The iconDecoration resource indicates the parts of an icon that are displayed (see Table 5-10).

    Table 18. Valid Icon Elements

    Icon Element Description
    label The icon's label, which may be truncated
    image The icon's image
    activelabel The label of an active is not truncated

    When you are using an icon box, the default value for iconDecoration is label image. Without an icon box, the default value of the resource is activelabel label image. For example, use the following specification to eliminate the label part of icons:

    Mwm*iconDecoration: image

    For window decoration, the Motif Window Manager also has the frameStyle resource, which lets you control the look of the window and its border. Assigning a value of WmRECESSED to this resource makes the window appear to be recessed from its border. Assigning a value of WmSLAB shows a flat window and border.


  3. [ Previous | Next | Contents | Glossary | Home | Search ]