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

OgreBorderButtonGuiElement.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 #ifndef __BorderButtonGuiElement_H__
00026 #define __BorderButtonGuiElement_H__
00027 
00028 #include "OgreGuiElementPrerequisites.h"
00029 #include "OgreBorderPanelGuiElement.h"
00030 #include "OgreGuiPressable.h"
00031 
00032 namespace Ogre {
00033 
00034     
00054     class _OgreGuiElementExport BorderButtonGuiElement : public BorderPanelGuiElement, public GuiPressable
00055     {
00056     protected:
00057         String mBorderDownMaterialName;
00058         String mBorderUpMaterialName;
00059         String mBorderHiliteDownMaterialName;
00060         String mBorderHiliteUpMaterialName;
00061         String mBorderDisabledMaterialName;
00062 
00063         static String msTypeName;
00064         GuiElement* mInsideObject;
00065         
00066         void changeChild(GuiElement* e, Real add);
00067 
00068     public :
00069         const String& getTypeName(void) const;
00070         void addBaseParameters(void);
00071 
00072         BorderButtonGuiElement(const String& name);
00073         void updateMaterials(bool init = false);
00074         void processEvent(InputEvent* e) ;
00075 
00077         void setBorderDownMaterialName(const String& name);
00079         const String& getBorderDownMaterialName(void) const;
00080 
00082         void setBorderUpMaterialName(const String& name);
00084         const String& getBorderUpMaterialName(void) const;
00085 
00087         void setBorderHiliteDownMaterialName(const String& name);
00089         const String& getBorderHiliteDownMaterialName(void) const;
00090 
00092         void setBorderHiliteUpMaterialName(const String& name);
00094         const String& getBorderHiliteUpMaterialName(void) const;
00095 
00097         void setBorderDisabledMaterialName(const String& name);
00099         const String& getBorderDisabledMaterialName(void) const;
00100 
00101         void setButtonCaption(const String& templateName, const String& name);
00102         String getButtonCaption() const;
00103 
00105         class CmdBorderDownMaterial : public ParamCommand
00106         {
00107         public:
00108             String doGet(const void* target) const;
00109             void doSet(void* target, const String& val);
00110         };
00111 
00113         class CmdBorderUpMaterial : public ParamCommand
00114         {
00115         public:
00116             String doGet(const void* target) const;
00117             void doSet(void* target, const String& val);
00118         };
00119 
00121         class CmdBorderHiliteDownMaterial : public ParamCommand
00122         {
00123         public:
00124             String doGet(const void* target) const;
00125             void doSet(void* target, const String& val);
00126         };
00127 
00129         class CmdBorderHiliteUpMaterial : public ParamCommand
00130         {
00131         public:
00132             String doGet(const void* target) const;
00133             void doSet(void* target, const String& val);
00134         };
00135 
00137         class CmdBorderDisabledMaterial : public ParamCommand
00138         {
00139         public:
00140             String doGet(const void* target) const;
00141             void doSet(void* target, const String& val);
00142         };
00143 
00145         class CmdBorderButtonCaption : public ParamCommand
00146         {
00147         public:
00148             String doGet(const void* target) const;
00149             void doSet(void* target, const String& val);
00150         };
00151 
00152         static CmdBorderDownMaterial msCmdBorderDownMaterial;
00153         static CmdBorderUpMaterial msCmdBorderUpMaterial;
00154         static CmdBorderHiliteDownMaterial msCmdBorderHiliteDownMaterial;
00155         static CmdBorderHiliteUpMaterial msCmdBorderHiliteUpMaterial;
00156         static CmdBorderDisabledMaterial msCmdBorderDisabledMaterial;
00157         static CmdBorderButtonCaption msCmdBorderButtonCaption;
00158     };
00159 }
00160 
00161 
00162 #endif  // __BorderButtonGuiElement_H__

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