home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
alib
/
d1xx
/
d122
/
iff2pcs.lha
/
Iff2Pcs
/
Source
/
pzmenu.c
< prev
next >
Wrap
C/C++ Source or Header
|
1987-12-31
|
1KB
|
59 lines
/* Ali T. Ozer
** Menu open/close routines for iff2pcs.
** Nov 1987
*/
#include "pz.h"
#include "popmenu.h"
#define ITEMHEIGHT 9
#define NUMITEMS 4
struct PopUp_Menu pzmenu;
struct PopUp_Item pzitem[] = {
{" Show ", SHOWCMD, 1,3,ITEMHEIGHT,0,0,&pzitem[1]},
{" Check ", CHECKCMD, 1,2,ITEMHEIGHT,0,0,&pzitem[2]},
{" Help ", HELPCMD, 1,2,ITEMHEIGHT,0,0,&pzitem[3]},
{" Quit ", QUITCMD, 1,6,ITEMHEIGHT,0,0,NULL}
};
/* To free things intelligently...
*/
#define MENUPACKAGEOPENED 1
#define MENUALLOCATED 2
static int pzmenustatus;
int InitPzMenu (screendepth, textcolor, bordercolor, areacolor)
int screendepth, textcolor, bordercolor;
{
int cnt;
pzmenustatus = 0;
if (!Init_MenuPackage ()) return (false);
pzmenustatus = MENUPACKAGEOPENED;
for (cnt = 0; cnt < NUMITEMS; cnt++) pzitem[cnt].color = textcolor;
pzmenu.depth = screendepth;
pzmenu.deactivate = MENUUP;
pzmenu.outline_color = bordercolor;
pzmenu.area_color = areacolor;
pzmenu.first_item = &pzitem[0];
if (!Init_PopUp_Menu(&pzmenu)) return (false);
pzmenustatus = MENUALLOCATED;
return (true);
}
FreePzMenu ()
{
if (pzmenustatus >= MENUALLOCATED) Dispose_PopUp (&pzmenu);
if (pzmenustatus >= MENUPACKAGEOPENED) Close_MenuPackage ();
}