String.h

Go to the documentation of this file.
00001 
00002 //
00003 // SFML - Simple and Fast Multimedia Library
00004 // Copyright (C) 2007-2008 Laurent Gomila (laurent.gom@gmail.com)
00005 //
00006 // This software is provided 'as-is', without any express or implied warranty.
00007 // In no event will the authors be held liable for any damages arising from the use of this software.
00008 //
00009 // Permission is granted to anyone to use this software for any purpose,
00010 // including commercial applications, and to alter it and redistribute it freely,
00011 // subject to the following restrictions:
00012 //
00013 // 1. The origin of this software must not be misrepresented;
00014 //    you must not claim that you wrote the original software.
00015 //    If you use this software in a product, an acknowledgment
00016 //    in the product documentation would be appreciated but is not required.
00017 //
00018 // 2. Altered source versions must be plainly marked as such,
00019 //    and must not be misrepresented as being the original software.
00020 //
00021 // 3. This notice may not be removed or altered from any source distribution.
00022 //
00024 
00025 #ifndef SFML_STRING_H
00026 #define SFML_STRING_H
00027 
00029 // Headers
00031 #include <SFML/Config.h>
00032 #include <SFML/Graphics/BlendMode.h>
00033 #include <SFML/Graphics/Color.h>
00034 #include <SFML/Graphics/Font.h>
00035 #include <SFML/Graphics/Rect.h>
00036 
00037 
00041 typedef struct sfString sfString;
00042 
00043 
00047 typedef enum
00048 {
00049     sfStringRegular    = 0,      
00050     sfStringBold       = 1 << 0, 
00051     sfStringItalic     = 1 << 1, 
00052     sfStringUnderlined = 1 << 2  
00053 } sfStringStyle;
00054 
00055 
00062 CSFML_API sfString* sfString_Create();
00063 
00070 CSFML_API void sfString_Destroy(sfString* String);
00071 
00079 CSFML_API void sfString_SetX(sfString* String, float X);
00080 
00088 CSFML_API void sfString_SetY(sfString* String, float Y);
00089 
00098 CSFML_API void sfString_SetPosition(sfString* String, float Left, float Top);
00099 
00107 CSFML_API void sfString_SetScaleX(sfString* String, float Scale);
00108 
00116 CSFML_API void sfString_SetScaleY(sfString* String, float Scale);
00117 
00126 CSFML_API void sfString_SetScale(sfString* String, float ScaleX, float ScaleY);
00127 
00135 CSFML_API void sfString_SetRotation(sfString* String, float Rotation);
00136 
00146 CSFML_API void sfString_SetCenter(sfString* String, float X, float Y);
00147 
00155 CSFML_API void sfString_SetColor(sfString* String, sfColor Color);
00156 
00164 CSFML_API void sfString_SetBlendMode(sfString* String, sfBlendMode Mode);
00165 
00174 CSFML_API float sfString_GetX(sfString* String);
00175 
00184 CSFML_API float sfString_GetY(sfString* String);
00185 
00194 CSFML_API float sfString_GetScaleX(sfString* String);
00195 
00204 CSFML_API float sfString_GetScaleY(sfString* String);
00205 
00214 CSFML_API float sfString_GetRotation(sfString* String);
00215 
00224 CSFML_API float sfString_GetCenterX(sfString* String);
00225 
00234 CSFML_API float sfString_GetCenterY(sfString* String);
00235 
00244 CSFML_API sfColor sfString_GetColor(sfString* String);
00245 
00254 CSFML_API sfBlendMode sfString_GetBlendMode(sfString* String);
00255 
00264 CSFML_API void sfString_Move(sfString* String, float OffsetX, float OffsetY);
00265 
00274 CSFML_API void sfString_Scale(sfString* String, float FactorX, float FactorY);
00275 
00283 CSFML_API void sfString_Rotate(sfString* String, float Angle);
00284 
00296 CSFML_API void sfString_TransformToLocal(sfString* String, float PointX, float PointY, float* X, float* Y);
00297 
00309 CSFML_API void sfString_TransformToGlobal(sfString* String, float PointX, float PointY, float* X, float* Y);
00310 
00318 CSFML_API void sfString_SetText(sfString* String, const char* Text);
00319 
00327 CSFML_API void sfString_SetUnicodeText(sfString* String, const sfUint32* Text);
00328 
00336 CSFML_API void sfString_SetFont(sfString* String, sfFont* Font);
00337 
00345 CSFML_API void sfString_SetSize(sfString* String, float Size);
00346 
00354 CSFML_API void sfString_SetStyle(sfString* String, unsigned long Style);
00355 
00364 CSFML_API const sfUint32* sfString_GetUnicodeText(sfString* String);
00365 
00374 CSFML_API const char* sfString_GetText(sfString* String);
00375 
00384 CSFML_API sfFont* sfString_GetFont(sfString* String);
00385 
00394 CSFML_API float sfString_GetSize(sfString* String);
00395 
00404 CSFML_API unsigned long sfString_GetStyle(sfString* String);
00405 
00417 CSFML_API void sfString_GetCharacterPos(sfString* String, size_t Index, float* X, float* Y);
00418 
00427 CSFML_API sfFloatRect* sfString_GetRect(sfString* String);
00428 
00429 
00430 #endif // SFML_STRING_H