home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 2
/
FFMCD02.bin
/
new
/
amigalibdisks
/
disk938
/
angie
/
angiegui.mod
< prev
next >
Wrap
Text File
|
1993-12-21
|
16KB
|
442 lines
MODULE AngieGUI;
(*
* Source generated with OG 38.02 (18.6.93) by Stefan Kurtz - Original Version by Thomas Igracki
* OG is based on GenOberon V1.0 by Kai Bolay & Jan van den Baard
* GenOberon is based on internal GenOberon by Kai Bolay
* internal GenOberon is based on GenC by Jan van den Baard
*
* GUI Designed by : fSchwarz
*
* Source heavily modified, optimized & adapted for V39 Intuition 'best look'
* & V39 interface modules by fSchwarz
*)
IMPORT
e: Exec, I: Intuition, gt: GadTools, g: Graphics, u: Utility, y: SYSTEM,
b: BlackMagic, ie: InputEvent, st: Strings;
CONST
AngieHotKeys * = "E\000XYBPKSHNALCITDUOWR";
GDdefinition * = 0;
GDhotkeys * = 1;
GDpri * = 2;
GDdelay * = 3;
GDstable * = 4;
GDpop * = 5;
GDkeyact * = 6;
GDincwintaskpri * = 7;
GDhuntalways * = 8;
GDhuntwintofront * = 9;
GDtype * = 10;
GDshufflebdrop * = 11;
GDscrsteps * = 12;
GDwinsteps * = 13;
GDhuntdefpub * = 14;
GDadd * = 15;
GDdel * = 16;
GDup * = 17;
GDdown * = 18;
GDshufflepat * = 19;
GDattrs * = 20;
(* menuLabels *)
MNsave * = 4000H;
MNabout * = 4001H;
MNhide * = 4002H;
MNquit * = 4003H;
CONST
AngieCNT = 21;
AngieLeft = 5;
AngieTop = 12;
AngieWidth = 631;
AngieHeight = 174;
VAR
Scr-: I.ScreenPtr;
VisualInfo-: e.APTR;
AngieWnd-: I.WindowPtr;
AngieGList-: I.GadgetPtr;
AngieGadgets*: ARRAY AngieCNT OF I.GadgetPtr;
AngieMenus-: I.MenuPtr;
AngieZoom-: ARRAY 4 OF INTEGER;
Font-: g.TextAttrPtr;
Attr-: g.TextAttr;
FontX, FontY: INTEGER;
OffX, OffY: INTEGER;
TYPE
attrs0LArray = ARRAY 9 OF e.STRPTR;
CONST
attrs0Labels = attrs0LArray (
y.ADR ("--------,--------,--------"),
y.ADR ("WinFront,--------,--------"),
y.ADR ("--------,NoScrAct,--------"),
y.ADR ("WinFront,NoScrAct,--------"),
y.ADR ("--------,--------,Repeatbl"),
y.ADR ("WinFront,--------,Repeatbl"),
y.ADR ("--------,NoScrAct,Repeatbl"),
y.ADR ("WinFront,NoScrAct,Repeatbl"),
NIL);
VAR
hotkeys0List*: e.MinList;
TYPE
AngieMArray = ARRAY 8 OF gt.NewMenu;
CONST
AngieNewMenu = AngieMArray (
gt.title, y.ADR ("Project"), NIL, {}, y.VAL (LONGSET, 0), -1,
gt.item, y.ADR ("Save Settings"), y.ADR ("S"), {}, y.VAL (LONGSET, 0), MNsave,
gt.item, gt.barLabel, NIL, {}, LONGSET {}, -1,
gt.item, y.ADR ("About..."), y.ADR ("?"), {}, y.VAL (LONGSET, 0), MNabout,
gt.item, gt.barLabel, NIL, {}, LONGSET {}, -1,
gt.item, y.ADR ("Hide"), y.ADR ("H"), {}, y.VAL (LONGSET, 0), MNhide,
gt.item, y.ADR ("Quit"), y.ADR ("Q"), {}, y.VAL (LONGSET, 0), MNquit,
gt.end, NIL, NIL, {}, LONGSET {}, -1);
TYPE
AngieGTypesArray = ARRAY AngieCNT OF INTEGER;
CONST
AngieGTypes = AngieGTypesArray (
gt.stringKind,
gt.listViewKind,
gt.sliderKind,
gt.sliderKind,
gt.sliderKind,
gt.checkBoxKind,
gt.checkBoxKind,
gt.checkBoxKind,
gt.checkBoxKind,
gt.checkBoxKind,
gt.stringKind,
gt.checkBoxKind,
gt.sliderKind,
gt.sliderKind,
gt.checkBoxKind,
gt.buttonKind,
gt.buttonKind,
gt.buttonKind,
gt.buttonKind,
gt.stringKind,
gt.cycleKind
);
CONST
rawCrsrUp * = 04CH;
rawCrsrDown * = 04DH;
VAR
hotnames *: UNTRACED POINTER TO ARRAY MAX (INTEGER)-1 OF b.LStrPtr;
PROCEDURE EdHookProc (hook: u.HookPtr; sgworkobj: e.APTR; msg: e.APTR): LONGINT;
VAR
sgwork: I.SGWorkPtr;
cmd : UNTRACED POINTER TO LONGINT;
i,l : INTEGER;
wstr : b.LStrPtr;
(* $StackChk- !!executed in Intuition context!! *)
BEGIN
sgwork := sgworkobj; cmd := msg;
wstr := sgwork.workBuffer;
IF cmd^ # I.sghKey THEN RETURN e.false; END;
IF sgwork.iEvent.class # ie.rawkey THEN RETURN e.false; END;
CASE sgwork.iEvent.code OF
rawCrsrUp, rawCrsrDown:
IF sgwork.gadget = AngieGadgets[GDtype] THEN
IF hotnames # NIL THEN
l := 0;
WHILE (hotnames[l] # NIL) DO INC (l); END;
IF l > 0 THEN
i := 0;
WHILE (hotnames[i] # NIL) & (u.Stricmp (wstr^, hotnames[i]^) # 0) DO
INC (i);
END;
IF hotnames [i] = NIL THEN DEC (i); END;
CASE sgwork.iEvent.code OF
rawCrsrDown:
INC (i, 1); IF i >= l THEN i := 0; END; |
rawCrsrUp:
DEC (i, 1); IF i < 0 THEN i := l-1; END;
ELSE END;
IF i = l-1 THEN
COPY ("", wstr^);
ELSE
COPY (hotnames[i]^, wstr^);
END;
sgwork.numChars := SHORT (st.Length (wstr^));
IF sgwork.bufferPos > sgwork.numChars THEN
sgwork.bufferPos := sgwork.numChars;
END;
sgwork.actions := LONGSET {I.sgaUse, I.sgaRedisplay};
sgwork.code := sgwork.iEvent.code;
RETURN e.true;
END;
END;
ELSIF sgwork.gadget = AngieGadgets[GDdefinition] THEN
sgwork.actions := LONGSET{I.sgaEnd};
sgwork.code := sgwork.iEvent.code;
RETURN e.true;
END;
ELSE END;
IF sgwork.code = 27 (* ESC *) THEN
sgwork.actions := LONGSET{I.sgaEnd};
RETURN e.true;
END;
RETURN e.false;
END EdHookProc;
(* $StackChk= *)
TYPE
AngieNGadArray = ARRAY AngieCNT OF gt.NewGadget;
CONST
AngieNGad = AngieNGadArray (
8, 92, 314, 14, NIL, NIL, GDdefinition, LONGSET {} ,NIL, NIL,
8, 15, 314, 80, y.ADR ("_Edit hotkeys"), NIL, GDhotkeys, LONGSET {gt.placeTextAbove} ,NIL, NIL,
441, 160, 137, 11, y.ADR ("C_X priority"), NIL, GDpri, LONGSET {gt.placeTextLeft} ,NIL, NIL,
441, 118, 137, 11, y.ADR ("Snoop dela_y"), NIL, GDdelay, LONGSET {gt.placeTextLeft} ,NIL, NIL,
441, 104, 137, 11, y.ADR ("Sta_ble time"), NIL, GDstable, LONGSET {gt.placeTextLeft} ,NIL, NIL,
337, 90, 26, 11, y.ADR ("_Pop GUI on startup"), NIL, GDpop, LONGSET {gt.placeTextRight} ,NIL, NIL,
337, 48, 26, 11, y.ADR ("_Key screen activation"), NIL, GDkeyact, LONGSET {gt.placeTextRight} ,NIL, NIL,
337, 62, 26, 11, y.ADR ("Rai_se Active WinTask's Pri"), NIL, GDincwintaskpri, LONGSET {gt.placeTextRight} ,NIL, NIL,
337, 6, 26, 11, y.ADR ("_Hunt always"), NIL, GDhuntalways, LONGSET {gt.placeTextRight} ,NIL, NIL,
337, 20, 26, 11, y.ADR ("Hu_nt on wintofront hotkeys"), NIL, GDhuntwintofront, LONGSET {gt.placeTextRight} ,NIL, NIL,
64, 97, 258, 14, y.ADR ("_Action"), NIL, GDtype, LONGSET {gt.placeTextLeft} ,NIL, NIL,
337, 76, 26, 11, y.ADR ("Shuff_le backdrop windows"), NIL, GDshufflebdrop, LONGSET {gt.placeTextRight} ,NIL, NIL,
441, 132, 137, 11, y.ADR ("S_creen steps"), NIL, GDscrsteps, LONGSET {gt.placeTextLeft} ,NIL, NIL,
441, 146, 137, 11, y.ADR ("W_indow steps"), NIL, GDwinsteps, LONGSET {gt.placeTextLeft} ,NIL, NIL,
337, 34, 26, 11, y.ADR ("Hun_t: set default public screen"), NIL, GDhuntdefpub, LONGSET {gt.placeTextRight} ,NIL, NIL,
8, 127, 77, 13, y.ADR ("A_DD"), NIL, GDadd, LONGSET {gt.placeTextIn} ,NIL, NIL,
87, 127, 77, 13, y.ADR ("(DEL)"), NIL, GDdel, LONGSET {gt.placeTextIn} ,NIL, NIL,
166, 127, 77, 13, y.ADR ("_UP"), NIL, GDup, LONGSET {gt.placeTextIn} ,NIL, NIL,
245, 127, 77, 13, y.ADR ("D_OWN"), NIL, GDdown, LONGSET {gt.placeTextIn} ,NIL, NIL,
8, 157, 314, 14, y.ADR ("_Window shuffle pattern"), NIL, GDshufflepat, LONGSET {gt.placeTextAbove} ,NIL, NIL,
56, 112, 266, 13, y.ADR ("Att_rs"), NIL, GDattrs, LONGSET {gt.placeTextLeft} ,NIL, NIL
);
TYPE
AngieGTagsArray = ARRAY 175 OF u.Tag;
CONST
AngieGTags = AngieGTagsArray (
gt.stMaxChars, 255, gt.stEditHook, NIL, u.done,
gt.lvShowSelected, 1, gt.underscore, 95, u.done,
gt.slMin, -128, gt.slMax, 127, gt.slLevel, 127, gt.