WindowSpec encapsulates 4 sets of window properties into one int32. Someday this combined bitfield will probably be replaced with several different enums or bitfields. The 4 things defined within this WindowSpec are:
| Enumerator |
|---|
| kAppRootWindowLayer | kAppRootWindowLayer MDI parent window - Windows only |
| kDocumentWindowLayer | kDocumentWindowLayer - documents(and sheets), modeless dialogs |
| kToolbarWindowLayer | kToolbarWindowLayer - above documents, below palettes |
| kPaletteWindowLayer | kPaletteWindowLayer - palettes, floating modeless dialogs, perhaps popout subtools |
| kAppModalWindowLayer | alerts, modal dialogs |
| kUtilityWindowLayer | In the future, additional layers could be added here... kUtilityWindowLayer - system-wide floating TSM, AppleGuide |
| kMenuWindowLayer | kMenuWindowLayer |
| kHelpWindowLayer | kHelpWindowLayer - tips, coachmarks, perhaps popup sliders and popout subtools |
| kWindowFrameMask | 4 bits for window frame. Defines the window border/titlebar. You can choose 0 or 1 of these. If you do not specify a window frame constant, you'll get the default one for your window layer. kWindowFrameMask is the mask to get the frame bits out of the whole bitfield. |
| kStandardWindowFrame | Standard frame based on specified window layer. Internally mapped to one of the other window frame types, based on window layer. |
| kDocWindowFrame | Window frame appropriate for a document window. Standard for kDocumentWindowLayer |
| kPaletteWindowFrame | Window frame appropriate for a palette window. Standard for kPaletteWindowLayer |
| kModelessDialogWindowFrame | Window frame appropriate for a modeless dialog window(like find/change dialog) |
| kMovableModalDialogWindowFrame | Window frame appropriate for a movable modal dialog window. Standard for kAppModalWindowLayer |
| kModalDialogWindowFrame | Window frame appropriate for a modal dialog window. |
| kMovableAlertWindowFrame | Window frame appropriate for a movable alert window. |
| kAlertWindowFrame | Window frame appropriate for an alert window. |
| kAppRootWindowFrame | Window frame appropriate for an app frame window. |
| kBorderOnlyWindowFrame | Window frame which is just a border. Win Only - specifies WS_BORDER and WS_EX_TOOLWINDOW |
| kCustomWindowFrame | Custom Window frame. Mac Only - window proc is specified by client code, rather than platform window |
| kNoWindowFrame | No Window frame. Standard for kHelpWindowLayer and kUtilityWindowLayer |
| kWindowControlsMask | Window Controls. Most callers specify kStandardWindowControls. If you do not specify kStandardWindowControls, you must specify all controls that you want. 8 bits for Type of window controls, such as titlebar, resize controls, zoom controls. Multiple values can be or'd together. kWindowControlsMask is the mask to get at just the window control bits |
| kStandardWindowControls | Standard controls based on specified frame and layer. Here's a list of what the standard controls are for various window frames: for windows with kNoWindowFrame, kStandardWindowControls ==> kNoWindowControls otherwise for kDocWindowFrame windows, kStandardWindowControls ==> kStandardDocWindowControls otherwise for kPaletteWindowFrame windows, kStandardWindowControls ==> kStandardPaletteWindowControls otherwise for kModelessDialogWindowFrame windows, kStandardWindowControls ==> kCloseWindowControl otherwise kStandardWindowControls ==> kNoWindowControls |
| kSideTitlebarControl | Used to put the titlebar on the side of a paletteFrame window |
| kRemoveTitlebarControl | Used to remove the titlebar of a paletteFrame window |
| kListAbsentWindowControls | e.g., to get all except the toolbar control: kListAbsentWindowControls | kToolbarWindowControl |
| kStandardDocWindowControls | Standard control attributes for doc window type. |
| kStandardPaletteWindowControls | Standard control attributes for palette window type. |
| kWindowPolicyMask | Window policy–presence of a bit overrides standard policy, so you only need spec the policies that are non-standard. Note that bits 16..31 come in mutually exclusive pairs–this is asserted in the code. (Hmm – this wastes bits as there are some bit patterns that are illegal such as kHideInBackgroundWindowPolicy | kDontHideInBackgroundWindowPolicy) 16 bits for window behavior. Use kWindowPolicyMask to get just these bits from the whole bitfield. |
| kStandardWindowPolicy | use all standard policies for the specified controls, frame, and layer |
| kHideInBackgroundWindowPolicy | The window should hide when the app is not frontmost. Standard above kDocumentWindowLayer |
| kDontHideInBackgroundWindowPolicy | The window should not hide when the app is not frontmost. Standard at and below kDocumentWindowLayer |
| kTabCyclesKeyFocusWindowPolicy | The tab key should move focus from one widget to the next in this window. Standard above kDocumentWindowLayer |
| kTabDoesntCycleKeyFocusWindowPolicy | The tab key should not move focus from one widget to the next in this window. Standard at and below kDocumentWindowLayer |
| kRememberLastEditboxKeyFocusWindowPolicy | Tells InDesign to remember the last widget in this window that has focus, so the user can restore focus to that editbox using a shortcut. Standard at kPaletteWindowLayer |
| kDontRememberLastEditboxKeyFocusWindowPolicy | Standard at other layers |
| kHasDefaultButtonWindowPolicy | This attribute indicates there's a default button we should push when the window closes. It's assumed to be the cancel button. Standard for any of the dialog or alert window frames |
| kMovableWindowPolicy | Window is movable. Standard except for windows with kNoWindowFrame or a kModalDialogWindowFrame |
| kListBoxGrabsKeyFocusWindowPolicy | When the user clicks on a treeview/listbox, this indicates it should take the keyboard focus. Standard for dialog window frames |