home *** CD-ROM | disk | FTP | other *** search
- (*************************************************************************
-
- $RCSfile: IntuiSupUtil.mod $
- Description: Support for clients of intuisup.library.
-
- Created by: fjc (Frank Copeland)
- $Revision: 2.9 $
- $Author: fjc $
- $Date: 1995/06/04 23:11:42 $
-
- Copyright © 1994-1995, Frank Copeland.
- This file is part of the Oberon-A Library.
- See Oberon-A.doc for conditions of use and distribution.
-
- *************************************************************************)
-
- <* STANDARD- *>
-
- MODULE IntuiSupUtil;
-
- IMPORT SYS := SYSTEM, e := Exec, i := Intuition, is := IntuiSup;
-
- (*------------------------------------------------------------------------*)
- (* Procedures for Gadgets *)
-
- CONST
- disableFlag = {is.gdDisabled};
- noFlag = {};
-
-
- (*------------------------------------------------------------------------*)
- (* Procedures for AutoRequesters *)
-
- CONST
- noIDCMPFlags = {};
- autoReqFlags = {is.arMovePointerNeg, is.arDrawRaster};
- acceptText = "Accept";
- cancelText = "Cancel";
- continueText = "Continue";
-
-
- (*------------------------------------------------------------------------*)
- (* Procedures for Gadgets *)
-
- (*------------------------------------*)
- PROCEDURE DisableGadget *
- ( gadgetList : is.GadgetList;
- gadget : INTEGER;
- disableIt : BOOLEAN);
-
- VAR ignore : LONGINT;
-
- BEGIN (* DisableGadget *)
- IF disableIt THEN
- ignore :=
- is.SetGadgetAttributes (
- gadgetList, gadget, disableFlag, disableFlag,
- is.useCurrentValue, is.useCurrentValue,
- is.useCurrentValue);
- ELSE
- ignore :=
- is.SetGadgetAttributes (
- gadgetList, gadget, disableFlag, noFlag,
- is.useCurrentValue, is.useCurrentValue,
- is.useCurrentValue);
- END; (* ELSE *)
- END DisableGadget;
-
-
- (*------------------------------------*)
- PROCEDURE SelectGadget *
- ( gadgetList : is.GadgetList;
- gadget : INTEGER;
- selectIt : BOOLEAN);
-
- VAR ignore, value : LONGINT;
-
- BEGIN (* SelectGadget *)
- IF selectIt THEN value := 1 ELSE value := 0 END;
- ignore :=
- is.SetGadgetAttributes (
- gadgetList, gadget, noFlag, noFlag, value, is.useCurrentValue,
- is.useCurrentValue);
- END SelectGadget;
-
-
- (*------------------------------------*)
- PROCEDURE SetGadget *
- ( gadgetList : is.GadgetList;
- gadget : INTEGER;
- gadgetType : INTEGER;
- value : LONGINT);
-
- VAR ignore : LONGINT;
-
- BEGIN (* SetGadget *)
- CASE gadgetType OF
- is.button, is.check :
- ignore :=
- is.SetGadgetAttributes
- ( gadgetList, gadget, noFlag, noFlag, value, is.useCurrentValue,
- is.useCurrentValue);
- |
- is.mx, is.cycle :
- ignore :=
- is.SetGadgetAttributes
- ( gadgetList, gadget, noFlag, noFlag, is.useCurrentValue, value,
- is.useCurrentValue);
- |
- ELSE
- ignore :=
- is.SetGadgetAttributes
- ( gadgetList, gadget, noFlag, noFlag, is.useCurrentValue,
- is.useCurrentValue, value);
- END; (* CASE gadgetType *)
- END SetGadget;
-
-
- (*------------------------------------------------------------------------*)
- (* Procedures for AutoRequesters *)
-
-
- (*------------------------------------*)
- PROCEDURE DoRequest *
- ( reqWin : i.WindowPtr;
- title : e.LSTRPTR;
- bodyText : ARRAY OF CHAR )
- : BOOLEAN;
-
- <*$CopyArrays-*>
- BEGIN (* DoRequest *)
- RETURN
- is.AutoRequest
- ( reqWin, title, bodyText, SYS.ADR(acceptText), SYS.ADR(cancelText),
- noIDCMPFlags, noIDCMPFlags, autoReqFlags, NIL);
- END DoRequest;
-
-
- (*------------------------------------*)
- PROCEDURE DoNotice *
- ( reqWin : i.WindowPtr;
- title : e.LSTRPTR;
- bodyText : ARRAY OF CHAR );
-
- VAR ignore : BOOLEAN;
-
- <*$CopyArrays-*>
- BEGIN (* DoNotice *)
- ignore :=
- is.AutoRequest
- ( reqWin, title, bodyText, NIL, SYS.ADR(continueText), noIDCMPFlags,
- noIDCMPFlags, autoReqFlags, NIL);
- END DoNotice;
-
- END IntuiSupUtil.
-
-