4. Matchbox Window Types

Before we go on to defining the decorations for each window type, its important to understand the various types of windows supported by matchbox and how decorations are then made up for each type.

Matchbox supports 4 main window types for which decorations can be defined. For each window type, one or more <frame> tags are defined. The window types are;

Main window frames

A 'main' application window.

Can have all 4 sides defined

Dialog window frames

Popup or dialogs windows

Can also have all 4 sides defined

Can also optionally have a dialog-north frame. This is used for border-only dialogs.

You can also optionally specify 'message' alternate window decorations. These are dialogs with The WM_HINTS 'urgency' bit set. They are defined just like dialogs with there frame id set to 'message', 'message-south', 'message-east' etc.

Toolbar/Input window frames

Defines the decorations for toolbar windows - such as xkbd

Has 2 states maximized and minimized, both are defined separately.

Note, an matchbox window manager built with 'alternate input manager windows' does not provide any themeing for these windows. The windows are decoration free.

Menu window

This is the optional drop down task menu used by matchbox titlebar to quickly select between clients.

Each window type <frame> will then have a possible number of <layer> tag children. These tags describe each graphical layer that builds up the eventual window frame decoration. The layers are likely to reference the earlier listed resources. Positioning and sizing of each layer is covered in the next section.

A layer can be of various types and have various attributes, these types include;

plain

A rectangle of solid color. The 'color' attribute references a previously defined color id.

pixmap

A pixmap stretched to its defined area. The 'pixmap' attribute references a previously defined pixmap id.

pixmap-tiled

Like the above but tiles a pixmap rather than stretches it.

label

This specify where the window title text is to be drawn. Both a 'font' and 'color' attribute are used to specify its look. This layer is always painted last on top of all others.

gradient-horiz

Paints a horizonaltal gradient, specified with the attributes startcol and endendcol.

gradient-vert

Like the above but vertical.

iconn

Paints the current window icon.

Each <frame> may also have <button> tag children. These define valid buttons with an 'action' attribute specifying what action should be taken by the window manager when it is activated. Buttons are painted above any layers. Valid button actions include;

next

Brings the next main client to the top of the matchbox window stack.

Used only by the main window type. Only painted when there are multiple main clients

prev

Brings the previous main client to the top of the matchbox window stack.

Used only by then main window type. Only painted when there are multiple main clients.

close

Closes the window.

Valid for all non border ( eg *-east, *-west, *-south ) frame types.

hide

Collapses a main application windows title bar.

Used only by the main window type.

menu

Produces the drop down task menu.

Used only by the main window type. Only painted when there are multiple main clients.

help

A help button.

Used only by the main and dialog window type.

accept

A accept button.

Used only by the main and dialog window type.

maximise

Used by a minimized toolbar window frame type.

minimise

used by a maximized toolbar window frame type. Also works for app windows in matchbox 0.9

Now we'll move on to seeing how these are used.