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 bool stringToBool(const String& str);
|
---|
45 | static Size stringToSize(const String& str);
|
---|
46 | static Point stringToPoint(const String& str);
|
---|
47 | static Rect stringToRect(const String& str);
|
---|
48 | static MetricsMode stringToMetricsMode(const String& str);
|
---|
49 | static const Image* stringToImage(const String& str);
|
---|
50 | static colour stringToColour(const String& str);
|
---|
51 | static ColourRect stringToColourRect(const String& str);
|
---|
52 |
|
---|
53 | static String floatToString(float val);
|
---|
54 | static String uintToString(uint val);
|
---|
55 | static String boolToString(bool val);
|
---|
56 | static String sizeToString(const Size& val);
|
---|
57 | static String pointToString(const Point& val);
|
---|
58 | static String rectToString(const Rect& val);
|
---|
59 | static String metricsModeToString(MetricsMode val);
|
---|
60 | static String imageToString(const Image* const val);
|
---|
61 | static String colourToString(const colour& val);
|
---|
62 | static String colourRectToString(const ColourRect& val);
|
---|
63 | };
|
---|
64 |
|
---|
65 | } // End of CEGUI namespace section
|
---|
66 |
|
---|
67 |
|
---|
68 | #endif // end of guard _CEGUIPropertyHelper_h_
|
---|