@DATABASE Libraries Manual
@NODE MAIN "Amiga RKM Libraries: 4 Intuition Windows"
@INDEX Lib_Index/MAIN
@TOC Libraries_Manual/User
This chapter provides a general description of windows: how to open
windows and define their characteristics; how to get the system gadgets
for shaping, moving, closing, and depth arranging windows; how to handle
window I/O; and how to preserve the display when windows get overlapped.

@{" About Windows " link 4-1}                          @{" The Window Structure " link 4-6}
@{" Basic Window Structures and Functions " link 4-2}  @{" Window Attributes " link 4-7}
@{" Communicating with Intuition " link 4-3}           @{" Other Window Functions " link 4-8}
@{" Window Types " link 4-4}                           @{" Function Reference " link 4-9}
@{" Preserving the Window Display " link 4-5}

@ENDNODE

@NODE 4-1 "4 Intuition Windows / About Windows"
Windows are rectangular display areas that open on screens.  The window
acts as a virtual terminal allowing a program to interact with the user as
if it had the entire display all to itself.

Each window opens on a specific screen and takes certain characteristics,
such as resolution, colors and display attributes, from that screen. These
values cannot be adjusted on a window by window basis.  Other window
characteristics such as the text font are inherited from the screen but
can be changed.

An application may open several windows at the same time on a single
screen.  The Workbench and other public (shareable) screens allow windows
opened by different applications to coexist on the same screen.

Windows are moveable and can be positioned anywhere within the screen on
which they exist.  Windows may also have a title and borders containing
various gadgets for controlling the window.

@{" Window System Gadgets " link 4-1-1}  @{" The Active Window " link 4-1-2}

@ENDNODE

@NODE 4-1-1 "4 / About Windows / Window System Gadgets"
Each window may have a number of system gadgets which allow the user to
control window size, shape and arrangement.  These gadgets are: the drag
bar, the depth gadget, the sizing gadget, the zoom gadget and the close
gadget.

The drag bar allows the user to change the position of the window with
respect to the screen.  The drag bar is in the top border of a window and
occupies any space in the top border that is not used by other gadgets.
The window may be dragged left, right, up and down on the screen, with the
limitation that the entire window must remain within the screen's
boundaries.  This is done by positioning the pointer over the title bar,
selecting the window and dragging to the new position.  Window drag may be
cancelled by pressing the right mouse button before the drag is completed.

    @{" Figure 4-1: A Window with System Gadgets " link "ADCD_v1.2:Reference_Library/lib_pics/4-1.iff/Main"}

The depth gadget allows the user to depth arrange a window with respect to
other windows on the screen.  The depth gadget is always positioned in the
upper right corner of the window.  Clicking the depth gadget will move the
frontmost window behind all other windows.  If the window is not the
frontmost, it will be moved to the front.  Selecting the depth gadget with
the Shift qualifier always moves the window to the back (behind other
windows).

The sizing gadget allows the user to change the size of the window.
Sizing is subject to minimum and maximum values set by the application.
Width and height are independent in a sizing operation.  The sizing gadget
is always positioned in the lower right corner of the window.  It allows
the user to drag this corner of the window to a new position relative to
the upper left corner of the window, thus changing the width and height of
the window. Window sizing using the sizing gadget may be cancelled by
pressing the right mouse button before the size is completed.

The zoom gadget allows the user to quickly alternate between two preset
window size and position values.  The zoom gadget is always placed
immediately to the left of the depth gadget.  If there is no depth gadget
on the window, the zoom gadget will still appear next to where the depth
gadget would have been.

The close gadget performs no direct action on the window, rather it causes
Intuition to send a message to the application to close the window. This
allows the application to perform any required processing or to warn the
user before it closes the window.  The close gadget is always positioned
in the upper left corner of the window.

@ENDNODE

@NODE 4-1-2 "4 / About Windows / The Active Window"
There is only one window in the system active at any time.  The active
window receives all user input, including keyboard and mouse events.  This
is also known as the input focus, as all input is focused at this single
point.

Some areas of the active window are displayed more boldly than those on
inactive windows.  The active window's borders are filled in with a color
which is designed to stand out from the background while inactive windows
have their borders filled with the background color.  The specific
coloring of active and inactive windows is dependent on the screen on
which the window is opened.  See the section "@{"DrawInfo and the 3D Look" link ADCD_v1.2:Reference_Library/Libraries/Lib_3/3-5}" in
the "Intuition Screens" chapter for more information.

Windows have two optional titles:  one for the window and one for the
screen.  The window title appears in the top border of the window,
regardless of whether the window is active or inactive.  The window's
screen title appears in the screen's title bar only when the window is
active.  This gives the user a secondary clue as to what application is
active in the screen.

The active window's menus are displayed on the screen when the right mouse
button (the menu button ) is pressed.  If the active window has no menus,
then none will be displayed.

Each window may also have its own mouse-pointer image.  Changing the
active window will change the pointer to the one currently set for the new
active window.

@ENDNODE

@NODE 4-2 "4 Intuition Windows / Basic Window Structures and Functions"
This section introduces the basic data structures and functions an
application uses to create an Intuition window.  Intuition uses the Window
data structure defined in <intuition/@{"intuition.h" link ADCD_v1.2:Inc&AD2.1/includes/intuition/intuition.h/MAIN}> to represent windows.
Most of Intuition's window functions use this structure in some way.
Other related structures used to create and operate windows are summarized
in Table 4-1.


       Table 4-1: Data Structures Used with Intuition Windows


  Structure Name  Description                    Defined in Include File
  --------------  -----------                    -----------------------
  @{"Window" link 4-6}          Main Intuition structure that  <intuition/@{"intuition.h" link ADCD_v1.2:Inc&AD2.1/includes/intuition/intuition.h/MAIN 797}>
                  defines a window

  @{"TagItem" link 4-2-1-2}         General purpose parameter        <utility/@{"tagitem.h" link ADCD_v1.2:Inc&AD2.1/includes/utility/tagitem.h/MAIN 31}>
                  structure used to set up
                  windows in V37

  NewWindow       Parameter structure used to    <intuition/@{"intuition.h" link ADCD_v1.2:Inc&AD2.1/includes/intuition/intuition.h/MAIN 973}>
                  create a window in V34

  @{"ExtNewWindow" link 4-7-1}    An extension to the NewWindow  <intuition/@{"intuition.h" link ADCD_v1.2:Inc&AD2.1/includes/intuition/intuition.h/MAIN 1039}>
                  structure used in V37 for
                  backward compatibility with
                  older systems

  @{"Layer" link ADCD_v1.2:Reference_Library/Libraries/Lib_30/30-1-1}           A drawing rectangle that          <graphics/@{"clip.h" link ADCD_v1.2:Inc&AD2.1/includes/graphics/clip.h/MAIN 33}>
                  clips graphic operations
                  falling within its boundaries

  @{"RastPort" link ADCD_v1.2:Reference_Library/Libraries/Lib_27/27-4-1}        General purpose handle used     <graphics/@{"rastport.h" link ADCD_v1.2:Inc&AD2.1/includes/graphics/rastport.h/MAIN 55}>
                  for graphics library drawing
                  operations.


Intuition's window system relies on the layers library and graphics
library to implement many of its features.  The Window structure is
closely related to the Layer structure defined in <graphics/@{"clip.h" link ADCD_v1.2:Inc&AD2.1/includes/graphics/clip.h/MAIN}> and
the RastPort structure defined in <graphics/@{"rastport.h" link ADCD_v1.2:Inc&AD2.1/includes/graphics/rastport.h/MAIN}>.  The system uses
these structures to store drawing state data. In general, applications
don't have to worry about the internal details of these structures but use
them instead as convenient handles, passing them as arguments to
lower-level functions. See the "@{"Layers Library" link ADCD_v1.2:Reference_Library/Libraries/Lib_30/30-1}" and "@{"Graphics Primitives" link ADCD_v1.2:Reference_Library/Libraries/Lib_27/27-4}"
chapters for more information.

@{" Opening a Window " link 4-2-1}              @{" Window Dimensions " link 4-2-5}
@{" Closing Windows " link 4-2-2}               @{" Window Border Dimensions " link 4-2-6}
@{" Windows and Screens " link 4-2-3}           @{" Changing Window Size Limits " link 4-2-7}
@{" Graphics and Text in Windows " link 4-2-4}

@ENDNODE

@NODE 4-2-1 "4 / Basic Window Structures and Functions / Opening a Window"
A window is opened and displayed by a call to one of the OpenWindow()
functions:  @{"OpenWindow()" link ADCD_v1.2:Inc&AD2.1/autodocs/intuition/OpenWindow()}, @{"OpenWindowTagList()" link ADCD_v1.2:Inc&AD2.1/autodocs/intuition/OpenWindowTagList()} or @{"OpenWindowTags()" link ADCD_v1.2:Inc&AD2.1/autodocs/intuition/OpenWindowTags()}.

    struct Window *OpenWindowTagList( struct NewWindow *newWindow,
                                     struct TagItem *tagList );
    struct Window *OpenWindowTags( struct NewWindow *newWindow,
                                  unsigned long tag1Type, ... );
    struct Window *OpenWindow( struct NewWindow *newWindow );

The type of window and its attributes are specified in @{"NewWindow" link 4-2 8} or
@{"TagItem" link 4-2 8} structures depending on which function is used.  These functions
all return a pointer to a new @{"Window" link 4-2 8} structure if they succeed.  A NULL
return indicates failure.

