%---------------- Functions ------------

\chapter{Area.mui/Area.mui }
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf FUNCTION]
Area class is a super class for every other MUI class
except windows and applications. It holds information
about an objects current position, size and weight
and manages frames, fonts and backgrounds.

Additionally, area class handles the user input. By
setting an objects MUIA\_InputMode, you can make it
behave like a button or like a toggle gadget. That's
why MUI doesn't offer an extra button class. A button
is simply a text object with a raised frame and a relverify
input mode. Since especially group class is a subclass
of area, you can create rather complex buttons consisting
of many other display elements.
\end{deflist}


\subsection{Area.mui/MUIA\_Background }
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
\begin{description}
\item[MUIA\_Background]  -- (V4 ) [IS.], LONG
\end{description}

\item[\bf FUNCTION]
Adjust the background for an object.

Every MUI object has its own background setting.
The background is displayed "'behind"' the actual
object contents, e.g. behind a the text of a
text object or behind the image of an image object.

This attribute takes the same values as MUIA\_Image\_Spec,
please refer to autodocs of image class for a complete
description.

An object without a specific background setting will
inherit the pattern from its parent group. The default
background for a window and many other background
patterns are adjustable with the preferences program.

Only a few MUII\_xxxxxxx tags make sense as background.
Important are:

MUII\_ButtonBack:
   You have to set this when you create a button gadget.
   Thus, your button will be displayed in the users
   preferred style.

MUII\_TextBack:
   Set this when you create a text object with a TextFrame,
   e.g. some kind of status line. Do *not* use MUII\_TextBack
   for simple text without frame (e.g. gadget labels).

MUII\_BACKGROUND
MUII\_SHADOW
MUII\_SHINE
MUII\_FILL
MUII\_SHADOWBACK
MUII\_SHADOWFILL
MUII\_SHADOWSHINE
MUII\_FILLBACK
MUII\_FILLSHINE
MUII\_SHINEBACK
MUII\_SHINEBACK2:
   One of MUI's predefined pattern. These are not
   configurable by the user and will always look the
   same.

Note: It is *important* that you test your programs with
      a fancy pattern configuration. With the default
      setting you won't notice any errors in your backgrounds.
\end{deflist}


\subsection{Area.mui/MUIA\_BottomEdge }
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
\begin{description}
\item[MUIA\_BottomEdge]  -- (V4 ) [..G], LONG
\end{description}

\item[\bf FUNCTION]
You can use this to read the current position and
dimension of an object, if you e.g. need it to pop
up some requester below.

Of course, this attribute is only valid when the
parent window of the object is currently open.

\item[\bf SEE ALSO]
MUIA\_TopEdge, MUIA\_Width, MUIA\_Height,
MUIA\_RightEdge, MUIA\_LeftEdge
\end{deflist}


\subsection{Area.mui/MUIA\_ContextMenu }
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
\begin{description}
\item[MUIA\_ContextMenu]  -- (V11) [ISG], Object *
\end{description}

\item[\bf FUNCTION]
Specifies a context sensitive popup menu for the current
object. For MUI, popup menus are nothing else but standard
intuition menus, so you must specify a pointer to a
MUI menustrip object (e.g. something returned from
MUI\_MakeObject(MUIO\_MenustripNM,...)) here.

Whenever the user hits the RMB and the mouse is above the parent
object, MUI will present the popup menu instead of the windows
menu.

Note: MUI will *not* dispose the MUIA\_ContextMenu object when
the object is disposed. You must take care of the menustrip
object yourself. This is because menustrip objects of
MUIA\_ContextMenu do not actually "'belong"' to their parent
objects, it's just a "'reference"'. You are allowed to use
a single menustrip object as MUIA\_ContextMenu for different
objects of the same window. Do *not* share with objects in
other windows or with the default menu of a window or
an application!

If the user selects an item, the object will receive
a MUIM\_ContextMenuChoice method containing the selected
menuitem object. If you built your menustrip tree with
MUI\_MakeObject(MUIO\_MenustripNM,...), you will find the
nm\_UserData of your menu entry in muiUserData(menuitem).
If you have control over methods because you are a
subclass, you can immediately take approriate actions
when receiving MUIM\_ContextMenuChoice.

If you dont have a subclass or dont override
MUIM\_ContextMenuChoice, the method will finally reach
area class and will set the attribute MUIA\_ContextMenuTrigger
to the appropriate menuitem object. This allows you to react on
context menu selections by simple notification and eliminates
the need of writing a subclass just for this purpose.

Note: Subclasses are always the better solution!

There is also a possibility to dynamically create popup menus
on the fly. See MUIM\_ContextMenuBuild for details.

\item[\bf NOTES]
MUI uses the same tree-like technique as always (e.g. with
drag\&drop) to find out whichs context menu to use on a
certain mouse position. This allows you to have a context
menu for a group and different context menus for its
children. The MUI preferences program makes use of that
feature by allowing to control a single gadget or a whole
page of gadgets with popup menus.

\item[\bf SEE ALSO]
MUIA\_ContextMenuTrigger, MUIM\_ContextMenuChoice,
MUIM\_ContextMenuBuild
\end{deflist}


\subsection{Area.mui/MUIA\_ContextMenuTrigger }
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
\begin{description}
\item[MUIA\_ContextMenuTrigger]  -- (V11) [..G], Object *
\end{description}

\item[\bf FUNCTION]
Allows reacting on context menus with notificaton.
When the MUIM\_ContextMenuChoice method reaches area class
because you did not override it in a subclass, it sets
MUIA\_ContextMenuTrigger to the received paremeter which
is a pointer to the user-selected menuitem object.

See MUIA\_ContextMenu for details.

\item[\bf SEE ALSO]
MUIA\_ContextMenu, MUIM\_ContextMenuChoice, MUIM\_ContextMenuBuild
\end{deflist}


\subsection{Area.mui/MUIA\_ControlChar }
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
\begin{description}
\item[MUIA\_ControlChar]  -- (V4 ) [ISG], char
\end{description}

