00001 00005 /* Copyright © 2009 James Legg. 00006 This program is free software: you can redistribute it and/or modify 00007 it under the terms of the GNU General Public License as published by 00008 the Free Software Foundation, either version 3 of the License, or 00009 (at your option) any later version. 00010 */ 00011 #ifndef MENUITEM_H_ 00012 #define MENUITEM_H_ 00013 00014 #include <string> 00015 00016 namespace UI 00017 { 00018 00020 class MenuItem 00021 { 00022 public: 00026 enum State 00027 { 00029 S_NORMAL = 0, 00033 S_PRELIGHT = 1, 00038 S_ACTIVE = 2, 00040 S_DISABLED = 3 00041 }; 00045 MenuItem(std::wstring label); 00046 virtual ~MenuItem(); 00047 00052 virtual void draw(); 00053 00055 virtual void activate(); 00056 00058 void set_state(State state); 00059 00061 State get_state(); 00062 00064 unsigned int get_min_width(); 00065 00069 void set_width(unsigned int width); 00070 protected: 00071 std::wstring label; 00072 State state; 00073 float tex_coord_y_start; 00074 float tex_coord_y_end; 00075 unsigned int width; 00076 }; 00077 00078 } 00079 00080 #endif /*MENUITEM_H_*/
Generated at Mon Sep 6 00:41:13 2010 by Doxygen version 1.4.7 for Racer version svn335.