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

OgreTextBoxGuiElement.h

Go to the documentation of this file.
00001 /*-------------------------------------------------------------------------
00002 This source file is a part of OGRE
00003 (Object-oriented Graphics Rendering Engine)
00004 
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 library is free software; you can redistribute it and/or modify it
00011 under the terms of the GNU Lesser General Public License (LGPL) as 
00012 published by the Free Software Foundation; either version 2.1 of the 
00013 License, or (at your option) any later version.
00014 
00015 This library is distributed in the hope that it will be useful, but 
00016 WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
00017 or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public 
00018 License for more details.
00019 
00020 You should have received a copy of the GNU Lesser General Public License 
00021 along with this library; if not, write to the Free Software Foundation, 
00022 Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA or go to
00023 http://www.gnu.org/copyleft/lesser.txt
00024 -------------------------------------------------------------------------*/
00025 
00026 #ifndef _TextBoxGuiElement_H__
00027 #define _TextBoxGuiElement_H__
00028 
00029 #include "OgrePrerequisites.h"
00030 #include "OgreTextAreaGuiElement.h"
00031 #include "OgrePanelGuiElement.h"
00032 
00033 namespace Ogre
00034 {
00050     class _OgreGuiElementExport TextBoxGuiElement : public PanelGuiElement
00051     {
00052     public:
00054         TextBoxGuiElement(const String& name);
00055         ~TextBoxGuiElement();
00056 
00057 
00059         const String& getTypeName(void) const;
00060 
00061         // inherited
00062         void setCaption(const String& text);
00063         const String& getCaption(void) const;
00064 
00065         void addBaseParameters(void);
00066 
00067         inline bool isKeyEnabled() const
00068         { return true; }
00069         
00070         void processEvent(InputEvent* e) ;
00071 
00073         class CmdBackPanel : public ParamCommand
00074         {
00075         public:
00076             String doGet(const void* target) const;
00077             void doSet(void* target, const String& val);
00078         };
00080         class CmdTextArea : public ParamCommand
00081         {
00082         public:
00083             String doGet(const void* target) const;
00084             void doSet(void* target, const String& val);
00085         };
00086     void setBackPanel(const String& templateName, int size);
00087     void setTextArea(const String& templateName, const String& name);
00088     String getBackPanelName() const;
00089     String getTextAreaName() const;
00090 
00091     protected:
00092 
00093         void setCaptionToTextArea() ;
00094 
00095         GuiContainer* mBackPanel;
00096         TextAreaGuiElement* mTextArea;
00097         String mTextAreaTemplateName;
00098         String mBackPanelTemplateName;
00099         static String msTypeName;
00100         static CmdBackPanel msCmdBackPanel;
00101         static CmdTextArea msCmdTextArea;
00102         int mTextAreaSize;
00103     };
00104 }
00105 
00106 #endif
00107 

Copyright © 2002-2003 by The OGRE Team
Last modified Wed Jan 21 00:10:30 2004