1 /*************************************************************************** 2 menu.h - description 3 ------------------- 4 begin : Tue Feb 29 2000 5 copyright : (C) 2000 by Michael Speck 6 email : 7 ***************************************************************************/ 8 9 /*************************************************************************** 10 * * 11 * This program is free software; you can redistribute it and/or modify * 12 * it under the terms of the GNU General Public License as published by * 13 * the Free Software Foundation; either version 2 of the License, or * 14 * (at your option) any later version. * 15 * * 16 ***************************************************************************/ 17 18 #ifndef MENU_H 19 #define MENU_H 20 21 22 /** 23 *@author Michael Speck 24 */ 25 26 #include "menuitem.h" 27 28 class Menu { 29 public: 30 Menu(char *cap, int num); 31 ~Menu(); 32 int InsertItem(int i, MenuItem *mi); 33 void SetCurItem(int i); 34 MenuItem* CurItem(); 35 MenuItem* Item(int i); 36 int ItemNum(); 37 int KeyEvent(int code); 38 void Update(int repaint); 39 void Show(int repaint); 40 void Hide(int repaint); 41 void Refresh(); 42 void Compute(); 43 void Prepare(int item); 44 void NoBackgnd(); 45 void ClearState(); 46 void MouseMotion(int mx, int my); 47 private: 48 char caption[32]; 49 int item_num; 50 MenuItem **items; 51 MenuItem *cur_item; 52 int cur_id; 53 }; 54 55 #endif 56