![]() |
<< Index >> |
FutureBasic 5 |
appearance window | statement | |
|
appearance window [-] wNum[, [title$][, [rect][, [windowClass][, [windowAttributes] ]]]]
appearance window
statement closely follows the older window
statement, but is used primarily for the creation of windows. You may freely mix window
functions and window
statements with windows that are created via the appearance window
statement. For instance, after creating a window with the appearance window
statement, you could determine its size with the window(_width)
and window(_height)
functions.![]() |
![]() |
Windows with and without theme backgrounds |
appearance window
should be specified as follows. They are interpreted slightly differently depending on whether you are creating a new window or altering an existing one.wNum
- a positive or negative integer whose absolute value is in the range 1 through 2147483647.
title$
- a string expression.
rect
- a rectangle in global screen coordinates. You can express it in either of two forms:
(x1,y1)-(x2,y2) |
Two diagonally opposite corner points. | |
@rectAddr& |
Long integer expression or pointer variable which points to an 8-byte struct such as a Rect type |
windowClass
- an unsigned long integer that specifies the Macintosh window class. To create a windowClass
variable use the following syntax:dim wc as WindowClass
windowClass |
Description | |
_kAlertWindowClass |
I need your attention now. | |
_kMovableAlertWindowClass |
I need your attention now, but I'm kind enough to let you switch out of this app to do other things | |
_kModalWindowClass |
system modal, not draggable | |
_kMovableModalWindowClass |
application modal, draggable | |
_kFloatingWindowClass |
floats above all other application windows. Available in OS 8.6 or later | |
_kDocumentWindowClass |
document windows | |
_kDesktopWindowClass |
the desktop | |
_kHelpWindowClass |
help windows | |
_kSheetWindowClass |
sheets | |
_kToolbarWindowClass |
floats above docs, below floating windows | |
_kPlainWindowClass |
plain | |
_kOverlayWindowClass |
overlays | |
_kSheetAlertWindowClass |
sheet alerts | |
_kAltPlainWindowClass |
plain alerts |
windowAttributes
- this unsigned long integer describes the features and widgets available to a window such as a close box, grow box, or a collapse box. You can dimension a windowAttributes variable as follows:dim wa as WindowAttributes
windowAttributes |
Description | |
_kWindowNoAttributes |
none | |
_kWindowCloseBoxAttribute | close box | |
_kWindowHorizontalZoomAttribute | horizontal zoom | |
_kWindowVerticalZoomAttribute | vertical zoom | |
_kWindowFullZoomAttribute | standard zoom | |
_kWindowCollapseBoxAttribute | collapse box (sends to MacOS X dock) | |
_kWindowResizableAttribute | grow box | |
_kWindowSideTitlebarAttribute | title on side for floating window | |
_kWindowNoUpdatesAttribute | does not receive update event | |
_kWindowNoActivatesAttribute | does not receive activate event | |
_kWindowToolbarButtonAttribute | has a toolbar button in title bar | |
_kWindowNoShadowAttribute | no drop shadow | |
_kWindowLiveResizeAttribute | resize events repeatedly sent while window is being sized | |
_kWindowStandardDocumentAttributes | close box, zoom box, collapse box, grow box | |
_kWindowStandardFloatingAttributes | close box, collapse box |
wNum
value such that abs(
wNum
)
is different from the ID number of any existing window. A new window is created and is assigned an ID number of abs(
wNum
)
. You can use the window's ID number later to identify the window in other FutureBasic statements and functions. If wNum
is negative, the window is created invisibly; it's sometimes useful to create a window invisibly if it will contain controls, edit fields and graphics that may take a long time to build. You can use the window
statement again to make an invisible window visible (see below). When you create a new window, it becomes the current output window. If you create it visibly, it also becomes the current active window.
title$
assigns a string to the window's title bar (if the window has a title bar). If you omit this parameter, the window will be created without a title.
rect
specifies the initial size and location of the window's content rectangle. Note that rect
does not include the window's frame. This parameter is interpreted in a special way if you specify an upper-left coordinate of (0,0) in rect
; in this case, the window is centered in the screen, and its width and height are determined by the right and bottom coordinates of rect
. Note that this special interpretation applies only when you're creating a new window. If you omit this parameter, a window of a "default" size and location is created.
windowClass
specifies the layer in which a window will reside.
windowAttributes
specifies the types of window widgets (close box, grow box) that a window will include.