@{"OpenWindowTagList()" link ADCD_v1.2:Inc&AD2.1/autodocs/intuition/OpenWindowTagList()} and @{"OpenWindowTags()" link ADCD_v1.2:Inc&AD2.1/autodocs/intuition/OpenWindowTags()} are available only in Release 2
(V36) and later versions of the OS.  For these functions, window
attributes are specified in @{"TagItem" link 4-2 8} structures which are paired data items
specifying an attribute and its setting.  (See the `@{"Utility Library" link ADCD_v1.2:Reference_Library/Libraries/Lib_37/37-1}'
chapter for more information on TagItems.)

@{"OpenWindow()" link ADCD_v1.2:Inc&AD2.1/autodocs/intuition/OpenWindow()} is available in all versions of the OS.  Window attributes
can be specified using a @{"NewWindow" link 4-2 8} structure but only a limited set of
window attributes are available this way.  To support both the new window
features of Release 2 and compatibility with older versions of the OS, use
OpenWindow() with an extended version of the @{"NewWindow" link 4-2 8} structure named
@{"ExtNewWindow" link 4-2 8}.  See the @{"WFLG_NW_EXTENDED" link 4-7-1} flag description in the "Window
Attributes" section below for more information on using OpenWindow() with
the extended NewWindow structure.

Further references to OpenWindow() in this chapter will apply to all three
functions.  These calls are the only proper method for allocating a @{"Window" link 4-2 8}
structure.  The tag based versions are recommended for V36 and later
versions of the OS.  Use the @{"ExtNewWindow" link 4-2 8} structure with OpenWindow() to
provide backward compatibility.

@{" OpenWindowTagList() Example " link ADCD_v1.2:Reference_Library/Libraries/lib_examples/openwindowtags.c/MAIN}  @{" Setting Window Attributes " link 4-2-1-2}

@ENDNODE

@NODE 4-2-1-2 "4 / / Opening A Window / Setting Window Attributes"
Depending on which function is used to open a window, the window's
attributes may be specified using @{"TagItem" link ADCD_v1.2:Inc&AD2.1/includes/utility/tagitem.h/MAIN 31}s, or a @{"NewWindow" link 4-2 8} structure or an
@{"ExtNewWindow" link 4-2 8} structure.  In the @{"code above" link ADCD_v1.2:Reference_Library/Libraries/lib_examples/openwindowtags.c/MAIN}, the window attributes are set
up with an array of TagItems:

    struct TagItem win_tags[] =
        {
        {WA_Left,       MY_WIN_LEFT},
        {WA_Top,        MY_WIN_TOP},
        {WA_Width,      MY_WIN_WIDTH},
        {WA_Height,     MY_WIN_HEIGHT},
        {WA_CloseGadget,TRUE},
        {WA_IDCMP,      IDCMP_CLOSEWINDOW},
        {TAG_DONE, NULL},
        };

These window attributes set the window's position (@{"WA_Left, WA_Top" link 4-7-2}) and
size (@{"WA_Width, WA_Height" link 4-7-2}), request a close gadget on the window
(@{"WA_CloseGadget" link 4-7-3 36}) and ask Intuition to send a message whenever the user
activates the close gadget (@{"WA_IDCMP" link 4-7-2 35}).

Throughout this chapter window attributes are referred to by their TagItem
ID name (the name is always prefixed with "WA_").  See the section below
on "@{"Window Attributes" link 4-7}" for a complete list.

    Old and New Flag Names.
    -----------------------
    The names used for IDCMP flags and window flags have been changed
    under Release 2.  IDCMP flag names are now preceded by "IDCMP_".
    Likewise window flag names are now preceded by "WFLG_".  The old
    names (and their new equivalents) are listed in
    <intuition/@{"iobsolete.h" link ADCD_v1.2:Inc&AD2.1/includes/intuition/iobsolete.h/MAIN}>.  You may want to refer to this file if
    you are working with example code written for V34 and older versions
    of the OS.

@ENDNODE

@NODE 4-2-2 "4 / Basic Window Structures and Functions / Closing Windows"
Call the @{"CloseWindow()" link ADCD_v1.2:Inc&AD2.1/autodocs/intuition/CloseWindow()} function to close a window, remove its imagery from
the display, and clean up any system resources used by the window.
Typically, you call CloseWindow() when Intuition informs you that the user
has selected the window's close gadget but this is not a requirement nor
does the window have to be active to be closed.

    void CloseWindow( struct Window *window );

Pass this function a pointer to the @{"Window" link 4-2 8} structure returned by one of
the @{"OpenWindow()" link 4-2-1} calls.

If you call @{"CloseWindow()" link ADCD_v1.2:Inc&AD2.1/autodocs/intuition/CloseWindow()} on the active window, the previously active
window (if available) will become the active window.  If the previously
active window has already closed, then the window active prior to that
window will become the active window.  (Applications should not rely on
this behavior.  To make a specific window become active, call the
@{"ActivateWindow()" link 4-3-3 19} function.)

Intuition does not automatically close a window when the user selects the
close window gadget.  Instead, Intuition sends your program a message
about the user's action.  The program can then perform whatever cleanup is
necessary before closing the window with the @{"CloseWindow()" link ADCD_v1.2:Inc&AD2.1/autodocs/intuition/CloseWindow()} function.

@ENDNODE

@NODE 4-2-3 "4 / Basic Window Structures and Functions / Windows and Screens"
Windows may be opened on one of three screen types:  a custom screen, a
public screen or the Workbench screen.  A custom screen is one created and
controlled by your application.  Once you have set up a custom screen, you
may open a window on it directly by calling one of the three open window
functions.

To open a window on a custom screen, call @{"OpenWindowTagList()" link 4-2-1} (or
@{"OpenWindowTags()" link 4-2-1}) with the @{"WA_CustomScreen" link 4-7-2 91} tag along with a pointer to the
custom screen.  This must be a pointer to a screen created by your
application.  For systems prior to Release 2, use the @{"OpenWindow()" link 4-2-1} call
with @{"NewWindow" link 4-2 8}.Type set to CUSTOMSCREEN and NewWindow.Screen set to a
pointer to your custom screen.

You may choose to open a window on an existing public (shareable) screen
instead of setting up your own custom screen.  Such windows are often
referred to as visitor windows because they "visit" a screen managed by
the system or another application.

For Workbench or other public screens that are not created and managed
directly by your application, you must lock the screen before opening the
window.  This ensures that the screen remains open while your call to open
the window is processed.  One way to obtain a lock on a public screen is
by calling the @{"LockPubScreen()" link ADCD_v1.2:Reference_Library/Libraries/Lib_3/3-4 34} function (see the "@{"Intuition Screens" link ADCD_v1.2:Reference_Library/Libraries/Lib_3/3-4-1}"
chapter).

Use @{"WA_PubScreenName" link 4-7-2 129} with NULL to open a visitor window on the default
public screen (normally the Workbench screen).  If a name is provided and
the named screen exists, the visitor window will open on that named
screen.  In this case the system locks the named screen for you so there
is no need to call @{"LockPubScreen()" link ADCD_v1.2:Reference_Library/Libraries/Lib_3/3-4 34} directly.  The open window call will
fail if it cannot obtain a lock on the screen.  If the
@{"WA_PubScreenFallBack" link 4-7-2 137} tag is TRUE, the window will open on the default
public screen when WA_PubScreenName can't be found.

Another method to open a visitor window on a public screen is to use the
@{"WA_PubScreen" link 4-7-2 121} tag along with a pointer to the @{"Screen" link ADCD_v1.2:Reference_Library/Libraries/Lib_3/3-2-2 6} structure of the
public screen obtained via @{"LockPubScreen()" link ADCD_v1.2:Reference_Library/Libraries/Lib_3/3-4 34}.

The application may also request the name of the "next" public screen,
which allows windows to "jump" between public screens.  This is done by
closing the application window on the first screen and opening a new
window on the next screen.  (See the "@{"Intuition Screens" link ADCD_v1.2:Reference_Library/Libraries/Lib_3/3-1-2}" chapter for more
information on public and custom screens.)

If no action is taken by the programmer to open the window on a specific
screen, the window will open on the default public screen (normally the
Workbench).  This behavior is shown in the above @{"example" link ADCD_v1.2:Reference_Library/Libraries/lib_examples/openwindowtags.c/MAIN} using
@{"OpenWindowTagList()" link 4-2-1}.

There are two global modes which come into play when a visitor window is
opened on a public screen.  If the global mode SHANGHAI is set, Workbench
application windows will be opened on the default public screen.  A second
global mode, POPPUBSCREEN, forces a public screen to be moved to the front
when a visitor window opens on it.  These modes can be changed using
@{"SetPubScreenModes()" link ADCD_v1.2:Reference_Library/Libraries/Lib_3/3-4 34}, however, these should only be set according to the
preferences of the user.

@{" Simple Window on a Public Screen Example " link ADCD_v1.2:Reference_Library/Libraries/lib_examples/winpubscreen.c/MAIN}

@ENDNODE

@NODE 4-2-4 "4 / Window Structures and Functions / Graphics and Text in Windows"
Applications can call functions in both the graphics library and the
Intuition library to render images, lines, text and other graphic elements
in windows.  The graphics library provides primitive operations such as
area fill, line drawing, text and animation.

The number of colors and the palette available in a window are defined by
the screen in which the window opens.  Applications should never change
the palette of a screen unless the screen is a custom screen created by
the application.

Graphics rendered into the window should respect the drawing pens defined
for the screen.  See the section on "@{"DrawInfo and the 3D Look" link ADCD_v1.2:Reference_Library/Libraries/Lib_3/3-5-1}" in the
"Intuition Screens" chapter for more information.

Default window fonts come from one of two places, depending on the screen
on which the window opens.  The window title font is always taken from the
screen font.  If the screen is opened with a font specified, either by
specifying the tag @{"SA_Font" link ADCD_v1.2:Reference_Library/Libraries/Lib_3/3-3-2 125} or the variable @{"NewScreen" link ADCD_v1.2:Reference_Library/Libraries/Lib_3/3-2-2 6}.Font, then
@{"Window.RPort" link 4-6 66}->Font is taken from the screen's font.  Otherwise, the
window's rastport's font is taken from @{"GfxBase->DefaultFont" link ADCD_v1.2:Inc&AD2.1/includes/graphics/gfxbase.h/MAIN 24}. This
information is available to the application if it opened the screen.

If the application did not open the screen, it has no way of knowing which
font has been used for the window.  Applications that require to know the
window's font before the window is open must explicitly set the font
(using @{"SetFont()" link ADCD_v1.2:Reference_Library/Libraries/Lib_29/29-2-1}) for that window after opening it.  In this case, the
application may use any font it desires.  It is recommended that
applications use the screen's font if they support proportional fonts, and
@{"GfxBase->DefaultFont" link ADCD_v1.2:Inc&AD2.1/includes/graphics/gfxbase.h/MAIN 24} otherwise, as these fonts are generally the user's
preference.

Intuition also provides a minimal high level interface to some of the
functions in the Graphics library.  This includes calls to draw lines,
text and images.  See the chapter entitled
"@{"Intuition Images, Line Drawing and Text" link ADCD_v1.2:Reference_Library/Libraries/Lib_8/MAIN}," for more information about
using Intuition to render graphics.

@ENDNODE

@NODE 4-2-5 "4 / Basic Window Structures and Functions / Window Dimensions"
The initial position and dimensions of the window are defined in the
@{"OpenWindowTagList()" link 4-2-1} call.  These values undergo error checking before the
window is actually opened on the screen.  If the dimensions are too big,
the window will fail to open.  (Or, you can use the @{"WA_AutoAdjust" link 4-7-3 135} tag if
you want Intuition to move or size your window to fit.)

Maximum and minimum size values may also be defined, but are not required
If the window does not have a sizing gadget.  In setting these dimensions,
bear in mind the horizontal and vertical resolutions of the screen in
which the window will open.

The maximum dimensions of the window are unsigned values and may legally
be set to the maximum by using the value 0xFFFF, better expressed as "~0".
Using this value for the maximum dimensions allows the window to be sized
to the full screen.

@{" A Display Sized Window Example " link 4-2-5-1}

@ENDNODE

@NODE 4-2-5-1 "4 / / Window Dimensions / A Display Sized Window Example"
A full screen window is not always desirable.  If the user is working on a
large, scrolling screen, they may only want a window the size of the
visible display.  The following example calculates the visible area on a
screen and opens a window in that area.  The example assumes that the
screen display clip is as large or larger than text overscan (OSCAN_TEXT)
which is set by the user.  The window is opened in the text overscan area,
not within the actual display clip that is used for the screen.  Use
@{"QueryOverscan()" link ADCD_v1.2:Reference_Library/Libraries/Lib_3/3-6-1 76} to find the standard overscan rectangles (display clips)
for a screen.  Use the graphics library call @{"VideoControl()" link ADCD_v1.2:Reference_Library/Libraries/Lib_27/27-2-9-4 15} to find the
true display clip of the screen (see the chapter on "@{"Graphics Primitives" link ADCD_v1.2:Reference_Library/Libraries/Lib_27/27-2-9-4}"
for more information on VideoControl()).  The ViewPortExtra structure
contains the display clip information.

    About Screen Coordinates.
    -------------------------
    The screen's actual position may not exactly equal the coordinates
    given in the LeftEdge and TopEdge fields of the @{"Screen" link ADCD_v1.2:Reference_Library/Libraries/Lib_3/3-2-2 6}
    structure.  This is due to hardware constraints that limit the
    fineness of the positioning of the underlying constructs.  This may
    cause a window which is opened in the visible part of the screen to
    be incorrectly positioned by a small number of pixels in each
    direction.  See the discussion of the screen's LeftEdge and
    TopEdge in the "@{"Intuition Screens" link ADCD_v1.2:Reference_Library/Libraries/Lib_3/3-2-1 36}" chapter for more information.

    @{" visiblewindow.c " link ADCD_v1.2:Reference_Library/Libraries/lib_examples/visiblewindow.c/MAIN}

@ENDNODE

@NODE 4-2-6 "4 / Basic Window Structures and Functions / Window Border Dimensions"
Intuition automatically draws a border around a window unless directed
otherwise, such as by setting the @{"WFLG_BORDERLESS" link 4-7-3 68} flag.  @{"Borderless" link 4-4-2}
windows may not have a window title or gadgets in the border (this
includes the standard system gadgets).  Otherwise they won't come out
properly borderless.

The size of the border of an open window is available in the @{"Window" link 4-2 8}
structure variables @{"BorderLeft, BorderTop, BorderRight and BorderBottom" link 4-6 71}.
Intuition fills these in when the window is opened.  To calculate the
window border sizes before the window is opened you use information in the
@{"Screen" link ADCD_v1.2:Reference_Library/Libraries/Lib_3/3-2-2 6} structure as shown in the next listing.

    Gadgets Can Change Border Sizes.
    --------------------------------
    The following calculations do not take application border gadgets
    into account. If the program adds gadgets into the window's borders,
    Intuition will expand the borders to hold the gadgets.


if (NULL != (screen = LockPubScreen(NULL)))
    {
    top_border    = screen->WBorTop + screen->Font->ta_YSize + 1;
    left_border   = screen->WBorLeft;
    right_border  = screen->WBorRight;
    bottom_border = screen->WBorBottom;

    UnlockPubScreen(NULL,screen);
    }

/* if the sizing gadget is specified, then the border size must
** be adjusted for the border containing the gadget.  This may
** be the right border, the bottom border or both.
**
** We are using fixed values.  There is currently no system-approved
** method of finding this information before the window is opened.
** If you need to know these sizes BEFORE your window is opened,
** use the fixed values below.  Otherwise, use Window->BorderRight,
** etc. AFTER you have opened your window.
*/

/* values for non-lo-res screen */
right_border  = 18;  /* if sizing gadget in right border  */
bottom_border = 10;  /* if sizing gadget in bottom border */

/* values for lo-res screen */
right_border  = 13;  /* if sizing gadget in right border  */
bottom_border = 11;  /* if sizing gadget in bottom border */


Use the border sizes to position visual elements within the window.
Coordinates may be offset into the window by the size of the top and left
borders, for instance (x, y) becomes (x + @{"BorderLeft" link 4-6 71}, y + @{"BorderTop" link 4-6 71}).
This may look clumsy, but it offers a way of avoiding a @{"GimmeZeroZero" link 4-4-3}
window, which, although much more convenient to use, requires extra memory
and degrades performance.

The right and bottom border values specify the width of these borders.
The area within the borders of a window is defined as (@{"BorderLeft" link 4-6 71},
@{"BorderTop" link 4-6 71}) to (@{"Width" link 4-6 42} - 1 - @{"BorderRight" link 4-6 71}, @{"Height" link 4-6 42} - 1 - @{"BorderBottom" link 4-6 71}).  The
calculations subtract one from the height and width of the windows as
positions count from zero, but dimensions count from one.

The window title bar is only available if one or more of the following is
specified:  window title, window drag gadget, window depth gadget, window
close gadget or window zoom gadget.  If none of these are specified, the
top border will be much narrower.

Application gadgets may be added to the window border by setting a flag in
the @{"Gadget" link ADCD_v1.2:Reference_Library/Libraries/Lib_5/5-9} structure.  A special flag must additionally be set to place
gadgets into the borders of @{"GimmeZeroZero" link 4-4-3} windows.  See the chapter
"@{"Intuition Gadgets" link ADCD_v1.2:Reference_Library/Libraries/Lib_5/5-4-3}," for more information about gadgets and their
positioning.  (@{"Borderless" link 4-4-2} windows have no visible border outlines and
gadgets should not be placed in their borders.)

@ENDNODE

@NODE 4-2-7 "4 / Window Structures and Functions / Changing Window Size Limits"
To change the sizing limits after the window has been opened, call
@{"WindowLimits()" link ADCD_v1.2:Inc&AD2.1/autodocs/intuition/WindowLimits()} with the new values.

   BOOL WindowLimits( struct Window *window, long widthMin, long heightMin,
                      unsigned long widthMax, unsigned long heightMax );

To maintain the current dimension, set the corresponding argument to 0.
Out of range numbers are ignored.  If the user is currently sizing the
window, new limits take effect after the user releases the select button.

@ENDNODE

@NODE 4-3 "4 Intuition Windows / Communicating with Intuition"
Intuition can notify an application when the user moves the mouse, makes a
menu choice, selects an application gadget or changes the window's size.
To find out about user activity from Intuition, there are two methods:

  * Use the Intuition Direct Communications Message Port (IDCMP) system.
    Input events are received as standard Exec messages at a port
    Intuition creates for your window.

  * Use the console.device to receive all input events as character
    sequences.

@{" The IDCMP " link 4-3-1}           @{" The IDCMP And The Active Window " link 4-3-3}
@{" The Console Device " link 4-3-2}  @{" The IDCMP And Gadgets " link 4-3-4}

@ENDNODE

@NODE 4-3-1 "4 / Communicating with Intuition / The IDCMP"
The IDCMP gives an application convenient access to many types of user
input events through the Exec message and port system.  Intuition input
event messages include mouse and keyboard activity as well as high level
events from menus and gadgets.

With the IDCMP, you specify the input events you want to know about when
you open the window.  The input events are specified with one or more of
the @{"IDCMP flags" link ADCD_v1.2:Reference_Library/Libraries/Lib_9/9-6} in <intuition/@{"intuition.h" link ADCD_v1.2:Inc&AD2.1/includes/intuition/intuition.h/MAIN 722}>.  Use the flags with the
@{"WA_IDCMP" link 4-7-2 35} tag for the @{"OpenWindowTagList()" link 4-2-1} (or @{"OpenWindowTags()" link 4-2-1}) function.
Or, set the flags in @{"NewWindow.IDCMPFlags" link 4-7-2 35} for the @{"OpenWindow()" link 4-2-1} function.  If
any IDCMP flags are set when the window is opened, Intuition automatically
creates a message port for you to receive messages about user activity.
If NULL is specified for IDCMP flags, no port is created.  For more
information on receiving messages from Intuition, see the IDCMP sections
in the chapter "@{"Intuition Input and Output Methods" link ADCD_v1.2:Reference_Library/Libraries/Lib_9/MAIN}."

@ENDNODE

@NODE 4-3-2 "4 / Communicating with Intuition / The Console Device"
An alternative to the message system used by the IDCMP is the console
device.  The console device gives your application input data translated
to ASCII characters or ANSI escape sequences.  Raw (untranslated) input is
also available through the console device as ANSI escape sequences.

The console device also provides for convenient output of control codes
and non-proportional (mono-spaced) text to the window.  Output is
character based, and includes capabilities such as automatic line wrapping
and scrolling.  The console device automatically formats and interprets
the output stream.  Output is kept within the window boundaries
automatically so the application need not worry about overwriting the
border (no @{"GimmeZeroZero" link 4-3-3} window required).

The console device must be opened by the application before it is used.
See the chapter entitled "@{"Intuition Input and Output Methods" link ADCD_v1.2:Reference_Library/Libraries/Lib_9/9-4}" or refer to
the "@{"Console Device" link ADCD_v1.2:Reference_Library/Devices/Dev_4/MAIN}" chapter of the Amiga ROM Kernel Reference Manual:
Devices for more information about using the console device with your
Intuition windows.

@ENDNODE

@NODE 4-3-3 "4 / Communicating with Intuition / The IDCMP And The Active Window"
On the Amiga, all input is directed to a single window called the active
window.  In general, changing the active window should be left up to the
user.  (The user activates a window by pressing the select button while
the pointer is within the window boundaries.)  If the active window is
changed, the user may be confused if the change was not performed at their
direction.  Hence, new windows should be activated only when they open as
a direct and synchronous response to the user's action.  Existing windows
should almost never be activated by the application.

An application can learn when one of its windows is activated or
deactivated by setting the IDCMP flags @{"IDCMP_ACTIVEWINDOW" link ADCD_v1.2:Reference_Library/Libraries/Lib_9/9-6-1-5 36} and
@{"IDCMP_INACTIVEWINDOW" link ADCD_v1.2:Reference_Library/Libraries/Lib_9/9-6-1-5 36}. When these flags are specified, the program will
receive a message each time the user activates the window or causes the
window to become inactive by activating some other window.

The application may specify that a window is to become active when it
opens.  This is done with the @{"WA_Activate" link 4-7-3 90} tag or by setting WFLG_ACTIVATE
in @{"NewWindow" link 4-2 8}.Flags when the window is opened.

The application may also activate an existing window.  This is done by
calling the @{"ActivateWindow()" link ADCD_v1.2:Inc&AD2.1/autodocs/intuition/ActivateWindow()} function, which will activate the window as
soon as possible.  Try to use this function only in response to user
action since it may cause a shift in the input focus:

    LONG ActivateWindow( struct Window *window );

This function call may have its action deferred.  Do not assume that the
selected window has become active when this call returns.  Intuition will
inform the application when this window has become active by sending an
@{"IDCMP_ACTIVEWINDOW" link ADCD_v1.2:Reference_Library/Libraries/Lib_9/9-6-1-5 36} message.  Getting this message is the only supported
way of tracking the activation status of your windows.

@ENDNODE

@NODE 4-3-4 "4 / Communicating with Intuition / The IDCMP And Gadgets"
One way for a user to communicate with a program running under Intuition
is through the use of gadgets.  There are two basic kinds of gadgets:
system gadgets, which are predefined and managed by Intuition, and
application gadgets.

@{" System Gadgets " link 4-3-4-1}  @{" Application Gadgets " link 4-3-4-2}

@ENDNODE

@NODE 4-3-4-1 "4 / / The IDCMP And Gadgets / System Gadgets"
System gadgets on each window provide the user with the ability to manage
the following aspects of the window:  size, position and depth.  These
gadgets are managed by Intuition and the application does not need to take
any action for them to operate properly.  An additional system gadget is
provided for the "close window" function.  The close action is not
directly managed by Intuition; selecting the close gadget will simply send
a message to the application, which is responsible for closing the window.

All of these gadgets are optional, and independent of each other.  The
graphic representations of these gadgets are predefined, and Intuition
always displays them in the same standard locations in the window borders.

The application may choose to be notified when the window changes size, or
it may choose to control the timing of the sizing of the window.
Controlling the timing of sizing operations is done through the use of the
@{"IDCMP_SIZEVERIFY" link ADCD_v1.2:Reference_Library/Libraries/Lib_9/9-6-1-5 28} message.  IDCMP_SIZEVERIFY messages time out if the
application does not respond fast enough.  When these an IDCMP_SIZEVERIFY
message times out the window sizing operation is cancelled by Intuition.

No information is available to the program on user changes to the depth
arrangement of a window.  However a refresh message will be sent if part
of the window needs to be redrawn as a result of a change to the depth
arrangement.

Notification of changes to the position of the window or the size of the
window are available through the @{"IDCMP_CHANGEWINDOW" link ADCD_v1.2:Reference_Library/Libraries/Lib_9/9-6-1-6 104} and @{"IDCMP_NEWSIZE" link ADCD_v1.2:Reference_Library/Libraries/Lib_9/9-6-1-5}
flags.  The application specifies the initial size, the maximum and
minimum limits for sizing, and whether the sizing gadget is contained in
the right border, bottom border or both borders.  (See the section on
"@{"Border Dimensions" link 4-2-6}" for information on how the specification of the sizing
gadget affects the border sizes.)

The drag gadget has no imagery other than the implicit imagery of the
title bar.  Setting the window title does not interfere with drag gadget
operation, nor does the drag gadget interfere with the display of the
window title.

@ENDNODE

@NODE 4-3-4-2 "4 / / The IDCMP And Gadgets / Application Gadgets"
The application may place gadgets in windows to request various kinds of
input from the user.  These gadgets may be specified in the
@{"OpenWindowTagList()" link 4-2-1} call, or they may be created and added to the window
later.  For details about creating and using gadgets, see the chapters on
"@{"Intuition Gadgets" link ADCD_v1.2:Reference_Library/Libraries/Lib_5/MAIN}" and the "@{"GadTools Library" link ADCD_v1.2:Reference_Library/Libraries/Lib_15/15-3}".

@ENDNODE

@NODE 4-4 "4 Intuition Windows / Window Types"
There are three special window types:  Backdrop, Borderless and
GimmeZeroZero.  Backdrop windows stay anchored to the back of the display.
Borderless windows have no borders rendered by Intuition. GimmeZeroZero
windows provide clipping to protect the borders from graphics rendered
into the window.

These window types can be combined, although the combinations are not
always useful.  For instance, a borderless, backdrop window can be
created; however, a borderless, GimmeZeroZero window does not make sense.
A window is not required to be any of these types.

@{" Backdrop Window Type " link 4-4-1}    @{" GimmeZeroZero Window Type " link 4-4-3}
@{" Borderless Window Type " link 4-4-2}

@ENDNODE

@NODE 4-4-1 "4 / Window Types / Backdrop Window Type"
Backdrop windows open behind all other non-backdrop windows, but in front
of other backdrop windows that might already be open.  Depth arrangement
of a backdrop window affects the order of the window relative to other
backdrop windows, but backdrop windows always stay behind all non-backdrop
windows.  No amount of depth arrangement will ever move a non-backdrop
window behind a backdrop window.

The only system gadget that can be attached to a backdrop window is the
closewindow gadget. Application gadgets are not restricted in backdrop
windows.

Backdrop windows may often be used in place of drawing directly into the
display memory of a custom screen.  Such a technique is preferred, as
backdrop windows are compatible with the Intuition windowing system.
Using a backdrop window eliminates the danger of writing to the screen
memory at a "bad" time or at the wrong position and overwriting data in a
window.

To provide a full screen display area that is compatible with the
windowing system, create a full sized, borderless, backdrop window with no
system gadgets.  Use the @{"ShowTitle()" link ADCD_v1.2:Reference_Library/Libraries/Lib_3/3-9-3 10} call to hide or reveal the screen's
title bar, as appropriate.  See the Amiga ROM Kernel Reference Manual:
Includes and Autodocs for a complete list of arguments for @{"ShowTitle()" link ADCD_v1.2:Inc&AD2.1/autodocs/intuition/ShowTitle()}.

Backdrop windows are created by specifying the WFLG_BACKDROP flag or the
@{"WA_Backdrop" link 4-7-3 77} tag in the @{"OpenWindowTagList()" link 4-2-1} call.

@ENDNODE

@NODE 4-4-2 "4 / Window Types / Borderless Window Type"
The borderless window type has no borders rendered by Intuition.  Such a
window will have no visual delineation from the rest of the display.  Be
aware that a Borderless window which does not cover the entire display may
cause visual confusion for the user.  When using a borderless window that
does not cover the entire display, the application should provide some
form of graphics to replace the borders provided by Intuition.

In general, none of the system gadgets or the window title should be
specified for a borderless window, as they may cause at least part of the
border to be rendered.

A typical application of a borderless window is to simulate graphics drawn
directly into the screen, while remaining compatible with windows and
menus. In this case, the application will often create a full sized,
borderless, backdrop window.

Use the WFLG_BORDERLESS flag or the @{"WA_Borderless" link 4-7-3 68} tag to get this window
type.

@ENDNODE

@NODE 4-4-3 "4 / Window Types / GimmeZeroZero Window Type"
GimmeZeroZero windows provide a window border layer separate from the main
(inner) window layer.  This allows the application to freely render into
the window without worrying about the window border and its contents.

System gadgets and the window title are placed in the border layer.
Application gadgets go into the inner window by default, but may be placed
in the border.  To position application gadgets in the border layer, the
@{"GTYP_GZZGADGET" link ADCD_v1.2:Reference_Library/Libraries/Lib_5/5-9 81} flag and the appropriate @{"Gadget" link ADCD_v1.2:Reference_Library/Libraries/Lib_5/5-9} border flag must be set in
the @{"Activation" link ADCD_v1.2:Reference_Library/Libraries/Lib_5/5-9 53} field of the Gadget.

The top left coordinates of the inner window are always (0,0), regardless
of the size or contents of the border, thus the name "GimmeZeroZero."  The
application need not take the border size into account when rendering.
The inner window always begins at (0,0) and extends to
(GZZWidth,GZZHeight).  The GZZWidth and GZZHeight variables are available
in the @{"Window" link 4-2 8} structure.

The @{"GZZMouseX and GZZMouseY" link 4-6 48} variables provide the position of the mouse
relative to the inner window.  Note that the mouse positions in
@{"IDCMP_MOUSEMOVE" link ADCD_v1.2:Reference_Library/Libraries/Lib_9/9-6-1-1 23} events are always relative to the total window, even for
GimmeZeroZero windows.

Requesters in a GimmeZeroZero window are also positioned relative to the
inner window.  See the chapter entitled "@{"Intuition Requesters and Alerts" link ADCD_v1.2:Reference_Library/Libraries/Lib_7/7-2-5},"
for more information about requester location.

To specify a GimmeZeroZero window, set the WFLG_GIMMEZEROZERO flag or the
@{"WA_GimmeZeroZero" link 4-7-3 81} tag in the @{"OpenWindowTagList()" link 4-2-1} call.

    WARNING!
    --------
    The GimmeZeroZero window uses more system resources than other window
    types because the window creates a separate layer for the border
    display.  Using multiple GimmeZeroZero windows will quickly degrade
    performance in the positioning and sizing of windows.

    Applications should consider using regions as an alternative to
    GimmeZeroZero windows.  See the "@{"Layers Library" link ADCD_v1.2:Reference_Library/Libraries/Lib_30/30-2}" chapter,
    especially the @{"InstallClipRegion()" link ADCD_v1.2:Reference_Library/Libraries/Lib_30/30-2-2} function, for information on
    setting up regions to limit graphics display in the window.

@ENDNODE

@NODE 4-5 "4 Intuition Windows / Preserving the Window Display"
The layers library is what allows the display and manipulation of multiple
overlapping rectangles, or layers.  Intuition uses the layers library to
manage its windows, by associating a layer to each window.

Each window is a virtual display.  When rendering, the application does
not have to worry about the current size or position of its window, and
what other windows might be partly or fully obscuring its window.  The
window's @{"RastPort" link 4-2 8} is the handle to the its virtual display space.
Intuition and graphics library rendering calls will recognize that this
RastPort belongs to a layer, and act accordingly.

As windows are moved, resized, rearranged, opened, or closed, the
on-screen representation changes.  When part of a window which was visible
now needs to appear in a new location, the layers library will move that
imagery without involving the application.  However, when part of a window
that was previously obscured is revealed, or when a window is made larger,
the imagery for the newly-visible part of the window needs to be redrawn.
Intuition, through layers, offers three choices for how this is managed,
trading off speed, memory usage, and application complexity.

  * The most basic type of window is called Simple Refresh.  When any
    graphics operation takes place in this kind of window, the visible
    parts are updated, but rendering to the obscured parts is discarded.
    When the window arrangement changes to reveal a previously obscured
    part of such a window, the application must refresh that area.

  * Alternately, a window may be made Smart Refresh, which means that
    when rendering occurs, the system will not only update the visible
    parts of the window, but it will maintain the obscured parts as well,
    by using off-screen buffers.  This means that when an obscured part
    of the window is revealed, the system will restore the imagery that
    belongs there.  The application needs only to refresh parts of the
    window that appear when the window is made bigger.  Smart Refresh
    windows use more memory than Simple Refresh windows (for the storage
    of obscured areas), but they are faster.

  * The third kind of window is called SuperBitMap.  In such a window,
    the system can refresh the window even when it is sized bigger.  For
    this to work, the application must store a complete bitmap for the
    window's maximum size.  Such a window is more work to manage, and
    uses yet more memory.  SuperBitMap windows are used less often than
    the other two types.

Intuition helps your application manage window refresh.  First, Intuition
will take care of redrawing the window border and any system and
application gadgets in the window.  Your application never has to worry
about that.  Second, Intuition will notify your application when it needs
to refresh its window (by sending the @{"IDCMP_REFRESHWINDOW" link ADCD_v1.2:Reference_Library/Libraries/Lib_9/9-6-1-5 7} event).  Third,
Intuition provides functions that restrict your rendering to the
newly-revealed (damaged) areas only, which speeds up your refresh
rendering and makes it look cleaner.

The Intuition, layers, and graphics libraries work together to make
rendering into and managing windows easy.  You obtain your windows through
Intuition, which uses the @{"Layers library" link ADCD_v1.2:Reference_Library/Libraries/Lib_30/30-1 22} to manage the overlapping,
resizing, and re-positioning of the window layers.  The layers library is
responsible for identifying the areas of each window that are visible,
obscured but preserved off-screen, or obscured and not preserved.  The
rendering functions in the graphics library and Intuition library know how
to render into the multiple areas that layers library establishes.

 Note that you may not directly manipulate layers on an Intuition screen.
You cannot create your own layers on an Intuition screen, nor can you use
the layers movement, sizing, or arrangement functions on Intuition
windows.  Use the corresponding Intuition calls instead. Some other
@{"Layers library" link ADCD_v1.2:Reference_Library/Libraries/Lib_30/30-1 22} calls (such as the @{"locking calls" link ADCD_v1.2:Reference_Library/Libraries/Lib_30/30-1-5 6}) are sometimes used on
Intuition screens and windows.

@{" Damage Regions " link 4-5-1}                @{" Optimized Window Refreshing " link 4-5-4}
@{" Refreshing Intuition Windows " link 4-5-2}  @{" Setting Up a SuperBitMap Window " link 4-5-5}
@{" Intuition Refresh Events " link 4-5-3}

@ENDNODE

@NODE 4-5-1 "4 / Preserving the Window Display / Damage Regions"
The layers library and Intuition maintain a damage region for each window,
which is the part of the window whose imagery is in need of repair, or
refreshing.  Several things can add areas of the window to the damage
region:

  * Revealing an obscured part of a Simple Refresh window adds that area
    to the damage region

  * Sizing a Simple or Smart Refresh window bigger along either axis adds
    the new area to the damage region

  * Resizing a Simple or Smart Refresh window (smaller or bigger) adds
    the old and new border areas, and the areas occupied by certain
    gadgets (those whose position or size depend on window size) to the
    damage region.

@ENDNODE

@NODE 4-5-2 "4 / Preserving the Window Display / Refreshing Intuition Windows"
When the user or an application performs an Intuition operation which
causes damage to a window, Intuition notifies that window's application.
It does this by sending a message of the class @{"IDCMP_REFRESHWINDOW" link ADCD_v1.2:Reference_Library/Libraries/Lib_9/9-6-1-5 7} to that
window's IDCMP.

In response to this message, your application should update the damaged
areas.  Rendering proceeds faster and looks cleaner if it is restricted to
the damaged areas only.  The @{"BeginRefresh()" link 4-5-4}/@{"EndRefresh()" link 4-5-4 25} pair achieve
that.  The application should call BeginRefresh() for the window, and then
do its rendering.  Any rendering that would have gone into undamaged areas
of the window is automatically discarded; only the area in need of repair
is affected.  Finally, the application should call EndRefresh(), which
removes the restriction on rendering, and informs the system that the
damage region has been dealt with. Even if your application intends to do
no rendering, it must at least call BeginRefresh()/EndRefresh(), to inform
the system that the damage region is no longer needed.  If your
application never needs to render in response to a refresh event, it can
avoid having to call BeginRefresh()/EndRefresh() by setting the
WFLG_NOCAREREFRESH flag or the @{"WA_NoCareRefresh" link 4-7-3 62} tag in the
@{"OpenWindowTagList()" link 4-2-1} call.

Note that by the time that your application receives notification that
refresh is needed, Intuition will have already refreshed your window's
border and all gadgets in the window, as needed.  Thus, it is unnecessary
to use any of the gadget-refreshing functions in response to an
@{"IDCMP_REFRESHWINDOW" link ADCD_v1.2:Reference_Library/Libraries/Lib_9/9-6-1-5 7} event.

Operations performed between the @{"BeginRefresh()" link 4-5-4}/@{"EndRefresh()" link 4-5-4 25} pair should
be restricted to simple rendering.  All of the rendering functions in
Intuition library and Graphics library are safe.  Avoid @{"RefreshGList()" link ADCD_v1.2:Reference_Library/Libraries/Lib_5/5-6-2-2} or
@{"RefreshGadgets()" link ADCD_v1.2:Reference_Library/Libraries/Lib_5/5-13 5}, or you risk deadlocking the computer.  Avoid calls that
may lock the @{"LayerInfo" link ADCD_v1.2:Inc&AD2.1/includes/graphics/layers.h/MAIN 33} or get complicated in Intuition, since
BeginRefresh() leaves the window's layer or layers locked.  Avoid
@{"AutoRequest()" link ADCD_v1.2:Reference_Library/Libraries/Lib_7/7-7 21} and @{"EasyRequest()" link ADCD_v1.2:Reference_Library/Libraries/Lib_7/7-4}, and therefore all direct or indirect disk
related DOS calls.  See the "@{"Intuition Gadgets" link ADCD_v1.2:Reference_Library/Libraries/Lib_5/5-6-1 10}" chapter for more
information on gadget restrictions with BeginRefresh()/EndRefresh().

@{" Simple Refresh " link 4-5-2-1}  @{" Smart Refresh " link 4-5-2-2}  @{" SuperBitMap Refresh " link 4-5-2-3}

@ENDNODE

@NODE 4-5-2-1 "4 / / Refreshing Intuition Windows / Simple Refresh"
For a Simple Refresh window, only those pixels actually on-screen are
maintained by the system.  When part of a Simple Refresh window is
obscured, the imagery that was there is lost.  As well, any rendering into
obscured portions of such a window is discarded.

When part of the window is newly revealed (either because the window was
just made larger, or because that part used to be obscured by another
window), the application must refresh any rendering it wishes to appear
into that part.  The application will learn that refresh is needed because
Intuition sends an @{"IDCMP_REFRESHWINDOW" link ADCD_v1.2:Reference_Library/Libraries/Lib_9/9-6-1-5 7} event.

@ENDNODE

@NODE 4-5-2-2 "4 / / Refreshing Intuition Windows / Smart Refresh"
If a window is of the Smart Refresh type, then the system will not only
preserve those pixels which are actually on-screen, but it will save all
obscured pixels that are within the current window's size. The system will
refresh those parts of the window revealed by changes in the overlapping
with other windows on the screen, without involving the application.
However, any part of the window revealed through the sizing of the window
must be redrawn by the application.  Again, Intuition will notify the
application through the @{"IDCMP_REFRESHWINDOW" link ADCD_v1.2:Reference_Library/Libraries/Lib_9/9-6-1-5 7} event.

Because the obscured areas are kept in off-screen buffers, Smart Refresh
windows are refreshed faster than Simple Refresh windows are, and often
without involving the application.  Of course, for the same reason, they
use more display memory.

@ENDNODE

@NODE 4-5-2-3 "4 / / Refreshing Intuition Windows / SuperBitMap Refresh"
The SuperBitMap refresh type allows the application to provide and
maintain bitmap memory for graphics in the window.  The bitmap can be any
size as long as the window sizing limits respect the maximum size of the
bitmap.

SuperBitMap windows have their own memory for maintaining all obscured
parts of the window up to the size of the defined bitmap, including those
parts outside of the current window.  Intuition will update all parts of
the window that are revealed through changes in sizing and changes in
window overlapping.  The application never needs to redraw portions of the
window that were revealed by sizing or positioning windows in the screen.

SuperBitMap windows require the application to allocate a bitmap for use
as off-screen memory, instead of using Intuition managed buffers.  This
bitmap must be as large as, or larger than, the inner window's maximum
dimensions (that is, the window's outside dimensions less the border
sizes).

SuperBitMap windows are almost always @{"WFLG_GIMMEZEROZERO" link 4-7-3 81}, which renders
the borders and system gadgets in a separate bitmap.  If the application
wishes to create a SuperBitMap window that is not @{"GimmeZeroZero" link 4-4-3}, it must
make the window borderless with no system gadgets, so that no border
imagery is rendered by Intuition into the application's bitmap.

@ENDNODE

@NODE 4-5-3 "4 / Preserving the Window Display / Intuition Refresh Events"
When using a Simple Refresh or a Smart Refresh windows, the program may
receive refresh events, informing it to update the display.  See the above
discussion for information on when refresh events are sent.

A message of the class @{"IDCMP_REFRESHWINDOW" link ADCD_v1.2:Reference_Library/Libraries/Lib_9/9-6-1-5 7} arrives at the IDCMP, informing
the program of the need to update the display.  The program must take some
action when it receives a refresh event, even if it is just the acceptable
minimum action described below.

On receiving a refresh event, @{"BeginRefresh()" link 4-5-4} must be called, then the
program should redraw its display, and, finally, call @{"EndRefresh()" link 4-5-4 25}.  The
minimum required action is to call the BeginRefresh()/EndRefresh() pair.
This allows Intuition and the @{"Layers library" link ADCD_v1.2:Reference_Library/Libraries/Lib_30/30-1 22} keep things sorted and
organized.

@ENDNODE

@NODE 4-5-4 "4 / Preserving the Window Display / Optimized Window Refreshing"
Bracketing the display updating in the @{"BeginRefresh()" link 4-5-4}/@{"EndRefresh()" link 4-5-4 25} pair
automatically restricts all rendering to the "damaged" areas.

    void BeginRefresh( struct Window *window );
    void EndRefresh  ( struct Window *window, long complete );

These functions makes sure that refreshing is done in the most efficient
way, only redrawing those portions of the window that really need to be
redrawn.  The rest of the rendering commands are discarded.

Operations performed between the @{"BeginRefresh()" link 4-5-4}/@{"EndRefresh()" link 4-5-4 25} pair should
be restricted to simple rendering.  All of the rendering functions in
Intuition library and Graphics library are safe.  Calls to
@{"RefreshGadgets()" link ADCD_v1.2:Reference_Library/Libraries/Lib_5/5-13 5} are not permitted.  Avoid calls that may lock the
@{"LayerInfo" link ADCD_v1.2:Inc&AD2.1/includes/graphics/layers.h/MAIN 33}, or get complicated in Intuition, since BeginRefresh() leaves
the window's layer or layers locked.  Avoid @{"AutoRequest()" link ADCD_v1.2:Reference_Library/Libraries/Lib_7/7-7 21}, and therefore
all direct or indirect disk related DOS calls.  See the
"@{"Intuition Gadgets" link ADCD_v1.2:Reference_Library/Libraries/Lib_5/5-6-1 10}" chapter for more information on gadget restrictions
with BeginRefresh()/EndRefresh().

Certain applications do not need to receive refresh events, and can avoid
having to call @{"BeginRefresh()" link 4-5-4} and @{"EndRefresh()" link 4-5-4 25} by setting the
WFLG_NOCAREREFRESH flag or the @{"WA_NoCareRefresh" link 4-7-3 62} tag in the
@{"OpenWindowTagList()" link 4-2-1} call.

The @{"EndRefresh()" link 4-5-4 25} function takes a boolean value as an argument (complete
in the prototype above).  This value determines whether refreshing is
completely finished.  When set to FALSE, further refreshing may be
performed between subsequent @{"BeginRefresh()" link 4-5-4}/ EndRefresh() pairs.  Set the
boolean to TRUE for the last call to EndRefresh().

It is critical that applications performing multiple
@{"BeginRefresh()" link 4-5-4}/@{"EndRefresh()" link 4-5-4 25} pairs using EndRefresh(win,FALSE) hold layers
locked through the entire process.  The layer lock may only be released
after the final call to EndRefresh(win,TRUE). See the "@{"Layers Library" link ADCD_v1.2:Reference_Library/Libraries/Lib_30/30-1-5}" for
more details.

The procedures outlined in this section take care of refreshing what is
inside the window.  Another function named @{"RefreshWindowFrame()" link ADCD_v1.2:Inc&AD2.1/autodocs/intuition/RefreshWindowFrame()} refreshes
window borders, including the title region and gadgets:

    void RefreshWindowFrame( struct Window *window );

Applications can use this function to update window borders after
overwriting them with graphics.

@ENDNODE

@NODE 4-5-5 "4 / Preserving the Window Display / Setting Up A SuperBitMap Window"
SuperBitMap windows are created by setting the WFLG_SUPER_BITMAP flag, or
by specifying the @{"WA_SuperBitMap" link 4-7-3 126} tag in the @{"OpenWindowTagList()" link 4-2-1} call.  A
pointer to an allocated and initialized @{"BitMap" link ADCD_v1.2:Reference_Library/Libraries/Lib_3/3-7 4} structure must be provided.

A SuperBitMap window requires the application to allocate and initialize
its own bitmap.  This entails allocating a @{"BitMap" link ADCD_v1.2:Reference_Library/Libraries/Lib_3/3-7 4} structure, initializing
the structure and allocating memory for the bit planes.

Allocate a @{"BitMap" link ADCD_v1.2:Reference_Library/Libraries/Lib_3/3-7 4} structure with the Exec @{"AllocMem()" link ADCD_v1.2:Reference_Library/Libraries/Lib_20/20-1} function.  Then use
the graphics function @{"InitBitMap()" link ADCD_v1.2:Reference_Library/Libraries/Lib_27/27-2-7-2} to initialize the BitMap structure:

    void InitBitMap( struct BitMap *bitMap, long depth,
                     long width, long height );

@{"InitBitMap()" link ADCD_v1.2:Reference_Library/Libraries/Lib_27/27-2-7-2} fills in fields in the @{"BitMap" link ADCD_v1.2:Reference_Library/Libraries/Lib_3/3-7 4} structure describing how a
linear memory area is organized as a series of one or more rectangular
bit-planes.

Once you have allocated and initialized the @{"BitMap" link ADCD_v1.2:Reference_Library/Libraries/Lib_3/3-7 4} structure, use the
graphics library function @{"AllocRaster()" link ADCD_v1.2:Reference_Library/Libraries/Lib_27/27-2-7-2} to allocate the memory space for
all the bit planes.

    PLANEPTR AllocRaster( unsigned long width, unsigned long height );

The @{"example" link ADCD_v1.2:Reference_Library/Libraries/lib_examples/lines.c/MAIN} listed in the next section shows how to allocate a @{"BitMap" link ADCD_v1.2:Reference_Library/Libraries/Lib_3/3-7 4}
structure, initialize it with @{"InitBitMap()" link ADCD_v1.2:Reference_Library/Libraries/Lib_27/27-2-7-2} and use @{"AllocRaster()" link ADCD_v1.2:Reference_Library/Libraries/Lib_27/27-2-7-2} function
to set up memory for the bitplanes.

@{" Graphics and Layers Functions for SuperBitMap Windows " link 4-5-5-1}
@{" SuperBitMap Window Example " link ADCD_v1.2:Reference_Library/Libraries/lib_examples/lines.c/MAIN}

@ENDNODE

@NODE 4-5-5-1 "4 / / Setting Up A SuperBitMap Window / Graphics and Layers Functions"
The portion of the bitmap showing within a SuperBitMap window is
controlled by the application.  Initially, the window shows the bitmap
starting from its origin (0,0) and clipped to fit within the window layer.
The visible portion of the bitmap can be scrolled around within the window
using the layers library @{"ScrollLayer()" link ADCD_v1.2:Reference_Library/Libraries/Lib_30/30-1-6 17} function:

    void ScrollLayer(LONG unused, struct Layer *layer, LONG dx, LONG dy)

Pass this function a pointer to the window's layer in layer and the scroll
offsets in dx and dy.  (A pointer to the window's layer can be obtained
from @{"Window.RPort" link 4-6 66}->Layer.)

When rendering operations are performed in a SuperBitMap window, any
rendering that falls outside window boundaries is done in the
application's bitmap.  Rendering that falls within window bounds is done
in the screen's bitmap.  Before performing an operation such as a save on
the application bitmap, the graphics library function @{"SyncSBitMap()" link ADCD_v1.2:Inc&AD2.1/autodocs/graphics/SyncSBitMap()} should
be called:

    void SyncSBitMap(struct Layer *layer)

Pass this function a pointer to the window's layer.  @{"SyncSBitMap()" link ADCD_v1.2:Inc&AD2.1/autodocs/graphics/SyncSBitMap()} copies
the window contents to the corresponding part of the application bitmap,
bringing it up to date.  (If no rendering operations have been performed
this call is not necessary.)

Similarly, after making any changes to the application bitmap such as
loading a new one, the window's layer should be locked and the
@{"CopySBitMap()" link ADCD_v1.2:Inc&AD2.1/autodocs/graphics/CopySBitMap()} function should be called.

    void CopySBitMap(struct Layer *)

This function copies the new information in the appropriate area of the
underlying bitmap to the window's layer.

For more information about bitmaps and layers, see the
"@{"Graphics Primitives" link ADCD_v1.2:Reference_Library/Libraries/Lib_27/27-4-3-3}" and "@{"Layers Library" link ADCD_v1.2:Reference_Library/Libraries/Lib_30/30-1-6}" chapters of this manual.  Also
see the <graphics/@{"clip.h" link ADCD_v1.2:Inc&AD2.1/includes/graphics/clip.h/MAIN}>, <graphics/@{"gfx.h" link ADCD_v1.2:Inc&AD2.1/includes/graphics/gfx.h/MAIN}>, <graphics/@{"layers.h" link ADCD_v1.2:Inc&AD2.1/includes/graphics/layers.h/MAIN}>,
@{"graphics library" link ADCD_v1.2:Inc&AD2.1/autodocs/graphics/MAIN} and @{"layers library" link ADCD_v1.2:Inc&AD2.1/autodocs/layers/MAIN} sections of the Amiga ROM Kernel
Reference Manual: Includes and Autodocs.

@ENDNODE

@NODE 4-6 "4 Intuition Windows / The Window Structure"
The @{"Window" link ADCD_v1.2:Inc&AD2.1/includes/intuition/intuition.h/MAIN 797} structure is the main Intuition data structure used to
represent a window.  For the most part, applications treat this structure
only as a handle.  Window operations are performed by calling system
functions that take Window as an argument instead of directly manipulating
fields within the structure.  However, there are some useful variables in
a Window structure which are discussed in this section.

   struct Window
       {
       struct Window *NextWindow;
       WORD LeftEdge, TopEdge, Width, Height;
       WORD MouseY, MouseX;
       WORD MinWidth, MinHeight;
       UWORD MaxWidth, MaxHeight;
       ULONG Flags;
       struct Menu *MenuStrip;
       UBYTE *Title;
       struct Requester *FirstRequest, *DMRequest;
       WORD ReqCount;
       struct Screen *WScreen;
       struct RastPort *RPort;
       BYTE BorderLeft, BorderTop, BorderRight, BorderBottom;
       struct RastPort *BorderRPort;
       struct Gadget *FirstGadget;
       struct Window *Parent, *Descendant;
       UWORD *Pointer;
       BYTE PtrHeight, PtrWidth;
       BYTE XOffset, YOffset;
       ULONG IDCMPFlags;
       struct MsgPort *UserPort, *WindowPort;
       struct IntuiMessage *MessageKey;
       UBYTE DetailPen, BlockPen;
       struct Image *CheckMark;
       UBYTE *ScreenTitle;
       WORD GZZMouseX, GZZMouseY, GZZWidth, GZZHeight;
       UBYTE *ExtData;
       BYTE *UserData;
       struct Layer *WLayer;
       struct TextFont *IFont;
       ULONG MoreFlags;
       };

LeftEdge, TopEdge, Width and Height
    These variables reflect current position and size of the window.  If
    the user sizes or positions the window, then these values will
    change. The position of the window is relative to the upper left
    corner of the screen.

MouseX, MouseY, GZZMouseX, GZZMouseY
    The current position of the Intuition pointer with respect to the
    window, whether or not this window is currently the active one.  For
    @{"GimmeZeroZero" link 4-4-3} windows, the GZZ variables reflect the position
    relative to the inner layer (see "Window Types" below).  For normal
    windows, the GZZ variables reflect the position relative to the
    window origin after taking the borders into account.

ReqCount
    Contains a count of the number of requesters currently displayed in
    the window.  Do not rely on the value in this field, instead use
    @{"IDCMP_REQSET" link ADCD_v1.2:Reference_Library/Libraries/Lib_9/9-6-1-4} and @{"IDCMP_REQCLEAR" link ADCD_v1.2:Reference_Library/Libraries/Lib_9/9-6-1-4 4} to indirectly determine the number of
    open requesters in the window.

WScreen
    A pointer to the @{"Screen" link ADCD_v1.2:Reference_Library/Libraries/Lib_3/3-2-2 6} structure of the screen on which this window
    was opened.

RPort
    A pointer to this window's @{"RastPort" link 4-2 8} structure.  Use this RastPort
    pointer to render into your window with Intuition or graphics library
    rendering functions.

BorderLeft, BorderTop, BorderRight, BorderBottom
    These variables describe the actual size of the window borders. The
    border size is not changed after the window is opened.

BorderRPort
    With @{"GimmeZeroZero" link 4-4-3} windows, this variable points to the @{"RastPort" link 4-2 8} for
    the outer layer, in which the border gadgets are kept.

UserData
    This pointer is available for application use.  The program can
    attach a data block to this window by setting this variable to point
    to the data.

For a commented listing of the @{"Window" link ADCD_v1.2:Inc&AD2.1/includes/intuition/intuition.h/MAIN 797} structure see
<intuition/@{"intuition.h" link ADCD_v1.2:Inc&AD2.1/includes/intuition/intuition.h/MAIN}> in the Amiga ROM Kernel Reference Manual: Includes
and Autodocs.

@ENDNODE

@NODE 4-7 "4 Intuition Windows / Window Attributes"
This section discusses all window attributes.  As mentioned earlier, a
window's attributes may be specified with either @{"TagItems" link 4-2 8}, @{"NewWindow" link 4-2 8} or
@{"ExtNewWindow" link 4-2 8} depending on how the window is opened.

Attributes are listed here by their @{"TagItem" link 4-2 8} ID name (TagItem.ti_Tag).  For
each tag item, the equivalent field setting in the @{"NewWindow" link 4-2 8} structure is
also listed if it exists.  Some window attributes specified with tags are
available only in Release 2 and have no NewWindow equivalent.

@{" Extended New Window " link 4-7-1}
@{" Window Attribute Tags " link 4-7-2}
@{" Boolean Window Attribute Tags " link 4-7-3}

@ENDNODE

@NODE 4-7-1 "4 / Window Attributes / Extended New Window"
Of the three functions for opening a window, only @{"OpenWindow()" link 4-2-1} is present
in all versions of the OS.  This function takes a @{"NewWindow" link 4-2 8} structure as
its sole argument.  In order to allow applications to use the OpenWindow()
call with Release 2 @{"TagItem" link 4-2 8} attributes, an extended version of the
NewWindow structure has been created named @{"ExtNewWindow" link ADCD_v1.2:Inc&AD2.1/includes/intuition/intuition.h/MAIN 1039}.

Setting WFLG_NW_EXTENDED in the NewWindow.Flags field specifies to the
@{"OpenWindow()" link 4-2-1} call that this @{"NewWindow" link 4-2 8} structure is really an @{"ExtNewWindow" link 4-2 8}
structure.  This is simply a standard NewWindow structure with a pointer
to a tag list at the end.  Since WFLG_NW_EXTENDED is ignored prior to V36,
information provided in the tag list will be ignored by earlier versions
of Intuition.  Note that WFLG_NW_EXTENDED may not be specified in the
@{"WA_Flags" link 4-7-3 147} tag.

@ENDNODE

@NODE 4-7-2 "4 / Window Attributes / Window Attribute Tags"
WA_Left, WA_Top, WA_Width and WA_Height
    Describe where the window will first appear on the screen and how
    large it will be initially. These dimensions are relative to the top
    left corner of the screen, which has the coordinates (0,0).

    WA_Left is the initial x position, or offset, from the left edge of
    the screen.  The leftmost pixel is pixel 0, and values increase to
    the right.  Equivalent to @{"NewWindow" link 4-2 8}.LeftEdge.

    WA_Top is the initial y position, or offset, from the top edge of the
    screen.  The topmost pixel is pixel 0, and values increase to the
    bottom.  Equivalent to @{"NewWindow" link 4-2 8}.TopEdge.

    WA_Width is the initial window width in pixels.  Equivalent to
    @{"NewWindow" link 4-2 8}.Width.

    WA_Height is the initial window height in lines.  Equivalent to
    @{"NewWindow" link 4-2 8}.Height.

WA_DetailPen and WA_BlockPen
    WA_DetailPen specifies the pen number for the rendering of window
    details like gadgets or text in the title bar.  WA_BlockPen specifies
    the pen number for window block fills, like the title bar.  These
    pens are also used for rendering menus.  Equivalent to
    @{"NewWindow" link 4-2 8}.DetailPen and NewWindow.BlockPen.

    The specific color associated with each pen number depends on the
    screen.  Specifying -1 for these values sets the window's detail and
    block pen the same as the screen's detail and block pen.

    Detail pen and block pen have largely been replaced starting with V36
    by the pen array in the @{"DrawInfo" link ADCD_v1.2:Reference_Library/Libraries/Lib_3/3-2-2 6} structure.  See the section on
    "@{"DrawInfo and the 3D Look" link ADCD_v1.2:Reference_Library/Libraries/Lib_3/3-5-1}" in the "Intuition Screens" chapter for
    more information.

WA_IDCMP
    IDCMP flags tell Intuition what user input events the application
    wants to be notified about.  The IDCMP flags are listed and described
    in the @{"OpenWindowTagList()" link ADCD_v1.2:Inc&AD2.1/autodocs/intuition/OpenWindowTagList()} description in the Amiga ROM Kernel
    Reference Manual: Includes and Autodocs and in the chapter
    "@{"Intuition Input and Output Methods" link ADCD_v1.2:Reference_Library/Libraries/Lib_9/9-6-1-5}" in this book.  Equivalent to
    @{"NewWindow" link 4-2 8}.IDCMPFlags.

    If any of these flags are set, Intuition creates a pair of message
    ports for the window (one internal to Intuition and one used by the
    application). These ports are for handling messages about user input
    events.  If WA_IDCMP is NULL or unspecified, no IDCMP is created for
    this window.

    The @{"ModifyIDCMP()" link ADCD_v1.2:Reference_Library/Libraries/Lib_9/9-7 5} function can be used to change the window's IDCMP
    flags after it is open.

WA_Gadgets
    A pointer to the first in the linked list of @{"Gadget" link ADCD_v1.2:Reference_Library/Libraries/Lib_5/5-9} structures that
    are to be included in this window.  These gadgets are application
    gadgets, not system gadgets.  See the "@{"Intuition Gadgets" link ADCD_v1.2:Reference_Library/Libraries/Lib_5/5-1-2}" chapter for
    more information.  Equivalent to @{"NewWindow" link 4-2 8}.FirstGadget.

WA_Checkmark
    A pointer to an @{"Image" link ADCD_v1.2:Reference_Library/Libraries/Lib_8/8-2-1} structure, which is to be used as the checkmark
    image in this window's menus.  To use the default checkmark, do not
    specify this tag or set this field to NULL.  Equivalent to
    @{"NewWindow" link 4-2 8}.CheckMark.

WA_Title
    A pointer to a NULL terminated text string, which is used as the
    window title and is displayed in the window's title bar.

    Intuition draws the text using the colors defined in the @{"DrawInfo" link ADCD_v1.2:Reference_Library/Libraries/Lib_3/3-2-2 6} pen
    array (DrawInfo.dri_Pens) and displays as much as possible of the
    window title, depending upon the current width of the title bar.
    Equivalent to @{"NewWindow" link 4-2 8}.Title.  See the section on
    "@{"DrawInfo and the 3D Look" link ADCD_v1.2:Reference_Library/Libraries/Lib_3/3-5-1}" in the "Intuition Screens" chapter for
    more information on the pen array.

    The title is rendered in the screen's default font.

    A title bar is added to the window if any of the properties
    @{"WA_DragBar" link 4-7-3 23} (WFLG_DRAGBAR), @{"WA_DepthGadget" link 4-7-3 29} (WFLG_DEPTHGADGET),
    @{"WA_CloseGadget" link 4-7-3 36} (WFLG_CLOSEGADGET) or WA_Zoom are specified, or if
    text is specified for a window title.  If no text is provided for the
    title, but one or more of these system gadgets are specified, the
    title bar will be blank.  Equivalent to @{"NewWindow" link 4-2 8}.Title.

WA_ScreenTitle
    A pointer to a NULL terminated text string, which is used as the
    screen title and is displayed, when the window is active, in the
    screen's title bar.  After the screen has been opened the screen's
    title may be changed by calling @{"SetWindowTitles()" link 4-8-4} (which is the only
    method of setting the window's screen title prior to V36).

WA_CustomScreen
    A pointer to the @{"Screen" link ADCD_v1.2:Reference_Library/Libraries/Lib_3/3-2-2 6} structure of a screen created by this
    application.  The window will be opened on this screen.  The custom
    screen must already be opened when the @{"OpenWindowTagList()" link 4-2-1} call is
    made.  Equivalent to @{"NewWindow" link 4-2 8}.Screen, also implies NewWindow.Type of
    CUSTOMSCREEN.

WA_MinWidth, WA_MinHeight, WA_MaxWidth and WA_MaxHeight
    These tags set the minimum and maximum values to which the user may
    size the window.  If the flag @{"WFLG_SIZEGADGET" link 4-7-3 4} is not set, then
    these variables are ignored.  Values are measured in pixels.  Use
    (~0) for the WA_MaxWidth (WA_MaxHeight) to allow for a window as wide
    (tall) as the screen.  This is the complete screen, not the visible
    part or display clip.

    Setting any of these variables to 0, will take the setting for that
    dimension from its initial value.  For example, setting MinWidth to
    0, will make the minimum width of this window equal to the initial
    width of the window.

    Equivalent to @{"NewWindow" link 4-2 8}.MinWidth, NewWindow.MinHeight,
    NewWindow.MaxWidth and NewWindow.MaxHeight.  Use the @{"WindowLimits()" link 4-2-7}
    function to change window size limits after the window is opened.

WA_InnerWidth and WA_InnerHeight
    Specify the dimensions of the interior region of the window, i.e.,
    inside the border, independent of the border widths.  When using
    WA_InnerWidth and WA_InnerHeight an application will probably want to
    set @{"WA_AutoAdjust" link 4-7-3 135}.

WA_PubScreen
    Open the window as a visitor window on the public screen whose
    address is in the ti_Data field of the WA_PubScreen @{"TagItem" link 4-2 8}.  To
    ensure that this screen remains open until @{"OpenWindowTagList()" link 4-2-1} has
    completed, the application must either be the screen's owner, have a
    window open on the screen, or use @{"LockPubScreen()" link ADCD_v1.2:Reference_Library/Libraries/Lib_3/3-4 34}.  Setting this tag
    implies screen type of PUBLICSCREEN.

WA_PubScreenName
    Declares that the window is to be opened as a visitor on the public
    screen whose name is pointed to by the ti_Data field of the
    WA_PubScreenName @{"TagItem" link 4-2 8}.  The @{"OpenWindowTagList()" link 4-2-1} call will fail if
    it cannot obtain a lock on the named public screen and no fall back
    name (WA_PubScreenFallBack) is specified.  Setting this tag implies
    screen type of PUBLICSCREEN.

WA_PubScreenFallBack
    A Boolean, specifies whether a visitor window should "fall back" to
    the default public screen (or Workbench) if the named public screen
    isn't available This tag is only meaningful when used in conjunction
    with WA_PubScreenName.

WA_Zoom
    Pointer to an array of four WORDs, the initial @{"LeftEdge" link 4-6 42}, @{"TopEdge" link 4-6 42},
    @{"Width" link 4-6 32} and @{"Height" link 4-6 32} values for the alternate zoom position and size.  It
    also specifies that the application wants a zoom gadget for the
    window, whether or not it has a sizing gadget.

    A zoom gadget is always supplied to a window if it has both depth and
    sizing gadgets.  This tag allows the application to open a window
    with a zoom gadget when the window does not have both the depth and
    sizing gadgets.

WA_MouseQueue
    An initial value for the mouse message backlog limit for this window.
    The @{"SetMouseQueue()" link 4-8-5 27} function will change this limit after the window
    is opened.

WA_RptQueue
    An initial value of repeat key backlog limit for this window.

@ENDNODE

@NODE 4-7-3 "4 / Window Attributes / Boolean Window Attribute Tags"
These boolean window tags are alternatives to the @{"NewWindow" link 4-2 8}.Flags bit
fields with similar names.  Unlike the tags discussed above, the ti_Data
field of these @{"TagItems" link 4-2 8} is set to either TRUE or FALSE.

WA_SizeGadget
    Specifying this flag tells Intuition to add a sizing gadget to the
    window.  Intuition places the sizing gadget in the lower right corner
    of the window.  By default, the right border is adjusted to
    accommodate the sizing gadget, but the application can specify one of
    the following two flags to change this behavior.  The WFLG_SIZEBRIGHT
    flag puts the sizing gadget in the right border.  The
    WFLG_SIZEBBOTTOM flag puts the sizing gadget in the bottom border.
    Both flags may be specified, placing the gadget in both borders.
    Equivalent to @{"NewWindow" link 4-2 8}.Flags WFLG_SIZEGADGET.

WA_SizeBRight
    Place the size gadget in the right border.  Equivalent to
    @{"NewWindow" link 4-2 8}.Flags WFLG_SIZEBRIGHT.

WA_SizeBBottom
    Place the size gadget in the bottom border.  Equivalent to
    @{"NewWindow" link 4-2 8}.Flags WFLG_SIZEBBOTTOM.

WA_DragBar
    This flag turns the entire title bar of the window into a drag
    gadget, allowing the user to position the window by clicking in the
    title bar and dragging the mouse.  Equivalent to @{"NewWindow" link 4-2 8}.Flags
    WFLG_DRAGBAR.

WA_DepthGadget
    Setting this flag adds a depth gadget to the window.  This allows the
    user to change the window's depth arrangement with respect to other
    windows on the screen.  Intuition places the depth gadget in the
    upper right corner of the window.  Equivalent to @{"NewWindow" link 4-2 8}.Flags
    WFLG_DEPTHGADGET.

WA_CloseGadget
    Setting this flag attaches a close gadget to the window.  When the
    user selects this gadget, Intuition transmits a message to the
    application.  It is up to the application to close the window with a
    @{"CloseWindow()" link 4-2-2} call. Intuition places the close gadget in the upper
    left corner of the window. Equivalent to @{"NewWindow" link 4-2 8}.Flags
    WFLG_CLOSEGADGET.

WA_ReportMouse
    Send mouse movement events to the window as x,y coordinates.  Also
    see the description of the IDCMP flag @{"IDCMP_MOUSEMOVE" link ADCD_v1.2:Reference_Library/Libraries/Lib_9/9-6-1-1 23}, in the chapter
    "Intuition Input and Output Methods."  Equivalent to @{"NewWindow" link 4-2 8}.Flags
    WFLG_REPORTMOUSE.

    The WFLG_REPORTMOUSE flag in the Flags field of the @{"Window" link 4-2 8} structure
    may be modified on the fly  by the program.  Changing this flag must
    be done as an atomic operation.  Most compilers generate atomic code
    for operations such as window->flags |= WFLG_REPORTMOUSE or
    window->flags &= ~WFLG_REPORTMOUSE.  If you are unsure of getting an
    atomic operation from your compiler, you may wish to do this
    operation in assembler, or bracket the code with a @{"Forbid()/Permit()" link ADCD_v1.2:Reference_Library/Libraries/Lib_21/21-8 10}
    pair.

    The use of the @{"ReportMouse()" link ADCD_v1.2:Reference_Library/Libraries/Lib_10/10-2-1 14} function is strongly discouraged, due to
    historic confusion over the parameter ordering.

WA_NoCareRefresh
    This window does not want @{"IDCMP_REFRESHWINDOW" link ADCD_v1.2:Reference_Library/Libraries/Lib_9/9-6-1-5 7} events.  Set this flag
    to prevent the window from receiving refresh window messages.
    Equivalent to @{"NewWindow" link 4-2 8}.Flags WFLG_NOCAREREFRESH.  Intuition will
    manage @{"BeginRefresh()" link 4-5-4} and @{"EndRefresh()" link 4-5-4 25} internally.

WA_Borderless
    Open a window with no borders rendered by Intuition.  Equivalent to
    @{"NewWindow" link 4-2 8}.Flags WFLG_BORDERLESS.

    Use caution setting this flag, as it may cause visual confusion on
    the screen.  Also, some borders may be rendered if any of the system
    gadgets are requested, if text is supplied for the window's title
    bar, or if any of application gadgets are in the borders.

WA_Backdrop
    Make this window a @{"Backdrop" link 4-4-1} window.  Equivalent to @{"NewWindow" link 4-2 8}.Flags
    WFLG_BACKDROP.

WA_GimmeZeroZero
    Set this tag to create a @{"GimmeZeroZero" link 4-4-3} window. GimmeZeroZero windows
    have the window border and border gadgets rendered into an extra
    layer. This extra layer slows down window operations, thus it is
    recommended that applications only use GimmeZeroZero windows when
    they are required. For clipping graphics to the area within the
    borders of a window, see the discussion of "@{"Regions" link ADCD_v1.2:Reference_Library/Libraries/Lib_30/30-2}" in the "Layers
    Library" chapter. Equivalent to @{"NewWindow" link 4-2 8}.Flags WFLG_GIMMEZEROZERO.

WA_Activate
    Activate the window when it opens.  Equivalent to @{"NewWindow" link 4-2 8}.Flags
    WFLG_ACTIVATE.  Use this flag carefully, as it can change where the
    user's input is going.

WA_RMBTrap
    Catch right mouse button events for application use.  Set this flag
    to disable menu operations for the window.  When set, right mouse
    button events will be received as @{"IDCMP_MOUSEBUTTONS" link ADCD_v1.2:Reference_Library/Libraries/Lib_9/9-6-1-1} with the MENUUP
    and MENUDOWN qualifiers.  Equivalent to @{"NewWindow" link 4-2 8}.Flags WFLG_RMBTRAP.

    The WFLG_RMBTRAP flag in the @{"Window" link 4-2 8} structure Flags field may be
    modified on the fly by the program.  Changing this flag must be done
    as an atomic operation, as Intuition can preempt a multistep set or
    clear operation.  An atomic operation can be done in assembler, using
    68000 instructions that operate directly on memory.  If you are
    unsure of generating such an instruction, place the operation within
    a @{"Forbid()/Permit()" link ADCD_v1.2:Reference_Library/Libraries/Lib_21/21-8 10} pair.  This will ensure proper operation by
    disabling multitasking while the flag is being changed.

WA_SimpleRefresh
    The application program takes complete responsibility for updating
    the window.  Only specify if TRUE.  Equivalent to @{"NewWindow" link 4-2 8}.Flags
    WFLG_SIMPLE_REFRESH.

WA_SmartRefresh
    Intuition handles all window updating, except for parts of the window
    revealed when the window is sized larger.  Only specify if TRUE.
    Equivalent to @{"NewWindow" link 4-2 8}.Flags WFLG_SMART_REFRESH.

    WA_SmartRefresh windows without a sizing gadget will never receive
    refresh events due to the user sizing the window.  However, if the
    application sizes the window through a call like @{"ChangeWindowBox()" link 4-8-3},
    @{"ZipWindow()" link 4-8-3} or @{"SizeWindow()" link 4-8-3}, a refresh event may be generated.  Use
    WA_NoCareRefresh to disable refresh events.

WA_SuperBitMap
    This is a pointer to a @{"BitMap" link ADCD_v1.2:Reference_Library/Libraries/Lib_3/3-7 4} structure for a SuperBitMap window. The
    application will be allocating and maintaining its own bitmap.
    Equivalent to @{"NewWindow" link 4-2 8}.BitMap.  Setting this tag implies the
    WFLG_SUPER_BITMAP property.

    For complete information about SuperBitMap, see
    "@{"Setting Up a SuperBitMap Window" link 4-5-5}" in this chapter.

WA_AutoAdjust
    Allow Intuition to change the window's position and dimensions in
    order to fit it on screen.  The window's position is adjusted first,
    then the size.  This property may be especially important when using
    @{"WA_InnerWidth and WA_InnerHeight" link 4-7-2 115} as border size depends on a user
    specified font.

WA_MenuHelp (new for V37, ignored by V36)
    Enables @{"IDCMP_MENUHELP" link ADCD_v1.2:Reference_Library/Libraries/Lib_9/9-6-1-3 21}: pressing Help during menus will return
    IDCMP_MENUHELP message.  See the "@{"Intuition Menus" link ADCD_v1.2:Reference_Library/Libraries/Lib_6/6-2-8}" chapter for more
    information.

WA_Flags
    Multiple initialization of window flags, equivalent to
    @{"NewWindow" link 4-2 8}.Flags. Use the WFLG_ constants to initialize this field,
    multiple bits may be set by ORing the values together.

WA_BackFill
    Allows you to specify a backfill hook for your window's layer.  See
    the description of @{"CreateUpFrontHookLayer()" link ADCD_v1.2:Inc&AD2.1/autodocs/layers/CreateUpFrontHookLayer()} in the "Includes and
    Autodocs" manual.  Note that this tag is implemented in V37, contrary
    to what some versions of the include files may say.

@ENDNODE

@NODE 4-8 "4 Intuition Windows / Other Window Functions"
This section contains a brief overview of other Intuition functions that
affect windows.  For a complete description of all Intuition functions,
see the Amiga ROM Kernel Reference Manual: Includes and Autodocs.

@{" Menus and the Active Window " link 4-8-1}
@{" Requesters in the Window " link 4-8-2}
@{" Program Control of Window Arrangement " link 4-8-3}
@{" Changing the Window or Screen Title " link 4-8-4}
@{" Changing Message Queue Limits " link 4-8-5}
@{" Changing Pointer Position Reports " link 4-8-6}
@{" Custom Pointers " link 4-8-7}

@ENDNODE

@NODE 4-8-1 "4 / Other Window Functions / Menus and the Active Window"
Menus for the active window will be displayed when the user presses the
menu button on the mouse.  Menus may be disabled for the window by not
providing a menu strip, or by clearing the menus with @{"ClearMenuStrip()" link ADCD_v1.2:Reference_Library/Libraries/Lib_6/6-2-1 11}.
Similarly, if the active window has @{"WFLG_RMBTRAP" link 4-7-3 95} set, the menu button will
not bring up the menus.

Two other functions, @{"SetMenuStrip()" link ADCD_v1.2:Reference_Library/Libraries/Lib_6/6-2-1} and @{"ResetMenuStrip()" link ADCD_v1.2:Reference_Library/Libraries/Lib_6/6-2-4 9}, are used to
attach or update the menu strip for a window.

    void ClearMenuStrip( struct Window *window );
    BOOL SetMenuStrip( struct Window *window, struct Menu *menu );
    BOOL ResetMenuStrip( struct Window *window, struct Menu *menu );

If @{"SetMenuStrip()" link ADCD_v1.2:Reference_Library/Libraries/Lib_6/6-2-1} has been called for a window, @{"ClearMenuStrip()" link ADCD_v1.2:Reference_Library/Libraries/Lib_6/6-2-1 11} must be
called before closing the window.  After ClearMenuStrip() has been called,
the user can no longer access menus for this window.  See the chapter
"@{"Intuition Menus" link ADCD_v1.2:Reference_Library/Libraries/Lib_6/6-2}," for complete information about setting up menus.

@ENDNODE

@NODE 4-8-2 "4 / Other Window Functions / Requesters in the Window"
Requesters are temporary sub-windows, usually containing several gadgets,
used to confirm actions, access files, or adjust the options of a command
the user has just given.  @{"Request()" link ADCD_v1.2:Reference_Library/Libraries/Lib_7/7-2-1 12} creates and activates a requester in
the window.  @{"EndRequest()" link ADCD_v1.2:Reference_Library/Libraries/Lib_7/7-2-1 24} removes the requester from the window.

    BOOL Request( struct Requester *requester, struct Window *window );
    void EndRequest( struct Requester *requester, struct Window *window );

For simple requesters in a format that matches system requesters, two new
functions have been added to Release 2:

    LONG EasyRequestArgs( struct Window *window,
                          struct EasyStruct *easyStruct,
                          ULONG *idcmpPtr, APTR args );
    LONG EasyRequest( struct Window *window,
                          struct EasyStruct *easyStruct,
                          ULONG *idcmpPtr, APTR arg1, ... );

The @{"EasyRequest()" link ADCD_v1.2:Reference_Library/Libraries/Lib_7/7-4} functions support requesters with one or more gadgets
automatically providing a layout that is sensitive to the current font and
screen resolution.  See the chapter "@{"Intuition Requesters and Alerts" link ADCD_v1.2:Reference_Library/Libraries/Lib_7/7-4}" for
more information on using requester functions.

@ENDNODE

@NODE 4-8-3 "4 / Other Window Functions / Program Control of Window Arrangement"
@{"MoveWindow()" link ADCD_v1.2:Inc&AD2.1/autodocs/intuition/MoveWindow()}, @{"SizeWindow()" link ADCD_v1.2:Inc&AD2.1/autodocs/intuition/SizeWindow()}, @{"WindowToFront()" link ADCD_v1.2:Inc&AD2.1/autodocs/intuition/WindowToFront()} and @{"WindowToBack()" link ADCD_v1.2:Inc&AD2.1/autodocs/intuition/WindowToBack()} allow the
program to modify the size and placement of its windows.  These calls are
available in all versions of the operating system.

@{"MoveWindowInFrontOf()" link ADCD_v1.2:Inc&AD2.1/autodocs/intuition/MoveWindowInFrontOf()}, @{"ChangeWindowBox()" link ADCD_v1.2:Inc&AD2.1/autodocs/intuition/ChangeWindowBox()} and @{"ZipWindow()" link ADCD_v1.2:Inc&AD2.1/autodocs/intuition/ZipWindow()} have been added
in Release 2 to provide more flexible control over the size and placement
of windows.

All of these functions are asynchronous.  The window will not be affected
by them immediately, rather, Intuition will act on the request the next
time it receives an input event.  Currently this happens at a minimum rate
of ten times per second, and a maximum of sixty times per second.  There
is no guarantee that the operation has taken place when the function
returns.  In some cases, there are IDCMP messages which will inform the
application when the change has completed (for example, an @{"IDCMP_NEWSIZE" link ADCD_v1.2:Reference_Library/Libraries/Lib_9/9-6-1-5}
event indicates that a resize operation has completed).

Use the @{"MoveWindow()" link ADCD_v1.2:Inc&AD2.1/autodocs/intuition/MoveWindow()} function to move a window to a new position in the
screen.  Use @{"SizeWindow()" link ADCD_v1.2:Inc&AD2.1/autodocs/intuition/SizeWindow()} to change the size of the window:

    void MoveWindow( struct Window *window, long dx, long dy );
    void SizeWindow( struct Window *window, long dx, long dy );

Note that both @{"MoveWindow()" link ADCD_v1.2:Inc&AD2.1/autodocs/intuition/MoveWindow()} and @{"SizeWindow()" link ADCD_v1.2:Inc&AD2.1/autodocs/intuition/SizeWindow()} take the amount of change in
each axis (delta values instead of absolute coordinates).  To specify the
coordinates as absolute numbers, use @{"ChangeWindowBox()" link ADCD_v1.2:Inc&AD2.1/autodocs/intuition/ChangeWindowBox()}.  The SizeWindow()
function will respect the window's maximum and minimum dimensions only if
the window has a sizing gadget.

A new function in Release 2, @{"ChangeWindowBox()" link ADCD_v1.2:Inc&AD2.1/autodocs/intuition/ChangeWindowBox()}, allows an application to
change the window size and position in a single call:

    void ChangeWindowBox( struct Window *window, long left, long top,
                          long width, long height );

Note that the position and size values are absolutes and not deltas.  The
window's maximum and minimum dimensions are always respected.

To depth arrange windows under program control, use @{"WindowToFront()" link ADCD_v1.2:Inc&AD2.1/autodocs/intuition/WindowToFront()} and
@{"WindowToBack()" link ADCD_v1.2:Inc&AD2.1/autodocs/intuition/WindowToBack()}:

    void WindowToFront( struct Window *window );
    void WindowToBack( struct Window *window );

@{"WindowToFront()" link ADCD_v1.2:Inc&AD2.1/autodocs/intuition/WindowToFront()} depth arranges a given window in front of all other
windows on its screen.  @{"WindowToBack()" link ADCD_v1.2:Inc&AD2.1/autodocs/intuition/WindowToBack()} depth arranges a given window
behind all other windows on its screen.

To move a window in front of a specific, given window (as opposed to all
windows), use @{"MoveWindowInFrontOf()" link ADCD_v1.2:Inc&AD2.1/autodocs/intuition/MoveWindowInFrontOf()}:

    void MoveWindowInFrontOf( struct Window *window,
                              struct Window *behindWindow );

@{"MoveWindowInFrontOf()" link ADCD_v1.2:Inc&AD2.1/autodocs/intuition/MoveWindowInFrontOf()} is a new call provided in Release 2 and is not
available in older versions of the OS.

To toggle the window size between its two zoom settings use @{"ZipWindow()" link ADCD_v1.2:Inc&AD2.1/autodocs/intuition/ZipWindow()}.
This performs the same action that occurs when the user selects the zoom
gadget:

    void ZipWindow( struct Window *window );

The two zoom settings are the initial size and position of the window when
it was first opened and the alternate position specified with the @{"WA_Zoom" link 4-7-2 143}
tag.  If no WA_Zoom tag is provided, the alternate position is taken from
the window's minimum dimensions, unless the window was opened at its
minimum dimension.  In that case, the alternate position is taken from the
window's maximum dimension.  @{"ZipWindow()" link ADCD_v1.2:Inc&AD2.1/autodocs/intuition/ZipWindow()} is a new call provided in Release
2 and is not available in older versions of the OS.

@ENDNODE

@NODE 4-8-4 "4 / Other Window Functions / Changing the Window or Screen Title"
Each window has its own window title and local screen title.  The window
title, if specified, is always displayed in the window.  The local screen
title, if specified, is only displayed in the screen's title bar when the
window is active.  If the window does not specify a local screen title,
then the default screen title is used in the screen title bar when this
window is active.

    void SetWindowTitles( struct Window *window, UBYTE *windowTitle,
                          UBYTE *screenTitle );

This function changes the window title or local screen title for the given
window.  Both windowTitle and screenTitle can be set to -1, NULL or a NULL
terminated string.  Specifying -1 will not change the title from the
current value.  Specifying NULL will clear the window title or reset the
screen title to the default title for the screen.

@ENDNODE

@NODE 4-8-5 "4 / Other Window Functions / Changing Message Queue Limits"
Starting with V36, windows have limits on the number of mouse movement and
repeat key messages that may be waiting at their IDCMP at any time.  These
queue limits prevent the accumulation of these messages, which may arrive
at the IDCMP message port in large numbers.

Once a queue limit is reached, further messages of that type will be
discarded by Intuition.  The application will never hear about the
discarded messages; they are gone forever.  (Note that only mouse move and
key repeat messages are limited this way.  Other types of messages will
still be added to the port.)  Messages of the limited type will arrive at
the port again after the application has replied to one of the messages in
the queue.

The queue limits are independent of each other.  Having reached the limit
for one type of message does not prevent other types of messages (that
have not yet reached their queuing limits) from being added to the IDCMP.
Note that the queues apply only to the IDCMP and not to messages received
directly via an input handler or from the console device.

Order of event arrival is not a factor in the message count.  Messages may
be sequential or interspersed with other events--only the number of
messages of the specific type waiting at the IDCMP matters.

The @{"WA_RptQueue" link 4-7-2 159} tag allows setting an initial value for the repeat key
backlog limit for the window.  There is no function to change this value
as of V37.  The default value for WA_RptQueue is 3.

The @{"WA_MouseQueue" link 4-7-2 154} tag allows setting an initial value for the mouse
message backlog limit for the window.  The default value for WA_MouseQueue
is 5.  The number may later be changed with a call to @{"SetMouseQueue()" link ADCD_v1.2:Inc&AD2.1/autodocs/intuition/SetMouseQueue()}:

    LONG SetMouseQueue( struct Window *window, unsigned long queueLength );

Note that real information may be lost if the queue fills and Intuition is
forced to discard messages.  See the chapter
"@{"Intuition Mouse and Keyboard" link ADCD_v1.2:Reference_Library/Libraries/Lib_10/10-1-2}" for more information.

@ENDNODE

@NODE 4-8-6 "4 / Other Window Functions / Changing Pointer Position Reports"
Pointer position messages to a window may be turned on and off by simply
setting or clearing the @{"WFLG_REPORTMOUSE" link 4-7-3 44} flag bit in @{"Window->Flags" link 4-6 7}, in an
atomic way, as explained for the @{"WA_RMBTrap" link 4-7-3 95} tag in the "Window Attributes"
section above.  Using this direct method of setting the flag avoids the
historic confusion on the ordering of the arguments of the @{"ReportMouse()" link ADCD_v1.2:Reference_Library/Libraries/Lib_10/10-2-1 14}
function call.

Mouse reporting may be turned on even if mouse movements were not
activated when the window was opened.  The proper IDCMP flags must be set
for the window to receive the messages.  See the chapter
"@{"Intuition Mouse and Keyboard" link ADCD_v1.2:Reference_Library/Libraries/Lib_10/10-1-2}" for more details on enabling mouse
reporting in an application.

@ENDNODE

@NODE 4-8-7 "4 / Other Window Functions / Custom Pointers"
The active window also has control over the pointer.  If the active window
changes the image for the pointer using the functions @{"SetPointer()" link ADCD_v1.2:Reference_Library/Libraries/Lib_10/10-2-2 4} or
@{"ClearPointer()" link ADCD_v1.2:Reference_Library/Libraries/Lib_10/10-2-2 38}, the pointer image will change:

    void SetPointer( struct Window *window, UWORD *pointer, long height,
                     long width, long xOffset, long yOffset );

    void ClearPointer( struct Window *window );

@{"SetPointer()" link ADCD_v1.2:Reference_Library/Libraries/Lib_10/10-2-2 4} sets up the window with a sprite definition for a custom
pointer.  If the window is active, the change takes place immediately.
The pointer will not change if an inactive window calls SetPointer().  In
this way, each window may have its own custom pointer that is displayed
only when the window is active.

@{"ClearPointer()" link ADCD_v1.2:Reference_Library/Libraries/Lib_10/10-2-2 38} clears the custom pointer from the window and restores it
to the default Intuition pointer, which is set by the user.  Setting a
pointer for a window is discussed further in the chapter
"@{"Intuition Mouse and Keyboard" link ADCD_v1.2:Reference_Library/Libraries/Lib_10/10-2-2}".

@ENDNODE

@NODE 4-9 "4 Intuition Windows / Function Reference"
The following are brief descriptions of the Intuition functions that
relate to the use of Intuition windows.  See the Amiga ROM Kernel
Reference Manual: Includes and Autodocs for details on each function call.


                Table 4-2: Functions for Intuition Windows
  ______________________________________________________________________
 |                                                                      |
 |          Function                  Description                       |
 |======================================================================|
 |    @{"OpenWindowTagList()" link ADCD_v1.2:Inc&AD2.1/autodocs/intuition/OpenWindowTagList()}  Open a window.                               |
 |       @{"OpenWindowTags()" link ADCD_v1.2:Inc&AD2.1/autodocs/intuition/OpenWindowTags()}  Alternate calling sequence for               |
 |                         OpenWindowTagList().                         |
 |           @{"OpenWindow()" link ADCD_v1.2:Inc&AD2.1/autodocs/intuition/OpenWindow()}  Pre-V36 way to open a window.                |
 |          @{"CloseWindow()" link ADCD_v1.2:Inc&AD2.1/autodocs/intuition/CloseWindow()}  Close a window.                              |
 |----------------------------------------------------------------------|
 |         @{"BeginRefresh()" link ADCD_v1.2:Inc&AD2.1/autodocs/intuition/BeginRefresh()}  Turn on optimized window refresh mode.       |
 |           @{"EndRefresh()" link ADCD_v1.2:Inc&AD2.1/autodocs/intuition/EndRefresh()}  Turn off optimized window refresh mode.      |
 |   @{"RefreshWindowFrame()" link ADCD_v1.2:Inc&AD2.1/autodocs/intuition/RefreshWindowFrame()}  Redraw the borders and border gadgets of an  |
 |                         open window.                                 |
 |----------------------------------------------------------------------|
 |       @{"ActivateWindow()" link ADCD_v1.2:Inc&AD2.1/autodocs/intuition/ActivateWindow()}  Make an open window active.                  |
 |           @{"SizeWindow()" link ADCD_v1.2:Inc&AD2.1/autodocs/intuition/SizeWindow()}  Change the size of an open window.           |
 |           @{"MoveWindow()" link ADCD_v1.2:Inc&AD2.1/autodocs/intuition/MoveWindow()}  Change the position of an open window.       |
 |      @{"ChangeWindowBox()" link ADCD_v1.2:Inc&AD2.1/autodocs/intuition/ChangeWindowBox()}  Change the size and position of an open      |
 |                         window.                                      |
 |         @{"WindowLimits()" link ADCD_v1.2:Inc&AD2.1/autodocs/intuition/WindowLimits()}  Change the minimum and maximum sizes of an   |
 |                         open window.                                 |
 |         @{"WindowToBack()" link ADCD_v1.2:Inc&AD2.1/autodocs/intuition/WindowToBack()}  Move a window behind all other windows.      |
 |        @{"WindowToFront()" link ADCD_v1.2:Inc&AD2.1/autodocs/intuition/WindowToFront()}  Move a window in front of all other windows. |
 |  @{"MoveWindowInFrontOf()" link ADCD_v1.2:Inc&AD2.1/autodocs/intuition/MoveWindowInFrontOf()}  Move a window in front of another window.    |
 |            @{"ZipWindow()" link ADCD_v1.2:Inc&AD2.1/autodocs/intuition/ZipWindow()}  Change the size of window to its alternate   |
 |                         size.                                        |
 |      @{"SetWindowTitles()" link ADCD_v1.2:Inc&AD2.1/autodocs/intuition/SetWindowTitles()}  Change the window titles for the window and  |
 |                         the screen.                                  |
 |           @{"SetPointer()" link ADCD_v1.2:Inc&AD2.1/autodocs/intuition/SetPointer()}  Set up a custom pointer to display whenever  |
 |                         the window is active.                        |
 |         @{"ClearPointer()" link ADCD_v1.2:Inc&AD2.1/autodocs/intuition/ClearPointer()}  Restore the mouse pointer to its default     |
 |                         imagery.                                     |
 |______________________________________________________________________|

@ENDNODE
