home *** CD-ROM | disk | FTP | other *** search
- /**
- ** Author: mvk
- ** Date: 18. Dezember 1992
- **
- ** (C) by VIONA-Development 1991,1993
- **
- ** Create some Gadgets
- **
- **/
-
- EB_StrArray text = {
- "HHH & MVK Alpha-Version",
- "from 18. Dec, 92 for Testing",
- "© by VIONA Development",NULL };
- EB_StrArray Gads1 = { "Record","Play","Load","Save",NULL };
- EB_StrArray2 Gadgs = { &Gads1,NULL };
-
-
- EI_WindowPtr CreateGads (EI_WindowPtr win)
- {
- EB_GadBoxPtr root,help;
-
- con = EB_CreateGadContext(NULL,NULL,-1,-1);
- if(con == NULL)
- return(NULL);
-
- help = EB_CreateHorizBox(con);
-
- EB_AddLastSon(help, EB_CreateHorizFill(con,0,0));
- EB_AddLastSon(help, EB_CreateMultiAction2(con, &Gadgs,0x1000 ));
- EB_AddLastSon(help, EB_CreateHorizFill(con,0,0));
-
- root = EB_CreateVertiBox(con);
-
- EB_AddLastSon(root,EB_CreateMultiText(con,&text));
-
- EB_AddLastSon(root,help);
-
- if (win != NULL)
- { /* sub -2 because for rendering */
- root->MinWidth=win->Width-2;
- root->MaxWidth=win->Width-2;
- root->MinHeight=win->Height-2;
- root->MaxHeight=win->Height-2;
- }
-
-
- if (EB_ProcessGadBoxes(con, root))
- {
- if (win == NULL)
- {
- con->NewWin->IDCMPFlags = myEdcmpFlags;
- con->NewWin->Title = "REQUESTER DEMO";
-
- con->NewWin->Bordef.SysGadgets = myWinGads;
- con->NewWin->MaxWidth = 800;
- con->NewWin->Flags |= myWinFlags;
- con->NewWin->MaxHeight = 600;
-
- return (EI_WindowPtr)EI_OpenWindow(con->NewWin);
- }
- else
- return win;
- }
- else
- return NULL;
-
- }
-
-