\item[\bf FUNCTION]
Pressing the control char will have the same effect
as pressing return if the object was active.

This can be used to create old style key shortcuts.

Note: Using an uppercase control char will force
      the user to press shift.

\item[\bf SEE ALSO]
mui.h / KeyButton() macro
\end{deflist}


\subsection{Area.mui/MUIA\_CycleChain }
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
\begin{description}
\item[MUIA\_CycleChain]  -- (V11) [ISG], LONG
\end{description}

\item[\bf FUNCTION]
MUI 3 introduces a new keyboard cycle chain system. All you
have to do is to set  MUIA\_CycleChain to 1 for every object
that you want to have in your chain, MUI does the rest
automatically. The old MUIM\_Window\_SetCycleChain will continue
to work but is considered obsolete.

\item[\bf SEE ALSO]
Window.mui/MUIM\_Window\_SetCycleChain
\end{deflist}


\subsection{Area.mui/MUIA\_Disabled }
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
\begin{description}
\item[MUIA\_Disabled]  -- (V4 ) [ISG], BOOL
\end{description}

\item[\bf FUNCTION]
Disable or enable a gadget. Setting this attribute
causes a gadget to become disabled, it gets a ghost
pattern and doesn't respond to user input any longer.

Disabled gadgets cannot be activated with the TAB key.

Using MUIA\_Disable on a group of objects will disable
all objects within that group.

\item[\bf EXAMPLE]
\begin{flushleft}
\begin{verbatim}
/* we have a radio button gadget with three         */
/* entries, the third should enable a string gadget */
/* with additional parameters                       */

DoMethod(radio, MUIM_Notify, MUIA_Radio_Active, 0,
   string, 3, MUIM_Set, MUIA_Disabled, TRUE);

DoMethod(radio, MUIM_Notify, MUIA_Radio_Active, 1,
   string, 3, MUIM_Set, MUIA_Disabled, TRUE);

DoMethod(radio, MUIM_Notify, MUIA_Radio_Active, 2,
   string, 3, MUIM_Set, MUIA_Disabled, FALSE);
\end{verbatim}
\end{flushleft}
\end{deflist}


\subsection{Area.mui/MUIA\_Draggable }
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
\begin{description}
\item[MUIA\_Draggable]  -- (V11) [ISG], BOOL
\end{description}

\item[\bf FUNCTION]
Set this if you want the complete object to be
dragable for D\&D operations.
\end{deflist}


\subsection{Area.mui/MUIA\_Dropable}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
\begin{description}
\item[MUIA\_Dropable]  -- (V11) [ISG], BOOL
\end{description}

\item[\bf FUNCTION]
Only objects with this attribute set to TRUE will be asked
if they want to become an active Drag \& Drop destination
at all. Though this attribute defaults to TRUE, this doesnt
mean that every object automatically aceppts D\&D actions,
because the MUIM\_DragQuery method is answered FALSE when
it arrives at area class.

\item[\bf SEE ALSO]
MUIM\_DragQuery
\end{deflist}


\subsection{Area.mui/MUIA\_ExportID}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
\begin{description}
\item[MUIA\_ExportID]  -- (V4 ) [ISG], ULONG (OBSOLETE)
\end{description}

\item[\bf FUNCTION]
Objects with a non NULL MUIA\_ExportID export their
contents during MUIM\_Application\_Save and import
them during MUIM\_Application\_Load.

You have to use different ExportIDs for your objects!

\item[\bf NOTE]
This attribute is renamed to MUIA\_ObjectID since
muimaster.library V12.

\item[\bf SEE ALSO]
MUIM\_Application\_Save, MUIM\_Application\_Load
\end{deflist}


\subsection{Area.mui/MUIA\_FixHeight}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
\begin{description}
\item[MUIA\_FixHeight]  -- (V4 ) [I..], LONG
\end{description}

\item[\bf FUNCTION]
Give your object a fixed pixel height. This tag is
absolutely not needed in a general MUI application
and only present for emergency situations. Please
think twice before using it!

\item[\bf EXAMPLE]
\begin{flushleft}
\begin{verbatim}
/* create an 8x8 pixel rectangle with FILLPEN */

RectangleObject,
   MUIA_FixWidth  , 8,
   MUIA_FixHeight , 8,
   MUIA_Background, MUII_FILL,
   End;
\end{verbatim}
\end{flushleft}
\item[\bf SEE ALSO]
MUIA\_FixWidth, MUIA\_FixWidthTxt, MUIA\_FixHeightTxt
\end{deflist}


\subsection{Area.mui/MUIA\_FixHeightTxt}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
\begin{description}
\item[MUIA\_FixHeightTxt]  -- (V4 ) [I..], STRPTR
\end{description}

\item[\bf FUNCTION]
Give your object a fixed pixel height. The height
will match the height of the given string. This tag is
absolutely not needed in a general MUI application
and only present for emergency situations. Please
think twice before using it!

\item[\bf EXAMPLE]
\begin{flushleft}
\begin{verbatim}
/* create a fixed size rectangle with FILLPEN */

RectangleObject,
   MUIA_FixWidthTxt , "00:00:00",
   MUIA_FixHeightTxt, "\n\n",
   MUIA_Background  , MUII_FILL,
   End;
\end{verbatim}
\end{flushleft}
\item[\bf SEE ALSO]
MUIA\_FixHeight, MUIA\_FixWidth, MUIA\_FixWidthTxt
\end{deflist}


\subsection{Area.mui/MUIA\_FixWidth}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
\begin{description}
\item[MUIA\_FixWidth]  -- (V4 ) [I..], LONG
\end{description}

\item[\bf FUNCTION]
Give your object a fixed pixel width. This tag is
absolutely not needed in a general MUI application
and only present for emergency situations. Please
think twice before using it!

\item[\bf EXAMPLE]
\begin{flushleft}
\begin{verbatim}
/* create an 8x8 pixel rectangle with FILLPEN */

RectangleObject,
   MUIA_FixWidth  , 8,
   MUIA_FixHeight , 8,
   MUIA_Background, MUII_FILL,
   End;
