Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CEGUIButtonBaseProperties.cpp

Go to the documentation of this file.
00001 /************************************************************************
00002         filename:       CEGUIButtonBaseProperties.cpp
00003         created:        9/7/2004
00004         author:         Paul D Turner
00005         
00006         purpose:        Implements properties for button base class
00007 *************************************************************************/
00008 /*************************************************************************
00009     Crazy Eddie's GUI System (http://www.cegui.org.uk)
00010     Copyright (C)2004 - 2005 Paul D Turner (paul@cegui.org.uk)
00011 
00012     This library is free software; you can redistribute it and/or
00013     modify it under the terms of the GNU Lesser General Public
00014     License as published by the Free Software Foundation; either
00015     version 2.1 of the License, or (at your option) any later version.
00016 
00017     This library is distributed in the hope that it will be useful,
00018     but WITHOUT ANY WARRANTY; without even the implied warranty of
00019     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00020     Lesser General Public License for more details.
00021 
00022     You should have received a copy of the GNU Lesser General Public
00023     License along with this library; if not, write to the Free Software
00024     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00025 *************************************************************************/
00026 #include "elements/CEGUIButtonBaseProperties.h"
00027 #include "elements/CEGUIButtonBase.h"
00028 #include "CEGUIPropertyHelper.h"
00029 #include "CEGUIExceptions.h"
00030 #include <cstdlib>
00031 #include <cstdio>
00032 
00033 
00034 // Start of CEGUI namespace section
00035 namespace CEGUI
00036 {
00037 // Start of ButtonBaseProperties namespace section
00038 namespace ButtonBaseProperties
00039 {
00040 
00041 String NormalTextColour::get(const PropertyReceiver* receiver) const
00042 {
00043         return PropertyHelper::colourToString(static_cast<const ButtonBase*>(receiver)->getNormalTextColour());
00044 }
00045 
00046 
00047 void NormalTextColour::set(PropertyReceiver* receiver, const String& value)
00048 {
00049         static_cast<ButtonBase*>(receiver)->setNormalTextColour(PropertyHelper::stringToColour(value));
00050 }
00051 
00052 
00053 String  HoverTextColour::get(const PropertyReceiver* receiver) const
00054 {
00055         return PropertyHelper::colourToString(static_cast<const ButtonBase*>(receiver)->getHoverTextColour());
00056 }
00057 
00058 
00059 void    HoverTextColour::set(PropertyReceiver* receiver, const String& value)
00060 {
00061         static_cast<ButtonBase*>(receiver)->setHoverTextColour(PropertyHelper::stringToColour(value));
00062 }
00063 
00064 
00065 String  PushedTextColour::get(const PropertyReceiver* receiver) const
00066 {
00067         return PropertyHelper::colourToString(static_cast<const ButtonBase*>(receiver)->getPushedTextColour());
00068 }
00069 
00070 
00071 void    PushedTextColour::set(PropertyReceiver* receiver, const String& value)
00072 {
00073         static_cast<ButtonBase*>(receiver)->setPushedTextColour(PropertyHelper::stringToColour(value));
00074 }
00075 
00076 
00077 String DisabledTextColour::get(const PropertyReceiver* receiver) const
00078 {
00079         return PropertyHelper::colourToString(static_cast<const ButtonBase*>(receiver)->getDisabledTextColour());
00080 }
00081 
00082 
00083 void DisabledTextColour::set(PropertyReceiver* receiver, const String& value)
00084 {
00085         static_cast<ButtonBase*>(receiver)->setDisabledTextColour(PropertyHelper::stringToColour(value));
00086 }
00087 
00088 
00089 } // End of  ButtonBaseProperties namespace section
00090 
00091 } // End of  CEGUI namespace section

Generated on Wed Sep 7 09:56:30 2005 for Crazy Eddies GUI System by  doxygen 1.4.3