00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #include "elements/CEGUIStaticProperties.h"
00027 #include "elements/CEGUIStatic.h"
00028 #include "CEGUIPropertyHelper.h"
00029
00030
00031
00032 namespace CEGUI
00033 {
00034
00035
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 }
00194
00195 }