\end{verbatim}
\end{flushleft}
\item[\bf SEE ALSO]
MUIA\_FixHeight, MUIA\_FixWidthTxt, MUIA\_FixHeightTxt
\end{deflist}


\subsection{Area.mui/MUIA\_FixWidthTxt}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
\begin{description}
\item[MUIA\_FixWidthTxt]  -- (V4 ) [I..], STRPTR
\end{description}

\item[\bf FUNCTION]
Give your object a fixed pixel width. The width
will match the width of the given string. This tag is
absolutely not needed in a general MUI application
and only present for emergency situations. Please
think twice before using it!

\item[\bf EXAMPLE]
\begin{flushleft}
\begin{verbatim}
/* create a fixed size rectangle with FILLPEN */

RectangleObject,
   MUIA_FixWidthTxt , "00:00:00",
   MUIA_FixHeightTxt, "\n\n",
   MUIA_Background  , MUII_FILL,
   End;
\end{verbatim}
\end{flushleft}
\item[\bf SEE ALSO]
MUIA\_FixHeight, MUIA\_FixWidth, MUIA\_FixHeightTxt
\end{deflist}


\subsection{Area.mui/MUIA\_Font}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
\begin{description}
\item[MUIA\_Font]  -- (V4 ) [I.G], struct TextFont *
\end{description}

\item[\bf SPECIAL INPUTS]
\begin{flushleft}
\begin{verbatim}
MUIV_Font_Inherit
MUIV_Font_Normal
MUIV_Font_List
MUIV_Font_Tiny
MUIV_Font_Fixed
MUIV_Font_Title
MUIV_Font_Big
MUIV_Font_Button
\end{verbatim}
\end{flushleft}
\item[\bf FUNCTION]
Every MUI object can have its own font, just set it with
this tag. Objects without an explicit font setting will
inherit it from their parent group.

You normally won't need to open a font yourself, just
use one of the predefined values to get a font from
the users preferences.

\item[\bf EXAMPLE]
\begin{flushleft}
\begin{verbatim}
/* since the text contains tabs,           */
/* use the fixed width font for displaying */

msgread = FloattextObject,
   MUIA_Font, MUIV_Font_Fixed,
   ...,
   End;
\end{verbatim}
\end{flushleft}
\end{deflist}


\subsection{Area.mui/MUIA\_Frame}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
\begin{description}
\item[MUIA\_Frame]  -- (V4 ) [I..], LONG
\end{description}

\item[\bf SPECIAL INPUTS]
\begin{flushleft}
\begin{verbatim}
MUIV_Frame_None
MUIV_Frame_Button
MUIV_Frame_ImageButton
MUIV_Frame_Text
MUIV_Frame_String
MUIV_Frame_ReadList
MUIV_Frame_InputList
MUIV_Frame_Prop
MUIV_Frame_Gauge
MUIV_Frame_Group
MUIV_Frame_PopUp
MUIV_Frame_Virtual
MUIV_Frame_Slider
MUIV_Frame_Count
\end{verbatim}
\end{flushleft}
\item[\bf FUNCTION]
Define a frame for the current object. Since area class
is a superclass for all elements in a window, you can
assign frames to every object you wish.

You don't adjust the style of your frame directly,
instead you only specify a type:

MUIV\_Frame\_Button
   for standard buttons with text in it.

MUIV\_Frame\_ImageButton
   for small buttons with images, e.g. the arrows
   of a scrollbar.

MUIV\_Frame\_Text
   for a text field, e.g. a status line display.

MUIV\_Frame\_String
   for a string gadget.

MUIV\_Frame\_ReadList
   for a read only list.

MUIV\_Frame\_InputList
   for a list that handles input (has a cursor).

MUIV\_Frame\_Prop
   for proportional gadgets.

MUIV\_Frame\_Group
   for groups.

How the frame is going to look is adjustable via the
preferences program.

Four spacing values belong to each frame that tell
MUI how many pixels should be left free between the
frame and its contents. These spacing values are also
user adjustable as long as you don't override them
with one of the MUIA\_InnerXXXX tags.

Note: The first object in a window (MUIA\_Window\_RootObject)
      may *not* have a frame. If you need this you will have
      to create a dummy group with just one child.

\item[\bf EXAMPLE]
\begin{flushleft}
\begin{verbatim}
strobj = StringObject,
   MUIA_Frame, MUIV_Frame_String,
   End;
\end{verbatim}
\end{flushleft}
\item[\bf SEE ALSO]
MUIA\_InnerLeft, MUIA\_InnerRight, MUIA\_InnerTop,
MUIA\_InnerBottom
\end{deflist}


\subsection{Area.mui/MUIA\_FramePhantomHoriz}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
\begin{description}
\item[MUIA\_FramePhantomHoriz]  -- (V4 ) [I..], BOOL
\end{description}

\item[\bf FUNCTION]
Setting this to TRUE causes the specified frame to be
a horizontal phantom frame. The frame will not appear
but its vertical components (frame height, inner
top and inner bottom spacing) will be used to calculate
positions and dimensions (horizontal components are
treated as 0).

This is extremely useful for a correct labeling of objects.
You would e.g. label a string gadget by using a text object
with a phantom string frame. Thus, the label text will
be always on the same vertical position as the string
gadget text, no matter what spacing values the user
configured.

\item[\bf SEE ALSO]
Label() macros in "'mui.h"'.
\end{deflist}


\subsection{Area.mui/MUIA\_FrameTitle}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
\begin{description}
\item[MUIA\_FrameTitle]  -- (V4 ) [I..], STRPTR
\end{description}

\item[\bf FUNCTION]
This tag identifies a text string that will be displayed
centered in the top line of a frame. This can become
handy if you want to name groups of objects.

You may not use MUIA\_FrameTitle without defining
a MUIA\_Frame.

\item[\bf EXAMPLE]
\begin{flushleft}
\begin{verbatim}
VGroup,
   MUIA_Frame     , MUIV_Frame_Group,
   MUIA_FrameTitle, "Spacing",
   ...
