<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://cegui.org/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Makofierce</id>
		<title>CEGUI Wiki - Crazy Eddie's GUI System (Open Source) - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://cegui.org/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Makofierce"/>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/Special:Contributions/Makofierce"/>
		<updated>2026-04-17T18:14:54Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.24.1</generator>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=Cool_window_effects&amp;diff=3612</id>
		<title>Cool window effects</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=Cool_window_effects&amp;diff=3612"/>
				<updated>2011-01-07T09:56:02Z</updated>
		
		<summary type="html">&lt;p&gt;Makofierce: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Inactive windows become transparent =&lt;br /&gt;
'''WARNING ! As for now (02.07.2007), this code does make all your tooltips transparent, I'm working on a solution.'''&lt;br /&gt;
&lt;br /&gt;
'''Problem solved (02.07.2007). If you used the old code, please replace by the new.'''&lt;br /&gt;
&lt;br /&gt;
Please discuss this snippet within the [[http://www.cegui.org.uk/phpBB2/viewtopic.php?p=11786 cool window effects - Inactive windows become trans.]] thread. &lt;br /&gt;
&lt;br /&gt;
Do you know about the [http://vizzzion.org/images/blog/composite.png cool effects that the composite extension can create] on linux ? There are many. I wanted to implement one into my game: make the [http://img337.imageshack.us/img337/9398/windowtransparencyue1.png inactive windows become transparent] and only the active one be 100% opaque. (see the links in this sentence for screenshots.) This effect can be interesting if you want your users to concentrate 100% on the active window and the inactive ones aren't important at this moment. But what if the user has to see two windows or more at the same time (and with full opacity) ? We'll see how to handle this.&lt;br /&gt;
&lt;br /&gt;
== The theory ==&lt;br /&gt;
There is more then one way to achieve this, but I'll only present the one I chose. CEGUI has something that is called global events. These are events that are fired independently on the widget they apply to. I'll try with an example: sometimes you need to know when a button is clicked, no matter what button it is, you want to know it for EVERY button. This is what global events are for.&lt;br /&gt;
&lt;br /&gt;
We'll subscribe to two global events: &amp;quot;a window gets activated&amp;quot; and &amp;quot;a window gets closed&amp;quot;. When a window gets activated, we add it to a stack which we use to keep track of the windows and the order they where activated. We also make the last active window become transparent. When a window gets closed, we remove it from the stack and activate the one that is on the top of the stack now. (that is the window that was active just before the one we just closed.)&lt;br /&gt;
&lt;br /&gt;
We keep the root window away from it, that means we never make the root window transparent, because this would make the tooltips become transparent. You need to have an empty root window that is a container for your other windows.&lt;br /&gt;
&lt;br /&gt;
== The praxis (code) ==&lt;br /&gt;
Now let's go ! First, we need to register callback functions to the two global events:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
CEGUI::GlobalEventSet::getSingleton( ).subscribeEvent( CEGUI::Window::EventNamespace + &amp;quot;/&amp;quot; + CEGUI::Window::EventActivated,&lt;br /&gt;
                                                       CEGUI::Event::Subscriber(&amp;amp;onWindowActivated) );&lt;br /&gt;
CEGUI::GlobalEventSet::getSingleton( ).subscribeEvent( CEGUI::Window::EventNamespace + &amp;quot;/&amp;quot; + CEGUI::Window::EventDestructionStarted,&lt;br /&gt;
                                                       CEGUI::Event::Subscriber(&amp;amp;onWindowClosed) );&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We also need a stack to keep track of the windows. I chose to use the std::list type instead of the std::stack, because we need to be able to either delete all references of one element or to search the stack. So here it is:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;std::list&amp;lt;CEGUI::Window *&amp;gt; pWinHistory;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also, don't forget to put your root window just before setting it as the root window:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;pWinHistory.push_back(pMyRootWindow);&lt;br /&gt;
CEGUI::System::getSingleton().setGUISheet(pMyRootWindow);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
One thing you need to know about the root window is that you need an empty root window, containing one or more child windows that contain all GUI items. Your root window will never become transparent, thus you need an empty &amp;quot;container&amp;quot; root window.&lt;br /&gt;
&lt;br /&gt;
And now we implement our two callback functions. I excessively commented the functions.&lt;br /&gt;
&lt;br /&gt;
onWindowActivated:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;/// Called everytime a window gets activated.&lt;br /&gt;
/** This function is called by CEGUI every time that a window gets the focus.&lt;br /&gt;
 *&lt;br /&gt;
 *  Currently, we use this function to keep track of the order that windows where&lt;br /&gt;
 *  active, so when closing a window we can activate the last one, as this isn't&lt;br /&gt;
 *  done automatically by CEGUI.&lt;br /&gt;
 *&lt;br /&gt;
 * \param e The event arguments.&lt;br /&gt;
 *&lt;br /&gt;
 * \return Always true.&lt;br /&gt;
 *&lt;br /&gt;
 * \author Pompei2&lt;br /&gt;
 */&lt;br /&gt;
bool onWindowActivated( const CEGUI::EventArgs &amp;amp;ea )&lt;br /&gt;
{&lt;br /&gt;
	try {&lt;br /&gt;
		const CEGUI::WindowEventArgs&amp;amp; we = static_cast&amp;lt;const CEGUI::WindowEventArgs&amp;amp;&amp;gt;(ea);&lt;br /&gt;
		CEGUI::Window *pLastWin = pWinHistory.back( );&lt;br /&gt;
&lt;br /&gt;
		// We only work with FrameWindows.&lt;br /&gt;
		if( !we.window-&amp;gt;testClassName( CEGUI::FrameWindow::EventNamespace ) )&lt;br /&gt;
			return true;&lt;br /&gt;
&lt;br /&gt;
		// If it is the same window as before, ignore it.&lt;br /&gt;
		if( pLastWin == we.window )&lt;br /&gt;
			return true;&lt;br /&gt;
&lt;br /&gt;
		if( pLastWin != CEGUI::System::getSingleton().getGUISheet() ) {&lt;br /&gt;
			// If every time a window gets activated we make the last active window become&lt;br /&gt;
			// transparent, this will result in all inactive windows being transparent.&lt;br /&gt;
			pLastWin-&amp;gt;setProperty( &amp;quot;Alpha&amp;quot;, &amp;quot;0.25&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
			// But we never make the root window transparent, as this would make all tooltips&lt;br /&gt;
			// become transparent, and we don't want this !&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// We need the active window to not inherit the transparence of its parents.&lt;br /&gt;
		we.window-&amp;gt;setProperty( &amp;quot;InheritsAlpha&amp;quot;, &amp;quot;false&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
		// Finally, we add the new window to the stack.&lt;br /&gt;
&lt;br /&gt;
		// One could also check if it's already present in the stack and if yes, just put it on the top.&lt;br /&gt;
		// You would have to do this if you want to set the transparency depending on the window's position&lt;br /&gt;
		// in the stack (see &amp;quot;Extending the effect&amp;quot;).&lt;br /&gt;
		pWinHistory.push_back( we.window );&lt;br /&gt;
 	} catch( CEGUI::Exception&amp;amp; e ) {&lt;br /&gt;
		fprintf( stderr, &amp;quot;CEGUI error: %s\n&amp;quot;, e.getMessage( ).c_str( ) );&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	return true;&lt;br /&gt;
}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And onWindowClosed:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;/// Called everytime a window gets closed.&lt;br /&gt;
/** This function is called by CEGUI just before a window gets closed.&lt;br /&gt;
 *&lt;br /&gt;
 *  Currently, we use this function to activate the previous window&lt;br /&gt;
 *  when closing this one, as it's not done automatically by CEGUI.&lt;br /&gt;
 *&lt;br /&gt;
 * \param e The event arguments.&lt;br /&gt;
 *&lt;br /&gt;
 * \return Always true.&lt;br /&gt;
 *&lt;br /&gt;
 * \author Pompei2&lt;br /&gt;
 */&lt;br /&gt;
bool onWindowClosed( const CEGUI::EventArgs &amp;amp;ea )&lt;br /&gt;
{&lt;br /&gt;
	try {&lt;br /&gt;
		const CEGUI::WindowEventArgs&amp;amp; we = static_cast&amp;lt;const CEGUI::WindowEventArgs&amp;amp;&amp;gt;(ea);&lt;br /&gt;
		CEGUI::Window *pLastWin = NULL;&lt;br /&gt;
&lt;br /&gt;
		// We only work with FrameWindows.&lt;br /&gt;
		if( !we.window-&amp;gt;testClassName( CEGUI::FrameWindow::EventNamespace ) )&lt;br /&gt;
			return true;&lt;br /&gt;
&lt;br /&gt;
		// Delete the current window from the stack.&lt;br /&gt;
		// CARE: std::list::remove removes ALL occurences of we.window from the stack !&lt;br /&gt;
		// This is VERY important to know, as if you activate window A, then window B and then A again,&lt;br /&gt;
		// the stack will contain A twice: {A,B,A}.&lt;br /&gt;
		pWinHistory.remove( we.window );&lt;br /&gt;
&lt;br /&gt;
		// Now we get the window that was active before the current one:&lt;br /&gt;
		pLastWin = m_pWinHistory.back( );&lt;br /&gt;
&lt;br /&gt;
		// re-activate it (like windos, linux, .. all do).&lt;br /&gt;
		pLastWin-&amp;gt;activate( );&lt;br /&gt;
&lt;br /&gt;
		// And set it to be opaque again.&lt;br /&gt;
		// You could either do this here or you do this in the onWindowActivate function, the result is the same,&lt;br /&gt;
		// as the call to CEGUI::Window::activate above results in onWindowActivate to be called.&lt;br /&gt;
		pLastWin-&amp;gt;setProperty( &amp;quot;Alpha&amp;quot;, &amp;quot;1.0&amp;quot; );&lt;br /&gt;
	} catch( CEGUI::Exception&amp;amp; e ) {&lt;br /&gt;
		fprintf( stderr, &amp;quot;CEGUI error: %s\n&amp;quot;, e.getMessage( ).c_str( ) );&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	return true;&lt;br /&gt;
}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That's all.&lt;br /&gt;
&lt;br /&gt;
One important thing you might not know yet, is that CEGUI DOESN'T activate a window that gets shown. you have to manually activate a window when you create it (and want it to be active, of course).&lt;br /&gt;
&lt;br /&gt;
== Extending the effect ==&lt;br /&gt;
* You could also automatically activate a window as soon as it's shown. for this you could subscribe to the &amp;quot;a window gets shown&amp;quot; global event and then just call ea.window-&amp;gt;activate( );&lt;br /&gt;
Edit: Hmm I tried this one but wasn't able to get it to work. If someone has success, please tell us how you did it in the forums.&lt;br /&gt;
&lt;br /&gt;
* You could try to make the window's transparency degree dependent on its position in the stack. That means the most recent windows get less transparent while the &amp;quot;oldest&amp;quot; windows get very transparent. To do this, just loop trough the stack - that would be a list - and set every window's transparency accordingly. Do this when a window gets active AND when a window gets closed. You would also need to never have the same window twice in the stack, as it would screw your results up.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[User:Pompei2|Pompei2]] 06:00, 6 May 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
----&lt;br /&gt;
you can add more cool effects here.&lt;/div&gt;</summary>
		<author><name>Makofierce</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=Formatted_Numeric_Data&amp;diff=3611</id>
		<title>Formatted Numeric Data</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=Formatted_Numeric_Data&amp;diff=3611"/>
				<updated>2011-01-07T09:54:26Z</updated>
		
		<summary type="html">&lt;p&gt;Makofierce: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;International Components for Unicode (ICU) is a toolkit to internationalise applications.  Initially developed for Java it has been ported to C/C++.  There is a Java version of ICU called ICU4J, and there is a C/C++ version of ICU called ICU4C. Now ICU4C has been partially ported to CEGUI.  Please use this [http://www.cegui.org.uk/phpBB2/viewtopic.php?p=8097#8097 thread] for discussion.&lt;br /&gt;
&lt;br /&gt;
==International Components for Unicode==&lt;br /&gt;
===Useful Links===&lt;br /&gt;
*[http://www.icu-project.org/ Home page]&lt;br /&gt;
*[http://source.icu-project.org/repos/icu/icu/trunk/license.html Licence]&lt;br /&gt;
*[http://www.icu-project.org/userguide/ Documentation]&lt;br /&gt;
*[http://www.icu-project.org/apiref/icu4c/ ICU4C API Reference]&lt;br /&gt;
*[http://www.loc.gov/standards/iso639-2/ ISO 639 Language Codes]&lt;br /&gt;
*[http://unicode.org/iso15924/iso15924-codes.html ISO 15924 Script Codes]&lt;br /&gt;
*[http://www.iso.org/iso/country_codes ISO 3166 Country Codes]&lt;br /&gt;
*[http://www.iso.org/iso/currency_codes ISO 4217 Currency Codes]&lt;br /&gt;
*[http://www.icu-project.org/apiref/icu4c/classDecimalFormat.html#_details ICU Decimal Format Syntax]&lt;br /&gt;
*[http://www.icu-project.org/userguide/formatDateTime.html ICU Date/Time Format Syntax]&lt;br /&gt;
&lt;br /&gt;
===Getting started===&lt;br /&gt;
Download these [http://www.icu-project.org/download/ files from the ICU web site]&lt;br /&gt;
*Source: icu-3.4.1.zip for Windows OR icu-3.4.1.tgz for Unix&lt;br /&gt;
*Documentation: icu-3.4-docs.zip&lt;br /&gt;
*User Guide: icu-3.4-userguide.zip&lt;br /&gt;
&lt;br /&gt;
Files of interest:&lt;br /&gt;
*Solution to compile: icu/source/allinone/allinone.sln&lt;br /&gt;
*Instructions to compile and use ICU: icu/readme.html#HowToBuildWindows&lt;br /&gt;
*ICU4C samples: icu/source/samples/&lt;br /&gt;
&lt;br /&gt;
The instructions for building and setting up ICU are contained in the readme.html. If you have any problems, contact the icu-support mailing list or submit a bug report.&lt;br /&gt;
*[http://www.icu-project.org/contacts.html icu-support mailing list]&lt;br /&gt;
*[http://www.icu-project.org/bugs.html ICU bug tracking tool]&lt;br /&gt;
&lt;br /&gt;
===Incorporating ICU4C within an existing project===&lt;br /&gt;
&lt;br /&gt;
Additional include directories:&lt;br /&gt;
*$(ICU)\include&lt;br /&gt;
&lt;br /&gt;
Additional library directories:&lt;br /&gt;
*$(ICU)\lib&lt;br /&gt;
&lt;br /&gt;
Link with:&lt;br /&gt;
*debug: icuucd.lib icuind.lib&lt;br /&gt;
*release: icuuc.lib icuin.lib&lt;br /&gt;
&lt;br /&gt;
Make certain these DLLs are present with your executable or in your PATH:&lt;br /&gt;
*debug: icuuc34d.dll icuin34d.dll icudt34.dll&lt;br /&gt;
*release: icuuc34.dll icuin34.dll icudt34.dll&lt;br /&gt;
&lt;br /&gt;
==CEGUI's ICU==&lt;br /&gt;
ICU4C provides many features to support internationalisation.  The class I've created encapsulates some (not all) of these features.&lt;br /&gt;
&lt;br /&gt;
===Locale===&lt;br /&gt;
A Locale is an identifier that describes the rules in effect within a country for a specific language.  These rules specify the formatting of currencies, numeric values, dates, and others.  Unfortunately these rules do not take into consideration the modifications that may have been applied within the Regional Settings of Window's Control Panel, unless the &amp;quot;@compat=host&amp;quot; locale is used, which is available in ICU 3.6 and later.  However most functions accept a formatting mask.  This allows applications to recreate some of the features of the control panel, allowing users to specify their desired formats.  The setLocale() and setCurrency() functions will configure the class to adopt the rules specified by the specified language, country, and currency.&lt;br /&gt;
&lt;br /&gt;
===formatNumber===&lt;br /&gt;
The formatNumber() function formats a numeric value given the specified mask.  Three versions are available.  The versions accepting a CEGUI::String has been customised to allow large numbers to be formatted: numbers having up to 18 integers and 7 decimals.  The current implementation of this function is limited to accepting a single format for positive numbers.  If the numeric value to be formatted is negative then a negative sign will precede the formatted value.  However it is impossible to format a negative value within parentheses: formatting -1234.56 to (1,234.56).&lt;br /&gt;
&lt;br /&gt;
===numberToText===&lt;br /&gt;
The numberToText() function converts a numeric value into a textual representation.  For example the numeric value 123 is converted into &amp;quot;one hundred twenty-three&amp;quot; in English and &amp;quot;cent vingt-trois&amp;quot; in French.&lt;br /&gt;
&lt;br /&gt;
===numberToOrdinal===&lt;br /&gt;
The numberToOrdinal() function converts a numeric value into an ordinal representation.  For example the numeric value 1 is converted into &amp;quot;1st&amp;quot; in english.  Support for other languages is either buggy or lacking (or I have improperly coded this feature).&lt;br /&gt;
&lt;br /&gt;
===formatText===&lt;br /&gt;
The formatText() function will parse a numeric value and sprinkle digits into the slots specified by the formatting mask.  A North American telephone number of &amp;quot;12223334444&amp;quot; can be formatted into &amp;quot;1 (222) 333-4444&amp;quot; with the mask &amp;quot;0 (000) 000-0000&amp;quot;.  This non-localised function accepts three format specifier.  A &amp;quot;0&amp;quot; represents a forced digit.  If the numerical value possesses a digit at that position then the digit will be displayed, otherwise the place holder character(s) will be used.  A &amp;quot;#&amp;quot; represents a potential digit.  If the numerical value possesses a digit at that position the the digit will be displayed, otherwise nothing is displayed.  Finally the apostrophe &amp;quot;'&amp;quot; allows the mask to specify the characters &amp;quot;0&amp;quot;, &amp;quot;#&amp;quot;, or &amp;quot;'&amp;quot;, rather than using them as format specifiers.&lt;br /&gt;
&lt;br /&gt;
===formatCurrency===&lt;br /&gt;
The formatCurrency() function will format a numerical value according to the currently configured locale and currency.  It will NOT convert the monetary value of one currency to another.&lt;br /&gt;
&lt;br /&gt;
===formatDateTime===&lt;br /&gt;
The formatDateTime() function will format a date, time, or date/time given the specified mask.  The UDate variable type is a double.  According to [http://www.icu-project.org/userguide/dateCalendar.html ICU's documentation] &amp;lt;i&amp;gt;A UDate value is stored as UTC time in milliseconds, which means it is calendar and time zone independent. UDate is the most compact and portable way to store and transmit a date and time.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===localToGmt and gmtToLocal===&lt;br /&gt;
The localToGmt() and the gmtToLocal() functions convert a date and a time between a local and a GMT value.&lt;br /&gt;
&lt;br /&gt;
===CeguiStringToDateTime===&lt;br /&gt;
The CeguiStringToDateTime() function will parse a string specifying a date or a time into its corresponding UDate value.  Although it is possible to parse a string containing both a date and a time the resulting UDate value will be inaccurate, varying from its intended value by up to 1 minute 47 seconds.  A better approach is to keep the date and time separated.&lt;br /&gt;
&lt;br /&gt;
==Source Code==&lt;br /&gt;
&lt;br /&gt;
===icu.h===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#ifndef _ICU_h_&lt;br /&gt;
#define _ICU_h_&lt;br /&gt;
&lt;br /&gt;
#include &amp;quot;unicode/utypes.h&amp;quot;&lt;br /&gt;
#include &amp;quot;unicode/unistr.h&amp;quot;&lt;br /&gt;
#include &amp;quot;unicode/numfmt.h&amp;quot;&lt;br /&gt;
#include &amp;quot;unicode/dcfmtsym.h&amp;quot;&lt;br /&gt;
#include &amp;quot;unicode/decimfmt.h&amp;quot;&lt;br /&gt;
#include &amp;quot;unicode/locid.h&amp;quot;&lt;br /&gt;
#include &amp;quot;unicode/uclean.h&amp;quot;&lt;br /&gt;
#include &amp;quot;unicode/calendar.h&amp;quot;&lt;br /&gt;
#include &amp;quot;unicode/datefmt.h&amp;quot;&lt;br /&gt;
#include &amp;quot;unicode/smpdtfmt.h&amp;quot;&lt;br /&gt;
#include &amp;quot;unicode/rbnf.h&amp;quot;&lt;br /&gt;
#include &amp;quot;CEGUI.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
class ICU&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
	ICU(bool cleanupICU = true);&lt;br /&gt;
	~ICU();&lt;br /&gt;
	bool setLocale(const CEGUI::String&amp;amp; language, const CEGUI::String&amp;amp; country);&lt;br /&gt;
	const Locale&amp;amp; getLocale();&lt;br /&gt;
	bool setCurrency(const char *currency);&lt;br /&gt;
&lt;br /&gt;
	bool formatNumber(const CEGUI::String&amp;amp; rawValue, const CEGUI::String&amp;amp; mask, CEGUI::String&amp;amp; formattedValue);&lt;br /&gt;
	bool formatNumber(const double rawValue, const CEGUI::String&amp;amp; mask, CEGUI::String&amp;amp; formattedValue);&lt;br /&gt;
	bool formatNumber(const int32_t rawValue, const CEGUI::String&amp;amp; mask, CEGUI::String&amp;amp; formattedValue);&lt;br /&gt;
&lt;br /&gt;
	bool numberToText(const double rawValue, CEGUI::String&amp;amp; formattedValue);&lt;br /&gt;
	bool numberToText(const int32_t rawValue, CEGUI::String&amp;amp; formattedValue);&lt;br /&gt;
&lt;br /&gt;
	bool numberToOrdinal(const double rawValue, CEGUI::String&amp;amp; formattedValue);&lt;br /&gt;
	bool numberToOrdinal(const int32_t rawValue, CEGUI::String&amp;amp; formattedValue);&lt;br /&gt;
&lt;br /&gt;
	bool formatText(const CEGUI::String&amp;amp; rawValue, const CEGUI::String&amp;amp; mask, const CEGUI::String&amp;amp; zeroPlaceHolder, CEGUI::String&amp;amp; formattedValue);&lt;br /&gt;
&lt;br /&gt;
	bool formatCurrency(const double&amp;amp; currency, CEGUI::String&amp;amp; formattedValue);&lt;br /&gt;
&lt;br /&gt;
	bool formatDateTime(UDate rawDateTime, const CEGUI::String&amp;amp; mask, CEGUI::String&amp;amp; formattedDateTime);&lt;br /&gt;
	bool localToGmt(const UDate&amp;amp; localDate, const UDate&amp;amp; localTime, UDate&amp;amp; gmtDate, UDate&amp;amp; gmtTime);&lt;br /&gt;
	bool gmtToLocal(const UDate&amp;amp; gmtDate, const UDate&amp;amp; gmtTime, UDate&amp;amp; localDate, UDate&amp;amp; localTime);&lt;br /&gt;
&lt;br /&gt;
	bool CeguiStringToDateTime(const CEGUI::String&amp;amp; stringDateTime, const CEGUI::String&amp;amp; mask, UDate&amp;amp; unicodeDateTime);&lt;br /&gt;
	bool CeguiStringToInt32(const CEGUI::String&amp;amp; stringValue, int32_t&amp;amp; int32Value);&lt;br /&gt;
	void UnicodeToCeguiString(const UnicodeString&amp;amp; unicodeString, CEGUI::String&amp;amp; ceguiString);&lt;br /&gt;
private:&lt;br /&gt;
	void _splitIntegerDecimal(const CEGUI::String&amp;amp; combined, CEGUI::String&amp;amp; integerPart, CEGUI::String&amp;amp; decimalPart);&lt;br /&gt;
	bool _convertLocalAndGmt(const UDate&amp;amp; localDate, const UDate&amp;amp; localTime, UDate&amp;amp; gmtDate, UDate&amp;amp; gmtTime, bool fromLocalToGMT);&lt;br /&gt;
	bool _ruleBasedNumberFormat(const double rawValue, URBNFRuleSetTag tag, CEGUI::String&amp;amp; formattedValue);&lt;br /&gt;
	bool _ruleBasedNumberFormat(const int32_t rawValue, URBNFRuleSetTag tag, CEGUI::String&amp;amp; formattedValue);&lt;br /&gt;
	Locale m_locale; // Current locale of the computer&lt;br /&gt;
	UChar m_currency[4]; // Currency code&lt;br /&gt;
	bool m_cleanupICU; // Whether to call ICU's cleanup function&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#endif // _ICU_h_&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===icu.cpp===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;quot;ICU.h&amp;quot;&lt;br /&gt;
#include &amp;lt;vector&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ICU::ICU(bool cleanupICU)&lt;br /&gt;
{&lt;br /&gt;
	m_cleanupICU = cleanupICU;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
ICU::~ICU()&lt;br /&gt;
{&lt;br /&gt;
	// http://www.icu-project.org/userguide/design.html#Init_and_Termination&lt;br /&gt;
	// The paragraph &amp;quot;ICU Initialization and Termination&amp;quot; mentions that this function&lt;br /&gt;
	//   can be called to force the ICU library to release any allocated heap storage&lt;br /&gt;
	//   otherwise memory leak checking tools will falsely report leaks.&lt;br /&gt;
	// My thinking with this m_cleanupICU variable is that the library should not release&lt;br /&gt;
	//   its memory allocation if it is also used outside of this class.  This&lt;br /&gt;
	//	 implementation grants you some control over when this cleanup occurs.&lt;br /&gt;
	// You are not required to call u_cleanup(). It's dangerous if called at the wrong time.&lt;br /&gt;
	if(m_cleanupICU)&lt;br /&gt;
		u_cleanup();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool ICU::setLocale(const CEGUI::String&amp;amp; language, const CEGUI::String&amp;amp; country)&lt;br /&gt;
{&lt;br /&gt;
	// Set the locale&lt;br /&gt;
	Locale tempLocale = Locale::createFromName((language + &amp;quot;_&amp;quot; + country).c_str());&lt;br /&gt;
	if(tempLocale.isBogus())&lt;br /&gt;
		return false;&lt;br /&gt;
&lt;br /&gt;
	m_locale = tempLocale;&lt;br /&gt;
	return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
const Locale&amp;amp; ICU::getLocale()&lt;br /&gt;
{&lt;br /&gt;
	// Retrive the locale&lt;br /&gt;
	return m_locale;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool ICU::setCurrency(const char *currency)&lt;br /&gt;
{&lt;br /&gt;
	// Set the currency&lt;br /&gt;
    if(currency==NULL || strlen(currency)!=3)&lt;br /&gt;
        return false;&lt;br /&gt;
&lt;br /&gt;
    // Invariant-character conversion to UChars&lt;br /&gt;
    u_charsToUChars(currency, m_currency, 4);&lt;br /&gt;
	return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool ICU::formatNumber(const CEGUI::String&amp;amp; rawValue, const CEGUI::String&amp;amp; mask, CEGUI::String&amp;amp; formattedValue)&lt;br /&gt;
{&lt;br /&gt;
	// Format a unformatted number according to the rules specified within the mask&lt;br /&gt;
	// An unformatted number only contains numeric digits and a period as the decimal point&lt;br /&gt;
	// Note that a decimal value is broken down into two numbers, an&lt;br /&gt;
	//   integer and a decimal number for formatting and then reassembled&lt;br /&gt;
	//   into a single string.  This makes it possible to handle numbers&lt;br /&gt;
	//   as large as 999,999,999,999,999,999.9999999 (18 integers and 7 decimals).&lt;br /&gt;
	//   However it makes it impossible to specify a positive mask as well as a&lt;br /&gt;
	//   negative mask; only one mask is supported.  It is also impossible to&lt;br /&gt;
	//   format a negative value with a mask similar to &amp;quot;(#,##0.00)&amp;quot;&lt;br /&gt;
    UErrorCode status = U_ZERO_ERROR;&lt;br /&gt;
	formattedValue.clear();&lt;br /&gt;
	CEGUI::String formattedInteger, formattedDecimal;&lt;br /&gt;
	CEGUI::String::size_type idx;&lt;br /&gt;
&lt;br /&gt;
	// Separate the integer and the decimal parts from the value&lt;br /&gt;
	CEGUI::String maskInteger, maskDecimal, integerValue, decimalValue;&lt;br /&gt;
	idx = rawValue.find(&amp;quot;.&amp;quot;);&lt;br /&gt;
	if(idx == CEGUI::String::npos)&lt;br /&gt;
	{&lt;br /&gt;
		// If the value is empty then force the integer to 0, otherwise use the value&lt;br /&gt;
		// Since there is no decimal point force a decimal value of .0&lt;br /&gt;
		integerValue = rawValue.empty() ? &amp;quot;0&amp;quot; : rawValue;&lt;br /&gt;
		decimalValue = &amp;quot;.0&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
	else&lt;br /&gt;
	{&lt;br /&gt;
		// If there is no integer portion then force an integer value of 0&lt;br /&gt;
		integerValue = idx == 0 ? &amp;quot;0&amp;quot; : rawValue.substr(0, idx);&lt;br /&gt;
		decimalValue = rawValue.substr(idx);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	// Separate the integer and the decimal parts from the mask&lt;br /&gt;
	_splitIntegerDecimal(mask, maskInteger, maskDecimal);&lt;br /&gt;
&lt;br /&gt;
	// Prepare the numeric formatter&lt;br /&gt;
	DecimalFormatSymbols* decimalFormatSymbols = new DecimalFormatSymbols(m_locale, status);&lt;br /&gt;
	if( U_FAILURE(status) )&lt;br /&gt;
		return false;&lt;br /&gt;
&lt;br /&gt;
	if(!maskInteger.empty())&lt;br /&gt;
	{&lt;br /&gt;
		// Prepare the integer parser&lt;br /&gt;
		UnicodeString patternInteger(maskInteger.c_str());&lt;br /&gt;
		DecimalFormat* fmt = new DecimalFormat(patternInteger, *decimalFormatSymbols, status);&lt;br /&gt;
		if( U_FAILURE(status) )&lt;br /&gt;
		{&lt;br /&gt;
			delete decimalFormatSymbols;&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Parse the string value into an integer value&lt;br /&gt;
		UnicodeString uIntegerValue(integerValue.c_str());&lt;br /&gt;
		Formattable fIntegerValue;&lt;br /&gt;
		fmt-&amp;gt;parse(uIntegerValue, fIntegerValue, status);&lt;br /&gt;
		if( U_FAILURE(status) )&lt;br /&gt;
		{&lt;br /&gt;
			status = U_ZERO_ERROR;&lt;br /&gt;
			fIntegerValue.setInt64(0);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Format the integer value&lt;br /&gt;
		uIntegerValue = &amp;quot;&amp;quot;;&lt;br /&gt;
		((NumberFormat*)fmt)-&amp;gt;format(fIntegerValue.getInt64(), uIntegerValue);&lt;br /&gt;
		delete fmt;&lt;br /&gt;
&lt;br /&gt;
		UnicodeToCeguiString(uIntegerValue, formattedInteger);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	if(!maskDecimal.empty())&lt;br /&gt;
	{&lt;br /&gt;
		// Prepare the decimal parser&lt;br /&gt;
		DecimalFormat* fmtParse = new DecimalFormat(status);&lt;br /&gt;
		if( U_FAILURE(status) )&lt;br /&gt;
		{&lt;br /&gt;
 			delete decimalFormatSymbols;&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
		fmtParse-&amp;gt;applyLocalizedPattern(&amp;quot;0.0000003&amp;quot;, status);&lt;br /&gt;
&lt;br /&gt;
		// Parse the string value into a decimal value&lt;br /&gt;
		UnicodeString uDecimalValue(decimalValue.c_str());&lt;br /&gt;
		Formattable fDecimalValue;&lt;br /&gt;
		fmtParse-&amp;gt;parse(uDecimalValue, fDecimalValue, status);&lt;br /&gt;
		delete fmtParse;&lt;br /&gt;
		if( U_FAILURE(status) )&lt;br /&gt;
		{&lt;br /&gt;
			status = U_ZERO_ERROR;&lt;br /&gt;
			fDecimalValue.setDouble(0.0);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Prepare the decimal formatter&lt;br /&gt;
		UnicodeString patternDecimal(maskDecimal.c_str());&lt;br /&gt;
		DecimalFormat* fmt = new DecimalFormat(patternDecimal, *decimalFormatSymbols, status);&lt;br /&gt;
		if( U_FAILURE(status) )&lt;br /&gt;
		{&lt;br /&gt;
 			delete decimalFormatSymbols;&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Format the decimal value&lt;br /&gt;
		uDecimalValue = &amp;quot;&amp;quot;;&lt;br /&gt;
		fmt-&amp;gt;format(fDecimalValue.getDouble(), uDecimalValue);&lt;br /&gt;
		delete fmt;&lt;br /&gt;
&lt;br /&gt;
		UnicodeToCeguiString(uDecimalValue, formattedDecimal);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	delete decimalFormatSymbols;&lt;br /&gt;
&lt;br /&gt;
	formattedValue = formattedInteger + formattedDecimal;&lt;br /&gt;
	return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool ICU::formatNumber(const double rawValue, const CEGUI::String&amp;amp; mask, CEGUI::String&amp;amp; formattedValue)&lt;br /&gt;
{&lt;br /&gt;
	// Format a number using the appropriate locale rules&lt;br /&gt;
	// Note that the use of a double limits the effective range&lt;br /&gt;
    UErrorCode status = U_ZERO_ERROR;&lt;br /&gt;
	formattedValue.clear();&lt;br /&gt;
&lt;br /&gt;
	// Prepare the numeric formatter&lt;br /&gt;
	DecimalFormatSymbols* symbols = new DecimalFormatSymbols(m_locale, status);&lt;br /&gt;
	if( U_FAILURE(status) )&lt;br /&gt;
		return false;&lt;br /&gt;
&lt;br /&gt;
    // Create a number formatter for the current locale&lt;br /&gt;
	UnicodeString pattern(mask.c_str());&lt;br /&gt;
	DecimalFormat* fmt = new DecimalFormat(pattern, *symbols, status);&lt;br /&gt;
	if( U_FAILURE(status) )&lt;br /&gt;
	{&lt;br /&gt;
		delete symbols;&lt;br /&gt;
		return false;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	// Format the number&lt;br /&gt;
	UnicodeString uValue;&lt;br /&gt;
	fmt-&amp;gt;format(rawValue, uValue, status);&lt;br /&gt;
	delete symbols;&lt;br /&gt;
	delete fmt;&lt;br /&gt;
	if( U_FAILURE(status) )&lt;br /&gt;
		return false;&lt;br /&gt;
&lt;br /&gt;
	UnicodeToCeguiString(uValue, formattedValue);&lt;br /&gt;
	return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool ICU::formatNumber(const int32_t rawValue, const CEGUI::String&amp;amp; mask, CEGUI::String&amp;amp; formattedValue)&lt;br /&gt;
{&lt;br /&gt;
	// Format a number using the appropriate locale rules&lt;br /&gt;
	// Note that the use of a double limits the effective range&lt;br /&gt;
    UErrorCode status = U_ZERO_ERROR;&lt;br /&gt;
	formattedValue.clear();&lt;br /&gt;
&lt;br /&gt;
	// Prepare the numeric formatter&lt;br /&gt;
	DecimalFormatSymbols* symbols = new DecimalFormatSymbols(m_locale, status);&lt;br /&gt;
	if( U_FAILURE(status) )&lt;br /&gt;
		return false;&lt;br /&gt;
&lt;br /&gt;
    // Create a number formatter for the current locale&lt;br /&gt;
	UnicodeString pattern(mask.c_str());&lt;br /&gt;
	DecimalFormat* fmt = new DecimalFormat(pattern, *symbols, status);&lt;br /&gt;
	if( U_FAILURE(status) )&lt;br /&gt;
	{&lt;br /&gt;
		delete symbols;&lt;br /&gt;
		return false;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	// Format the number&lt;br /&gt;
	UnicodeString uValue;&lt;br /&gt;
	fmt-&amp;gt;format(rawValue, uValue, status);&lt;br /&gt;
	delete symbols;&lt;br /&gt;
	delete fmt;&lt;br /&gt;
	if( U_FAILURE(status) )&lt;br /&gt;
		return false;&lt;br /&gt;
&lt;br /&gt;
	UnicodeToCeguiString(uValue, formattedValue);&lt;br /&gt;
	return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool ICU::numberToText(const double rawValue, CEGUI::String&amp;amp; formattedValue)&lt;br /&gt;
{&lt;br /&gt;
	// Convert a number to a text&lt;br /&gt;
	// &amp;quot;1.2&amp;quot; to &amp;quot;one point two&amp;quot;&lt;br /&gt;
	return _ruleBasedNumberFormat(rawValue, URBNF_SPELLOUT, formattedValue);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool ICU::numberToText(const int32_t rawValue, CEGUI::String&amp;amp; formattedValue)&lt;br /&gt;
{&lt;br /&gt;
	// Convert a number to a text&lt;br /&gt;
	// &amp;quot;12&amp;quot; to &amp;quot;twelve&amp;quot;&lt;br /&gt;
	return _ruleBasedNumberFormat(rawValue, URBNF_SPELLOUT, formattedValue);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool ICU::numberToOrdinal(const double rawValue, CEGUI::String&amp;amp; formattedValue)&lt;br /&gt;
{&lt;br /&gt;
	// Convert a number to ordinal text&lt;br /&gt;
	// &amp;quot;1.5&amp;quot; to &amp;quot;2nd&amp;quot;&lt;br /&gt;
	return _ruleBasedNumberFormat(rawValue, URBNF_ORDINAL, formattedValue);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool ICU::numberToOrdinal(const int32_t rawValue, CEGUI::String&amp;amp; formattedValue)&lt;br /&gt;
{&lt;br /&gt;
	// Convert a number to ordinal text&lt;br /&gt;
	// &amp;quot;1&amp;quot; to &amp;quot;1st&amp;quot;&lt;br /&gt;
	return _ruleBasedNumberFormat(rawValue, URBNF_ORDINAL, formattedValue);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool ICU::formatText(const CEGUI::String&amp;amp; rawValue, const CEGUI::String&amp;amp; mask, const CEGUI::String&amp;amp; zeroPlaceHolder, CEGUI::String&amp;amp; formattedValue)&lt;br /&gt;
{&lt;br /&gt;
	/* Format a value according to a pattern&lt;br /&gt;
	 * Format specifiers:&lt;br /&gt;
	 *		0 forced digit: will be replaced by a digit or if there is no digit, by 'zeroPlaceHolder'&lt;br /&gt;
	 *		# potential digit: will be replaced by a digit if there is one otherwise nothing&lt;br /&gt;
	 *		' literal character: the following character is to be treated as a character&lt;br /&gt;
	 *			rather than a format specifier&lt;br /&gt;
	 *			ex the value &amp;quot;1&amp;quot; with the format &amp;quot;'00&amp;quot; will result in the string &amp;quot;01&amp;quot;&lt;br /&gt;
	 * Note that if the value is larger than the pattern then it is truncated to the left&lt;br /&gt;
	 *		ex the value &amp;quot;1234&amp;quot; with the format &amp;quot;#0&amp;quot; results in the string &amp;quot;34&amp;quot;&lt;br /&gt;
	 */&lt;br /&gt;
	formattedValue.clear();&lt;br /&gt;
&lt;br /&gt;
	if(!rawValue.length() || !mask.length())&lt;br /&gt;
		return false;&lt;br /&gt;
&lt;br /&gt;
	// Parse the mask&lt;br /&gt;
	std::vector&amp;lt;CEGUI::String&amp;gt; maskList;&lt;br /&gt;
	CEGUI::String maskDigit;&lt;br /&gt;
	for(CEGUI::String::size_type idxMask = 0; idxMask &amp;lt; mask.length(); ++idxMask)&lt;br /&gt;
	{&lt;br /&gt;
		if(!mask.compare(idxMask, 1, &amp;quot;0&amp;quot;))&lt;br /&gt;
		{&lt;br /&gt;
			maskDigit = &amp;quot;ForcedDigit&amp;quot;;&lt;br /&gt;
			maskList.push_back(maskDigit);&lt;br /&gt;
		}&lt;br /&gt;
		else if(!mask.compare(idxMask, 1, &amp;quot;#&amp;quot;))&lt;br /&gt;
		{&lt;br /&gt;
			maskDigit = &amp;quot;PotentialDigit&amp;quot;;&lt;br /&gt;
			maskList.push_back(maskDigit);&lt;br /&gt;
		}&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			if(!mask.compare(idxMask, 1, &amp;quot;'&amp;quot;) &amp;amp;&amp;amp; idxMask &amp;lt; mask.length() - 1)&lt;br /&gt;
				++idxMask; // Literal specifier followed by a mask digit, so skip over the apostrophe&lt;br /&gt;
			maskDigit = mask.at(idxMask);&lt;br /&gt;
			maskList.push_back(maskDigit);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	// Format the numeric value&lt;br /&gt;
	CEGUI::String::size_type idxValue;&lt;br /&gt;
	idxValue = rawValue.length();&lt;br /&gt;
	std::vector&amp;lt;CEGUI::String&amp;gt;::reverse_iterator itMask;&lt;br /&gt;
	for(itMask = maskList.rbegin(); itMask != maskList.rend(); ++itMask)&lt;br /&gt;
	{&lt;br /&gt;
		if(!(*itMask).compare(&amp;quot;ForcedDigit&amp;quot;))&lt;br /&gt;
		{&lt;br /&gt;
			if(idxValue)&lt;br /&gt;
			{&lt;br /&gt;
				// We have a digit remaining&lt;br /&gt;
				--idxValue;&lt;br /&gt;
				formattedValue = rawValue.at(idxValue) + formattedValue;&lt;br /&gt;
			}&lt;br /&gt;
			else&lt;br /&gt;
			{&lt;br /&gt;
				// We're out of digits&lt;br /&gt;
				formattedValue = zeroPlaceHolder + formattedValue;&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
		else if(!(*itMask).compare(&amp;quot;PotentialDigit&amp;quot;))&lt;br /&gt;
		{&lt;br /&gt;
			if(idxValue)&lt;br /&gt;
			{&lt;br /&gt;
				// We have a digit remaining&lt;br /&gt;
				--idxValue;&lt;br /&gt;
				formattedValue = rawValue.at(idxValue) + formattedValue;&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			// Literal character&lt;br /&gt;
			formattedValue = (*itMask) + formattedValue;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
	return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool ICU::formatCurrency(const double&amp;amp; currency, CEGUI::String&amp;amp; formattedValue)&lt;br /&gt;
{&lt;br /&gt;
	// Format a number using the appropriate locale rules&lt;br /&gt;
	// Note that the use of a double limits the effective range&lt;br /&gt;
    UErrorCode status = U_ZERO_ERROR;&lt;br /&gt;
	formattedValue.clear();&lt;br /&gt;
&lt;br /&gt;
    // Create a number formatter for the current locale&lt;br /&gt;
    NumberFormat *fmt = NumberFormat::createCurrencyInstance(m_locale, status);&lt;br /&gt;
	if( U_FAILURE(status) )&lt;br /&gt;
		return false;&lt;br /&gt;
&lt;br /&gt;
	// Format the currency&lt;br /&gt;
	UnicodeString uValue;&lt;br /&gt;
	fmt-&amp;gt;format(currency, uValue);&lt;br /&gt;
    delete fmt;&lt;br /&gt;
&lt;br /&gt;
	UnicodeToCeguiString(uValue, formattedValue);&lt;br /&gt;
	return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool ICU::formatDateTime(UDate rawDateTime, const CEGUI::String&amp;amp; mask, CEGUI::String&amp;amp; formattedDateTime)&lt;br /&gt;
{&lt;br /&gt;
	// Format a date/time given the specified mask&lt;br /&gt;
	// Note that although a UDate can support both date and time in&lt;br /&gt;
	//   realite the resolution is insufficient.  In order to precisely&lt;br /&gt;
	//   represent a date/time value they should be processed separately&lt;br /&gt;
    UErrorCode status = U_ZERO_ERROR;&lt;br /&gt;
	formattedDateTime.clear();&lt;br /&gt;
&lt;br /&gt;
	// Create a Date/Time formatter&lt;br /&gt;
	DateFormat* fmt = DateFormat::createDateTimeInstance(DateFormat::kDefault, DateFormat::kDefault, m_locale); // kDefault is not really used&lt;br /&gt;
&lt;br /&gt;
	// Activate our pattern (overrides DateFormat::kDefault)&lt;br /&gt;
    UnicodeString pattern(mask.c_str());&lt;br /&gt;
	((SimpleDateFormat*) fmt)-&amp;gt;applyPattern(pattern);&lt;br /&gt;
&lt;br /&gt;
	// Format the date/time&lt;br /&gt;
    UnicodeString uValue;&lt;br /&gt;
	fmt-&amp;gt;format(rawDateTime, uValue, status);&lt;br /&gt;
	delete fmt;&lt;br /&gt;
	if( U_FAILURE(status) )&lt;br /&gt;
		return false;&lt;br /&gt;
&lt;br /&gt;
	UnicodeToCeguiString(uValue, formattedDateTime);&lt;br /&gt;
	return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool ICU::localToGmt(const UDate&amp;amp; localDate, const UDate&amp;amp; localTime, UDate&amp;amp; gmtDate, UDate&amp;amp; gmtTime)&lt;br /&gt;
{&lt;br /&gt;
	// Convert a local date/time into a GMT date/time&lt;br /&gt;
	return _convertLocalAndGmt(localDate, localTime, gmtDate, gmtTime, true);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool ICU::gmtToLocal(const UDate&amp;amp; gmtDate, const UDate&amp;amp; gmtTime, UDate&amp;amp; localDate, UDate&amp;amp; localTime)&lt;br /&gt;
{&lt;br /&gt;
	// Convert a GMT date/time into a local date/time string&lt;br /&gt;
	return _convertLocalAndGmt(gmtDate, gmtTime, localDate, localTime, false);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool ICU::CeguiStringToDateTime(const CEGUI::String&amp;amp; stringDateTime, const CEGUI::String&amp;amp; mask, UDate&amp;amp; unicodeDateTime)&lt;br /&gt;
{&lt;br /&gt;
	// Convert a string date/time into a UDate&lt;br /&gt;
    UErrorCode status = U_ZERO_ERROR;&lt;br /&gt;
	unicodeDateTime = 0.0;&lt;br /&gt;
&lt;br /&gt;
	// Create a Date/Time formatter&lt;br /&gt;
	DateFormat* fmt = DateFormat::createDateTimeInstance(DateFormat::kDefault, DateFormat::kDefault, m_locale);&lt;br /&gt;
&lt;br /&gt;
	// Activate our pattern&lt;br /&gt;
    UnicodeString pattern(mask.c_str());&lt;br /&gt;
	((SimpleDateFormat*) fmt)-&amp;gt;applyPattern(pattern);&lt;br /&gt;
&lt;br /&gt;
	// Parse the string into a date/time&lt;br /&gt;
	UnicodeString uValue(stringDateTime.c_str());&lt;br /&gt;
	unicodeDateTime = fmt-&amp;gt;parse(uValue, status);&lt;br /&gt;
	delete fmt;&lt;br /&gt;
	if( U_FAILURE(status) )&lt;br /&gt;
		return false;&lt;br /&gt;
&lt;br /&gt;
	return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool ICU::CeguiStringToInt32(const CEGUI::String&amp;amp; stringValue, int32_t&amp;amp; int32Value)&lt;br /&gt;
{&lt;br /&gt;
	// Convert a string into an int32_t&lt;br /&gt;
    UErrorCode status = U_ZERO_ERROR;&lt;br /&gt;
	int32Value = 0;&lt;br /&gt;
&lt;br /&gt;
	// Create an integer formatter&lt;br /&gt;
	NumberFormat *fmt = NumberFormat::createInstance(Locale::getUS(), status);&lt;br /&gt;
	if( U_FAILURE(status) )&lt;br /&gt;
		return false;&lt;br /&gt;
&lt;br /&gt;
	// Activate our pattern&lt;br /&gt;
	UnicodeString pattern(&amp;quot;#,##0&amp;quot;);&lt;br /&gt;
	((DecimalFormat*) fmt)-&amp;gt;applyPattern(pattern, status);&lt;br /&gt;
	if( U_FAILURE(status) )&lt;br /&gt;
	{&lt;br /&gt;
		delete fmt;&lt;br /&gt;
		return false;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	// Parse the string into a double&lt;br /&gt;
	UnicodeString uValue(stringValue.c_str());&lt;br /&gt;
    Formattable result;&lt;br /&gt;
    fmt-&amp;gt;parse(uValue, result, status);&lt;br /&gt;
	delete fmt;&lt;br /&gt;
	if( U_FAILURE(status) )&lt;br /&gt;
		return false;&lt;br /&gt;
&lt;br /&gt;
	int32Value = result.getLong();&lt;br /&gt;
&lt;br /&gt;
	return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void ICU::UnicodeToCeguiString(const UnicodeString&amp;amp; unicodeString, CEGUI::String&amp;amp; ceguiString)&lt;br /&gt;
{&lt;br /&gt;
	// Convert a unicode string to a CEGUI string&lt;br /&gt;
	ceguiString.clear();&lt;br /&gt;
&lt;br /&gt;
	CEGUI::String digit;&lt;br /&gt;
	for(int32_t i = 0; i &amp;lt; unicodeString.length(); ++i)&lt;br /&gt;
	{&lt;br /&gt;
		digit = unicodeString.charAt(i);&lt;br /&gt;
		ceguiString.append(digit);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void ICU::_splitIntegerDecimal(const CEGUI::String&amp;amp; combined, CEGUI::String&amp;amp; integerPart, CEGUI::String&amp;amp; decimalPart)&lt;br /&gt;
{&lt;br /&gt;
	// Split a decimal value into its constituent integer and decimal parts&lt;br /&gt;
	CEGUI::String::size_type idx = combined.find(&amp;quot;.&amp;quot;);&lt;br /&gt;
	if(idx == CEGUI::String::npos)&lt;br /&gt;
	{&lt;br /&gt;
		integerPart = combined;&lt;br /&gt;
		decimalPart.clear();&lt;br /&gt;
	}&lt;br /&gt;
	else&lt;br /&gt;
	{&lt;br /&gt;
		integerPart = combined.substr(0, idx);&lt;br /&gt;
		decimalPart = combined.substr(idx);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool ICU::_convertLocalAndGmt(const UDate&amp;amp; localDate, const UDate&amp;amp; localTime, UDate&amp;amp; gmtDate, UDate&amp;amp; gmtTime, bool fromLocalToGMT)&lt;br /&gt;
{&lt;br /&gt;
	// Helper function to convert between a local and a GMT date/time&lt;br /&gt;
	UErrorCode status = U_ZERO_ERROR;&lt;br /&gt;
	gmtDate = gmtTime = 0.0;&lt;br /&gt;
&lt;br /&gt;
	// Create a calendar for the local date&lt;br /&gt;
	Calendar* calLocalDate = Calendar::createInstance(m_locale, status);&lt;br /&gt;
	if( U_FAILURE(status) )&lt;br /&gt;
		return false;&lt;br /&gt;
	calLocalDate-&amp;gt;clear();&lt;br /&gt;
	calLocalDate-&amp;gt;setTime(localDate, status);&lt;br /&gt;
	if( U_FAILURE(status) )&lt;br /&gt;
	{&lt;br /&gt;
		delete calLocalDate;&lt;br /&gt;
		return false;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	// Create a calendar for the local time&lt;br /&gt;
	Calendar* calLocalTime = Calendar::createInstance(m_locale, status);&lt;br /&gt;
	if( U_FAILURE(status) )&lt;br /&gt;
	{&lt;br /&gt;
		delete calLocalDate;&lt;br /&gt;
		return false;&lt;br /&gt;
	}&lt;br /&gt;
	calLocalTime-&amp;gt;clear();&lt;br /&gt;
	calLocalTime-&amp;gt;setTime(localTime, status);&lt;br /&gt;
	if( U_FAILURE(status) )&lt;br /&gt;
	{&lt;br /&gt;
		delete calLocalDate;&lt;br /&gt;
		delete calLocalTime;&lt;br /&gt;
		return false;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	// Retrieve the offset between this time zone and the GMT time zone&lt;br /&gt;
	// The Daylight Saving Time offset is zero when DST is not in effect&lt;br /&gt;
	// Note that adding the local date and time together introduces an&lt;br /&gt;
	//   inaccuracy of up to 1 minute 47 seconds.  However the only impact&lt;br /&gt;
	//   of this inaccuracy is to advance/delay the activation or deactivation&lt;br /&gt;
	//   of daylight savings&lt;br /&gt;
	int32_t rawOffset, dstOffset, gmtOffset;&lt;br /&gt;
	calLocalDate-&amp;gt;getTimeZone().getOffset(localDate + localTime, true, rawOffset, dstOffset, status);&lt;br /&gt;
	gmtOffset = (rawOffset + dstOffset) / 1000 / 60 / 60; // Convert from milliseconds to hours&lt;br /&gt;
&lt;br /&gt;
	// Converting from local to GMT requires &amp;quot;reversing&amp;quot; the time zone&lt;br /&gt;
	// EST is GMT-5 so it requires adding 5 hours to local time to obtain GMT&lt;br /&gt;
	// Converting from GMT to local requires the opposite&lt;br /&gt;
	int32_t hour = calLocalTime-&amp;gt;get(UCAL_HOUR_OF_DAY, status);&lt;br /&gt;
	if(fromLocalToGMT)&lt;br /&gt;
		hour -= gmtOffset;&lt;br /&gt;
	else&lt;br /&gt;
		hour += gmtOffset;&lt;br /&gt;
&lt;br /&gt;
	// Adjust the time and date if necessary&lt;br /&gt;
	if(hour &amp;gt;= 24)&lt;br /&gt;
	{&lt;br /&gt;
		// We've moved to the next day&lt;br /&gt;
		hour -= 24;&lt;br /&gt;
		calLocalDate-&amp;gt;add(UCAL_DAY_OF_MONTH, 1, status);&lt;br /&gt;
		if( U_FAILURE(status) )&lt;br /&gt;
		{&lt;br /&gt;
			delete calLocalDate;&lt;br /&gt;
			delete calLocalTime;&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
	else if(hour &amp;lt; 0)&lt;br /&gt;
	{&lt;br /&gt;
		// We've moved to the previous day&lt;br /&gt;
		hour += 24;&lt;br /&gt;
		calLocalDate-&amp;gt;add(UCAL_DAY_OF_MONTH, -1, status);&lt;br /&gt;
		if( U_FAILURE(status) )&lt;br /&gt;
		{&lt;br /&gt;
			delete calLocalDate;&lt;br /&gt;
			delete calLocalTime;&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
	calLocalTime-&amp;gt;set(UCAL_HOUR_OF_DAY, hour);&lt;br /&gt;
&lt;br /&gt;
	// Retrieve the converted date and time&lt;br /&gt;
	gmtDate = calLocalDate-&amp;gt;getTime(status);&lt;br /&gt;
	gmtTime = calLocalTime-&amp;gt;getTime(status);&lt;br /&gt;
&lt;br /&gt;
	delete calLocalDate;&lt;br /&gt;
	delete calLocalTime;&lt;br /&gt;
	if( U_FAILURE(status) )&lt;br /&gt;
		return false;&lt;br /&gt;
&lt;br /&gt;
	return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool ICU::_ruleBasedNumberFormat(const double rawValue, URBNFRuleSetTag tag, CEGUI::String&amp;amp; formattedValue)&lt;br /&gt;
{&lt;br /&gt;
    UErrorCode status = U_ZERO_ERROR;&lt;br /&gt;
	formattedValue.clear();&lt;br /&gt;
&lt;br /&gt;
	// Create a rule based number formatter&lt;br /&gt;
	RuleBasedNumberFormat* fmt = new RuleBasedNumberFormat(tag, m_locale, status);&lt;br /&gt;
	if( U_FAILURE(status) )&lt;br /&gt;
		return false;&lt;br /&gt;
&lt;br /&gt;
    UnicodeString uValue;&lt;br /&gt;
    fmt-&amp;gt;format(rawValue, uValue);&lt;br /&gt;
	delete fmt;&lt;br /&gt;
&lt;br /&gt;
	formattedValue.clear();&lt;br /&gt;
	UnicodeToCeguiString(uValue, formattedValue);&lt;br /&gt;
	return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool ICU::_ruleBasedNumberFormat(const int32_t rawValue, URBNFRuleSetTag tag, CEGUI::String&amp;amp; formattedValue)&lt;br /&gt;
{&lt;br /&gt;
    UErrorCode status = U_ZERO_ERROR;&lt;br /&gt;
	formattedValue.clear();&lt;br /&gt;
&lt;br /&gt;
	// Create a rule based number formatter&lt;br /&gt;
	RuleBasedNumberFormat* fmt = new RuleBasedNumberFormat(tag, m_locale, status);&lt;br /&gt;
	if( U_FAILURE(status) )&lt;br /&gt;
		return false;&lt;br /&gt;
&lt;br /&gt;
    UnicodeString uValue;&lt;br /&gt;
	Formattable fValue(rawValue);&lt;br /&gt;
	fmt-&amp;gt;format(fValue, uValue, status);&lt;br /&gt;
	delete fmt;&lt;br /&gt;
	if( U_FAILURE(status) )&lt;br /&gt;
		return false;&lt;br /&gt;
&lt;br /&gt;
	formattedValue.clear();&lt;br /&gt;
	UnicodeToCeguiString(uValue, formattedValue);&lt;br /&gt;
	return true;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===FormattedData.h===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#ifndef _FormattedData_h_&lt;br /&gt;
#define _FormattedData_h_&lt;br /&gt;
&lt;br /&gt;
#include &amp;quot;CEGuiSample.h&amp;quot;&lt;br /&gt;
#include &amp;quot;CEGUI.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#include &amp;quot;ICU.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
class DemoSample : public CEGuiSample&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
	bool initialiseSample()&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		try&lt;br /&gt;
		{&lt;br /&gt;
			// Retrieve the window manager&lt;br /&gt;
			WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
&lt;br /&gt;
			// Load the TaharezLook scheme and set up the default mouse cursor and font&lt;br /&gt;
			SchemeManager::getSingleton().loadScheme(&amp;quot;TaharezLook.scheme&amp;quot;);&lt;br /&gt;
			System::getSingleton().setDefaultMouseCursor(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MouseArrow&amp;quot;);&lt;br /&gt;
			if(!FontManager::getSingleton().isFontPresent(&amp;quot;Commonwealth-10&amp;quot;))&lt;br /&gt;
				FontManager::getSingleton().createFont(&amp;quot;Commonwealth-10.font&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			// Set the GUI Sheet&lt;br /&gt;
			Window* sheet = winMgr.createWindow(&amp;quot;DefaultWindow&amp;quot;, &amp;quot;root_wnd&amp;quot;);&lt;br /&gt;
			System::getSingleton().setGUISheet(sheet);&lt;br /&gt;
&lt;br /&gt;
			// Load a layout&lt;br /&gt;
			Window* guiLayout = winMgr.loadWindowLayout(&amp;quot;FormattedData.layout&amp;quot;);&lt;br /&gt;
			sheet-&amp;gt;addChildWindow(guiLayout);&lt;br /&gt;
&lt;br /&gt;
			/******** ICU Stuff ********/&lt;br /&gt;
&lt;br /&gt;
			// Display one ISO country in a combo box&lt;br /&gt;
			Combobox* countries = static_cast&amp;lt;Combobox*&amp;gt;(winMgr.getWindow(&amp;quot;Countries&amp;quot;));&lt;br /&gt;
			countries-&amp;gt;setReadOnly(true);&lt;br /&gt;
			ListboxTextItem* listboxTextItem;&lt;br /&gt;
			listboxTextItem = new ListboxTextItem( Locale::getDefault().getCountry() );&lt;br /&gt;
			listboxTextItem-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
			countries-&amp;gt;addItem(listboxTextItem);&lt;br /&gt;
			countries-&amp;gt;setText(	Locale::getDefault().getCountry() );&lt;br /&gt;
			countries-&amp;gt;subscribeEvent(Combobox::EventListSelectionAccepted, Event::Subscriber(&amp;amp;DemoSample::onLocaleChanged, this));&lt;br /&gt;
&lt;br /&gt;
			// Display two ISO languages in a combo box&lt;br /&gt;
			Combobox* languages = static_cast&amp;lt;Combobox*&amp;gt;(winMgr.getWindow(&amp;quot;Languages&amp;quot;));&lt;br /&gt;
			languages-&amp;gt;subscribeEvent(Combobox::EventListSelectionAccepted, Event::Subscriber(&amp;amp;DemoSample::onLocaleChanged, this));&lt;br /&gt;
			languages-&amp;gt;setReadOnly(true);&lt;br /&gt;
			listboxTextItem = new ListboxTextItem(&amp;quot;en&amp;quot;);&lt;br /&gt;
			listboxTextItem-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
			languages-&amp;gt;addItem(listboxTextItem);&lt;br /&gt;
			listboxTextItem = new ListboxTextItem(&amp;quot;fr&amp;quot;);&lt;br /&gt;
			listboxTextItem-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
			languages-&amp;gt;addItem(listboxTextItem);&lt;br /&gt;
			languages-&amp;gt;setText(&amp;quot;en&amp;quot;);&lt;br /&gt;
			languages-&amp;gt;subscribeEvent(Combobox::EventListSelectionAccepted, Event::Subscriber(&amp;amp;DemoSample::onLocaleChanged, this));&lt;br /&gt;
			PushButton* everyISO = static_cast&amp;lt;PushButton*&amp;gt;(winMgr.getWindow(&amp;quot;EveryISO&amp;quot;));&lt;br /&gt;
			everyISO-&amp;gt;subscribeEvent(PushButton::EventClicked, Event::Subscriber(&amp;amp;DemoSample::onLoadEveryISO, this));&lt;br /&gt;
&lt;br /&gt;
			// Configure the currency widgets&lt;br /&gt;
			Editbox* currencyValue = static_cast&amp;lt;Editbox*&amp;gt;(winMgr.getWindow(&amp;quot;CurrencyValue&amp;quot;));&lt;br /&gt;
			currencyValue-&amp;gt;subscribeEvent(Editbox::EventTextChanged, Event::Subscriber(&amp;amp;DemoSample::onCurrencyChanged, this));&lt;br /&gt;
			RadioButton* radio;&lt;br /&gt;
			radio = static_cast&amp;lt;RadioButton*&amp;gt;(winMgr.getWindow(&amp;quot;RadioCAD&amp;quot;));&lt;br /&gt;
			radio-&amp;gt;subscribeEvent(RadioButton::EventSelectStateChanged, Event::Subscriber(&amp;amp;DemoSample::onCurrencySelected, this));&lt;br /&gt;
			radio-&amp;gt;setID(1);&lt;br /&gt;
			radio-&amp;gt;setSelected(true);&lt;br /&gt;
			radio = static_cast&amp;lt;RadioButton*&amp;gt;(winMgr.getWindow(&amp;quot;RadioUSD&amp;quot;));&lt;br /&gt;
			radio-&amp;gt;subscribeEvent(RadioButton::EventSelectStateChanged, Event::Subscriber(&amp;amp;DemoSample::onCurrencySelected, this));&lt;br /&gt;
			radio-&amp;gt;setID(2);&lt;br /&gt;
			radio = static_cast&amp;lt;RadioButton*&amp;gt;(winMgr.getWindow(&amp;quot;RadioEUR&amp;quot;));&lt;br /&gt;
			radio-&amp;gt;subscribeEvent(RadioButton::EventSelectStateChanged, Event::Subscriber(&amp;amp;DemoSample::onCurrencySelected, this));&lt;br /&gt;
			radio-&amp;gt;setID(3);&lt;br /&gt;
			radio = static_cast&amp;lt;RadioButton*&amp;gt;(winMgr.getWindow(&amp;quot;RadioMRO&amp;quot;));&lt;br /&gt;
			radio-&amp;gt;subscribeEvent(RadioButton::EventSelectStateChanged, Event::Subscriber(&amp;amp;DemoSample::onCurrencySelected, this));&lt;br /&gt;
			radio-&amp;gt;setID(4);&lt;br /&gt;
&lt;br /&gt;
			// Configure the numeric widgets&lt;br /&gt;
			Editbox* numericValue = static_cast&amp;lt;Editbox*&amp;gt;(winMgr.getWindow(&amp;quot;NumericValue&amp;quot;));&lt;br /&gt;
			numericValue-&amp;gt;subscribeEvent(Editbox::EventTextChanged, Event::Subscriber(&amp;amp;DemoSample::onNumericChanged, this));&lt;br /&gt;
			Editbox* numericFormat = static_cast&amp;lt;Editbox*&amp;gt;(winMgr.getWindow(&amp;quot;NumericFormat&amp;quot;));&lt;br /&gt;
			numericFormat-&amp;gt;subscribeEvent(Editbox::EventTextChanged, Event::Subscriber(&amp;amp;DemoSample::onNumericChanged, this));&lt;br /&gt;
			PushButton* numericFormatButton = static_cast&amp;lt;PushButton*&amp;gt;(winMgr.getWindow(&amp;quot;NumericFormatButton&amp;quot;));&lt;br /&gt;
			numericFormatButton-&amp;gt;subscribeEvent(PushButton::EventClicked, Event::Subscriber(&amp;amp;DemoSample::onNumericFormatClicked, this));&lt;br /&gt;
&lt;br /&gt;
			// Configure the date/time widgets&lt;br /&gt;
			Editbox* dateValue = static_cast&amp;lt;Editbox*&amp;gt;(winMgr.getWindow(&amp;quot;DateValue&amp;quot;));&lt;br /&gt;
			dateValue-&amp;gt;subscribeEvent(Editbox::EventTextChanged, Event::Subscriber(&amp;amp;DemoSample::onDateTimeChanged, this));&lt;br /&gt;
			Editbox* timeValue = static_cast&amp;lt;Editbox*&amp;gt;(winMgr.getWindow(&amp;quot;TimeValue&amp;quot;));&lt;br /&gt;
			timeValue-&amp;gt;subscribeEvent(Editbox::EventTextChanged, Event::Subscriber(&amp;amp;DemoSample::onDateTimeChanged, this));&lt;br /&gt;
			Editbox* dateFormat = static_cast&amp;lt;Editbox*&amp;gt;(winMgr.getWindow(&amp;quot;DateFormat&amp;quot;));&lt;br /&gt;
			dateFormat-&amp;gt;subscribeEvent(Editbox::EventTextChanged, Event::Subscriber(&amp;amp;DemoSample::onDateTimeChanged, this));&lt;br /&gt;
			Editbox* timeFormat = static_cast&amp;lt;Editbox*&amp;gt;(winMgr.getWindow(&amp;quot;TimeFormat&amp;quot;));&lt;br /&gt;
			timeFormat-&amp;gt;subscribeEvent(Editbox::EventTextChanged, Event::Subscriber(&amp;amp;DemoSample::onDateTimeChanged, this));&lt;br /&gt;
			PushButton* dateTimeFormatButton = static_cast&amp;lt;PushButton*&amp;gt;(winMgr.getWindow(&amp;quot;DateTimeFormatButton&amp;quot;));&lt;br /&gt;
			dateTimeFormatButton-&amp;gt;subscribeEvent(PushButton::EventClicked, Event::Subscriber(&amp;amp;DemoSample::onDateTimeFormatClicked, this));&lt;br /&gt;
&lt;br /&gt;
			// Configure the spinner&lt;br /&gt;
			Spinner* spinner = static_cast&amp;lt;Spinner*&amp;gt;(winMgr.getWindow(&amp;quot;Spinner&amp;quot;));&lt;br /&gt;
			spinner-&amp;gt;subscribeEvent(Spinner::EventValueChanged, Event::Subscriber(&amp;amp;DemoSample::onSpinnerValueChanged, this));&lt;br /&gt;
			static_cast&amp;lt;Editbox*&amp;gt;(winMgr.getWindow(spinner-&amp;gt;getName() + &amp;quot;__auto_editbox__&amp;quot;))-&amp;gt;setReadOnly(true); // We cannot handle manually specified values yet&lt;br /&gt;
			spinner-&amp;gt;setTextInputMode(Spinner::FloatingPoint); // FloatingPoint, Integer, Hexadecimal, Octal&lt;br /&gt;
			spinner-&amp;gt;setMinimumValue(-10.0f);&lt;br /&gt;
			spinner-&amp;gt;setMaximumValue(10.0f);&lt;br /&gt;
			spinner-&amp;gt;setStepSize(0.02f);&lt;br /&gt;
			spinner-&amp;gt;setCurrentValue(5.2f);&lt;br /&gt;
&lt;br /&gt;
			// Configure the character widgets&lt;br /&gt;
			Editbox* characterValue = static_cast&amp;lt;Editbox*&amp;gt;(winMgr.getWindow(&amp;quot;CharacterValue&amp;quot;));&lt;br /&gt;
			characterValue-&amp;gt;subscribeEvent(Editbox::EventTextChanged, Event::Subscriber(&amp;amp;DemoSample::onCharacterChanged, this));&lt;br /&gt;
			Editbox* characterFormat = static_cast&amp;lt;Editbox*&amp;gt;(winMgr.getWindow(&amp;quot;CharacterFormat&amp;quot;));&lt;br /&gt;
			characterFormat-&amp;gt;subscribeEvent(Editbox::EventTextChanged, Event::Subscriber(&amp;amp;DemoSample::onCharacterChanged, this));&lt;br /&gt;
			PushButton* characterFormatButton = static_cast&amp;lt;PushButton*&amp;gt;(winMgr.getWindow(&amp;quot;CharacterFormatButton&amp;quot;));&lt;br /&gt;
			characterFormatButton-&amp;gt;subscribeEvent(PushButton::EventClicked, Event::Subscriber(&amp;amp;DemoSample::onCharacterFormatClicked, this));&lt;br /&gt;
			EventArgs e;&lt;br /&gt;
			onCharacterFormatClicked(e);&lt;br /&gt;
&lt;br /&gt;
			// Initialize the localise values&lt;br /&gt;
			RefreshLocalisedValues();&lt;br /&gt;
		}&lt;br /&gt;
		catch(Exception &amp;amp;e)&lt;br /&gt;
		{&lt;br /&gt;
			#if defined( __WIN32__ ) || defined( _WIN32 )&lt;br /&gt;
				MessageBox(NULL, e.getMessage().c_str(), &amp;quot;Error initializing the demo&amp;quot;, MB_OK | MB_ICONERROR | MB_TASKMODAL);&lt;br /&gt;
			#else&lt;br /&gt;
				std::cerr &amp;lt;&amp;lt; &amp;quot;Error initializing the demo:&amp;quot; &amp;lt;&amp;lt; e.getMessage().c_str() &amp;lt;&amp;lt; &amp;quot;\n&amp;quot;;&lt;br /&gt;
			#endif&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
    void cleanupSample(void)&lt;br /&gt;
	{&lt;br /&gt;
		CEGUI::FontManager::getSingleton().destroyAllFonts();&lt;br /&gt;
	}&lt;br /&gt;
private:&lt;br /&gt;
	ICU icu; // International Components for Unicode&lt;br /&gt;
&lt;br /&gt;
	void RefreshLocalisedValues()&lt;br /&gt;
	{&lt;br /&gt;
		// Trigger changes in localised widgets to refresh their values accordingly&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
		EventArgs eventArgs;&lt;br /&gt;
		static_cast&amp;lt;RadioButton*&amp;gt;(winMgr.getWindow(&amp;quot;RadioCAD&amp;quot;))-&amp;gt;fireEvent(RadioButton::EventSelectStateChanged, eventArgs);&lt;br /&gt;
		static_cast&amp;lt;PushButton*&amp;gt;(winMgr.getWindow(&amp;quot;NumericFormatButton&amp;quot;))-&amp;gt;fireEvent(PushButton::EventClicked, eventArgs);&lt;br /&gt;
		static_cast&amp;lt;PushButton*&amp;gt;(winMgr.getWindow(&amp;quot;DateTimeFormatButton&amp;quot;))-&amp;gt;fireEvent(PushButton::EventClicked, eventArgs);&lt;br /&gt;
		static_cast&amp;lt;Spinner*&amp;gt;(winMgr.getWindow(&amp;quot;Spinner&amp;quot;))-&amp;gt;fireEvent(Spinner::EventValueChanged, eventArgs);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool onLocaleChanged(const CEGUI::EventArgs&amp;amp; e)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
		String country = static_cast&amp;lt;Combobox*&amp;gt;(winMgr.getWindow(&amp;quot;Countries&amp;quot;))-&amp;gt;getText();&lt;br /&gt;
		String language = static_cast&amp;lt;Combobox*&amp;gt;(winMgr.getWindow(&amp;quot;Languages&amp;quot;))-&amp;gt;getText();&lt;br /&gt;
		if(icu.setLocale(language.c_str(), country.c_str()))&lt;br /&gt;
			RefreshLocalisedValues();&lt;br /&gt;
		else&lt;br /&gt;
			MessageBox(NULL,&lt;br /&gt;
						(&amp;quot;Error with setLocale(&amp;quot; + language + &amp;quot;, &amp;quot; + country + &amp;quot;)&amp;quot;).c_str(), &lt;br /&gt;
						&amp;quot;Error&amp;quot;,&lt;br /&gt;
						MB_OK | MB_ICONERROR | MB_TASKMODAL);&lt;br /&gt;
&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool onLoadEveryISO(const CEGUI::EventArgs&amp;amp; e)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
		ListboxTextItem* listboxTextItem;&lt;br /&gt;
		int32_t count;&lt;br /&gt;
&lt;br /&gt;
		// Change the label of the button&lt;br /&gt;
		PushButton* everyISO = static_cast&amp;lt;PushButton*&amp;gt;(winMgr.getWindow(&amp;quot;EveryISO&amp;quot;));&lt;br /&gt;
		everyISO-&amp;gt;setText(&amp;quot;This will take a few seconds...&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
		// Display every ISO countries in a combobox&lt;br /&gt;
		Combobox* countries = static_cast&amp;lt;Combobox*&amp;gt;(winMgr.getWindow(&amp;quot;Countries&amp;quot;));&lt;br /&gt;
		const char * const * listCountries = Locale::getISOCountries();&lt;br /&gt;
		for(count = 0; listCountries[count]; count++)&lt;br /&gt;
		{&lt;br /&gt;
			listboxTextItem = new ListboxTextItem(listCountries[count]);&lt;br /&gt;
			listboxTextItem-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
			countries-&amp;gt;addItem(listboxTextItem);&lt;br /&gt;
		}&lt;br /&gt;
		countries-&amp;gt;setText(	Locale::getDefault().getCountry() );&lt;br /&gt;
&lt;br /&gt;
		// Display every ISO languages in a combobox&lt;br /&gt;
		Combobox* languages = static_cast&amp;lt;Combobox*&amp;gt;(winMgr.getWindow(&amp;quot;Languages&amp;quot;));&lt;br /&gt;
		const char * const * listLanguages = Locale::getISOLanguages();&lt;br /&gt;
		for(count = 0; listLanguages[count]; count++)&lt;br /&gt;
		{&lt;br /&gt;
			listboxTextItem = new ListboxTextItem(listLanguages[count]);&lt;br /&gt;
			listboxTextItem-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
			languages-&amp;gt;addItem(listboxTextItem);&lt;br /&gt;
		}&lt;br /&gt;
		languages-&amp;gt;setText(	Locale::getDefault().getLanguage() );&lt;br /&gt;
&lt;br /&gt;
		// Remove this button since it is no longer useful&lt;br /&gt;
		everyISO-&amp;gt;setEnabled(false);&lt;br /&gt;
		everyISO-&amp;gt;setVisible(false);&lt;br /&gt;
&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool onCurrencyChanged(const CEGUI::EventArgs&amp;amp; e)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
		EventArgs eventArgs;&lt;br /&gt;
		static_cast&amp;lt;RadioButton*&amp;gt;(winMgr.getWindow(&amp;quot;RadioCAD&amp;quot;))-&amp;gt;fireEvent(RadioButton::EventSelectStateChanged, eventArgs);&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool onCurrencySelected(const CEGUI::EventArgs&amp;amp; e)&lt;br /&gt;
	{&lt;br /&gt;
		// Reformat the numeric value into a properly formatted currency&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
&lt;br /&gt;
		// Set the currency&lt;br /&gt;
		CEGUI::uint id = static_cast&amp;lt;RadioButton*&amp;gt;(winMgr.getWindow(&amp;quot;RadioCAD&amp;quot;))-&amp;gt;getSelectedButtonInGroup()-&amp;gt;getID();&lt;br /&gt;
		switch(id)&lt;br /&gt;
		{&lt;br /&gt;
		case 1:&lt;br /&gt;
			icu.setCurrency(&amp;quot;CAD&amp;quot;);&lt;br /&gt;
			break;&lt;br /&gt;
		case 2:&lt;br /&gt;
			icu.setCurrency(&amp;quot;USD&amp;quot;);&lt;br /&gt;
			break;&lt;br /&gt;
		case 3:&lt;br /&gt;
			icu.setCurrency(&amp;quot;EUR&amp;quot;);&lt;br /&gt;
			break;&lt;br /&gt;
		case 4:&lt;br /&gt;
			// Mauritania does not use a decimal division of units&lt;br /&gt;
			// and yet ICU still displays decimal units??&lt;br /&gt;
			icu.setCurrency(&amp;quot;MRO&amp;quot;);&lt;br /&gt;
			break;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		CEGUI::String rawValue = static_cast&amp;lt;Editbox*&amp;gt;(winMgr.getWindow(&amp;quot;CurrencyValue&amp;quot;))-&amp;gt;getText();&lt;br /&gt;
		double currency = atof(rawValue.c_str());&lt;br /&gt;
		CEGUI::String formattedValue;&lt;br /&gt;
		if( icu.formatCurrency(currency, formattedValue) )&lt;br /&gt;
			static_cast&amp;lt;Editbox*&amp;gt;(winMgr.getWindow(&amp;quot;CurrencyFormattedValue&amp;quot;))-&amp;gt;setText(formattedValue);&lt;br /&gt;
&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool onNumericChanged(const CEGUI::EventArgs&amp;amp; e)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
		EventArgs eventArgs;&lt;br /&gt;
		static_cast&amp;lt;PushButton*&amp;gt;(winMgr.getWindow(&amp;quot;NumericFormatButton&amp;quot;))-&amp;gt;fireEvent(PushButton::EventClicked, eventArgs);&lt;br /&gt;
&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool onNumericFormatClicked(const CEGUI::EventArgs&amp;amp; e)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
		String formattedText;&lt;br /&gt;
		if( icu.formatNumber(static_cast&amp;lt;Editbox*&amp;gt;(winMgr.getWindow(&amp;quot;NumericValue&amp;quot;))-&amp;gt;getText(),&lt;br /&gt;
							static_cast&amp;lt;Editbox*&amp;gt;(winMgr.getWindow(&amp;quot;NumericFormat&amp;quot;))-&amp;gt;getText(),&lt;br /&gt;
							formattedText) )&lt;br /&gt;
			static_cast&amp;lt;Editbox*&amp;gt;(winMgr.getWindow(&amp;quot;NumericFormattedValue&amp;quot;))-&amp;gt;setText(formattedText);&lt;br /&gt;
&lt;br /&gt;
		// Ordinal representation of an integer value&lt;br /&gt;
		double doubleValue = atof(static_cast&amp;lt;Editbox*&amp;gt;(winMgr.getWindow(&amp;quot;NumericValue&amp;quot;))-&amp;gt;getText().c_str());&lt;br /&gt;
		if( icu.numberToOrdinal((int) doubleValue, formattedText) )&lt;br /&gt;
			static_cast&amp;lt;Editbox*&amp;gt;(winMgr.getWindow(&amp;quot;NumericFormattedOrdinal&amp;quot;))-&amp;gt;setText(formattedText);&lt;br /&gt;
&lt;br /&gt;
		// Textual representation of the numeric value&lt;br /&gt;
		// Note that this value must be raw, containing only digits and a decimal point&lt;br /&gt;
		// Since atof() is used to convert from a string to a double this numeric value is not localised&lt;br /&gt;
		if( icu.numberToText(doubleValue, formattedText) )&lt;br /&gt;
			static_cast&amp;lt;Editbox*&amp;gt;(winMgr.getWindow(&amp;quot;NumericFormattedText&amp;quot;))-&amp;gt;setText(formattedText);&lt;br /&gt;
&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool onDateTimeChanged(const CEGUI::EventArgs&amp;amp; e)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
		EventArgs eventArgs;&lt;br /&gt;
		static_cast&amp;lt;PushButton*&amp;gt;(winMgr.getWindow(&amp;quot;DateTimeFormatButton&amp;quot;))-&amp;gt;fireEvent(PushButton::EventClicked, eventArgs);&lt;br /&gt;
&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool onDateTimeFormatClicked(const CEGUI::EventArgs&amp;amp; e)&lt;br /&gt;
	{&lt;br /&gt;
		// Format the date and time according to their specified values and formats&lt;br /&gt;
		// In theory a format can include both the date and the time:  yyyy/MM/dd HH:mm:ss&lt;br /&gt;
		// However in practice the resulting time is not accurate (within 1 minute 47 seconds)&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
		UDate localDate, localTime, gmtDate, gmtTime, gmtDateTime;&lt;br /&gt;
		if(icu.CeguiStringToDateTime(	static_cast&amp;lt;Editbox*&amp;gt;(winMgr.getWindow(&amp;quot;DateValue&amp;quot;))-&amp;gt;getText(),&lt;br /&gt;
										&amp;quot;yyyy/MM/dd&amp;quot;, // Internal format&lt;br /&gt;
										localDate)&lt;br /&gt;
			&amp;amp;&amp;amp; icu.CeguiStringToDateTime(	static_cast&amp;lt;Editbox*&amp;gt;(winMgr.getWindow(&amp;quot;TimeValue&amp;quot;))-&amp;gt;getText(),&lt;br /&gt;
											&amp;quot;HH:mm:ss&amp;quot;, // Internal format&lt;br /&gt;
											localTime) )&lt;br /&gt;
		{&lt;br /&gt;
			String formattedDate, formattedTime;&lt;br /&gt;
			if(icu.formatDateTime(	localDate,&lt;br /&gt;
									static_cast&amp;lt;Editbox*&amp;gt;(winMgr.getWindow(&amp;quot;DateFormat&amp;quot;))-&amp;gt;getText(),&lt;br /&gt;
									formattedDate)&lt;br /&gt;
				&amp;amp;&amp;amp; icu.formatDateTime(	localTime,&lt;br /&gt;
										static_cast&amp;lt;Editbox*&amp;gt;(winMgr.getWindow(&amp;quot;TimeFormat&amp;quot;))-&amp;gt;getText(),&lt;br /&gt;
										formattedTime)&lt;br /&gt;
				)&lt;br /&gt;
				static_cast&amp;lt;Editbox*&amp;gt;(winMgr.getWindow(&amp;quot;LocalDateTimeFormattedValue&amp;quot;))-&amp;gt;setText(formattedDate + &amp;quot; &amp;quot; + formattedTime);&lt;br /&gt;
&lt;br /&gt;
			// GMT time&lt;br /&gt;
			if( icu.CeguiStringToDateTime(static_cast&amp;lt;Editbox*&amp;gt;(winMgr.getWindow(&amp;quot;LocalDateTimeFormattedValue&amp;quot;))-&amp;gt;getText(),&lt;br /&gt;
											&amp;quot;yyyy/MM/dd HH:mm:ss&amp;quot;,&lt;br /&gt;
											gmtDateTime)&lt;br /&gt;
				&amp;amp;&amp;amp; icu.localToGmt(localDate, localTime, gmtDate, gmtTime)&lt;br /&gt;
				&amp;amp;&amp;amp; icu.formatDateTime(gmtDate, &amp;quot;yyyy/MM/dd&amp;quot;, formattedDate)&lt;br /&gt;
				&amp;amp;&amp;amp; icu.formatDateTime(gmtTime, &amp;quot;HH:mm:ss&amp;quot;, formattedTime)&lt;br /&gt;
				)&lt;br /&gt;
				static_cast&amp;lt;Editbox*&amp;gt;(winMgr.getWindow(&amp;quot;GmtDateTimeFormattedValue&amp;quot;))-&amp;gt;setText(formattedDate + &amp;quot; &amp;quot; + formattedTime);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool onSpinnerValueChanged(const CEGUI::EventArgs&amp;amp; e)&lt;br /&gt;
	{&lt;br /&gt;
		// Reformat the displayed value into a locale appropriate format&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
		Spinner* spinner = static_cast&amp;lt;Spinner*&amp;gt;(winMgr.getWindow(&amp;quot;Spinner&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
		String formattedValue;&lt;br /&gt;
		if( icu.formatNumber(spinner-&amp;gt;getCurrentValue(), &amp;quot;#0.00&amp;quot;, formattedValue) )&lt;br /&gt;
		{&lt;br /&gt;
			// Disable the Editbox events, especially the EventTextChanged that&lt;br /&gt;
			// triggers Spinner::handleEditTextChange, which attempts to convert&lt;br /&gt;
			// the textual value into a non-localised numeric value&lt;br /&gt;
			Editbox* editbox = static_cast&amp;lt;Editbox*&amp;gt;(winMgr.getWindow(spinner-&amp;gt;getName() + &amp;quot;__auto_editbox__&amp;quot;));&lt;br /&gt;
			bool muted = editbox-&amp;gt;isMuted();&lt;br /&gt;
			editbox-&amp;gt;setMutedState(true);&lt;br /&gt;
			spinner-&amp;gt;setText(formattedValue);&lt;br /&gt;
			editbox-&amp;gt;setMutedState(muted);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool onCharacterChanged(const CEGUI::EventArgs&amp;amp; e)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
		EventArgs eventArgs;&lt;br /&gt;
		static_cast&amp;lt;PushButton*&amp;gt;(winMgr.getWindow(&amp;quot;CharacterFormatButton&amp;quot;))-&amp;gt;fireEvent(PushButton::EventClicked, eventArgs);&lt;br /&gt;
&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool onCharacterFormatClicked(const CEGUI::EventArgs&amp;amp; e)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
		String formattedText;&lt;br /&gt;
		if( icu.formatText(static_cast&amp;lt;Editbox*&amp;gt;(winMgr.getWindow(&amp;quot;CharacterValue&amp;quot;))-&amp;gt;getText(),&lt;br /&gt;
							static_cast&amp;lt;Editbox*&amp;gt;(winMgr.getWindow(&amp;quot;CharacterFormat&amp;quot;))-&amp;gt;getText(),&lt;br /&gt;
							&amp;quot;*&amp;quot;,&lt;br /&gt;
							formattedText) )&lt;br /&gt;
			static_cast&amp;lt;Editbox*&amp;gt;(winMgr.getWindow(&amp;quot;CharacterFormattedValue&amp;quot;))-&amp;gt;setText(formattedText);&lt;br /&gt;
&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#endif // _FormattedData_h_&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===main.cpp===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#if defined( __WIN32__ ) || defined( _WIN32 )&lt;br /&gt;
	#define WIN32_LEAN_AND_MEAN&lt;br /&gt;
	#define NOMINMAX&lt;br /&gt;
	#include &amp;quot;windows.h&amp;quot;&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
#include &amp;quot;FormattedNumericData.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#if defined( __WIN32__ ) || defined( _WIN32 )&lt;br /&gt;
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine,int nCmdShow)&lt;br /&gt;
#else&lt;br /&gt;
int main(int argc, char *argv[])&lt;br /&gt;
#endif&lt;br /&gt;
{&lt;br /&gt;
    DemoSample app;&lt;br /&gt;
    return app.run();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===FormattedData.layout===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;GUILayout &amp;gt;&lt;br /&gt;
    &amp;lt;Window Type=&amp;quot;DefaultWindow&amp;quot; Name=&amp;quot;Root&amp;quot; &amp;gt;&lt;br /&gt;
        &amp;lt;Property Name=&amp;quot;InheritsAlpha&amp;quot; Value=&amp;quot;False&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;Property Name=&amp;quot;UnifiedMaxSize&amp;quot; Value=&amp;quot;{{1,0},{1,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0,0},{0,0},{1,0},{1,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;Window Type=&amp;quot;TaharezLook/FrameWindow&amp;quot; Name=&amp;quot;FrameWindow&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;TitlebarFont&amp;quot; Value=&amp;quot;Commonwealth-10&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;CaptionColour&amp;quot; Value=&amp;quot;00FFFFFF&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;UnifiedMaxSize&amp;quot; Value=&amp;quot;{{1,0},{1,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;TitlebarEnabled&amp;quot; Value=&amp;quot;True&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.07125,0},{0.013335,0},{0.910001,0},{0.873733,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;MouseCursorImage&amp;quot; Value=&amp;quot;set:TaharezLook image:MouseTarget&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/Spinner&amp;quot; Name=&amp;quot;Spinner&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;10.00&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;StepSize&amp;quot; Value=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;CurrentValue&amp;quot; Value=&amp;quot;10&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;MaximumValue&amp;quot; Value=&amp;quot;32767&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;MinimumValue&amp;quot; Value=&amp;quot;-32768&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedMaxSize&amp;quot; Value=&amp;quot;{{1,0},{1,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.8473,0},{0.731682,0},{0.951964,0},{0.790123,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/StaticText&amp;quot; Name=&amp;quot;SpinnerLabel&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Localised Spinner widget with 2 decimals:&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedMaxSize&amp;quot; Value=&amp;quot;{{1,0},{1,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.395457,0},{0.731682,0},{0.836346,0},{0.790123,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/Editbox&amp;quot; Name=&amp;quot;CurrencyFormattedValue&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;ReadOnly&amp;quot; Value=&amp;quot;True&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;MaxTextLength&amp;quot; Value=&amp;quot;1073741823&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedMaxSize&amp;quot; Value=&amp;quot;{{1,0},{1,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.616765,0},{0.203821,0},{0.954642,0},{0.262262,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/RadioButton&amp;quot; Name=&amp;quot;RadioCAD&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Canadian (CAD)&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedMaxSize&amp;quot; Value=&amp;quot;{{1,0},{1,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.430655,0},{0.158378,0},{0.614153,0},{0.187144,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/RadioButton&amp;quot; Name=&amp;quot;RadioMRO&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Font&amp;quot; Value=&amp;quot;Commonwealth-10&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Mauritania (MRO)&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedMaxSize&amp;quot; Value=&amp;quot;{{1,0},{1,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.430655,0},{0.26902,0},{0.614153,0},{0.297787,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/RadioButton&amp;quot; Name=&amp;quot;RadioUSD&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Font&amp;quot; Value=&amp;quot;Commonwealth-10&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;US (USD)&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedMaxSize&amp;quot; Value=&amp;quot;{{1,0},{1,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.430655,0},{0.195183,0},{0.5605,0},{0.22395,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/RadioButton&amp;quot; Name=&amp;quot;RadioEUR&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Font&amp;quot; Value=&amp;quot;Commonwealth-10&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Euro (EUR)&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedMaxSize&amp;quot; Value=&amp;quot;{{1,0},{1,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.430655,0},{0.232215,0},{0.5605,0},{0.260983,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/StaticText&amp;quot; Name=&amp;quot;CountriesLabel&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Countries:&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedMaxSize&amp;quot; Value=&amp;quot;{{1,0},{1,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.022504,0},{0.069049,0},{0.132414,0},{0.117804,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/StaticText&amp;quot; Name=&amp;quot;LanguagesLabel&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Font&amp;quot; Value=&amp;quot;Commonwealth-10&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Languages:&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedMaxSize&amp;quot; Value=&amp;quot;{{1,0},{1,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.268405,0},{0.069049,0},{0.385766,0},{0.117804,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/Combobox&amp;quot; Name=&amp;quot;Countries&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedMaxSize&amp;quot; Value=&amp;quot;{{1,0},{1,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.142027,0},{0.069049,0},{0.245976,0},{0.902039,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;MaxEditTextLength&amp;quot; Value=&amp;quot;1073741823&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/Combobox&amp;quot; Name=&amp;quot;Languages&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Font&amp;quot; Value=&amp;quot;Commonwealth-10&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedMaxSize&amp;quot; Value=&amp;quot;{{1,0},{1,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.395379,0},{0.069049,0},{0.499329,0},{0.90204,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;MaxEditTextLength&amp;quot; Value=&amp;quot;1073741823&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/StaticText&amp;quot; Name=&amp;quot;Separator1&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedMaxSize&amp;quot; Value=&amp;quot;{{1,0},{1,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.013562,0},{0.141452,0},{0.995305,0},{0.150048,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/StaticText&amp;quot; Name=&amp;quot;Separator2&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Font&amp;quot; Value=&amp;quot;Commonwealth-10&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedMaxSize&amp;quot; Value=&amp;quot;{{1,0},{1,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.013562,0},{0.309408,0},{0.995305,0},{0.318004,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/StaticText&amp;quot; Name=&amp;quot;Separator3&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Font&amp;quot; Value=&amp;quot;Commonwealth-10&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedMaxSize&amp;quot; Value=&amp;quot;{{1,0},{1,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.013562,0},{0.553045,0},{0.995305,0},{0.561642,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/StaticText&amp;quot; Name=&amp;quot;Separator5&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Font&amp;quot; Value=&amp;quot;Commonwealth-10&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedMaxSize&amp;quot; Value=&amp;quot;{{1,0},{1,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.007601,0},{0.814139,0},{0.989344,0},{0.822736,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/StaticText&amp;quot; Name=&amp;quot;NumericFormatLabel&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Font&amp;quot; Value=&amp;quot;Commonwealth-10&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Format:&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedMaxSize&amp;quot; Value=&amp;quot;{{1,0},{1,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.036292,0},{0.403136,0},{0.141946,0},{0.461576,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/Editbox&amp;quot; Name=&amp;quot;NumericFormat&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Font&amp;quot; Value=&amp;quot;Commonwealth-10&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;#,##0.03&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;MaxTextLength&amp;quot; Value=&amp;quot;1073741823&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedMaxSize&amp;quot; Value=&amp;quot;{{1,0},{1,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.150298,0},{0.403136,0},{0.421111,0},{0.461576,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/Button&amp;quot; Name=&amp;quot;NumericFormatButton&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Apply&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedMaxSize&amp;quot; Value=&amp;quot;{{1,0},{1,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.473919,0},{0.370638,0},{0.603204,0},{0.429079,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;MouseCursorImage&amp;quot; Value=&amp;quot;set:TaharezLook image:MouseArrow&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/Editbox&amp;quot; Name=&amp;quot;NumericFormattedValue&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Font&amp;quot; Value=&amp;quot;Commonwealth-10&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;ReadOnly&amp;quot; Value=&amp;quot;True&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;MaxTextLength&amp;quot; Value=&amp;quot;1073741823&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedMaxSize&amp;quot; Value=&amp;quot;{{1,0},{1,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.616765,0},{0.339418,0},{0.954642,0},{0.397859,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/StaticText&amp;quot; Name=&amp;quot;DateFormatLabel&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Font&amp;quot; Value=&amp;quot;Commonwealth-10&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Format:&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedMaxSize&amp;quot; Value=&amp;quot;{{1,0},{1,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.036292,0},{0.63711,0},{0.141946,0},{0.695551,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/Editbox&amp;quot; Name=&amp;quot;DateFormat&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Font&amp;quot; Value=&amp;quot;Commonwealth-10&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;yyyy/MM/dd&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;MaxTextLength&amp;quot; Value=&amp;quot;1073741823&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedMaxSize&amp;quot; Value=&amp;quot;{{1,0},{1,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.150298,0},{0.63711,0},{0.269099,0},{0.695551,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/StaticText&amp;quot; Name=&amp;quot;DateValueLabel&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Font&amp;quot; Value=&amp;quot;Commonwealth-10&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Date:&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedMaxSize&amp;quot; Value=&amp;quot;{{1,0},{1,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.036292,0},{0.574987,0},{0.141946,0},{0.633428,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/Editbox&amp;quot; Name=&amp;quot;DateValue&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Font&amp;quot; Value=&amp;quot;Commonwealth-10&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;2006/05/14&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;MaxTextLength&amp;quot; Value=&amp;quot;1073741823&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedMaxSize&amp;quot; Value=&amp;quot;{{1,0},{1,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.150298,0},{0.574987,0},{0.267608,0},{0.633428,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/Button&amp;quot; Name=&amp;quot;DateTimeFormatButton&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Font&amp;quot; Value=&amp;quot;Commonwealth-10&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Apply&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedMaxSize&amp;quot; Value=&amp;quot;{{1,0},{1,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.473919,0},{0.610743,0},{0.603205,0},{0.669184,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;MouseCursorImage&amp;quot; Value=&amp;quot;set:TaharezLook image:MouseArrow&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/Editbox&amp;quot; Name=&amp;quot;LocalDateTimeFormattedValue&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Font&amp;quot; Value=&amp;quot;Commonwealth-10&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;ReadOnly&amp;quot; Value=&amp;quot;True&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;MaxTextLength&amp;quot; Value=&amp;quot;1073741823&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedMaxSize&amp;quot; Value=&amp;quot;{{1,0},{1,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.724067,0},{0.578862,0},{0.954642,0},{0.637303,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/Editbox&amp;quot; Name=&amp;quot;TimeValue&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Font&amp;quot; Value=&amp;quot;Commonwealth-10&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;12:00:01&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;MaxTextLength&amp;quot; Value=&amp;quot;1073741823&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedMaxSize&amp;quot; Value=&amp;quot;{{1,0},{1,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.351492,0},{0.574987,0},{0.441976,0},{0.633428,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/StaticText&amp;quot; Name=&amp;quot;TimeValueLabel&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Font&amp;quot; Value=&amp;quot;Commonwealth-10&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Time:&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedMaxSize&amp;quot; Value=&amp;quot;{{1,0},{1,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.280703,0},{0.574987,0},{0.347609,0},{0.633428,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/Editbox&amp;quot; Name=&amp;quot;TimeFormat&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Font&amp;quot; Value=&amp;quot;Commonwealth-10&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;HH:mm:ss&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;MaxTextLength&amp;quot; Value=&amp;quot;1073741823&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedMaxSize&amp;quot; Value=&amp;quot;{{1,0},{1,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.281446,0},{0.63711,0},{0.441976,0},{0.695551,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/StaticText&amp;quot; Name=&amp;quot;NumericValueLabel&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Font&amp;quot; Value=&amp;quot;Commonwealth-10&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Numeric:&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedMaxSize&amp;quot; Value=&amp;quot;{{1,0},{1,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.036292,0},{0.339418,0},{0.141946,0},{0.397857,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/Editbox&amp;quot; Name=&amp;quot;NumericValue&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Font&amp;quot; Value=&amp;quot;Commonwealth-10&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;123456.78&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;MaxTextLength&amp;quot; Value=&amp;quot;1073741823&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedMaxSize&amp;quot; Value=&amp;quot;{{1,0},{1,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.150298,0},{0.339418,0},{0.421111,0},{0.397858,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/StaticText&amp;quot; Name=&amp;quot;CurrencyValueLabel&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Font&amp;quot; Value=&amp;quot;Commonwealth-10&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Currency:&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedMaxSize&amp;quot; Value=&amp;quot;{{1,0},{1,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.036292,0},{0.203821,0},{0.141946,0},{0.26226,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/Editbox&amp;quot; Name=&amp;quot;CurrencyValue&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Font&amp;quot; Value=&amp;quot;Commonwealth-10&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;123456.78&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;MaxTextLength&amp;quot; Value=&amp;quot;1073741823&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedMaxSize&amp;quot; Value=&amp;quot;{{1,0},{1,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.150298,0},{0.203821,0},{0.421111,0},{0.262262,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/StaticText&amp;quot; Name=&amp;quot;Separator4&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Font&amp;quot; Value=&amp;quot;Commonwealth-10&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedMaxSize&amp;quot; Value=&amp;quot;{{1,0},{1,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.013562,0},{0.702202,0},{0.995305,0},{0.710798,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/Button&amp;quot; Name=&amp;quot;EveryISO&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Load every country and languages&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedMaxSize&amp;quot; Value=&amp;quot;{{1,0},{1,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.559611,0},{0.069049,0},{0.94523,0},{0.12749,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;MouseCursorImage&amp;quot; Value=&amp;quot;set:TaharezLook image:MouseArrow&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/Editbox&amp;quot; Name=&amp;quot;NumericFormattedText&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Font&amp;quot; Value=&amp;quot;Commonwealth-10&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;ReadOnly&amp;quot; Value=&amp;quot;True&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;MaxTextLength&amp;quot; Value=&amp;quot;1073741823&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedMaxSize&amp;quot; Value=&amp;quot;{{1,0},{1,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.153278,0},{0.482989,0},{0.954642,0},{0.54143,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/Editbox&amp;quot; Name=&amp;quot;CharacterFormattedValue&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Font&amp;quot; Value=&amp;quot;Commonwealth-10&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;ReadOnly&amp;quot; Value=&amp;quot;True&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;MaxTextLength&amp;quot; Value=&amp;quot;1073741823&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedMaxSize&amp;quot; Value=&amp;quot;{{1,0},{1,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.616765,0},{0.883872,0},{0.954642,0},{0.942313,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/Editbox&amp;quot; Name=&amp;quot;CharacterFormat&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Font&amp;quot; Value=&amp;quot;Commonwealth-10&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;000 000 000&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;MaxTextLength&amp;quot; Value=&amp;quot;1073741823&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedMaxSize&amp;quot; Value=&amp;quot;{{1,0},{1,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.150298,0},{0.908716,0},{0.421111,0},{0.967156,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/Button&amp;quot; Name=&amp;quot;CharacterFormatButton&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Font&amp;quot; Value=&amp;quot;Commonwealth-10&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Apply&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedMaxSize&amp;quot; Value=&amp;quot;{{1,0},{1,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.473919,0},{0.883872,0},{0.603205,0},{0.942313,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;MouseCursorImage&amp;quot; Value=&amp;quot;set:TaharezLook image:MouseArrow&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/Editbox&amp;quot; Name=&amp;quot;CharacterValue&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Font&amp;quot; Value=&amp;quot;Commonwealth-10&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;123456&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;MaxTextLength&amp;quot; Value=&amp;quot;1073741823&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedMaxSize&amp;quot; Value=&amp;quot;{{1,0},{1,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.150298,0},{0.844998,0},{0.421111,0},{0.903438,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/StaticText&amp;quot; Name=&amp;quot;LocalDateTimeFormattedLabel&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Font&amp;quot; Value=&amp;quot;Commonwealth-10&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Local:&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedMaxSize&amp;quot; Value=&amp;quot;{{1,0},{1,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.641358,0},{0.578862,0},{0.718697,0},{0.637302,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/StaticText&amp;quot; Name=&amp;quot;GmtDateTimeFormattedLabel&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Font&amp;quot; Value=&amp;quot;Commonwealth-10&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;GMT:&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedMaxSize&amp;quot; Value=&amp;quot;{{1,0},{1,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.641358,0},{0.63711,0},{0.718697,0},{0.69555,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/Editbox&amp;quot; Name=&amp;quot;GmtDateTimeFormattedValue&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Font&amp;quot; Value=&amp;quot;Commonwealth-10&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;ReadOnly&amp;quot; Value=&amp;quot;True&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;MaxTextLength&amp;quot; Value=&amp;quot;1073741823&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedMaxSize&amp;quot; Value=&amp;quot;{{1,0},{1,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.725558,0},{0.63711,0},{0.954642,0},{0.695551,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/StaticText&amp;quot; Name=&amp;quot;NumericValueLabel1&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Font&amp;quot; Value=&amp;quot;Commonwealth-10&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Numeric:&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedMaxSize&amp;quot; Value=&amp;quot;{{1,0},{1,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.036292,0},{0.844998,0},{0.141946,0},{0.903437,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/StaticText&amp;quot; Name=&amp;quot;NumericFormatLabel1&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Font&amp;quot; Value=&amp;quot;Commonwealth-10&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Format:&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedMaxSize&amp;quot; Value=&amp;quot;{{1,0},{1,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.036292,0},{0.908716,0},{0.141946,0},{0.967156,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/Editbox&amp;quot; Name=&amp;quot;NumericFormattedOrdinal&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Font&amp;quot; Value=&amp;quot;Commonwealth-10&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;ReadOnly&amp;quot; Value=&amp;quot;True&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;MaxTextLength&amp;quot; Value=&amp;quot;1073741823&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedMaxSize&amp;quot; Value=&amp;quot;{{1,0},{1,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.616765,0},{0.403136,0},{0.954642,0},{0.461577,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
        &amp;lt;/Window&amp;gt;&lt;br /&gt;
    &amp;lt;/Window&amp;gt;&lt;br /&gt;
&amp;lt;/GUILayout&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Makofierce</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=Scheme_files&amp;diff=3610</id>
		<title>Scheme files</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=Scheme_files&amp;diff=3610"/>
				<updated>2011-01-07T09:53:41Z</updated>
		
		<summary type="html">&lt;p&gt;Makofierce: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
CEGUI is pretty modular in many aspects. Resource loading, rendering, scripting and window-factories, can all be controlled by client modules.&lt;br /&gt;
The scheme file concerns resource loading.&lt;br /&gt;
&lt;br /&gt;
The first thing most users do when initialising CEGUI, is to load a scheme. This could for example be &amp;quot;../datafiles/schemes/TaharezLookSkin.scheme&amp;quot;. This scheme file is probably the most used currently, and will load the Falagard version of classic TaharezLook into the library.&lt;br /&gt;
&lt;br /&gt;
If one takes a closer look at this file, they'll see that it is a XML document, ready to be edited... The nice thing here is that it's no longer necessary to recompile, to change the resources to be loaded. Furthermore a scheme acts like a &amp;quot;resource package&amp;quot; as we can unload all resources that is loaded by a scheme given we know its name. From a coding perspective this is nice as it simplifies the resource management. All you have to create/destroy is the scheme it self. CEGUI worries about all the individual resources specified in the XML file for you...&lt;br /&gt;
&lt;br /&gt;
This document is largely based on the 'Readme.txt' file in the 'XMLRefSchema' directory of the source distribution by Paul himself.&lt;br /&gt;
&lt;br /&gt;
== Document structure ==&lt;br /&gt;
A CEGUI sheme follows a &amp;quot;strict&amp;quot; order dependent structure that looks like this:&lt;br /&gt;
&lt;br /&gt;
* '''GUIScheme'''&lt;br /&gt;
** '''Imageset'''&lt;br /&gt;
** '''ImagesetFromImage'''&lt;br /&gt;
** '''Font'''&lt;br /&gt;
** '''LookNFeel'''&lt;br /&gt;
** '''WindowSet'''&lt;br /&gt;
*** '''WindowFactory'''&lt;br /&gt;
** '''WindowRendererSet''' (CEGUI 0.5.X only)&lt;br /&gt;
*** '''WindowRendererFactory'''&lt;br /&gt;
** '''WindowAlias'''&lt;br /&gt;
** '''FalagardMapping'''&lt;br /&gt;
&lt;br /&gt;
All elements are optional and can be repeated. Two imagesets - for example - are after all a fairly common ;-)&lt;br /&gt;
&lt;br /&gt;
Each element will be described individually below.&lt;br /&gt;
&lt;br /&gt;
== GUIScheme ==&lt;br /&gt;
Root element. Has a name attribute, and a collection of sub-elements which can be Imageset, ImagesetFromFile, Font, LookNFeel, WindowSet, FalagardMapping and WindowAlias elements.&lt;br /&gt;
&lt;br /&gt;
Attributes:&lt;br /&gt;
* '''Name''' - Specifies the name that the scheme will use within the system. ''Required''.&lt;br /&gt;
&lt;br /&gt;
''GUIScheme'' is the root element and is the only &amp;quot;global&amp;quot; tag.&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
 &amp;lt;GUIScheme Name=&amp;quot;MyScheme&amp;quot;&amp;gt;&lt;br /&gt;
     ...&lt;br /&gt;
     ... resources ...&lt;br /&gt;
     ...&lt;br /&gt;
 &amp;lt;/GUIScheme&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All schemes will have this XML as all the &amp;quot;magic&amp;quot; goes inside it :-)&lt;br /&gt;
&lt;br /&gt;
=== Imageset ===&lt;br /&gt;
Specifies an Imageset to be loaded as part of this scheme.  Has attributes but no sub-elements.&lt;br /&gt;
If an imageset with the requested name already exists, the file specified is not loaded.&lt;br /&gt;
&lt;br /&gt;
Attributes:&lt;br /&gt;
* '''Name''' - The name of the Imageset. ''Required''.&lt;br /&gt;
* '''Filename''' - Filename of the Imageset file.  If the imageset created by this file does not = Name above, an exception is thrown. ''Required''.&lt;br /&gt;
* '''ResourceGroup''' - The resource group identifier to pass to the resource provider when loading the file. ''Optional''.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
 &amp;lt;GUIScheme Name=&amp;quot;MyScheme&amp;quot;&amp;gt;&lt;br /&gt;
     '''&amp;lt;Imageset Name=&amp;quot;MyImages&amp;quot; Filename=&amp;quot;../datafiles/imagesets/MyImages.imageset&amp;quot; /&amp;gt;'''&lt;br /&gt;
 &amp;lt;/GUIScheme&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example the file &amp;quot;../datafiles/imagesets/MyImages.imageset&amp;quot; must define the imageset named &amp;quot;MyImages&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== ImagesetFromFile ===&lt;br /&gt;
Specifies an Imageset to be loaded as part of this scheme.  Has attributes but no sub-elements.&lt;br /&gt;
If an imageset with the requested name already exists, the file specified is not loaded.&lt;br /&gt;
&lt;br /&gt;
Attributes:&lt;br /&gt;
* '''Name''' - The name of the Imageset. ''Required''.&lt;br /&gt;
* '''Filename''' - Filename of the image file to load in order to create this Imageset. ''Required''.&lt;br /&gt;
* '''ResourceGroup''' - The resource group identifier to pass to the resource provider when loading the image file. ''Optional''.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
 &amp;lt;GUIScheme Name=&amp;quot;MyScheme&amp;quot;&amp;gt;&lt;br /&gt;
     '''&amp;lt;ImagesetFromFile Name=&amp;quot;MyBackground&amp;quot; Filename=&amp;quot;../datafiles/imagesets/MyBackground.tga&amp;quot; /&amp;gt;'''&lt;br /&gt;
 &amp;lt;/GUIScheme&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example the file &amp;quot;../datafiles/imagesets/MyBackground&amp;quot; is a Targa (.TGA) image file. By default an Imageset loaded like this defines a single image named '''full_image''' that covers the entire texture (the content of the image file).&lt;br /&gt;
&lt;br /&gt;
=== Font ===&lt;br /&gt;
Specifies a Font to be loaded as part of the scheme. Has attributes but no sub-elements.&lt;br /&gt;
If a font with the requested name already exists, the file specified is not loaded.&lt;br /&gt;
&lt;br /&gt;
Attributes:&lt;br /&gt;
* '''Name''' - The name of the Font ''Required''.&lt;br /&gt;
* '''Filename''' - Filename of the Font file.  If the font created by this file does not = Name above, an exception is thrown. ''Required''.&lt;br /&gt;
* '''ResourceGroup''' - The resource group identifier to pass to the resource provider when loading the file. ''Optional''.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
 &amp;lt;GUIScheme Name=&amp;quot;MyScheme&amp;quot;&amp;gt;&lt;br /&gt;
     '''&amp;lt;Font Name=&amp;quot;MyFont&amp;quot; Filename=&amp;quot;../datafiles/fonts/MyFont.font&amp;quot; /&amp;gt;'''&lt;br /&gt;
 &amp;lt;/GUIScheme&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Font element always loads font XML files. These are not covered here.&lt;br /&gt;
&lt;br /&gt;
=== LookNFeel ===&lt;br /&gt;
Specifies a LookNFeel to be loaded as part of the scheme. Has attributes but no sub-elements.&lt;br /&gt;
The XML file loaded by this element may contain many widget looks which will all become available.&lt;br /&gt;
&lt;br /&gt;
Attributes:&lt;br /&gt;
* '''Filename''' - Filename of the LookNFeel file to parse. ''Required''.&lt;br /&gt;
* '''ResourceGroup''' - The resource group identifier to pass to the resource provider when loading the file. ''Optional''.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
 &amp;lt;GUIScheme Name=&amp;quot;MyScheme&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;Imageset Name=&amp;quot;MyImages&amp;quot; Filename=&amp;quot;../datafiles/imagesets/MyImages.imageset&amp;quot; /&amp;gt;&lt;br /&gt;
     '''&amp;lt;LookNFeel Filename=&amp;quot;../datafiles/looknfeel/MySkin.looknfeel&amp;quot; /&amp;gt;'''&lt;br /&gt;
 &amp;lt;/GUIScheme&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Loading a look'n'feel specification is not enough. We must create a FalagardMapping as well. More on this soon. Just know that now the widget looks specified in MySkin.looknfeel are available to falagard mappings. At least the imageset we use in MySkin is available ;-)&lt;br /&gt;
&lt;br /&gt;
=== WindowSet ===&lt;br /&gt;
Specifies a module containing concrete GUI elements and their factories. Has attributes and zero or more WindowFactory sub-elements. That is you can optionally specify WindowFactory sub-elements. If they are omitted all available factories in the module are loaded.&lt;br /&gt;
&lt;br /&gt;
Attributes:&lt;br /&gt;
* '''Filename''' - Specifies the name of the loadable module (dll / .so / etc). ''Required''.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
 &amp;lt;GUIScheme Name=&amp;quot;MyScheme&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;Imageset Name=&amp;quot;MyImages&amp;quot; Filename=&amp;quot;../datafiles/imagesets/MyImages.imageset&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;lt;LookNFeel Filename=&amp;quot;../datafiles/looknfeel/MySkin.looknfeel&amp;quot; /&amp;gt;&lt;br /&gt;
     '''&amp;lt;WindowSet Filename=&amp;quot;CEGUIFalagardBase&amp;quot; /&amp;gt;'''&lt;br /&gt;
 &amp;lt;/GUIScheme&amp;gt;&lt;br /&gt;
&lt;br /&gt;
CEGUI 0.4.X provides 3 windowsets. Falagard, WindowsLook and TaharezLook. The above sample code is only valid for CEGUI 0.4.X.&lt;br /&gt;
&lt;br /&gt;
CEGUI 0.5.X provides no widget sets. All the core widgets are part of the CEGUIBase library. It's still there though as it allows user widget modules to be loaded dynamically.&lt;br /&gt;
&lt;br /&gt;
=== WindowRendererSet (CEGUI 0.5.X only) ===&lt;br /&gt;
Specifies a module containing WindowRenderer classes and their factories. Has attributes and zero or more WindowRendererFactory sub-elements. That is you can optionally specify WindowRendererFactory sub-elements. If they are omitted all available factories in the module are loaded.&lt;br /&gt;
&lt;br /&gt;
Attributes:&lt;br /&gt;
* '''Filename''' - Specifies the name of the loadable module (dll / .so / etc). ''Required''.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
 &amp;lt;GUIScheme Name=&amp;quot;MyScheme&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;Imageset Name=&amp;quot;MyImages&amp;quot; Filename=&amp;quot;../datafiles/imagesets/MyImages.imageset&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;lt;LookNFeel Filename=&amp;quot;../datafiles/looknfeel/MySkin.looknfeel&amp;quot; /&amp;gt;&lt;br /&gt;
     '''&amp;lt;WindowRendererSet Filename=&amp;quot;CEGUIFalagardWRBase&amp;quot; /&amp;gt;'''&lt;br /&gt;
 &amp;lt;/GUIScheme&amp;gt;&lt;br /&gt;
&lt;br /&gt;
CEGUI 0.5.0 only provides one WindowRendererSet. Falagard. It's perfectly possible to write your own WindowRendererSet in C++. Take a look at the CEGUIFalagardWRBase module if you're curious :)&lt;br /&gt;
&lt;br /&gt;
=== WindowFactory ===&lt;br /&gt;
Specifies the factory name (GUI window type name) from the loadable module that is to be added to the list of available factories. Has attributes but no sub-elements.&lt;br /&gt;
&lt;br /&gt;
Attributes:&lt;br /&gt;
* '''Name''' - Name of the factory / window type which is to be added.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
 &amp;lt;GUIScheme Name=&amp;quot;MyScheme&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;Imageset Name=&amp;quot;MyImages&amp;quot; Filename=&amp;quot;../datafiles/imagesets/MyImages.imageset&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;lt;LookNFeel Filename=&amp;quot;../datafiles/looknfeel/MySkin.looknfeel&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;lt;WindowSet Filename=&amp;quot;CEGUIFalagardBase&amp;quot;&amp;gt;&lt;br /&gt;
         '''&amp;lt;WindowFactory Name=&amp;quot;Falagard/Button&amp;quot; /&amp;gt;'''&lt;br /&gt;
     &amp;lt;/WindowSet&amp;gt;&lt;br /&gt;
 &amp;lt;/GUIScheme&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example we only load the &amp;quot;Falagard/Button&amp;quot; factory. If you only need a few widgets and not the whole set, this could save you some memory.&lt;br /&gt;
&lt;br /&gt;
=== FalagardMapping in CEGUI 0.4.X ===&lt;br /&gt;
Maps a look'n'feel to a window factory and assigns the result to a new window type, in effect creating a new window factory for a specific look'n'feel.&lt;br /&gt;
Has attributes but no sub-elements.&lt;br /&gt;
&lt;br /&gt;
Attributes:&lt;br /&gt;
* '''WindowType''' - The name for the new &amp;quot;factory&amp;quot;. ''Required''.&lt;br /&gt;
* '''TargetType''' - The name of the target window factory which will have the look'n'feel assigned. ''Required''.&lt;br /&gt;
* '''LookNFeel''' - The name of the look'n'feel to use. That's the WidgetLook name from the Falagard XML. ''Required''.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
 &amp;lt;GUIScheme Name=&amp;quot;MyScheme&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;Imageset Name=&amp;quot;MyImages&amp;quot; Filename=&amp;quot;../datafiles/imagesets/MyImages.imageset&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;lt;LookNFeel Filename=&amp;quot;../datafiles/looknfeel/MySkin.looknfeel&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;lt;WindowSet Filename=&amp;quot;CEGUIFalagardBase&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;WindowFactory Name=&amp;quot;Falagard/Button&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;lt;/WindowSet&amp;gt;&lt;br /&gt;
     '''&amp;lt;FalagardMapping WindowType=&amp;quot;My/Button&amp;quot; TargetType=&amp;quot;Falagard/Button&amp;quot; LookNFeel=&amp;quot;MyButton&amp;quot; /&amp;gt;'''&lt;br /&gt;
 &amp;lt;/GUIScheme&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would be a proper scheme to use the look'n'feel created in  [[The Beginners Guide to Falagard skinning - Part I]]. The new type of button window would in this case be available from code or XML layouts by the type name &amp;quot;My/Button&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== FalagardMapping in CEGUI 0.5.X ===&lt;br /&gt;
Maps a look'n'feel to a window factory and assigns the result to a new window type, in effect creating a new window factory for a specific look'n'feel.&lt;br /&gt;
Has attributes but no sub-elements.&lt;br /&gt;
&lt;br /&gt;
Attributes:&lt;br /&gt;
* '''WindowType''' - The name for the new &amp;quot;factory&amp;quot;. ''Required''.&lt;br /&gt;
* '''TargetType''' - The name of the target window factory which will have the look'n'feel assigned. ''Required''.&lt;br /&gt;
* '''LookNFeel''' - The name of the look'n'feel to use. That's the WidgetLook name from the Falagard XML. ''Required''.&lt;br /&gt;
* '''Renderer''' - Then name of the window renderer factory to use. This module implements the widget rendering code. ''Required''.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
 &amp;lt;GUIScheme Name=&amp;quot;MyScheme&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;Imageset Name=&amp;quot;MyImages&amp;quot; Filename=&amp;quot;../datafiles/imagesets/MyImages.imageset&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;lt;LookNFeel Filename=&amp;quot;../datafiles/looknfeel/MySkin.looknfeel&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;lt;WindowSet Filename=&amp;quot;CEGUIFalagardWRBase&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;WindowFactory Name=&amp;quot;Falagard/Button&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;lt;/WindowSet&amp;gt;&lt;br /&gt;
     '''&amp;lt;FalagardMapping WindowType=&amp;quot;My/Button&amp;quot; TargetType=&amp;quot;CEGUI/PushButton&amp;quot; LookNFeel=&amp;quot;MyButton&amp;quot; Renderer=&amp;quot;Falagard/Button&amp;quot; /&amp;gt;'''&lt;br /&gt;
 &amp;lt;/GUIScheme&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would be a proper scheme to use the look'n'feel created in  [[The Beginners Guide to Falagard skinning - Part I]]. The new type of button window would in this case be available from code or XML layouts by the type name &amp;quot;My/Button&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== WindowAlias ===&lt;br /&gt;
Specifies an alias for a given window factory type or falagard mapping.  Has attributes but no sub-elements.&lt;br /&gt;
&lt;br /&gt;
Attributes:&lt;br /&gt;
* '''Alias''' - Name of the alias. This is the alternative name that 'Target' will be known by. ''Required''.&lt;br /&gt;
* '''Target''' - Name of the window factory type, falagard mapping or existing alias that is to (also) be known as 'Alias'. ''Required''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Discussion ==&lt;br /&gt;
The scheme is obviously a bit more than just loading resources. It also ties the resources together. All of it can be done in code, but using a scheme file is flexible, and avoids recompiling often.&lt;br /&gt;
&lt;br /&gt;
Schemes are especially useful for artists not familiar with C++ programming, as everything you &amp;quot;set up&amp;quot; in the scheme can be used from XML layouts.&lt;br /&gt;
With Falagard this means that you can totally customize the user interface if the program is properly configured to do so without ever talking to the developers ;)&lt;br /&gt;
&lt;br /&gt;
--[[User:lindquist|lindquist]] 03:49, 14 Dec 2005 (CET)&lt;/div&gt;</summary>
		<author><name>Makofierce</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=Introduction_To_Auto_Windows&amp;diff=3609</id>
		<title>Introduction To Auto Windows</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=Introduction_To_Auto_Windows&amp;diff=3609"/>
				<updated>2011-01-07T09:52:26Z</updated>
		
		<summary type="html">&lt;p&gt;Makofierce: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Introduction ===&lt;br /&gt;
The purpose of this article is to highlight the &amp;quot;Auto Window&amp;quot; and demonstrate a couple of the advanced possibilities that they enable within Crazy Eddie's GUI System.  The article will introduce the concept of the auto window, show where it is used in the unmodified system, and then go on to demonstrate how the developer can make use of the same ideas to solve certain problems.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== What is an Auto Window? ===&lt;br /&gt;
If you have used CEGUI at all, chances are that you have already used auto windows without knowing it; combo boxes, all the list widgets, and even the scroll bar and frame window are all compound widgets made up of multiple component widgets - those component widgets are classed as auto windows.&lt;br /&gt;
&lt;br /&gt;
An auto window is basically a widget that is created as a child component of another widget type, as defined in the LookNFeel skin by the use of the &amp;lt;Child&amp;gt; tag.  Many of the core widgets have requirements for auto windows that must be specified - the frame window for example requires that a titlebar and close button be specified.&lt;br /&gt;
&lt;br /&gt;
It is possible that there may be confusion in relation to LookNFeel specifications and window Layout specifications.  It appears there is some crossover of functionality since both provide a means for setting properties, specifying child widgets, and so on; be assured there actually isn't any crossover.  The parts of the system that deal with LookNFeel and Layouts are operating at totally different levels.  One potentially useful way to look at these two parts of the system is to consider the LookNFeel to specify a class (or maybe a template) for a widget, whilst the Layouts define and specify actual instances of those classes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== An Existing Example ===&lt;br /&gt;
The first thing we will do is take a look at an existing example.  Here is how the titlebar is specified for the WindowsLook frame window:&lt;br /&gt;
&lt;br /&gt;
 ...&lt;br /&gt;
 &amp;lt;Child type=&amp;quot;WindowsLook/Titlebar&amp;quot; nameSuffix=&amp;quot;__auto_titlebar__&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;Area&amp;gt;&lt;br /&gt;
         &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
             &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;/Dim&amp;gt;&lt;br /&gt;
         &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
             &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;/Dim&amp;gt;&lt;br /&gt;
         &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
             &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; type=&amp;quot;RightEdge&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;/Dim&amp;gt;&lt;br /&gt;
         &amp;lt;Dim type=&amp;quot;Height&amp;quot;&amp;gt;&lt;br /&gt;
             &amp;lt;FontDim type=&amp;quot;LineSpacing&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;DimOperator op=&amp;quot;Multiply&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;AbsoluteDim value=&amp;quot;1.5&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/DimOperator&amp;gt;&lt;br /&gt;
             &amp;lt;/FontDim&amp;gt;&lt;br /&gt;
         &amp;lt;/Dim&amp;gt;&lt;br /&gt;
     &amp;lt;/Area&amp;gt;&lt;br /&gt;
     &amp;lt;Property name=&amp;quot;AlwaysOnTop&amp;quot; value=&amp;quot;False&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;/Child&amp;gt;&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
Since this whole concept may be new to many readers, lets take this first example one part at a time.&lt;br /&gt;
&lt;br /&gt;
To open the definition we use the &amp;lt;Child&amp;gt; tag.  Here we need to supply two attributes to specify the type of window to be created and a name suffix to be used.  This is telling the system that whenever a widget using this WidgetLook (in this case &amp;quot;WindowsLook/FrameWindow&amp;quot;) is created, it should create and attach a child window of the specified type (&amp;quot;WindowsLook/Titlebar&amp;quot;) and name that child by appending the given suffix (&amp;quot;__auto_titlebar__&amp;quot;) to the base widget name.&lt;br /&gt;
&lt;br /&gt;
In this example, if you create a &amp;quot;WindowsLook/Framewindow&amp;quot; with the name &amp;quot;myWindow&amp;quot;, the system will automatically have created a &amp;quot;WindowsLook/Titlebar&amp;quot; named &amp;quot;myWindow__auto_titlebar__&amp;quot; and added it as a child to &amp;quot;myWindow&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Next we can see an &amp;lt;Area&amp;gt; tag.  The content in here defines the area that this child is to occupy within its parent (meaning all positions are relative to the parent's position, and scale co-ordinate components are fractions of the size of the parent).&lt;br /&gt;
&lt;br /&gt;
In this example the the title bar is positioned at absolute location (0,0) - so is at the top left of the parent.  The right edge is is specified as being a scale value of 1, which means the right edge will always be attached to the right edge of the parent.  The height is specified as being 1.5 times the linespacing value of the current font.&lt;br /&gt;
&lt;br /&gt;
Finally we see a &amp;lt;Property&amp;gt; tag.  We can list properties here to specify 'defaults' to be used for the component widget in instances of the widget being defined.  This provides a means to override default settings that may previously have been specified either in the core system code, or in the WidgetLook for the type being embedded.&lt;br /&gt;
&lt;br /&gt;
In this example we are ensuring that the titlebar is used with the always on top setting disabled.&lt;br /&gt;
&lt;br /&gt;
Note that we have skimmed over some of the specifics of this definition - this article is not intended as a tutorial on the Falagard system itself, just one specific capability of it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Accessing Auto Windows ===&lt;br /&gt;
Now we know what an auto window is and generally how they are created, you may be able to see that it is possible to access these windows directly - afterall they are actually the same as any other child window, just automatically created by the system.&lt;br /&gt;
&lt;br /&gt;
Sticking with the the FrameWindow, you might want to hear about mouse clicks on the title bar and assign a scripted event handler.  Your code could look something similar to this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
// get access to the titlebar attached to the frame window &amp;quot;myFrameWindow&amp;quot;&lt;br /&gt;
Window* titlebar = WindowManager::getSingleton().getWindow(&amp;quot;myFrameWindow__auto_titlebar__&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
// attach a scripted event handler to process mouse clicks&lt;br /&gt;
titlebar-&amp;gt;subscribeScriptedEvent(&amp;quot;MouseClick&amp;quot;, &amp;quot;handleTitlebarClick&amp;quot;);&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is very nice, but requires some code compilation so could be hard to play with and tweak.  What we really want to be doing is attaching our event handler from within the layout file like we would in the case of a &amp;quot;normal&amp;quot; window.  The CEGUI layout system provides a means for us to target auto windows within the layout file with the &amp;lt;AutoWindow&amp;gt; tag.&lt;br /&gt;
&lt;br /&gt;
The AutoWindow tag takes a single attribute &amp;quot;NameSuffix&amp;quot; which specifies the name suffix of the auto window we wish to target (if we continue our example, this would be &amp;quot;__auto_titlebar__&amp;quot; to target the titlebar of a FrameWindow).  The AutoWindow tag may then then contain LayoutImport (yes, you really can import an entire layout as content for an auto window), Property, Event, and other Window and AutoWindow (to target auto windows of auto windows!) tags.&lt;br /&gt;
&lt;br /&gt;
Thus, to attach a scripted event handler to the title bar of a frame window in a layout you could do this:&lt;br /&gt;
&lt;br /&gt;
 ...&lt;br /&gt;
 &amp;lt;Window Type=&amp;quot;WindowsLook/FrameWindow&amp;quot; Name=&amp;quot;myFrameWindow&amp;quot; &amp;gt;&lt;br /&gt;
     &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Auto Window Example&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;lt;Property Name=&amp;quot;UnifiedMaxSize&amp;quot; Value=&amp;quot;{{1,0},{1,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.25,0},{0.25,0},{0.8,0},{0.8,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
     &amp;lt;AutoWindow NameSuffix=&amp;quot;__auto_titlebar__&amp;quot; &amp;gt;&lt;br /&gt;
         &amp;lt;Event Name=&amp;quot;MouseClick&amp;quot; Function=&amp;quot;handleTitlebarClick&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;lt;/AutoWindow&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;/Window&amp;gt;&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
Reiterating, along with the Event tag you could just as easily have specified Property tags to modify the options set for the title bar, or even Window tags to add an extra button for example.  The AutoWindow tag effectively allows us to do an auto window anything we can do with a normal window.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Making Your Own Auto Windows ===&lt;br /&gt;
As already mentioned, various compound widgets in the system have specified requirements for auto windows that must be supplied within the LookNFeel.  What you need to consider is that these requirements are a minimum and not an absolute.  This affords us the possibility of specifying, via the &amp;lt;Child&amp;gt; tag, additional auto windows of our choosing in the LookNFeel.  Effectively this unties our hands and gives total freedom to create any number of new widgets by combining other widgets in various ways.  Obviously there will be cases where supporting systems and code are required, but the basic composition and layout of these widgets can be entirely specified in XML.&lt;br /&gt;
&lt;br /&gt;
One of the weaknesses of the FrameWindow as it stands at the moment is that developer added content, that is your buttons and other widgets, are added to the frame window relative to the top-left corner and on an equal standing to the title bar.  This can lead to situations where your content is sometimes partially obscured by the titlebar, this can especially be the case if the user may re-size the frame window - things may look fine at the initial size, but quickly go awry when the window is made smaller.&lt;br /&gt;
&lt;br /&gt;
One work around to the frame window issue is to add an absolutely positioned container window in the layout and have the content added to that.  On the surface this seems like an ideal solution, but in reality has more issues of its own since it does not allow your layout to remain resolution neutral (2 pixels at 640 x 480 are much larger physically than they are at, say, 1024 x 768).  Additionally, changing the size of the titlebar font would not automatically re-size the 'content pane' and so you would need additional processing for that.  Ultimately the whole concept breaks down as being not worth the cost.&lt;br /&gt;
&lt;br /&gt;
What is needed is a solution that can remain resolution independent, have some kind of absolute positioning, but also react to changes in the parent window.  All of these criteria are met by the basic provisions of the Falagard system and the auto window approach will give us a reasonable solution.&lt;br /&gt;
&lt;br /&gt;
The rest of the article will develop a frame window type that has a separate client area or content window.  Note that the solution developed is not a panacea; there are still potential issues surrounding enabling and disabling of the title bar and window frame, though generally the solution presented will be useful to many.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example Project - NewFrameWindow ===&lt;br /&gt;
Basically what we are going to do is to create a new FrameWindow type that uses the auto window system to add a DefaultWindow which covers what is commonly known as the 'client area' of the frame window; that is the area within the window frame and title bar.  We can then target content into this client area auto window within layout files.&lt;br /&gt;
&lt;br /&gt;
First let us define a couple of criteria that this new auto window must meet as far as position and size:&lt;br /&gt;
* The top edge needs to be glued to the bottom edge of the title bar at all times.&lt;br /&gt;
* The other edges need to be within the window sizing frame at all times.&lt;br /&gt;
&lt;br /&gt;
Ok, that seems fairly straight forwards, lets make a start.  We'll define the new auto window and its parts outside of any WidgetLook to begin with, this will enable us to focus on the important aspects of what we are doing.  At the end the final thing is presented in full along with other supporting material.&lt;br /&gt;
&lt;br /&gt;
First provide the Child tag structure:&lt;br /&gt;
 &amp;lt;Child type=&amp;quot;DefaultWindow&amp;quot; nameSuffix=&amp;quot;__auto_clientarea__&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;/Child&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the suffix could, in reality, be anything you choose; the use &amp;quot;__auto_&amp;lt;whatever&amp;gt;__&amp;quot; is just the established idiom used within CEGUI itself - so we just continue that here.&lt;br /&gt;
&lt;br /&gt;
Now we need to establish the area to be used by the client area window according to our specifications above.  In order to do what is needed we need two pieces of information; the location of the bottom edge of the title bar, and the size of the sizing border.  Both are easily obtained.  The WidgetDim element in Falagard allows us to extract information about the location of another widget, and the PropertyDim allows us to extract a setting from the parent window.&lt;br /&gt;
&lt;br /&gt;
We now define the area for the client area window as follows:&lt;br /&gt;
 &amp;lt;Area&amp;gt;&lt;br /&gt;
     &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;PropertyDim name=&amp;quot;SizingBorderThickness&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;lt;/Dim&amp;gt;&lt;br /&gt;
     &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;WidgetDim widget=&amp;quot;__auto_titlebar__&amp;quot; dimension=&amp;quot;BottomEdge&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;lt;/Dim&amp;gt;&lt;br /&gt;
     &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
             &amp;lt;DimOperator op=&amp;quot;Subtract&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;PropertyDim name=&amp;quot;SizingBorderThickness&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/DimOperator&amp;gt;&lt;br /&gt;
         &amp;lt;/UnifiedDim&amp;gt;&lt;br /&gt;
     &amp;lt;/Dim&amp;gt;&lt;br /&gt;
     &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
             &amp;lt;DimOperator op=&amp;quot;Subtract&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;PropertyDim name=&amp;quot;SizingBorderThickness&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/DimOperator&amp;gt;&lt;br /&gt;
         &amp;lt;/UnifiedDim&amp;gt;&lt;br /&gt;
     &amp;lt;/Dim&amp;gt;&lt;br /&gt;
 &amp;lt;/Area&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We require no additional settings or options for this window.&lt;br /&gt;
&lt;br /&gt;
To utilise the client area in a layout we now can use XML such as:&lt;br /&gt;
 &amp;lt;AutoWindow NameSuffix=&amp;quot;__auto_clientarea__&amp;quot; &amp;gt;&lt;br /&gt;
     &amp;lt;Window Type=&amp;quot;WindowsLook/Button&amp;quot; Name=&amp;quot;myButton&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.02,0},{0.01,0},{0.98,0},{0.2,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Engage!&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;lt;/Window&amp;gt;&lt;br /&gt;
 &amp;lt;/AutoWindow&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Putting It Together ===&lt;br /&gt;
In order that you can make use of such a new frame window it all needs to be presented to the system in some way.  You could just modify the existing WindowsLook.looknfeel XML file and that would be fine.  However, in this section we present the solution in such a way it can be used as an 'add-in' widget which can be used in addition to the existing WindowsLook widgets.  This is just one way of doing it, various possibilities exist for the advanced user.&lt;br /&gt;
&lt;br /&gt;
We have the following two files:&lt;br /&gt;
* NewFrameWindow.scheme         - specifies the required binding to make the widget available in the system&lt;br /&gt;
* NewFrameWindow.looknfeel      - specifies the LookNFeel specification for the new frame window type&lt;br /&gt;
&lt;br /&gt;
This code snippet shows how you might load in the schemes:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
// Note that in order for this to work you need to have loaded the normal&lt;br /&gt;
// WindowsLook.scheme.&lt;br /&gt;
SchemeManager::getSingleton().loadScheme(&amp;quot;WindowsLook.scheme&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
// Load in a scheme to setup our new frame window type&lt;br /&gt;
SchemeManager::getSingleton().loadScheme(&amp;quot;NewFrameWindow.scheme&amp;quot;);&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== NewFrameWindow.scheme ====&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
 &amp;lt;GUIScheme Name=&amp;quot;WindowsLookAdditions&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;LookNFeel Filename=&amp;quot;NewFrameWindow.looknfeel&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;lt;WindowSet Filename=&amp;quot;CEGUIFalagardWRBase&amp;quot; /&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
     &amp;lt;FalagardMapping WindowType=&amp;quot;WindowsLook/NewFrameWindow&amp;quot;&lt;br /&gt;
                      TargetType=&amp;quot;CEGUI/FrameWindow&amp;quot;&lt;br /&gt;
                      Renderer=&amp;quot;Falagard/FrameWindow&amp;quot;&lt;br /&gt;
                      LookNFeel=&amp;quot;WindowsLook/NewFrameWindow&amp;quot; /&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;/GUIScheme&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== NewFrameWindow.looknfeel ====&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
 &amp;lt;Falagard&amp;gt;&lt;br /&gt;
     &amp;lt;!--&lt;br /&gt;
     ***************************************************&lt;br /&gt;
         WindowsLook/NewFrameWindow&lt;br /&gt;
     ***************************************************&lt;br /&gt;
     --&amp;gt;&lt;br /&gt;
     &amp;lt;WidgetLook name=&amp;quot;WindowsLook/NewFrameWindow&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;PropertyLinkDefinition name=&amp;quot;CaptionColour&amp;quot; widget=&amp;quot;__auto_titlebar__&amp;quot; targetProperty=&amp;quot;CaptionColour&amp;quot; initialValue=&amp;quot;FF000000&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;PropertyLinkDefinition name=&amp;quot;TitlebarFont&amp;quot; widget=&amp;quot;__auto_titlebar__&amp;quot; targetProperty=&amp;quot;Font&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;Property name=&amp;quot;NSSizingCursorImage&amp;quot; value=&amp;quot;set:WindowsLook image:MouseNoSoCursor&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;Property name=&amp;quot;EWSizingCursorImage&amp;quot; value=&amp;quot;set:WindowsLook image:MouseEsWeCursor&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;Property name=&amp;quot;NWSESizingCursorImage&amp;quot; value=&amp;quot;set:WindowsLook image:MouseNwSeCursor&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;Property name=&amp;quot;NESWSizingCursorImage&amp;quot; value=&amp;quot;set:WindowsLook image:MouseNeSwCursor&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;NamedArea name=&amp;quot;ClientWithTitleWithFrame&amp;quot;&amp;gt;&lt;br /&gt;
             &amp;lt;Area&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;ImageDim imageset=&amp;quot;WindowsLook&amp;quot; image=&amp;quot;WindowFrameLeft&amp;quot; dimension=&amp;quot;Width&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;WidgetDim widget=&amp;quot;__auto_titlebar__&amp;quot; dimension=&amp;quot;BottomEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;DimOperator op=&amp;quot;Subtract&amp;quot;&amp;gt;&lt;br /&gt;
                             &amp;lt;ImageDim imageset=&amp;quot;WindowsLook&amp;quot; image=&amp;quot;WindowFrameRight&amp;quot; dimension=&amp;quot;Width&amp;quot; /&amp;gt;&lt;br /&gt;
                         &amp;lt;/DimOperator&amp;gt;&lt;br /&gt;
                     &amp;lt;/UnifiedDim&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;DimOperator op=&amp;quot;Subtract&amp;quot;&amp;gt;&lt;br /&gt;
                             &amp;lt;ImageDim imageset=&amp;quot;WindowsLook&amp;quot; image=&amp;quot;WindowFrameBottom&amp;quot; dimension=&amp;quot;Height&amp;quot; /&amp;gt;&lt;br /&gt;
                         &amp;lt;/DimOperator&amp;gt;&lt;br /&gt;
                     &amp;lt;/UnifiedDim&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;/Area&amp;gt;&lt;br /&gt;
         &amp;lt;/NamedArea&amp;gt;&lt;br /&gt;
         &amp;lt;NamedArea name=&amp;quot;ClientWithTitleNoFrame&amp;quot;&amp;gt;&lt;br /&gt;
             &amp;lt;Area&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;WidgetDim widget=&amp;quot;__auto_titlebar__&amp;quot; dimension=&amp;quot;BottomEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; type=&amp;quot;RightEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; type=&amp;quot;BottomEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;/Area&amp;gt;&lt;br /&gt;
         &amp;lt;/NamedArea&amp;gt;&lt;br /&gt;
         &amp;lt;NamedArea name=&amp;quot;ClientNoTitleWithFrame&amp;quot;&amp;gt;&lt;br /&gt;
             &amp;lt;Area&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;ImageDim imageset=&amp;quot;WindowsLook&amp;quot; image=&amp;quot;WindowFrameLeft&amp;quot; dimension=&amp;quot;Width&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;ImageDim imageset=&amp;quot;WindowsLook&amp;quot; image=&amp;quot;WindowFrameTop&amp;quot; dimension=&amp;quot;Height&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;DimOperator op=&amp;quot;Subtract&amp;quot;&amp;gt;&lt;br /&gt;
                             &amp;lt;ImageDim imageset=&amp;quot;WindowsLook&amp;quot; image=&amp;quot;WindowFrameRight&amp;quot; dimension=&amp;quot;Width&amp;quot; /&amp;gt;&lt;br /&gt;
                         &amp;lt;/DimOperator&amp;gt;&lt;br /&gt;
                     &amp;lt;/UnifiedDim&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;DimOperator op=&amp;quot;Subtract&amp;quot;&amp;gt;&lt;br /&gt;
                             &amp;lt;ImageDim imageset=&amp;quot;WindowsLook&amp;quot; image=&amp;quot;WindowFrameBottom&amp;quot; dimension=&amp;quot;Height&amp;quot; /&amp;gt;&lt;br /&gt;
                         &amp;lt;/DimOperator&amp;gt;&lt;br /&gt;
                     &amp;lt;/UnifiedDim&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;/Area&amp;gt;&lt;br /&gt;
         &amp;lt;/NamedArea&amp;gt;&lt;br /&gt;
         &amp;lt;NamedArea name=&amp;quot;ClientNoTitleNoFrame&amp;quot;&amp;gt;&lt;br /&gt;
             &amp;lt;Area&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; type=&amp;quot;RightEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; type=&amp;quot;BottomEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;/Area&amp;gt;&lt;br /&gt;
         &amp;lt;/NamedArea&amp;gt;&lt;br /&gt;
         &amp;lt;Child type=&amp;quot;DefaultWindow&amp;quot; nameSuffix=&amp;quot;__auto_clientarea__&amp;quot;&amp;gt;&lt;br /&gt;
             &amp;lt;Area&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;PropertyDim name=&amp;quot;SizingBorderThickness&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;WidgetDim widget=&amp;quot;__auto_titlebar__&amp;quot; dimension=&amp;quot;BottomEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;DimOperator op=&amp;quot;Subtract&amp;quot;&amp;gt;&lt;br /&gt;
                             &amp;lt;PropertyDim name=&amp;quot;SizingBorderThickness&amp;quot; /&amp;gt;&lt;br /&gt;
                         &amp;lt;/DimOperator&amp;gt;&lt;br /&gt;
                     &amp;lt;/UnifiedDim&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;DimOperator op=&amp;quot;Subtract&amp;quot;&amp;gt;&lt;br /&gt;
                             &amp;lt;PropertyDim name=&amp;quot;SizingBorderThickness&amp;quot; /&amp;gt;&lt;br /&gt;
                         &amp;lt;/DimOperator&amp;gt;&lt;br /&gt;
                     &amp;lt;/UnifiedDim&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;/Area&amp;gt;&lt;br /&gt;
         &amp;lt;/Child&amp;gt;&lt;br /&gt;
         &amp;lt;Child type=&amp;quot;WindowsLook/Titlebar&amp;quot; nameSuffix=&amp;quot;__auto_titlebar__&amp;quot;&amp;gt;&lt;br /&gt;
             &amp;lt;Area&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; type=&amp;quot;RightEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;Height&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;FontDim widget=&amp;quot;__auto_titlebar__&amp;quot; type=&amp;quot;LineSpacing&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;DimOperator op=&amp;quot;Multiply&amp;quot;&amp;gt;&lt;br /&gt;
                             &amp;lt;AbsoluteDim value=&amp;quot;1.5&amp;quot; /&amp;gt;&lt;br /&gt;
                         &amp;lt;/DimOperator&amp;gt;&lt;br /&gt;
                     &amp;lt;/FontDim&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;/Area&amp;gt;&lt;br /&gt;
             &amp;lt;Property name=&amp;quot;AlwaysOnTop&amp;quot; value=&amp;quot;False&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;/Child&amp;gt;&lt;br /&gt;
         &amp;lt;Child type=&amp;quot;WindowsLook/SystemButton&amp;quot; nameSuffix=&amp;quot;__auto_closebutton__&amp;quot;&amp;gt;&lt;br /&gt;
             &amp;lt;Area&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;DimOperator op=&amp;quot;Subtract&amp;quot;&amp;gt;&lt;br /&gt;
                             &amp;lt;AbsoluteDim value=&amp;quot;0.5&amp;quot;&amp;gt;&lt;br /&gt;
                                 &amp;lt;DimOperator op=&amp;quot;Multiply&amp;quot;&amp;gt;&lt;br /&gt;
                                     &amp;lt;ImageDim imageset=&amp;quot;WindowsLook&amp;quot; image=&amp;quot;CloseButtonNormal&amp;quot; dimension=&amp;quot;Width&amp;quot;&amp;gt;&lt;br /&gt;
                                         &amp;lt;DimOperator op=&amp;quot;Add&amp;quot;&amp;gt;&lt;br /&gt;
                                             &amp;lt;WidgetDim widget=&amp;quot;__auto_titlebar__&amp;quot; dimension=&amp;quot;Height&amp;quot; /&amp;gt;&lt;br /&gt;
                                         &amp;lt;/DimOperator&amp;gt;&lt;br /&gt;
                                     &amp;lt;/ImageDim&amp;gt;&lt;br /&gt;
                                 &amp;lt;/DimOperator&amp;gt;&lt;br /&gt;
                             &amp;lt;/AbsoluteDim&amp;gt;&lt;br /&gt;
                         &amp;lt;/DimOperator&amp;gt;&lt;br /&gt;
                     &amp;lt;/UnifiedDim&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;WidgetDim widget=&amp;quot;__auto_titlebar__&amp;quot; dimension=&amp;quot;Height&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;DimOperator op=&amp;quot;Subtract&amp;quot;&amp;gt;&lt;br /&gt;
                             &amp;lt;AbsoluteDim value=&amp;quot;0.5&amp;quot;&amp;gt;&lt;br /&gt;
                                 &amp;lt;DimOperator op=&amp;quot;Multiply&amp;quot;&amp;gt;&lt;br /&gt;
                                     &amp;lt;WidgetDim widget=&amp;quot;__auto_titlebar__&amp;quot; dimension=&amp;quot;Height&amp;quot;&amp;gt;&lt;br /&gt;
                                         &amp;lt;DimOperator op=&amp;quot;Add&amp;quot;&amp;gt;&lt;br /&gt;
                                             &amp;lt;ImageDim imageset=&amp;quot;WindowsLook&amp;quot; image=&amp;quot;CloseButtonNormal&amp;quot; dimension=&amp;quot;Height&amp;quot; /&amp;gt;&lt;br /&gt;
                                         &amp;lt;/DimOperator&amp;gt;&lt;br /&gt;
                                     &amp;lt;/WidgetDim&amp;gt;&lt;br /&gt;
                                 &amp;lt;/DimOperator&amp;gt;&lt;br /&gt;
                             &amp;lt;/AbsoluteDim&amp;gt;&lt;br /&gt;
                         &amp;lt;/DimOperator&amp;gt;&lt;br /&gt;
                     &amp;lt;/WidgetDim&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;Width&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;ImageDim imageset=&amp;quot;WindowsLook&amp;quot; image=&amp;quot;CloseButtonNormal&amp;quot; dimension=&amp;quot;Width&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;Height&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;ImageDim imageset=&amp;quot;WindowsLook&amp;quot; image=&amp;quot;CloseButtonNormal&amp;quot; dimension=&amp;quot;Height&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;/Area&amp;gt;&lt;br /&gt;
             &amp;lt;Property name=&amp;quot;AlwaysOnTop&amp;quot; value=&amp;quot;True&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Property name=&amp;quot;NormalImage&amp;quot; value=&amp;quot;set:WindowsLook image:CloseButtonNormal&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Property name=&amp;quot;HoverImage&amp;quot; value=&amp;quot;set:WindowsLook image:CloseButtonHover&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Property name=&amp;quot;PushedImage&amp;quot; value=&amp;quot;set:WindowsLook image:CloseButtonPushed&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;/Child&amp;gt;&lt;br /&gt;
         &amp;lt;ImagerySection name=&amp;quot;withtitle_frame&amp;quot;&amp;gt;&lt;br /&gt;
             &amp;lt;FrameComponent&amp;gt;&lt;br /&gt;
                 &amp;lt;Area&amp;gt;&lt;br /&gt;
                     &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                     &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                     &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;WidgetDim widget=&amp;quot;__auto_titlebar__&amp;quot; dimension=&amp;quot;Height&amp;quot; /&amp;gt;&lt;br /&gt;
                     &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                     &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; type=&amp;quot;RightEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                     &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                     &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; type=&amp;quot;BottomEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                     &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;/Area&amp;gt;&lt;br /&gt;
                 &amp;lt;Image type=&amp;quot;BottomLeftCorner&amp;quot; imageset=&amp;quot;WindowsLook&amp;quot; image=&amp;quot;WindowFrameBottomLeft&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;Image type=&amp;quot;BottomRightCorner&amp;quot; imageset=&amp;quot;WindowsLook&amp;quot; image=&amp;quot;WindowFrameBottomRight&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;Image type=&amp;quot;LeftEdge&amp;quot; imageset=&amp;quot;WindowsLook&amp;quot; image=&amp;quot;WindowFrameLeft&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;Image type=&amp;quot;RightEdge&amp;quot; imageset=&amp;quot;WindowsLook&amp;quot; image=&amp;quot;WindowFrameRight&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;Image type=&amp;quot;BottomEdge&amp;quot; imageset=&amp;quot;WindowsLook&amp;quot; image=&amp;quot;WindowFrameBottom&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/FrameComponent&amp;gt;&lt;br /&gt;
         &amp;lt;/ImagerySection&amp;gt;&lt;br /&gt;
         &amp;lt;ImagerySection name=&amp;quot;notitle_frame&amp;quot;&amp;gt;&lt;br /&gt;
             &amp;lt;FrameComponent&amp;gt;&lt;br /&gt;
                 &amp;lt;Area&amp;gt;&lt;br /&gt;
                     &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                     &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                     &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                     &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                     &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; type=&amp;quot;RightEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                     &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                     &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; type=&amp;quot;BottomEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                     &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;/Area&amp;gt;&lt;br /&gt;
                 &amp;lt;Image type=&amp;quot;TopLeftCorner&amp;quot; imageset=&amp;quot;WindowsLook&amp;quot; image=&amp;quot;WindowFrameTopLeft&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;Image type=&amp;quot;TopRightCorner&amp;quot; imageset=&amp;quot;WindowsLook&amp;quot; image=&amp;quot;WindowFrameTopRight&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;Image type=&amp;quot;BottomLeftCorner&amp;quot; imageset=&amp;quot;WindowsLook&amp;quot; image=&amp;quot;WindowFrameBottomLeft&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;Image type=&amp;quot;BottomRightCorner&amp;quot; imageset=&amp;quot;WindowsLook&amp;quot; image=&amp;quot;WindowFrameBottomRight&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;Image type=&amp;quot;LeftEdge&amp;quot; imageset=&amp;quot;WindowsLook&amp;quot; image=&amp;quot;WindowFrameLeft&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;Image type=&amp;quot;TopEdge&amp;quot; imageset=&amp;quot;WindowsLook&amp;quot; image=&amp;quot;WindowFrameTop&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;Image type=&amp;quot;RightEdge&amp;quot; imageset=&amp;quot;WindowsLook&amp;quot; image=&amp;quot;WindowFrameRight&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;Image type=&amp;quot;BottomEdge&amp;quot; imageset=&amp;quot;WindowsLook&amp;quot; image=&amp;quot;WindowFrameBottom&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/FrameComponent&amp;gt;&lt;br /&gt;
         &amp;lt;/ImagerySection&amp;gt;&lt;br /&gt;
         &amp;lt;ImagerySection name=&amp;quot;withtitle_withframe_client_area&amp;quot;&amp;gt;&lt;br /&gt;
             &amp;lt;Colours topLeft=&amp;quot;FFDFDFF5&amp;quot; topRight=&amp;quot;FFDFEFF5&amp;quot; bottomLeft=&amp;quot;FFF4F3F5&amp;quot; bottomRight=&amp;quot;FFF0F0F5&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;ImageryComponent&amp;gt;&lt;br /&gt;
                 &amp;lt;Area&amp;gt;&lt;br /&gt;
                     &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;ImageDim imageset=&amp;quot;WindowsLook&amp;quot; image=&amp;quot;WindowFrameLeft&amp;quot; dimension=&amp;quot;Width&amp;quot; /&amp;gt;&lt;br /&gt;
                     &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                     &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;WidgetDim widget=&amp;quot;__auto_titlebar__&amp;quot; dimension=&amp;quot;Height&amp;quot; /&amp;gt;&lt;br /&gt;
                     &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                     &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                             &amp;lt;DimOperator op=&amp;quot;Subtract&amp;quot;&amp;gt;&lt;br /&gt;
                                 &amp;lt;ImageDim imageset=&amp;quot;WindowsLook&amp;quot; image=&amp;quot;WindowFrameRight&amp;quot; dimension=&amp;quot;Width&amp;quot; /&amp;gt;&lt;br /&gt;
                             &amp;lt;/DimOperator&amp;gt;&lt;br /&gt;
                         &amp;lt;/UnifiedDim&amp;gt;&lt;br /&gt;
                     &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                     &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                             &amp;lt;DimOperator op=&amp;quot;Subtract&amp;quot;&amp;gt;&lt;br /&gt;
                                 &amp;lt;ImageDim imageset=&amp;quot;WindowsLook&amp;quot; image=&amp;quot;WindowFrameBottom&amp;quot; dimension=&amp;quot;Height&amp;quot; /&amp;gt;&lt;br /&gt;
                             &amp;lt;/DimOperator&amp;gt;&lt;br /&gt;
                         &amp;lt;/UnifiedDim&amp;gt;&lt;br /&gt;
                     &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;/Area&amp;gt;&lt;br /&gt;
                 &amp;lt;Image imageset=&amp;quot;WindowsLook&amp;quot; image=&amp;quot;Background&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;VertFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;HorzFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/ImageryComponent&amp;gt;&lt;br /&gt;
         &amp;lt;/ImagerySection&amp;gt;&lt;br /&gt;
         &amp;lt;ImagerySection name=&amp;quot;notitle_withframe_client_area&amp;quot;&amp;gt;&lt;br /&gt;
             &amp;lt;Colours topLeft=&amp;quot;FFDFDFF5&amp;quot; topRight=&amp;quot;FFDFEFF5&amp;quot; bottomLeft=&amp;quot;FFF4F3F5&amp;quot; bottomRight=&amp;quot;FFF0F0F5&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;ImageryComponent&amp;gt;&lt;br /&gt;
                 &amp;lt;Area&amp;gt;&lt;br /&gt;
                     &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;ImageDim imageset=&amp;quot;WindowsLook&amp;quot; image=&amp;quot;WindowFrameLeft&amp;quot; dimension=&amp;quot;Width&amp;quot; /&amp;gt;&lt;br /&gt;
                     &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                     &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;ImageDim imageset=&amp;quot;WindowsLook&amp;quot; image=&amp;quot;WindowFrameTop&amp;quot; dimension=&amp;quot;Height&amp;quot; /&amp;gt;&lt;br /&gt;
                     &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                     &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                             &amp;lt;DimOperator op=&amp;quot;Subtract&amp;quot;&amp;gt;&lt;br /&gt;
                                 &amp;lt;ImageDim imageset=&amp;quot;WindowsLook&amp;quot; image=&amp;quot;WindowFrameRight&amp;quot; dimension=&amp;quot;Width&amp;quot; /&amp;gt;&lt;br /&gt;
                             &amp;lt;/DimOperator&amp;gt;&lt;br /&gt;
                         &amp;lt;/UnifiedDim&amp;gt;&lt;br /&gt;
                     &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                     &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                             &amp;lt;DimOperator op=&amp;quot;Subtract&amp;quot;&amp;gt;&lt;br /&gt;
                                 &amp;lt;ImageDim imageset=&amp;quot;WindowsLook&amp;quot; image=&amp;quot;WindowFrameBottom&amp;quot; dimension=&amp;quot;Height&amp;quot; /&amp;gt;&lt;br /&gt;
                             &amp;lt;/DimOperator&amp;gt;&lt;br /&gt;
                         &amp;lt;/UnifiedDim&amp;gt;&lt;br /&gt;
                     &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;/Area&amp;gt;&lt;br /&gt;
                 &amp;lt;Image imageset=&amp;quot;WindowsLook&amp;quot; image=&amp;quot;Background&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;VertFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;HorzFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/ImageryComponent&amp;gt;&lt;br /&gt;
         &amp;lt;/ImagerySection&amp;gt;&lt;br /&gt;
         &amp;lt;ImagerySection name=&amp;quot;withtitle_noframe_client_area&amp;quot;&amp;gt;&lt;br /&gt;
             &amp;lt;Colours topLeft=&amp;quot;FFDFDFF5&amp;quot; topRight=&amp;quot;FFDFEFF5&amp;quot; bottomLeft=&amp;quot;FFF4F3F5&amp;quot; bottomRight=&amp;quot;FFF0F0F5&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;ImageryComponent&amp;gt;&lt;br /&gt;
                 &amp;lt;Area&amp;gt;&lt;br /&gt;
                     &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                     &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                     &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;WidgetDim widget=&amp;quot;__auto_titlebar__&amp;quot; dimension=&amp;quot;Height&amp;quot; /&amp;gt;&lt;br /&gt;
                     &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                     &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; type=&amp;quot;RightEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                     &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                     &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; type=&amp;quot;BottomEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                     &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;/Area&amp;gt;&lt;br /&gt;
                 &amp;lt;Image imageset=&amp;quot;WindowsLook&amp;quot; image=&amp;quot;Background&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;VertFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;HorzFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/ImageryComponent&amp;gt;&lt;br /&gt;
         &amp;lt;/ImagerySection&amp;gt;&lt;br /&gt;
         &amp;lt;ImagerySection name=&amp;quot;notitle_noframe_client_area&amp;quot;&amp;gt;&lt;br /&gt;
             &amp;lt;Colours topLeft=&amp;quot;FFDFDFF5&amp;quot; topRight=&amp;quot;FFDFEFF5&amp;quot; bottomLeft=&amp;quot;FFF4F3F5&amp;quot; bottomRight=&amp;quot;FFF0F0F5&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;ImageryComponent&amp;gt;&lt;br /&gt;
                 &amp;lt;Area&amp;gt;&lt;br /&gt;
                     &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                     &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                     &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                     &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                     &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; type=&amp;quot;RightEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                     &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                     &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; type=&amp;quot;BottomEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                     &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;/Area&amp;gt;&lt;br /&gt;
                 &amp;lt;Image imageset=&amp;quot;WindowsLook&amp;quot; image=&amp;quot;Background&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;VertFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;HorzFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/ImageryComponent&amp;gt;&lt;br /&gt;
         &amp;lt;/ImagerySection&amp;gt;&lt;br /&gt;
         &amp;lt;StateImagery name=&amp;quot;ActiveWithTitleWithFrame&amp;quot;&amp;gt;&lt;br /&gt;
             &amp;lt;Layer&amp;gt;&lt;br /&gt;
                 &amp;lt;Section section=&amp;quot;withtitle_frame&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;Colours topLeft=&amp;quot;FFA7C7FF&amp;quot; topRight=&amp;quot;FFA7C7FF&amp;quot; bottomLeft=&amp;quot;FFA7C7FF&amp;quot; bottomRight=&amp;quot;FFA7C7FF&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Section&amp;gt;&lt;br /&gt;
                 &amp;lt;Section section=&amp;quot;withtitle_withframe_client_area&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Layer&amp;gt;&lt;br /&gt;
         &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
         &amp;lt;StateImagery name=&amp;quot;InactiveWithTitleWithFrame&amp;quot;&amp;gt;&lt;br /&gt;
             &amp;lt;Layer&amp;gt;&lt;br /&gt;
                 &amp;lt;Section section=&amp;quot;withtitle_frame&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;Colours topLeft=&amp;quot;FFEFEFEF&amp;quot; topRight=&amp;quot;FFEFEFEF&amp;quot; bottomLeft=&amp;quot;FFEFEFEF&amp;quot; bottomRight=&amp;quot;FFEFEFEF&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Section&amp;gt;&lt;br /&gt;
                 &amp;lt;Section section=&amp;quot;withtitle_withframe_client_area&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Layer&amp;gt;&lt;br /&gt;
         &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
         &amp;lt;StateImagery name=&amp;quot;DisabledWithTitleWithFrame&amp;quot;&amp;gt;&lt;br /&gt;
             &amp;lt;Layer&amp;gt;&lt;br /&gt;
                 &amp;lt;Section section=&amp;quot;withtitle_frame&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;Colours topLeft=&amp;quot;FFEFEFEF&amp;quot; topRight=&amp;quot;FFEFEFEF&amp;quot; bottomLeft=&amp;quot;FFEFEFEF&amp;quot; bottomRight=&amp;quot;FFEFEFEF&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Section&amp;gt;&lt;br /&gt;
                 &amp;lt;Section section=&amp;quot;withtitle_withframe_client_area&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Layer&amp;gt;&lt;br /&gt;
         &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
         &amp;lt;StateImagery name=&amp;quot;ActiveWithTitleNoFrame&amp;quot;&amp;gt;&lt;br /&gt;
             &amp;lt;Layer&amp;gt;&lt;br /&gt;
                 &amp;lt;Section section=&amp;quot;withtitle_noframe_client_area&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Layer&amp;gt;&lt;br /&gt;
         &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
         &amp;lt;StateImagery name=&amp;quot;InactiveWithTitleNoFrame&amp;quot;&amp;gt;&lt;br /&gt;
             &amp;lt;Layer&amp;gt;&lt;br /&gt;
                 &amp;lt;Section section=&amp;quot;withtitle_noframe_client_area&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Layer&amp;gt;&lt;br /&gt;
         &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
         &amp;lt;StateImagery name=&amp;quot;DisabledWithTitleNoFrame&amp;quot;&amp;gt;&lt;br /&gt;
             &amp;lt;Layer&amp;gt;&lt;br /&gt;
                 &amp;lt;Section section=&amp;quot;withtitle_noframe_client_area&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Layer&amp;gt;&lt;br /&gt;
         &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
         &amp;lt;StateImagery name=&amp;quot;ActiveNoTitleWithFrame&amp;quot;&amp;gt;&lt;br /&gt;
             &amp;lt;Layer&amp;gt;&lt;br /&gt;
                 &amp;lt;Section section=&amp;quot;notitle_frame&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;Colours topLeft=&amp;quot;FFA7C7FF&amp;quot; topRight=&amp;quot;FFA7C7FF&amp;quot; bottomLeft=&amp;quot;FFA7C7FF&amp;quot; bottomRight=&amp;quot;FFA7C7FF&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Section&amp;gt;&lt;br /&gt;
                 &amp;lt;Section section=&amp;quot;notitle_withframe_client_area&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Layer&amp;gt;&lt;br /&gt;
         &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
         &amp;lt;StateImagery name=&amp;quot;InactiveNoTitleWithFrame&amp;quot;&amp;gt;&lt;br /&gt;
             &amp;lt;Layer&amp;gt;&lt;br /&gt;
                 &amp;lt;Section section=&amp;quot;notitle_frame&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;Colours topLeft=&amp;quot;FFEFEFEF&amp;quot; topRight=&amp;quot;FFEFEFEF&amp;quot; bottomLeft=&amp;quot;FFEFEFEF&amp;quot; bottomRight=&amp;quot;FFEFEFEF&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Section&amp;gt;&lt;br /&gt;
                 &amp;lt;Section section=&amp;quot;notitle_withframe_client_area&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Layer&amp;gt;&lt;br /&gt;
         &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
         &amp;lt;StateImagery name=&amp;quot;DisabledNoTitleWithFrame&amp;quot;&amp;gt;&lt;br /&gt;
             &amp;lt;Layer&amp;gt;&lt;br /&gt;
                 &amp;lt;Section section=&amp;quot;notitle_frame&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;Colours topLeft=&amp;quot;FFEFEFEF&amp;quot; topRight=&amp;quot;FFEFEFEF&amp;quot; bottomLeft=&amp;quot;FFEFEFEF&amp;quot; bottomRight=&amp;quot;FFEFEFEF&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Section&amp;gt;&lt;br /&gt;
                 &amp;lt;Section section=&amp;quot;notitle_withframe_client_area&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Layer&amp;gt;&lt;br /&gt;
         &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
         &amp;lt;StateImagery name=&amp;quot;ActiveNoTitleNoFrame&amp;quot;&amp;gt;&lt;br /&gt;
             &amp;lt;Layer&amp;gt;&lt;br /&gt;
                 &amp;lt;Section section=&amp;quot;notitle_noframe_client_area&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Layer&amp;gt;&lt;br /&gt;
         &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
         &amp;lt;StateImagery name=&amp;quot;InactiveNoTitleNoFrame&amp;quot;&amp;gt;&lt;br /&gt;
             &amp;lt;Layer&amp;gt;&lt;br /&gt;
                 &amp;lt;Section section=&amp;quot;notitle_noframe_client_area&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Layer&amp;gt;&lt;br /&gt;
         &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
         &amp;lt;StateImagery name=&amp;quot;DisabledNoTitleNoFrame&amp;quot;&amp;gt;&lt;br /&gt;
             &amp;lt;Layer&amp;gt;&lt;br /&gt;
                 &amp;lt;Section section=&amp;quot;notitle_noframe_client_area&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Layer&amp;gt;&lt;br /&gt;
         &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;/WidgetLook&amp;gt;&lt;br /&gt;
 &amp;lt;/Falagard&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Test layout file ====&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;GUILayout&amp;gt;&lt;br /&gt;
 &amp;lt;Window Type=&amp;quot;DefaultGUISheet&amp;quot; Name=&amp;quot;root&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
     &amp;lt;Window Type=&amp;quot;WindowsLook/NewFrameWindow&amp;quot; Name=&amp;quot;myFrameWindow&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;Property Name=&amp;quot;UnifiedPosition&amp;quot; Value=&amp;quot;{{0.1,0},{0.1,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;Property Name=&amp;quot;UnifiedMaxSize&amp;quot; Value=&amp;quot;{{1,0},{1,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;Property Name=&amp;quot;UnifiedMinSize&amp;quot; Value=&amp;quot;{{0,128},{0,128}}&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;Property Name=&amp;quot;UnifiedSize&amp;quot; Value=&amp;quot;{{0.4,0},{0.5,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Demo of seperate client area.&amp;quot; /&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
         &amp;lt;!--&lt;br /&gt;
         ***************************************************&lt;br /&gt;
             Notice that the content of this window actually&lt;br /&gt;
             go inside a child component of the compound&lt;br /&gt;
             type FrameWindow - this is achieved by the&lt;br /&gt;
             use of the AutoWindow tag and supplying the&lt;br /&gt;
             name suffix used when we defined the new&lt;br /&gt;
             client area in the looknfeel.&lt;br /&gt;
         ***************************************************&lt;br /&gt;
         --&amp;gt;&lt;br /&gt;
         &amp;lt;AutoWindow NameSuffix=&amp;quot;__auto_clientarea__&amp;quot; &amp;gt;&lt;br /&gt;
             &amp;lt;Window Type=&amp;quot;WindowsLook/Button&amp;quot; Name=&amp;quot;myFrameWindow/Button1&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.02,0},{0.01,0},{0.98,0},{0.15,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;A Button&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Window&amp;gt;&lt;br /&gt;
             &amp;lt;Window Type=&amp;quot;WindowsLook/Button&amp;quot; Name=&amp;quot;myFrameWindow/Button2&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.04,0},{0.6,0},{0.96,0},{0.75,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Another Button&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Window&amp;gt;&lt;br /&gt;
         &amp;lt;/AutoWindow&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
     &amp;lt;/Window&amp;gt;&lt;br /&gt;
 &amp;lt;/Window&amp;gt;&lt;br /&gt;
 &amp;lt;/GUILayout&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
In this article you have seen what an auto window is, how the system uses them &amp;quot;out of the box&amp;quot;, and how you can utilise the same system to extend widgets to perform differently.  You have also seen how to target these auto windows from c++ code and also from layout XML files.&lt;br /&gt;
&lt;br /&gt;
[[User:CrazyEddie|CrazyEddie]]&lt;/div&gt;</summary>
		<author><name>Makofierce</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=Subversion&amp;diff=3608</id>
		<title>Subversion</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=Subversion&amp;diff=3608"/>
				<updated>2011-01-07T09:51:55Z</updated>
		
		<summary type="html">&lt;p&gt;Makofierce: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page introduce the use of subversion. If you're only intent is to get the files from subversion you should start with [[HOWTO: Obtain the library source from subversion]] which help you in getting the file and compiling CEGUI. This page dive deeper in the use of subversion as a standard user as well as a developer of the library itself. This page presents the use of subversion with the command line tool available for windows, mac and linux. &lt;br /&gt;
&lt;br /&gt;
First of all here is some urls to get started with subersion usage : &lt;br /&gt;
* Repository url: [https://svn.sourceforge.net/svnroot/crayzedsgui/ https://svn.sourceforge.net/svnroot/crayzedsgui/] &lt;br /&gt;
** CEGUI library latest development files url: [https://svn.sourceforge.net/svnroot/crayzedsgui/cegui_mk2/trunk https://svn.sourceforge.net/svnroot/crayzedsgui/cegui_mk2/trunk]&lt;br /&gt;
** CEGUI Layout Editor latest version url: [https://svn.sourceforge.net/svnroot/crayzedsgui/CELayoutEditor/trunk https://svn.sourceforge.net/svnroot/crayzedsgui/CELayoutEditor/trunk]&lt;br /&gt;
** Repository browser: [http://svn.sourceforge.net/viewcvs.cgi/crayzedsgui/cegui_mk2/ http://svn.sourceforge.net/viewcvs.cgi/crayzedsgui/cegui_mk2/]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Glossary ==&lt;br /&gt;
* Repository: That's the place storing all the files and revisions. It's hosted by sourceforge. In Subversion respository are identified using urls.&lt;br /&gt;
* Working Copy: A working copy is a local view of part of the repository. You can retrieve a local copy using the checkout command. A working copy contains the file as well as a lot of additional information. The size of the working copy is more than twice the size of the file of the project. &lt;br /&gt;
* Branches: Subversion does not provides branches concept, however it's possible to organize the project in several branches. The current development branch is known as trunk. The other branches are stored in a folder named .... branches. So a branch in Subversion is just a folder in branches. &lt;br /&gt;
* Tags: Subversion does not provides tags concept. Like branches tags are only subfolder of the tags folder. &lt;br /&gt;
* Revision: Snapshot of the tree at a given time. Each modification on the tree create a new revision. &lt;br /&gt;
&lt;br /&gt;
== Layout of the repository ==&lt;br /&gt;
At this moment there are two projects in the CEGUI repository. The CEGUI library and the layout editor. The repository is organised as follows:&lt;br /&gt;
* cegui_mk2 : The cegui library itself &lt;br /&gt;
** trunk : The main development stream &lt;br /&gt;
** branches : Branches (features testing are prefix with pre-) &lt;br /&gt;
** tags: Release of the CEGUI library &lt;br /&gt;
* CELayoutEditor : The editor files &lt;br /&gt;
** trunk : The main development stream &lt;br /&gt;
** branches : Branches &lt;br /&gt;
** tags: Release of the editor&lt;br /&gt;
&lt;br /&gt;
== Getting a working copy of the project ==&lt;br /&gt;
In order to get the files from the Sourceforge server one can use two commands. Both commands retrieve the files, however the second command excludes you from staying up-to-date or create patches. If you plan to get the sources, create your library, install it and remove them, the second solution is the best for you. &lt;br /&gt;
 svn checkout url [dest_dir] &lt;br /&gt;
 svn co url [dest_dir]&lt;br /&gt;
or &lt;br /&gt;
 svn export url [dest_dir]&lt;br /&gt;
&lt;br /&gt;
Using each of these commands you will get you the latest version of any file with url as root tree. You can get files at a particular revision using an additional parameter: &lt;br /&gt;
 svn checkout/export [-r number] url [dest_dir]. It usefull to test older version. There is no named revision in subversion but it's easy to create tags which provides the same features.&lt;br /&gt;
&lt;br /&gt;
== Updating your working copy == &lt;br /&gt;
When you choose 'checkout', you now have a working copy of the library or the editor. You can keep it in sync with the repository at Sourceforge with the following command: &lt;br /&gt;
 svn update [folder|file]&lt;br /&gt;
 svn up [folder|file]&lt;br /&gt;
&lt;br /&gt;
== Getting history of modifications == &lt;br /&gt;
In order to get a kind of changelog you can use subversion. Each modification of the repository comes with a text message explaining the last modification. You can get the history of any file or directory of your working copy using:&lt;br /&gt;
 svn log [url]  (remote repository) &lt;br /&gt;
 svn log [path] (working copy)&lt;br /&gt;
&lt;br /&gt;
== Making change to your working copy ==&lt;br /&gt;
There is several change that can be made on subversion repository : adding, removing, renamming and modifying files, adding, removing and renamming directory. A standard work session consists in the following operation. &lt;br /&gt;
# Update your working copy &lt;br /&gt;
# Make your change &lt;br /&gt;
# commit your change &lt;br /&gt;
&lt;br /&gt;
This section focus on the second step of a work session. Files and directory are not handled automatically by subversion you must first explain to subversion that those file must be manage d. This is done using the add command: &lt;br /&gt;
 svn add source.cpp // Add source.cpp to your local subversion copy &lt;br /&gt;
 svn add subdir  // Add subdir to your local subversion copy as well as all file contained in the repository itself &lt;br /&gt;
One of the improvement of subversion compared to CVS is its ability to remove file as well as folder this done by the rm or delete command &lt;br /&gt;
 svn del source.cpp &lt;br /&gt;
Finally you can rename file or directory using the mv command. This command does not allow mass moving like the standard mv command of unix system. rename is an alias of this command. &lt;br /&gt;
 svn mv source dest &lt;br /&gt;
&lt;br /&gt;
You can use any text editor to edit your files. Subversion will do its best to send on the network only the change you've made to your working copy. &lt;br /&gt;
&lt;br /&gt;
''Must talk about loking facilities here''&lt;br /&gt;
&lt;br /&gt;
== Branching, Tagging, Merging == &lt;br /&gt;
In subversion a branch or a tag is just a folder in the corresponding folders. In order to create a branch one needs to use the copy operation. Copying a complete tree in subversion is cheap. In order to create a branch or tag use the following operation : &lt;br /&gt;
 svn copy url_source url_dest &lt;br /&gt;
I suggest using url of the repository directly. In order to create a branch of CEGUI use : &lt;br /&gt;
 svn copy https://svn.sourceforge.net/svnroot/crayzedsgui/cegui_mk2/trunk https://svn.sourceforge.net/svnroot/crayzedsgui/cegui_mk2/branches/v0-5&lt;br /&gt;
To create a tag use : &lt;br /&gt;
 svn copy https://svn.sourceforge.net/svnroot/crayzedsgui/cegui_mk2/branches/v0-5 https://svn.sourceforge.net/svnroot/crayzedsgui/cegui_mk2/tags/v0-5-0 &lt;br /&gt;
&lt;br /&gt;
A final notes on TAG. Nothing prevents someone to make changes on a tag. It's up to the developer to do changes only on trunk and branches. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you have fixed a lot of bug in a subsystem or want to apply some of the change made to trunk to a specific branch you have to merge. Merging requires a working copy. &lt;br /&gt;
 svn merge url_from url_to working_copy_path&lt;br /&gt;
&lt;br /&gt;
'' Merging need some improvement ''&lt;br /&gt;
'' Need to add some information on conflict''  &lt;br /&gt;
&lt;br /&gt;
== Properties ==&lt;br /&gt;
Subversion allows one to attach meta information to any file and folder in the repository. Those information are called properties. The table bellow list most interesting properties: &lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
||'''Name'''||'''Values'''||'''Description'''||'''Files||Directories&lt;br /&gt;
|-&lt;br /&gt;
||svn:executable||set/unset||Tel whether the file should be made executable or not||yes||no&lt;br /&gt;
|-&lt;br /&gt;
||svn:mime-type||mime of the file||Tel the mime type of the file. This is use to select the diff algorithm used||yes||no&lt;br /&gt;
|-&lt;br /&gt;
||svn:ignore||*.o *.lo ...||List file to be ignore by svn command||no||yes&lt;br /&gt;
|-&lt;br /&gt;
||svn:keywords||Date,Revision,Author,HeadURL,Id||It allows subversion to automatically substitue some field in the file on check out or update||yes||no&lt;br /&gt;
|-&lt;br /&gt;
||svn:eol-style||native*,CRLF,CR,LF||It allows automatic conversion from one eol style to another||yes||no&lt;br /&gt;
|-&lt;br /&gt;
||svn:externals||svn url||It allows to create soft link between to subversion repository||no||yes&lt;br /&gt;
|-&lt;br /&gt;
||svn:needs-lock||set/unset||Tel whether the file must be locked before editing or not||yes||yes&lt;br /&gt;
|}&lt;br /&gt;
You can also defines your own properties for whatever use you might need them. When one adds a file to subversion it must add the svn:eol-style property to the value native for all text file. It can be made automatically using autoprops facilities of svn. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to manipulate properties you can use &lt;br /&gt;
 svn propset name value url/file &lt;br /&gt;
 svn proplist url/file&lt;br /&gt;
 svn propget name url/file &lt;br /&gt;
 svn propdel url/file&lt;br /&gt;
 svn propedit name url/file&lt;br /&gt;
&lt;br /&gt;
== Pitfalls ==&lt;br /&gt;
&lt;br /&gt;
== Configuring subversion == &lt;br /&gt;
&lt;br /&gt;
== External Links == &lt;br /&gt;
* [http://subversion.tigris.org/ Subversion home] (to get the software)&lt;br /&gt;
* [http://svnbook.red-bean.com/ Subversion book] (to learn a lot more than what you read in this page) &lt;br /&gt;
* [http://tortoisesvn.tigris.org/ TortoiseSVN] (Win32 client, a must)&lt;br /&gt;
[[category: CEGUI Developer Team]]&lt;/div&gt;</summary>
		<author><name>Makofierce</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=Changes_and_Porting_Tips_for_0.5.0&amp;diff=3607</id>
		<title>Changes and Porting Tips for 0.5.0</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=Changes_and_Porting_Tips_for_0.5.0&amp;diff=3607"/>
				<updated>2011-01-07T09:51:17Z</updated>
		
		<summary type="html">&lt;p&gt;Makofierce: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Note that this is incomplete, work in progress, documentation.&lt;br /&gt;
&lt;br /&gt;
=Release= &lt;br /&gt;
&lt;br /&gt;
* 0.5.0 stable Released on November the 6th 2006: [[CEGUI Downloads 0.5.0|goto download page]]&lt;br /&gt;
* 0.5.0 RC1 Released on June the 20th 2006: [[Downloads 0.5.0-RC1|goto download page]]&lt;br /&gt;
* 0.5.0 RC2 Released on August the 13th 2006: [[Downloads 0.5.0-RC2|goto download page]]&lt;br /&gt;
&lt;br /&gt;
=ChangeLog=&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Release 0.5.0 (Final)&lt;br /&gt;
=====================&lt;br /&gt;
Added: TaharezLook was missing ItemListbox and ListboxItem windows &amp;amp; skin&lt;br /&gt;
definitions.&lt;br /&gt;
Added: Partial CEGUI support for MingW. It is now possible to build CEGUI under&lt;br /&gt;
mingw with support for OpenGL renderer. This approach is going to be generalized&lt;br /&gt;
later to the other renderer and wiki page explaining the process will follows.&lt;br /&gt;
Added: Missing functions in WindowFactoryManager Lua bindings. Incomplete&lt;br /&gt;
FalagardWindowMapping binding as well.&lt;br /&gt;
Added: Lua binding for OutStream: FileStream (minimal std::ofstream).&lt;br /&gt;
Added: XML writing function in Lua bindings.&lt;br /&gt;
Added: --enable-debug in configure script instead of using CPPFLAGS=-DDEBUG&lt;br /&gt;
./configure ...&lt;br /&gt;
Added: premake files for Minesweeper sample and minor fixes to make it run in&lt;br /&gt;
windows.&lt;br /&gt;
Added: the minesweeper demo&lt;br /&gt;
Added: missing doxyfile in order to be in make dist&lt;br /&gt;
Added: ScrollablePane sample&lt;br /&gt;
&lt;br /&gt;
Removed: Empty Font 'implData' header files we no longer use.&lt;br /&gt;
Removed: Falagard skinning manual is now a part of the CEGUI manuals&lt;br /&gt;
sub-project, so is no longer included here as a pdf.&lt;br /&gt;
&lt;br /&gt;
Modified: Changed Demo7 to use the layout XML file instead of hard-coded window&lt;br /&gt;
creation.&lt;br /&gt;
Modified: Demo7Window.layout now uses the new ItemListbox, with items defined&lt;br /&gt;
within the layout, as the Listbox as opposed to the old style list with&lt;br /&gt;
hard-coded items.&lt;br /&gt;
Modified: Win32CEGuiRendererSelector:&lt;br /&gt;
- It is now possible to navigate to the Combobox via keyboard.&lt;br /&gt;
- First available renderer is pre-selected into the dialog.&lt;br /&gt;
- With a single renderer available, it is auto-selected and dialog is not shown.&lt;br /&gt;
Modified: Changed compile order under autotools so CEGUIBase is made before&lt;br /&gt;
things that use it - related to forthcoming cross-compile support.&lt;br /&gt;
Modified Added some missing bits and a whole load of other stuff to 'make dist'&lt;br /&gt;
to ease a more unified approach to creating packages for the various platforms.&lt;br /&gt;
Modified: Renamed tolua++bin/remake_pkg..bat to remove extra period&lt;br /&gt;
Modified: Changed Russian text in FontDemo sample - the old text apparently&lt;br /&gt;
potentially offensive. Thanks to 'Sanya' for the updated text.&lt;br /&gt;
Modified: The RefCounted template now has the CEGUIEXPORT macro as it avoids&lt;br /&gt;
warnings in client code when using MSVC.&lt;br /&gt;
Modified: Promote Expat to be the second prefered parser under linux in order to&lt;br /&gt;
act the same under linux and Win32. Note that the prefered parser is still&lt;br /&gt;
Xerces. The parser order is now the following : Xerces, Expat, Libxml, TinyXML.&lt;br /&gt;
Modified: WidgetComponent had a nasty misspelling of 'Alignemnt'.&lt;br /&gt;
Modified: MSVC no longer uses CEGUIConfig.h and CEGUISamplesConfig.h for&lt;br /&gt;
anything&lt;br /&gt;
Modified: Premake scripts are now much more flexible.&lt;br /&gt;
&lt;br /&gt;
Coding Standards: Removed various occurrences of the NULL macro.&lt;br /&gt;
&lt;br /&gt;
Docs: Added note to docs for Spinner regarding the lame state of floating point&lt;br /&gt;
support.&lt;br /&gt;
&lt;br /&gt;
Bug Fix: ListHeader settings for sizing, moving, and clicking were not properly&lt;br /&gt;
set on newly created segments.&lt;br /&gt;
Bug Fix: Resolved issue where the algorithm that ensured font textures were&lt;br /&gt;
filled would actually end up trying to render every glyph within a font.&lt;br /&gt;
Bug Fix: ItemListBase::insertItem was not setting the ItemEntry::d_ownerList&lt;br /&gt;
member correctly.&lt;br /&gt;
Bug Fix: Added another 'special case' to Spinner::getValueFromText to support&lt;br /&gt;
typing an initial decimal point.&lt;br /&gt;
Bug Fix: Sometimes compound widgets did not get their components layed out&lt;br /&gt;
properly when adding the widget to its parent.&lt;br /&gt;
Bug Fix: The way in which properties would set a window to use the DefaultFont&lt;br /&gt;
was incorrect; it explicitly set it to the name of the current default, as&lt;br /&gt;
opposed to a 'floating default'.&lt;br /&gt;
Bug Fix: FontDim did not work correctly since re-calculation of the layout was&lt;br /&gt;
not triggered in response to the font being changed.  Added this code to&lt;br /&gt;
Window::onFontChanged - although more elegant / selective solutions might be&lt;br /&gt;
considered later on.&lt;br /&gt;
Bug Fix: Added code so that all windows using default font get notified of a&lt;br /&gt;
change in the default via the normal channel (Window::onFontChanged).&lt;br /&gt;
Bug Fix: There was an issue regarding auto-repeat of mouse button down events&lt;br /&gt;
not getting their state reset if the mouse button was released outside of the&lt;br /&gt;
window getting the auto-repeat events.&lt;br /&gt;
Bug Fix: CEGuiSample.cpp did not get all required includes with certain renderer&lt;br /&gt;
combinations.&lt;br /&gt;
Bug Fix: Range emplyed by FreeTypeFont::rasterize was exclusive of the start&lt;br /&gt;
element; first glyph of every page loaded was missed!&lt;br /&gt;
Bug Fix: CEGUI::Window did not properly clean-up a custom tooltip if it created&lt;br /&gt;
one.&lt;br /&gt;
Bug Fix: Calculation of number of glyph pages in Font::setMaxCodepoint was&lt;br /&gt;
incorrect.&lt;br /&gt;
Bug Fix: When the OpenGL renderer was disabled by ./configure, the SILLY codec&lt;br /&gt;
was still being built.&lt;br /&gt;
Bug Fix: When the OpenGL renderer was disabled by ./configure, the requirement&lt;br /&gt;
for a default ImageCodec was still enforced.&lt;br /&gt;
Bug Fix: case of included file in Win32CEGuiRendererSelector.cpp changed ready&lt;br /&gt;
to support cross-compiling in post 0.5.0 versions.&lt;br /&gt;
Bug Fix: Support was broken in the Samples framework for newer versions of Ogre.&lt;br /&gt;
Bug Fix: The cegui_reldim and cegui_absdim macros were missing the CEGUI&lt;br /&gt;
namespace qualifier.&lt;br /&gt;
Bug Fix: When a glyph failed to load in FreeTypeFont, although we logged the&lt;br /&gt;
error we did not work around the issue of the missing glyph image, so a seg&lt;br /&gt;
fault was generated upon attempted use of those missing images. This addresses&lt;br /&gt;
the issue by creating dummy images for missing font glyphs which use a zero&lt;br /&gt;
size. Mantis #0000125.&lt;br /&gt;
Bug Fix: RefCounted would call AddRef when the wrapped pointer and its counter&lt;br /&gt;
were null.&lt;br /&gt;
Bug Fix: Event::ScopedConnection would call members of BoundSlot using a&lt;br /&gt;
potentially null RefCounted pointer.&lt;br /&gt;
Bug Fix: In C++ a namespace does not have a semicolon after the closing brace.&lt;br /&gt;
Bug Fix: Nasty memory leak in DevIL image codec. thanx to mafm on IRC.&lt;br /&gt;
Bug Fix: fixed a small error in the comment of CEGUI_DECLARE_WINDOW_FACTORY&lt;br /&gt;
Bug Fix: Tab control did not require to hear about multi-clicks on the&lt;br /&gt;
TabControl scroll buttons. Patch from zap. Mantis #0000117.&lt;br /&gt;
Bug Fix: Issue with utf8 missing conversion in TinyXML and libXML&lt;br /&gt;
Bug Fix: Added missing public visibility specifier to ScopedConnection class&lt;br /&gt;
members.&lt;br /&gt;
Bug Fix: premake files were not enabling Xerces correctly in the samples.&lt;br /&gt;
Bug Fix: TabControlDemo layout split up. We dont allow multiple root windows in&lt;br /&gt;
a layout when using a validating XML parser.&lt;br /&gt;
Bug Fix: Falagard.xsd was missing new type attribute for PropertyDim.&lt;br /&gt;
Bug Fix: PropertyLinkDefinition was not writing XML properly (no base class&lt;br /&gt;
writing).&lt;br /&gt;
Bug Fix: Bugs in Falagard XML writing.&lt;br /&gt;
Bug Fix: Spinner would throw an exception when a lone minus sign was entered.&lt;br /&gt;
Mantis ticket #110.&lt;br /&gt;
Bug Fix: Input capture bug that broke Combobx - introduced by patch #82.&lt;br /&gt;
Bug Fix: ScrollablePane would cause exceptions on destruction. Mantis ticket&lt;br /&gt;
#83.&lt;br /&gt;
Bug Fix: a bug in the premake improvements where samples would not generate&lt;br /&gt;
properly.&lt;br /&gt;
Bug Fix: A number of CEGUI exceptions were being caught by value instead of&lt;br /&gt;
reference.&lt;br /&gt;
Bug Fix: OpenGL renderer now also disables texture coordinate generation.&lt;br /&gt;
Bug Fix: Irrlicht sample driver now quits on the escape key like the rest.&lt;br /&gt;
Bug Fix: Updates and fixes to resolve the NPOT texture source data issue (mantis&lt;br /&gt;
#45) in a relatively consistent way - at least for the 0.5.x releases.&lt;br /&gt;
&lt;br /&gt;
Release 0.5.0-RC2&lt;br /&gt;
=================&lt;br /&gt;
Added: single colour support to PropertyHelper::stringToColourRect&lt;br /&gt;
Added: missing support to Irrlicht renderer for creating a texture with a given size.&lt;br /&gt;
Added: Updates to renderers for D3D8.1 and D3D9 to report correct values for 'original' size and actual texture size.  (Related to Mantis ticket #45).&lt;br /&gt;
Added: Support for using user defined image codec by name (using dso) or directly throught a pointer to an existing image codec.&lt;br /&gt;
Added: Long property export (allows for properties containing multiple lines).&lt;br /&gt;
Added: Helper methods to Window to return EventSet::Iterator and PropertySet::Iterator objects.&lt;br /&gt;
Added: Reworked TabControl by zap.  Mantis #82.&lt;br /&gt;
Added: TabControlDemo sample.  Mantis #82.&lt;br /&gt;
Added: Danish language in the FontDemo sample.&lt;br /&gt;
Added: Output of summary of configure results (for configure based builds)&lt;br /&gt;
Added: Texture extra size information to CEGUI::Texture in order to be able to handle scaled/stretched textures within Imageset.&lt;br /&gt;
Added: Texture Scaling support in IrrlichRenderer &lt;br /&gt;
&lt;br /&gt;
Removed: Empty source file CEGUIVector.cpp&lt;br /&gt;
Removed: TabPane files.&lt;br /&gt;
&lt;br /&gt;
Modified: Behaviour of Editbox so that EventCharacterKey events are only marked as handled if the key press actually resulted in a change to the Editbox text string. (Related to Mantis #59)&lt;br /&gt;
Modified: Replaced all getWindow&amp;lt;something&amp;gt; with get&amp;lt;something&amp;gt;&lt;br /&gt;
Modified: Replaced all setWindow&amp;lt;something&amp;gt; with set&amp;lt;something&amp;gt;&lt;br /&gt;
Modified: EventSet::EventIterator now known as EventSet::Iterator&lt;br /&gt;
Modified: PropertySet::PropertyIterator now known as PropertySet::Iterator&lt;br /&gt;
Modified: ImageCodec modules are now DynamicModule &lt;br /&gt;
Modified: Falagard PropertyDim now supports a type attribute for UDim properties.  Mantis #82.&lt;br /&gt;
Modified: Improved TabControl imagery.  Mantis #82.&lt;br /&gt;
Modified: autotools makefiles now symlink the sample binaries (to avoid having to do 'make install').  Mantis #82.&lt;br /&gt;
Modified: PropertyHelper now uses snprintf instead of std::ostringstream again.  Mantis #82.&lt;br /&gt;
Modified: Removed static Makefile for tolua++cegui generator tool and switched to autotools style build, with enable/disable configure option, for tolua++cegui generator tool&lt;br /&gt;
Modified: Moved tolua++ into its own dir, removed lua_and_tolua++&lt;br /&gt;
Modified: Externalised our use of the Lua library&lt;br /&gt;
Modified: premake updates&lt;br /&gt;
Modified: Updated AUTHORS file.&lt;br /&gt;
Modified: Remove exec file attribute on Falagard.xsd &lt;br /&gt;
Modified: XMLRefSchema/Font.xsd for font rewrite&lt;br /&gt;
Modified: LuaScriptModule public headers no longer need include lua.h included.&lt;br /&gt;
Modified: Made a bunch of warnings go away in MSVC in the new font code.&lt;br /&gt;
Modified: Deleted the remaining old msvc project files.&lt;br /&gt;
&lt;br /&gt;
Bug Fix: Clean the XMLSerialization code: remove empty autowindow &lt;br /&gt;
Bug Fix: Added missing glDisable(GL_FOG); in gl renderer&lt;br /&gt;
Bug Fix: Irrlicht and D3D8.1 renderer modules would keep live pointers to Texture objects that failed to fully initialise (file or size errors for example)  Mantis #43.&lt;br /&gt;
Bug Fix: Disable texture stages we do not use in Direct3D renderers. (Mantis #95)&lt;br /&gt;
Bug Fix: Mouse cursor z value.  Mantis #49 &lt;br /&gt;
Bug Fix: Imagset XML attribute for image file name is 'Imagefile' and not 'Filename'.&lt;br /&gt;
Bug Fix: normal attributes use 'true', only properties sometimes use 'True'.&lt;br /&gt;
Bug Fix: Global default resource group was not being used by DefaultResourceProvider.&lt;br /&gt;
Bug Fix: XML output from CEGUI::Image class.&lt;br /&gt;
Bug Fix: Imageset scaling issue when renderer automatically scales the image #45 (this is currently a partial fix)&lt;br /&gt;
Bug Fix: IrrlichtRenderer - Mouse event error.  Mantis #98.&lt;br /&gt;
Bug Fix: IrrlichtRenderer - size error in addQuad.  Mantis #99.&lt;br /&gt;
Bug Fix: IrrlichtRenderer - Sample driver had linker lib name wrong for renderer module.  Mantis #100.&lt;br /&gt;
Bug Fix: TinyXMLParser bug.  Mantis Tracker #57 &lt;br /&gt;
Bug Fix: a bug in the openglrenderer cleanup related to image codec. &lt;br /&gt;
Bug Fix: Install renderer module includes at the same place as in Win32 (linux / mac autotools) &lt;br /&gt;
Bug Fix: OpenGL sample driver did not inject middle mouse up (injected it as down).  Mantis #82.&lt;br /&gt;
Bug Fix: Corrected some mistakes in the Falagard Lua bindings&lt;br /&gt;
Bug Fix: Apparently in some cases OpenGLRenderer needs NOMINMAX in Win32 (Mantis #63)&lt;br /&gt;
Bug Fix: FreeTypeFont did not free the font data properly, also fixes a potential infinite loop in FreeTypeFont (Mantis #60)&lt;br /&gt;
Bug Fix: FairChar font texture was not power of 2 (Mantis #64)&lt;br /&gt;
Bug Fix: SliderThumb incorrectly mapped in some schemes (mantis #88)&lt;br /&gt;
Bug Fix: Updated Irrlicht renderer to work with 0.5.0 codebase.&lt;br /&gt;
Bug Fix: some missing data &lt;br /&gt;
Bug Fix: DirectX 8.1 sample driver&lt;br /&gt;
Bug Fix: some missing files in the make dist command (Mantis #89)&lt;br /&gt;
Bug Fix: Change the name of an enumeration value in schema Font.xsd.&lt;br /&gt;
Bug Fix: Memory leak in Font.&lt;br /&gt;
Bug Fix: Lua bindings was missing ImagesetManager::createImagesetFromImageFile + some missing tolua_throws modifiers&lt;br /&gt;
&lt;br /&gt;
== Release 0.5.0-RC1 ==&lt;br /&gt;
Various internal code cleanups:&lt;br /&gt;
- Removal of unrequired utf8* casts on string literals.&lt;br /&gt;
- Removed use of NULL macro from the library code.&lt;br /&gt;
- Code refactorings to Font class. Removes some instances of repeated code, and makes &lt;br /&gt;
some methods shorter / cleaner.&lt;br /&gt;
- Split large methods in Scheme into smaller, more managable, chunks.&lt;br /&gt;
- Removed all the System constructor overloads and replaced with a single method.&lt;br /&gt;
- Removed string literals for component widget names which were scattered throughout t&lt;br /&gt;
he widget code.&lt;br /&gt;
- Replaced virtually all member fields holding pointers to component widgets with gett&lt;br /&gt;
er methods (which basically allows those widgets to be replaced without the parent kno&lt;br /&gt;
wing or caring).&lt;br /&gt;
- Refactoring of XML handler to remove huge if/else if/else construct.&lt;br /&gt;
- Refectored large if / else if / else constructs in all non-falagard XML handlers to &lt;br /&gt;
use a member function for each element type (rather than having all code in one huge f&lt;br /&gt;
unction).&lt;br /&gt;
- Event system has been rewritten from scratch.&lt;br /&gt;
- Font system has been rewritten.&lt;br /&gt;
&lt;br /&gt;
Added &amp;quot;PushedOff&amp;quot; rendering state for button based widgets and MenuItem.&lt;br /&gt;
Added: Ability to rename windows.&lt;br /&gt;
Added: CEGUISamplesConfig.h file to allow configuration of samples framework independe&lt;br /&gt;
ntly of the main config (saves recompiling everything just to change some sample setti&lt;br /&gt;
ng).&lt;br /&gt;
Added: FPS readout to OpenGL base app in the samples framework.&lt;br /&gt;
Added: &amp;quot;PropertyLinkDefinition&amp;quot; element for Falagard system.&lt;br /&gt;
Added: &amp;quot;controlPropery&amp;quot; attribute to SectionSpecififations under falagard to enable re&lt;br /&gt;
nering of section imagery to be controled via a named boolean property.&lt;br /&gt;
Added: mouse pass through feature in Window, to ignore mouse events. Nice for making a&lt;br /&gt;
 DefaultWindow transparent to the mouse regarding picking windows behind it.&lt;br /&gt;
Added: MSVC++ auto-linking for Ogre base app in samples framework.&lt;br /&gt;
Added: grab/restoreTextures in the OpenGL renderer to cache texture image data, and la&lt;br /&gt;
ter restore it.&lt;br /&gt;
Added: Abstracted Logger interface to support user created custom loggers. (SF patch #&lt;br /&gt;
1414121 by zap)&lt;br /&gt;
Added: DefaultLogger implementation (SF patch #1414121 by zap)&lt;br /&gt;
Added: page up/down key functionality to MultiLineEditbox (SF patch #1347376 by Dalfy)&lt;br /&gt;
Added: small script to recreate the binding generator for tolua++&lt;br /&gt;
Added: customized tolua++ binary. For exception handling support in generated binding &lt;br /&gt;
code.&lt;br /&gt;
Added: missing exception definitions file needed to generate the bindings.&lt;br /&gt;
Added: README with instructions on how to generate the bindings.&lt;br /&gt;
Added: Documentation for some of the new features in the bundled tolua++ generator.&lt;br /&gt;
Added: When subscribing to events from &amp;quot;inside&amp;quot; Lua a self object can be registered as&lt;br /&gt;
 well to be passed along with the EventArgs.&lt;br /&gt;
Added: New WindowRenderer system, replacing previous system where the Window sub-class&lt;br /&gt;
 controlled the rendering process.&lt;br /&gt;
Added: Major update of the LuaScriptModule to support anonymous functions.&lt;br /&gt;
Added: Exception handling has been added for some functions.&lt;br /&gt;
Added: Falagard derivatives of DefaultWindow, DragContainer and ItemEntry with minimal&lt;br /&gt;
 StateImagery.&lt;br /&gt;
Added: executeEventHandler now accepts functions that are table fields.&lt;br /&gt;
Added: Text node support to both parser (Xerces and TinyXML)&lt;br /&gt;
Added: AutoWindow tag to xml layouts to fetch a window created by the look'n'feel or t&lt;br /&gt;
he base widget itself.&lt;br /&gt;
Added: Window::isAutoWindow member that returns true if the window has &amp;quot;__auto_&amp;quot; in it&lt;br /&gt;
s name. (a flag is set in the constructor). It's faster than checking the actual strin&lt;br /&gt;
g.&lt;br /&gt;
Added: A setting to Window to specify that it should never write XML no matter what if&lt;br /&gt;
 activated. Tooltips get this set by default by System.&lt;br /&gt;
Added: A property ban list to provide a system for mapping which properties should (no&lt;br /&gt;
t) be written to XML. In the respective addProperties member functions checks have bee&lt;br /&gt;
n added and some properties are banned if we are an auto window.&lt;br /&gt;
Added: Default resource group support to Xerces for use when loading schema files.&lt;br /&gt;
Added: Default resource group support to ScriptingModule, and implemented its use in &lt;br /&gt;
the CEGUILua module.&lt;br /&gt;
Added: DynamicModule class to wrap access to a dynamically linked / loaded module.&lt;br /&gt;
Added: New dynamic libraries for Xerces, Expat TinyXMLParser, and libxml Parsers.&lt;br /&gt;
Added: TextProperty and FontProperty elements for Falagard text components.&lt;br /&gt;
Added: New ItemListBase based ItemListbox widget. For Window based listbox items.&lt;br /&gt;
Added: XML Serialization class for all XML writing.&lt;br /&gt;
Added: Recursive versions of Window::getChild and isChild by ID. They are called getCh&lt;br /&gt;
ildRecursive and isChildRecursive. Reason for the explicit naming is that it's a pretty expensive operation and should not be used unless necessary.&lt;br /&gt;
Added: Lots of missing members in the Lua bindings.&lt;br /&gt;
Added: setlocale(LC_NUMERIC, &amp;quot;C&amp;quot;); to the System constructor as we depend on this beha&lt;br /&gt;
viour.&lt;br /&gt;
Added: setVisible member to CEGUI::MouseCursor.&lt;br /&gt;
Added: bat files to make it easier for Windows users to regenerate the Lua bindings an&lt;br /&gt;
d tolua++cegui.&lt;br /&gt;
Added: ImageCodec support to the OpenGL renderer. This allows users to easily write a &lt;br /&gt;
custom image loader. TGA, SILLY, DevIL, Corona and FreeImage codecs are supplied.&lt;br /&gt;
Added: const version of getDataPtr in RawDataContainer.&lt;br /&gt;
Added: premake scripts to generate MSVC solutions.&lt;br /&gt;
Added: ClippedContainer for situations where more specialized clipping is required.&lt;br /&gt;
&lt;br /&gt;
Modified: Placed the integrated TinyXML into its own namespace (CEGUITinyXML) to preve&lt;br /&gt;
nt clashes in projects using another copy of TinyXML. (Patch #1294002).&lt;br /&gt;
Modified: Changed EventSet to operate without needing events to be pre-added, much lik&lt;br /&gt;
e GlabalEventSet always did.&lt;br /&gt;
Modified: Removal of mass pre-specification of events for all classes using events.&lt;br /&gt;
Modified: Cflags to add include dir for CEGUI in CEGUI.pc.in (allows use of &amp;lt;CEGUI/...&lt;br /&gt;
&amp;gt; form of include statement).&lt;br /&gt;
Modified: The &amp;quot;Lua and tolua++&amp;quot; module has been made a DLL on Windows machines.&lt;br /&gt;
Modified: Renamed System::setTooltip to System::setDefaultTooltip (Mantis #1Cool.&lt;br /&gt;
Modified: In the lua module, updated Window with casting helpers as member functions. &lt;br /&gt;
eg. w:toFrameWindow()&lt;br /&gt;
Modified: Removed the Static,StaticText and StaticImage from CEGUIBase and implemented&lt;br /&gt;
 them in FalagardBase instead.&lt;br /&gt;
Modified: Updated to tolua++ 1.0.92&lt;br /&gt;
Modified: Moved LuaFunctor into its own files&lt;br /&gt;
Modified: Reimplemented the &amp;quot;late binding&amp;quot; effect from the v04 Lua module. In v04 the &lt;br /&gt;
function is always looked up by name. In CVS HEAD the actual Lua function is reference&lt;br /&gt;
d, but now this will only occur the first time the event is triggered. This means that it's no longer necessary to have a function defined to subscribe it to an event. As l&lt;br /&gt;
ong as the function has been created before the event occurs everything will be good S&lt;br /&gt;
mile&lt;br /&gt;
Modified: Moved subscribeScriptedEvent into ScriptModule to allow more customized scri&lt;br /&gt;
pt subscription functionality.&lt;br /&gt;
Modified: Made the layout XML handler use subscribeScriptedEvent for Event tags instea&lt;br /&gt;
d of subscribeEvent with ScriptFunctor&lt;br /&gt;
Modified: Removal of &amp;quot;tolua_outside&amp;quot; stuff that was no longer needed.&lt;br /&gt;
Modified: Moved the declaration/definition of base window factories into its own files&lt;br /&gt;
.&lt;br /&gt;
Modified: Removal of WidgetSets folder, and its contents.&lt;br /&gt;
Modified: Removed unnecessary getSingleton and getSingletonPtr from manager classes.&lt;br /&gt;
Modified: The script module now throws ScriptException.&lt;br /&gt;
Modified: Removal of TextItem as falagard now handles that exclusively.&lt;br /&gt;
Modified: Moved all rendering member functions out of base classes an into Falagard re&lt;br /&gt;
ndering classes.&lt;br /&gt;
Modified: Removal of virtually all rendering and layout related Window properties from&lt;br /&gt;
 CEGUIBase - a few are moved to FalagardBase, the rest must be implemented via XML.&lt;br /&gt;
Modified: Removal of TaharezLook and WindowsLook modules from the system.&lt;br /&gt;
Modified: Removal of MetricsMode system, and all non-unified interface and properties &lt;br /&gt;
from Window (and related fixes to other classes).&lt;br /&gt;
Modified: Elimination of RenderableElement and derived classes.&lt;br /&gt;
Modified: Moved to a C preprocessor macro system for widget module creation.&lt;br /&gt;
Modified: Removal of abstract createXXX methods from widget base classes - the looknfe&lt;br /&gt;
el system now auto-creates these widgets when specified within the XML.&lt;br /&gt;
Modified: Updated to TinyXML 2.4.3 in order to allow CDATA section in XML text node (v&lt;br /&gt;
erbatim text)&lt;br /&gt;
Modified: GUILayout handler in order to support long value in properties.&lt;br /&gt;
Modified: Made the XML writing system aware of falagard when determining property defa&lt;br /&gt;
ult values.&lt;br /&gt;
Modified: Switched PropertyHelper to use std::ostringstream as the output is much nice&lt;br /&gt;
r. Changed property default values to the new format where needed.&lt;br /&gt;
Modified: Better error reporting for dynamic module load failures.&lt;br /&gt;
Modified: Switched to using external pcre library. Removed embedded copy of pcre.&lt;br /&gt;
Modified: Switched system to use dynamic libs for XML parsers with programatically con&lt;br /&gt;
figurable default.&lt;br /&gt;
Modified: FactoryModule to use DynamicModule.&lt;br /&gt;
Modified: Resolved issue with unneeded member qualification (Patch #1454773).&lt;br /&gt;
Modified: Made String::ptr a public member.&lt;br /&gt;
Modified: The bundled tolua++cegui binding generator will now generate a lua_CEGUI.cpp&lt;br /&gt;
 that compiles out-of-the-box on Windows&lt;br /&gt;
Modified: Removed the DataContainer template class, and made it into just RawDataConta&lt;br /&gt;
iner, non templated.&lt;br /&gt;
Modified: Optimized FalagardMultiLineEditbox to only cache visible lines when renderin&lt;br /&gt;
g.&lt;br /&gt;
Modified: Optimized ButtonBase and MenuItem updateInternalState. Mantis #44&lt;br /&gt;
Modified: Moved the renderers to their own folder named RendererModules.&lt;br /&gt;
Modified: Optimized picking and rendering by caching screen space rectangles.&lt;br /&gt;
Modified: Applied zap's rewrite of the Font system. Patch #1508321&lt;br /&gt;
Modified: Texture::loadFromMemory now takes a Texture::PixelFormat parameter. RGB and &lt;br /&gt;
RGBA are currently required. Fixes Patch #1455523 as well. 3rd party renderer modules &lt;br /&gt;
needs to be updated.&lt;br /&gt;
&lt;br /&gt;
Bug fix: OpenGLRenderer was producing errors and not cleaning up state changes properl&lt;br /&gt;
y (thanx muhkuh25)&lt;br /&gt;
Bug fix: OpenGLRenderer was broken when compiled for x86-64.&lt;br /&gt;
Bug Fix: ListboxItem::getOwnerWindow should be const&lt;br /&gt;
Bug Fix: ListboxItem::getOwnerWindow should not take a Window* argument.&lt;br /&gt;
Bug Fix: Scheme::resourcesLoaded was always returning true.&lt;br /&gt;
Bug Fix: PropertyHelper::stringToImage was not handling empty string case.&lt;br /&gt;
Bug Fix: Editbox::onCharacter was setting the event as handled even if nothing was don&lt;br /&gt;
e.&lt;br /&gt;
Bug Fix: Added shift/ctrl/alt support to the OpenGL sample driver (injects LeftXXX)&lt;br /&gt;
Bug Fix: The command line renderer selector does no longer ask if there is only one re&lt;br /&gt;
nderer available.&lt;br /&gt;
Bug Fix: Fixed window resizing for the OpenGL Sample driver.&lt;br /&gt;
Bug Fix: fixed const correctness for &amp;quot;String::utf8_stream_len&amp;quot; SF patch #1367423&lt;br /&gt;
Bug Fix: Detect &amp;quot;window-&amp;gt;addChildWindow(window);&amp;quot; and do nothing instead of actually t&lt;br /&gt;
rying.&lt;br /&gt;
Bug Fix: Added missing performChildWindowLayout to Scrollbar::onScrollConfigChanged to&lt;br /&gt;
 allow making a look'n'feel with a thumb that sizes to indicate document size.&lt;br /&gt;
Bug fix: const correctness for Window::getLookNFeel&lt;br /&gt;
Bug fix: FrameWindow, isTitlebarEnabled and isCloseButtonEnabled were return the oppos&lt;br /&gt;
ite of what they should.&lt;br /&gt;
Bug Fix: FrameWindow should do relayout if text changes to allow using a fontdim in th&lt;br /&gt;
e titlebar dimensions.&lt;br /&gt;
Bug Fix: Changing the default mouse cursor in the System object will now update the cu&lt;br /&gt;
rsor immediately where appropriate. (Ticket #17).&lt;br /&gt;
Bug Fix: Fixed case in StaticText where default text area was always used if frame was&lt;br /&gt;
 disabled.&lt;br /&gt;
Bug Fix: Image offsets were'nt being properly handled for the corners in FrameComponen&lt;br /&gt;
t.&lt;br /&gt;
Bug Fix: MultiColumnList would always use item string when sorting, instead of vitual &lt;br /&gt;
operators on users custom items.&lt;br /&gt;
Bug Fix: System::getWindowContainingMouse would return incorrect Window if called from&lt;br /&gt;
 within Window::EventMouseLeaves handlers.&lt;br /&gt;
Bug Fix: Order of static data creation in C++ is unspecified; we can't have globally d&lt;br /&gt;
efined static data that relies on other such static data within the same module.&lt;br /&gt;
Bug Fix: Falagard/ProgressBar was broken when vertical or reversed-horizontal.&lt;br /&gt;
Bug Fix: Corruption of window registry when rename failed (Patch #1450623).&lt;br /&gt;
Bug Fix: Initialisation issue with TabControl trying to access child widgets before th&lt;br /&gt;
ey are created. (Patch #1391727).&lt;br /&gt;
Buf Fix: CEGUI::Window::setModalState(true) removes the modal state from a modal windo&lt;br /&gt;
w. Mantis #42&lt;br /&gt;
Bug Fix: MultiColumnList getNextSelection bug. Mantis #47&lt;br /&gt;
Bug Fix: System subscriber to renderer event but does not unsubscribe on destruction. &lt;br /&gt;
Mantis #48&lt;br /&gt;
Bug Fix: OpenGL and DirectX9 renderers were not handling error correctly when creating&lt;br /&gt;
 textures.&lt;br /&gt;
Bug Fix: Bug in LuaScriptModule where executeScriptFile did not unload the file data b&lt;br /&gt;
uffer correctly in case of an exception (thanks gcarlton).&lt;br /&gt;
Bug Fix: A bug in ItemListBase::resetList_impl where calling resetList would crash (th&lt;br /&gt;
anks Turtle).&lt;br /&gt;
Bug Fix: Typo in TabPane::testClassName_impl (&amp;quot;Tabpane&amp;quot; instead of &amp;quot;TabPane&amp;quot;).&lt;br /&gt;
Bug Fix: Big Endian inconsistency in CEGUI::colour.&lt;br /&gt;
Bug Fix: CEGUI::Window was not detaching the tooltip during destruction. Mantis #38&lt;br /&gt;
Bug Fix: FrameWindow was consuming all LeftButton up events. Down events were affected&lt;br /&gt;
 as well, and now only consume if the event started drag sizing.&lt;br /&gt;
Bug Fix: DragContainer would overwrite any new position applied to the DragContainer d&lt;br /&gt;
uring the DragDropItemDropped event. Mantis #53&lt;br /&gt;
Bug Fix: The OpenGL sample driver could cause a stack overflow. Patch #1507826&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Porting Notes=&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
The 0.5.0 release of Crazy Eddie's GUI System is the first of what will likely be a series of releases containing breaking changes for client code and data files.  We feel these breaking changes are required as we move closer to the 1.0 release of CEGUI, and also as the design and usage patterns for CEGUI change; the results are a generally more streamlined system as we move from one idiom to another, as opposed to becoming more and more bloated due to retaining vast amounts of code and kludges for backward compatibility reasons.&lt;br /&gt;
&lt;br /&gt;
This document is a general overview and guide to the breaking changes between the 0.4.x series of releases and the 0.5.0 release.  As and when other breaking releases are made, additional documentation will be provided as necessary.&lt;br /&gt;
&lt;br /&gt;
==CELayoutUpgrader==&lt;br /&gt;
&lt;br /&gt;
[[CELayoutUpgrader]] is a python script that can upgrade XML layout files to the Unified Coordinate System. It should help to ease the porting process.&lt;br /&gt;
&lt;br /&gt;
==Changes and Porting==&lt;br /&gt;
This section is intended as a general overview of the breaking changes made.  Blah, blah, blah.&lt;br /&gt;
&lt;br /&gt;
===Code Changes===&lt;br /&gt;
This sub-section details changes made to the CEGUI system code and API which will affect client code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====The new WindowRenderer system====&lt;br /&gt;
One of the main issues with the previous widget module approach, was that it became exceptionally difficult to sub-class a widget type where some custom behavioural changes or additions were required.  &lt;br /&gt;
 *** TODO ***&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====CEGUI::System Constructor====&lt;br /&gt;
The overloaded constructors for the main CEGUI::System object have been removed and replaced with a single, unified, constructor.  Using the new constructor it is still possible to do all the things that used to be possible, while making the whole system construction process a little more uniform.&lt;br /&gt;
&lt;br /&gt;
The new constructor has the form:&lt;br /&gt;
 System(Renderer* renderer,&lt;br /&gt;
       ResourceProvider* resourceProvider = 0,&lt;br /&gt;
       XMLParser* xmlParser = 0,&lt;br /&gt;
       ScriptModule* scriptModule = 0,&lt;br /&gt;
       const String&amp;amp; configFile = &amp;quot;&amp;quot;,&lt;br /&gt;
       const String&amp;amp; logFile = &amp;quot;CEGUI.log&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
As can be seen, the Renderer module is, of course, still mandatory, though you are free to provide all or none of the other optional arguments and passing in 0 where no object, or no custom object, is required.&lt;br /&gt;
&lt;br /&gt;
For the most basic uses of the system, where only the Renderer is passed in, no changes will be required. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====System::setTooltip changed to System::setDefaultTooltip====&lt;br /&gt;
The member function&lt;br /&gt;
 System::setTooltip&lt;br /&gt;
has been renamed as&lt;br /&gt;
 System::setDefaultTooltip&lt;br /&gt;
this was a change for API consistency.  Update your code to use the new name for this member.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Window MetricsMode removed====&lt;br /&gt;
The concept of a singular 'MetricsMode' for a window is now obsolete and is replaced with the 'Unified' metrics system (which comprises of both a relative 'scale' value and an absolute 'offset' value).&lt;br /&gt;
&lt;br /&gt;
The class members, properties and all associated items affecting MetricsMode have been removed from the system and the use of the Unified metrics system is now mandatory.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Window Metrics and other conversion members removed====&lt;br /&gt;
Member functions in the Window class that were concerned with converting values between the various metric modes have all been removed.&lt;br /&gt;
There may still be the need to perform some conversions of co-ordinates, so this functionality is now provided by the external utility class CEGUI::CoordConverter.&lt;br /&gt;
Window Size and Positioning&lt;br /&gt;
&lt;br /&gt;
Due to the removal of the MetricsMode concept, and the now mandatory use of 'Unified' co-ordinate values, the means by which you specify size and position is now by using the unified co-ordinate types: UDim, UVector2 and URect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=2px cellspacing=0&lt;br /&gt;
| style=&amp;quot;color: #ffffff; background-color: #ff5555; border: solid 1px #000000;&amp;quot; | '''The information in the following section has been updated again since RC1 was issued - early adopters will need to update their code again to use SVN trunk code and the upcoming RC2.'''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
*getXPosition, getWindowXPosition, getRelativeXPosition and getAbsoluteXPosition members are replaced with a single getXPosition member returning a UDim.&lt;br /&gt;
*getYPosition, getWindowYPosition, getRelativeYPosition and getAbsoluteYPosition members are replaced with a single getYPosition member returning a UDim.&lt;br /&gt;
*getPosition, getWindowPosition, getRelativePosition and getAbsolutePosition members are replaced with a single getPosition member returning a UVector2.&lt;br /&gt;
*getWidth, getWindowWidth, getRelativeWidth and getAbsoluteWidth members are replaced with a single getWidth member returning a Udim.&lt;br /&gt;
*getHeight, getWindowHeight, getRelativeHeight and getAbsoluteHeight members are replaced with a single getHeight member returning a UDim.&lt;br /&gt;
*getSize, getWindowSize, getRelativeSize and getAbsoluteSize members are replaced with a single getSize member returning a UVector2&lt;br /&gt;
*getRect, getWindowArea, getRelativeRect and getAbsoluteRect members are replaced with a single getArea member returning a URect.&lt;br /&gt;
*getMaximumSize and getWindowMaxSize members are replaced with a single getMaxSize member returning a UVector2.&lt;br /&gt;
*getMinimumSize and getWindowMinSize members are replaced with a single getMinSize member returnung a UVector2.&lt;br /&gt;
&lt;br /&gt;
*setWidth and setWindowWidth members are replaced with a single setWidth member taking a UDim.&lt;br /&gt;
*setHeight and setWindowHeight members are replaced with a single setHeight member taking a UDim.&lt;br /&gt;
*setSize and setWindowSize members are replaced with a single setSize member taking a UVector2.&lt;br /&gt;
*setXPosition and setWindowXPosition members are replaced with a single setXPosition member taking a UDim.&lt;br /&gt;
*setYPosition and setWindowYPosition members are replaced with a single setYPosition member taking a UDim.&lt;br /&gt;
*setPosition and setWindowPosition members are replaced with a single setPosition member taking a UVector2.&lt;br /&gt;
*setAreaRect, setRect and setWindowArea members are replaced with setArea members accepting the following options:&lt;br /&gt;
**Four UDims; specifying x position, y position, width and height.&lt;br /&gt;
**Two UVector2s; specifying position and size.&lt;br /&gt;
**A single URect defining the area.&lt;br /&gt;
*setMaximumSize and setWindowMaxSize members are replaced with a single setMaxSize member taking a UVector2.&lt;br /&gt;
*setMinimumSize and setWindowMinSize members are replaced with a single setMinSize member taking a UVector2.&lt;br /&gt;
&lt;br /&gt;
====Component Widget creation abstract members====&lt;br /&gt;
If you have sub-classed any Window types in order to create a new “Widget Module”, part of your responsibility was to provide implementations for various abstract member functions whose job it was to create the various component widgets required by the container window.  These members were typically named createXXX (for example, Combobox::createEditbox).&lt;br /&gt;
&lt;br /&gt;
These abstract member functions and the internal calls to them have all been removed from the system.  The component widgets are now specified within the looknfeel xml files are are automatically created by the Falagard looknfeel system as and when required.&lt;br /&gt;
You should remove any code that creates these component widgets and add appropriate &amp;lt;Child&amp;gt; tags to your looknfeel xml files instead.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Component Widget member fields====&lt;br /&gt;
If you had sub-classed any of the Window types, either to provide some modified behaviour or perhaps for a “Widget Module” as part of creating a custom look, you would previously have had access to some member variables that held pointers to component widgets of the more complicated widget types (for example, the Scrollbar widget would have held pointers to the two PushButton widgets and the Thumb widget that it was composed of).  These members have now been removed and replaced with 'getter' member functions; this is important because in the future the actual Window objects used for these component parts may not be valid for the entire life of the containing Window.  That is, the component Windows may get destroyed and re-created, thus invalidating any cached pointers.&lt;br /&gt;
&lt;br /&gt;
The old member variables and the getter function that replaces them are listed here:&lt;br /&gt;
 *** TODO ***&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====RenderableElement, RenderableImage and RenderableFrame classes====&lt;br /&gt;
These classes have all been removed from the system entirely.  Everything that these classes achieved with regards to rendering for window and widget types can now be done via the Falagard looknfeel system.&lt;br /&gt;
&lt;br /&gt;
For window based rendering, you should remove your use of Renderable* classes in favour of ImageryComponent and FrameComponent elements in your looknfeel xml files.&lt;br /&gt;
If you were using the Renderable* classes to perform rendering outside of the window rendering systems, you will now need to find alternative, custom, means to do this.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Static, StaticImage and StaticText classes====&lt;br /&gt;
These classes are now removed from the base system and have been implemented as WindowRenderer classes.  Generally, your interface to these widget types should now use a simple default window and the properties system.&lt;br /&gt;
&lt;br /&gt;
The look'n'feel spec for these two widgets have changed as well.&lt;br /&gt;
&lt;br /&gt;
StaticImage:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        The LookNFeel should provide the following:&lt;br /&gt;
&lt;br /&gt;
        States:&lt;br /&gt;
            - Enabled                     - basic rendering for enabled state.&lt;br /&gt;
            - Disabled                    - basic rendering for disabled state.&lt;br /&gt;
            - EnabledFrame                - frame rendering for enabled state&lt;br /&gt;
            - DisabledFrame               - frame rendering for disabled state.&lt;br /&gt;
            - WithFrameEnabledBackground  - backdrop rendering for enabled state with frame enabled.&lt;br /&gt;
            - WithFrameDisabledBackground - backdrop rendering for disabled state with frame enabled.&lt;br /&gt;
            - NoFrameEnabledBackground    - backdrop rendering for enabled state with frame disabled.&lt;br /&gt;
            - NoFrameDisabledBackground   - backdrop rendering for disabled state with frame disabled.&lt;br /&gt;
            - WithFrameImage              - image rendering when frame is enabled&lt;br /&gt;
            - NoFrameImage                - image rendering when frame is disabled (defaults to WithFrameImage if not present)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
StaticText:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        The LookNFeel should provide the following:&lt;br /&gt;
&lt;br /&gt;
        States:&lt;br /&gt;
            - Enabled                     - basic rendering for enabled state.&lt;br /&gt;
            - Disabled                    - basic rendering for disabled state.&lt;br /&gt;
            - EnabledFrame                - frame rendering for enabled state&lt;br /&gt;
            - DisabledFrame               - frame rendering for disabled state.&lt;br /&gt;
            - WithFrameEnabledBackground  - backdrop rendering for enabled state with frame enabled.&lt;br /&gt;
            - WithFrameDisabledBackground - backdrop rendering for disabled state with frame enabled.&lt;br /&gt;
            - NoFrameEnabledBackground    - backdrop rendering for enabled state with frame disabled.&lt;br /&gt;
            - NoFrameDisabledBackground   - backdrop rendering for disabled state with frame disabled.&lt;br /&gt;
&lt;br /&gt;
        Named Areas (missing areas will default to 'WithFrameTextRenderArea'):&lt;br /&gt;
            WithFrameTextRenderArea&lt;br /&gt;
            WithFrameTextRenderAreaHScroll&lt;br /&gt;
            WithFrameTextRenderAreaVScroll&lt;br /&gt;
            WithFrameTextRenderAreaHVScroll&lt;br /&gt;
            NoFrameTextRenderArea&lt;br /&gt;
            NoFrameTextRenderAreaHScroll&lt;br /&gt;
            NoFrameTextRenderAreaVScroll&lt;br /&gt;
            NoFrameTextRenderAreaHVScroll&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Dynamic addition of Events to Windows and other EventSet based objects====&lt;br /&gt;
It used to be that all available Event objects would be pre-added to an EventSet when it was constructed.  When an Event was accessed which had not been added to the EventSet an appropriate exception was thrown.&lt;br /&gt;
&lt;br /&gt;
This behaviour has now changed.  Events are only added to an EventSet when a handler for that event is first subscribed.  A side effect of this is that EventSet does now not throw exceptions, either when firing a non-existing Event (now reclassified as simply an event which has no subscribers), or when subscribing to an Event that does not yet exist, since the Event is now automatically created and added to the EventSet.&lt;br /&gt;
&lt;br /&gt;
If your code currently relies on exceptions being thrown by the events system, you will need to change this to a more pro-active approach (by manually checking if an event exists yet), instead of reactive (catching exceptions).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====TinyXML moved to CEGUITinyXML namespace====&lt;br /&gt;
If you were for some reason using our integrated copy of TinyXML directly in your application, we have moved this module into the namespace 'CEGUITinyXML'.  This was done to avoid clashes and conflicts where the client contained its own copy of TinyXML.&lt;br /&gt;
&lt;br /&gt;
To continue to directly use the integrated TinyXML, just add the namespace qualifier where appropriate.&lt;br /&gt;
&lt;br /&gt;
If you are just using the TinyXML based implementation of CEGUI::XMLParser, you do not need to change anything.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Data File Changes===&lt;br /&gt;
This sub-section details changes that will affect the xml data files used with CEGUI.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Updated XSD files for Xerces====&lt;br /&gt;
Even the most rudimentary changes to the xml formats we use mean that if you're using the Xerces-C, or other, validating XML parser, then you will need to update you projects to use the new .xsd files.  These are collected together for convenience in the XMLRefSchema subdirectory.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Falagard Additions ===&lt;br /&gt;
From lack of a better place to put this I'll list the additions that have been made to Falagard here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''PropertyLinkDefinition'''&lt;br /&gt;
New element that will create a property that is a link to another property of a child window.&lt;br /&gt;
&lt;br /&gt;
Attributes:&lt;br /&gt;
* type (type, optional and not currently used for anything)&lt;br /&gt;
* name (name of the property link)&lt;br /&gt;
* widget (name suffix of the child widget to link to)&lt;br /&gt;
* targetProperty (the target property to link to. Optional, will default to ''name'' if not given)&lt;br /&gt;
* initialValue (starting value for the property. Optional, will default to empty)&lt;br /&gt;
* layoutOnWrite (will make the widget redo the child layout when the property is written. Optional, defaults to ''false'')&lt;br /&gt;
* redrawOnWrite (will make the widget redraw when the property is written. Optional, default to ''false'')&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''controlProperty'''&lt;br /&gt;
&lt;br /&gt;
New attribute added to ''Section''. Value is the name of a property, and if specified the Section will only render when the property has a value of ''True''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''TextComponent'''&lt;br /&gt;
&lt;br /&gt;
Two new sub-elements are now valid for ''TextComponent''.&lt;br /&gt;
&lt;br /&gt;
''TextProperty'', and ''FontProperty''. Must be specified in that order after the (optional) ''Text'' element.&lt;br /&gt;
Both have one required attribute ''name'' which takes the name of a property which will contain the text to draw, or the name of the font to use for rendering.&lt;br /&gt;
&lt;br /&gt;
In case these new elements are used along with the ''Text'' element, the string and font specified in the ''Text'' element will be used as defaults if the ''TextProperty'' or ''FontProperty'' evaluates to empty strings.&lt;br /&gt;
&lt;br /&gt;
=== Font system changes ===&lt;br /&gt;
&lt;br /&gt;
* There's no notion of '''StartCodepoint''' and '''EndCodepoint''', or '''glyph set''' anymore. Font render glyphs on the fly as required: if you ask to display &amp;quot;A&amp;quot; it renders a small subset of glyphs (256 codepoints surrounding the missing glyph usually, but can render extra glyphs out of the range to conserve texture space).&lt;br /&gt;
* The Font class is now an abstract class and there are two implementations: FreeTypeFont and PixmapFont.&lt;br /&gt;
** FreeTypeFont uses the FreeType library and can display TTF, FON, PCF/BDF, PS fonts (and possibly others). I have ensured that bitmap fonts work, since bitmap fonts should be handled a little different from outline fonts.&lt;br /&gt;
** PixmapFont uses an Imageset with the glyphs and can display colorful glyphs (which FreeType cannot due to its grayscale nature). However, it's more primitive, but can be useful for things like logos, loading messages etc.&lt;br /&gt;
* The Font class is now a PropertySet, so specialized classes derived from Font can add their own properties (such as PointSize for FreeType fonts which don't have sense for Imageset-based fonts). Here's a list of available properties:&lt;br /&gt;
** All font classes: Name, FileName, NativeRes, ResourceGroup, AutoScaled&lt;br /&gt;
** FreeTypeFont: PointSize, Antialiased&lt;br /&gt;
** PixmapFont: Imageset, Mapping&lt;br /&gt;
* Fixed a number of (vertical) font positioning errors: the font wasn't properly centered within its LineAdvance range.&lt;br /&gt;
* Added several new fonts: DejaVuSans (taken from the DejaVu project, http://dejavu.sf.net), fkp (a X11 bitmap font from http://artwizaleczapka.sf.net), FairChar (a Imageset-based font which I made from some old GIF file I found on my HD :-).&lt;br /&gt;
* A FontDemo sample which shows several properties of the new Font class.&lt;br /&gt;
&lt;br /&gt;
The above changes resulted in some slight changes to the format of the XML .font files:&lt;br /&gt;
&lt;br /&gt;
* GlyphSet, GlyphRange, Glyph sections of the Font are gone&lt;br /&gt;
* The possible values of the Type attribute are now:&lt;br /&gt;
** FreeType (instead of Dynamic)&lt;br /&gt;
** Pixmap (instead of Static)&lt;br /&gt;
* The FirstCodepoint and LastCodepoint attributes of the Font section were removed&lt;br /&gt;
&lt;br /&gt;
After you change your .font files as mentioned above, they should work without problems.&lt;br /&gt;
&lt;br /&gt;
=== Iterator Changes ===&lt;br /&gt;
* EventSet::EventIterator is changed to EventSet::Iterator&lt;br /&gt;
* PropertySet::PropertyIterator is changed to PropertySet::Iterator&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To be continued...&lt;/div&gt;</summary>
		<author><name>Makofierce</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=The_Beginners_Guide_to_Falagard_skinning_-_Part_I&amp;diff=3606</id>
		<title>The Beginners Guide to Falagard skinning - Part I</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=The_Beginners_Guide_to_Falagard_skinning_-_Part_I&amp;diff=3606"/>
				<updated>2011-01-07T09:49:49Z</updated>
		
		<summary type="html">&lt;p&gt;Makofierce: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
The Falagard system in CEGUI 0.4 and up is a powerful tool.&lt;br /&gt;
By using it you can make your GUI elements look like you want and not how some coder thought looked cool.&lt;br /&gt;
Use Falagard to your advantage and you can do alot of nice things from XML that you might think needed real code.&lt;br /&gt;
&lt;br /&gt;
Falagard allows you not only to define how the rendering of a window proceeds, you can create new representational features as well by creating new properties for the window and using them in your imagery configurations.&lt;br /&gt;
&lt;br /&gt;
Before I go too far glorifying Falagard, we'll just jump right into it :-)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Basics ==&lt;br /&gt;
Falagard is a part of the CEGUI core and is implemented in C++. It is completely possible to write a skin in C++, but it's is not very practical. You have to recompile every time you change something. Fortunately CEGUI supports creating a Falagard skin from a custom XML format.&lt;br /&gt;
&lt;br /&gt;
This Falagard XML format is what we're going to be looking at throughout this tutorial. As I think learning by doing is the way to go, we'll try to produce something useful with this tutorial - a fully working look'n'feel for a regular button.&lt;br /&gt;
&lt;br /&gt;
The beginning:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
 &amp;lt;Falagard&amp;gt;&lt;br /&gt;
     &amp;lt;WidgetLook name=&amp;quot;MyButton&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;/WidgetLook&amp;gt;&lt;br /&gt;
 &amp;lt;/Falagard&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the truely minimal XML that defines a widget look. A widget look contains all the information needed to render a specific type of window, a widget look is also what we would define as a look'n'feel.&lt;br /&gt;
The first line tells the parser that this is really a XML document. This must always be the first line of a Falagard XML skin.&lt;br /&gt;
The second line opens the ''Falagard'' tag. This is always the first thing we do after the ''&amp;lt;?xml ... ?&amp;gt;'' tag.&lt;br /&gt;
I hope you're somewhat familiar with XML or at least HTML as this tutorial might be a little difficult to understand if you're not. Now you're warned.&lt;br /&gt;
The third line opens a ''WidgetLook'' tag. This is where we cram all the details about our look'n'feel.&lt;br /&gt;
The fourth line closes the ''WidgetLook'' tag. We must always remember to close our tags.&lt;br /&gt;
The fifth line closes the ''Falagard'' tag. Again - always remember to close your tags.&lt;br /&gt;
&lt;br /&gt;
While this simple XML snippet is good for showing you how to start out, it is completely useless as it does nothing.&lt;br /&gt;
&lt;br /&gt;
To make our look'n'feel interesting we need to tell it what to do. So let's have a look at the Falagard data structure:&lt;br /&gt;
&lt;br /&gt;
* WidgetLook&lt;br /&gt;
** Property definitions&lt;br /&gt;
** Properties&lt;br /&gt;
** Named areas&lt;br /&gt;
** Child components&lt;br /&gt;
** Imagery sections&lt;br /&gt;
** State imagery&lt;br /&gt;
&lt;br /&gt;
This might be overwhelming. It might not. Either way it's the how it is. Falagard is a complex system...&lt;br /&gt;
But it's really not that hard once you get down the basics.&lt;br /&gt;
&lt;br /&gt;
The look'n'feel we are going to produce is for a ''Falagard/Button'' type window. This window type is simple, and we don't have to know about all of the parts of a look'n'feel. We only need to know what we'll be using. Furthermore we'll keep it very simple which leaves us at a point where we can make something work with very little.&lt;br /&gt;
&lt;br /&gt;
I'm still going to give a short description of each item in the list though:&lt;br /&gt;
&lt;br /&gt;
* WidgetLook - This is where we add all the other components for our look'n'feel. Consider it '''the''' look'n'feel.&lt;br /&gt;
&lt;br /&gt;
* Property definitions - A property definition is the creation of a new property in the window that gets the look'n'feel assigned.&lt;br /&gt;
&lt;br /&gt;
* Properties - A property in CEGUI is a window variable that we can access from anywhere. Even outside C++ (think XML window layouts). We often assign default values to properties from a look'n'feel.&lt;br /&gt;
&lt;br /&gt;
* Named areas - A named area defines a rectangle, inside the window we are skinning, with a distinct name. Often used to define where to draw some specific piece of imagery that needs special handling by CEGUI as thus cannot be completely defined in the look'n'feel.&lt;br /&gt;
&lt;br /&gt;
* Child components - Some window types need child windows. This could be scrollbar, a titlebar etc. We specify what type of window this child will be customize it for the situation from the look'n'feel.&lt;br /&gt;
&lt;br /&gt;
* Imagery sections - An imagery section is a collection of imagery components tagged with a name. We use imagery sections to split the renderable parts of our look'n'feel into sections which can be drawn independently. Like for example having the frame in one section and the background in another.&lt;br /&gt;
&lt;br /&gt;
* State imagery - Tells CEGUI what to draw when. In a state imagery we draw all the different imagery sections we need for a specific window &amp;quot;situation&amp;quot;. For our button we will have: Normal, Hover, Pushed, Disabled.&lt;br /&gt;
&lt;br /&gt;
Ok. I hope this clarifies it a bit. We'll go into more detil about the different parts as we need them.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
Every time you write a look'n'feel you need to make find out what the requirements are for the type of window you want to skin. To get this information you either look at the header files in the Falagard module source directory, or you reference the manual. This is available both online, here on the wiki, and in the documentation directory in the SDK as a PDF.&lt;br /&gt;
&lt;br /&gt;
The online version is available on the page [[&amp;quot;Falagard&amp;quot; Skinning System Documentation]]. For the list of these requirements I'm talking about the [[Falagard System base widgets reference]] is what you're looking for.&lt;br /&gt;
If we look in there we'll see that ''Falagard/Button'' only require 1 ''StateImagery'' definition to be present. ''Normal''.&lt;br /&gt;
&lt;br /&gt;
It allows up to four ''StateImagery'' definitions to cover all its possible states: ''Normal'', ''Hover'', ''Pushed'' and ''Disabled''.&lt;br /&gt;
&lt;br /&gt;
We'll start out the easy way and just make the ''Normal'' state ;-) So now our XML looks like this:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
 &amp;lt;Falagard&amp;gt;&lt;br /&gt;
     &amp;lt;WidgetLook name=&amp;quot;MyButton&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;b&amp;gt;&amp;lt;StateImagery name=&amp;quot;Normal&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;/StateImagery&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
     &amp;lt;/WidgetLook&amp;gt;&lt;br /&gt;
 &amp;lt;/Falagard&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you compare to the last XML piece, the only difference is the addition of a ''StateImagery'' tag with its name attribute set to &amp;quot;Normal&amp;quot;. This makes sure that we live up to the requirement of a &amp;quot;Normal&amp;quot; state definition.&lt;br /&gt;
As I said earlier the ''WidgetLook'' is '''the''' look'n'feel so it is - of course - inside it we add the ''StateImagery'' tag.&lt;br /&gt;
&lt;br /&gt;
This still extremely simple look'n'feel is actually a fully valid look'n'feel. It implements what is required by the manual. Though as you might have guessed it still does nothing.&lt;br /&gt;
To get it to render anything we have to define the imagery sections mentioned earlier.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Imagery ==&lt;br /&gt;
For our look'n'feel we'll just want a single image to be stretched over the entire window area. That is each corner from the image mapped to each corner of the window.&lt;br /&gt;
&lt;br /&gt;
To acheive this the first thing we need to do is to add a ''ImagerySection'' to our look'n'feel.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
 &amp;lt;Falagard&amp;gt;&lt;br /&gt;
     &amp;lt;WidgetLook name=&amp;quot;MyButton&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;b&amp;gt;&amp;lt;ImagerySection name=&amp;quot;bg&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;/ImagerySection&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
         &amp;lt;StateImagery name=&amp;quot;Normal&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;b&amp;gt;&amp;lt;Layer&amp;gt;&lt;br /&gt;
                &amp;lt;Section section=&amp;quot;bg&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Layer&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
         &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;/WidgetLook&amp;gt;&lt;br /&gt;
 &amp;lt;/Falagard&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we have added the imagery section, and named it &amp;quot;bg&amp;quot;. This name is just something we choose.&lt;br /&gt;
&lt;br /&gt;
Inside the state imagery for the &amp;quot;Normal&amp;quot; state a layer has been added.&lt;br /&gt;
The ''Layer'' tag allow you to control the z-ordering of layers inside in a ''StateImagery'', but we only need one layer for this look'n'feel so let's not worry too much about that.&lt;br /&gt;
&lt;br /&gt;
In the layer a ''Section'' has been added. This tag tells the layer its in that we want the ''ImagerySection'' named &amp;quot;bg&amp;quot; to be rendered as part of this layer.&lt;br /&gt;
&lt;br /&gt;
This is nice. The look'n'feel is all ready and hooked up to render the imagery section &amp;quot;bg&amp;quot; as the imagery for the &amp;quot;Normal&amp;quot; state. But our imagery section is still empty, and this means our look'n'feel really is no better than the previous. It still does nothing (at least visually).&lt;br /&gt;
&lt;br /&gt;
Now that we're over the really basic and boring stuff, let's make it draw that image...&lt;br /&gt;
&lt;br /&gt;
To draw a single image we use the tag ''ImageryComponent''. This tag requires us to define the area in which we want the image to be drawn, as well as the image to draw.&lt;br /&gt;
&lt;br /&gt;
The area is the most complex part of practically all look'n'feels. It is designed to be flexible and uses an extended version of the unified coordinate system of CEGUI 0.4 and up.&lt;br /&gt;
Besides the regular two numbers containing the relative and absolute component of the coordinate or size Falagard also allows us to use the dimensions of images, windows, text and even properties.&lt;br /&gt;
We can also perform arithmetic operations on these dimensions to a certain extent.&lt;br /&gt;
&lt;br /&gt;
Any area needs to define 4 dimensions to fully describe the area. There is some flexibility in how you define the dimensions though.&lt;br /&gt;
Probably the most common is to use one of &amp;quot;LeftEdge&amp;quot;, &amp;quot;TopEdge&amp;quot;, &amp;quot;RightEdge&amp;quot; or &amp;quot;BottomEdge&amp;quot;. These map to edges of the window that recieves the look'n'feel, but you can specify &amp;quot;Width&amp;quot; and &amp;quot;Height&amp;quot; instead of &amp;quot;RightEdge&amp;quot; and &amp;quot;BottomEdge&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The look'n'feel we're creating only needs a simple area that covers the entire widget. We'll take the XML required for that in two steps.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Area&amp;gt;&lt;br /&gt;
     &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;/Dim&amp;gt;&lt;br /&gt;
     &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;/Dim&amp;gt;&lt;br /&gt;
     &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;/Dim&amp;gt;&lt;br /&gt;
     &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;/Dim&amp;gt;&lt;br /&gt;
 &amp;lt;/Area&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The area itself is created with the ''Area'' tag. Inside it we have the 4 dimensions. We must explicitly state the type of dimension for each one. The order is important:&lt;br /&gt;
&lt;br /&gt;
* LeftEdge&lt;br /&gt;
* TopEdge&lt;br /&gt;
* RightEdge / Width&lt;br /&gt;
* BottomEdge / Height&lt;br /&gt;
&lt;br /&gt;
You don't have to use '''both''' width and height. For example using &amp;quot;RightEdge&amp;quot; and &amp;quot;Height&amp;quot; is fine.&lt;br /&gt;
&lt;br /&gt;
This tells the area how to interpret the dimensions that we are now going to add:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Area&amp;gt;&lt;br /&gt;
     &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
         '''&amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;'''&lt;br /&gt;
     &amp;lt;/Dim&amp;gt;&lt;br /&gt;
     &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
         '''&amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;'''&lt;br /&gt;
     &amp;lt;/Dim&amp;gt;&lt;br /&gt;
     &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
         '''&amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;RightEdge&amp;quot; /&amp;gt;'''&lt;br /&gt;
     &amp;lt;/Dim&amp;gt;&lt;br /&gt;
     &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
         '''&amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot; /&amp;gt;'''&lt;br /&gt;
     &amp;lt;/Dim&amp;gt;&lt;br /&gt;
 &amp;lt;/Area&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Inside each ''Dim'' tag we have added a dimension. Let's take them one at a time.&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt; - This tell it to put our &amp;quot;LeftEdge&amp;quot; ''Dim'' at pixel position 0. All dimensions are always relative to window that has the look'n'feel, so 0 will in this case be the left edge of our widget as we planned.&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt; - Just the same as before. But this time we're in a &amp;quot;TopEdge&amp;quot; ''Dim'' so it will result in the top edge of our window.&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;RightEdge&amp;quot; /&amp;gt; - A unified dimension. This one has a scale (relative) component of exactly one. And a offset (absolute) value of zero. As type we've set &amp;quot;RightEdge&amp;quot;. This is what the scale component get multiplied by to get some thing useful (pixel values). One times RightEdge will equal RightEdge, which is exactly the window dimension we want.&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot; /&amp;gt; - Same as before but the bottom edge of our window as the dimension.&lt;br /&gt;
&lt;br /&gt;
Now the area to span our entire is worked out, let's add that ''ImageryComponent'' and give it its area.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
 &amp;lt;Falagard&amp;gt;&lt;br /&gt;
     &amp;lt;WidgetLook name=&amp;quot;MyButton&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;ImagerySection name=&amp;quot;bg&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;b&amp;gt;&amp;lt;ImageryComponent&amp;gt;&lt;br /&gt;
                &amp;lt;Area&amp;gt;&lt;br /&gt;
                    &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                    &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                    &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                    &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                    &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;RightEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                    &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                    &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                    &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                &amp;lt;/Area&amp;gt;&lt;br /&gt;
            &amp;lt;/ImageryComponent&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
         &amp;lt;/ImagerySection&amp;gt;&lt;br /&gt;
         &amp;lt;StateImagery name=&amp;quot;Normal&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;Layer&amp;gt;&lt;br /&gt;
                &amp;lt;Section section=&amp;quot;bg&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Layer&amp;gt;&lt;br /&gt;
         &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;/WidgetLook&amp;gt;&lt;br /&gt;
 &amp;lt;/Falagard&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now the area is in place.&lt;br /&gt;
The ''ImageryComponent'' tag has been added to our ''ImagerySection'' and inside it we have out the area we just created.&lt;br /&gt;
All thats missing now is the image!&lt;br /&gt;
&lt;br /&gt;
We'll assume we have a imageset loaded called &amp;quot;MyImages&amp;quot;. And inside this imageset we have the image &amp;quot;ButtonBG&amp;quot; defined.&lt;br /&gt;
This is the image we'll use for our button.&lt;br /&gt;
&lt;br /&gt;
The XML looks like this&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Image imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;ButtonBG&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Simple eh?&lt;br /&gt;
&lt;br /&gt;
We also wanted the image to be stretched across the whole area of the ''ImageryComponent''. The default formatting in top/left alignment. Not good enough...&lt;br /&gt;
&lt;br /&gt;
We add the formatting tags&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;VertFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;HorzFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Vertical format must come first. Both sets stretching as the formatting. Which is what we need.&lt;br /&gt;
That's all we wanted in the look'n'feel so let's have a look at the XML for this extremely simple button skin.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
 &amp;lt;Falagard&amp;gt;&lt;br /&gt;
     &amp;lt;WidgetLook name=&amp;quot;MyButton&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;ImagerySection name=&amp;quot;bg&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;ImageryComponent&amp;gt;&lt;br /&gt;
                &amp;lt;Area&amp;gt;&lt;br /&gt;
                    &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                    &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                    &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                    &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                    &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;RightEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                    &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                    &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                    &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                &amp;lt;/Area&amp;gt;&lt;br /&gt;
                &amp;lt;b&amp;gt;&amp;lt;Image imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;ButtonBG&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;VertFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;HorzFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
            &amp;lt;/ImageryComponent&amp;gt;&lt;br /&gt;
         &amp;lt;/ImagerySection&amp;gt;&lt;br /&gt;
         &amp;lt;StateImagery name=&amp;quot;Normal&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;Layer&amp;gt;&lt;br /&gt;
                &amp;lt;Section section=&amp;quot;bg&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Layer&amp;gt;&lt;br /&gt;
         &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;/WidgetLook&amp;gt;&lt;br /&gt;
 &amp;lt;/Falagard&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The three new tags just got added after the area in the ''ImageryComponent'', and we're done :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Label ==&lt;br /&gt;
You might have noticed that I have'nt talked about the label until now.&lt;br /&gt;
We'll need to take a look at it now or we won't get any text on our button.&lt;br /&gt;
With Falagard you have full control of how the text is rendered.&lt;br /&gt;
&lt;br /&gt;
For our look'n'feel we want the text to be centered both vertically and horizontally in the widget. We also want the text to wrap (word wrap) if it's too long to render as one line without being clipped.&lt;br /&gt;
&lt;br /&gt;
We'll make a new ''ImagerySection'' for our label. This gives us a nice seperation of parts to render. &amp;quot;bg&amp;quot; being the background, and a new section called &amp;quot;label&amp;quot; to represent the - You guessed it - label.&lt;br /&gt;
Inside this new ''ImagerySection'' we add a ''TextComponent'' which we'll set up to render the text like we want.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;ImagerySection name=&amp;quot;label&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;TextComponent&amp;gt;&lt;br /&gt;
     &amp;lt;/TextComponent&amp;gt;&lt;br /&gt;
 &amp;lt;/ImagerySection&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Like a ''ImageryComponent'' a ''TextComponent'' must have an area. For our button we'll allow text to span the entire window. This means that we can reuse the ''Area'' from before.&lt;br /&gt;
&lt;br /&gt;
A ''TextComponent'' by default renders the text of the window that has the look'n'feel assigned.&lt;br /&gt;
This is exactly what we want for our button.&lt;br /&gt;
&lt;br /&gt;
The formatting we wanted is easily made by using the same tag we used before (to format the background image) but with another type. The formattings supported are different for ''TextComponent'' and ''ImageryComponent''.&lt;br /&gt;
&lt;br /&gt;
Let's look at the XML for this new ''ImagerySection'' &amp;quot;label&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;ImagerySection name=&amp;quot;label&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;TextComponent&amp;gt;&lt;br /&gt;
         &amp;lt;b&amp;gt;&amp;lt;Area&amp;gt;&lt;br /&gt;
             &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;RightEdge&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Dim&amp;gt;&lt;br /&gt;
         &amp;lt;/Area&amp;gt;&lt;br /&gt;
         &amp;lt;VertFormat type=&amp;quot;CentreAligned&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;HorzFormat type=&amp;quot;WordWrapCentreAligned&amp;quot; /&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
     &amp;lt;/TextComponent&amp;gt;&lt;br /&gt;
 &amp;lt;/ImagerySection&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We added the same area as in the &amp;quot;bg&amp;quot; ''ImagerySection'', and added the formattings we wanted. Take a look at [[Falagard System XML Enumerations reference]] for the complete listing of supported formattings (and lots of other stuff).&lt;br /&gt;
&lt;br /&gt;
This ''ImagerySection'' is done. It will render the label with the correct formatting using a white colour. By not specifying a colour we always choose white, which is useful as we can modulate it into any colour we choose later on. Which we of course will :-)&lt;br /&gt;
&lt;br /&gt;
To actually use this new &amp;quot;label&amp;quot; section we must add it to our state imagery like we did with the &amp;quot;bg&amp;quot; section earlier. So here's what the XML looks like so far:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
 &amp;lt;Falagard&amp;gt;&lt;br /&gt;
     &amp;lt;WidgetLook name=&amp;quot;MyButton&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;b&amp;gt;&amp;lt;ImagerySection name=&amp;quot;label&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;TextComponent&amp;gt;&lt;br /&gt;
                &amp;lt;Area&amp;gt;&lt;br /&gt;
                     &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                     &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                     &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                     &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                     &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;RightEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                     &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                     &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                     &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;/Area&amp;gt;&lt;br /&gt;
                 &amp;lt;VertFormat type=&amp;quot;CentreAligned&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;HorzFormat type=&amp;quot;WordWrapCentreAligned&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/TextComponent&amp;gt;&lt;br /&gt;
         &amp;lt;/ImagerySection&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
         &amp;lt;ImagerySection name=&amp;quot;bg&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;ImageryComponent&amp;gt;&lt;br /&gt;
                &amp;lt;Area&amp;gt;&lt;br /&gt;
                    &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                    &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                    &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                    &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                    &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;RightEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                    &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                    &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                    &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                &amp;lt;/Area&amp;gt;&lt;br /&gt;
                &amp;lt;Image imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;ButtonBG&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;VertFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;HorzFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/ImageryComponent&amp;gt;&lt;br /&gt;
         &amp;lt;/ImagerySection&amp;gt;&lt;br /&gt;
         &amp;lt;StateImagery name=&amp;quot;Normal&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;Layer&amp;gt;&lt;br /&gt;
                &amp;lt;Section section=&amp;quot;bg&amp;quot; /&amp;gt;&lt;br /&gt;
                '''&amp;lt;Section section=&amp;quot;label&amp;quot; /&amp;gt;'''&lt;br /&gt;
            &amp;lt;/Layer&amp;gt;&lt;br /&gt;
         &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;/WidgetLook&amp;gt;&lt;br /&gt;
 &amp;lt;/Falagard&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This look'n'feel adds the fully working label (still white) to our button skin. This is starting to become a useful look'n'feel, so let's give it the final touch by adding handling of the three other states ''Hover'', ''Pushed'' and ''Disabled'' that we left out before.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Colours ==&lt;br /&gt;
We want to use different text colours for each of these states. We also want to able to customize those colours on a per widget basis.&lt;br /&gt;
This is made possible by the property definition.&lt;br /&gt;
&lt;br /&gt;
A ''PropertyDefinition'' creates a new property in the window that gets the look'n'feel assigned. The property we create is a simple string value, but '''we''' choose what it's used for. '''Not''' CEGUI.&lt;br /&gt;
&lt;br /&gt;
In total we have 4 states for our button counting the new ones, so we'll add 4 new properties to store the text colour for each state. The XML is like so:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;PropertyDefinition name=&amp;quot;NormalTextColour&amp;quot; initialValue=&amp;quot;FFFFFFFF&amp;quot; redrawOnWrite=&amp;quot;true&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;PropertyDefinition name=&amp;quot;HoverTextColour&amp;quot; initialValue=&amp;quot;FFFF0000&amp;quot; redrawOnWrite=&amp;quot;true&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;PropertyDefinition name=&amp;quot;PushedTextColour&amp;quot; initialValue=&amp;quot;FF00FF00&amp;quot; redrawOnWrite=&amp;quot;true&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;PropertyDefinition name=&amp;quot;DisabledTextColour&amp;quot; initialValue=&amp;quot;7F888888&amp;quot; redrawOnWrite=&amp;quot;true&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*''name'' is the name the new property will be available under.&lt;br /&gt;
*''initialValue'' is the default value for the property.&lt;br /&gt;
*''redrawOnWrite'' when set to true the window will be redrawn when the value of the property changes.&lt;br /&gt;
&lt;br /&gt;
These properties will be available from both C++ code and in XML window layouts. So choosing a good name is a good idea.&lt;br /&gt;
You can create properties that you don't use for anything inside the look'n'feel. These will still become available which can be a good way of creating new variables for windows that you might need in your application.&lt;br /&gt;
&lt;br /&gt;
The default values represent colours in the format CEGUI would expect a colour for a built-in property.&lt;br /&gt;
Colours for CEGUI are always written in hexadecimal.&lt;br /&gt;
&lt;br /&gt;
The format is: &amp;quot;AARRGGBB&amp;quot; where:&lt;br /&gt;
* AA = Alpha&lt;br /&gt;
* RR = Red&lt;br /&gt;
* GG = Green&lt;br /&gt;
* BB = Blue&lt;br /&gt;
&lt;br /&gt;
This gives our properties the values of&lt;br /&gt;
* white for ''Normal''&lt;br /&gt;
* red for ''Hover''&lt;br /&gt;
* green for ''Pushed''&lt;br /&gt;
* 50% tranparent grey for ''Disabled''&lt;br /&gt;
&lt;br /&gt;
Setting a new value for any of these properties will make sure the button is re-rendered to show the new colour.&lt;br /&gt;
&lt;br /&gt;
The only places in the look'n'feel that know which state we are in are the ''StateImagery'' tags. The ''Section'' tags inside these allow for colours to be specified. The XML for the label in the ''Normal'' state looks like this:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Section name=&amp;quot;label&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;ColourProperty name=&amp;quot;NormalTextColour&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;/Section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The ''ColourProperty'' tag inside our ''Section'' ensures that all imagery in the imagery section &amp;quot;label&amp;quot; has its colour modulated by the value of the property &amp;quot;NormalTextColour&amp;quot;. The imagery section &amp;quot;label&amp;quot; render only white text, so by doing this we ensure that the colour rendered is exactly that of the value of the property &amp;quot;NormalTextColour&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
We now know what to do so lets look at the XML so far for this look'n'feel:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
 &amp;lt;Falagard&amp;gt;&lt;br /&gt;
     &amp;lt;WidgetLook name=&amp;quot;MyButton&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;b&amp;gt;&amp;lt;PropertyDefinition name=&amp;quot;NormalTextColour&amp;quot; initialValue=&amp;quot;FFFFFFFF&amp;quot; redrawOnWrite=&amp;quot;true&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;PropertyDefinition name=&amp;quot;HoverTextColour&amp;quot; initialValue=&amp;quot;FFFF0000&amp;quot; redrawOnWrite=&amp;quot;true&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;PropertyDefinition name=&amp;quot;PushedTextColour&amp;quot; initialValue=&amp;quot;FF00FF00&amp;quot; redrawOnWrite=&amp;quot;true&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;PropertyDefinition name=&amp;quot;DisabledTextColour&amp;quot; initialValue=&amp;quot;7F888888&amp;quot; redrawOnWrite=&amp;quot;true&amp;quot; /&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
         &amp;lt;ImagerySection name=&amp;quot;label&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;TextComponent&amp;gt;&lt;br /&gt;
                &amp;lt;Area&amp;gt;&lt;br /&gt;
                     &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                     &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                     &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                     &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                     &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;RightEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                     &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                     &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                     &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;/Area&amp;gt;&lt;br /&gt;
                 &amp;lt;VertFormat type=&amp;quot;CentreAligned&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;HorzFormat type=&amp;quot;WordWrapCentreAligned&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/TextComponent&amp;gt;&lt;br /&gt;
         &amp;lt;/ImagerySection&amp;gt;&lt;br /&gt;
         &amp;lt;ImagerySection name=&amp;quot;bg&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;ImageryComponent&amp;gt;&lt;br /&gt;
                &amp;lt;Area&amp;gt;&lt;br /&gt;
                    &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                    &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                    &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                    &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                    &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;RightEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                    &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                    &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                    &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                &amp;lt;/Area&amp;gt;&lt;br /&gt;
                &amp;lt;Image imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;ButtonBG&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;VertFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;HorzFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/ImageryComponent&amp;gt;&lt;br /&gt;
         &amp;lt;/ImagerySection&amp;gt;&lt;br /&gt;
         &amp;lt;StateImagery name=&amp;quot;Normal&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;Layer&amp;gt;&lt;br /&gt;
                &amp;lt;Section section=&amp;quot;bg&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;b&amp;gt;&amp;lt;Section section=&amp;quot;label&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;ColourProperty name=&amp;quot;NormalTextColour&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;/Section&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
            &amp;lt;/Layer&amp;gt;&lt;br /&gt;
         &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
         &amp;lt;b&amp;gt;&amp;lt;StateImagery name=&amp;quot;Hover&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;Layer&amp;gt;&lt;br /&gt;
                &amp;lt;Section section=&amp;quot;bg&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Section section=&amp;quot;label&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;ColourProperty name=&amp;quot;HoverTextColour&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;/Section&amp;gt;&lt;br /&gt;
            &amp;lt;/Layer&amp;gt;&lt;br /&gt;
         &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
         &amp;lt;StateImagery name=&amp;quot;Pushed&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;Layer&amp;gt;&lt;br /&gt;
                &amp;lt;Section section=&amp;quot;bg&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Section section=&amp;quot;label&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;ColourProperty name=&amp;quot;PushedTextColour&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;/Section&amp;gt;&lt;br /&gt;
            &amp;lt;/Layer&amp;gt;&lt;br /&gt;
         &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
         &amp;lt;StateImagery name=&amp;quot;Disabled&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;Layer&amp;gt;&lt;br /&gt;
                &amp;lt;Section section=&amp;quot;bg&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Section section=&amp;quot;label&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;ColourProperty name=&amp;quot;DisabledTextColour&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;/Section&amp;gt;&lt;br /&gt;
            &amp;lt;/Layer&amp;gt;&lt;br /&gt;
         &amp;lt;/StateImagery&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
     &amp;lt;/WidgetLook&amp;gt;&lt;br /&gt;
 &amp;lt;/Falagard&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Not too hard was it? The look'n'feel reached a whole new level with these changes, as state is reflected in the text colour.&lt;br /&gt;
&lt;br /&gt;
To sum up what we've made:&lt;br /&gt;
* A look'n'feel for the ''Falagard/Button'' window type.&lt;br /&gt;
* Static background image.&lt;br /&gt;
* Formatted label.&lt;br /&gt;
* Label colour dependent on current state.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
That will be enough for this time. It's getting early ;-)&lt;br /&gt;
&lt;br /&gt;
I hope this tutorial is useful and that it will help expose Falagard more broadly.&lt;br /&gt;
&lt;br /&gt;
Please give feedback in the discussion page so I can improve the tutorial where needed.&lt;br /&gt;
&lt;br /&gt;
--[[User:lindquist|lindquist]] 06:10, 6 Dec 2005 (CET)&lt;/div&gt;</summary>
		<author><name>Makofierce</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=Create_ImageButtons&amp;diff=3604</id>
		<title>Create ImageButtons</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=Create_ImageButtons&amp;diff=3604"/>
				<updated>2011-01-07T09:47:22Z</updated>
		
		<summary type="html">&lt;p&gt;Makofierce: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you write a GUI for a game, at some time comes the point where you want to create the most exciting kind of buttons: ImageButtons ! But care, I'm not talking about a default button frame, that has a picture instead of a text, I'm talking about ''completely'' self-drawn buttons. I've found two ways to accomplish that task, both are nice.&lt;br /&gt;
&lt;br /&gt;
== Preparations ==&lt;br /&gt;
There are a few tasks we have to accomplish before being able to create an ImageButton.&lt;br /&gt;
&lt;br /&gt;
=== Draw it ! ===&lt;br /&gt;
The most important thing is, of course, draw the pictures. If you don't want to accomplish this, ask your graphics artist :)&lt;br /&gt;
You have to draw 4 pictures/button, wich represents the four states:&lt;br /&gt;
#Normal: That is how the button looks like most of the time.&lt;br /&gt;
#Hover: This is how the button should look when the mouse comes over it.&lt;br /&gt;
#Pushed: When the user clicks the mouse button (and holds it down a bit) over the button, it looks like this.&lt;br /&gt;
#Disabled: You can imagine what this is.&lt;br /&gt;
&lt;br /&gt;
This is the file we'll use for this HOWTO and as you see, i didn't ask my graphics artist to do one :p&lt;br /&gt;
You can find all other files (source code, data files) there too.&lt;br /&gt;
[[http://pompei2.cesar4.be/cegui/imgButton/]]&lt;br /&gt;
Edit: shit the link is currently dead ... I hope I find the files so I can upload them again, but atm everything that is written here must be enough. On questions/problems just ask in the forum.&lt;br /&gt;
&lt;br /&gt;
=== The Imageset ===&lt;br /&gt;
When I talk about an Imageset, I mean two files: The picture file (.tga, .png, or whatever) and the description (.imageset) file. The picture file can contain a lot of images, but its size has to be a power of two. The description file is an xml file wich gives a name to a (rectangular) location in the picture. So you can call the location (150,150,32,32) &amp;quot;UnitIcon&amp;quot; for example.&lt;br /&gt;
&lt;br /&gt;
'''An example for a .imageset file:'''&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;Imageset Name=&amp;quot;THEButton&amp;quot; Imagefile=&amp;quot;THEButton.png&amp;quot; &amp;gt;&lt;br /&gt;
 	&amp;lt;Image Name=&amp;quot;btnNormal&amp;quot; XPos=&amp;quot;0&amp;quot; YPos=&amp;quot;0&amp;quot;  Width=&amp;quot;64&amp;quot; Height=&amp;quot;20&amp;quot; /&amp;gt;&lt;br /&gt;
 	&amp;lt;Image Name=&amp;quot;btnHover&amp;quot;  XPos=&amp;quot;0&amp;quot; YPos=&amp;quot;20&amp;quot; Width=&amp;quot;64&amp;quot; Height=&amp;quot;20&amp;quot; /&amp;gt;&lt;br /&gt;
 	&amp;lt;Image Name=&amp;quot;btnPushed&amp;quot; XPos=&amp;quot;0&amp;quot; YPos=&amp;quot;40&amp;quot; Width=&amp;quot;64&amp;quot; Height=&amp;quot;20&amp;quot; /&amp;gt;&lt;br /&gt;
 	&amp;lt;Image Name=&amp;quot;btnDisabl&amp;quot; XPos=&amp;quot;0&amp;quot; YPos=&amp;quot;60&amp;quot; Width=&amp;quot;64&amp;quot; Height=&amp;quot;20&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;/Imageset&amp;gt;&lt;br /&gt;
We will use this imageset in our examples. It defines four named images: btnNormal, btnHover, btnPushed and btnDisabl (saved in the file &amp;quot;THEButton.png&amp;quot;). The whole imageset is called &amp;quot;THEButton&amp;quot; and saved in a file named &amp;quot;THEButton.imageset&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
How to use this imageset now ? This is very simple, you just have to do this in your initialisation code:&lt;br /&gt;
 // Load the THEButton Imageset that has the pictures for our button.&lt;br /&gt;
 CEGUI::ImagesetManager::getSingleton().createImageset( &amp;quot;THEButton.imageset&amp;quot; ); &lt;br /&gt;
That's all ! Of course, you should do this in a try/catch block.&lt;br /&gt;
&lt;br /&gt;
If, for some wicked reason, you want to do something in code with this imageset, you can either save the pointer that the function above returns, or you just get that pointer if you know the name of the imageset (what you usually do), using this function:&lt;br /&gt;
 CEGUI::Imageset *m_pImageSet = CEGUI::ImagesetManager::getSingleton().getImageset( &amp;quot;THEButton&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
Enough about imagesets.&lt;br /&gt;
&lt;br /&gt;
== The programmer's job ==&lt;br /&gt;
Now we can create the button itself (in two different ways):&lt;br /&gt;
&lt;br /&gt;
=== The first way: mainly in code ===&lt;br /&gt;
One way is to create the button in code, you usually do this if you only know wich button to display at runtime. Maybe a strategy game is the best to illustrate this. Imagine you have the buttonspanel, a place on screen with an array of buttons. The buttons that are present there depend on something (like wich unit is currently selected or so). The first thing you have to do, is not in code. Create one layout file for every button. The file should look somewhat like this:&lt;br /&gt;
&lt;br /&gt;
'''Content of button1.layout version 0.1'''&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; ?&amp;gt;&lt;br /&gt;
 &amp;lt;GUILayout&amp;gt;&lt;br /&gt;
 &amp;lt;Window Type=&amp;quot;TaharezLook/ImageButton&amp;quot; Name=&amp;quot;btnNewGame&amp;quot;&amp;gt;&lt;br /&gt;
 	&amp;lt;Property Name=&amp;quot;UnifiedPosition&amp;quot; Value=&amp;quot;{{0,0},{0,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
 	&amp;lt;Property Name=&amp;quot;UnifiedSize&amp;quot; Value=&amp;quot;{{0,64},{0,20}}&amp;quot; /&amp;gt;&lt;br /&gt;
 	&amp;lt;nowiki&amp;gt;&amp;lt;!-- Here we choose what images to take. set:THEButton means they are stored --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- in the imageset named THEButton and image:btnNormal specifies wich image it is. --&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 	&amp;lt;Property Name=&amp;quot;NormalImage&amp;quot;     Value=&amp;quot;set:THEButton image:btnNormal&amp;quot; /&amp;gt;&lt;br /&gt;
 	&amp;lt;Property Name=&amp;quot;HoverImage&amp;quot;      Value=&amp;quot;set:THEButton image:btnHover&amp;quot;  /&amp;gt;&lt;br /&gt;
 	&amp;lt;Property Name=&amp;quot;PushedImage&amp;quot;     Value=&amp;quot;set:THEButton image:btnPushed&amp;quot; /&amp;gt;&lt;br /&gt;
 	&amp;lt;Property Name=&amp;quot;DisabledImage&amp;quot;   Value=&amp;quot;set:THEButton image:btnDisabl&amp;quot; /&amp;gt;&lt;br /&gt;
 	&amp;lt;nowiki&amp;gt;&amp;lt;!-- Now the button would be ready, but without caption ... So we add a caption. --&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &amp;lt;/Window&amp;gt;&lt;br /&gt;
 &amp;lt;/GUILayout&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have an imagebutton but you want it to have a caption, you could write this kind of layout file:&lt;br /&gt;
&lt;br /&gt;
'''Content of button1.layout version 0.2'''&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; ?&amp;gt;&lt;br /&gt;
 &amp;lt;GUILayout&amp;gt;&lt;br /&gt;
 &amp;lt;Window Type=&amp;quot;TaharezLook/ImageButton&amp;quot; Name=&amp;quot;btnNewGame&amp;quot;&amp;gt;&lt;br /&gt;
 	&amp;lt;Property Name=&amp;quot;UnifiedPosition&amp;quot; Value=&amp;quot;{{0,0},{0,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
 	&amp;lt;Property Name=&amp;quot;UnifiedSize&amp;quot; Value=&amp;quot;{{0,64},{0,20}}&amp;quot; /&amp;gt;&lt;br /&gt;
 	&amp;lt;nowiki&amp;gt;&amp;lt;!-- Here we choose what images to take. set:THEButton means they are stored --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- in the imageset named THEButton and image:btnNormal specifies wich image it is. --&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 	&amp;lt;Property Name=&amp;quot;NormalImage&amp;quot;     Value=&amp;quot;set:THEButton image:btnNormal&amp;quot; /&amp;gt;&lt;br /&gt;
 	&amp;lt;Property Name=&amp;quot;HoverImage&amp;quot;      Value=&amp;quot;set:THEButton image:btnHover&amp;quot;  /&amp;gt;&lt;br /&gt;
 	&amp;lt;Property Name=&amp;quot;PushedImage&amp;quot;     Value=&amp;quot;set:THEButton image:btnPushed&amp;quot; /&amp;gt;&lt;br /&gt;
 	&amp;lt;Property Name=&amp;quot;DisabledImage&amp;quot;   Value=&amp;quot;set:THEButton image:btnDisabl&amp;quot; /&amp;gt;&lt;br /&gt;
 	&amp;lt;nowiki&amp;gt;&amp;lt;!-- Now the button would be ready, but without caption ... So we add a caption. --&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 	&amp;lt;Window Type=&amp;quot;TaharezLook/StaticText&amp;quot; Name=&amp;quot;btnNewGame_text__&amp;quot;&amp;gt;&lt;br /&gt;
 		&amp;lt;nowiki&amp;gt;&amp;lt;!-- We make the text take all the space of the button to center the text. --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- You should adapt these values to your pictures, just play a bit with em ;) --&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 		&amp;lt;Property Name=&amp;quot;UnifiedPosition&amp;quot;   Value=&amp;quot;{{0,0},{0,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
 		&amp;lt;Property Name=&amp;quot;UnifiedSize&amp;quot;       Value=&amp;quot;{{1,0},{1,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
 		&amp;lt;nowiki&amp;gt;&amp;lt;!-- Disable the frame and background, so we got only the text and not a StaticText widget. --&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 		&amp;lt;Property Name=&amp;quot;FrameEnabled&amp;quot;      Value=&amp;quot;False&amp;quot; /&amp;gt;&lt;br /&gt;
 		&amp;lt;Property Name=&amp;quot;BackgroundEnabled&amp;quot; Value=&amp;quot;False&amp;quot; /&amp;gt;&lt;br /&gt;
 		&amp;lt;nowiki&amp;gt;&amp;lt;!-- Here we center the text into the button --&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 		&amp;lt;Property Name=&amp;quot;HorzFormatting&amp;quot;    Value=&amp;quot;WordWrapCentred&amp;quot; /&amp;gt;&lt;br /&gt;
 		&amp;lt;Property Name=&amp;quot;VertFormatting&amp;quot;    Value=&amp;quot;Middle&amp;quot; /&amp;gt;&lt;br /&gt;
 		&amp;lt;nowiki&amp;gt;&amp;lt;!-- We MUST disable the text so that it is the button that gets our mouse events, --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- and not the static text ! If you forget that line, the buttons graphics will correspond, --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- but the clicks on the button won't work ! because they are &amp;quot;eaten&amp;quot; by the staticText. --&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 		&amp;lt;Property Name=&amp;quot;Disabled&amp;quot;          Value=&amp;quot;True&amp;quot; /&amp;gt;&lt;br /&gt;
 		&amp;lt;nowiki&amp;gt;&amp;lt;!-- finally, this is the caption we want the button to have. --&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 		&amp;lt;Property Name=&amp;quot;Text&amp;quot;&amp;gt;New game&amp;lt;/Property&amp;gt;&lt;br /&gt;
 	&amp;lt;/Window&amp;gt;&lt;br /&gt;
 &amp;lt;/Window&amp;gt;&lt;br /&gt;
 &amp;lt;/GUILayout&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This adds a child window of type StaticText, with no border and background, that takes all the place in the button, so we can center it. If your caption has to be not centered, play with the values.&lt;br /&gt;
&lt;br /&gt;
A problem that comes up now, is that if the user clicks on the button, the click will be absorbed by the StaticText, and won't reach the button. That's bad. I searched around and found the following two propertys:&lt;br /&gt;
 &amp;lt;Property Name=&amp;quot;MousePassThroughEnabled&amp;quot;  Value=&amp;quot;True&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;Property Name=&amp;quot;DistributeCapturedInputs&amp;quot; Value=&amp;quot;True&amp;quot; /&amp;gt;&lt;br /&gt;
But both didn't seem to work as expected, I asked the forums and lindquist told me that &amp;quot;If all you want is a simple label added to the ImageButton then adding a TextComponent in the looknfeel is a much cleaner solution.&amp;quot;. He is probably right, but I didn't struggle with looknfeels yet. If you achieved this, you can tell me or add a chapter to this wiki :)&lt;br /&gt;
&lt;br /&gt;
The solution he suggested (and the only one wich worked, if i remember correctly, is disabling the staticText (like in the complete code written above)&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Property Name=&amp;quot;Disabled&amp;quot; Value=&amp;quot;True&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now all you need to do to load and show the button are the following four lines of code.&lt;br /&gt;
&lt;br /&gt;
 	CEGUI::Window *w = CEGUI::WindowManager::getSingleton().loadWindowLayout( &amp;quot;button1.layout&amp;quot; );&lt;br /&gt;
 	rootWin-&amp;gt;addChildWindow( w );&lt;br /&gt;
 	w-&amp;gt;setPosition( CEGUI::UVector2( CEGUI::UDim(0.5f,-32.0f), CEGUI::UDim(0.5f,-10.0f) ) );&lt;br /&gt;
 	w-&amp;gt;setVisible( true );&lt;br /&gt;
Supposing rootWin is your current root window, or any other window you want to put the button in.&lt;br /&gt;
We set the position to be the center (0.5f) minus the half the height/width of the button, so the button is really centered.&lt;br /&gt;
Of course, you can do everything else you want before (and while) showing the button.&lt;br /&gt;
&lt;br /&gt;
That's it ! now you can work with the button however you want :)&lt;br /&gt;
&lt;br /&gt;
=== The second way: Let the power of layout guide you ===&lt;br /&gt;
I suppose you read the first way, because they are very similar and I won't rewrite the whole code here. The main difference is that if you like layouts, you'll already have declared all your windows in layout files. The the &amp;quot;'''Content of button1.layout version 0.2'''&amp;quot; won't be alone in a layout file of its own, but it will be in your already existing layout files.&lt;br /&gt;
You still have to load the Imageset. I Provided a sample, named imgButtonSample.layout&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
That's it ! If you got suggestions, corrections or whatever feedback, just tell me.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[User:Pompei2|Pompei2]] 11:18, 11 January 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[User:fezztah|fezztah]] &lt;br /&gt;
To properly centre the label on an image button vertically as well as horizontally I had to change the line: &amp;lt;Property Name=&amp;quot;VertFormatting&amp;quot;    Value=&amp;quot;Middle&amp;quot; /&amp;gt; such that Value=&amp;quot;VertCentred&amp;quot; instead. I'm not sure if the original is a mistake so I won't alter it in case it has some other purpose.&lt;/div&gt;</summary>
		<author><name>Makofierce</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=Hit_testing_of_non_rectangular_windows_with_CEGUI_0.7.x&amp;diff=3603</id>
		<title>Hit testing of non rectangular windows with CEGUI 0.7.x</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=Hit_testing_of_non_rectangular_windows_with_CEGUI_0.7.x&amp;diff=3603"/>
				<updated>2011-01-07T09:44:46Z</updated>
		
		<summary type="html">&lt;p&gt;Makofierce: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{notice|message=To use this tutorial with CEGUI's OgreRenderer, you will require a recent bug fix which is available from the stable v0-7 branch of subversion r2564 or later, or a snapshot build of CEGUI dated later than 14th June 2010 (or in other words, a snapshot with a version higher than 0.7.100614).&amp;lt;br/&amp;gt;For users of the Direct3D renderers (all versions), the technique described in this article is not currently supported due to an unimplemented function – I will implement this missing function soon.}}&lt;br /&gt;
&lt;br /&gt;
== Why this tutorial? ==&lt;br /&gt;
Generally speaking, CEGUI's idea of a window is something that is rectangular.  For most normal uses this is fine and perfectly adequate, however, there are times when perhaps it would be nice to have a button (or something else) that's a little bit... special.  So, if you're interested in implementing round buttons, pie segment buttons, some type of weird non-rectangular window or window with a hole in it, this tutorial is for you!&lt;br /&gt;
&lt;br /&gt;
=== What it is ===&lt;br /&gt;
This tutorial is solely about hit testing.  Meaning when a CEGUI window reports that a given point hits and when a given point does not hit the window.  The code in the tutorial will test the alpha component of the window's rendered imagery, thus allowing pixel accurate hit testing of windows built from irregular shaped imagery.&lt;br /&gt;
&lt;br /&gt;
=== What it is not ===&lt;br /&gt;
This tutorial does not present a window that is truly non-rectangular.  For example, any child content added to the window type shown here will still be clipped – as normal – to the rectangular region defined for the parent window.  What is shown is purely about hit testing, although this will be useful in a very large number of cases.&lt;br /&gt;
&lt;br /&gt;
== Overview of the what and the how ==&lt;br /&gt;
As you should know, the rendering for a CEGUI window is made up of various images which may be drawn at a one to one pixel size or alternatively may be stretched over some arbitrary area of the window's surface.  This presents a challenging situation when we have a desire to examine the pixels of those images, because we can not easily and quickly calculate which bit of a given image is drawn at a particular location for a given window instance.  If you factor in the way that various properties can also affect the rendered output, we quickly find ourselves in an almost impossible situation.  What we really need is to be able to access the final rendered output of the window in isolation.&lt;br /&gt;
&lt;br /&gt;
In order to achieve our aims, we will have to create a subclass of one of the existing classes in the CEGUI::Window hierarchy and register this type with the system for use.  This could be a totally new window type with all new functionality, or we could subclass one of the existing types in order to take advantage of existing functionality, but add in our new hit testing code.  For this tutorial we will be sub-classing the CEGUI::PushButton type to provide a push button which has the advanced hit testing which is the topic of this tutorial.  At the most basic level, all we are really going to do is override the Window::isHit member function and do something different in there.  However, due to the nature of what we are trying to do, some other parts are required in order that we can have access to the required data.&lt;br /&gt;
&lt;br /&gt;
Starting with the 0.7.0 release, CEGUI provides reasonably simple means by which we can render a window to its own texture.  Aside from all the other benefits, this affords us a means to examine the rendering performed for a particular window by examining its associated texture – and it is this approach that we will use in this tutorial.&lt;br /&gt;
&lt;br /&gt;
The basic approach will be to first do the existing rectangular hit test, because we don't want the expense of testing at the pixel level if the test point is outside of the window's bounding rectangle.  Once we know the point is within the window's area, we can then proceed to look at the alpha channel in the rendered output to see if we should report a hit or not – a value of 0 in the alpha channel is 100% transparent, and so will not register a hit, whereas any other value will register a hit.  One enhancement that could be made to the code presented here is to allow this to be a configurable threshold value.&lt;br /&gt;
&lt;br /&gt;
Of course, when doing anything of this nature, performance needs to be considered, and you probably already know that frequent reads from texture / video memory by the CPU is likely to be expensive, so our solution attempts to mitigate that somewhat by using a secondary buffer in system RAM that contains a copy of the rendered output, which is only populated when the rendered output changes.  This means that for most of the tests we will be operating out of an existing buffer in system memory, which should have minimal impact on overall performance.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
=== Class Declaration ===&lt;br /&gt;
First I'll introduce the class declaration, and then we can discuss the various functions and such that we see there.  Our class is called AlphaHitWindow, which was somewhat arbitrarily chosen just for the sake of this tutorial.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;class AlphaHitWindow : public CEGUI::PushButton&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
    //! Window factory name.&lt;br /&gt;
    static const CEGUI::String WidgetTypeName;&lt;br /&gt;
&lt;br /&gt;
    //! Constructor&lt;br /&gt;
    AlphaHitWindow(const CEGUI::String&amp;amp; type, const CEGUI::String&amp;amp; name);&lt;br /&gt;
    //! Destructor&lt;br /&gt;
    ~AlphaHitWindow();&lt;br /&gt;
&lt;br /&gt;
    // overridden from Window base class&lt;br /&gt;
    bool isHit(const CEGUI::Vector2&amp;amp; position, const bool allow_disabled = false) const;&lt;br /&gt;
&lt;br /&gt;
protected:&lt;br /&gt;
    //! handler to copy rendered data to a memory buffer&lt;br /&gt;
    bool renderingEndedHandler(const CEGUI::EventArgs&amp;amp; args);&lt;br /&gt;
    // overridden from Window base class&lt;br /&gt;
    bool testClassName_impl(const CEGUI::String&amp;amp; class_name) const;&lt;br /&gt;
&lt;br /&gt;
    //! Pointer to buffer holding the render data&lt;br /&gt;
    CEGUI::uint32* d_hitTestBuffer;&lt;br /&gt;
    //! Size of the hit test buffer (i.e. its capacity)&lt;br /&gt;
    size_t d_hitBufferCapacity;&lt;br /&gt;
    //! Dimensions in pixels of the data in the hit test buffer&lt;br /&gt;
    CEGUI::Size d_hitBufferSize;&lt;br /&gt;
    //! whether data in hit test buffer is inverted.&lt;br /&gt;
    bool d_hitBufferInverted;&lt;br /&gt;
};&amp;lt;/code&amp;gt;&lt;br /&gt;
As we can see, with the exception of the Window::isHit override, the new function renderingEndedHandler and some member variables, the class is mainly standard boiler plate stuff needed when creating a new window type for CEGUI – as such, we'll just be covering the important bits and ignoring those other, standard, parts.&lt;br /&gt;
&lt;br /&gt;
=== Constructor ===&lt;br /&gt;
Since we have some special requirements, we need to do a couple of things in the constructor.  First, because we need texture backing in order to read our rendered output from a texture, we enable the auto rendering surface for our window (if this is not supported, our window will revert back to regular rectangular hit testing).&lt;br /&gt;
&amp;lt;code&amp;gt;    setUsingAutoRenderingSurface(true);&amp;lt;/code&amp;gt;&lt;br /&gt;
Next, in order that we only update our buffer when the texture content gets changed, we will subscribe a handler to be called when rendering for each rendering queue is ended.&lt;br /&gt;
&amp;lt;code&amp;gt;    CEGUI::RenderingSurface* rs = getRenderingSurface();&lt;br /&gt;
    if (rs)&lt;br /&gt;
        rs-&amp;gt;subscribeEvent(CEGUI::RenderingSurface::EventRenderQueueEnded,&lt;br /&gt;
            CEGUI::Event::Subscriber(&amp;amp;AlphaHitWindow::renderingEndedHandler, this));&amp;lt;/code&amp;gt;&lt;br /&gt;
All simple stuff so far!&lt;br /&gt;
&lt;br /&gt;
=== The Window::isHit override ===&lt;br /&gt;
This mainly uses the member variables and such which are set up in the event handler discussed below.&lt;br /&gt;
&lt;br /&gt;
The first thing we do is call the base class implementation, and if that returns false, so will we.&lt;br /&gt;
&amp;lt;code&amp;gt;    if (!CEGUI::PushButton::isHit(position, allow_disabled))&lt;br /&gt;
        return false;&amp;lt;/code&amp;gt;&lt;br /&gt;
Next we see if out pointer to a system memory copy of the texture data is valid.  If not, it means that either something has gone wrong, or the hardware we're running on does not support what we're trying to do, so in these cases we return true to default back to the standard rectangular hit testing.&lt;br /&gt;
&amp;lt;code&amp;gt;    if (!d_hitTestBuffer)&lt;br /&gt;
        return true;&amp;lt;/code&amp;gt;&lt;br /&gt;
Next we convert the screen pixel point we were given to a local window pixel point, and then use this to calculate the index into the buffer for the pixel described by the given point (this is just a basic calculation of ((y * width) + x).&lt;br /&gt;
&amp;lt;code&amp;gt;    const CEGUI::Vector2 wpos(CEGUI::CoordConverter::screenToWindow(*this, position));&lt;br /&gt;
    const size_t idx = (d_hitBufferInverted ?&lt;br /&gt;
                            d_hitBufferSize.d_height - wpos.d_y :&lt;br /&gt;
                            wpos.d_y) * d_hitBufferSize.d_width + wpos.d_x;&amp;lt;/code&amp;gt;&lt;br /&gt;
Finally we read the pixel from the buffer, shift right so we are left with just the alpha part and test this against our threshold value – which in this example is simply 0.&lt;br /&gt;
&amp;lt;code&amp;gt;    return (d_hitTestBuffer[idx] &amp;gt;&amp;gt; 24) &amp;gt; 0;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The renderingEndedHandler event handler function ===&lt;br /&gt;
If there is any magic to doing this, then it happens in this function.  It's here that we grab a copy of the rendered texture data and update the other member variables to be ready for subsequent use in the override of the Window::isHit function.&lt;br /&gt;
&lt;br /&gt;
Since our handler will get called for each render queue that is drawn, the first thing we should do is quietly exit for any queue except the one the main rendering will be done on – which is CEGUI::RQ_BASE.  In actual fact, it's highly likely that this will be the only queue drawn, but we need the check just to be safe.&lt;br /&gt;
&amp;lt;code&amp;gt;    if (static_cast&amp;lt;const CEGUI::RenderQueueEventArgs&amp;amp;&amp;gt;(args).queueID != CEGUI::RQ_BASE)&lt;br /&gt;
        return false;&amp;lt;/code&amp;gt;&lt;br /&gt;
Next we'll grab the CEGUI::RenderingSurface and make sure it's the right type.  If there is no surface or it is not the right type, we'll bail out.  Generally this should not happen, but it might if the hardware does not support rendering to texture, or if the user has changed settings in such a way to affect the rendering surface.&lt;br /&gt;
&amp;lt;code&amp;gt;    CEGUI::RenderingSurface* const rs = getRenderingSurface();&lt;br /&gt;
    if (!rs || !rs-&amp;gt;isRenderingWindow())&lt;br /&gt;
        return false;&amp;lt;/code&amp;gt;&lt;br /&gt;
Now we simply get the CEGUI::TextureTarget for our CEGUI::RenderingWindow rendering surface.&lt;br /&gt;
&amp;lt;code&amp;gt;    CEGUI::TextureTarget&amp;amp; tt =&lt;br /&gt;
        static_cast&amp;lt;CEGUI::RenderingWindow* const&amp;gt;(rs)-&amp;gt;getTextureTarget();&amp;lt;/code&amp;gt;&lt;br /&gt;
And now we access the actual texture to obtain its dimensions and calculate the size of the buffer needed to hold the data (in 32bit pixels, since all CEGUI rendering is ARGB format).&lt;br /&gt;
&amp;lt;code&amp;gt;    CEGUI::Texture&amp;amp; texture = tt.getTexture();&lt;br /&gt;
    const CEGUI::Size tex_sz(texture.getSize());&lt;br /&gt;
    const size_t reqd_capacity = &lt;br /&gt;
        static_cast&amp;lt;int&amp;gt;(tex_sz.d_width) * static_cast&amp;lt;int&amp;gt;(tex_sz.d_height);&amp;lt;/code&amp;gt;&lt;br /&gt;
At this point, we may need to allocate or reallocate our buffer depending on the previous state.  So we simply compare the required buffer size we just calculated against the stored buffer size, and if we need a bigger buffer we free the existing one so that we know to reallocate in the next step.&lt;br /&gt;
&amp;lt;code&amp;gt;    if (reqd_capacity &amp;gt; d_hitBufferCapacity)&lt;br /&gt;
    {&lt;br /&gt;
        delete[] d_hitTestBuffer;&lt;br /&gt;
        d_hitTestBuffer = 0;&lt;br /&gt;
        d_hitBufferCapacity = 0;&lt;br /&gt;
    }&amp;lt;/code&amp;gt;&lt;br /&gt;
Next we see if we already have a buffer allocated, and if not, allocate a buffer of the appropriate size.&lt;br /&gt;
&amp;lt;code&amp;gt;    if (!d_hitTestBuffer)&lt;br /&gt;
    {&lt;br /&gt;
        d_hitTestBuffer = new CEGUI::uint32[reqd_capacity];&lt;br /&gt;
        d_hitBufferCapacity = reqd_capacity;&lt;br /&gt;
    }&amp;lt;/code&amp;gt;&lt;br /&gt;
Next we store some details about the buffer so we know how to interpret the data within the isHit function.&lt;br /&gt;
&amp;lt;code&amp;gt;    d_hitBufferInverted = tt.isRenderingInverted();&lt;br /&gt;
    d_hitBufferSize = tex_sz;&amp;lt;/code&amp;gt;&lt;br /&gt;
And the most important step, save the data from the texture into our buffer&lt;br /&gt;
&amp;lt;code&amp;gt;    texture.saveToMemory(d_hitTestBuffer);&amp;lt;/code&amp;gt;&lt;br /&gt;
And finally, return that we handled this event&lt;br /&gt;
&amp;lt;code&amp;gt;    return true;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Registering the Window and making Schemes! ===&lt;br /&gt;
Now we have our new Window type and we know how it all works, we need to register this new type with CEGUI so that the system knows of its existence and can make instances of it.  This is another incredibly simple step, requiring just a single line of code.&lt;br /&gt;
&amp;lt;code&amp;gt;CEGUI::WindowFactoryManager::addFactory&amp;lt;CEGUI::TplWindowFactory&amp;lt;AlphaHitWindow&amp;gt; &amp;gt;();&amp;lt;/code&amp;gt;&lt;br /&gt;
Now we can add an entry in our scheme file which uses our new type in a Falagard window mapping, such that it gets used.  For this tutorial, we'll use TaharezLook as the example, though the changes or additions are generally the same for any scheme.&lt;br /&gt;
&lt;br /&gt;
We have the option of creating an all new window type mapping, which will allow us to continue to use the existing TaharezLook/Button type, like this:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;FalagardMapping WindowType=&amp;quot;TaharezLook/AlphaHitButton&amp;quot; TargetType=&amp;quot;AlphaHitWindow&amp;quot; Renderer=&amp;quot;Falagard/Button&amp;quot; LookNFeel=&amp;quot;TaharezLook/Button&amp;quot; /&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
Or, we can modify the existing mapping so that TaharezLook/Button will use our new class instead, like this:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;FalagardMapping WindowType=&amp;quot;TaharezLook/Button&amp;quot; TargetType=&amp;quot;AlphaHitWindow&amp;quot; Renderer=&amp;quot;Falagard/Button&amp;quot; LookNFeel=&amp;quot;TaharezLook/Button&amp;quot; /&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Here we have created a new window type that will take advantage of certain abilities in CEGUI 0.7.x to allow us to have hit testing at the pixel level.  The example above uses TaharezLook imagery for the button, which is probably not ideal as an example to show the effects achieved here, and perhaps this will be modified in a future update.&lt;br /&gt;
&lt;br /&gt;
Below you can find the full class declaration and source code for the AlphaHitWindow class.  You need to include the main CEGUI.h header file in order to compile the code.  I hope you find this useful, and please direct any questions about this to the forum or the #cegui IRC channel on irc.freenode.net.&lt;br /&gt;
&lt;br /&gt;
== Class Declaration ==&lt;br /&gt;
&amp;lt;code&amp;gt;class AlphaHitWindow : public CEGUI::PushButton&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
    //! Window factory name.&lt;br /&gt;
    static const CEGUI::String WidgetTypeName;&lt;br /&gt;
&lt;br /&gt;
    //! Constructor&lt;br /&gt;
    AlphaHitWindow(const CEGUI::String&amp;amp; type, const CEGUI::String&amp;amp; name);&lt;br /&gt;
    //! Destructor&lt;br /&gt;
    ~AlphaHitWindow();&lt;br /&gt;
&lt;br /&gt;
    // overridden from Window base class&lt;br /&gt;
    bool isHit(const CEGUI::Vector2&amp;amp; position, const bool allow_disabled = false) const;&lt;br /&gt;
&lt;br /&gt;
protected:&lt;br /&gt;
    //! handler to copy rendered data to a memory buffer&lt;br /&gt;
    bool renderingEndedHandler(const CEGUI::EventArgs&amp;amp; args);&lt;br /&gt;
    // overridden from Window base class&lt;br /&gt;
    bool testClassName_impl(const CEGUI::String&amp;amp; class_name) const;&lt;br /&gt;
&lt;br /&gt;
    //! Pointer to buffer holding the render data&lt;br /&gt;
    CEGUI::uint32* d_hitTestBuffer;&lt;br /&gt;
    //! Size of the hit test buffer (i.e. its capacity)&lt;br /&gt;
    size_t d_hitBufferCapacity;&lt;br /&gt;
    //! Dimensions in pixels of the data in the hit test buffer&lt;br /&gt;
    CEGUI::Size d_hitBufferSize;&lt;br /&gt;
    //! whether data in hit test buffer is inverted.&lt;br /&gt;
    bool d_hitBufferInverted;&lt;br /&gt;
};&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Class Implementation ==&lt;br /&gt;
&amp;lt;code&amp;gt;//----------------------------------------------------------------------------//&lt;br /&gt;
const CEGUI::String AlphaHitWindow::WidgetTypeName(&amp;quot;AlphaHitWindow&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
//----------------------------------------------------------------------------//&lt;br /&gt;
AlphaHitWindow::AlphaHitWindow(const CEGUI::String&amp;amp; type, const CEGUI::String&amp;amp; name) :&lt;br /&gt;
    CEGUI::PushButton(type, name),&lt;br /&gt;
    d_hitTestBuffer(0),&lt;br /&gt;
    d_hitBufferCapacity(0)&lt;br /&gt;
{&lt;br /&gt;
    // always use this since we want to sample the pre-composed imagery when we&lt;br /&gt;
    // do hit testing and this requires we have texture backing.&lt;br /&gt;
    setUsingAutoRenderingSurface(true);&lt;br /&gt;
&lt;br /&gt;
    // here we subscribe an event which will grab a copy of the rendered content&lt;br /&gt;
    // each time it is rendered, so we can easily sample it without needing to&lt;br /&gt;
    // read texture content for every mouse move / hit test.&lt;br /&gt;
    CEGUI::RenderingSurface* rs = getRenderingSurface();&lt;br /&gt;
    if (rs)&lt;br /&gt;
        rs-&amp;gt;subscribeEvent(CEGUI::RenderingSurface::EventRenderQueueEnded,&lt;br /&gt;
            CEGUI::Event::Subscriber(&amp;amp;AlphaHitWindow::renderingEndedHandler, this));&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//----------------------------------------------------------------------------//&lt;br /&gt;
AlphaHitWindow::~AlphaHitWindow()&lt;br /&gt;
{&lt;br /&gt;
    delete[] d_hitTestBuffer;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//----------------------------------------------------------------------------//&lt;br /&gt;
bool AlphaHitWindow::isHit(const CEGUI::Vector2&amp;amp; position, const bool allow_disabled) const&lt;br /&gt;
{&lt;br /&gt;
    // still do the rect test, since we only want to do the detailed test &lt;br /&gt;
    // if absolutely neccessary.&lt;br /&gt;
    if (!CEGUI::PushButton::isHit(position, allow_disabled))&lt;br /&gt;
        return false;&lt;br /&gt;
&lt;br /&gt;
    // if buffer is not allocated, just hit against area rect, so return true&lt;br /&gt;
    if (!d_hitTestBuffer)&lt;br /&gt;
        return true;&lt;br /&gt;
&lt;br /&gt;
    const CEGUI::Vector2 wpos(CEGUI::CoordConverter::screenToWindow(*this, position));&lt;br /&gt;
    const size_t idx = (d_hitBufferInverted ?&lt;br /&gt;
                            d_hitBufferSize.d_height - wpos.d_y :&lt;br /&gt;
                            wpos.d_y) * d_hitBufferSize.d_width + wpos.d_x;&lt;br /&gt;
    &lt;br /&gt;
    return (d_hitTestBuffer[idx] &amp;gt;&amp;gt; 24) &amp;gt; 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//----------------------------------------------------------------------------//&lt;br /&gt;
bool AlphaHitWindow::renderingEndedHandler(const CEGUI::EventArgs&amp;amp; args)&lt;br /&gt;
{&lt;br /&gt;
    if (static_cast&amp;lt;const CEGUI::RenderQueueEventArgs&amp;amp;&amp;gt;(args).queueID != CEGUI::RQ_BASE)&lt;br /&gt;
        return false;&lt;br /&gt;
&lt;br /&gt;
    // rendering surface needs to exist and needs to be texture backed&lt;br /&gt;
    CEGUI::RenderingSurface* const rs = getRenderingSurface();&lt;br /&gt;
    if (!rs || !rs-&amp;gt;isRenderingWindow())&lt;br /&gt;
        return false;&lt;br /&gt;
&lt;br /&gt;
    CEGUI::TextureTarget&amp;amp; tt =&lt;br /&gt;
        static_cast&amp;lt;CEGUI::RenderingWindow* const&amp;gt;(rs)-&amp;gt;getTextureTarget();&lt;br /&gt;
&lt;br /&gt;
    CEGUI::Texture&amp;amp; texture = tt.getTexture();&lt;br /&gt;
    const CEGUI::Size tex_sz(texture.getSize());&lt;br /&gt;
    const size_t reqd_capacity = &lt;br /&gt;
        static_cast&amp;lt;int&amp;gt;(tex_sz.d_width) * static_cast&amp;lt;int&amp;gt;(tex_sz.d_height);&lt;br /&gt;
&lt;br /&gt;
    // see if we need to reallocate buffer:&lt;br /&gt;
    if (reqd_capacity &amp;gt; d_hitBufferCapacity)&lt;br /&gt;
    {&lt;br /&gt;
        delete[] d_hitTestBuffer;&lt;br /&gt;
        d_hitTestBuffer = 0;&lt;br /&gt;
        d_hitBufferCapacity = 0;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // allocate buffer to hold data if it's not already allocated&lt;br /&gt;
    if (!d_hitTestBuffer)&lt;br /&gt;
    {&lt;br /&gt;
        d_hitTestBuffer = new CEGUI::uint32[reqd_capacity];&lt;br /&gt;
        d_hitBufferCapacity = reqd_capacity;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // save details about what will be in the buffer&lt;br /&gt;
    d_hitBufferInverted = tt.isRenderingInverted();&lt;br /&gt;
    d_hitBufferSize = tex_sz;&lt;br /&gt;
&lt;br /&gt;
    // grab a copy of the data.&lt;br /&gt;
    texture.saveToMemory(d_hitTestBuffer);&lt;br /&gt;
&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//----------------------------------------------------------------------------//&lt;br /&gt;
bool AlphaHitWindow::testClassName_impl(const CEGUI::String&amp;amp; class_name) const&lt;br /&gt;
{&lt;br /&gt;
    return (class_name == &amp;quot;AlphaHitWindow&amp;quot;)|| CEGUI::PushButton::testClassName_impl(class_name);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//----------------------------------------------------------------------------//&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[User:Crazyeddie|Crazyeddie]] 19:31, 14 June 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Makofierce</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=Unified_Positions_and_Sizes_System&amp;diff=3602</id>
		<title>Unified Positions and Sizes System</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=Unified_Positions_and_Sizes_System&amp;diff=3602"/>
				<updated>2011-01-07T09:43:34Z</updated>
		
		<summary type="html">&lt;p&gt;Makofierce: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{VersionBadge|0.4}} {{VersionBadge|0.5}} {{VersionBadge|0.6}} {{VersionBadge|0.7}}&lt;br /&gt;
&lt;br /&gt;
'''note: This page only applies to CEGUI &amp;gt;= 0.4.0'''&lt;br /&gt;
&lt;br /&gt;
The unified metrics system in CEGUI 0.4.0 and up, allows you to have both a relative and absolute component of a coordinate / dimension. This gives you alot more flexibility in how you layout your windows. For example you can use relative metrics for the height and absolute metrics for the width. Or simply mix and match.&lt;br /&gt;
&lt;br /&gt;
There are three different forms in unified metrics:&lt;br /&gt;
*UDim - a single dimension.&lt;br /&gt;
*UVector2 - a two dimensional UDim vector&lt;br /&gt;
*URect - four UDims describing a rectangle by its left, top, right and bottom edges.&lt;br /&gt;
&lt;br /&gt;
The property system in CEGUI uses a special syntax for unified dimensions.&lt;br /&gt;
== UDim ==&lt;br /&gt;
The UDim is the simplest.&lt;br /&gt;
&amp;lt;pre&amp;gt;{''scale'',''offset''}   fx:   {1,0}&amp;lt;/pre&amp;gt;&lt;br /&gt;
The scale component relative to the parent window, after it has been translated to pixels the offset is added. So if we used the example above as value for the ''UnifiedWidth'' property we would get a window exactly the width of its parent.&lt;br /&gt;
Another example could be &amp;lt;pre&amp;gt;{0.5,25}&amp;lt;/pre&amp;gt; which would make it half the width of its parent plus 25 pixels.&lt;br /&gt;
&lt;br /&gt;
The properties that take a single UDim like the ones used above are:&lt;br /&gt;
*UnifiedXPosition&lt;br /&gt;
*UnifiedYPosition&lt;br /&gt;
*UnifiedWidth&lt;br /&gt;
*UnifiedHeight&lt;br /&gt;
&lt;br /&gt;
== UVector2 ==&lt;br /&gt;
The UVector2 is used for position and size if you want avoid specifying each single dimension seperately (x,y,w,h).&lt;br /&gt;
&amp;lt;pre&amp;gt;{{''x-scale'',''x-offset''},{''y-scale'',''y-offset''}}   fx:   {{1,0},{1,0}}&amp;lt;/pre&amp;gt;&lt;br /&gt;
Besides the extra {..} around its two UDims, it's very similar. Let's say we use the example above as value for the ''UnifiedSize'' property of a window, we would get a window that had exactly the same size as its parent.&lt;br /&gt;
&amp;lt;pre&amp;gt;{{1,0},{0,100}}&amp;lt;/pre&amp;gt; would yield a window width the same width as its parent but an absolute height of 100 pixels.&lt;br /&gt;
&lt;br /&gt;
The properties that take UVector2 values are:&lt;br /&gt;
*UnifiedPosition&lt;br /&gt;
*UnifiedSize&lt;br /&gt;
*UnifiedMinSize&lt;br /&gt;
*UnifiedMaxSize&lt;br /&gt;
&lt;br /&gt;
== URect ==&lt;br /&gt;
The last type is URect. It's a little special in that it specifies the ''left'', ''top'', ''right'' and ''bottom'' edges instead of position and size.&lt;br /&gt;
As there is alot of parameters I'll write ''ls'' instead of ''left-scale'', ''to'' instead of ''top-offset'' etc.&lt;br /&gt;
&amp;lt;pre&amp;gt;{{ls,lo},{ts,to},{rs,ro},{bs,bo}}   fx:   {{0,0},{0,0},{1,0},{1,0}}&amp;lt;/pre&amp;gt;&lt;br /&gt;
The example above is the default rectangle for a DefaultWindow type window. It will cover the entire area of its parent window.&lt;br /&gt;
There is only one property that takes a URect. ''UnifiedAreaRect''.&lt;br /&gt;
The fact that we are specifying edges instead of size, can be useful. For example if we want a window to cover its entire parent, but leave a 10 pixel border a value like this could be used: &amp;lt;pre&amp;gt;{{0,10},{0,10},{1,-10},{1,-10}}&amp;lt;/pre&amp;gt;&lt;br /&gt;
The x and y position are simple absolute-only dims with a value of 10 pixels. The right and bottom edges are 100% relative components with a offset of -10 which will make it &amp;quot;move back&amp;quot; 10 pixels relative to the parent's right and bottom edges.&lt;br /&gt;
&lt;br /&gt;
== XML examples==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Property Name=&amp;quot;UnifiedPosition&amp;quot; Value=&amp;quot;{{0.1,10},{1.0,-30}}&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
X-position: 10% of the width of the parent window + 10 pixel&lt;br /&gt;
&lt;br /&gt;
Y-position: 30 pixel above the bottom of the parent window&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Property Name=&amp;quot;UnifiedSize&amp;quot; Value=&amp;quot;{{0.6,5},{0.3,20}}&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Width: 60% of the width of the parent window + 5 pixel&lt;br /&gt;
&lt;br /&gt;
Height: 30% of the height of the parent window + 20 pixel&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Property Name=&amp;quot;UnifiedXPosition&amp;quot; Value=&amp;quot;{0.25,-5}&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
X-position: 25% of the width of the parent window minus 5 pixel&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.1,0},{0.1,0},{0.9,0},{0.9,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
X-position: 10% of the width of the parent window.&lt;br /&gt;
&lt;br /&gt;
Y-position: 10% of the height of the parent window.&lt;br /&gt;
&lt;br /&gt;
Width: 80% of the width of the parent window.&lt;br /&gt;
&lt;br /&gt;
Height: 80% of the height of the parent window.&lt;/div&gt;</summary>
		<author><name>Makofierce</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=The_Beginner_Guide_to_Resource_Groups&amp;diff=3601</id>
		<title>The Beginner Guide to Resource Groups</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=The_Beginner_Guide_to_Resource_Groups&amp;diff=3601"/>
				<updated>2011-01-07T09:43:08Z</updated>
		
		<summary type="html">&lt;p&gt;Makofierce: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{VersionBadge|0.6}}&lt;br /&gt;
&lt;br /&gt;
{{notice|message=This tutorial is for CEGUI versions up to 0.6.2.  For later releases, see the tutorials in the main documentation.}}&lt;br /&gt;
&lt;br /&gt;
If you have read [[The Beginner Guide to Getting CEGUI Rendering]], you probably have your application set-up to perform the basic CEGUI initialisation steps and to call the System::renderGUI method, which is all very nice; but lets face it, you still can't get anything to draw!&lt;br /&gt;
&lt;br /&gt;
The next stage in this quest for the 'holy grail' (that is, to actually get CEGUI to work) is to setup resource provider groups that will later enable us to load some files so that CEGUI has some source materials to use when rendering.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What is a ResourceProvider? ==&lt;br /&gt;
CEGUI makes use of a helper object which we call the ResourceProvider.  This object provides an interface between the core CEGUI library and any external file loading system.&lt;br /&gt;
&lt;br /&gt;
For example, the Ogre and Irrlicht engines have their own resource manager / file loading sub-systems, by implementing and supplying a specialised ResourceProvider object, the renderer modules for these engines allow seamless integration with these systems so that CEGUI data files are loaded via these systems.  The lower level Direct3D and OpenGL libraries do not have their own resource systems as such, so for these you can use the CEGUI default resource provider.&lt;br /&gt;
&lt;br /&gt;
=== DefaultResourceProvider Explained ===&lt;br /&gt;
CEGUI's default resource provider, CEGUI::DefaultResourceProvider, supplies some basic functionality for those who do not yet have, or do not need, a more sophisticated alternative.  As well as supplying the functions required by CEGUI for actually loading files and data, DefaultResourceProvider also has some rudimentary support for 'resource groups'.  Here, a resource group is basically a label given to a directory or path on the system.  This allows us to have logical grouping of files within directories and then to be able to refer to those location via a simple label rather than hard coded paths.  In the simplest case this means that you just need to update the resource group location instead of updating path information throughout your code and in the XML files when you change the location of the data files.&lt;br /&gt;
&lt;br /&gt;
Before you can use the CEGUI::DefaultResourceProvider, you need to ensure you have included the correct header (usually at the start of your source file), for example:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
#include &amp;lt;CEGUIDefaultResourceProvider.h&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
==== Specifying Resource Groups and Directories ====&lt;br /&gt;
The DefaultResourceProvider allows you to define any number of  named resource groups and to specify a directory to be used for each group.  What this means is that you can create a resource group, say “imagesets” and assign a directory to that, for example “./mygame/datafiles/gui/imagesets/”.  Then when loading an Imageset through the ImagesetManager, you could specify the resource group to be used as “imagesets” and the system will look in the predefined location.&lt;br /&gt;
At present each resource group may only have a single directory assigned to it.&lt;br /&gt;
&lt;br /&gt;
A small code example is in order to clarify what has been said.  Where as previously, without the use of resource groups, you might have done this:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
Imageset* wlis = ImagesetManager::getSingleton().createImageset(&lt;br /&gt;
	&amp;quot;./mygame/datafiles/gui/imagesets/WindowsLook.imageset&amp;quot;);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using resource groups, at initialisation time, you create the resource groups in the default resource provider, like this:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
DefaultResourceProvider* rp = static_cast&amp;lt;DefaultResourceProvider*&amp;gt;(&lt;br /&gt;
	CEGUI::System::getSingleton().getResourceProvider());&lt;br /&gt;
&lt;br /&gt;
rp-&amp;gt;setResourceGroupDirectory(&amp;quot;imagesets&amp;quot;, &amp;quot;./mygame/datafiles/gui/imagesets/&amp;quot;);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then later on in the code, when you need to load the imageset, you can reference the resource group to be used, like this:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
Imageset* wlis = ImagesetManager::getSingleton().createImageset(&lt;br /&gt;
	&amp;quot;WindowsLook.imageset&amp;quot;, &amp;quot;imagesets&amp;quot;);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note how you do not need to specify any path information; the path information is obtained from the resource group specified, in the example this is &amp;quot;imagesets&amp;quot;.  We will later show you how you set default resource groups for each of the resource types – then you do not have to specify the group when you load a resource (unless you're loading it from a group that is not the default, of course).&lt;br /&gt;
&lt;br /&gt;
Another important thing to consider is that using this approach, the data files should not contain relative path information – they should, in general, just have the actual file name.&lt;br /&gt;
&lt;br /&gt;
== Default Resource Groups ==&lt;br /&gt;
Each of the system classes that represents a loadable resource has static members to set and get a default resource group.  This resource group will be used when loading the specific data files needed by a given class – in the case of the Imageset class, the default resource group should reference a directory holding the imageset xml and texture image files.&lt;br /&gt;
&lt;br /&gt;
For each of the resource consuming classes, the static members are named the same (special exception is xerces – see below):&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
const String&amp;amp; getDefaultResourceGroup();&lt;br /&gt;
void setDefaultResourceGroup(const String&amp;amp; groupname);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following is a list of the core resource loading classes and the resources that they load:&lt;br /&gt;
&lt;br /&gt;
 CEGUI::Imageset			- Imageset xml and texture image files. &lt;br /&gt;
 CEGUI::Font			- Font xml and ttf font files.&lt;br /&gt;
 CEGUI::Scheme			- Scheme xml files.&lt;br /&gt;
 CEGUI::WindowManager		- Window layout xml files.&lt;br /&gt;
 CEGUI::WidgetLookManager	- LookNFeel xml files&lt;br /&gt;
 CEGUI::ScriptModule		- Script files in whichever scripted langauge.&lt;br /&gt;
&lt;br /&gt;
There is one special exception, as mentioned above – that is the Xerces-C based XML parser.  For this there is a special resource group setting to specify where the schema files can be found (these are the .xsd files used for xml validation).  For this special case, the static members are:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
 const String&amp;amp; XercesParser::getSchemaDefaultResourceGroup();&lt;br /&gt;
 void XercesParser::setSchemaDefaultResourceGroup(const String&amp;amp; groupname);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
One final thing to consider, is that the resource provider class also has a default group.  This should be considered a 'global' default – it is used whenever a specific resource loading class has no default of its own specified.  This could be useful if you have all your data in a single directory.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== DefaultResourceProvider Setup: A Complete Example ==&lt;br /&gt;
To close, we will show how the CEGUI samples framework does the initialisation of resource groups and their target directories, and how we assign the default groups to be used for all of the resource types.&lt;br /&gt;
&lt;br /&gt;
After initialising the core CEGUI::System object as usual, we then specify a set of resource groups and their target directories:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
// initialise the required dirs for the DefaultResourceProvider&lt;br /&gt;
CEGUI::DefaultResourceProvider* rp = static_cast&amp;lt;CEGUI::DefaultResourceProvider*&amp;gt;&lt;br /&gt;
    (CEGUI::System::getSingleton().getResourceProvider());&lt;br /&gt;
&lt;br /&gt;
rp-&amp;gt;setResourceGroupDirectory(&amp;quot;schemes&amp;quot;, &amp;quot;../datafiles/schemes/&amp;quot;);&lt;br /&gt;
rp-&amp;gt;setResourceGroupDirectory(&amp;quot;imagesets&amp;quot;, &amp;quot;../datafiles/imagesets/&amp;quot;);&lt;br /&gt;
rp-&amp;gt;setResourceGroupDirectory(&amp;quot;fonts&amp;quot;, &amp;quot;../datafiles/fonts/&amp;quot;);&lt;br /&gt;
rp-&amp;gt;setResourceGroupDirectory(&amp;quot;layouts&amp;quot;, &amp;quot;../datafiles/layouts/&amp;quot;);&lt;br /&gt;
rp-&amp;gt;setResourceGroupDirectory(&amp;quot;looknfeels&amp;quot;, &amp;quot;../datafiles/looknfeel/&amp;quot;);&lt;br /&gt;
rp-&amp;gt;setResourceGroupDirectory(&amp;quot;lua_scripts&amp;quot;, &amp;quot;../datafiles/lua_scripts/&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
// This is only needed if you are using Xerces and need to&lt;br /&gt;
// specify the schemas location&lt;br /&gt;
rp-&amp;gt;setResourceGroupDirectory(&amp;quot;schemas&amp;quot;, &amp;quot;../../XMLRefSchema/&amp;quot;);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Now that is done, we have a nice set of resource groups defined with their target directories set.  Finally, to get the system to use these new directories, we set the default resource groups to be used:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
// set the default resource groups to be used&lt;br /&gt;
CEGUI::Imageset::setDefaultResourceGroup(&amp;quot;imagesets&amp;quot;);&lt;br /&gt;
CEGUI::Font::setDefaultResourceGroup(&amp;quot;fonts&amp;quot;);&lt;br /&gt;
CEGUI::Scheme::setDefaultResourceGroup(&amp;quot;schemes&amp;quot;);&lt;br /&gt;
CEGUI::WidgetLookManager::setDefaultResourceGroup(&amp;quot;looknfeels&amp;quot;);&lt;br /&gt;
CEGUI::WindowManager::setDefaultResourceGroup(&amp;quot;layouts&amp;quot;);&lt;br /&gt;
CEGUI::ScriptModule::setDefaultResourceGroup(&amp;quot;lua_scripts&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
// Again, you only need to this one if you are using xerces and have&lt;br /&gt;
// defined a group for schemas.&lt;br /&gt;
CEGUI::XercesParser::setSchemaDefaultResourceGroup(&amp;quot;schemas&amp;quot;);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Here you have had a brief introduction to the DefaultResourceProvider class, you have seen how to create resource groups and assign directory locations to them, and you have also seen how to specify default resource groups for each resource type CEGUI uses.&lt;br /&gt;
&lt;br /&gt;
[[User:CrazyEddie|CrazyEddie]]&lt;/div&gt;</summary>
		<author><name>Makofierce</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=The_Beginner_Guide_to_Creating_a_CEGUI_Window&amp;diff=3600</id>
		<title>The Beginner Guide to Creating a CEGUI Window</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=The_Beginner_Guide_to_Creating_a_CEGUI_Window&amp;diff=3600"/>
				<updated>2011-01-07T09:40:46Z</updated>
		
		<summary type="html">&lt;p&gt;Makofierce: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{VersionBadge|0.6}}&lt;br /&gt;
&lt;br /&gt;
{{notice|message=This tutorial is for CEGUI versions up to 0.6.2.  For later releases, see the tutorials in the [http://www.cegui.org.uk/docs/current/window_tutorial.html main documentation].}}&lt;br /&gt;
&lt;br /&gt;
The purpose of this tutorial is to show you how to create a simple window and get it on screen.  Before continuing here, it is very important that you have already read and fully understood the previous articles in this series [[The Beginner Guide to Getting CEGUI Rendering]], [[The Beginner Guide to Resource Groups]] and [[The Beginner Guide to Loading Data Files and Initialisation]]; this is important because this tutorial builds upon the basic ideas introduced in those tutorials.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction to window and widget concepts ==&lt;br /&gt;
&lt;br /&gt;
Before we get the the meat of this tutorial there are some essential ideas that you must first consider.&lt;br /&gt;
&lt;br /&gt;
=== Every widget is a window ===&lt;br /&gt;
This is the most central concept that must be grasped when working with CEGUI.  Every widget within the system is derived from the same Window base class; so for the purposes of this tutorial, whenever I mention a window, the same ideas could just as easily be applied to a push button or scrollbar widget.&lt;br /&gt;
&lt;br /&gt;
=== Many settings are inherited ===&lt;br /&gt;
Many of the settings and properties available for windows in CEGUI are passed down the window hierarchy.  For example, if you set the alpha transparency on a particular window to 0.5, then by default, all window and widgets attached to that window will also be affected by the change applied at the higher level; although note also that the actual setting on the child window remains unchanged - the final values and/or settings used are usually some combination of the setting values from all windows in the hierarchy down to the current window.  This also applies to things such as window destruction; by default, a window will destroy attached child windows and widgets when it is destroyed.  The main advantages of this arrangement are that you can easily affect a the whole GUI by making changes to the root window settings for things like alpha, visibility, enabled / disabled state, and can easily 'clean up' an entire GUI layout by simply destroying the root window.  The default 'inherited' behaviours can be overridden on a per window basis where more fine grained control is needed, or where certain advanced management techniques are to be used.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Creating the windows ==&lt;br /&gt;
Enough of the waffle!  Lets create a window.&lt;br /&gt;
&lt;br /&gt;
There are two ways of doing this, via C++ code and XML layout files.  Each approach is discussed below.&lt;br /&gt;
&lt;br /&gt;
=== GUI Creation via C++ code ===&lt;br /&gt;
All windows in CEGUI are created by the WindowManager singleton object.  You can get access to this object via the usual getSingleton method as follows:&lt;br /&gt;
&lt;br /&gt;
 using namespace CEGUI;&lt;br /&gt;
 WindowManager&amp;amp; wmgr = WindowManager::getSingleton();&lt;br /&gt;
&lt;br /&gt;
In general, you will be using what is known as a DefaultWindow (or to use its old name, DefaultGUISheet) as the 'root' window in your GUI.  This is not required, but is the accepted pattern of usage for CEGUI and, once you start adding more top-level windows, helps simplify laying things out.&lt;br /&gt;
&lt;br /&gt;
So, to get the ball rolling, we'll create a DefaultWindow as set it as the root 'GUI Sheet' for the GUI:&lt;br /&gt;
&lt;br /&gt;
 Window* myRoot = wmgr.createWindow( &amp;quot;DefaultWindow&amp;quot;, &amp;quot;root&amp;quot; );&lt;br /&gt;
 System::getSingleton().setGUISheet( myRoot );&lt;br /&gt;
&lt;br /&gt;
The createWindow method of the WindowManager takes two strings as its parameters.  The first one, &amp;quot;DefaultWindow&amp;quot; in this example, tells the system the type or class of the window you wish to create.  Generally, the windows you have available are those which were registered when you loaded your scheme file, although some, like DefaultWindow, are global types and are always available.  The second parameter, &amp;quot;root&amp;quot; in this example, is a unique name which will be assigned to the window; this name can be used to retrieve a pointer to the window from the WindowManager at a later time.  Note that naming your root window &amp;quot;root&amp;quot; is not required, but is a common convention.&lt;br /&gt;
&lt;br /&gt;
The setGUISheet method in the System singleton object is used to specify a given window as the root of the GUI.  This will replace any current sheet / root window, although do note that the previous window hierarchy is not actually destroyed; it is just unlinked from the display - you can easily switch between GUI 'pages' by simply flipping between them using the setGUISheet method.&lt;br /&gt;
&lt;br /&gt;
Now you have created your first window and attached it to the GUI system, and the system will use this window as the root of the GUI when it draws the GUI.  But, if you were to compile a simple program using this code, you still can't see anything; what gives?  There's nothing wrong with your application, the DefaultWindow which we created above is just totally invisible!  This is what makes the DeafultWindow ideally suited as a root window; it serves as a blank canvas onto which other window and widgets can be attached.  So, lets do that now...&lt;br /&gt;
&lt;br /&gt;
Here we will create a frame window; this is a window that functions in a similar manner to the windows on your desktop UI, it has a title bar and can be moved and re-sized.&lt;br /&gt;
&lt;br /&gt;
 FrameWindow* fWnd = (FrameWindow*)wmgr.createWindow( &amp;quot;TaharezLook/FrameWindow&amp;quot;, &amp;quot;testWindow&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
here we are creating a &amp;quot;TaharezLook/FrameWindow&amp;quot; window.  This name uses a convention seen throughout the system, whereby a window type is prefixed by the name of the widget set (if you were to load the WindowsLook scheme, you could create a &amp;quot;WindowsLook/FrameWindow&amp;quot; object instead).  We have given our new window the simple test name of &amp;quot;testWindow&amp;quot;.  One final thing to note is the use of the cast, this is required since the createWindow method always returns a base Window type; in this, and many other cases a basic Window pointer will suffice, but there are times when you'll want to access methods introduced in the window and widget sub-classes, so the use of the cast as shown is common when using CEGUI.&lt;br /&gt;
&lt;br /&gt;
In order for the system to be able to do something useful with our new window, we must perform a few additional steps.&lt;br /&gt;
&lt;br /&gt;
First, we must attach the window to the root window we established above:&lt;br /&gt;
&lt;br /&gt;
 myRoot-&amp;gt;addChildWindow( fWnd );&lt;br /&gt;
&lt;br /&gt;
Now, we can set an initial position and size for our window.  CEGUI uses a 'unified' co-ordinate system enabling the use of relative (scale) and absolute (offset) components at the same time - this is why each co-ordinate you will see has two parts.  For a slightly extended introduction of this concept see [[Introduction and overview of core &amp;quot;Falagard&amp;quot; support systems]].  Back to the example:&lt;br /&gt;
&lt;br /&gt;
 // position a quarter of the way in from the top-left of parent.&lt;br /&gt;
 fWnd-&amp;gt;setPosition( UVector2( UDim( 0.25f, 0 ), UDim( 0.25f, 0 ) ) );&lt;br /&gt;
 &lt;br /&gt;
 // set size to be half the size of the parent&lt;br /&gt;
 fWnd-&amp;gt;setSize( UVector2( UDim( 0.5f, 0 ), UDim( 0.5f, 0 ) ) );&lt;br /&gt;
&lt;br /&gt;
Finally, we set a caption for the frame window's title bar:&lt;br /&gt;
&lt;br /&gt;
 fWnd-&amp;gt;setText( &amp;quot;Hello World!&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
And that's it!  When compiled into an application, you will now see a simple frame window in the middle of the display.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== XML layouts ===&lt;br /&gt;
All of the above is very nice, but there is one major drawback; any time you wish to adjust the GUI layout, you need to edit your code and recompile.  This will get old pretty quick, so what you really want is to be able to specify your GUI layout externally, and have your code load the layout via a file.  This is the purpose of the CEGUI layout XML files.&lt;br /&gt;
&lt;br /&gt;
The system supports XML layout files, which can be loaded via the WindowManager using the loadWindowLayout method.  This method creates all the windows for you and returns a pointer to the root window of the loaded hierarchy; which is ideal for assigning as the root of the GUI!&lt;br /&gt;
&lt;br /&gt;
So, first of all we need a layout file.  The following XML saved as a text file, is a layout file equivalent to the code we discussed above:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
 &amp;lt;GUILayout&amp;gt;&lt;br /&gt;
     &amp;lt;Window Type=&amp;quot;DefaultWindow&amp;quot; Name=&amp;quot;root&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;Window Type=&amp;quot;TaharezLook/FrameWindow&amp;quot; Name=&amp;quot;testWindow&amp;quot;&amp;gt;&lt;br /&gt;
             &amp;lt;Property Name=&amp;quot;UnifiedPosition&amp;quot; Value=&amp;quot;{{0.25,0},{0.25,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Property Name=&amp;quot;UnifiedSize&amp;quot; Value=&amp;quot;{{0.5,0},{0.5,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Hello World!&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;/Window&amp;gt;&lt;br /&gt;
     &amp;lt;/Window&amp;gt;&lt;br /&gt;
 &amp;lt;/GUILayout&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Window elements show an obvious mapping to the createWindow method from the WindowManager object; they take a type and a name which directly correspond to the parameters discussed previously.&lt;br /&gt;
&lt;br /&gt;
Nesting of the Window elements is used to attach certain windows to others.  Note that you may only have one 'root' level window in a layout file, which is another reason you'll usually see the DefaultWindow used as a canvas on which other windows and widgets are placed.&lt;br /&gt;
&lt;br /&gt;
The Property elements are used to set properties on the Window being defined.  There are many properties available for each window/widget class, and each class also inherits all properties from its parent class.  See the [http://www.cegui.org.uk/api_reference/namespaces.html &amp;lt;element&amp;gt;Properties namespaces in the API reference] for documentation on the available hard-coded properties and their 'value string' formats.  Since 'Falagard' skins can create their own properties, it is likely that the windows you are using contain many more properties than listed in the previous link - for these 'soft' properties, you need to consult whichever documentation is provided with the skin you are using (for the sample skins see [[SetProperty|TaharezLook]] and [[SetProperty (WindowsLook)|WindowsLook]]).&lt;br /&gt;
&lt;br /&gt;
If saved as a file called &amp;quot;test.layout&amp;quot;, you could load this layout and set it as the GUI root as follows:&lt;br /&gt;
&lt;br /&gt;
 using namespace CEGUI;&lt;br /&gt;
 Window* myRoot = WindowManager::getSingleton().loadWindowLayout( &amp;quot;test.layout&amp;quot; );&lt;br /&gt;
 System::getSingleton().setGUISheet( myRoot );&lt;br /&gt;
&lt;br /&gt;
The end result is exactly the same as what was done in C++ code earlier, except that now you can modify and enhance the GUI layout without the need for constant editing and recompilation of the application code.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Here you have seen how to perform basic window creation, how to create a simple window hierarchy, and how modify some window settings.  You have seen how this can be accomplished using both C++ code and external XML layout files.  There are many advanced possibilities available using both methods, although this is best left for a more advanced tutorial.&lt;br /&gt;
&lt;br /&gt;
[[User:CrazyEddie|CrazyEddie]]&lt;/div&gt;</summary>
		<author><name>Makofierce</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=The_Beginner_Guide_to_Injecting_Inputs&amp;diff=3599</id>
		<title>The Beginner Guide to Injecting Inputs</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=The_Beginner_Guide_to_Injecting_Inputs&amp;diff=3599"/>
				<updated>2011-01-07T09:40:29Z</updated>
		
		<summary type="html">&lt;p&gt;Makofierce: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{VersionBadge|0.6}}&lt;br /&gt;
&lt;br /&gt;
{{notice|message=This tutorial is for CEGUI versions up to 0.6.2.  For later releases, see the tutorials in the main documentation.}}&lt;br /&gt;
&lt;br /&gt;
Having read the previous tutorials in this series, you now have your GUI rendering setup, the files loaded, and even have a window on the screen - however you are probably wanting to have some user interaction too.  This is the subject of this final tutorial in the series; here we will show the required tasks in order to end up with a complete functioning GUI in your application.  (CrazyEddie's joke: Alternatively, you got tired of waiting 15 months for this tutorial and worked it out for yourself!).&lt;br /&gt;
&lt;br /&gt;
== Introduction to input for CEGUI ==&lt;br /&gt;
&lt;br /&gt;
=== First the bad news ===&lt;br /&gt;
It shocks some people to discover that CEGUI does not do any automatic collection of user input; it is the applications job to tell CEGUI about any events that it should know about.  This means that you have to tell CEGUI each time a key is pressed, or the mouse moves, and so on.  While this may seem strange at first, it actually affords you a lot more power - we are not tying you down to any particular system for your inputs, and you may also filter inputs before they get to CEGUI, although those are more advanced concepts best left for another time.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Get your inputs fuel injected stylee! ===&lt;br /&gt;
In order to tell CEGUI about the input events going on around it, we have an input injection interface.  This consists of a set of members in the CEGUI::System class - there is one member function for each type of base input we accept:&lt;br /&gt;
&lt;br /&gt;
 bool injectMouseMove( float delta_x, float delta_y );&lt;br /&gt;
 bool injectMousePosition( float x_pos, float y_pos );&lt;br /&gt;
 bool injectMouseLeaves( void );&lt;br /&gt;
 bool injectMouseButtonDown( MouseButton button );&lt;br /&gt;
 bool injectMouseButtonUp( MouseButton button );&lt;br /&gt;
 bool injectKeyDown( uint key_code );&lt;br /&gt;
 bool injectKeyUp( uint key_code );&lt;br /&gt;
 bool injectChar( utf32 code_point );&lt;br /&gt;
 bool injectMouseWheelChange( float delta );&lt;br /&gt;
 bool injectTimePulse( float timeElapsed );&lt;br /&gt;
&lt;br /&gt;
Yes, that's quite a collection!  The first thing that you might notice is that there appears to be some repetition - things like 'mouse move' and 'mouse position', 'key down' and 'char'.  For the mouse, we offer the possibility of injecting a relative movement of the mouse from its last injected location or an absolute position - which you choose will largely depend upon the type of inputs that your input library provides you with for the mouse.  For keys, it is required that both up/down strokes and also characters are injected - there are a couple of reasons for this; first, not all keys generate a character code (like shift, alt, and so on), and second, it allows you to do your own custom (or operating system supplied) key-mapping and key auto-repeat (since CEGUI does not currently offer these functions).&lt;br /&gt;
&lt;br /&gt;
The other thing to notice is the boolean return value from the injector functions.  This is used to relay back to your application whether or not CEGUI actually consumed the input.  If this returns false, it means that CEGUI did nothing useful with the input, and that your application may like to perform some action based on it instead.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== A little more detail - what each injector is used for ==&lt;br /&gt;
Here we will offer a brief description of what each injection function is used for, the data it expects, and what, in general, is done with the input.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== bool injectMouseMove( float delta_x, float delta_y ) ===&lt;br /&gt;
This is used to inject relative mouse movements.  The inputs 'delta_x' and 'delta_y' specify the direction and number of screen pixels the mouse has moved on the x axis and y axis respectively.  This causes the mouse to move by the specified amount (the actual amount moved can be changed by setting a mouse scaling factor via CEGUI::System::setMouseMoveScaling).  If you use this, you generally do not need to use injectMousePosition.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== bool injectMousePosition( float x_pos, float y_pos ) ===&lt;br /&gt;
This is used to inject the current absolute position of the mouse.  The inputs 'x_pos' and 'y_pos' specify the position of the mouse in pixels, with (0, 0) representing the top-left hand corner of the CEGUI display (so if you're in windowed mode, it's the corner of the window and not the whole screen).  The CEGUI mouse cursor will be set to the new position.  If you use this, you generally do not need to use  injectMouseMove.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== bool injectMouseLeaves( void ) ===&lt;br /&gt;
This function informs CEGUI that the mouse cursor has left the system application window which CEGUI considers its rendering area.  This is useful if running in windowed mode to inform widgets that the mouse has actually left the CEGUI display completely (otherwise it may not get to know, since under some systems no more mouse events are generated for a OS window once the mouse has left it).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== bool injectMouseButtonDown( MouseButton button ) ===&lt;br /&gt;
This tells CEGUI that a mouse button has been pressed down.  The value 'button' is one of the CEGUI::MouseButton enumerated values, which are as follows:&lt;br /&gt;
 enum MouseButton&lt;br /&gt;
 {&lt;br /&gt;
    LeftButton,&lt;br /&gt;
    RightButton,&lt;br /&gt;
    MiddleButton,&lt;br /&gt;
    X1Button,&lt;br /&gt;
    X2Button,&lt;br /&gt;
    MouseButtonCount,&lt;br /&gt;
    NoButton&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
If the values from your input library do not match these, you will have to perform a translation step.  Also note that the value NoButton is not 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== bool injectMouseButtonUp( MouseButton button ) ===&lt;br /&gt;
This tells CEGUI that a mouse button has been released.  As for the injectMouseButtonDown function, the value 'button' is one of the MouseButton enumerated values.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== bool injectKeyDown( uint key_code ) ===&lt;br /&gt;
This tells CEGUI that a key has been pressed.  The value 'key_code' is a scan code for the key - note that this is not an ASCII or other text encoding value.  The available scan codes are defined in the CEGUI::Key::Scan enumeration.  If you are using Microsoft DirectInput, then our scan codes are the same ones output by that library, in other cases you may be required to perform some translation.  Note that for current releases, and depending upon your expected use, it may not be required to inject all key down/up strokes - the most common ones that you likely will need are for backspace, delete, enter, the shift keys and the arrow keys.&lt;br /&gt;
&lt;br /&gt;
At present no automatic key mapping for generation of character codes is performed, also no key auto-repeat functionality is available - although these functions may appear in future releases.  If you need key auto-repeat then you will need to either use an input library that offers that ability, or implement something directly.  Of course you will almost certainly need character input, so for that look at the injectChar function below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== bool injectKeyUp( uint key_code ) ===&lt;br /&gt;
This tells CEGUI that a key has been released.  As for the injectKeyDown function, the value 'key_code' is a scan code for the key - and again note that this is not an ASCII or other text encoding value - see above for a more detailed description of the key scan codes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== bool injectChar( utf32 code_point ) ===&lt;br /&gt;
This function tells CEGUI that a character key has been pressed - you will need this in order to input text into CEGUI widgets.  The 'code_point' input is a Unicode UTF32 code point (see [http://unicode.org/ the unicode website] for information about unicode).  How you obtain this value is something that is dependant upon the input library that you are using - for many people, who just wish to use ASCII values, you can just pass in your ASCII codes unmodified, since Unicode values between 0 and 127 are the same as the standard ASCII codes.  For other uses, you will need to consult the API documentation for your input library (it is possible, for example, to get the Microsoft Windows message pump to send you key codes in UTF32 form, though exactly how it is done is beyond the scope of this introductory tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== bool injectMouseWheelChange( float delta ) ===&lt;br /&gt;
This function is used to tell CEGUI about the use of the mouse wheel or scroll wheel (whatever you like to call it).  Use positive values for forward movement (rolling the wheel away from the user), and negative values for backwards movement (rolling the wheel towards the user).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== bool injectTimePulse( float timeElapsed ) ===&lt;br /&gt;
This function is used to keep CEGUI informed about time (CEGUI doesn't have a watch, you see!).  The 'timeElapsed' is a floating point number that indicates the number of seconds - or part seconds - that have passed since the last time the injector was called (or since CEGUI was started).  The use of this function is becoming more and more important - it now controls things such as fades and timing for tool-tip widgets, menus, and also auto-repeat for mouse buttons.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Here we have seen the general idiom that CEGUI uses for obtaining externally generated input events.  We have seen the methods for passing these inputs to CEGUI, and type and format of the information to be passed.&lt;br /&gt;
&lt;br /&gt;
Unlike some of the other tutorials in this series, we did not provide concrete code examples.  The main reason for this was to keep the tutorial reasonably short; to prevent it becoming a jumble of code for every possible combination of input system, and in the process causing more confusion.  The use of any individual input library could easily fill a tutorial of its own.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To see some concrete examples, there are two immediate sources of information:&lt;br /&gt;
*We have some great tutorials here on the wiki&lt;br /&gt;
**[[Using CEGUI with SDL and OpenGL#Injecting_Input|Using CEGUI with SDL and OpenGL]]&lt;br /&gt;
**[[Using CEGUI with Producer and OpenGL#Injecting_Input_to_CEGUI_via_Producer|Using CEGUI with Producer and OpenGL]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*The samples framework code: see the files in cegui_mk2/Samples/common/src:&lt;br /&gt;
**Win32AppHelper.cpp - contains a windows message procedure injecting mouse and character inputs into CEGUI, and using DirectInput for keyboard up and down messages.&lt;br /&gt;
**CEGuiOgreBaseApplication.cpp - contains an example Ogre::FrameListener class which takes inputs generated by the [http://sourceforge.net/projects/wgois/ OIS Library] and injects these into CEGUI.&lt;br /&gt;
**CEGuiOpenGLBaseApplication.cpp - registers callback functions with glut to process inputs, and also shows the use of a key translation table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Additionally, Irrlicht users can use the supplied Irrlicht event pusher - whenever an event comes your way from Irrlicht you can use the OnEvent member in the Irrlicht Renderer to forward this to CEGUI (you then just have to inject time pulses).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[User:CrazyEddie|CrazyEddie]] 03:46, 9 February 2008 (PST)&lt;/div&gt;</summary>
		<author><name>Makofierce</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=Developer_Requirements&amp;diff=3598</id>
		<title>Developer Requirements</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=Developer_Requirements&amp;diff=3598"/>
				<updated>2011-01-07T09:38:44Z</updated>
		
		<summary type="html">&lt;p&gt;Makofierce: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page talks about skills required from a developer before he/she can start messing with CEGUI. Helpful links how to get started on different topics are sometimes provided, if you aren't sure about many of these topics, please buy/borrow a book instead, recommended C++ books are at the bottom of this article. Unless you can meet all these requirements, you are less likely to get help on CEGUI forums or the IRC channel. You may still receive some help, but please understand that we are sick of answering the same beginner C++ questions all over again. Thanks for understanding.&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
* updating to latest stable before reporting bugs/problems (it is likely that some bugs were fixed and memorising the changelog is a pain)&lt;br /&gt;
* being very confident, knowledgeable and experienced on your platform of choice (knowing your way around files, folders and all that complex and confusing stuff ;-))&lt;br /&gt;
* ability to search via Google and forum search (the answer is often already out there, finding it is usually faster than asking the question again)&lt;br /&gt;
* able to try things out yourself, not asking about trivial problems every 10 minutes... You learn much more if you just try to make it work yourself...&lt;br /&gt;
* not being scared of error messages, they are there to actually help you! Read them, not just copy paste them for somebody else to solve!&lt;br /&gt;
* at least beginner level English (if you don't have that you don't understand this anyways, so it's probably pointless to write it here :-D)&lt;br /&gt;
&lt;br /&gt;
== C++ ==&lt;br /&gt;
You have to be able to answer the following questions.&lt;br /&gt;
&lt;br /&gt;
* What is an include file? How is it related to include path? [http://en.wikipedia.org/wiki/Header_file]&lt;br /&gt;
* What is a symbol? How is it related to linking?&lt;br /&gt;
* What is a compiler? What is a linker? [http://en.wikipedia.org/wiki/Compiler] [http://en.wikipedia.org/wiki/Linker_(computing)]&lt;br /&gt;
* What is the difference between .so/.dll (Linux/Windows) and .lib (both)?&lt;br /&gt;
* Static vs dynamic linking. What is the advantage of static linking? [http://en.wikipedia.org/wiki/Static_library]&lt;br /&gt;
* What is usually included in an SDK? What is the difference between building CEGUI yourself and using its SDK?&lt;br /&gt;
&lt;br /&gt;
Plus you have to be at least a little proficient in your work environment (be it a full fledged IDE - MSVC, Eclipse, whatever, or command line tools).&lt;br /&gt;
&lt;br /&gt;
== Recommended books ==&lt;br /&gt;
* C++ Programming Language, The (3rd Edition) by Stroustrup [http://www.amazon.com/exec/obidos/ASIN/0201889544]&lt;br /&gt;
* Effective C++ by Meyers [http://www.amazon.com/exec/obidos/ASIN/0321334876]&lt;br /&gt;
* C++ How to program by Deitel [http://www.deitel.com/books/cpphtp4/]&lt;br /&gt;
* C++ templates by Vandervoorde and Josuttis, online for free! [http://books.google.cz/books?id=yQU-NlmQb_UC&amp;amp;printsec=frontcover&amp;amp;dq=C%2B%2B+templates+by+Josuttis+and+Vandervoorde&amp;amp;source=bl&amp;amp;ots=EdpL60TxFV&amp;amp;sig=ZDKvNkd8u7-PH9zyBEYA3yFJP58&amp;amp;hl=cs&amp;amp;ei=7iu8TMqJGsmgOvfouYYN&amp;amp;sa=X&amp;amp;oi=book_result&amp;amp;ct=result&amp;amp;resnum=1&amp;amp;ved=0CBUQ6AEwAA#v=onepage&amp;amp;q&amp;amp;f=false]&lt;br /&gt;
* Beginning Visual C++ 2010 by Horton [http://www.amazon.com/Ivor-Hortons-Beginning-Visual-Programmer/dp/0470500883/]&lt;/div&gt;</summary>
		<author><name>Makofierce</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=Animation_System&amp;diff=3597</id>
		<title>Animation System</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=Animation_System&amp;diff=3597"/>
				<updated>2011-01-07T09:37:24Z</updated>
		
		<summary type="html">&lt;p&gt;Makofierce: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{VersionBadge|0.7}} {{VersionAtLeast|0.7.2}}&lt;br /&gt;
&lt;br /&gt;
== Basic concepts ==&lt;br /&gt;
In UI lots of animations are likely to be shared (for example widget specific animation), so CEGUI splits the animation between definition and instance. You can have one animation definition animating large amount of Windows, having only one animation per window is also fine (one animation with only one instance). Animation definitions aren't tied to window type, the only condition  is that the target must have all affected (target properties of all affectors inside the animation) and source properties (all source properties in key frames, if any).&lt;br /&gt;
&lt;br /&gt;
== Purpose of animation classes ==&lt;br /&gt;
&lt;br /&gt;
=== Animation Definition (class CEGUI::Animation) ===&lt;br /&gt;
This class holds defining data for animations. Specifically duration, replay mode, auto start and list of Affectors. This class doesn't directly animate anything. You have to instantiate it via CEGUI::AnimationManager::instantiateAnimation.&lt;br /&gt;
&lt;br /&gt;
=== Affector (class CEGUI::Affector) ===&lt;br /&gt;
Affector affects (changes the value of) one property. It holds application method (more about that later), target property, used interpolator and list of key frames.&lt;br /&gt;
&lt;br /&gt;
=== Key Frame (class CEGUI::KeyFrame) ===&lt;br /&gt;
Key frame represents the value of affected property at given time position. It holds value, source property and time position. Key frames can use values of properties of the affected window. If source property is not empty, property is saved when animation starts and used as value for this key frame.&lt;br /&gt;
&lt;br /&gt;
=== Animation Instance (class CEGUI::AnimationInstance) ===&lt;br /&gt;
This class uses animation definition to animate Window. It holds animation position and playback speed.&lt;br /&gt;
&lt;br /&gt;
=== Animation Manager (class CEGUI::AnimationManager ===&lt;br /&gt;
Singleton class. You use it to create new animation definitions and instantiate existing animation definitions. (You should not construct Animation definitions or Animation instances directly, always use Animation Manager).&lt;br /&gt;
&lt;br /&gt;
=== Interpolator (class CEGUI::Interpolator) ===&lt;br /&gt;
To be able to animate smoothly between 2 discrete keyframes, interpolators had to be introduced. You don't have to use them directly, everything is done for you in the animation classes. You only need to understand their internals if you need custom interpolator (as all basic interpolators are included in CEGUI, if you find some property that can't be animated with stock interpolators, let us know).&lt;br /&gt;
&lt;br /&gt;
== Defining animations ==&lt;br /&gt;
&lt;br /&gt;
=== Via code ===&lt;br /&gt;
This sample animation takes 0.3 seconds and in that time, it fades the window and rotates it 10 degrees around Y axis.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
   CEGUI::Animation* anim = CEGUI::AnimationManager::getSingleton().createAnimation(&amp;quot;Testing&amp;quot;);&lt;br /&gt;
   anim-&amp;gt;setDuration(0.3f); // duration in seconds&lt;br /&gt;
   anim-&amp;gt;setReplayMode(CEGUI::Animation::RM_Once); // when this animation is started, only play it once, then stop&lt;br /&gt;
   &lt;br /&gt;
   // now we define affector inside our Testing animation&lt;br /&gt;
   {&lt;br /&gt;
    // this affector changes YRotation and interpolates keyframes with float interpolator&lt;br /&gt;
    CEGUI::Affector* affector = anim-&amp;gt;createAffector(&amp;quot;YRotation&amp;quot;, &amp;quot;float&amp;quot;);&lt;br /&gt;
    // at 0.0 seconds, the animation should set YRotation to 10.0 degrees&lt;br /&gt;
    affector-&amp;gt;createKeyFrame(0.0f, &amp;quot;0.0&amp;quot;);&lt;br /&gt;
    // at 0.3 seconds, YRotation should be 0 degrees and animation should progress towards this in an accelerating manner&lt;br /&gt;
    affector-&amp;gt;createKeyFrame(0.3f, &amp;quot;10.0&amp;quot;, CEGUI::KeyFrame::P_QuadraticAccelerating);&lt;br /&gt;
   }&lt;br /&gt;
 &lt;br /&gt;
   // animation can have more than one affectors! lets define another affector that changes Alpha&lt;br /&gt;
   {&lt;br /&gt;
    // this affector will again use float interpolator&lt;br /&gt;
    CEGUI::Affector* affector = anim-&amp;gt;createAffector(&amp;quot;Alpha&amp;quot;, &amp;quot;float&amp;quot;);&lt;br /&gt;
    affector-&amp;gt;createKeyFrame(0.0f, &amp;quot;1.0&amp;quot;); // at 0.0 seconds, set alpha to 0.5&lt;br /&gt;
    affector-&amp;gt;createKeyFrame(0.3f, &amp;quot;0.5&amp;quot;, CEGUI::KeyFrame::P_QuadraticDecelerating); // at 1.0 seconds, set alpha to 1.0, now decelerating!&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Via Falagard looknfeel XML ===&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&amp;lt;WidgetLook ...&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
  &amp;lt;AnimationDefinition name=&amp;quot;Testing&amp;quot; duration=&amp;quot;0.3&amp;quot; replayMode=&amp;quot;once&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;Affector property=&amp;quot;Alpha&amp;quot; interpolator=&amp;quot;float&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;KeyFrame position=&amp;quot;0.0&amp;quot; value=&amp;quot;1.0&amp;quot; /&amp;gt;&lt;br /&gt;
      &amp;lt;KeyFrame position=&amp;quot;0.3&amp;quot; value=&amp;quot;0.5&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;/Affector&amp;gt;&lt;br /&gt;
    &amp;lt;Affector property=&amp;quot;YRotation&amp;quot; interpolator=&amp;quot;float&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;KeyFrame position=&amp;quot;0.0&amp;quot; value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
      &amp;lt;KeyFrame position=&amp;quot;0.3&amp;quot; value=&amp;quot;10&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;/Affector&amp;gt;&lt;br /&gt;
  &amp;lt;/AnimationDefinition&amp;gt;&lt;br /&gt;
&amp;lt;/WidgetLook&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Via separate animation list XML (AnimationManager::loadAnimationsFromXML) ===&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&amp;lt;Animations&amp;gt;&lt;br /&gt;
  &amp;lt;AnimationDefinition name=&amp;quot;Testing&amp;quot; duration=&amp;quot;0.3&amp;quot; replayMode=&amp;quot;once&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;Affector property=&amp;quot;Alpha&amp;quot; interpolator=&amp;quot;float&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;KeyFrame position=&amp;quot;0.0&amp;quot; value=&amp;quot;1.0&amp;quot; /&amp;gt;&lt;br /&gt;
      &amp;lt;KeyFrame position=&amp;quot;0.3&amp;quot; value=&amp;quot;0.5&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;/Affector&amp;gt;&lt;br /&gt;
    &amp;lt;Affector property=&amp;quot;YRotation&amp;quot; interpolator=&amp;quot;float&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;KeyFrame position=&amp;quot;0.0&amp;quot; value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
      &amp;lt;KeyFrame position=&amp;quot;0.3&amp;quot; value=&amp;quot;10&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;/Affector&amp;gt;&lt;br /&gt;
  &amp;lt;/AnimationDefinition&amp;gt;&lt;br /&gt;
&amp;lt;/Animations&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Instantiating animations ==&lt;br /&gt;
If you created the animation in code or via separate animation definition file, you have to instantiate it (only Falagard instantiates and sets target automatically).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
CEGUI::AnimationInstance* instance = CEGUI::AnimationManager::getSingleton().instantiateAnimation(anim);&lt;br /&gt;
// after we instantiate the animation, we have to set its target window&lt;br /&gt;
instance-&amp;gt;setTargetWindow(targetWindow);&lt;br /&gt;
&lt;br /&gt;
// at this point, you can start this instance and see the results&lt;br /&gt;
instance-&amp;gt;start();&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Connecting events and animations ==&lt;br /&gt;
You often want your animation to start when something happens (Mouse gets over the widget, new FrameWindow is opened, etc). You have two options to achieve this.&lt;br /&gt;
&lt;br /&gt;
If you already are using XML to define animations, the easiest solution is to use the auto event subscription facility. You add pairs of Event name and action that should happen with the animation (&amp;quot;Start&amp;quot;, &amp;quot;Stop&amp;quot;, &amp;quot;Pause&amp;quot;, &amp;quot;Unpause&amp;quot;, etc.) and when target window is set, these subscriptions are automatically made for your convenienve.&lt;br /&gt;
&lt;br /&gt;
Both Falagard and Animations.xml approaches are the same with regards to this. This XML snippet starts the animation when mouse enters the target window's area.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&amp;lt;AnimationDefinition name=&amp;quot;Testing&amp;quot; duration=&amp;quot;0.3&amp;quot; replayMode=&amp;quot;once&amp;quot;&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  &amp;lt;Subscription event=&amp;quot;MouseEntersArea&amp;quot; action=&amp;quot;Start&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/AnimationDefinition&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Doing this in code is much more powerful (you can subscribe to a window that's different than target window) but also more messy:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
windowWithEvent-&amp;gt;subscribeEvent(CEGUI::Window::EventMouseEntersArea, CEGUI::Event::Subscriber(&amp;amp;CEGUI::AnimationInstance::handleStart, instance));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also do this from a Lua script:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
CEGUI.WindowManager:getSingleton():getWindow(&amp;quot;WindowName&amp;quot;):subscribeEvent(&amp;quot;MouseEnter&amp;quot;, &amp;quot;luafunctionname&amp;quot;)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This code sets up the window specified in WindowName, the name of that window on creation or from the XML &amp;quot;Name&amp;quot; property, to react to the mouse entering it by calling the Lua function specified in luafunctionname. The Lua function name argument should be the name, without trailing (), to a function declared in Lua or exported to Lua from C.&lt;br /&gt;
&lt;br /&gt;
== Progression ==&lt;br /&gt;
As I created the implementation, I noticed that linear animations look really boring and predictable. Often times accelerating or decelerating anims will look much better and lively. To make creating those easier, I introduced progression to key frames. This enum tells the system how to progress towards the key frame that holds the progression (that means progression on the first key frame is never used!). The default is linear, meaning that progress towards the keyframe is completely linear. Try the other options yourself to see the differences.&lt;br /&gt;
=== animations.xml example ===&lt;br /&gt;
Here we have edited the example animation so that the alpha value uses the quadratic deceleration progression. This will make the alpha value drop quickly in the first frames but the speed of the change will decrease quickly and give a smooth finish to the transition.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&amp;lt;Animations&amp;gt;&lt;br /&gt;
  &amp;lt;AnimationDefinition name=&amp;quot;Testing&amp;quot; duration=&amp;quot;0.3&amp;quot; replayMode=&amp;quot;once&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;Affector property=&amp;quot;Alpha&amp;quot; interpolator=&amp;quot;float&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;KeyFrame position=&amp;quot;0.0&amp;quot; value=&amp;quot;1.0&amp;quot; /&amp;gt;&lt;br /&gt;
      &amp;lt;KeyFrame position=&amp;quot;0.3&amp;quot; value=&amp;quot;0.5&amp;quot; progression=&amp;quot;quadratic decelerating&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;/Affector&amp;gt;&lt;br /&gt;
    &amp;lt;Affector property=&amp;quot;YRotation&amp;quot; interpolator=&amp;quot;float&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;KeyFrame position=&amp;quot;0.0&amp;quot; value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
      &amp;lt;KeyFrame position=&amp;quot;0.3&amp;quot; value=&amp;quot;10&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;/Affector&amp;gt;&lt;br /&gt;
  &amp;lt;/AnimationDefinition&amp;gt;&lt;br /&gt;
&amp;lt;/Animations&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Possible values for this property, in XML, are:&lt;br /&gt;
* &amp;quot;linear&amp;quot;: (default value) Simple linear transition. Same rate of progression for every frame. &lt;br /&gt;
* &amp;quot;discrete&amp;quot;: Abrupt progression, goes from one value straight to the next one.&lt;br /&gt;
* &amp;quot;quadratic accelerating&amp;quot;: Starts slow but accelerates to very fast towards the end.&lt;br /&gt;
* &amp;quot;quadratic decelerating&amp;quot;: Starts very fast but comes smoothly to a halt in the end.&lt;br /&gt;
&lt;br /&gt;
== Application methods ==&lt;br /&gt;
Affectors offer 3 different &amp;quot;application methods&amp;quot;. One is absolute, meaning that the keyframe value is taken as absolute and is directly set to the property after interpolation. The other 2 are relative. That means that when the animation starts, the old values of properties are saved and later used when animating. AM_Relative means saved_value + interpolated_value, AM_RelativeMultiply means saved_value * interpolated_float.&lt;br /&gt;
&lt;br /&gt;
=== animations.xml example: ===&lt;br /&gt;
In the following example we have changed the rotation affector to do relative rotation instead of absolute, which is default. This means that whatever rotation the window had when the animation started it will add the new rotation to that value. The absolute method would have reset the rotation to 0 in the first key frame and then proceeded to rotate it by 10 degrees during 0.3 seconds.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&amp;lt;Animations&amp;gt;&lt;br /&gt;
  &amp;lt;AnimationDefinition name=&amp;quot;Testing&amp;quot; duration=&amp;quot;0.3&amp;quot; replayMode=&amp;quot;once&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;Affector property=&amp;quot;Alpha&amp;quot; interpolator=&amp;quot;float&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;KeyFrame position=&amp;quot;0.0&amp;quot; value=&amp;quot;1.0&amp;quot; /&amp;gt;&lt;br /&gt;
      &amp;lt;KeyFrame position=&amp;quot;0.3&amp;quot; value=&amp;quot;0.5&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;/Affector&amp;gt;&lt;br /&gt;
    &amp;lt;Affector property=&amp;quot;YRotation&amp;quot; interpolator=&amp;quot;float&amp;quot; applicationMethod=&amp;quot;relative&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;KeyFrame position=&amp;quot;0.0&amp;quot; value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
      &amp;lt;KeyFrame position=&amp;quot;0.3&amp;quot; value=&amp;quot;10&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;/Affector&amp;gt;&lt;br /&gt;
  &amp;lt;/AnimationDefinition&amp;gt;&lt;br /&gt;
&amp;lt;/Animations&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Possible values for this property, in XML, are:&lt;br /&gt;
* &amp;quot;absolute&amp;quot;: (default setting) The interpolated value is set as the new property value.&lt;br /&gt;
* &amp;quot;relative&amp;quot;: The interpolated value is added to the starting value of the property.&lt;br /&gt;
* &amp;quot;relative multiply&amp;quot;: The interpolated value is multiplied with the starting value of the property.&lt;/div&gt;</summary>
		<author><name>Makofierce</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=Performance_tips&amp;diff=3596</id>
		<title>Performance tips</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=Performance_tips&amp;diff=3596"/>
				<updated>2011-01-07T09:36:14Z</updated>
		
		<summary type="html">&lt;p&gt;Makofierce: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{VersionBadge|0.7}} {{VersionBadge|0.8}}&lt;br /&gt;
&lt;br /&gt;
This page provides some generic tips on getting the most performance out of CEGUI. People often claim that CEGUI is slow and don't realise it could be them doing something wrong. I will try to gather some areas where people claim CEGUI is slow and &amp;quot;just sucks&amp;quot; and try to provide tips about what is wrong.&lt;br /&gt;
&lt;br /&gt;
== Problem: Loading layouts takes few seconds and halts my application! ==&lt;br /&gt;
This is a complaint I have seen multiple times. The reporter usually has a dialog that in its constructor loads a XML layout off the HDD and constructs its hierarchy based on that. Depending on how the layout is complex, this can indeed take a few seconds (depending on many many factors). What is flawed about this is the fact that the user loads the layout always when the dialog is constructed. Wouldn't it be better if we loaded the layout once, stored it somewhere and reused that whenever the dialog has to reappear instead of deleting the layout when user closes the dialog and loading it from scratch when it's opened?&lt;br /&gt;
&lt;br /&gt;
There are two ways of avoiding this. If the dialog is modal and can only appear once, it pays off to just load it, set it to invisible and the show/hide as necessary. This is the fastest solution.&lt;br /&gt;
&lt;br /&gt;
If you need multiple instances of the dialog, you need to clone the widget tree somehow. This is why Widget (Window in 0.7 and previous) ::clone method has been implemented (only CEGUI 0.7.5 and newer!). It allows you to clone the entire widget hiearchy. The idea is to load this when the dialog is first used (or even when loading the application, depends on how the dialog is used). Store the widget pointer somewhere (could be a static member variable in the Dialog class) and upon construction, just clone the hierarchy and add the cloned widget while leaving the original alone for further cloning.&lt;br /&gt;
(TODO: add some example code)&lt;br /&gt;
&lt;br /&gt;
== A quick and (relatively) painless way to get roughly 40% performance increase in certain areas (0.8 only!) ==&lt;br /&gt;
By default, CEGUI uses no custom allocators at all. That means the plain old new and delete. You can set the allocator to anything you want but we recommend nedmalloc. It's a very robust memory allocator tailored to give maximum performance. It speeds things up especially when initialising, loading layouts, creating windows, ... Give it a try. See [[Memory Allocation]] for more details.&lt;br /&gt;
&lt;br /&gt;
== Speeding up a rarely changing info window (or any widget) with complex elements inside it ==&lt;br /&gt;
CEGUI allows caching. This is done with the &amp;quot;AutoRenderingSurface&amp;quot; property. What this means is that the widget gets rendered once with its child widgets (the entire hierarchy). The result is stored in a texture and from this moment on, whenever rendering needs to be done, just one quad with the texture is drawn. When widgets change inside, it invalidates the cache and everything is redrawn from scratch. This is especially useful for complex deep hierarchy widgets that users rarely interact with or aren't interactive at all.&lt;br /&gt;
&lt;br /&gt;
Caveat: The texture caching causes the widget to hard clip its children to its dimensions! That means that a combobox at the bottom of a frame window will get &amp;quot;cut&amp;quot; when you open the options of it. This is likely to get fixed but as of now (5th January 2011) it's still a problem in both 0.7 and 0.8.&lt;/div&gt;</summary>
		<author><name>Makofierce</name></author>	</entry>

	</feed>