GLMenuI.h

Go to the documentation of this file.
00001 ////////////////////////////////////////////////////////////////////////////////
00002 //    Scorched3D (c) 2000-2009
00003 //
00004 //    This file is part of Scorched3D.
00005 //
00006 //    Scorched3D 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 2 of the License, or
00009 //    (at your option) any later version.
00010 //
00011 //    Scorched3D is distributed in the hope that it will be useful,
00012 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 //    GNU General Public License for more details.
00015 //
00016 //    You should have received a copy of the GNU General Public License
00017 //    along with Scorched3D; if not, write to the Free Software
00018 //    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019 ////////////////////////////////////////////////////////////////////////////////
00020 
00021 
00022 // GLMenuI.h: interface for the GLMenuI class.
00023 //
00024 //////////////////////////////////////////////////////////////////////
00025 
00026 #if !defined(AFX_GLMENUI_H__7171A46C_8265_4A9F_A984_889EF2547CB1__INCLUDED_)
00027 #define AFX_GLMENUI_H__7171A46C_8265_4A9F_A984_889EF2547CB1__INCLUDED_
00028 
00029 #include <list>
00030 #include <string>
00031 #include <GLW/GLWToolTip.h>
00032 #include <lang/LangString.h>
00033 
00034 class GLTexture;
00035 class GLMenuItem
00036 {
00037 public:
00038         GLMenuItem(const LangString &text, 
00039                 ToolTip *tooltip = 0, bool selected = false, 
00040                 GLTexture *texture = 0,
00041                 void *userData = 0);
00042 
00043         const LangString &getText() { return menuText_; }
00044         ToolTip *getToolTip() { return tip_; }
00045         GLTexture *getTexture() { return texture_; }
00046         bool getSelected() { return selected_; }
00047         void *getUserData() { return userData_; }
00048         bool getSeperator() { return seperator_; }
00049         void setSeperator() { seperator_ = true; }
00050 
00051 protected:
00052         LangString menuText_;
00053         ToolTip *tip_;
00054         GLTexture *texture_;
00055         bool selected_, seperator_;
00056         void *userData_;
00057 };
00058 
00059 class GLMenuI  
00060 {
00061 public:
00062         virtual ~GLMenuI();
00063 
00064         virtual void menuSelection(const char* menuName, const int position, GLMenuItem &item);
00065         virtual LangString *getMenuText(const char* menuName);
00066         virtual bool getEnabled(const char* menuName);
00067         virtual bool getMenuItems(const char* menuName, std::list<GLMenuItem> &result);
00068         virtual bool menuOpened(const char* menuName);
00069         virtual LangStringStorage *getMenuToolTip(const char* menuName);
00070 };
00071 
00072 #endif // !defined(AFX_GLMENUI_H__7171A46C_8265_4A9F_A984_889EF2547CB1__INCLUDED_)

Generated on Mon Feb 16 15:14:44 2009 for Scorched3D by  doxygen 1.5.3