FutureBasic Logo

<<    Index    >> FutureBasic 5

window   statement



Syntax:
window [-] wNum[, [title][, [rect][, [windowClass][, [windowAttributes] ]]]]

Description:
This statement does any of the following:
Starting in FB 5.7.102 the window statement combines the features of the Appearance Window and Window statements
Appearance Window Image 01
Appearance Window Image 02
Windows with and without theme backgrounds

Window's parameters are specified as shown.
(x1,y1)-(x2,y2)

Two diagonally opposite corner points.
CGRect variable

A Core Graphics rectangle of type CGRect. A CGRect record type ( structure ) contains x, y, width and length


  windowClass - an unsigned long integer specifying the Macintosh window type to use ( i.e. the window's class ).   To create a windowClass variable use the following syntax:

    dim
as WindowClass
wc
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 - an array of signed integers describing the desired window features and behaviors such as a close box, grow box, or a collapse box. An array index, if used, holds only one window attribute. All the available window attribute constants may be found in the FB Header, Tlbx MacWindows.incl, if the following table doesn't have what is needed.

A windowAttributes array variable is dimensioned & loaded as follows.
N.B.: the array index after the last specified attribute must have zero in it:

dim as SInt32 wa(7) //Size the attribute array to contain the planned attributes. Extra indices are ignored
wa(0) = _kHIWindowBitStandardHandler    <=========== Only one window attribute in each index
wa(1) = _kHIWindowBitCloseBox
wa(2) = _kHIWindowBitZoomBox
wa(3) = _kHIWindowBitCollapseBox
wa(4) = _kHIWindowBitResizable
wa(5) = _kHIWindowBitLiveResize
wa(6) = _kHIWindowBitCompositing
wa(7) = 0    <=========== Zero REQUIRED in the index following the last window attribute

windowAttributes   Description
_kWindowNoAttributes
  none
_kHIWindowBitCloseBox   close box
_kHIWindowBitZoomBox   zoom box
_kHIWindowBitCollapseBox   collapse box (sends to MacOS X dock)
_kHIWindowBitResizable   can be resized
_kWindowSideTitlebarAttribute   title on side for floating window
_kHIWindowBitNoUpdates   does not receive update event
_kHIWindowBitNoActivates   does not receive activate event
_kHIWindowBitToolbarButton   has a toolbar button in title bar
_kHIWindowBitNoShadow   no drop shadow
_kHIWindowBitLiveResize   resize events repeatedly sent while window is being sized
_kHIWindowBitStandardHandler   receives standard Carbon Events. FB defaults to this
_kHIWindowBitCompositing   the current OS default. Uses anti-aliasing.

Creating a New Window
Activate an Existing Window
Make an Existing Window Visible or Invisible
Alter the Size, Location or Title of an Existing Window

See Also:
minwindow, maxwindow, get window, window close, window output, window function, appearance window, dialog function