DEFINITION MODULE MuiMacros;

(*$ DEFINE Locale:= TRUE *)
(*$ DEFINE MUIOBSOLETE := FALSE *)
(*$ DEFINE MUI3        := TRUE  *)

(****************************************************************************
**
** $VER: MuiMacros.def 3.3 (21.2.96)
**
** The following updates have been done by
**
**   Olaf "Olf" Peters <olf@informatik.uni-bremen.de>
**
** $HISTORY:
**
**  21.2.96  3.3   : updated for MUI 3.3 release
**  23.1.96  3.2   : updated for MUI 3.2 release
** 18.11.95  3.1   : updated for MUI v3.1 release
**  17.9.95  2.3   : updated to MUI v2.3
**
****************************************************************************)

(****************************************************************************
**
**      MUI Macros 2.0
**
**      Converted to Modula by Christian "Kochtopf" Scholz
**
**      refer also to MuiMacros.mod if you want to know, how they are made.
**
**      $Id: MuiMacros.def 1.6 1996/01/25 20:24:36 olf Exp olf $
**
**/// "$Log: MuiMacros.def $
# Revision 1.6  1996/01/25  20:24:36  olf
# revised for MUI 3.2
#
# Revision 1.5  1995/12/15  16:37:53  olf
# - applied changes from Stefan Schulz
# - cleanup of IMPORT section
#"
# Revision 1.4  1995/12/04  17:30:31  olf
# MUI-Interfaces 3.1.1
#
# Revision 1.3  1995/11/18  16:46:18  olf
# MUI Release 3.1
#
# Revision 1.2  1995/10/23  17:06:34  olf
# *** empty log message ***
#
# Revision 1.1  1995/09/25  15:32:52  olf
# Initial revision
#
# Revision 1.8  1994/08/18  18:52:20  Kochtopf
# changed popbutton
#
# Revision 1.7  1994/08/11  16:59:45  Kochtopf
# *** empty log message ***
#
# Revision 1.6  1994/06/27  22:06:41  Kochtopf
# put some Macros in MUIObsolete-Parenthesis, because one should
# now use mMakeObj.
#
# Revision 1.5  1994/02/15  21:14:05  Kochtopf
# neue Macros fuer Pop* und Register definiert,
# HCenter und VCenter neu
# PopUp entfernt und durch PopButton ersetzt.
# neue Label-Macros LLabel eingefuehrt (aus mui.h)
#
# Revision 1.4  1994/02/09  14:50:03  Kochtopf
# Versionsnummer in 2.0 geaendert.
#
**\\\
****************************************************************************
** Class Tree
****************************************************************************
**
** rootclass                     (BOOPSI's base class)
** +--Notify                     (implements notification mechanism)
** !  +--Family                  (handles multiple children)
** !  !  +--Menustrip            (describes a complete menu strip)
** !  !  +--Menu                 (describes a single menu)
** !  !  \--Menuitem             (describes a single menu item)
** !  +--Application             (main class for all applications)
** !  +--Window                  (handles intuition window related topics)
** !  !  \--Aboutmui             (About window of MUI preferences)
** !  +--Area                    (base class for all GUI elements)
** !  !  +--Rectangle            (creates (empty) rectangles)
** !  !  +--Balance              (creates a balancing separator bar)
** !  !  +--Image                (creates images)
** !  !  +--Bitmap               (draws bitmaps)
** !  !  !  \--Bodychunk         (makes bitmap from ILBM body chunk)
** !  !  +--Text                 (creates some text)
** !  !  +--Gadget               (base class for intuition gadgets)
** !  !  !  +--String            (creates a string gadget)
** !  !  !  +--Boopsi            (interface to BOOPSI gadgets)
** !  !  !  \--Prop              (creates a proportional gadget)
** !  !  +--Gauge                (creates a fule gauge)
** !  !  +--Scale                (creates a percentage scale)
** !  !  +--Colorfield           (creates a field with changeable color)
** !  !  +--List                 (creates a line-oriented list)
** !  !  !  +--Floattext         (special list with floating text)
** !  !  !  +--Volumelist        (special list with volumes)
** !  !  !  +--Scrmodelist       (special list with screen modes)
** !  !  !  \--Dirlist           (special list with files)
** !  !  +--Numeric              (base class for slider gadgets)
** !  !  +--Framedisplay         (displays a frame specification)
** !  !  !  \--Popframe          (popup button to adjust a frame)
** !  !  +--Imagedisplay         (displays an image specification)
** !  !  !  \--Popimage          (popup button to adjust an image spec)
** !  !  +--Pendisplay           (displays a pen specification)
** !  !  !  +--Poppen            (popup button to adjust a pen spec)
** !  !  !  +--Knob              (creates knobs)
** !  !  !  +--Levelmeter        (creates a level display)
** !  !  !  +--Numericbutton     (creates space saving popup sliders)
** !  !  !  \--Slider            (creates slider gadgets)
** !  !  +--Group                (groups other GUI elements)
** !  !  !  +--Mccprefs          (base class for extern custom class preferences classes)
** !  !  !  +--Register          (handles page groups with titles)
** !  !  !  +--Settingsgroup     (Creates GUI elements to adjust MUIs preferences)
** !  !  !  +--Settings          (Creates prefs)
** !  !  !  +--Frameadjust       (creates an object to adjust a frame)
** !  !  !  !  \--Penadjust      (creates a group to adjust a pen)
** !  !  !  +--Imageadjust       (creates a group to adjust an image)
** !  !  !  +--Virtgroup         (handles virtual groups)
** !  !  !  +--Scrollgroup       (handles virtual groups with scrollers)
** !  !  !  +--Scrollbar         (creates a scrollbar)
** !  !  !  +--Listview          (creates a listview)
** !  !  !  +--Radio             (creates radio buttons)
** !  !  !  +--Cycle             (creates cycle gadgets)
** !  !  !  +--Coloradjust       (creates some RGB sliders)
** !  !  !  +--Palette           (creates a complete palette gadget)
** !  !  !  +--Popstring         (base class for popups)
** !  !  !  !  +--Popobject      (popup a MUI object in a window)
** !  !  !  !  !  +--Poplist     (popup a simple listview)
** !  !  !  !  !  \--Popscreen   (popup a list of public screens)
** !  !  !  !  \--Popasl         (popup an asl requester)
** +--Semaphore                  (baseclass for semaphore equipped objects)
**    +--Applist                 (private class)
**    +--Dataspace               (handles general purpose data spaces)
**       \--Configdata           (handles MUI configuration data)
**
***************************************************************************)

FROM    SYSTEM   IMPORT ADDRESS, ADR, TAG;
FROM    MuiD     IMPORT APTR, StrPtr ;

IMPORT
  m  : MuiD,
  ml : MuiL,
  ud : UtilityD ;

TYPE    ShortString = ARRAY[0..3] OF CHAR;  (* for MakeID *)

        (* Here some Types you have to use, IF you want to fill the
           array, the ListDisplayHook gets as parameter and which the hook
           has to fill *)

        STRING      = ARRAY[0..128] OF CHAR;
        STRPTR      = POINTER TO STRING;
        STRARR      = ARRAY[0..10] OF STRPTR; (* set 10 to the number of columns you have in your list *)
        STRARRPTR   = POINTER TO STRARR;

        (* Use it the following way :

        Your Hookfunction :

        PROCEDURE dspfunc(hook : HookPtr; array : APTR; entry : APTR) : APTR;

            BEGIN
                CAST(STRARRPTR,array)^[0]:=ADR(first string);
                CAST(STRARRPTR,array)^[1]:=ADR(second string);
                ...
                RETURN 0;
            END dspfunc;

        As you see, it is the same as string-arrays in C  *)


        (* Here your PROCEDURE-Prototype for your hookfunction : *)

        HookDef     = PROCEDURE(ud.HookPtr, APTR, APTR):APTR;

(*
**  MUI - Object Generation
**
**  These Macros are equal to the C-Macros which can be found in mui.h
**  But notice, that you have a different usage of these :
**
**  Instead of
**
**      app = ApplicationObject,
**
**              ...
**
**            End;
**
**  you now write :
**
**      app := ApplicationObject(TAG(buffer,    (* TAG from SYSTEM *)
**
**              ...
**
**             tagEnd));    (* tagEnd imported from UtilityD *)
**
**  Also you can't use :
**
**      app := ApplicationObject(TAG(buffer,
**
**              ...
**  ====>            window:=WindowObject(TAG(buffer, ... , tagEnd)),
**              ...
**
**             tagEnd));
**
**  instead of this, you have to define your Window-Object before the
**  Application-Object and then use the pointer in the App-Definition :
**
**      window := WindowObject(TAG(buffer, ... , tagEnd)),
**
**      app := ApplicationObject(TAG(buffer,
**
**              ...
**                   window,
**              ...
**
**             tagEnd));
**
**  So you can't define a whole application with one command if you need
**  the pointer of some objects later on (for a Notify, etc.)
**
*)

CONST   Child           = m.maGroupChild;
        SubWindow       = m.maApplicationWindow;
        WindowContents  = m.maWindowRootObject;

PROCEDURE WindowObject(tags : ud.TagItemPtr) : APTR;
PROCEDURE ImageObject(tags : ud.TagItemPtr) : APTR;
PROCEDURE NotifyObject(tags : ud.TagItemPtr) : APTR;
PROCEDURE ApplicationObject(tags : ud.TagItemPtr) : APTR;
PROCEDURE TextObject(tags : ud.TagItemPtr) : APTR;
PROCEDURE RectangleObject(tags : ud.TagItemPtr) : APTR;
PROCEDURE ListObject(tags : ud.TagItemPtr) : APTR;
PROCEDURE PropObject(tags : ud.TagItemPtr) : APTR;
PROCEDURE StringObject(tags : ud.TagItemPtr) : APTR;
PROCEDURE ScrollbarObject(tags : ud.TagItemPtr) : APTR;
PROCEDURE ListviewObject(tags : ud.TagItemPtr) : APTR;
PROCEDURE RadioObject(tags : ud.TagItemPtr) : APTR;
PROCEDURE VolumelistObject(tags : ud.TagItemPtr) : APTR;
PROCEDURE FloattextObject(tags : ud.TagItemPtr) : APTR;
PROCEDURE DirlistObject(tags : ud.TagItemPtr) : APTR;
PROCEDURE SliderObject(tags : ud.TagItemPtr) : APTR;
PROCEDURE CycleObject(tags : ud.TagItemPtr) : APTR;
PROCEDURE GaugeObject(tags : ud.TagItemPtr) : APTR;
PROCEDURE ScaleObject(tags : ud.TagItemPtr) : APTR;
PROCEDURE BoopsiObject(tags : ud.TagItemPtr) : APTR;
PROCEDURE ColorfieldObject(tags : ud.TagItemPtr) : APTR;
PROCEDURE ColoradjustObject(tags : ud.TagItemPtr) : APTR;
PROCEDURE PaletteObject(tags : ud.TagItemPtr) : APTR;
PROCEDURE GroupObject(tags : ud.TagItemPtr) : APTR;
PROCEDURE VirtgroupObject(tags : ud.TagItemPtr) : APTR;
PROCEDURE ScrollgroupObject(tags : ud.TagItemPtr) : APTR;
PROCEDURE ScrmodelistObject(tags : ud.TagItemPtr) : APTR;
PROCEDURE VGroup(tags : ud.TagItemPtr) : APTR;
PROCEDURE HGroup(tags : ud.TagItemPtr) : APTR;
PROCEDURE ColGroup(cols : LONGCARD; tags : ud.TagItemPtr) : APTR;
PROCEDURE RowGroup(rows : LONGCARD; tags : ud.TagItemPtr) : APTR;
PROCEDURE PageGroup(tags : ud.TagItemPtr) : APTR;
PROCEDURE VGroupV(tags : ud.TagItemPtr) : APTR;
PROCEDURE HGroupV(tags : ud.TagItemPtr) : APTR;
PROCEDURE ColGroupV(cols : LONGCARD; tags : ud.TagItemPtr) : APTR;
PROCEDURE RowGroupV(rows : LONGCARD; tags : ud.TagItemPtr) : APTR;
PROCEDURE PageGroupV(tags : ud.TagItemPtr) : APTR;
PROCEDURE PopString(tags : ud.TagItemPtr) : APTR;
PROCEDURE PopObject(tags : ud.TagItemPtr) : APTR;
PROCEDURE PopAsl(tags : ud.TagItemPtr) : APTR;
(*$ IF MUI3 *)
PROCEDURE PendisplayObject(tags : ud.TagItemPtr) : APTR ;
PROCEDURE PoppenObject(tags : ud.TagItemPtr) : APTR ;
(*$ ENDIF *)
PROCEDURE Register(tags : ud.TagItemPtr) : APTR;
PROCEDURE MenuStripObject(tags : ud.TagItemPtr) : APTR;
PROCEDURE MenuObject(tags : ud.TagItemPtr) : APTR;
(*$ IF Locale *)
PROCEDURE MenuObjectT(name : StrPtr; tags : ud.TagItemPtr) : APTR;
(*$ ELSE *)(*$ CopyDyn := FALSE *)
PROCEDURE MenuObjectT(name : ARRAY OF CHAR; tags : ud.TagItemPtr) : APTR;
(*$ ENDIF *)
PROCEDURE MenuItemObject(tags : ud.TagItemPtr) : APTR;

(*$ IF MUI3 *)
PROCEDURE AboutmuiObject(tags : ud.TagItemPtr) : APTR;
PROCEDURE BalanceObject(tags : ud.TagItemPtr) : APTR ;
PROCEDURE KnobObject(tags : ud.TagItemPtr) : APTR ;
PROCEDURE LevelmeterObject(tags : ud.TagItemPtr) : APTR ;
PROCEDURE NumericbuttonObject(tags : ud.TagItemPtr) : APTR ;
PROCEDURE NumericObject(tags : ud.TagItemPtr) : APTR ;
PROCEDURE PenadjustObject(tags : ud.TagItemPtr) : APTR ;
(*$ ENDIF *)

(*
**  MakeID
**  Generate an ID out of a 4-char-string.
**  Use it the as WindowID ! (look in MuiTest for an example!)
*)

PROCEDURE MakeID (name : ShortString): LONGINT;

(*
**
**  Hook Macros
**
**  Use it the following way :
**      1. Write your Hook-Function :
**          PROCEDURE hookfunc(hook:HookPtr; obj : APTR; args : APTR) : APTR
**              BEGIN
**              ...
**              END hookfunc;
**          Note, that your function needs not to specify registers, but
**          your PROCEDURE must be looking like name(HookPtr, APTR, APTR)!!
**
**      2. Define in your VAR-section a pointer to a Hookrecord :
**          VAR hook    : UtilitiesD.HookPtr;
**
**      3. fill it with MakeHook :
**          MakeHook(hookfunc,hook);
**
**      4. Use it with MUI, as you like, e.g. :
**          DoMethod(button,TAG(buffer,m.mmCallHook,hook,arg1,arg2));
**
*)

PROCEDURE MakeHook(entry:HookDef; VAR hook : ud.HookPtr);

(*
**
**  Spacing Macros
**
**  (not all from mui.h)
**
*)

PROCEDURE HVSpace() : APTR;
PROCEDURE HSpace(x : LONGCARD) : APTR;
PROCEDURE VSpace(x : LONGCARD) : APTR;
PROCEDURE HCenter(obj : APTR) : APTR;
PROCEDURE VCenter(obj : APTR) : APTR;

(*
**
**  Popup-Object
**
**
*)

PROCEDURE PopButton(img : APTR) : APTR;



(*$ IF MUIObsolete *)

(*
**
** String-Object
**
** Creates a simple String-Gadget
**
*)

(*$ IF Locale *)
PROCEDURE String(contents : StrPtr; maxlen : LONGINT) : APTR;
PROCEDURE KeyString(contents : StrPtr; maxlen : LONGINT; key : CHAR) : APTR;
(*$ ELSE *)
PROCEDURE String(contents : ARRAY OF CHAR; maxlen : LONGINT) : APTR;
PROCEDURE KeyString(contents : ARRAY OF CHAR; maxlen : LONGINT; key : CHAR) : APTR;
(*$ ENDIF *)

(*
**
** Checkmark
**
** creates a Checkmark Gadget
**
*)

PROCEDURE Checkmark(selected : BOOLEAN) : APTR;
PROCEDURE KeyCheckmark(selected : BOOLEAN; key : CHAR) : APTR;

(*
**
** Buttons
**
** Here the same note : Use small letters for Keybuttons!
**
*)

(*$ IF Locale *)
PROCEDURE Simplebutton(name : StrPtr) : APTR;
PROCEDURE Keybutton(name : StrPtr; key : CHAR) : APTR;
(*$ ELSE *)
PROCEDURE Simplebutton(name : ARRAY OF CHAR) : APTR;
PROCEDURE Keybutton(name : ARRAY OF CHAR; key : CHAR) : APTR;
(*$ ENDIF *)

(*$ ELSE *) (* if not obsolete *)

(*$ IF Locale *)
PROCEDURE Simplebutton(name : StrPtr) : APTR;
(*$ ELSE *)
PROCEDURE Simplebutton(name : ARRAY OF CHAR) : APTR;
(*$ ENDIF *)

(*$ ENDIF *) (* MUIObsolete *)

(*$ IF MUIObsolete *)

(*
**
**  Radio Object
**
*)

(*$ IF Locale *)
PROCEDURE Radio(name : StrPtr; array : APTR) : APTR;
(*$ ELSE *)
PROCEDURE Radio(name : ARRAY OF CHAR; array : APTR) : APTR;
(*$ ENDIF *)

(*$ IF Locale *)
PROCEDURE KeyRadio(name : StrPtr; array : APTR; key : CHAR) : APTR;
(*$ ELSE *)
PROCEDURE KeyRadio(name : ARRAY OF CHAR; array : APTR; key : CHAR) : APTR;
(*$ ENDIF *)


(*
**
**  Cycle-Objects
**
*)

PROCEDURE Cycle(array : APTR) : APTR;
PROCEDURE KeyCycle(array : APTR; key : CHAR) : APTR;

(*
**
**  Slider-Objects
**
*)

PROCEDURE Slider(min, max, level : LONGINT; horiz : BOOLEAN) : APTR;
PROCEDURE KeySlider(min, max, level : LONGINT; horiz : BOOLEAN; key : CHAR) : APTR;

(*$ ENDIF *) (* MUIObsolete *)



(*
**
** Label Objects
**
** The same as in mui.h
**
** Label()  : create a Label for Objects without a frame
** Label1() : create a label for Objects with a standard frame (Checkmarks...)
** Label2() : create a label for Objects with double high frame (String Gadgets...)
**
*)

(*$ IF Locale *)
PROCEDURE Label  (label : StrPtr) : APTR;
PROCEDURE Label1 (label : StrPtr) : APTR;
PROCEDURE Label2 (label : StrPtr) : APTR;
PROCEDURE LLabel (label : StrPtr) : APTR;
PROCEDURE LLabel1(label : StrPtr) : APTR;
PROCEDURE LLabel2(label : StrPtr) : APTR;

(*$ IF MUI3 *)
PROCEDURE CLabel (label : StrPtr) : APTR ;
PROCEDURE CLabel1(label : StrPtr) : APTR ;
PROCEDURE CLabel2(label : StrPtr) : APTR ;

PROCEDURE FreeLabel  (label : StrPtr) : APTR;
PROCEDURE FreeLabel1 (label : StrPtr) : APTR;
PROCEDURE FreeLabel2 (label : StrPtr) : APTR;
PROCEDURE FreeLLabel (label : StrPtr) : APTR;
PROCEDURE FreeLLabel1(label : StrPtr) : APTR;
PROCEDURE FreeLLabel2(label : StrPtr) : APTR;
PROCEDURE FreeCLabel (label : StrPtr) : APTR;
PROCEDURE FreeCLabel1(label : StrPtr) : APTR;
PROCEDURE FreeCLabel2(label : StrPtr) : APTR;
(*$ ENDIF *)

PROCEDURE KeyLabel  (label : StrPtr; HiChar : CHAR) : APTR;
PROCEDURE KeyLabel1 (label : StrPtr; HiChar : CHAR) : APTR;
PROCEDURE KeyLabel2 (label : StrPtr; HiChar : CHAR) : APTR;
PROCEDURE KeyLLabel (label : StrPtr; HiChar : CHAR) : APTR;
PROCEDURE KeyLLabel1(label : StrPtr; HiChar : CHAR) : APTR;
PROCEDURE KeyLLabel2(label : StrPtr; HiChar : CHAR) : APTR;

(*$ IF MUI3 *)
PROCEDURE FreeKeyLabel  (label : StrPtr; HiChar : CHAR) : APTR;
PROCEDURE FreeKeyLabel1 (label : StrPtr; HiChar : CHAR) : APTR;
PROCEDURE FreeKeyLabel2 (label : StrPtr; HiChar : CHAR) : APTR;
PROCEDURE FreeKeyLLabel (label : StrPtr; HiChar : CHAR) : APTR;
PROCEDURE FreeKeyLLabel1(label : StrPtr; HiChar : CHAR) : APTR;
PROCEDURE FreeKeyLLabel2(label : StrPtr; HiChar : CHAR) : APTR;
PROCEDURE FreeKeyCLabel (label : StrPtr; HiChar : CHAR) : APTR;
PROCEDURE FreeKeyCLabel1(label : StrPtr; HiChar : CHAR) : APTR;
PROCEDURE FreeKeyCLabel2(label : StrPtr; HiChar : CHAR) : APTR;
(*$ ENDIF *)

(*$ ELSE *)

PROCEDURE Label  (label : ARRAY OF CHAR) : APTR;
PROCEDURE Label1 (label : ARRAY OF CHAR) : APTR;
PROCEDURE Label2 (label : ARRAY OF CHAR) : APTR;
PROCEDURE LLabel (label : ARRAY OF CHAR) : APTR;
PROCEDURE LLabel1(label : ARRAY OF CHAR) : APTR;
PROCEDURE LLabel2(label : ARRAY OF CHAR) : APTR;

(*$ IF MUI3 *)
PROCEDURE CLabel (label : ARRAY OF CHAR) : APTR ;
PROCEDURE CLabel1(label : ARRAY OF CHAR) : APTR ;
PROCEDURE CLabel2(label : ARRAY OF CHAR) : APTR ;

PROCEDURE FreeLabel  (label : ARRAY OF CHAR) : APTR;
PROCEDURE FreeLabel1 (label : ARRAY OF CHAR) : APTR;
PROCEDURE FreeLabel2 (label : ARRAY OF CHAR) : APTR;
PROCEDURE FreeLLabel (label : ARRAY OF CHAR) : APTR;
PROCEDURE FreeLLabel1(label : ARRAY OF CHAR) : APTR;
PROCEDURE FreeLLabel2(label : ARRAY OF CHAR) : APTR;
PROCEDURE FreeCLabel (label : ARRAY OF CHAR) : APTR;
PROCEDURE FreeCLabel1(label : ARRAY OF CHAR) : APTR;
PROCEDURE FreeCLabel2(label : ARRAY OF CHAR) : APTR;
(*$ ENDIF *)

PROCEDURE KeyLabel  (label : ARRAY OF CHAR; HiChar : CHAR) : APTR;
PROCEDURE KeyLabel1 (label : ARRAY OF CHAR; HiChar : CHAR) : APTR;
PROCEDURE KeyLabel2 (label : ARRAY OF CHAR; HiChar : CHAR) : APTR;
PROCEDURE KeyLLabel (label : ARRAY OF CHAR; HiChar : CHAR) : APTR;
PROCEDURE KeyLLabel1(label : ARRAY OF CHAR; HiChar : CHAR) : APTR;
PROCEDURE KeyLLabel2(label : ARRAY OF CHAR; HiChar : CHAR) : APTR;

(*$ IF MUI3 *)
PROCEDURE FreeKeyLabel  (label : ARRAY OF CHAR; HiChar : CHAR) : APTR;
PROCEDURE FreeKeyLabel1 (label : ARRAY OF CHAR; HiChar : CHAR) : APTR;
PROCEDURE FreeKeyLabel2 (label : ARRAY OF CHAR; HiChar : CHAR) : APTR;
PROCEDURE FreeKeyLLabel (label : ARRAY OF CHAR; HiChar : CHAR) : APTR;
PROCEDURE FreeKeyLLabel1(label : ARRAY OF CHAR; HiChar : CHAR) : APTR;
PROCEDURE FreeKeyLLabel2(label : ARRAY OF CHAR; HiChar : CHAR) : APTR;
PROCEDURE FreeKeyCLabel (label : ARRAY OF CHAR; HiChar : CHAR) : APTR;
PROCEDURE FreeKeyCLabel1(label : ARRAY OF CHAR; HiChar : CHAR) : APTR;
PROCEDURE FreeKeyCLabel2(label : ARRAY OF CHAR; HiChar : CHAR) : APTR;
(*$ ENDIF *)

(*$ ENDIF *)

(*
**
** Controlling Objects
**
** Again the same as in mui.h :
**
** set : set an attribute of an object
** get : get an attribute of an object
**       didn't work in previous releases :-( (but now!! :-)
**
*)

PROCEDURE get(obj : APTR; attr : LONGCARD; store : ADDRESS);
PROCEDURE set(obj : APTR; attr : LONGCARD; value : LONGINT);
PROCEDURE setmutex(obj : APTR; n : LONGINT);
PROCEDURE setcycle(obj : APTR; n : LONGINT);
(*$ IF Locale *)
PROCEDURE setstring(obj : APTR; s : StrPtr);
(*$ ELSE *)
PROCEDURE setstring(obj : APTR; s : ARRAY OF CHAR);
(*$ ENDIF *)
PROCEDURE setcheckmark(obj : APTR; b : BOOLEAN);
PROCEDURE setslider(obj : APTR; l : LONGINT);

(*
** Now some macros which are not part of mui.h (in other words : my own ;-)
**
** First : NoteClose (app,obj,ID)
**         ----------------------
**         This macro sets up a notification on the close-gadget of a window.
**         if it gets pressed, the app-obj gets back an ID
**         app : the application-object, which will receive the ID
**         obj : the window-object
**         ID  : the ID, which will be send to the app-obj, when the user
**               presses the close-gadget of the window-object specified in
**               obj.
*)

PROCEDURE NoteClose(app : APTR;
                    obj : APTR;
                    ID  : LONGINT);

(*
**  Notebutton (app,obj,ID)
**  -----------------------
**  Sets up a notification on a button. If it gets pressed, the app-obj
**  receives an ID.
**  app : the app-obj, which will receive the ID.
**  obj : the pointer to the Button-Object (created by Keybutton, etc.)
**  ID  : The ID, which will be send to the app-obj.
**
*)

PROCEDURE NoteButton(app : APTR;
                     obj : APTR;
                     ID  : LONGINT);

(*
** RemMember (obj,member)
** ----------------------
** The following macro deletes a member from an object
**
** obj      : The object which holds the child to remove
** member   : The child which shall be removed
** ATTENTION: You have to dispose the removed child-objects yourself!
**
*)

PROCEDURE RemMember(obj : APTR; member : APTR);

(*
** AddMember (obj,member)
** ----------------------
** This macro will add a new child to an group-  or application-object
**
** obj      : The group or application to which the new object will be added
** member   : The new child-object which shall be added to obj.
**
*)

PROCEDURE AddMember(obj : APTR; member : APTR);

END MuiMacros.







