Specifies the window controls and appearance of a stack window.
# Metadata
Platforms: desktop, server OS: mac, windows, linux Introduced: 1.0 Security:
# Syntax
set the decorations of stack to {controlList | WDEF | default | empty}
# Examples
set the decorations of this stack to "title,minimize"
set the decorations of stack "Splash Screen" to empty
set the decorations of stack myStack to 127 -- a WDEF resource
# Description
Use the decorations property to change the appearance of windows.
You can specify one or more of the following decorations: * title: Shows the window's title bar * minimize: Shows the minimize (iconify) box in the title bar * maximize: Shows the maximize (zoom) box in the title bar * close: Shows the close box in the title bar * menu: Shows the menu bar in the window (Unix and Windows only) * system: Shows the window as a system window (OS X, Unix, and Windows only) * noShadow: Remove the window's drop shadow (OS X only) * metal: Shows the window with a textured appearance (OS X only)
>*Note:* The "metal" and "system" options are not compatible. If you set > a stack decorations to a string that includes both, its > window becomes a non- metal system window.
>*Cross-platform note:* On Mac OS, the "system" option > has no effect.
Setting a stack's decorations to empty removes the entire title bar, along with the window borders.
Setting a stack's decorations to "default" gives it appropriate decorations for its style. If the style is "topLevel", the window includes all the decorations (title bar, menu bar [on Unix and Windows], close box, minimize box, maximize box) by default. Otherwise, the window includes a title bar by default.
The decorations property interacts with the closeBox, minimizeBox, metal, shadow, systemWindow, and zoomBox properties. Setting any of these properties to true changes the decorations property to include the corresponding option, and including any of the "close", "minimize", "metal", "noShadow", "system", and "maximize" options in a stack decorations sets the corresponding property to true.
set the decorations of stack "Test" to \ "metal,title,close,minimize,maximize"
This applies only to the decorations property. If you use the individual properties (such as metal and closeBox) instead, you don't need to reset the other decorations-related properties.
>*Cross-platform note:* On Mac OS and OS X systems, the "menu" > decoration has no effect. On Windows systems, the "menu" decoration > must be set along with the "maximize" or "minimize" decorations: you > cannot use "maximize" or "minimize" without including "menu". On OS X > systems, the minimize, close, and zoom boxes are always visible if the > title bar is, and turning off these options disables the boxes instead > of removing them, in comformance with user-interface guidelines for > this platform.
A WDEF identifier is the number of a Mac OS WDEF resource multiplied by 16, plus a variation code between zero and 15. For example, if you have a WDEF resource whose ID is 124, and you want to use its 14th variation (which is number 13, since the numbers start with zero), set the stack's decorations property to 1997. This number is 124 (the resource ID) times 16, plus 13 (the variation code). Various WDEF resources are included in the operating system--the exact WDEFs available vary from version to version. WDEF routines, like externals, can be written in a programming language and compiled.
>*Cross-platform note:* WDEF can be used only on > Mac OS and OS X. For a cross-platform method of > changing a window's shape, use the windowShape property.
# Tags
# See
- **keyword:** default, minimize, maximize, shadow, title, string - **property:** metal, windowShape, fullscreen, draggable, properties, style, zoomBox, shadow, closeBox, minimizeBox, longWindowTitles, decorations, systemWindow, externals - **message:** closeStackRequest, unIconifyStack - **function:** stacks - **glossary:** property, menu bar, WDEF, stack window, cross-platform, Windows, OS X, close box, title bar, Mac OS, Unix, system window - **object:** stack