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;
A 'main' application window.
Can have all 4 sides defined
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.
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.
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;
A rectangle of solid color. The 'color' attribute references a previously defined color id.
A pixmap stretched to its defined area. The 'pixmap' attribute references a previously defined pixmap id.
Like the above but tiles a pixmap rather than stretches it.
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.
Paints a horizonaltal gradient, specified with the attributes startcol and endendcol.
Like the above but vertical.
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;
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
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.
Closes the window.
Valid for all non border ( eg *-east, *-west, *-south ) frame types.
Collapses a main application windows title bar.
Used only by the main window type.
Produces the drop down task menu.
Used only by the main window type. Only painted when there are multiple main clients.
A help button.
Used only by the main and dialog window type.
A accept button.
Used only by the main and dialog window type.
Used by a minimized toolbar window frame type.
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.