\end{verbatim}
\end{flushleft}
\item[\bf SEE ALSO]
MUIA\_Frame
\end{deflist}


\subsection{Area.mui/MUIA\_Height}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
\begin{description}
\item[MUIA\_Height]  -- (V4 ) [..G], LONG
\end{description}

\item[\bf FUNCTION]
You can use this to read the current position and
dimension of an object, if you e.g. need it to pop
up some requester below.

Of course, this attribute is only valid when the
parent window of the object is currently open.

\item[\bf SEE ALSO]
MUIA\_TopEdge, MUIA\_Width, MUIA\_LeftEdge,
MUIA\_RightEdge, MUIA\_BottomEdge
\end{deflist}


\subsection{Area.mui/MUIA\_HorizDisappear}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
\begin{description}
\item[MUIA\_HorizDisappear]  -- (V11) [ISG], LONG
\end{description}

\item[\bf FUNCTION]
Objects with a disappear level disappear automatically
when their parent window gets too small to display them.
Use this for things that make your GUI look nicer
(e.g. Imagery) but are not absolutely necessary.

By using disappearing objects, you can make nice GUIs
which still work on crappy 640x200 screens.

You can give horizontal or vertical disappear levels
to objects which are used for horizontal or vertical
layout calculations respectively.

Objects with a small disappear level disappear before
objects with a big disappear level.

\item[\bf SEE ALSO]
MUIA\_VertDisappear
\end{deflist}


\subsection{Area.mui/MUIA\_HorizWeight}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
\begin{description}
\item[MUIA\_HorizWeight]  -- (V4 ) [I..], WORD
\end{description}

\item[\bf FUNCTION]
Adjust the horizontal weight of an object. Usually
you can simply use MUIA\_Weight instead of this tag
but in some two-dimensional groups it may become
handy to have different horizontal and vertical
weights.

\item[\bf SEE ALSO]
MUIA\_Weight
\end{deflist}


\subsection{Area.mui/MUIA\_InnerBottom}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
\begin{description}
\item[MUIA\_InnerBottom]  -- (V4 ) [I..], LONG
\end{description}

\item[\bf FUNCTION]
Adjust the space between an object and its frame.
Usually you shouldn't use this tag since you will
override the users preferred default setting.

\item[\bf SEE ALSO]
MUIA\_Frame
\end{deflist}


\subsection{Area.mui/MUIA\_InnerLeft}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
\begin{description}
\item[MUIA\_InnerLeft]  -- (V4 ) [I..], LONG
\end{description}

\item[\bf FUNCTION]
Adjust the space between an object and its frame.
Usually you shouldn't use this tag since you will
override the users preferred default setting.

\item[\bf SEE ALSO]
MUIA\_Frame
\end{deflist}


\subsection{Area.mui/MUIA\_InnerRight}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
\begin{description}
\item[MUIA\_InnerRight]  -- (V4 ) [I..], LONG
\end{description}

\item[\bf FUNCTION]
Adjust the space between an object and its frame.
Usually you shouldn't use this tag since you will
override the users preferred default setting.

\item[\bf SEE ALSO]
MUIA\_Frame
\end{deflist}


\subsection{Area.mui/MUIA\_InnerTop}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
\begin{description}
\item[MUIA\_InnerTop]  -- (V4 ) [I..], LONG
\end{description}

\item[\bf FUNCTION]
Adjust the space between an object and its frame.
Usually you shouldn't use this tag since you will
override the users preferred default setting.

\item[\bf SEE ALSO]
MUIA\_Frame
\end{deflist}


\subsection{Area.mui/MUIA\_InputMode}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
\begin{description}
\item[MUIA\_InputMode]  -- (V4 ) [I..], LONG
\end{description}

\item[\bf SPECIAL INPUTS]
\begin{flushleft}
\begin{verbatim}
MUIV_InputMode_None
MUIV_InputMode_RelVerify
MUIV_InputMode_Immediate
MUIV_InputMode_Toggle
\end{verbatim}
\end{flushleft}
\item[\bf FUNCTION]
Adjust the input mode for an object.

MUI has no distinct button class. Instead you can make
every object (even groups) behave like a button by
setting an input mode for them. Several input modes
area available:

MUIV\_InputMode\_None:
   No input, this is not a gadget.

MUIV\_InputMode\_RelVerify:
   For buttons and similar stuff.

MUIV\_InputMode\_Immediate:
   Used e.g. in a radio button object.

MUIV\_InputMode\_Toggle:
   For things like checkmark gadgets.

The input mode setting determines how a user action
will trigger the attributes MUIA\_Selected, MUIA\_Pressed
and MUIA\_Timer. See their documentation for details.

\item[\bf EXAMPLE]
\begin{flushleft}
\begin{verbatim}
/* A traditional button, just a text object with */
/* a button frame and a relverify input mode:    */

okbutton = TextObject,
   MUIA_Frame        , MUIV_Frame_Button,
   MUIA_InputMode    , MUIV_InputMode_RelVerify,
   MUIA_Text_Contents, "OK",
   ...
\end{verbatim}
\end{flushleft}
\item[\bf SEE ALSO]
MUIA\_Selected, MUIA\_Timer, MUIA\_Pressed
\end{deflist}


\subsection{Area.mui/MUIA\_LeftEdge}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
\begin{description}
\item[MUIA\_LeftEdge]  -- (V4 ) [..G], LONG
\end{description}

\item[\bf FUNCTION]
You can use this to read the current position and
dimension of an object, if you e.g. need it to pop
up some requester below.

Of course, this attribute is only valid when the
parent window of the object is currently open.

\item[\bf SEE ALSO]
MUIA\_TopEdge, MUIA\_Width, MUIA\_Height,
MUIA\_RightEdge, MUIA\_BottomEdge
\end{deflist}


\subsection{Area.mui/MUIA\_MaxHeight}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
\begin{description}
\item[MUIA\_MaxHeight]  -- (V11) [I..], LONG
\end{description}

