After you've created your window, there isn't a whole lot you can do to fine-tune it—all of the action takes place in the views that the window contains. But what little you can do, such as titling the window, saving its state, displaying it in multiple workspaces, and so on, is described here.
Windows with a document, titled, or floating look have a title tab that displays the window's title. To title your window, follow these rules, listed in order of precedence.
A window that displays the contents of a (single) file typically takes the file's leaf name (not the entire pathname) as its title.
Alternatively, you can create the name from one or more of the file's attributes. For example, when BeMail displays a mail message, it uses the e-mail "Name" and "Subject" attributes in the window's title:
A window's title can also be used to show a document's format, status (saved or unsaved), or other information—but don't over do it.
A new document that hasn't yet been saved to a file should be named "Untitled N", where N is a monotonically increasing integer, starting with 1.
When you save a document under a new filename (through the canonic Save As... command), you change the name of the window to the new filename.
When you save a document as a copy (Save a Copy As...), you don't change the window's name. See <Menus> for more on canonical menu elements.
If your application displays a single (main) window—such as the Be preference and demo applications do—the window's title should be the same as the application.
A floating window that displays a control palette, format catalog, or other auxilliary list is named for the "thing" that the controls affect ("Pen", "Text"), or for the catalog's category ("Named Selections"), and so on.
Avoid vanilla names such as "Tools", "Controls", and "Formats". Also, avoid slang, typos, swearing, smoking, drinking, and gambling. And keep your hands to yourself, damn it, I'm not going to tell you again.
An app should always have a window open (although not necessarily visible) at all times. If the user closes your app's last open content window, your app should quit.
When a window is closed, you should record the window's size and position so it can be reopened in the same place next time. workspace so it can be reopened in the same place the next time the user.
Copyright © 1999 Be, Inc. All rights reserved.
Text last modified April 20, 1999.