/***************************************************************************
                          menu.h  -  description
                             -------------------
    begin                : Tue Feb 29 2000
    copyright            : (C) 2000 by Michael Speck
    email                : 
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef MENU_H
#define MENU_H


/**
  *@author Michael Speck
  */

#include "menuitem.h"

class Menu {
public: 
	Menu(char *cap, int num);
	~Menu();
	int  InsertItem(int i, MenuItem *mi);
	void SetCurItem(int i);
	MenuItem* CurItem();
	MenuItem* Item(int i);
	int ItemNum();
	int KeyEvent(int code);
	void Update(int repaint);
	void Show(int repaint);
	void Hide(int repaint);
	void Refresh();
	void Compute();
	void Prepare(int item);
	void NoBackgnd();
	void ClearState();
	void MouseMotion(int mx, int my);
private:
	char	caption[32];
	int		item_num;
	MenuItem	**items;
	MenuItem	*cur_item;
	int		cur_id;
};

#endif