\item[\bf FUNCTION]
Specify a maximum height for an object (in pixels).

\item[\bf SEE ALSO]
MUIA\_MaxWidth, MUIA\_FixWidth, MUIA\_FixHeight
\end{deflist}


\subsection{Area.mui/MUIA\_MaxWidth}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
\begin{description}
\item[MUIA\_MaxWidth]  -- (V11) [I..], LONG
\end{description}

\item[\bf FUNCTION]
Specify a maximum width for an object (in pixels).

\item[\bf SEE ALSO]
MUIA\_MaxHeight, MUIA\_FixWidth, MUIA\_FixHeight
\end{deflist}


\subsection{Area.mui/MUIA\_ObjectID}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
\begin{description}
\item[MUIA\_ObjectID]  -- (V11) [ISG], ULONG
\end{description}

\item[\bf FUNCTION]
This is a synonym for MUIA\_ExportID.

\item[\bf SEE ALSO]
MUIA\_ExportID
\end{deflist}


\subsection{Area.mui/MUIA\_Pressed}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
\begin{description}
\item[MUIA\_Pressed]  -- (V4 ) [..G], BOOL
\end{description}

\item[\bf FUNCTION]
Learn if a button is pressed (or released).
The MUIA\_Pressed attribute of a gadget is triggered
by some user action, depending on the input mode:

MUIV\_InputMode\_RelVerify:
   - set when lmb is pressed.
   - cleared when lmb is released and the mouse
     is still over the gadget (otherwise it will
     be cleared too, but without triggering a
     notification event).

MUIV\_InputMode\_Immediate:
   - undefined, use MUIA\_Selected for this.

MUIV\_InputMode\_Toggle:
   - undefined, use MUIA\_Selected for this.

Waiting for MUIA\_Pressed getting FALSE is the usual
way to react on button gadgets.

\item[\bf EXAMPLE]
\begin{flushleft}
\begin{verbatim}
DoMethod(btcancel,MUIM_Notify,MUIA_Pressed,FALSE,
   app,2,MUIM_Application_ReturnID,ID_CANCEL);
\end{verbatim}
\end{flushleft}
\item[\bf SEE ALSO]
MUIA\_Selected, MUIA\_Timer, MUIA\_ShowSelState, MUIA\_InputMode
\end{deflist}


\subsection{Area.mui/MUIA\_RightEdge}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
\begin{description}
\item[MUIA\_RightEdge]  -- (V4 ) [..G], LONG
\end{description}

\item[\bf FUNCTION]
You can use this to read the current position and
dimension of an object, if you e.g. need it to pop
up some requester below.

Of course, this attribute is only valid when the
parent window of the object is currently open.

\item[\bf SEE ALSO]
MUIA\_TopEdge, MUIA\_Width, MUIA\_Height,
MUIA\_LeftEdge, MUIA\_BottomEdge
\end{deflist}


\subsection{Area.mui/MUIA\_Selected}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
\begin{description}
\item[MUIA\_Selected]  -- (V4 ) [ISG], BOOL
\end{description}

\item[\bf FUNCTION]
Get and set the selected state of a gadget.
This attribute can be triggered by the user
clicking on the gadget (or using the keyboard),
depending on the input mode:

MUIV\_InputMode\_RelVerify:
   - set when lmb is pressed.
   - cleared when lmb is released.
   - cleared when the gadget is selected and the
     mouse leaves the gadget box.
   - set when the mouse reenters the gadget box.

MUIV\_InputMode\_Immediate:
   - set when lmb is pressed.

MUIV\_InputMode\_Toggle:
   - toggled when lmb is pressed.

Of course you may set this attribute yourself, e.g.
to adjust the state of a checkmark gadget.

A selected gadget will display its border reverse
and get the configured MUII\_SelectedBack background.
This can be avoided using the MUIA\_ShowSelState tag.

\item[\bf SEE ALSO]
MUIA\_Pressed, MUIA\_Timer, MUIA\_ShowSelState, MUIA\_InputMode
\end{deflist}


\subsection{Area.mui/MUIA\_ShortHelp}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
\begin{description}
\item[MUIA\_ShortHelp]  -- (V11) [ISG], STRPTR
\end{description}

\item[\bf FUNCTION]
Specify a string that is to be used as bubble help for this
object.
\end{deflist}


\subsection{Area.mui/MUIA\_ShowMe}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
\begin{description}
\item[MUIA\_ShowMe]  -- (V4 ) [ISG], BOOL
\end{description}

\item[\bf FUNCTION]
Objects with this attribute set are not displayed. You can
set MUIA\_ShowMe at any time, causing objects to appear and
to disappear immediately. A new layout is calculated whenever
some objects are shown or hidden. When necessary, MUI will
resize the parent window to make place for the new objects.

\item[\bf NOTE]
Currently, MUI does a complete window refresh after
showing/hiding objects. This behaviour might get improved
in the future.
\end{deflist}


\subsection{Area.mui/MUIA\_ShowSelState}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
\begin{description}
\item[MUIA\_ShowSelState]  -- (V4 ) [I..], BOOL
\end{description}

\item[\bf FUNCTION]
Normally a gadget will reverse its frame and
display the configured MUII\_SelectetBack background
pattern in its selected state. For some objects
(e.g. checkmarks) this is not recommended and
can be supressed by setting MUIA\_ShowSelState
to FALSE.

\item[\bf SEE ALSO]
MUIA\_Selected
\end{deflist}


\subsection{Area.mui/MUIA\_Timer}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
\begin{description}
\item[MUIA\_Timer]  -- (V4 ) [..G], LONG
\end{description}

\item[\bf FUNCTION]
MUIA\_Timer gets triggered when a relverify button is
pressed and (after a little delay) increases every
INTUITICK as long as the mouse remains over the gadget.

This makes it possible to have buttons repeatedly
cause some actions, just like the arrow gadgets of
a scrollbar.

