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

CEGUIStaticProperties.cpp

Go to the documentation of this file.
00001 /************************************************************************
00002         filename:       CEGUIStaticProperties.cpp
00003         created:        10/7/2004
00004         author:         Paul D Turner
00005         
00006         purpose:        Implements property classes for the Static widget.
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/CEGUIStaticProperties.h"
00027 #include "elements/CEGUIStatic.h"
00028 #include "CEGUIPropertyHelper.h"
00029 
00030 
00031 // Start of CEGUI namespace section
00032 namespace CEGUI
00033 {
00034 
00035 // Start of StaticProperties namespace section
00036 namespace StaticProperties
00037 {
00038 String  FrameEnabled::get(const PropertyReceiver* receiver) const
00039 {
00040         return PropertyHelper::boolToString(static_cast<const Static*>(receiver)->isFrameEnabled());
00041 }
00042 
00043 
00044 void    FrameEnabled::set(PropertyReceiver* receiver, const String& value)
00045 {
00046         static_cast<Static*>(receiver)->setFrameEnabled(PropertyHelper::stringToBool(value));
00047 }
00048 
00049 
00050 String  BackgroundEnabled::get(const PropertyReceiver* receiver) const
00051 {
00052         return PropertyHelper::boolToString(static_cast<const Static*>(receiver)->isBackgroundEnabled());
00053 }
00054 
00055 
00056 void    BackgroundEnabled::set(PropertyReceiver* receiver, const String& value)
00057 {
00058         static_cast<Static*>(receiver)->setBackgroundEnabled(PropertyHelper::stringToBool(value));
00059 }
00060 
00061 
00062 String  FrameColours::get(const PropertyReceiver* receiver) const
00063 {
00064         return PropertyHelper::colourRectToString(static_cast<const Static*>(receiver)->getFrameColours());
00065 }
00066 
00067 
00068 void    FrameColours::set(PropertyReceiver* receiver, const String& value)
00069 {
00070         static_cast<Static*>(receiver)->setFrameColours(PropertyHelper::stringToColourRect(value));
00071 }
00072 
00073 
00074 String  BackgroundColours::get(const PropertyReceiver* receiver) const
00075 {
00076         return PropertyHelper::colourRectToString(static_cast<const Static*>(receiver)->getBackgroundColours());
00077 }
00078 
00079 
00080 void    BackgroundColours::set(PropertyReceiver* receiver, const String& value)
00081 {
00082         static_cast<Static*>(receiver)->setBackgroundColours(PropertyHelper::stringToColourRect(value));
00083 }
00084 
00085 
00086 String  BackgroundImage::get(const PropertyReceiver* receiver) const
00087 {
00088         return PropertyHelper::imageToString(static_cast<const Static*>(receiver)->getBackgroundImage());
00089 }
00090 
00091 
00092 void    BackgroundImage::set(PropertyReceiver* receiver, const String& value)
00093 {
00094         static_cast<Static*>(receiver)->setBackgroundImage(PropertyHelper::stringToImage(value));
00095 }
00096 
00097 
00098 String  TopLeftFrameImage::get(const PropertyReceiver* receiver) const
00099 {
00100         return PropertyHelper::imageToString(static_cast<const Static*>(receiver)->getImageForFrameLocation(TopLeftCorner));
00101 }
00102 
00103 
00104 void    TopLeftFrameImage::set(PropertyReceiver* receiver, const String& value)
00105 {
00106         static_cast<Static*>(receiver)->setImageForFrameLocation(TopLeftCorner, PropertyHelper::stringToImage(value));
00107 }
00108 
00109 
00110 String  TopRightFrameImage::get(const PropertyReceiver* receiver) const
00111 {
00112         return PropertyHelper::imageToString(static_cast<const Static*>(receiver)->getImageForFrameLocation(TopRightCorner));
00113 }
00114 
00115 
00116 void    TopRightFrameImage::set(PropertyReceiver* receiver, const String& value)
00117 {
00118         static_cast<Static*>(receiver)->setImageForFrameLocation(TopRightCorner, PropertyHelper::stringToImage(value));
00119 }
00120 
00121 
00122 String  BottomLeftFrameImage::get(const PropertyReceiver* receiver) const
00123 {
00124         return PropertyHelper::imageToString(static_cast<const Static*>(receiver)->getImageForFrameLocation(BottomLeftCorner));
00125 }
00126 
00127 
00128 void    BottomLeftFrameImage::set(PropertyReceiver* receiver, const String& value)
00129 {
00130         static_cast<Static*>(receiver)->setImageForFrameLocation(BottomLeftCorner, PropertyHelper::stringToImage(value));
00131 }
00132 
00133 
00134 String  BottomRightFrameImage::get(const PropertyReceiver* receiver) const
00135 {
00136         return PropertyHelper::imageToString(static_cast<const Static*>(receiver)->getImageForFrameLocation(BottomRightCorner));
00137 }
00138 
00139 
00140 void    BottomRightFrameImage::set(PropertyReceiver* receiver, const String& value)
00141 {
00142         static_cast<Static*>(receiver)->setImageForFrameLocation(BottomRightCorner, PropertyHelper::stringToImage(value));
00143 }
00144 
00145 
00146 String  LeftFrameImage::get(const PropertyReceiver* receiver) const
00147 {
00148         return PropertyHelper::imageToString(static_cast<const Static*>(receiver)->getImageForFrameLocation(LeftEdge));
00149 }
00150 
00151 
00152 void    LeftFrameImage::set(PropertyReceiver* receiver, const String& value)
00153 {
00154         static_cast<Static*>(receiver)->setImageForFrameLocation(LeftEdge, PropertyHelper::stringToImage(value));
00155 }
00156 
00157 
00158 String  RightFrameImage::get(const PropertyReceiver* receiver) const
00159 {
00160         return PropertyHelper::imageToString(static_cast<const Static*>(receiver)->getImageForFrameLocation(RightEdge));
00161 }
00162 
00163 
00164 void    RightFrameImage::set(PropertyReceiver* receiver, const String& value)
00165 {
00166         static_cast<Static*>(receiver)->setImageForFrameLocation(RightEdge, PropertyHelper::stringToImage(value));
00167 }
00168 
00169 
00170 String  TopFrameImage::get(const PropertyReceiver* receiver) const
00171 {
00172         return PropertyHelper::imageToString(static_cast<const Static*>(receiver)->getImageForFrameLocation(TopEdge));
00173 }
00174 
00175 
00176 void    TopFrameImage::set(PropertyReceiver* receiver, const String& value)
00177 {
00178         static_cast<Static*>(receiver)->setImageForFrameLocation(TopEdge, PropertyHelper::stringToImage(value));
00179 }
00180 
00181 
00182 String  BottomFrameImage::get(const PropertyReceiver* receiver) const
00183 {
00184         return PropertyHelper::imageToString(static_cast<const Static*>(receiver)->getImageForFrameLocation(BottomEdge));
00185 }
00186 
00187 
00188 void    BottomFrameImage::set(PropertyReceiver* receiver, const String& value)
00189 {
00190         static_cast<Static*>(receiver)->setImageForFrameLocation(BottomEdge, PropertyHelper::stringToImage(value));
00191 }
00192 
00193 } // End of  StaticProperties namespace section
00194 
00195 } // End of  CEGUI namespace section

Generated on Wed Feb 16 12:41:07 2005 for Crazy Eddies GUI System by  doxygen 1.3.9.1