00001 #ifndef CAMENUITEM_H
00002 #define CAMENUITEM_H
00003
00004 #include <ClanLib/core.h>
00005 #include <ClanLib/display.h>
00006
00007 #define CA_MI_VIRTUAL 0
00008 #define CA_MI_MENULABEL 1
00009 #define CA_MI_MENUSELECT 2
00010 #define CA_MI_MENUINPUT 3
00011
00012 class CAMenu;
00013
00017 class CAMenuItem {
00018 public:
00019 CAMenuItem( CAMenu* menu, int pos, const char* label );
00020 virtual ~CAMenuItem();
00021
00025 virtual int rtti() {
00026 return CA_MI_VIRTUAL;
00027 }
00028
00029 virtual void display( bool highlight ) = 0;
00030 virtual void handleKey( const CL_Key &key ) = 0;
00032 void setLabel( const char* l ) {
00033 label = l;
00034 }
00035
00036 protected:
00038
00039 CAMenu* menu;
00041 int pos;
00043 int top;
00044
00046 CL_String label;
00047 };
00048
00049 #endif
00050
00051