home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
544a.lha
/
RPN_v1.0
/
Source
/
gadget.h
< prev
next >
Wrap
C/C++ Source or Header
|
1991-09-06
|
13KB
|
539 lines
/*-----------------------------------*
| File: GADGET.h - MLO 900131 V1.00 |
| This file contains all gadget |
| definitions for the RPN window. |
*-----------------------------------*/
extern char InBuf[]; /* Input buffer (global) */
static char UndoBuf[INBUF_LEN]; /* Undo buffer (local) */
static USHORT CommonImageBits1[] = { /* 2 upper rows of every image */
0xFFFF, 0xFFFF, 0xFFFF, 0xFFF0,
0x8000, 0x0000, 0x0000, 0x0010
};
static USHORT CommonImageBits2[] = { /* 2 lower rows and the second */
0x8000, 0x0000, 0x0000, 0x0010, /* bit plane for every image */
0xFFFF, 0xFFFF, 0xFFFF, 0xFFF0,
0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000,
0x3FFF, 0xFFFF, 0xFFFF, 0xFFC0,
0x3FFF, 0xFFFF, 0xFFFF, 0xFFC0,
0x3FFF, 0xFFFF, 0xFFFF, 0xFFC0,
0x3FFF, 0xFFFF, 0xFFFF, 0xFFC0,
0x3FFF, 0xFFFF, 0xFFFF, 0xFFC0,
0x3FFF, 0xFFFF, 0xFFFF, 0xFFC0,
0x3FFF, 0xFFFF, 0xFFFF, 0xFFC0,
0x3FFF, 0xFFFF, 0xFFFF, 0xFFC0,
0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000
};
static SHORT GadVector[] = { /* Border vector (IntuiText's) */
-1, -1, 58, -1, 58, 10,
-1, 10, -1, -1
};
static SHORT InVector[] = { /* Border vector (input field) */
-4, -2, 228, -2, 228, 10,
-4, 10, -4, -2
};
static struct Border InBorder = { /* Border structures */
0, 0, WHITE_PEN, BLUE_PEN, JAM1,
5, InVector, NULL
};
static struct Border GadBorder = {
0, 0, WHITE_PEN, BLUE_PEN, JAM1,
5, GadVector, NULL
};
static struct IntuiText SinText = { /* IntuiText structures and */
RED_PEN, BLACK_PEN, JAM2, 1, 1, /* image nibbles for gadgets */
NULL, " Sin ", NULL
};
static struct IntuiText CosText = {
RED_PEN, BLACK_PEN, JAM2, 1, 1,
NULL, " Cos ", NULL
};
static struct IntuiText TanText = {
RED_PEN, BLACK_PEN, JAM2, 1, 1,
NULL, " Tan ", NULL
};
static struct IntuiText InvText = {
RED_PEN, BLACK_PEN, JAM2, 1, 1,
NULL, " Inv ", NULL
};
static struct IntuiText HypText = {
RED_PEN, BLACK_PEN, JAM2, 1, 1,
NULL, " Hyp ", NULL
};
static struct Image E10Image = {
0, 0, 60, 12, 1, NULL, 0x3, 0x0, NULL
};
static USHORT E10ImageBits[] = {
0x8000, 0x0000, 0x18C0, 0x0010,
0x8000, 0x0C1E, 0x0D80, 0x0010,
0x8000, 0x1C33, 0x0700, 0x0010,
0x8000, 0x0C37, 0x0D80, 0x0010,
0x8000, 0x0C3F, 0x18C0, 0x0010,
0x8000, 0x0C3B, 0x0000, 0x0010,
0x8000, 0x0C33, 0x0000, 0x0010,
0x8000, 0x3F1E, 0x0000, 0x0010
};
static struct Image ExpImage = {
0, 0, 60, 12, 1, NULL, 0x3, 0x0, NULL
};
static USHORT ExpImageBits[] = {
0x8000, 0x0000, 0x0000, 0x0010,
0x8000, 0x0000, 0xD800, 0x0010,
0x8000, 0x00F0, 0x7000, 0x0010,
0x8000, 0x0198, 0xD800, 0x0010,
0x8000, 0x01F8, 0x0000, 0x0010,
0x8000, 0x0180, 0x0000, 0x0010,
0x8000, 0x00F0, 0x0000, 0x0010,
0x8000, 0x0000, 0x0000, 0x0010
};
static struct Image L10Image = {
0, 0, 60, 12, 1, NULL, 0x3, 0x0, NULL
};
static USHORT L10ImageBits[] = {
0x8003, 0x8000, 0x0000, 0x0010,
0x8001, 0x8000, 0x0000, 0x0010,
0x8001, 0x83C1, 0xD800, 0x0010,
0x8001, 0x8663, 0x3000, 0x0010,
0x8001, 0x8663, 0x308C, 0x0010,
0x8001, 0x8661, 0xE192, 0x0010,
0x8003, 0xC3C6, 0x3092, 0x0010,
0x8000, 0x0003, 0xE1CC, 0x0010
};
static struct IntuiText LogText = {
RED_PEN, BLACK_PEN, JAM2, 1, 1,
NULL, " Ln ", NULL
};
static struct Image YXImage = {
0, 0, 60, 12, 1, NULL, 0x3, 0x0, NULL
};
static USHORT YXImageBits[] = {
0x8000, 0x0000, 0xD800, 0x0010,
0x8000, 0x0000, 0x7000, 0x0010,
0x8000, 0x00CC, 0xD800, 0x0010,
0x8000, 0x00CC, 0x0000, 0x0010,
0x8000, 0x00CC, 0x0000, 0x0010,
0x8000, 0x0078, 0x0000, 0x0010,
0x8000, 0x0030, 0x0000, 0x0010,
0x8000, 0x01E0, 0x0000, 0x0010
};
static struct Image SplImage = {
0, 0, 60, 12, 1, NULL, 0x3, 0x0, NULL
};
static USHORT SplImageBits[] = {
0x8000, 0x0000, 0x0000, 0x0010,
0x8000, 0x3FF8, 0x0000, 0x0010,
0x8000, 0x1818, 0x0C00, 0x0010,
0x8000, 0x0C00, 0x0C00, 0x0010,
0x8000, 0x0600, 0x7F80, 0x0010,
0x8000, 0x0C00, 0x0C00, 0x0010,
0x8000, 0x1818, 0x0C00, 0x0010,
0x8000, 0x3FF8, 0x0000, 0x0010
};
static struct Image SmiImage = {
0, 0, 60, 12, 1, NULL, 0x3, 0x0, NULL
};
static USHORT SmiImageBits[] = {
0x8000, 0x0000, 0x0000, 0x0010,
0x8000, 0x3FF8, 0x0000, 0x0010,
0x8000, 0x1818, 0x0000, 0x0010,
0x8000, 0x0C00, 0x0000, 0x0010,
0x8000, 0x0600, 0x7F80, 0x0010,
0x8000, 0x0C00, 0x0000, 0x0010,
0x8000, 0x1818, 0x0000, 0x0010,
0x8000, 0x3FF8, 0x0000, 0x0010
};
static struct IntuiText RLText = {
RED_PEN, BLACK_PEN, JAM2, 1, 1,
NULL, " L. R. ", NULL
};
static struct IntuiText XoYText = {
RED_PEN, BLACK_PEN, JAM2, 1, 1,
NULL, " x(y) ", NULL
};
static struct IntuiText YoXText = {
RED_PEN, BLACK_PEN, JAM2, 1, 1,
NULL, " y(x) ", NULL
};
static struct Image X2Image = {
0, 0, 60, 12, 1, NULL, 0x3, 0x0, NULL
};
static USHORT X2ImageBits[] = {
0x8000, 0x0000, 0x3000, 0x0010,
0x8000, 0x0000, 0x4800, 0x0010,
0x8000, 0x0000, 0x1000, 0x0010,
0x8000, 0x00C6, 0x2000, 0x0010,
0x8000, 0x006C, 0x4000, 0x0010,
0x8000, 0x0038, 0x7800, 0x0010,
0x8000, 0x006C, 0x0000, 0x0010,
0x8000, 0x00C6, 0x0000, 0x0010
};
static struct Image SqrImage = {
0, 0, 60, 12, 1, NULL, 0x3, 0x0, NULL
};
static USHORT SqrImageBits[] = {
0x8000, 0x007F, 0xFF80, 0x0010,
0x8000, 0x0040, 0x0180, 0x0010,
0x8000, 0x00C0, 0x0000, 0x0010,
0x8000, 0x1086, 0x3000, 0x0010,
0x8000, 0x1983, 0x6000, 0x0010,
0x8000, 0x0D01, 0xC000, 0x0010,
0x8000, 0x0703, 0x6000, 0x0010,
0x8000, 0x0206, 0x3000, 0x0010
};
static struct IntuiText UnsText = {
RED_PEN, BLACK_PEN, JAM2, 1, 1,
NULL, " 1/x ", NULL
};
static struct IntuiText CorText = {
RED_PEN, BLACK_PEN, JAM2, 1, 1,
NULL, " r ", NULL
};
static struct IntuiText MeaText = {
RED_PEN, BLACK_PEN, JAM2, 1, 1,
NULL, " Mean ", NULL
};
static struct IntuiText GplText = {
RED_PEN, BLACK_PEN, JAM2, 1, 1,
NULL, " + ", NULL
};
static struct IntuiText GmiText = {
RED_PEN, BLACK_PEN, JAM2, 1, 1,
NULL, " - ", NULL
};
static struct IntuiText GmuText = {
RED_PEN, BLACK_PEN, JAM2, 1, 1,
NULL, " * ", NULL
};
static struct IntuiText GdiText = {
RED_PEN, BLACK_PEN, JAM2, 1, 1,
NULL, " / ", NULL
};
static struct IntuiText PceText = {
RED_PEN, BLACK_PEN, JAM2, 1, 1,
NULL, " % ", NULL
};
static struct Image PigImage = {
0, 0, 60, 12, 1, NULL, 0x3, 0x0, NULL
};
static USHORT PigImageBits[] = {
0x8000, 0x0000, 0x0000, 0x0010,
0x8000, 0x0000, 0x0000, 0x0010,
0x8000, 0x00FF, 0xF000, 0x0010,
0x8000, 0x0018, 0xC000, 0x0010,
0x8000, 0x0018, 0xC000, 0x0010,
0x8000, 0x0018, 0xC000, 0x0010,
0x8000, 0x0018, 0xC000, 0x0010,
0x8000, 0x0000, 0x0000, 0x0010
};
static struct IntuiText ChsText = {
RED_PEN, BLACK_PEN, JAM2, 1, 1,
NULL, " ChSgn ", NULL
};
static struct Image XXYImage = {
0, 0, 60, 12, 1, NULL, 0x3, 0x0, NULL
};
static USHORT XXYImageBits[] = {
0x8000, 0x0000, 0x3000, 0x0010,
0x8031, 0x8000, 0x1819, 0x8010,
0x801B, 0x00CF, 0xFC19, 0x8010,
0x800E, 0x0180, 0x1819, 0x8010,
0x801B, 0x03FF, 0x300F, 0x0010,
0x8031, 0x8180, 0x0006, 0x0010,
0x8000, 0x00C0, 0x001C, 0x0010,
0x8000, 0x0000, 0x0000, 0x0010
};
static struct Image RleImage = {
0, 0, 60, 12, 1, NULL, 0x3, 0x0, NULL
};
static USHORT RleImageBits[] = {
0x8000, 0x0FC0, 0x1800, 0x0010,
0x8000, 0x0660, 0x1800, 0x0010,
0x8000, 0x0660, 0x1800, 0x0010,
0x8000, 0x07C0, 0x1800, 0x0010,
0x8000, 0x06C0, 0x7E00, 0x0010,
0x8000, 0x0660, 0x3C00, 0x0010,
0x8000, 0x0E30, 0x1800, 0x0010,
0x8000, 0x0000, 0x0000, 0x0010
};
static struct IntuiText EntText = {
RED_PEN, BLACK_PEN, JAM2, 1, 1,
NULL, " Enter ", NULL
};
static struct IntuiText InText = {
WHITE_PEN, BLUE_PEN, JAM1, -100, 1,
NULL, "Input Field", NULL
};
static struct StringInfo InInfo = { /* StringInfo (input field) */
(UBYTE *) InBuf, (UBYTE *) UndoBuf,
0, INBUF_LEN, 0, 0, 0, 0, 0, 0,
NULL, 0, NULL
};
static struct Gadget InGadget = { /* Gadget structures */
NULL, 113, 118, 226, 10, GADGHCOMP,
GADGIMMEDIATE | RELVERIFY, STRGADGET,
(APTR) &InBorder, NULL, &InText, 0,
(APTR) &InInfo, 30, NULL
};
static struct Gadget EntGadget = {
&InGadget, 282, 102, 58, 10, GADGHCOMP,
RELVERIFY, BOOLGADGET,
(APTR) &GadBorder, NULL, &EntText, 0,
NULL, 29, NULL
};
static struct Gadget RleGadget = {
&EntGadget, 213, 101, 60, 12, GADGHCOMP | GADGIMAGE,
RELVERIFY, BOOLGADGET,
(APTR) &RleImage, NULL, NULL, 0,
NULL, 28, NULL
};
static struct Gadget XXYGadget = {
&RleGadget, 145, 101, 60, 12, GADGHCOMP | GADGIMAGE,
RELVERIFY, BOOLGADGET,
(APTR) &XXYImage, NULL, NULL, 0,
NULL, 27, NULL
};
static struct Gadget ChsGadget = {
&XXYGadget, 78, 102, 58, 10, GADGHCOMP,
RELVERIFY, BOOLGADGET,
(APTR) &GadBorder, NULL, &ChsText, 0,
NULL, 26, NULL
};
static struct Gadget PigGadget = {
&ChsGadget, 9, 101, 60, 12, GADGHCOMP | GADGIMAGE,
RELVERIFY, BOOLGADGET,
(APTR) &PigImage, NULL, NULL, 0,
NULL, 25, NULL
};
static struct Gadget PceGadget = {
&PigGadget, 282, 85, 58, 10, GADGHCOMP,
RELVERIFY, BOOLGADGET,
(APTR) &GadBorder, NULL, &PceText, 0,
NULL, 24, NULL
};
static struct Gadget DivGadget = {
&PceGadget, 214, 85, 58, 10, GADGHCOMP,
RELVERIFY, BOOLGADGET,
(APTR) &GadBorder, NULL, &GdiText, 0,
NULL, 23, NULL
};
static struct Gadget MulGadget = {
&DivGadget, 146, 85, 58, 10, GADGHCOMP,
RELVERIFY, BOOLGADGET,
(APTR) &GadBorder, NULL, &GmuText, 0,
NULL, 22, NULL
};
static struct Gadget MinGadget = {
&MulGadget, 78, 85, 58, 10, GADGHCOMP,
RELVERIFY, BOOLGADGET,
(APTR) &GadBorder, NULL, &GmiText, 0,
NULL, 21, NULL
};
static struct Gadget PluGadget = {
&MinGadget, 10, 85, 58, 10, GADGHCOMP,
RELVERIFY, BOOLGADGET,
(APTR) &GadBorder, NULL, &GplText, 0,
NULL, 20, NULL
};
static struct Gadget MeaGadget = {
&PluGadget, 282, 68, 58, 10, GADGHCOMP,
RELVERIFY, BOOLGADGET,
(APTR) &GadBorder, NULL, &MeaText, 0,
NULL, 19, NULL
};
static struct Gadget RegGadget = {
&MeaGadget, 214, 68, 58, 10, GADGHCOMP,
RELVERIFY, BOOLGADGET,
(APTR) &GadBorder, NULL, &CorText, 0,
NULL, 18, NULL
};
static struct Gadget UnsGadget = {
&RegGadget, 146, 68, 58, 10, GADGHCOMP,
RELVERIFY, BOOLGADGET,
(APTR) &GadBorder, NULL, &UnsText, 0,
NULL, 17, NULL
};
static struct Gadget SqrGadget = {
&UnsGadget, 77, 67, 60, 12, GADGHCOMP | GADGIMAGE,
RELVERIFY, BOOLGADGET,
(APTR) &SqrImage, NULL, NULL, 0,
NULL, 16, NULL
};
static struct Gadget X2Gadget = {
&SqrGadget, 9, 67, 60, 12, GADGHCOMP | GADGIMAGE,
RELVERIFY, BOOLGADGET,
(APTR) &X2Image, NULL, NULL, 0,
NULL, 15, NULL
};
static struct Gadget YoXGadget = {
&X2Gadget, 282, 51, 58, 10, GADGHCOMP,
RELVERIFY, BOOLGADGET,
(APTR) &GadBorder, NULL, &YoXText, 0,
NULL, 14, NULL
};
static struct Gadget XoYGadget = {
&YoXGadget, 214, 51, 58, 10, GADGHCOMP,
RELVERIFY, BOOLGADGET,
(APTR) &GadBorder, NULL, &XoYText, 0,
NULL, 13, NULL
};
static struct Gadget RLGadget = {
&XoYGadget, 146, 51, 58, 10, GADGHCOMP,
RELVERIFY, BOOLGADGET,
(APTR) &GadBorder, NULL, &RLText, 0,
NULL, 12, NULL
};
static struct Gadget SmiGadget = {
&RLGadget, 77, 50, 60, 12, GADGHCOMP | GADGIMAGE,
RELVERIFY, BOOLGADGET,
(APTR) &SmiImage, NULL, NULL, 0,
NULL, 11, NULL
};
static struct Gadget SplGadget = {
&SmiGadget, 9, 50, 60, 12, GADGHCOMP | GADGIMAGE,
RELVERIFY, BOOLGADGET,
(APTR) &SplImage, NULL, NULL, 0,
NULL, 10, NULL
};
static struct Gadget YXGadget = {
&SplGadget, 281, 33, 60, 12, GADGHCOMP | GADGIMAGE,
RELVERIFY, BOOLGADGET,
(APTR) &YXImage, NULL, NULL, 0,
NULL, 9, NULL
};
static struct Gadget LogGadget = {
&YXGadget, 214, 34, 58, 10, GADGHCOMP,
RELVERIFY, BOOLGADGET,
(APTR) &GadBorder, NULL, &LogText, 0,
NULL, 8, NULL
};
static struct Gadget L10Gadget = {
&LogGadget, 145, 33, 60, 12, GADGHCOMP | GADGIMAGE,
RELVERIFY, BOOLGADGET,
(APTR) &L10Image, NULL, NULL, 0,
NULL, 7, NULL
};
static struct Gadget ExpGadget = {
&L10Gadget, 77, 33, 60, 12, GADGHCOMP | GADGIMAGE,
RELVERIFY, BOOLGADGET,
(APTR) &ExpImage, NULL, NULL, 0,
NULL, 6, NULL
};
static struct Gadget E10Gadget = {
&ExpGadget, 9, 33, 60, 12, GADGHCOMP | GADGIMAGE,
RELVERIFY, BOOLGADGET,
(APTR) &E10Image, NULL, NULL, 0,
NULL, 5, NULL
};
static struct Gadget HypGadget = {
&E10Gadget, 282, 17, 58, 10, GADGHCOMP,
RELVERIFY, BOOLGADGET,
(APTR) &GadBorder, NULL, &HypText, 0,
NULL, 4, NULL
};
static struct Gadget InvGadget = {
&HypGadget, 214, 17, 58, 10, GADGHCOMP,
RELVERIFY, BOOLGADGET,
(APTR) &GadBorder, NULL, &InvText, 0,
NULL, 3, NULL
};
static struct Gadget TanGadget = {
&InvGadget, 146, 17, 58, 10, GADGHCOMP,
RELVERIFY, BOOLGADGET,
(APTR) &GadBorder, NULL, &TanText, 0,
NULL, 2, NULL
};
static struct Gadget CosGadget = {
&TanGadget, 78, 17, 58, 10, GADGHCOMP,
RELVERIFY, BOOLGADGET,
(APTR) &GadBorder, NULL, &CosText, 0,
NULL, 1, NULL
};
static struct Gadget SinGadget = {
&CosGadget, 10, 17, 58, 10, GADGHCOMP,
RELVERIFY, BOOLGADGET,
(APTR) &GadBorder, NULL, &SinText, 0,
NULL, 0, NULL
};