home *** CD-ROM | disk | FTP | other *** search
- /* C code generated by: */
- /* Visual Arts Version 1.0 */
- /* Copyright 1994 Danny Y. Wong All rights reserved */
- /* Calgary, Alberta (CANADA) */
-
-
- struct VAobject {
- struct Window *va_Window;
- struct Gadget *va_Gadget;
- struct IntuiMessage *va_IntuiMsg;
- ULONG va_Flags;
- APTR va_UserData;
- };
-
- #define GetString(gad) (((struct StringInfo *)gad->SpecialInfo)->Buffer)
- #define GetUndoString(gad) (((struct StringInfo *)gad->SpecialInfo)->UndoBuffer)
- #define GetNumber(gad) (((struct StringInfo *)gad->SpecialInfo)->LongInt)
-
- extern int GetFileName(BOOL save, struct Window *window, char *title, char *path, char *dir, char *file);
- extern void CustomDrawRects(struct Window *Wind);
- extern void DrawBox(struct Window *Wind, int Left, int Top, int Wid, int Hi, UBYTE APen, short Pattern );
- extern void DrawFBox(struct Window *Wind, int Left, int Top, int Wid, int Hi, UBYTE APen, short Pattern, UBYTE Outline, short Fill );
- extern void DrawLine(struct Window *Wind, int Left, int Top, int Wid, int Hi, UBYTE APen, short Pattern );
- extern void CustomDrawLine(struct Window *Wind);
- extern void SetRPortFill(struct Window *Wind, short Type);
- extern void ButtonSelected(struct Window *wind, struct Gadget *gad);
- extern struct Window *CustomWnd;
- extern APTR VisualInfo;
- extern struct Screen *Scr;
- extern struct Gadget *CustomGadgets[2];
-
- ULONG LinePatterns[6] = { 0xffff, 0x0cccc, 0xaaaa, 0x8888, 0x3333, 0xffff};
-
- void CustomDrawRects(struct Window *Wind)
- {
- UWORD offsetx = Scr->WBorLeft;
- UWORD offsety = Scr->WBorTop + Scr->RastPort.TxHeight + 1;
-
- DrawFBox(Wind, 1, 0, 406, 163, 2, 0, 0, 9 );
- DrawFBox(Wind, 19, 14, 370, 115, 0, 0, 0, 8 );
- DrawBevelBox(Wind->RPort, 18+offsetx, 13+offsety, 372, 117,
- (GT_VisualInfo), VisualInfo, (GTBB_Recessed), TRUE, TAG_DONE);
- SetDrPt(Wind->RPort, 0xFFFF);
- SetOPen(Wind->RPort, 0);
- SetAfPt(Wind->RPort, NULL, 0);
- }
-
- void CustomDrawLine(struct Window *Wind)
- {
- DrawLine(Wind, 27, 64, 375, 64, 3, 4 );
- }
-
- UWORD AreaPattern1[] =
- {
- 0x1111, 0x2222,
- 0x4444, 0x8888,
- 0x1111, 0x2222,
- 0x4444, 0x8888,
- 0x1111, 0x2222,
- 0x4444, 0x8888,
- 0x1111, 0x2222,
- 0x4444, 0x8888
- };
-
- UWORD AreaPattern2[] =
- {
- 0x8080, 0x8080,
- 0x8080, 0x8080
- };
-
- UWORD AreaPattern3[] =
- {
- 0x3333, 0x3333,
- 0x3333, 0xffff,
- 0x3333, 0x3333,
- 0x3333, 0xffff,
- 0x3333, 0x3333,
- 0x3333, 0xffff,
- 0x3333, 0x3333,
- 0x3333, 0xffff
- };
-
- UWORD AreaPattern4[] =
- {
- 0x8888, 0x8888,
- 0x8888, 0x8888,
- 0x8888, 0x8888,
- 0x8888, 0x8888,
- 0x8888, 0x8888,
- 0x8888, 0x8888,
- 0x8888, 0x8888,
- 0x8888, 0x8888
- };
-
- UWORD AreaPattern5[] =
- {
- 0xffff, 0x0060,
- 0x0060, 0x0060,
- 0xffff, 0x6000,
- 0x6000, 0x6000,
- 0xffff, 0x0060,
- 0x0060, 0x0060,
- 0xffff, 0x6000,
- 0x6000, 0x6000
- };
-
- UWORD AreaPattern6[] =
- {
- 0x0000, 0x0000,
- 0x0000, 0xffff,
- 0x0000, 0x0000,
- 0x0000, 0xffff,
- 0x0000, 0x0000,
- 0x0000, 0xffff,
- 0x0000, 0x0000,
- 0x0000, 0xffff
- };
-
- UWORD AreaPattern7[] =
- {
- 0x4040, 0x0000,
- 0x1010, 0x0000
- };
-
- UWORD AreaPattern8[] =
- {
- 0xffff, 0xffff
- };
-
- UWORD AreaPattern9[] =
- {
- 0xaaaa, 0x5555
- };
-
-
- void SetRPortFill(struct Window *Wind, short Type)
- {
- switch(Type)
- {
- case 1:
- SetAfPt(Wind->RPort, (UWORD *)&AreaPattern1, 4);
- break;
- case 2:
- SetAfPt(Wind->RPort, (UWORD *)&AreaPattern2, 2);
- break;
- case 3:
- SetAfPt(Wind->RPort, (UWORD *)&AreaPattern3, 4);
- break;
- case 4:
- SetAfPt(Wind->RPort, (UWORD *)&AreaPattern4, 4);
- break;
- case 5:
- SetAfPt(Wind->RPort, (UWORD *)&AreaPattern5, 4);
- break;
- case 6:
- SetAfPt(Wind->RPort, (UWORD *)&AreaPattern6, 4);
- break;
- case 7:
- SetAfPt(Wind->RPort, (UWORD *)&AreaPattern7, 2);
- break;
- case 8:
- SetAfPt(Wind->RPort, (UWORD *)&AreaPattern8, 1);
- break;
- case 9:
- SetAfPt(Wind->RPort, (UWORD *)&AreaPattern9, 1);
- break;
- default:
- break;
- }
- }
-
- void DrawFBox(struct Window *Wind, int Left, int Top, int Wid, int Hi, UBYTE APen, short Pattern, UBYTE Outline, short Fill )
- {
- UWORD offsetx = Scr->WBorLeft;
- UWORD offsety = Scr->WBorTop + Scr->RastPort.TxHeight + 1;
-
- SetAPen(Wind->RPort, APen);
- SetOPen(Wind->RPort, Outline);
- SetDrPt(Wind->RPort, LinePatterns[Pattern]);
- SetRPortFill(Wind, Fill);
- RectFill(Wind->RPort, Left+offsetx, Top+offsety, Left+offsetx + Wid, Top+offsety + Hi);
- }
-
- void DrawLine(struct Window *Wind, int Left, int Top, int Wid, int Hi, UBYTE APen, short Pattern )
- {
- UWORD offsetx = Scr->WBorLeft;
- UWORD offsety = Scr->WBorTop + Scr->RastPort.TxHeight + 1;
-
- SetAPen(Wind->RPort, APen);
- SetDrPt(Wind->RPort, LinePatterns[Pattern]);
- Move(Wind->RPort, Left+offsetx, Top+offsety);
- Draw(Wind->RPort, Wid+offsetx, Hi+offsety);
- }
-
- void ButtonSelected(struct Window *wind, struct Gadget *gad)
- {
- gad->Flags ^= GFLG_SELECTED;
- RefreshGList(gad, wind, NULL, 1);
- Delay(4);
- gad->Flags ^= GFLG_SELECTED;
- RefreshGList(gad, wind, NULL, 1);
- }
-
-
- /* gadget functions */
-
- int okObj(struct VAobject VAObject)
- {
- return(-1L);
- }
- /* Button OK */
-
- int ok11Obj(struct VAobject VAObject)
- {
- return(-1L);
- }
- /* Button Cancel */
-
- int AboutMenuObj(struct VAobject VAObject);
- int Visual_Arts_V1MenuObj(struct VAobject VAObject);
- int Copyright_1994_Danny_Y_WongMenuObj(struct VAobject VAObject);
- int All_Rights_ReservedMenuObj(struct VAobject VAObject);
- int OpenMenuObj(struct VAobject VAObject);
- int SaveMenuObj(struct VAobject VAObject);
- int PrintMenuObj(struct VAobject VAObject);
- int PrinterMenuObj(struct VAobject VAObject);
- int FileMenuObj(struct VAobject VAObject);
- int PlotterMenuObj(struct VAobject VAObject);
- int PostscriptMenuObj(struct VAobject VAObject);
- int QuitMenuObj(struct VAobject VAObject);
- int UndoMenuObj(struct VAobject VAObject);
- int CopyMenuObj(struct VAobject VAObject);
- int PasteMenuObj(struct VAobject VAObject);
- int CutMenuObj(struct VAobject VAObject);
- int FontMenuObj(struct VAobject VAObject);
- int PrefsMenuObj(struct VAobject VAObject);
-
-
- int AboutMenuObj(struct VAobject VAObject)
- {
- return(1);
- }
-
- int Visual_Arts_V1MenuObj(struct VAobject VAObject)
- {
- return(1);
- }
-
- int Copyright_1994_Danny_Y_WongMenuObj(struct VAobject VAObject)
- {
- return(1);
- }
-
- int All_Rights_ReservedMenuObj(struct VAobject VAObject)
- {
- return(1);
- }
-
- int OpenMenuObj(struct VAobject VAObject)
- {
- return(1);
- }
-
- int SaveMenuObj(struct VAobject VAObject)
- {
- return(1);
- }
-
- int PrintMenuObj(struct VAobject VAObject)
- {
- return(1);
- }
-
- int PrinterMenuObj(struct VAobject VAObject)
- {
- return(1);
- }
-
- int FileMenuObj(struct VAobject VAObject)
- {
- return(1);
- }
-
- int PlotterMenuObj(struct VAobject VAObject)
- {
- return(1);
- }
-
- int PostscriptMenuObj(struct VAobject VAObject)
- {
- return(1);
- }
-
- int QuitMenuObj(struct VAobject VAObject)
- {
- return(1);
- }
-
- int UndoMenuObj(struct VAobject VAObject)
- {
- return(1);
- }
-
- int CopyMenuObj(struct VAobject VAObject)
- {
- return(1);
- }
-
- int PasteMenuObj(struct VAobject VAObject)
- {
- return(1);
- }
-
- int CutMenuObj(struct VAobject VAObject)
- {
- return(1);
- }
-
- int FontMenuObj(struct VAobject VAObject)
- {
- return(1);
- }
-
- int PrefsMenuObj(struct VAobject VAObject)
- {
- return(1);
- }
-