1 static USHORT Palette[] = {
2     0x0AAA, /* color #0 */
3     0x0000, /* color #1 */
4     0x0FFF, /* color #2 */
5     0x058B, /* color #3 */
6     0x000F, /* color #4 */
7     0x0F0F, /* color #5 */
8     0x00FF, /* color #6 */
9     0x0FFF  /* color #7 */
10 #define PaletteColorCount 8
11 };
12 
13 #define PALETTE Palette
14 
15 static SHORT ClipBorderVectors1[] = { 0, 0, 76, 0, 76, 11, 0, 11, 0, 0 };
16 static struct Border ClipBorder1 = {
17     -1, -1,             /* XY origin relative to container TopLeft */
18     3, 0, JAM1,         /* front pen, back pen and drawmode */
19     5,                  /* number of XY vectors */
20     ClipBorderVectors1, /* pointer to XY vectors */
21     NULL                /* next border in list */
22 };
23 
24 static struct IntuiText ClipIText1 = {
25     4,        0, JAM1, /* front and back text pens, drawmode and fill byte */
26     15,       1,       /* XY origin relative to container TopLeft */
27     NULL,              /* font pointer or NULL for default */
28     "Cancel",          /* pointer to text */
29     NULL               /* next IntuiText structure */
30 };
31 
32 static struct Gadget ClipCancel = {
33     NULL,                /* next gadget */
34     240, 59,             /* origin XY of hit box relative to window TopLeft */
35     75, 10,              /* hit box width and height */
36     NULL,                /* gadget flags */
37     RELVERIFY,           /* activation flags */
38     BOOLGADGET,          /* gadget type flags */
39     (APTR) &ClipBorder1, /* gadget border or image to be rendered */
40     NULL,                /* alternate imagery for selection */
41     &ClipIText1,         /* first IntuiText structure */
42     NULL,                /* gadget mutual-exclude long word */
43     NULL,                /* SpecialInfo structure */
44     GADCANCEL,           /* user-definable data */
45     NULL                 /* pointer to user-definable data */
46 };
47 
48 static SHORT ClipBorderVectors2[] = { 0, 0, 78, 0, 78, 11, 0, 11, 0, 0 };
49 static struct Border ClipBorder2 = {
50     -1, -1,             /* XY origin relative to container TopLeft */
51     3, 0, JAM1,         /* front pen, back pen and drawmode */
52     5,                  /* number of XY vectors */
53     ClipBorderVectors2, /* pointer to XY vectors */
54     NULL                /* next border in list */
55 };
56 
57 static struct IntuiText ClipIText2 = {
58     4,      0, JAM1, /* front and back text pens, drawmode and fill byte */
59     24,     1,       /* XY origin relative to container TopLeft */
60     NULL,            /* font pointer or NULL for default */
61     "Okay",          /* pointer to text */
62     NULL             /* next IntuiText structure */
63 };
64 
65 static struct Gadget ClipOkay = {
66     &ClipCancel,         /* next gadget */
67     17, 60,              /* origin XY of hit box relative to window TopLeft */
68     77, 10,              /* hit box width and height */
69     NULL,                /* gadget flags */
70     RELVERIFY,           /* activation flags */
71     BOOLGADGET,          /* gadget type flags */
72     (APTR) &ClipBorder2, /* gadget border or image to be rendered */
73     NULL,                /* alternate imagery for selection */
74     &ClipIText2,         /* first IntuiText structure */
75     NULL,                /* gadget mutual-exclude long word */
76     NULL,                /* SpecialInfo structure */
77     GADOKAY,             /* user-definable data */
78     NULL                 /* pointer to user-definable data */
79 };
80 
81 static struct PropInfo ClipClipXCLIPSInfo = {
82     AUTOKNOB + FREEHORIZ, /* PropInfo flags */
83     24504, -1,            /* horizontal and vertical pot values */
84     10922, -1,            /* horizontal and vertical body values */
85 };
86 
87 static struct Image ClipImage1 = {
88     43,     0,      /* XY origin relative to container TopLeft */
89     24,     3,      /* Image width and height in pixels */
90     0,              /* number of bitplanes in Image */
91     NULL,           /* pointer to ImageData */
92     0x0000, 0x0000, /* PlanePick and PlaneOnOff */
93     NULL            /* next Image structure */
94 };
95 
96 static struct IntuiText ClipIText3 = {
97     3, 0, JAM1,       /* front and back text pens, drawmode and fill byte */
98     -116, -1,         /* XY origin relative to container TopLeft */
99     NULL,             /* font pointer or NULL for default */
100     "X Clip Border:", /* pointer to text */
101     NULL              /* next IntuiText structure */
102 };
103 
104 static struct Gadget ClipXCLIP = {
105     &ClipOkay, /* next gadget */
106     134, 37,   /* origin XY of hit box relative to window TopLeft */
107     -199, 7,   /* hit box width and height */
108     GRELWIDTH, /* gadget flags */
109     RELVERIFY + GADGIMMEDIATE,  /* activation flags */
110     PROPGADGET,                 /* gadget type flags */
111     (APTR) &ClipImage1,         /* gadget border or image to be rendered */
112     NULL,                       /* alternate imagery for selection */
113     &ClipIText3,                /* first IntuiText structure */
114     NULL,                       /* gadget mutual-exclude long word */
115     (APTR) &ClipClipXCLIPSInfo, /* SpecialInfo structure */
116     XCLIP,                      /* user-definable data */
117     NULL                        /* pointer to user-definable data */
118 };
119 
120 static struct PropInfo ClipClipYCLIPSInfo = {
121     AUTOKNOB + FREEHORIZ, /* PropInfo flags */
122     13106, -1,            /* horizontal and vertical pot values */
123     10922, -1,            /* horizontal and vertical body values */
124 };
125 
126 static struct Image ClipImage2 = {
127     22,     0,      /* XY origin relative to container TopLeft */
128     24,     3,      /* Image width and height in pixels */
129     0,              /* number of bitplanes in Image */
130     NULL,           /* pointer to ImageData */
131     0x0000, 0x0000, /* PlanePick and PlaneOnOff */
132     NULL            /* next Image structure */
133 };
134 
135 static struct IntuiText ClipIText4 = {
136     3, 0, JAM1,       /* front and back text pens, drawmode and fill byte */
137     -116, -1,         /* XY origin relative to container TopLeft */
138     NULL,             /* font pointer or NULL for default */
139     "Y Clip Border:", /* pointer to text */
140     NULL              /* next IntuiText structure */
141 };
142 
143 static struct Gadget ClipYCLIP = {
144     &ClipXCLIP, /* next gadget */
145     134, 46,    /* origin XY of hit box relative to window TopLeft */
146     -199, 7,    /* hit box width and height */
147     GRELWIDTH,  /* gadget flags */
148     RELVERIFY + GADGIMMEDIATE,  /* activation flags */
149     PROPGADGET,                 /* gadget type flags */
150     (APTR) &ClipImage2,         /* gadget border or image to be rendered */
151     NULL,                       /* alternate imagery for selection */
152     &ClipIText4,                /* first IntuiText structure */
153     NULL,                       /* gadget mutual-exclude long word */
154     (APTR) &ClipClipYCLIPSInfo, /* SpecialInfo structure */
155     YCLIP,                      /* user-definable data */
156     NULL                        /* pointer to user-definable data */
157 };
158 
159 static struct PropInfo ClipClipXSIZESInfo = {
160     AUTOKNOB + FREEHORIZ, /* PropInfo flags */
161     26212, -1,            /* horizontal and vertical pot values */
162     10922, -1,            /* horizontal and vertical body values */
163 };
164 
165 static struct Image ClipImage3 = {
166     45,     0,      /* XY origin relative to container TopLeft */
167     24,     3,      /* Image width and height in pixels */
168     0,              /* number of bitplanes in Image */
169     NULL,           /* pointer to ImageData */
170     0x0000, 0x0000, /* PlanePick and PlaneOnOff */
171     NULL            /* next Image structure */
172 };
173 
174 static struct IntuiText ClipIText5 = {
175     3, 0, JAM1,        /* front and back text pens, drawmode and fill byte */
176     -124, -1,          /* XY origin relative to container TopLeft */
177     NULL,              /* font pointer or NULL for default */
178     "X Scale Factor:", /* pointer to text */
179     NULL               /* next IntuiText structure */
180 };
181 
182 static struct Gadget ClipXSIZE = {
183     &ClipYCLIP, /* next gadget */
184     134, 15,    /* origin XY of hit box relative to window TopLeft */
185     -199, 7,    /* hit box width and height */
186     GRELWIDTH,  /* gadget flags */
187     RELVERIFY + GADGIMMEDIATE,  /* activation flags */
188     PROPGADGET,                 /* gadget type flags */
189     (APTR) &ClipImage3,         /* gadget border or image to be rendered */
190     NULL,                       /* alternate imagery for selection */
191     &ClipIText5,                /* first IntuiText structure */
192     NULL,                       /* gadget mutual-exclude long word */
193     (APTR) &ClipClipXSIZESInfo, /* SpecialInfo structure */
194     XSIZE,                      /* user-definable data */
195     NULL                        /* pointer to user-definable data */
196 };
197 
198 static struct PropInfo ClipClipYSIZESInfo = {
199     AUTOKNOB + FREEHORIZ, /* PropInfo flags */
200     -25937, -1,           /* horizontal and vertical pot values */
201     10922, -1,            /* horizontal and vertical body values */
202 };
203 
204 static struct Image ClipImage4 = {
205     69,     0,      /* XY origin relative to container TopLeft */
206     24,     3,      /* Image width and height in pixels */
207     0,              /* number of bitplanes in Image */
208     NULL,           /* pointer to ImageData */
209     0x0000, 0x0000, /* PlanePick and PlaneOnOff */
210     NULL            /* next Image structure */
211 };
212 
213 static struct IntuiText ClipIText6 = {
214     3, 0, JAM1,        /* front and back text pens, drawmode and fill byte */
215     -124, -1,          /* XY origin relative to container TopLeft */
216     NULL,              /* font pointer or NULL for default */
217     "Y Scale Factor:", /* pointer to text */
218     NULL               /* next IntuiText structure */
219 };
220 
221 static struct Gadget ClipYSIZE = {
222     &ClipXSIZE, /* next gadget */
223     134, 24,    /* origin XY of hit box relative to window TopLeft */
224     -199, 7,    /* hit box width and height */
225     GRELWIDTH,  /* gadget flags */
226     RELVERIFY + GADGIMMEDIATE,  /* activation flags */
227     PROPGADGET,                 /* gadget type flags */
228     (APTR) &ClipImage4,         /* gadget border or image to be rendered */
229     NULL,                       /* alternate imagery for selection */
230     &ClipIText6,                /* first IntuiText structure */
231     NULL,                       /* gadget mutual-exclude long word */
232     (APTR) &ClipClipYSIZESInfo, /* SpecialInfo structure */
233     YSIZE,                      /* user-definable data */
234     NULL                        /* pointer to user-definable data */
235 };
236 
237 #define ClipGadgetList1 ClipYSIZE
238 
239 static struct NewWindow ClipNewWindowStructure1 = {
240     114, 16, /* window XY origin relative to TopLeft of screen */
241     346, 76, /* window width and height */
242     0, 1,    /* detail and block pens */
243     NEWSIZE + MOUSEMOVE + GADGETDOWN + GADGETUP + CLOSEWINDOW + ACTIVEWINDOW
244         + VANILLAKEY + INTUITICKS, /* IDCMP flags */
245     WINDOWSIZING + WINDOWDRAG + WINDOWDEPTH + WINDOWCLOSE + ACTIVATE
246         + NOCAREREFRESH,        /* other window flags */
247     &ClipYSIZE,                 /* first gadget in gadget list */
248     NULL,                       /* custom CHECKMARK imagery */
249     "Edit Clipping Parameters", /* window title */
250     NULL,                       /* custom screen pointer */
251     NULL,                       /* custom bitmap */
252     350,
253     76,          /* minimum width and height */
254     -1, -1,      /* maximum width and height */
255     CUSTOMSCREEN /* destination screen type */
256 };
257 
258 /* end of PowerWindows source generation */
259