\item[\bf EXAMPLE]
\begin{flushleft}
\begin{verbatim}
DoMethod(btmore,MUIM_Notify,MUIA_Timer,MUIV_EveryTime,
   app,2,MUIM_Application_ReturnID,ID_MORE);

DoMethod(btless,MUIM_Notify,MUIA_Timer,MUIV_EveryTime,
   app,2,MUIM_Application_ReturnID,ID_LESS);
\end{verbatim}
\end{flushleft}
\item[\bf SEE ALSO]
MUIA\_Pressed, MUIA\_Selected
\end{deflist}


\subsection{Area.mui/MUIA\_TopEdge}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
\begin{description}
\item[MUIA\_TopEdge]  -- (V4 ) [..G], LONG
\end{description}

\item[\bf FUNCTION]
You can use this to read the current position and
dimension of an object, if you e.g. need it to pop
up some requester below.

Of course, this attribute is only valid when the
parent window of the object is currently open.

\item[\bf SEE ALSO]
MUIA\_LeftEdge, MUIA\_Width, MUIA\_Height,
MUIA\_RightEdge, MUIA\_BottomEdge
\end{deflist}


\subsection{Area.mui/MUIA\_VertDisappear}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
\begin{description}
\item[MUIA\_VertDisappear]  -- (V11) [ISG], LONG
\end{description}

\item[\bf FUNCTION]
Objects with a disappear level disappear automatically
when their parent window gets too small to display them.
Use this for things that make your GUI look nicer
(e.g. Imagery) but are not absolutely necessary.

By using disappearing objects, you can make nice GUIs
which still work on crappy 640x200 screens.

You can give horizontal or vertical disappear levels
to objects which are used for horizontal or vertical
layout calculations respectively.

Objects with a small disappear level disappear before
objects with a big disappear level.

\item[\bf SEE ALSO]
MUIA\_HorizDisappear
\end{deflist}


\subsection{Area.mui/MUIA\_VertWeight}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
\begin{description}
\item[MUIA\_VertWeight]  -- (V4 ) [I..], WORD
\end{description}

\item[\bf FUNCTION]
Adjust the vertical weight of an object. Usually
you can simply use MUIA\_Weight instead of this tag
but in some two-dimensional groups it may become
handy to have different horizontal and vertical
weights.

\item[\bf SEE ALSO]
MUIA\_Weight
\end{deflist}


\subsection{Area.mui/MUIA\_Weight}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
\begin{description}
\item[MUIA\_Weight]  -- (V4 ) [I..], WORD
\end{description}

\item[\bf FUNCTION]
This tag is a shorthand for MUIA\_HorizWeight and
MUIA\_VertHeight, it sets both weights at once.

The weight of an object determines how much room it
will get during the layout process. Imagine you have
a 100 pixel wide horizontal group with two string
gadgets. Usually, each gadget will get half of the
room and be 50 pixels wide. If you feel the left
gadget is more important and should be bigger,
you can give it a weight of 200 (and 100 for
the right gadget). Because the left gadget is
twice as "'heavy"' as the right gadget, it will
become twice as big (about 66 pixel) as the
right one (34 pixel).

Of course giving weights only makes sense if the
object is resizable. A MUIA\_VertWeight for a
(always fixed height) string gadget is useless.

An object with a weight of 0 will always stay
at its minimum size.

By default, all objects have a weight of 100.

\item[\bf EXAMPLE]
\begin{flushleft}
\begin{verbatim}
HGroup,
   StringGadget, MUIA_Weight,  50, End,
   StringGadget, MUIA_Weight, 100, End,
   StringGadget, MUIA_Weight, 200, End,
   End;
\end{verbatim}
\end{flushleft}
\item[\bf SEE ALSO]
MUIA\_HorizWeight, MUIA\_VertWeight
\end{deflist}


\subsection{Area.mui/MUIA\_Width}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
\begin{description}
\item[MUIA\_Width]  -- (V4 ) [..G], LONG
\end{description}

\item[\bf FUNCTION]
You can use this to read the current position and
dimension of an object, if you e.g. need it to pop
up some requester below.

Of course, this attribute is only valid when the
parent window of the object is currently open.

\item[\bf SEE ALSO]
MUIA\_TopEdge, MUIA\_LeftEdge, MUIA\_Height,
MUIA\_RightEdge, MUIA\_BottomEdge
\end{deflist}


\subsection{Area.mui/MUIA\_Window}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
\begin{description}
\item[MUIA\_Window]  -- (V4 ) [..G], struct Window *
\end{description}

\item[\bf FUNCTION]
This attribute can be used to get a pointer to the
intuition window structure of the parent window
ot the object. This pointer could e.g. be used
in calls to asl.library.

The result is only valid when the window is opened.

\item[\bf SEE ALSO]
MUIA\_Window\_Window
\end{deflist}


\subsection{Area.mui/MUIA\_WindowObject}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
\begin{description}
\item[MUIA\_WindowObject]  -- (V4 ) [..G], Object *
\end{description}

\item[\bf FUNCTION]
You can obtain a pointer to the window object
that some gadget belongs to by using this attribute.
Useful mainly within callback hooks if you do not want
to deal with global variables.

\item[\bf SEE ALSO]
MUIA\_ApplicationObject
\end{deflist}


\subsection{Area.mui/MUIM\_AskMinMax}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
MUIM\_AskMinMax (V4 )
[For use within custom classes only]

\item[\bf SYNOPSIS]
\begin{flushleft}
\begin{verbatim}
DoMethod(obj,MUIM_AskMinMax,struct MUI_MinMax *MinMaxInfo);
\end{verbatim}
\end{flushleft}
\item[\bf FUNCTION]
see developer documentation.
\end{deflist}


\subsection{Area.mui/MUIM\_Cleanup}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
MUIM\_Cleanup (V4 )
[For use within custom classes only]

\item[\bf SYNOPSIS]
\begin{flushleft}
\begin{verbatim}
DoMethod(obj,MUIM_Cleanup,);
\end{verbatim}
\end{flushleft}
\item[\bf FUNCTION]
see developer documentation.
\end{deflist}


