home *** CD-ROM | disk | FTP | other *** search
Modula Definition | 1994-02-11 | 6.7 KB | 207 lines |
- DEFINITION MODULE MUIClasses;
- (*$ IMPLEMENTATION:=FALSE *)
-
- (*************************************************************************
- ** Structures and Macros for creating custom classes.
- **
- ** converted for M2 by Christian 'Kochtopf' Scholz
- **
- **************************************************************************
- **
- ** $Id: MuiClasses.def 1.1 1994/02/02 09:37:18 Kochtopf Exp $
- **
- ** $Log: MuiClasses.def $
- # Revision 1.1 1994/02/02 09:37:18 Kochtopf
- # Initial revision
- #
- **
- **************************************************************************)
-
- FROM SYSTEM IMPORT ADDRESS, WORD, BYTE;
- FROM IntuitionD IMPORT ObjectPtr, WindowPtr, ScreenPtr, DrawInfoPtr, IBox,
- IntuiMessagePtr;
- FROM GraphicsD IMPORT TextFontPtr, RastPortPtr;
-
- (*
- ** GENERAL NOTES:
- **
- ** - Everything described in this header file is only valid within
- ** MUI classes. You may never use any of these things out of
- ** a class, e.g. in a traditional MUI application.
- **
- ** - Except when otherwise stated, all structures are strictly read only.
- *)
-
- (* Pointer-Types *)
-
- TYPE mGlobalInfoPtr = POINTER TO mGlobalInfo;
- mMinMaxPtr = POINTER TO mMinMax;
- mNotifyDataPtr = POINTER TO mNotifyData;
- mAreaDataPtr = POINTER TO mAreaData;
- mRenderInfoPtr = POINTER TO mRenderInfo;
- mConfigurationPtr = ADDRESS;
- WORDPtr = POINTER TO WORD;
-
- (*
- ** Type definitions of some important Methods
- ** You will need them in your own classes.
- *)
-
- (* Area *)
-
- TYPE mpAskMinMax = RECORD
- id : LONGINT;
- MinMaxInfo : mMinMaxPtr;
- END;
-
- mpDraw = RECORD
- id : LONGINT;
- flags : LONGINT;
- END;
-
- mpHandleInput = RECORD
- id : LONGINT;
- imsg : IntuiMessagePtr;
- muikey : LONGINT;
- END;
-
- mpSetUp = RECORD
- id : LONGINT;
- RenderInfo : mRenderInfoPtr;
- END;
-
- (* (partial) instance data of notify class *)
-
- TYPE mNotifyData = RECORD
- mndGlobalInfo : mGlobalInfoPtr;
- mndUserData : LONGINT;
- priv0 : LONGINT;
- priv1 : LONGINT;
- priv2 : LONGINT;
- priv3 : LONGINT;
- priv4 : LONGINT;
- END;
-
-
- (* MUIMinMax structure holds information about minimum, maximum
- and default dimensions of an object. *)
-
- mMinMax = RECORD
- MinWidth : WORD;
- MinHeight : WORD;
- MaxWidth : WORD;
- MaxHeight : WORD;
- DefWidth : WORD;
- DefHeight : WORD;
- END;
-
- CONST mMAXMAX = 10000; (* use this if a dimension is not limited. *)
-
-
- (* Definitions for madFlags *)
-
- TYPE MADFlags = (drawObject, (* completely redraw yourself *)
- drawUpdate (* only update! *)
- (* rest is private *)
- );
- MADFlagSet = SET OF MADFlags;
-
-
- (* (partial) instance data of area class *)
-
- TYPE mAreaData = RECORD
- madRenderInfo : mRenderInfoPtr; (* RenderInfo for this object *)
- madBackground : ADDRESS(*mImagePtr*); (* Background Image *)
- madFont : TextFontPtr; (* Font *)
- madMinMax : mMinMax; (* min/max/default sizes *)
- madBox : IBox; (* position and dimension *)
-
- madAddLeft : BYTE; (* frame & innerspacing left offset *)
- madAddTop : BYTE; (* frame & innerspacing top offset *)
- madSubWidth : BYTE; (* frame & innerspacing add. width *)
- madSubHeight : BYTE; (* frame & innerspacing add. height *)
-
- madFlags : MADFlagSet; (* see definitions above *)
-
- (* ... private data follows ... *)
- END;
-
-
-
- (* Global information about configuration and parent application. *)
-
- TYPE mGlobalInfo = RECORD
- mgiConfiguration : mConfigurationPtr;
- mgiApplicationObject : ObjectPtr;
- (* ... private data follows ... *)
- END;
-
- (* MUI's draw pens *)
-
- CONST MPENSHINE =0;
- CONST MPENHALFSHINE =1;
- CONST MPENBACKGROUND =2;
- CONST MPENHALFSHADOW =3;
- CONST MPENSHADOW =4;
- CONST MPENTEXT =5;
- CONST MPENFILL =6;
- CONST MPENCOUNT =7;
-
-
- (* Information on display environment *)
-
-
- TYPE mRenderInfo = RECORD
- mriWindowObject : ObjectPtr; (* valid between MUIMSetup/MUIMCleanup *)
-
- mriScreen : ScreenPtr; (* valid between MUIMSetup/MUIMCleanup *)
- mriDrawInfo : DrawInfoPtr; (* valid between MUIMSetup/MUIMCleanup *)
- mriPens : WORDPtr; (* valid between MUIMSetup/MUIMCleanup *)
- mriWindow : WindowPtr; (* valid between MUIMShow/MUIMHide *)
- mriRastPort : RastPortPtr; (* valid between MUIMShow/MUIMHide *)
-
- (* ... private data follows ... *)
- END;
-
- (* something, in which you can cast your object-pointer *)
-
- TYPE dummyXFC = RECORD
- mnd : mNotifyData;
- mad : mAreaData;
- END;
-
- dummyXFCPtr = POINTER TO dummyXFC;
-
-
-
- (* User configurable keyboard events coming with MUIMHandleInput *)
-
-
- CONST MUIKEYRELEASE = -2; (* not a real key, faked when MUIKEYPRESS is released *)
- CONST MUIKEYNONE = -1;
- CONST MUIKEYPRESS = 0;
- CONST MUIKEYTOGGLE = 1;
- CONST MUIKEYUP = 2;
- CONST MUIKEYDOWN = 3;
- CONST MUIKEYPAGEUP = 4;
- CONST MUIKEYPAGEDOWN = 5;
- CONST MUIKEYTOP = 6;
- CONST MUIKEYBOTTOM = 7;
- CONST MUIKEYLEFT = 8;
- CONST MUIKEYRIGHT = 9;
- CONST MUIKEYWORDLEFT = 10;
- CONST MUIKEYWORDRIGHT = 11;
- CONST MUIKEYLINESTART = 12;
- CONST MUIKEYLINEEND = 13;
- CONST MUIKEYGADGETNEXT = 14;
- CONST MUIKEYGADGETPREV = 15;
- CONST MUIKEYGADGETOFF = 16;
- CONST MUIKEYWINDOWCLOSE = 17;
- CONST MUIKEYWINDOWNEXT = 18;
- CONST MUIKEYWINDOWPREV = 19;
- CONST MUIKEYHELP = 20;
- CONST MUIKEYCOUNT = 21; (* private *)
-
-
- END MUIClasses.
-