#ifndef MENU_H
#define MENU_H

#define MENU_INIT 	1
#define FREQ_SET_INIT 2
#define BARG_SET_INIT 3
#define INT_SET_INIT 4

#define INT_SET_POS		77

//-----------------------
//jedna polozka menu
typedef struct 
{
	unsigned char type;
	char text[18];
	unsigned char sys_mask;
	unsigned short int app_mask;
	unsigned long int par;
	unsigned int instr;
	unsigned int id;
} TMenuItem;

//submenu
typedef struct
{
	unsigned char type;
	unsigned char start;
	unsigned char stop;
	unsigned char cfg[7];
} TSubMenu;

//nastaveni frekvence
typedef struct
{
	unsigned char type;
	char *title;
	unsigned long *freq;
	unsigned long min;
	unsigned long max;
} TFreqSett;

//nastaveni bargrafem
typedef struct
{
	unsigned char type;
	char *title;
	unsigned char *value;
	unsigned char min;
	unsigned char max;
} TBarGraphSett;

enum e_num_type
{
	NUM_DAY,
	NUM_MONTH,
	NUM_YEAR,
	NUM_HOUR,
	NUM_MINUTE,
	NUM_SECOND
};

enum eMenuType
{
	INT_SET_MENU, 
	INACTIVE_MENU = 255
};

enum e_int_set_state
{
	INT_SET_CANCEL,
	INT_SET_OK,
	INT_SET_PROGRESS	
};

extern enum e_int_set_state int_set_state;

void menu(char ch);
void IntSetKey(char ch);
//void SetNumber(enum e_num_type num_type, unsigned char len, unsigned char *preset_num);
void SetNumber(enum e_num_type nt, unsigned char len);
void deactive_menu(void);


#endif