\subsection{Area.mui/MUIM\_ContextMenuBuild}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
MUIM\_ContextMenuBuild (V11)

\item[\bf SYNOPSIS]
\begin{flushleft}
\begin{verbatim}
DoMethod(obj,MUIM_ContextMenuBuild,LONG mx, LONG my);
\end{verbatim}
\end{flushleft}
\item[\bf FUNCTION]
Allows dynamic creation of context menus.
When MUI is about to show a new context menu, it does not
simply use the MUIA\_ContextMenu field of area class. Instead,
it sends a MUIM\_ContextMenuBuild to the object in question and
uses the return value as the new menustrip object.

When MUIM\_ContextMenuBuild reaches area class, it just return
the contents of MUIA\_ContextMenu so you neednt care about this
method if you only have static, non-changing context menus.

However, if your context menus depend on some internal states
of your objects or on the mouse position within your objects,
you have to have a subclass which overrides
MUIM\_ContextMenuBuild, creates a nice menustrip object and
returns it.

\item[\bf INPUTS]
\begin{description}
\item[mx]  - current x position of mouse
\item[my]  - current y position of mouse
\end{description}

Since MUI does (unfortunately) not use relative coordinates
at all, these two aren't relative either.

\item[\bf RESULT]
You must return a pointer to a menustrip object or NULL if
you failed to create one.

\item[\bf NOTES]
MUI will never dispose the object you return. You must be
take care of this yourself, e.g. by storing a pointer somewhere
in your instance data and killing it on the next invocation
of MUIM\_ContextMenuBuild and on OM\_DISPOSE.

Even when overriding MUIM\_ContextMenuBuild, you *must* set
MUIA\_ContextMenu of your object to something different from NULL.
MUI will find out that your object actually has a popup menu
by directly checking the contents of MUIA\_ContextMenu in the
instance data of area class due to speed reasons.

\item[\bf SEE ALSO]
MUIA\_ContextMenu, MUIA\_ContextMenuTrigger, MUIM\_ContextMenuChoice,
\end{deflist}


\subsection{Area.mui/MUIM\_ContextMenuChoice}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
MUIM\_ContextMenuChoice (V11)

\item[\bf SYNOPSIS]
\begin{flushleft}
\begin{verbatim}
DoMethod(obj,MUIM_ContextMenuChoice,Object *item);
\end{verbatim}
\end{flushleft}
\item[\bf FUNCTION]
Allows reacting on context menus in subclasses.

See MUIA\_ContextMenu for details.

\item[\bf SEE ALSO]
MUIA\_ContextMenuTrigger, MUIM\_ContextMenuChoice,
MUIM\_ContextMenuBuild
\end{deflist}


\subsection{Area.mui/MUIM\_DragBegin}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
MUIM\_DragBegin (V11)

\item[\bf SYNOPSIS]
\begin{flushleft}
\begin{verbatim}
DoMethod(obj,MUIM_DragBegin,Object *obj);
\end{verbatim}
\end{flushleft}
\item[\bf FUNCTION]
Inform an object that it has become the active destination
of a drag\&drop action. An object will only receive this if
it has responded positively to a previous MUIM\_DragQuery.

\item[\bf SEE ALSO]
MUIM\_DragQuery, MUIM\_DragFinish, MUIM\_DragReport, MUIM\_DragDrop
\end{deflist}


\subsection{Area.mui/MUIM\_DragDrop}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
MUIM\_DragDrop (V11)

\item[\bf SYNOPSIS]
\begin{flushleft}
\begin{verbatim}
DoMethod(obj,MUIM_DragDrop,Object *obj, LONG x, LONG y);
\end{verbatim}
\end{flushleft}
\item[\bf FUNCTION]
 Indicate that the user dropped something on the current
object.

\item[\bf SEE ALSO]
MUIM\_DragBegin, MUIM\_DragFinish, MUIM\_DragReport, MUIM\_DragQuery
\end{deflist}


\subsection{Area.mui/MUIM\_DragFinish}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
MUIM\_DragFinish (V11)

\item[\bf SYNOPSIS]
\begin{flushleft}
\begin{verbatim}
DoMethod(obj,MUIM_DragFinish,Object *obj);
\end{verbatim}
\end{flushleft}
\item[\bf FUNCTION]
Indicate that an object is no longer the active destination
object of a drag\&drop action.

\item[\bf SEE ALSO]
MUIM\_DragQuery, MUIM\_DragBegin, MUIM\_DragReport, MUIM\_DragDrop
\end{deflist}


\subsection{Area.mui/MUIM\_DragQuery}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
MUIM\_DragQuery (V11)

\item[\bf SYNOPSIS]
\begin{flushleft}
\begin{verbatim}
DoMethod(obj,MUIM_DragQuery,Object *obj);
\end{verbatim}
\end{flushleft}
\item[\bf FUNCTION]
MUI offers complete drag \& drop capabilities for every object.
If enabled, the user is able to grab an object, drag it around
and drop it on another object. Currently, D\&D is limited to
single applications, i.e. you cannot take an object from one
program and drop it into another one. D\&D between different
windows of the same application, however, is fine.

MUI controls the D\&D actions with a set of five methods:
MUIM\_DragQuery, MUIM\_DragBegin, MUIM\_DragReport, MUIM\_DragDrop
and MUIM\_DragFinish. Basically things work this way:

Lets assume the user has taken an object (called the source
object) and is now starting to drag it around. During
dragging, MUI will find out which object is currently under
the mouse pointer and if it found one, send it the
MUIM\_DragQuery method. An object that receives MUIM\_DragQuery
can now determine it it wishes to accept drops from the source
object or not. If it responds positively, the object will
become the current destination object.

Due to the nature of MUIs layout system, a specific x,y pair
of coordinates cannot be bound to a specific object
immediately. Instead, the coordinates belong to a whole tree
of objects, for example some cycle gadget, its parent group,
the parent group of the parent group and so on until the tree
reaches the windows root object. To allow complete groups of
objects to participate in D\&D business, the MUIM\_DragQuery is
first sent to the deepest nested object (the cycle gadget in
the above example). If this one doesn't respond, MUI sends a
MUIM\_DragQuery to its parent group and so on until it either
finds some object who accepts the drop or reaches the end of
the tree. If there is an accepting object, it will become the
current destination, if there isnt, no destination will be
set.

