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://www.ogre3d.org/
    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 "OgreCursorGuiElement.h"
    00032 #include "OgrePanelGuiElement.h"
    00033 #include "OgreBorderPanelGuiElement.h"
    00034 #include "OgreButtonGuiElement.h"
    00035 #include "OgreBorderButtonGuiElement.h"
    00036 #include "OgreListGuiElement.h"
    00037 #include "OgrePopupMenuGuiElement.h"
    00038 #include "OgreTextAreaGuiElement.h"
    00039 #include "OgreTextBoxGuiElement.h"
    00040 #include "OgreTTYGuiElement.h"
    00041
    00042
    00043 // This file includes definitions for all the GuiElement factories provided with OGRE
    00044 // These classes are exported incase anyone wants to extend them
    00045
    00046 namespace Ogre {
    00047
    00049     class _OgreGuiElementExport CursorGuiElementFactory: public GuiElementFactory
    00050     {
    00051     public:
    00053         GuiElement* createGuiElement(const String& instanceName)
    00054         {
    00055             return new CursorGuiElement(instanceName);
    00056         }
    00058         const String& getTypeName(void) const
    00059         {
    00060             static String name = "Cursor";
    00061             return name;
    00062         }
    00063     };
    00064
    00066     class _OgreGuiElementExport PanelGuiElementFactory: public GuiElementFactory
    00067     {
    00068     public:
    00070         GuiElement* createGuiElement(const String& instanceName)
    00071         {
    00072             return new PanelGuiElement(instanceName);
    00073         }
    00075         const String& getTypeName(void) const
    00076         {
    00077             static String name = "Panel";
    00078             return name;
    00079         }
    00080     };
    00081
    00083     class _OgreGuiElementExport BorderPanelGuiElementFactory: public GuiElementFactory
    00084     {
    00085     public:
    00087         GuiElement* createGuiElement(const String& instanceName)
    00088         {
    00089             return new BorderPanelGuiElement(instanceName);
    00090         }
    00092         const String& getTypeName(void) const
    00093         {
    00094             static String name = "BorderPanel";
    00095             return name;
    00096         }
    00097     };
    00098
    00100     class _OgreGuiElementExport TextAreaGuiElementFactory: public GuiElementFactory
    00101     {
    00102     public:
    00104         GuiElement* createGuiElement(const String& instanceName)
    00105         {
    00106             return new TextAreaGuiElement(instanceName);
    00107         }
    00109         const String& getTypeName(void) const
    00110         {
    00111             static String name = "TextArea";
    00112             return name;
    00113         }
    00114     };
    00115
    00117     class _OgreGuiElementExport TextBoxGuiElementFactory: public GuiElementFactory
    00118     {
    00119     public:
    00121         GuiElement* createGuiElement(const String& instanceName)
    00122         {
    00123             return new TextBoxGuiElement(instanceName);
    00124         }
    00126         const String& getTypeName(void) const
    00127         {
    00128             static String name = "TextBox";
    00129             return name;
    00130         }
    00131     };
    00132
    00133
    00135     class _OgreGuiElementExport ButtonGuiElementFactory: public GuiElementFactory
    00136     {
    00137     public:
    00139         GuiElement* createGuiElement(const String& instanceName)
    00140         {
    00141             return new ButtonGuiElement(instanceName);
    00142         }
    00144         const String& getTypeName(void) const
    00145         {
    00146             static String name = "Button";
    00147             return name;
    00148         }
    00149     };
    00150
    00152     class _OgreGuiElementExport BorderButtonGuiElementFactory: public GuiElementFactory
    00153     {
    00154     public:
    00156         GuiElement* createGuiElement(const String& instanceName)
    00157         {
    00158             return new BorderButtonGuiElement(instanceName);
    00159         }
    00161         const String& getTypeName(void) const
    00162         {
    00163             static String name = "BorderButton";
    00164             return name;
    00165         }
    00166     };
    00167
    00169     class _OgreGuiElementExport ListGuiElementFactory: public GuiElementFactory
    00170     {
    00171     public:
    00173         GuiElement* createGuiElement(const String& instanceName)
    00174         {
    00175             return new ListGuiElement(instanceName);
    00176         }
    00178         const String& getTypeName(void) const
    00179         {
    00180             static String name = "List";
    00181             return name;
    00182         }
    00183     };
    00184
    00185
    00187     class _OgreGuiElementExport ScrollBarGuiElementFactory: public GuiElementFactory
    00188     {
    00189     public:
    00191         GuiElement* createGuiElement(const String& instanceName)
    00192         {
    00193             return new ScrollBarGuiElement(instanceName);
    00194         }
    00196         const String& getTypeName(void) const
    00197         {
    00198             static String name = "ScrollBar";
    00199             return name;
    00200         }
    00201     };
    00203     class _OgreGuiElementExport PopupMenuGuiElementFactory: public GuiElementFactory
    00204     {
    00205     public:
    00207         GuiElement* createGuiElement(const String& instanceName)
    00208         {
    00209             return new PopupMenuGuiElement(instanceName);
    00210         }
    00212         const String& getTypeName(void) const
    00213         {
    00214             static String name = "PopupMenu";
    00215             return name;
    00216         }
    00217     };
    00219     class _OgreGuiElementExport TTYGuiElementFactory: public GuiElementFactory
    00220     {
    00221     public:
    00223         GuiElement* createGuiElement(const String& instanceName)
    00224         {
    00225             return new TTYGuiElement(instanceName);
    00226         }
    00228         const String& getTypeName(void) const
    00229         {
    00230             static String name = "TTY";
    00231             return name;
    00232         }
    00233     };
    00234
    00235 }
    00236
    00237
    00238 #endif
    00239

Copyright © 2002-2003 by The OGRE Team
Last modified Sun Nov 28 19:48:28 2004