1 | /************************************************************************
|
---|
2 | filename: CEGUIPropertyHelper.h
|
---|
3 | created: 6/7/2004
|
---|
4 | author: Paul D Turner
|
---|
5 |
|
---|
6 | purpose: Interface to the PropertyHelper class
|
---|
7 | *************************************************************************/
|
---|
8 | /*************************************************************************
|
---|
9 | Crazy Eddie's GUI System (http://www.cegui.org.uk)
|
---|
10 | Copyright (C)2004 - 2005 Paul D Turner (paul@cegui.org.uk)
|
---|
11 |
|
---|
12 | This library is free software; you can redistribute it and/or
|
---|
13 | modify it under the terms of the GNU Lesser General Public
|
---|
14 | License as published by the Free Software Foundation; either
|
---|
15 | version 2.1 of the License, or (at your option) any later version.
|
---|
16 |
|
---|
17 | This library is distributed in the hope that it will be useful,
|
---|
18 | but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
19 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
20 | Lesser General Public License for more details.
|
---|
21 |
|
---|
22 | You should have received a copy of the GNU Lesser General Public
|
---|
23 | License along with this library; if not, write to the Free Software
|
---|
24 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
---|
25 | *************************************************************************/
|
---|
26 | #ifndef _CEGUIPropertyHelper_h_
|
---|
27 | #define _CEGUIPropertyHelper_h_
|
---|
28 |
|
---|
29 | #include "CEGUIWindow.h"
|
---|
30 |
|
---|
31 |
|
---|
32 | // Start of CEGUI namespace section
|
---|
33 | namespace CEGUI
|
---|
34 | {
|
---|
35 | /*!
|
---|
36 | \brief
|
---|
37 | Helper class used to convert various data types to and from the format expected in Propery strings
|
---|
38 | */
|
---|
39 | class CEGUIEXPORT PropertyHelper
|
---|
40 | {
|
---|
41 | public:
|
---|
42 | static float stringToFloat(const String& str);
|
---|
43 | static uint stringToUint(const String& str);
|
---|
44 | static int stringToInt(const String& str);
|
---|
45 | static bool stringToBool(const String& str);
|
---|
46 | static Size stringToSize(const String& str);
|
---|
47 | static Point stringToPoint(const String& str);
|
---|
48 | static Rect stringToRect(const String& str);
|
---|
49 | static MetricsMode stringToMetricsMode(const String& str);
|
---|
50 | static const Image* stringToImage(const String& str);
|
---|
51 | static colour stringToColour(const String& str);
|
---|
52 | static ColourRect stringToColourRect(const String& str);
|
---|
53 | static UDim stringToUDim(const String& str);
|
---|
54 | static UVector2 stringToUVector2(const String& str);
|
---|
55 | static URect stringToURect(const String& str);
|
---|
56 |
|
---|
57 | static String floatToString(float val);
|
---|
58 | static String uintToString(uint val);
|
---|
59 | static String intToString(int val);
|
---|
60 | static String boolToString(bool val);
|
---|
61 | static String sizeToString(const Size& val);
|
---|
62 | static String pointToString(const Point& val);
|
---|
63 | static String rectToString(const Rect& val);
|
---|
64 | static String metricsModeToString(MetricsMode val);
|
---|
65 | static String imageToString(const Image* const val);
|
---|
66 | static String colourToString(const colour& val);
|
---|
67 | static String colourRectToString(const ColourRect& val);
|
---|
68 | static String udimToString(const UDim& val);
|
---|
69 | static String uvector2ToString(const UVector2& val);
|
---|
70 | static String urectToString(const URect& val);
|
---|
71 | };
|
---|
72 |
|
---|
73 | } // End of CEGUI namespace section
|
---|
74 |
|
---|
75 |
|
---|
76 | #endif // end of guard _CEGUIPropertyHelper_h_
|
---|