Objects becoming active destinations of a drag process learn
about their current state by receiving a MUIM\_DragBegin
method. This method, when reaching area class, e.g. draws a
special frame around the object to indicate the current state
to the user.

The opposite of MUIM\_DragBegin is MUIM\_DragFinish will be sent
as soon as the object stops being destination of the drag
process, i.e. because the user aborted the drag or moved out
of the bounding box. MUIM\_DragFinish will also be sent after a
successful drop, you cant count on receiving a MUIM\_DragFinish
if you received a MUIM\_DragBegin before. Furthermore, only one
object will be between MUIM\_DragBegin and MUIM\_DragFinish at
any time.

Active destination objects (between MUIM\_DragBegin and
MUIM\_DragFinish) receive MUIM\_DragReport methods as long as
the user moves the mouse within the object. MUIM\_DragReport
contains the mouse coordinates, so the object can update its
display according to the position of the source object. A
listview would e.g. indicate the insert position to give the
user an idea where the source would be inserted in case of a
drop.

All the method mentioned above are just interim messages that
help visualizing the drag process. When the user actually
decides to drop its source object, the current destination
object (if any) receives a MUIM\_DragDrop method and can
perfrom whatever operatoin it thinks is suited to handle a D\&D
action from the source object.

You probably have noticed that D\&D is controlled by methods.
This means that you need to write subclasses if you intend to
use it. However, you neednt implement all the above mentioned
things to reach your goal. In fact, MUIM\_DragQuery and
MUIM\_DragDrop are enough for almost all D\&D invocations.
Here's a little example of how MUI implements D\&D between
objects of Pendisplay class. These few lines allow the user to
take any Pendisplay (or subclasses from Pendisplay like e.g.
Poppen class) and drop it onto another one:

ULONG mDragQuery(cl,obj,struct MUIP\_DragQuery *msg)
\{
        char *spec;

        /* refuse to drop on ourselves */
        if (msg$\rightarrow$obj==obj)
                return(MUIV\_DragQuery\_Refuse);

        /* if the source object offers the attribute */
        /* we want, show that we would accept it. */
        if (get(msg$\rightarrow$obj,MUIA\_Pendisplay\_Spec,\&spec))
                return(MUIV\_DragQuery\_Accept);

        /* refuse otherwise */
        return(MUIV\_DragQuery\_Refuse);
\}


ULONG mDragDrop(cl,obj,struct MUIP\_DragDrop *msg)
\{
        char *spec;

        /* copy the attribute from the source object */
        get(msg$\rightarrow$obj,MUIA\_Pendisplay\_Spec,\&spec);
        set(obj,MUIA\_Pendisplay\_Spec,spec);

        return(0);
\}

\item[\bf SEE ALSO]
MUIM\_DragBegin, MUIM\_DragFinish, MUIM\_DragReport, MUIM\_DragDrop
\end{deflist}


\subsection{Area.mui/MUIM\_DragReport}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
MUIM\_DragReport (V11)

\item[\bf SYNOPSIS]
\begin{flushleft}
\begin{verbatim}
DoMethod(obj,MUIM_DragReport,Object *obj, LONG x, LONG y, LONG update);
\end{verbatim}
\end{flushleft}
\item[\bf FUNCTION]
Interim messages from MOUSEMOVEs and INTUITICKs sent as long
as an object is active destination of a drag\&drop action.

\item[\bf SEE ALSO]
MUIM\_DragQuery, MUIM\_DragFinish, MUIM\_DragBegin, MUIM\_DragDrop
\end{deflist}


\subsection{Area.mui/MUIM\_Draw}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
MUIM\_Draw (V4 )
[For use within custom classes only]

\item[\bf SYNOPSIS]
\begin{flushleft}
\begin{verbatim}
DoMethod(obj,MUIM_Draw,ULONG flags);
\end{verbatim}
\end{flushleft}
\item[\bf FUNCTION]
see developer documentation.
\end{deflist}


\subsection{Area.mui/MUIM\_HandleInput}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
MUIM\_HandleInput (V4 )
[For use within custom classes only]

\item[\bf SYNOPSIS]
\begin{flushleft}
\begin{verbatim}
DoMethod(obj,MUIM_HandleInput,struct IntuiMessage *imsg, LONG muikey);
\end{verbatim}
\end{flushleft}
\item[\bf FUNCTION]
see developer documentation.
\end{deflist}


\subsection{Area.mui/MUIM\_Hide}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
MUIM\_Hide (V4 )
[For use within custom classes only]

\item[\bf SYNOPSIS]
\begin{flushleft}
\begin{verbatim}
DoMethod(obj,MUIM_Hide,);
\end{verbatim}
\end{flushleft}
\item[\bf FUNCTION]
see developer documentation.
\end{deflist}


\subsection{Area.mui/MUIM\_Setup}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
MUIM\_Setup (V4 )
[For use within custom classes only]

\item[\bf SYNOPSIS]
\begin{flushleft}
\begin{verbatim}
DoMethod(obj,MUIM_Setup,struct MUI_RenderInfo *RenderInfo);
\end{verbatim}
\end{flushleft}
\item[\bf FUNCTION]
see developer documentation.
\end{deflist}


\subsection{Area.mui/MUIM\_Show}
\rule{\textwidth}{1mm}
\vspace{0.5cm}
\begin{deflist}{MMMMMMMM}
\item[\bf NAME]
MUIM\_Show (V4 )
[For use within custom classes only]

\item[\bf SYNOPSIS]
\begin{flushleft}
\begin{verbatim}
DoMethod(obj,MUIM_Show,);
\end{verbatim}
\end{flushleft}
\item[\bf FUNCTION]
see developer documentation.
\end{deflist}


%---------------- End of File ----------
