Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

OgreGuiElementFactories.h

Go to the documentation of this file.
00001 /*
00002 -----------------------------------------------------------------------------
00003 This source file is part of OGRE
00004     (Object-oriented Graphics Rendering Engine)
00005 For the latest info, see http://ogre.sourceforge.net/
00006 
00007 Copyright © 2000-2002 The OGRE Team
00008 Also see acknowledgements in Readme.html
00009 
00010 This program is free software; you can redistribute it and/or modify it under
00011 the terms of the GNU Lesser General Public License as published by the Free Software
00012 Foundation; either version 2 of the License, or (at your option) any later
00013 version.
00014 
00015 This program is distributed in the hope that it will be useful, but WITHOUT
00016 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00017 FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
00018 
00019 You should have received a copy of the GNU Lesser General Public License along with
00020 this program; if not, write to the Free Software Foundation, Inc., 59 Temple
00021 Place - Suite 330, Boston, MA 02111-1307, USA, or go to
00022 http://www.gnu.org/copyleft/lesser.txt.
00023 -----------------------------------------------------------------------------
00024 */
00025 
00026 #ifndef __GuiElementFactories_H__
00027 #define __GuiElementFactories_H__
00028 
00029 #include "OgreGuiElementPrerequisites.h"
00030 #include "OgreGuiElementFactory.h"
00031 #include "OgrePanelGuiElement.h"
00032 #include "OgreBorderPanelGuiElement.h"
00033 #include "OgreButtonGuiElement.h"
00034 #include "OgreListGuiElement.h"
00035 #include "OgreTextAreaGuiElement.h"
00036 
00037 
00038 // This file includes definitions for all the GuiElement factories provided with OGRE
00039 // These classes are exported incase anyone wants to extend them
00040 
00041 namespace Ogre {
00042 
00044     class _OgreGuiElementExport PanelGuiElementFactory: public GuiElementFactory
00045     {
00046     public:
00048         GuiElement* createGuiElement(const String& instanceName)
00049         {
00050             return new PanelGuiElement(instanceName);
00051         }
00053         const String& getTypeName(void)
00054         {
00055             static String name = "Panel";
00056             return name;
00057         }
00058     };
00059 
00061     class _OgreGuiElementExport BorderPanelGuiElementFactory: public GuiElementFactory
00062     {
00063     public:
00065         GuiElement* createGuiElement(const String& instanceName)
00066         {
00067             return new BorderPanelGuiElement(instanceName);
00068         }
00070         const String& getTypeName(void)
00071         {
00072             static String name = "BorderPanel";
00073             return name;
00074         }
00075     };
00076 
00078     class _OgreGuiElementExport TextAreaGuiElementFactory: public GuiElementFactory
00079     {
00080     public:
00082         GuiElement* createGuiElement(const String& instanceName)
00083         {
00084             return new TextAreaGuiElement(instanceName);
00085         }
00087         const String& getTypeName(void)
00088         {
00089             static String name = "TextArea";
00090             return name;
00091         }
00092     };
00093 
00095     class _OgreGuiElementExport ButtonGuiElementFactory: public GuiElementFactory
00096     {
00097     public:
00099         GuiElement* createGuiElement(const String& instanceName)
00100         {
00101             return new ButtonGuiElement(instanceName);
00102         }
00104         const String& getTypeName(void)
00105         {
00106             static String name = "Button";
00107             return name;
00108         }
00109     };
00110 
00112     class _OgreGuiElementExport ListGuiElementFactory: public GuiElementFactory
00113     {
00114     public:
00116         GuiElement* createGuiElement(const String& instanceName)
00117         {
00118             return new ListGuiElement(instanceName);
00119         }
00121         const String& getTypeName(void)
00122         {
00123             static String name = "List";
00124             return name;
00125         }
00126     };
00127 
00128 
00129 }
00130 
00131 
00132 #endif
00133 

Copyright © 2002 by The OGRE Team