Delphi & Pascal (česká wiki)
Přejít na: navigace, hledání
/*****************************************************************************
*								             *
*                                Subor MENU.H                                *
*								             *
*****************************************************************************/
 
typedef struct Polozka_HL_Menu{
	unsigned int stlpec;
	char hot_key;
	char *text;
	char *spodny_riadok;
	char **help;
	} Polozka_HL_Menu;
 
 
typedef struct Polozka_Menu{
	char	hot_key;
	char	*text;
	char	*spodny_riadok;
	char	**help;
	int	cinnost;
 
	union
		{
		int		(far* fnc)(void);
		struct	Menu	*podmenu;
		} c;
	} Polozka_Menu;
 
 
typedef struct HL_Menu{
	unsigned int riadok;
	unsigned char attr_okna;
	unsigned char attr_bar;
	unsigned char attr_hot_key;
	unsigned char attr_spodneho_riadku;
	struct Polozka_HL_Menu *polozky;
	int posledna_volba;
	} HL_Menu;
 
 
typedef struct Menu{
	unsigned int lavy;
	unsigned int horny;
	unsigned char attr_okna;
	unsigned char attr_okraja;
	unsigned char attr_bar;
	unsigned char attr_hot_key;
	unsigned char attr_spodneho_riadku;
	unsigned char typ_okraja;
 
	struct Polozka_Menu	*polozky;
 
	int posledna_volba;
	} Menu;
 
 
extern struct HL_Menu hlavne_menu;
extern struct Menu podmenu[];
 
 
int  pull_down_menu( struct HL_Menu *hlavne,struct Menu podmenu[],int volba );
int  zvisle_menu( struct Menu *menu );
int  vodorovne_menu( struct HL_Menu *menu );
void tlac_vodorovne_menu( struct HL_Menu *menu );
void zvyrazni_vodorovne_menu( struct HL_Menu *menu );
void tlac_riadok_menu( int zx,int zy,int riadok,struct Menu *menu,int sirka );
void tlac_riadok_help( char *p,unsigned char attr1,unsigned char attr2 );
int  zisti_sirku_okna( Polozka_Menu *polozky );
int  zisti_vysku_okna( Polozka_Menu *polozky );
void inic_menu( struct HL_Menu *hlavne,struct Menu podmenu[] );
 
 
/*--------------------------------END---------------------------------------*/