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

OgrePanelGuiElement.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 __PanelGuiElement_H__
00027 #define __PanelGuiElement_H__
00028 
00029 #include "OgreGuiElementPrerequisites.h"
00030 #include "OgreGuiContainer.h"
00031 
00032 namespace Ogre {
00033 
00034 
00050     class _OgreGuiElementExport PanelGuiElement : public GuiContainer
00051     {
00052     public:
00054         PanelGuiElement(const String& name);
00055         virtual ~PanelGuiElement();
00056 
00058         virtual void initialise(void);
00059 
00066         void setTiling(Real x, Real y, ushort layer = 0);
00067 
00068         Real getTileX(ushort layer = 0) const;
00073         Real getTileY(ushort layer = 0) const;
00074 
00078         void setTransparent(bool isTransparent);
00079 
00081         bool isTransparent(void) const;
00082 
00084         virtual const String& getTypeName(void) const;
00086         void getRenderOperation(RenderOperation& op);
00088         void setMaterialName(const String& matName);
00090         void _updateRenderQueue(RenderQueue* queue);
00091 
00092 
00094         class CmdTiling : public ParamCommand
00095         {
00096         public:
00097             String doGet(const void* target) const;
00098             void doSet(void* target, const String& val);
00099         };
00101         class CmdTransparent : public ParamCommand
00102         {
00103         public:
00104             String doGet(const void* target) const;
00105             void doSet(void* target, const String& val);
00106         };
00107     protected:
00108         // Flag indicating if this panel should be visual or just group things
00109         bool mTransparent;
00110         // Texture tiling
00111         Real mTileX[OGRE_MAX_TEXTURE_LAYERS];
00112         Real mTileY[OGRE_MAX_TEXTURE_LAYERS];
00113         size_t mNumTexCoordsInBuffer;
00114 
00115         RenderOperation mRenderOp;
00116 
00118         virtual void updatePositionGeometry(void);
00119 
00121         virtual void updateTextureGeometry(void);
00122 
00124         void addBaseParameters(void);
00125 
00126 
00127         static String msTypeName;
00128 
00129 
00130         // Command objects
00131         static CmdTiling msCmdTiling;
00132         static CmdTransparent msCmdTransparent;
00133 
00134         
00135 
00136     };
00137 
00138 
00139 }
00140 
00141 #endif

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