home *** CD-ROM | disk | FTP | other *** search
- (***************************************************************************
-
- $RCSfile: IntuiSupUtil.mod $
- Description: Support for clients of intuisup.library.
-
- Created by: fjc (Frank Copeland)
- $Revision: 2.3 $
- $Author: fjc $
- $Date: 1994/08/08 16:06:14 $
-
- Copyright © 1994, Frank Copeland.
- This file is part of the Oberon-A Library.
- See Oberon-A.doc for conditions of use and distribution.
-
- ***************************************************************************)
-
- MODULE IntuiSupUtil;
-
- (*
- ** $C= CaseChk $I= IndexChk $L+ LongAdr $N= NilChk
- ** $P= PortableCode $R= RangeChk $S= StackChk $T= TypeChk
- ** $V= OvflChk $Z= ZeroVars
- *)
-
- IMPORT
- E := Exec, I := Intuition, ISup := IntuiSup, SYS := SYSTEM;
-
- (*------------------------------------------------------------------------*)
- (* Procedures for Gadgets *)
-
- CONST
- disableFlag = {ISup.gdDisabled};
- noFlag = {};
-
-
- (*------------------------------------------------------------------------*)
- (* Procedures for AutoRequesters *)
-
- CONST
- noIDCMPFlags = {};
- autoReqFlags =
- {ISup.arBackFill, ISup.arMovePointerNeg, ISup.arDrawRaster};
- acceptText = "Accept";
- cancelText = "Cancel";
- continueText = "Continue";
-
-
- (*------------------------------------------------------------------------*)
- (* Procedures for Gadgets *)
-
- (*------------------------------------*)
- PROCEDURE DisableGadget *
- ( gadgetList : ISup.GadgetList;
- gadget : INTEGER;
- disableIt : BOOLEAN);
-
- VAR ignore : LONGINT;
-
- BEGIN (* DisableGadget *)
- IF disableIt THEN
- ignore :=
- ISup.base.SetGadgetAttributes (
- gadgetList, gadget, disableFlag, disableFlag,
- ISup.useCurrentValue, ISup.useCurrentValue,
- ISup.useCurrentValue);
- ELSE
- ignore :=
- ISup.base.SetGadgetAttributes (
- gadgetList, gadget, disableFlag, noFlag,
- ISup.useCurrentValue, ISup.useCurrentValue,
- ISup.useCurrentValue);
- END; (* ELSE *)
- END DisableGadget;
-
-
- (*------------------------------------*)
- PROCEDURE SelectGadget *
- ( gadgetList : ISup.GadgetList;
- gadget : INTEGER;
- selectIt : BOOLEAN);
-
- VAR ignore, value : LONGINT;
-
- BEGIN (* SelectGadget *)
- IF selectIt THEN value := 1 ELSE value := 0 END;
- ignore :=
- ISup.base.SetGadgetAttributes (
- gadgetList, gadget, noFlag, noFlag, value, ISup.useCurrentValue,
- ISup.useCurrentValue);
- END SelectGadget;
-
-
- (*------------------------------------*)
- PROCEDURE SetGadget *
- ( gadgetList : ISup.GadgetList;
- gadget : INTEGER;
- gadgetType : INTEGER;
- value : LONGINT);
-
- VAR ignore : LONGINT;
-
- BEGIN (* SetGadget *)
- CASE gadgetType OF
- ISup.button, ISup.check :
- ignore :=
- ISup.base.SetGadgetAttributes
- ( gadgetList, gadget, noFlag, noFlag, value, ISup.useCurrentValue,
- ISup.useCurrentValue);
- |
- ISup.mx, ISup.cycle :
- ignore :=
- ISup.base.SetGadgetAttributes
- ( gadgetList, gadget, noFlag, noFlag, ISup.useCurrentValue, value,
- ISup.useCurrentValue);
- |
- ELSE
- ignore :=
- ISup.base.SetGadgetAttributes
- ( gadgetList, gadget, noFlag, noFlag, ISup.useCurrentValue,
- ISup.useCurrentValue, value);
- END; (* CASE gadgetType *)
- END SetGadget;
-
-
- (*------------------------------------------------------------------------*)
- (* Procedures for AutoRequesters *)
-
-
- (*------------------------------------*)
- (* $D- disable copying of open arrays *)
- PROCEDURE DoRequest *
- ( reqWin : I.WindowPtr;
- title : E.STRPTR;
- bodyText : ARRAY OF CHAR )
- : BOOLEAN;
-
- BEGIN (* DoRequest *)
- RETURN
- ISup.base.AutoRequest
- ( reqWin, title, bodyText, SYS.ADR(acceptText), SYS.ADR(cancelText),
- noIDCMPFlags, noIDCMPFlags, autoReqFlags, NIL);
- END DoRequest;
-
-
- (*------------------------------------*)
- (* $D- disable copying of open arrays *)
- PROCEDURE DoNotice *
- ( reqWin : I.WindowPtr;
- title : E.STRPTR;
- bodyText : ARRAY OF CHAR );
-
- VAR ignore : BOOLEAN;
-
- BEGIN (* DoNotice *)
- ignore :=
- ISup.base.AutoRequest
- ( reqWin, title, bodyText, NIL, SYS.ADR(continueText), noIDCMPFlags,
- noIDCMPFlags, autoReqFlags, NIL);
- END DoNotice;
-
- END IntuiSupUtil.
-