<?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=Rackle</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=Rackle"/>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/Special:Contributions/Rackle"/>
		<updated>2026-06-02T18:03:44Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.24.1</generator>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=Sample_code_for_all_Widgets&amp;diff=2869</id>
		<title>Sample code for all Widgets</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=Sample_code_for_all_Widgets&amp;diff=2869"/>
				<updated>2008-02-19T16:46:58Z</updated>
		
		<summary type="html">&lt;p&gt;Rackle: Link toward PseudoListbox&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This code goes through every widget and demonstrates how to retrieve and set their data as well as some of their particularities.  Please post comments or questions on the message board thread for the [http://www.cegui.org.uk/phpBB2/viewtopic.php?p=7967#7967 Widget Galore]&lt;br /&gt;
&lt;br /&gt;
=== Widgets===&lt;br /&gt;
&lt;br /&gt;
==== General ====&lt;br /&gt;
A widget can be enabled/disabled via setEnabled().  Disabling a widget prevents the user from activating it and manipulating its contents.  A widget can be hidden/shown via setVisible().&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Tooltip ====&lt;br /&gt;
A Tooltip widget displays text when the mouse has been hovering over a widget for a certain amount of time.  This widget requires that time be injected within CEGUI via injectTimePulse().&lt;br /&gt;
&lt;br /&gt;
The graphical aspect (the scheme) of the tooltip can be specified via setTooltip().  The amount of hovering time required to activate the tooltip can be specified via setHoverTime().  The amount of time the tooltip is displayed can be specified via setDisplayTime().  And the fade transition time can be specified via setFadeTime(); this affects both the fade in and the fade out times.  The tooltip text of a widget can be specified via setTooltipText().  Please note that some complex widgets are composed of several widgets.  In order to have a tooltip text displayed while hovering over any region of the complex widget then every component widget needs to have a tooltip text specified.  For example a Spinner widget is composed of an Editbox widget and two Button widgets. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== StaticText ====&lt;br /&gt;
There is no StaticText within Cegui but type of widget can be obtained via the DefaultWindow class.&lt;br /&gt;
&lt;br /&gt;
The currently displayed text can be specified via setText().  The color of this text can be specified via the &amp;quot;TextColours&amp;quot; property.  The value of this property contains 4 color definitions: top left, top right, bottom left, and bottom right.  Each color is specified as a two-digit hexadecimal value of the format AARRGGBB (alpha, red, green, blue).  The text is aligned vertically via the &amp;quot;VertFormatting&amp;quot; property with a value of TopAligned, BottomAligned, or VertCentred.  The text is aligned horizontally via the &amp;quot;HorzFormatting&amp;quot; property with a value of LeftAligned, RightAligned, HorzCentred, HorzJustified, WordWrapLeftAligned, WordWrapRightAligned, WordWrapCentred, or WordWrapJustified.&lt;br /&gt;
&lt;br /&gt;
==== StaticImage ====&lt;br /&gt;
There is no StaticImage within Cegui but type of widget can be obtained via the DefaultWindow class.&lt;br /&gt;
&lt;br /&gt;
The currently displayed image can be specified via the &amp;quot;Image&amp;quot; property.  This property takes two parameters, the imageset (&amp;quot;set&amp;quot;) and the image name (&amp;quot;image&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
==== ProgressBar ====&lt;br /&gt;
A ProgressBar widget displays a progression; it does not receive inputs from a user.&lt;br /&gt;
&lt;br /&gt;
The current progress can be specified via setProgress().  Progress can be advanced through steps.  The step size can be specified via setStepSize() and a step performed via step().  Progress can be adjusted by a delta value via adjustProgress().  The current progress value can be obtained via getProgress().&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Button ====&lt;br /&gt;
A Button widget displays a text and receives an activation instruction from the user.&lt;br /&gt;
&lt;br /&gt;
The text can be specified via setText().&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== ScrollablePane ====&lt;br /&gt;
A ScrollablePane widget displays contents that can be scrolled.  Contents can be added via addChildWindow().  When that content exceeds the dimensions of the ScrollablePane then scrollbars appear to allow the use to view and interact with that hidden content.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Checkbox ====&lt;br /&gt;
A Checkbox widget controls a boolean value; true when checked and false when unchecked.  This value can be obtained via isSelected() and specified via setSelected(true) to check or setSelected(false) to uncheck.&lt;br /&gt;
&lt;br /&gt;
==== Spinner ====&lt;br /&gt;
A Spinner widget controls a numerical values (float) through an editbox or the use of the increment or decrement buttons.&lt;br /&gt;
&lt;br /&gt;
This value is bounded within a minimum and a maximum by calling setMinimumValue() and setMaximumValue().  The arrow buttons increment or decrement the value by the amount specified with setStepSize().  The numerical value can be displayed in four formats:  FloatingPoint, Integer, Hexadecimal, Octal.  &lt;br /&gt;
&lt;br /&gt;
The current value is obtained via getCurrentValue() and specified via setCurrentValue().&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Editbox ====&lt;br /&gt;
An Editbox widget controls printable character values; letters, numbers, punctuations, and symbols.  &lt;br /&gt;
&lt;br /&gt;
The maximal number of characters that can be specified is bound by setMaxTextLength().  The value can be set to readable only (modifications by users are not allowed) via setReadOnly(true).  The value can be masked via setTextMasked() and the default value of * can be modified via setMaskCodePoint().&lt;br /&gt;
&lt;br /&gt;
The current value can be obtained via getText() and specified via setText().&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Slider ====&lt;br /&gt;
A Slider widget controls a numerical value (float) through the position of a &amp;quot;thumb&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This value is bounded within a maximum by setMaxValue(); the minimum value is set to 0.0f.  The thumb can be dragged to the desired position or moved by clicking on either side of the thumb.  The increment or decrement value is set by setClickStep().&lt;br /&gt;
&lt;br /&gt;
The current value can be obtained via getCurrentValue() and specified via setCurrentValue().&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Scrollbar ====&lt;br /&gt;
A Scrollbar widget controls a numerical value (float) through the position of a &amp;quot;thumb&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This value is bounded within a maximum by setDocumentSize(); the minimum value is set to 0.0f.  The thumb can be dragged to the desired position or moved by clicking on either side of the thumb.  The increment or decrement value is set by setPageSize().  The arrow buttons increment or decrement the value by the amount specified with setStepSize().&lt;br /&gt;
&lt;br /&gt;
The current value can be obtained via getScrollPosition() and specified via setScrollPosition().  Note that the actual maximum value that the scrollbar will return is set by the following formula: document_size - page_size.  Thus, a document of size 100 and a page size of 10 will have a value from 0 to 90.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== MultiLineEditbox ====&lt;br /&gt;
A MultiLineEditbox widget controls printable character values; letters, numbers, punctuations, and symbols.&lt;br /&gt;
&lt;br /&gt;
Unlike the Editbox widget there is no maximal number of characters that can be specified.  The value can be set to readable only (modifications by users are not allowed) via setReadOnly(true).  Text can be automatically wrapped via a call to setWordWrapping(true).&lt;br /&gt;
&lt;br /&gt;
The current value can be obtained via getText() and specified via setText().&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== RadioButton ====&lt;br /&gt;
A RadioButton widget controls a single selection among many choices.&lt;br /&gt;
&lt;br /&gt;
The choices are grouped by calling setGroupID().  Only one RadioButton per group ID can be selected; this widget does not support multiple selection.  However it is possible for a choice to possess no decision; initially every RadioButton of a group is unselected.&lt;br /&gt;
&lt;br /&gt;
The currently selected RadioButton can be obtained via getSelectedButtonInGroup().  This RadioButton pointer can then be used to query the ID via getID(), the text (visible label of the RadioButton) via getText(), or user data via getUserData().  A RadioButton can be selected via setSelected(true).  Passing false will deselect the RadioButton, potentially making every RadioButton of the group unselected.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Listbox ====&lt;br /&gt;
A Listbox widget controls either a single selection or multiple selections among many choices.  Multiple selections are enabled via setMultiselectEnabled().&lt;br /&gt;
&lt;br /&gt;
The choices are listbox text items (ListboxTextItem) added to the listbox via addItem().  These do not possess a selection indicator by default; one must be specified via setSelectionBrushImage().  The call to ensureItemIsVisible() ensures that the item is visible; the listbox will automatically scroll down if necessary.  The text of the ListboxTextItem can be changed via the setText() function.  However this new text will not be displayed until you call the Listbox's handleUpdatedItemData() function.&lt;br /&gt;
&lt;br /&gt;
The selected ListboxItem can be obtained via getFirstSelectedItem() and subsequent selections through getNextSelected().  A selection can be specified via setItemSelectState().&lt;br /&gt;
&lt;br /&gt;
It is possible for a Listbox to contain list items that are not simply composed of text.  [http://www.cegui.org.uk/wiki/index.php/Create_a_CheckListboxItem CheckListboxItem] demonstrates this advanced feature.  Another approach would be to simulate the behavior of a listbox such that each row is composed of various widgets.  [[PseudoListbox]] demonstrates this.&lt;br /&gt;
&lt;br /&gt;
==== Combobox ====&lt;br /&gt;
A Combobox widget controls a single selection among many choices.&lt;br /&gt;
&lt;br /&gt;
The choices are listbox text items (ListboxTextItem) added to the combobox via addItem().  These do not possess a selection indicator by default; one must be specified via setSelectionBrushImage().&lt;br /&gt;
&lt;br /&gt;
The value of the text within the Editbox can be obtained via getText() and the last selected ListboxItem can be obtained via getSelectedItem().  However there is no guarantee that both are synchronized; typing text within the Editbox will not automatically select the corresponding ListboxItem.  Fortunately the reverse is not true; selecting a ListboxItem will place that text within the Editbox.  Placing the Editbox in read-only mode with setReadOnly(true) can avoid problems.  The current value can be specified via listboxTextItem-&amp;gt;setSelected(true) and a setText(itemCombobox-&amp;gt;getText()).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== MultiColumnList ====&lt;br /&gt;
A MultiColumnList widget controls controls either a single selection or multiple selections among many choices.  Multiple selections are enabled via setSelectionMode(MultiColumnList::RowMultiple).&lt;br /&gt;
&lt;br /&gt;
A MultiColumnList widget may contain a single column or multiple columns.  Columns are added via addColumn(), specifying a label, a column ID, and a column width.&lt;br /&gt;
&lt;br /&gt;
Three steps are required to add a row.  The first step is to add a new row with addRow().  The second step is to create a ListboxTextItem for each cell of the row and specify the selection indicator via setSelectionBrushImage().  The third step is to add the newly created ListboxTextItem to the MultiColumnList via setItem(), specifying the ListboxTextItem, the column ID, and the row ID.&lt;br /&gt;
&lt;br /&gt;
The selected row can be obtained via getFirstSelectedItem() and subsequent selections through getNextSelected().  This will iterate through every selected cell, returning each selected ListboxTextItem .  A selection can be specified via setItemSelectState(); by setting the selection mode to rows (either RowSingle or RowMultiple) you actually only need to select the ListboxTextItem of the first column.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== TabControl ====&lt;br /&gt;
A TabControl widget allows multiple windows to be displayed one at a time, via tab buttons.&lt;br /&gt;
&lt;br /&gt;
Two objects must be created within the Layout Editor to generate a functional tab control.  The first is a window of type &amp;quot;TabControl&amp;quot;.  This will be the parent window of the tab buttons as well as the pages.  The second is a window of type &amp;quot;DefaultWindow&amp;quot;.  This window will be placed within the TabControl (in code via addTab(), not through the Layout Editor) and will specify the contents of a page.  Widgets are to be placed within these TabPane via the Layout Editor.  The &amp;quot;TabButton&amp;quot; windows are not to be specified via the Layout Editor since they will be automatically created when a TabPane is added to the TabControl.&lt;br /&gt;
&lt;br /&gt;
In this demo the TabControl widget was placed within a FrameWindow.  This is not a requirement.  It could have just easily been placed alongside the widgets of the other window.&lt;br /&gt;
&lt;br /&gt;
==== Menu &amp;amp; Popup Menu ====&lt;br /&gt;
&lt;br /&gt;
See [[http://www.cegui.org.uk/wiki/index.php/MenuAndPopup Menu &amp;amp; Popup Menu]]&lt;br /&gt;
&lt;br /&gt;
=== Files ===&lt;br /&gt;
&lt;br /&gt;
==== WidgetGalore.h ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
#ifndef _WidgetGalore_h_&lt;br /&gt;
#define _WidgetGalore_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;
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;WidgetGalore.layout&amp;quot;);&lt;br /&gt;
			sheet-&amp;gt;addChildWindow(guiLayout);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
			/* Tooltip */&lt;br /&gt;
			System::getSingleton().setDefaultTooltip(&amp;quot;TaharezLook/Tooltip&amp;quot;); // Set the name of the default tooltip&lt;br /&gt;
			Tooltip* tooltip = System::getSingleton().getDefaultTooltip();&lt;br /&gt;
			tooltip-&amp;gt;setHoverTime(0.5f); // Display the tooltip after the mouse has been hovering over the widget for half a second&lt;br /&gt;
			tooltip-&amp;gt;setDisplayTime(10.0f); // Display for 15 seconds then disappear&lt;br /&gt;
			tooltip-&amp;gt;setFadeTime(1.0f); // Duration of the transition between fully visible and fully invisible&lt;br /&gt;
			// To set the tooltip text for a window simply call setTooltipText()   see staticText for an example&lt;br /&gt;
&lt;br /&gt;
			/* StaticText */&lt;br /&gt;
			DefaultWindow* staticText = static_cast&amp;lt;DefaultWindow*&amp;gt;(winMgr.getWindow(&amp;quot;StaticText&amp;quot;));&lt;br /&gt;
			staticText-&amp;gt;setText(&amp;quot;Red Static Text&amp;quot;);&lt;br /&gt;
			// Colors are specified as aarrggbb in Hexadecimal&lt;br /&gt;
			// Where aa is alpha, rr is red, gg is green, and bb is blue &lt;br /&gt;
			// tl: top left,  tr: top right,  bl: bottom left,  br: bottom right&lt;br /&gt;
			staticText-&amp;gt;setProperty(&amp;quot;TextColours&amp;quot;, &amp;quot;tl:FFFF0000 tr:FFFF0000 bl:FFFF0000 br:FFFF0000&amp;quot;);&lt;br /&gt;
			staticText-&amp;gt;setProperty(&amp;quot;VertFormatting&amp;quot;, &amp;quot;VertCentred&amp;quot;); // TopAligned, BottomAligned, VertCentred&lt;br /&gt;
			staticText-&amp;gt;setProperty(&amp;quot;HorzFormatting&amp;quot;, &amp;quot;HorzCentred&amp;quot;); // LeftAligned, RightAligned, HorzCentred&lt;br /&gt;
				// HorzJustified, WordWrapLeftAligned, WordWrapRightAligned, WordWrapCentred, WordWrapJustified&lt;br /&gt;
			staticText-&amp;gt;setTooltipText(&amp;quot;This is a StaticText widget&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			/* StaticImage */&lt;br /&gt;
			ImagesetManager::getSingleton().createImagesetFromImageFile(&amp;quot;ImageForStaticImage&amp;quot;, &amp;quot;GPN-2000-001437.tga&amp;quot;);&lt;br /&gt;
			DefaultWindow* staticImage = static_cast&amp;lt;DefaultWindow*&amp;gt;(winMgr.getWindow(&amp;quot;StaticImage&amp;quot;));&lt;br /&gt;
			staticImage-&amp;gt;setProperty(&amp;quot;Image&amp;quot;, &amp;quot;set:ImageForStaticImage image:full_image&amp;quot;); // &amp;quot;full_image&amp;quot; is a default name from CEGUIImageset::Imageset()&lt;br /&gt;
&lt;br /&gt;
			/* ProgressBar */&lt;br /&gt;
			ProgressBar* progressBar = static_cast&amp;lt;ProgressBar*&amp;gt;(winMgr.getWindow(&amp;quot;ProgressBar&amp;quot;));&lt;br /&gt;
			progressBar-&amp;gt;setProgress(0.25f); // Initial progress of 25%&lt;br /&gt;
			progressBar-&amp;gt;setStepSize(0.10f); // Calling step() will increase the progress by 10%&lt;br /&gt;
			progressBar-&amp;gt;step(); // Advance the progress by the size specified in setStepSize()&lt;br /&gt;
			progressBar-&amp;gt;adjustProgress(-0.05f); // Adjust the progress by a delta value rather than setting a new value through setProgress&lt;br /&gt;
			float valueProgressBar = progressBar-&amp;gt;getProgress(); // initial 0.25f + step 0.10f - adjustment 0.05f = 0.30f&lt;br /&gt;
&lt;br /&gt;
			/* Button */&lt;br /&gt;
			PushButton* btnClose = static_cast&amp;lt;PushButton*&amp;gt;(winMgr.getWindow(&amp;quot;btnClose&amp;quot;));&lt;br /&gt;
			btnClose-&amp;gt;setText(&amp;quot;Exit&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			/* ScrollablePane */&lt;br /&gt;
			ScrollablePane* scrollablePane = static_cast&amp;lt;ScrollablePane*&amp;gt;(winMgr.getWindow(&amp;quot;ScrollablePane&amp;quot;));&lt;br /&gt;
			ImagesetManager::getSingleton().createImagesetFromImageFile(&amp;quot;ImageForScrollablePane&amp;quot;, &amp;quot;GPN-2000-001437.tga&amp;quot;);&lt;br /&gt;
			DefaultWindow* staticImageInScrollablePane = static_cast&amp;lt;DefaultWindow*&amp;gt;(winMgr.createWindow(&amp;quot;TaharezLook/StaticImage&amp;quot;, &amp;quot;StaticImageInScrollablePane&amp;quot;));&lt;br /&gt;
				staticImageInScrollablePane-&amp;gt;setProperty(&amp;quot;Image&amp;quot;, &amp;quot;set:ImageForScrollablePane image:full_image&amp;quot;); // &amp;quot;full_image&amp;quot; is a default name from CEGUIImageset::Imageset()&lt;br /&gt;
				staticImageInScrollablePane-&amp;gt;setPosition(UVector2(UDim(0.0f, 0.0f), UDim(0.0f, 0.0f))); // Start in the upper left corner&lt;br /&gt;
				staticImageInScrollablePane-&amp;gt;setWidth(UDim(2.0f, 0.0f)); // Twice the width of the parent, the ScrollablePane&lt;br /&gt;
				staticImageInScrollablePane-&amp;gt;setHeight(UDim(2.0f, 0.0f)); // Twice the height of the parent, the ScrollablePane&lt;br /&gt;
				scrollablePane-&amp;gt;addChildWindow(staticImageInScrollablePane); // Add the image to the // Twice the width of the parent, the ScrollablePane&lt;br /&gt;
			Editbox* editboxInScrollablePane = static_cast&amp;lt;Editbox*&amp;gt;(winMgr.createWindow(&amp;quot;TaharezLook/Editbox&amp;quot;, &amp;quot;EditboxInScrollablePane&amp;quot;));&lt;br /&gt;
				editboxInScrollablePane-&amp;gt;setPosition(UVector2(UDim(0.0f, 0.0f), UDim(2.1f, 0.0f))); // Start below the image&lt;br /&gt;
				editboxInScrollablePane-&amp;gt;setWidth(UDim(2.0f, 0.0f)); &lt;br /&gt;
				editboxInScrollablePane-&amp;gt;setHeight(UDim(0.3f, 0.0f));&lt;br /&gt;
				scrollablePane-&amp;gt;addChildWindow(editboxInScrollablePane);&lt;br /&gt;
&lt;br /&gt;
			/* Check box */&lt;br /&gt;
			Checkbox* checkbox = static_cast&amp;lt;Checkbox*&amp;gt;(winMgr.getWindow(&amp;quot;Checkbox&amp;quot;));&lt;br /&gt;
			checkbox-&amp;gt;setSelected( true );&lt;br /&gt;
			bool valueCheckbox = checkbox-&amp;gt;isSelected(); // Retrieve whether it is checked&lt;br /&gt;
&lt;br /&gt;
			/* 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;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.2f);&lt;br /&gt;
			spinner-&amp;gt;setCurrentValue(5.2f);&lt;br /&gt;
			float valueSpinner = spinner-&amp;gt;getCurrentValue(); // Retrieve the value&lt;br /&gt;
&lt;br /&gt;
			/* Editbox */&lt;br /&gt;
			Editbox* editbox = static_cast&amp;lt;Editbox*&amp;gt;(winMgr.getWindow(&amp;quot;Editbox&amp;quot;));&lt;br /&gt;
			editbox-&amp;gt;setText(&amp;quot;Editbox values&amp;quot;);&lt;br /&gt;
			editbox-&amp;gt;setMaxTextLength(13); // The trailing 's' will not be displayed&lt;br /&gt;
			editbox-&amp;gt;setReadOnly(false);&lt;br /&gt;
			editbox-&amp;gt;setTextMasked(false);&lt;br /&gt;
			editbox-&amp;gt;setMaskCodePoint(0x002A); // *&lt;br /&gt;
			String valueEditbox = editbox-&amp;gt;getText(); // Retrieve the text&lt;br /&gt;
&lt;br /&gt;
			/* Slider */&lt;br /&gt;
			Slider* slider = static_cast&amp;lt;Slider*&amp;gt;(winMgr.getWindow(&amp;quot;Slider&amp;quot;));&lt;br /&gt;
			slider-&amp;gt;setMaxValue(100.0f);&lt;br /&gt;
			slider-&amp;gt;setClickStep(10.0f);&lt;br /&gt;
			slider-&amp;gt;setCurrentValue(20.0f);&lt;br /&gt;
			float valueSlider = slider-&amp;gt;getCurrentValue(); // Retrieve the value&lt;br /&gt;
&lt;br /&gt;
			/* Scrollbar (Horizontal) */&lt;br /&gt;
			Scrollbar* scrollbarHorizontal = static_cast&amp;lt;Scrollbar*&amp;gt;(winMgr.getWindow(&amp;quot;HorizontalScrollbar&amp;quot;));&lt;br /&gt;
			scrollbarHorizontal-&amp;gt;setDocumentSize(100.0f);&lt;br /&gt;
			scrollbarHorizontal-&amp;gt;setPageSize(10.0f);&lt;br /&gt;
			scrollbarHorizontal-&amp;gt;setStepSize(1.0f);&lt;br /&gt;
			scrollbarHorizontal-&amp;gt;setScrollPosition(75.0f);&lt;br /&gt;
			float valueScrollbarHorizontal = scrollbarHorizontal-&amp;gt;getScrollPosition(); // Retrieve the scroll position&lt;br /&gt;
&lt;br /&gt;
			/* Scrollbar (Vertical) */&lt;br /&gt;
			Scrollbar* scrollbarVertical = static_cast&amp;lt;Scrollbar*&amp;gt;(winMgr.getWindow(&amp;quot;VerticalScrollbar&amp;quot;));&lt;br /&gt;
			scrollbarVertical-&amp;gt;setDocumentSize(100.0f);&lt;br /&gt;
			scrollbarVertical-&amp;gt;setPageSize(10.0f);&lt;br /&gt;
			scrollbarVertical-&amp;gt;setStepSize(1.0f);&lt;br /&gt;
			scrollbarVertical-&amp;gt;setScrollPosition(25.0f);&lt;br /&gt;
			float valueScrollbarVertical = scrollbarVertical-&amp;gt;getScrollPosition(); // Retrieve the scroll position&lt;br /&gt;
&lt;br /&gt;
			/* MultiLineEditbox */&lt;br /&gt;
			MultiLineEditbox* multiLineEditbox = static_cast&amp;lt;MultiLineEditbox*&amp;gt;(winMgr.getWindow(&amp;quot;MultiLineEditbox&amp;quot;));&lt;br /&gt;
			multiLineEditbox-&amp;gt;setText(&amp;quot;MultiLineEditbox value&amp;quot;);&lt;br /&gt;
			multiLineEditbox-&amp;gt;setReadOnly(false);&lt;br /&gt;
			multiLineEditbox-&amp;gt;setWordWrapping(true);&lt;br /&gt;
			String valueMultiLineEditbox = multiLineEditbox-&amp;gt;getText(); // Retrieve the text&lt;br /&gt;
&lt;br /&gt;
			/* RadioButton */&lt;br /&gt;
			RadioButton* radioButton = static_cast&amp;lt;RadioButton*&amp;gt;(winMgr.getWindow(&amp;quot;RadioButton_A&amp;quot;));&lt;br /&gt;
				radioButton-&amp;gt;setGroupID(1);&lt;br /&gt;
				radioButton-&amp;gt;setID(101);&lt;br /&gt;
				radioButton-&amp;gt;setSelected(true);&lt;br /&gt;
			radioButton = static_cast&amp;lt;RadioButton*&amp;gt;(winMgr.getWindow(&amp;quot;RadioButton_B&amp;quot;));&lt;br /&gt;
				radioButton-&amp;gt;setGroupID(1);&lt;br /&gt;
				radioButton-&amp;gt;setID(102);&lt;br /&gt;
			radioButton = static_cast&amp;lt;RadioButton*&amp;gt;(winMgr.getWindow(&amp;quot;RadioButton_C&amp;quot;));&lt;br /&gt;
				radioButton-&amp;gt;setGroupID(1);&lt;br /&gt;
				radioButton-&amp;gt;setID(103);&lt;br /&gt;
			radioButton = static_cast&amp;lt;RadioButton*&amp;gt;(winMgr.getWindow(&amp;quot;RadioButton_1&amp;quot;));&lt;br /&gt;
				radioButton-&amp;gt;setGroupID(2);&lt;br /&gt;
				radioButton-&amp;gt;setID(201);&lt;br /&gt;
				radioButton-&amp;gt;setSelected(true);&lt;br /&gt;
			radioButton = static_cast&amp;lt;RadioButton*&amp;gt;(winMgr.getWindow(&amp;quot;RadioButton_2&amp;quot;));&lt;br /&gt;
				radioButton-&amp;gt;setGroupID(2);&lt;br /&gt;
				radioButton-&amp;gt;setID(202);&lt;br /&gt;
			radioButton = static_cast&amp;lt;RadioButton*&amp;gt;(winMgr.getWindow(&amp;quot;RadioButton_3&amp;quot;));&lt;br /&gt;
				radioButton-&amp;gt;setGroupID(2);&lt;br /&gt;
				radioButton-&amp;gt;setID(203);&lt;br /&gt;
			radioButton = static_cast&amp;lt;RadioButton*&amp;gt;(winMgr.getWindow(&amp;quot;RadioButton_A&amp;quot;)); // Get handle of one radio button from the group&lt;br /&gt;
			uint valueRadioButtonLetters = radioButton-&amp;gt;getSelectedButtonInGroup()-&amp;gt;getID(); // Get selected ID&lt;br /&gt;
			radioButton = static_cast&amp;lt;RadioButton*&amp;gt;(winMgr.getWindow(&amp;quot;RadioButton_3&amp;quot;)); // Can obtain the handle of any radio button in the group&lt;br /&gt;
			uint valueRadioButtonNumbers = radioButton-&amp;gt;getSelectedButtonInGroup()-&amp;gt;getID();&lt;br /&gt;
			radioButton-&amp;gt;setSelected(true); // Specify which button should appear selected by default&lt;br /&gt;
&lt;br /&gt;
			/* Listbox */&lt;br /&gt;
			Listbox* listbox = static_cast&amp;lt;Listbox*&amp;gt;(winMgr.getWindow(&amp;quot;Listbox&amp;quot;));&lt;br /&gt;
			listbox-&amp;gt;setMultiselectEnabled(false);&lt;br /&gt;
			ListboxTextItem* itemListbox = new ListboxTextItem(&amp;quot;Value A&amp;quot;, 1);&lt;br /&gt;
				itemListbox-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
				listbox-&amp;gt;addItem(itemListbox);&lt;br /&gt;
			itemListbox = new ListboxTextItem(&amp;quot;Value B&amp;quot;, 2);&lt;br /&gt;
				itemListbox-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
				listbox-&amp;gt;addItem(itemListbox);&lt;br /&gt;
			itemListbox = new ListboxTextItem(&amp;quot;Value C&amp;quot;, 3);&lt;br /&gt;
				itemListbox-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
				listbox-&amp;gt;addItem(itemListbox);&lt;br /&gt;
			itemListbox = new ListboxTextItem(&amp;quot;Value D&amp;quot;, 4);&lt;br /&gt;
				itemListbox-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
				listbox-&amp;gt;addItem(itemListbox);&lt;br /&gt;
			listbox-&amp;gt;setItemSelectState(itemListbox, true);&lt;br /&gt;
			listbox-&amp;gt;ensureItemIsVisible(itemListbox);&lt;br /&gt;
			uint valueListbox = listbox-&amp;gt;getFirstSelectedItem()-&amp;gt;getID(); // Retrieve the ID of the selected listbox item&lt;br /&gt;
&lt;br /&gt;
			/* Combobox */&lt;br /&gt;
			Combobox* combobox = static_cast&amp;lt;Combobox*&amp;gt;(winMgr.getWindow(&amp;quot;Combobox&amp;quot;));&lt;br /&gt;
			combobox-&amp;gt;setReadOnly(true);&lt;br /&gt;
			ListboxTextItem* itemCombobox = new ListboxTextItem(&amp;quot;Value 1&amp;quot;, 1);&lt;br /&gt;
				itemCombobox-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
				combobox-&amp;gt;addItem(itemCombobox);&lt;br /&gt;
			itemCombobox = new ListboxTextItem(&amp;quot;Value 2&amp;quot;, 2);&lt;br /&gt;
				itemCombobox-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
				combobox-&amp;gt;addItem(itemCombobox);&lt;br /&gt;
				itemCombobox-&amp;gt;setSelected(true); // Select this item&lt;br /&gt;
				combobox-&amp;gt;setText(itemCombobox-&amp;gt;getText()); // Copy the item's text into the Editbox&lt;br /&gt;
			itemCombobox = new ListboxTextItem(&amp;quot;Value 3&amp;quot;, 3);&lt;br /&gt;
				itemCombobox-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
				combobox-&amp;gt;addItem(itemCombobox);&lt;br /&gt;
			itemCombobox = new ListboxTextItem(&amp;quot;Value 4&amp;quot;, 4);&lt;br /&gt;
				itemCombobox-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
				combobox-&amp;gt;addItem(itemCombobox);&lt;br /&gt;
			String valueCombobox = combobox-&amp;gt;getText(); // Retrieve the displayed text&lt;br /&gt;
			uint idCombobox = combobox-&amp;gt;getSelectedItem()-&amp;gt;getID(); // Retrieve the ID of the selected combobox item&lt;br /&gt;
&lt;br /&gt;
			/* MultiColumnList */&lt;br /&gt;
			MultiColumnList* multiColumnList = static_cast&amp;lt;MultiColumnList*&amp;gt;(winMgr.getWindow(&amp;quot;MultiColumnList&amp;quot;));\&lt;br /&gt;
			multiColumnList-&amp;gt;addColumn(&amp;quot;Col A&amp;quot;, 0, UDim(0.32f, 0));&lt;br /&gt;
			multiColumnList-&amp;gt;addColumn(&amp;quot;Col B&amp;quot;, 1, UDim(0.32f, 0));&lt;br /&gt;
			multiColumnList-&amp;gt;addColumn(&amp;quot;Col C&amp;quot;, 2, UDim(0.32f, 0));&lt;br /&gt;
			multiColumnList-&amp;gt;setSelectionMode(MultiColumnList::RowSingle); // MultiColumnList::RowMultiple&lt;br /&gt;
			ListboxTextItem* itemMultiColumnList;&lt;br /&gt;
			multiColumnList-&amp;gt;addRow();&lt;br /&gt;
			itemMultiColumnList = new ListboxTextItem(&amp;quot;A1&amp;quot;, 101);&lt;br /&gt;
				itemMultiColumnList-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
				multiColumnList-&amp;gt;setItem(itemMultiColumnList, 0, 0); // ColumnID, RowID&lt;br /&gt;
			itemMultiColumnList = new ListboxTextItem(&amp;quot;B1&amp;quot;, 102);&lt;br /&gt;
				//itemMultiColumnList-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
				// By commenting the line above a cell does not specify a selection indicator&lt;br /&gt;
				//  selecting that line will show a &amp;quot;gap&amp;quot; in the selection.&lt;br /&gt;
				multiColumnList-&amp;gt;setItem(itemMultiColumnList, 1, 0); // ColumnID, RowID&lt;br /&gt;
			itemMultiColumnList = new ListboxTextItem(&amp;quot;C1&amp;quot;, 103);&lt;br /&gt;
				itemMultiColumnList-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
				multiColumnList-&amp;gt;setItem(itemMultiColumnList, 2, 0); // ColumnID, RowID&lt;br /&gt;
			multiColumnList-&amp;gt;addRow();&lt;br /&gt;
			itemMultiColumnList = new ListboxTextItem(&amp;quot;A2&amp;quot;, 201);&lt;br /&gt;
				itemMultiColumnList-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
				multiColumnList-&amp;gt;setItem(itemMultiColumnList, 0, 1); // ColumnID, RowID&lt;br /&gt;
			itemMultiColumnList = new ListboxTextItem(&amp;quot;B2&amp;quot;, 202);&lt;br /&gt;
				itemMultiColumnList-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
				multiColumnList-&amp;gt;setItem(itemMultiColumnList, 1, 1); // ColumnID, RowID&lt;br /&gt;
			itemMultiColumnList = new ListboxTextItem(&amp;quot;C2&amp;quot;, 203);&lt;br /&gt;
				itemMultiColumnList-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
				multiColumnList-&amp;gt;setItem(itemMultiColumnList, 2, 1); // ColumnID, RowID&lt;br /&gt;
			MCLGridRef grid_ref(1, 0); // Select according to a grid reference; second row&lt;br /&gt;
			multiColumnList-&amp;gt;setItemSelectState(grid_ref, true);&lt;br /&gt;
			ListboxItem* listboxItem = multiColumnList-&amp;gt;getFirstSelectedItem();&lt;br /&gt;
			uint valueColumnA = listboxItem-&amp;gt;getID(); // Retrieve the value of the selected item from column A&lt;br /&gt;
			listboxItem = multiColumnList-&amp;gt;getNextSelected(listboxItem);&lt;br /&gt;
			uint valueColumnB = listboxItem-&amp;gt;getID(); // Retrieve the value of the selected item from column B&lt;br /&gt;
			listboxItem = multiColumnList-&amp;gt;getNextSelected(listboxItem);&lt;br /&gt;
			uint valueColumnC = listboxItem-&amp;gt;getID(); // Retrieve the value of the selected item from column C&lt;br /&gt;
&lt;br /&gt;
			/* TabControl */&lt;br /&gt;
			TabControl* winTabControl = static_cast&amp;lt;TabControl*&amp;gt;(winMgr.getWindow(&amp;quot;TabControl&amp;quot;));&lt;br /&gt;
			winTabControl-&amp;gt;setTabHeight(UDim(0.15f, 0.0f)); // Make the tab buttons a little bigger&lt;br /&gt;
			Window* tabPage = winMgr.getWindow(&amp;quot;TabPane1&amp;quot;);&lt;br /&gt;
				tabPage-&amp;gt;setText(&amp;quot;Page 1&amp;quot;);&lt;br /&gt;
				tabPage-&amp;gt;setSize(UVector2(UDim(1.0f, 0.0f), UDim(1.0f, 0.0f))); // Size to 100% of its parent, the TabControl&lt;br /&gt;
				tabPage-&amp;gt;setPosition(UVector2(UDim(0.0f, 0.0f), UDim(0.0f, 0.0f))); // Move to the upper left corner of its parent&lt;br /&gt;
				winTabControl-&amp;gt;addTab(tabPage);&lt;br /&gt;
			tabPage = winMgr.getWindow(&amp;quot;TabPane2&amp;quot;);&lt;br /&gt;
				tabPage-&amp;gt;setText(&amp;quot;Page 2&amp;quot;);&lt;br /&gt;
				tabPage-&amp;gt;setSize(UVector2(UDim(1.0f, 0.0f), UDim(1.0f, 0.0f))); &lt;br /&gt;
				tabPage-&amp;gt;setPosition(UVector2(UDim(0.0f, 0.0f), UDim(0.0f, 0.0f))); &lt;br /&gt;
				winTabControl-&amp;gt;addTab(tabPage);&lt;br /&gt;
&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;
	}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#endif // _WidgetGalore_h_&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== main.cpp ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&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;WidgetGalore.h&amp;quot;&lt;br /&gt;
&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;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== WidgetGalore.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;Text&amp;quot; &amp;gt;1&amp;lt;/Property&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;DefaultWindow&amp;quot; Name=&amp;quot;TabPane2&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.72875,0},{0.7185,0},{0.97875,0},{0.9685,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/StaticText&amp;quot; Name=&amp;quot;StaticTextPage2&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; &amp;gt;In Page 2:&amp;lt;/Property&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.06,0},{0.226667,0},{0.415,0},{0.476667,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;EditBoxPage2&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;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.420001,0},{0.22,0},{0.99,0},{0.47,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 Type=&amp;quot;TaharezLook/FrameWindow&amp;quot; Name=&amp;quot;winTabControl&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; &amp;gt;Tab Control Window&amp;lt;/Property&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.695627,0},{0.2725,0},{0.993122,0},{0.704167,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/TabControl&amp;quot; Name=&amp;quot;TabControl&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;TabHeight&amp;quot; Value=&amp;quot;{0,0}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;TabTextPadding&amp;quot; Value=&amp;quot;{0,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;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.088566,0},{0.174378,0},{0.931404,0},{0.804637,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;btnOk&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; &amp;gt;Ok&amp;lt;/Property&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.128412,0},{0.841464,0},{0.365583,0},{0.926003,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/Button&amp;quot; Name=&amp;quot;btnCancel&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; &amp;gt;Cancel&amp;lt;/Property&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.400429,0},{0.841464,0},{0.637601,0},{0.926003,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/Button&amp;quot; Name=&amp;quot;btnApply&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; &amp;gt;Apply&amp;lt;/Property&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.668224,0},{0.843977,0},{0.905394,0},{0.928516,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&amp;gt;&lt;br /&gt;
        &amp;lt;Window Type=&amp;quot;DefaultWindow&amp;quot; Name=&amp;quot;TabPane1&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;ClippedByParent&amp;quot; Value=&amp;quot;False&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.72875,0},{0.012178,0},{0.97875,0},{0.262178,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/StaticText&amp;quot; Name=&amp;quot;StaticTextPage1&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; &amp;gt;In Page 1:&amp;lt;/Property&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.06,0},{0.226667,0},{0.415,0},{0.476667,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;EditBoxPage1&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.420001,0},{0.22,0},{0.99,0},{0.47,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 Type=&amp;quot;TaharezLook/FrameWindow&amp;quot; Name=&amp;quot;winWidgets&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; &amp;gt;Dave, it&amp;amp;apos;s full of widgets!&amp;lt;/Property&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.00375,0},{0.143333,0},{0.751248,0},{0.806665,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/Button&amp;quot; Name=&amp;quot;btnClose&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; &amp;gt;Close&amp;lt;/Property&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.732397,0},{0.895137,0},{0.976465,0},{0.975697,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;Editbox&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;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.62442,0},{0.090471,0},{0.969776,0},{0.153443,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/Checkbox&amp;quot; Name=&amp;quot;Checkbox&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; &amp;gt;Check&amp;lt;/Property&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.845164,0},{0.396859,0},{0.944201,0},{0.453147,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;Combobox&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; &amp;gt;Combo Box&amp;lt;/Property&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.183835,0},{0.090471,0},{0.613522,0},{0.413287,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/RadioButton&amp;quot; Name=&amp;quot;RadioButton_A&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; &amp;gt;A&amp;lt;/Property&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.652856,0},{0.189876,0},{0.704964,0},{0.246164,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;RadioButton_B&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; &amp;gt;B&amp;lt;/Property&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.707569,0},{0.189876,0},{0.759678,0},{0.246164,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;RadioButton_C&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; &amp;gt;C&amp;lt;/Property&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.761542,0},{0.189876,0},{0.813651,0},{0.246164,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;RadioButton_1&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; &amp;gt;1&amp;lt;/Property&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.845164,0},{0.189876,0},{0.897272,0},{0.246164,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;RadioButton_2&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; &amp;gt;2&amp;lt;/Property&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.845164,0},{0.245152,0},{0.897272,0},{0.30144,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;RadioButton_3&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; &amp;gt;3&amp;lt;/Property&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.845164,0},{0.300429,0},{0.897272,0},{0.356717,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/HorizontalScrollbar&amp;quot; Name=&amp;quot;HorizontalScrollbar&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;PageSize&amp;quot; Value=&amp;quot;0&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;OverlapSize&amp;quot; Value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;DocumentSize&amp;quot; Value=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;ScrollPosition&amp;quot; Value=&amp;quot;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;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.183835,0},{0.185427,0},{0.613522,0},{0.26206,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/VerticalScrollbar&amp;quot; Name=&amp;quot;VerticalScrollbar&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;PageSize&amp;quot; Value=&amp;quot;0&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;OverlapSize&amp;quot; Value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;DocumentSize&amp;quot; Value=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;ScrollPosition&amp;quot; Value=&amp;quot;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;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.026087,0},{0.090471,0},{0.082106,0},{0.606802,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/Listbox&amp;quot; Name=&amp;quot;Listbox&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; &amp;gt;List Box&amp;lt;/Property&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.183835,0},{0.626634,0},{0.427903,0},{0.876634,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&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/MultiColumnList&amp;quot; Name=&amp;quot;MultiColumnList&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.183835,0},{0.271357,0},{0.816779,0},{0.551507,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&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/MultiLineEditbox&amp;quot; Name=&amp;quot;MultiLineEditbox&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; &amp;gt;            &lt;br /&gt;
&amp;lt;/Property&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.462498,0},{0.626634,0},{0.706566,0},{0.876634,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/ProgressBar&amp;quot; Name=&amp;quot;ProgressBar&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;StepSize&amp;quot; Value=&amp;quot;0.01&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;CurrentProgress&amp;quot; Value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.183835,0},{0.559296,0},{0.816779,0},{0.608291,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/Slider&amp;quot; Name=&amp;quot;Slider&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;CurrentValue&amp;quot; Value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;MaximumValue&amp;quot; Value=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;ClickStepSize&amp;quot; Value=&amp;quot;0.01&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.099415,0},{0.090471,0},{0.155434,0},{0.606802,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&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;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;0&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.845164,0},{0.48995,0},{0.944201,0},{0.551507,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/StaticImage&amp;quot; Name=&amp;quot;StaticImage&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.732397,0},{0.626634,0},{0.976465,0},{0.876634,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;StaticText&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; &amp;gt;Static Text&amp;lt;/Property&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.462498,0},{0.895137,0},{0.706566,0},{0.975697,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/ScrollablePane&amp;quot; Name=&amp;quot;ScrollablePane&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;ContentArea&amp;quot; Value=&amp;quot;l:0 t:0 r:0 b:0&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;HorzStepSize&amp;quot; Value=&amp;quot;0.1&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;VertStepSize&amp;quot; Value=&amp;quot;0.1&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;HorzOverlapSize&amp;quot; Value=&amp;quot;0.01&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.019063,0},{0.629399,0},{0.157023,0},{0.879399,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;VertOverlapSize&amp;quot; Value=&amp;quot;0.01&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;HorzScrollPosition&amp;quot; Value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;VertScrollPosition&amp;quot; Value=&amp;quot;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>Rackle</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=PseudoListbox&amp;diff=2868</id>
		<title>PseudoListbox</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=PseudoListbox&amp;diff=2868"/>
				<updated>2008-02-19T16:41:16Z</updated>
		
		<summary type="html">&lt;p&gt;Rackle: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This code emulates a multi-column listbox where each row is composed of different widgets.  Please post comments or questions on the message board thread for the [http://www.cegui.org.uk/phpBB2/viewtopic.php?p=13620 Pseudo-Listbox]&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
The .layout arranges three widgets in a row; a StaticText, an Editbox, and a Combobox.  This &amp;quot;row&amp;quot; is then copied to result in 5 &amp;quot;rows&amp;quot;.  These are not real Listbox rows but they will appear to be.  Next to these rows is a scrollbar, to navigate through the rows.&lt;br /&gt;
&lt;br /&gt;
Just like a real Listbox the pseudo-listbox displays a subset of the data; there could be 10 data items to display but only 5 rows on the screen.  This means that the scrollbar will be used to navigate through the data.&lt;br /&gt;
&lt;br /&gt;
The Scrollbar is configured within two functions.  The first is initRowCount() where the .layout is analyzed to figure out the number of rows contained within the pseudo-listbox.  The page size is specified as the number of rows such that if rows 0 to 4 are displayed scrolling to the next page would display rows 5 to 9, 10 to 14, etc.  &lt;br /&gt;
&lt;br /&gt;
The line size is is specified as 1, to ensure that when the scrollbar is moved it does so by a whole unit, a whole row.&lt;br /&gt;
&lt;br /&gt;
The number of rows could have been defined (hard-coded) in code.  However the benefits of the current approach is that a GUI designer could change the appearance of the pseudo-listbox (size and position of the widgets) or change the number of rows and the program would still function (as long as the contents of each row remains the same).&lt;br /&gt;
&lt;br /&gt;
The second Scrollbar configuration is within the initData() function, when the number of data item changes.  The document size is specified as the number (count) of data items.  This will let the Scrollbar properly move the contents by a line or by a page.&lt;br /&gt;
&lt;br /&gt;
=== Files ===&lt;br /&gt;
&lt;br /&gt;
==== PseudoListbox.h ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
#ifndef _PseudoListbox_h_&lt;br /&gt;
#define _PseudoListbox_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;
#include &amp;quot;CEGUIXMLAttributes.h&amp;quot;&lt;br /&gt;
#include &amp;quot;CEGUIDefaultResourceProvider.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;
			// Load a layout and set the GUI Sheet&lt;br /&gt;
			Window* guiLayout = winMgr.loadWindowLayout(&amp;quot;PseudoListbox.layout&amp;quot;);&lt;br /&gt;
			Window* sheet = winMgr.getWindow(&amp;quot;Root&amp;quot;);&lt;br /&gt;
			System::getSingleton().setGUISheet(sheet);&lt;br /&gt;
			sheet-&amp;gt;addChildWindow(guiLayout);&lt;br /&gt;
&lt;br /&gt;
			// Initialize the scrollbar events&lt;br /&gt;
			Scrollbar* scrollbar = static_cast&amp;lt;Scrollbar*&amp;gt;(winMgr.getWindow(&amp;quot;Root/PseudoList/Scrollbar&amp;quot;));&lt;br /&gt;
			scrollbar-&amp;gt;subscribeEvent(Scrollbar::EventScrollPositionChanged, Event::Subscriber(&amp;amp;DemoSample::Event_ScrollChange, this)); &lt;br /&gt;
&lt;br /&gt;
			// Initialize the apply event&lt;br /&gt;
			PushButton* apply = static_cast&amp;lt;PushButton*&amp;gt;(winMgr.getWindow(&amp;quot;Root/Config/Apply&amp;quot;));&lt;br /&gt;
			apply-&amp;gt;subscribeEvent(PushButton::EventClicked, Event::Subscriber(&amp;amp;DemoSample::Event_DataCountChange, this)); &lt;br /&gt;
&lt;br /&gt;
			// Figure out how many rows have been defined within the .layout&lt;br /&gt;
			// based on the specified prefix.&lt;br /&gt;
			initRowCount(&amp;quot;Root/PseudoList/LabelRow&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			// Initialize the data based on the value provided by the .layout&lt;br /&gt;
			// This code simulates a click on the apply button, which will then query&lt;br /&gt;
			// the value specified of the Editbox within the .layout&lt;br /&gt;
			CEGUI::EventArgs args;&lt;br /&gt;
			apply-&amp;gt;fireEvent(PushButton::EventClicked, args);&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;
	}&lt;br /&gt;
&lt;br /&gt;
	void initRowCount(const CEGUI::String&amp;amp; pPrefix)&lt;br /&gt;
	{&lt;br /&gt;
		// This function should only be called once, to initialize the &lt;br /&gt;
		// rows that compose our pseudo-list.&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
&lt;br /&gt;
		mRowCount = 0;&lt;br /&gt;
		while(winMgr.isWindowPresent(pPrefix + CEGUI::PropertyHelper::intToString(mRowCount)))&lt;br /&gt;
		{&lt;br /&gt;
			mRowCount++;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Configure the scrollbar&lt;br /&gt;
		Scrollbar* scrollbar = static_cast&amp;lt;Scrollbar*&amp;gt;(winMgr.getWindow(&amp;quot;Root/PseudoList/Scrollbar&amp;quot;));&lt;br /&gt;
		scrollbar-&amp;gt;setPageSize(static_cast&amp;lt;float&amp;gt;(mRowCount)); // Scroll the entire set of rows&lt;br /&gt;
		scrollbar-&amp;gt;setStepSize(1.0f); // Scroll one row at a time&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	void initData(const int&amp;amp; pDataCount)&lt;br /&gt;
	{&lt;br /&gt;
		// This function should be called everytime the number of data changes&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
		DataRow row;&lt;br /&gt;
		CEGUI::String rowId;&lt;br /&gt;
		mListData.clear();&lt;br /&gt;
		for(int data = 0; data &amp;lt; pDataCount; data++)&lt;br /&gt;
		{&lt;br /&gt;
			rowId = CEGUI::PropertyHelper::intToString(data);&lt;br /&gt;
			row.label  = &amp;quot;Label #&amp;quot;  + rowId;&lt;br /&gt;
			row.text   = &amp;quot;Text #&amp;quot;   + rowId;&lt;br /&gt;
			row.choice = &amp;quot;Choice #&amp;quot; + rowId;&lt;br /&gt;
			mListData.push_back(row);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Configure the scrollbar&lt;br /&gt;
		Scrollbar* scrollbar = static_cast&amp;lt;Scrollbar*&amp;gt;(winMgr.getWindow(&amp;quot;Root/PseudoList/Scrollbar&amp;quot;));&lt;br /&gt;
		scrollbar-&amp;gt;setDocumentSize(static_cast&amp;lt;float&amp;gt;(mListData.size())); // Specify the total number of rows&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	void showData(const int&amp;amp; pOffset)&lt;br /&gt;
	{&lt;br /&gt;
		// This function updates the contents of the displayed rows.&lt;br /&gt;
		// The &amp;quot;trick&amp;quot; is that the scrollbar offset determines the&lt;br /&gt;
		// first data being displayed.&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		DefaultWindow* label;&lt;br /&gt;
		Editbox* text;&lt;br /&gt;
		Combobox* choice;&lt;br /&gt;
		String rowId;&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
&lt;br /&gt;
		DataRow row;&lt;br /&gt;
		for(int rowIndex = 0; rowIndex &amp;lt; mRowCount; rowIndex++)&lt;br /&gt;
		{&lt;br /&gt;
			if(rowIndex &amp;lt; static_cast&amp;lt;int&amp;gt;(mListData.size()))&lt;br /&gt;
			{&lt;br /&gt;
				// Display the offsetted data&lt;br /&gt;
				row = mListData[rowIndex + pOffset];&lt;br /&gt;
			}&lt;br /&gt;
			else&lt;br /&gt;
			{&lt;br /&gt;
				// There is less data than can be displayed&lt;br /&gt;
				// Could disable or hide some of the row widgets and hide the scrollbar.&lt;br /&gt;
				row.label  = &amp;quot;&amp;quot;;&lt;br /&gt;
				row.text   = &amp;quot;&amp;quot;;&lt;br /&gt;
				row.choice = &amp;quot;&amp;quot;;&lt;br /&gt;
			}&lt;br /&gt;
			rowId  = CEGUI::PropertyHelper::intToString(rowIndex);&lt;br /&gt;
			label  = static_cast&amp;lt;DefaultWindow*&amp;gt;(winMgr.getWindow(&amp;quot;Root/PseudoList/LabelRow&amp;quot; + rowId));&lt;br /&gt;
			label-&amp;gt;setText(row.label);&lt;br /&gt;
&lt;br /&gt;
			text   = static_cast&amp;lt;Editbox*&amp;gt;(winMgr.getWindow(&amp;quot;Root/PseudoList/TextRow&amp;quot; + rowId));&lt;br /&gt;
			text-&amp;gt;setText(row.text);&lt;br /&gt;
&lt;br /&gt;
			choice = static_cast&amp;lt;Combobox*&amp;gt;(winMgr.getWindow(&amp;quot;Root/PseudoList/ChoiceRow&amp;quot; + rowId));&lt;br /&gt;
			choice-&amp;gt;setText(row.text);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool Event_ScrollChange(const CEGUI::EventArgs&amp;amp; args)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
		Scrollbar* scrollbar = static_cast&amp;lt;Scrollbar*&amp;gt;(winMgr.getWindow(&amp;quot;Root/PseudoList/Scrollbar&amp;quot;));&lt;br /&gt;
		int scrollOffset = static_cast&amp;lt;int&amp;gt;(scrollbar-&amp;gt;getScrollPosition());&lt;br /&gt;
		showData(scrollOffset);&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool Event_DataCountChange(const CEGUI::EventArgs&amp;amp; args)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
		Editbox* dataRows = static_cast&amp;lt;Editbox*&amp;gt;(winMgr.getWindow(&amp;quot;Root/Config/DataRows&amp;quot;));&lt;br /&gt;
		int dataCount = PropertyHelper::stringToInt(dataRows-&amp;gt;getText());&lt;br /&gt;
		initData(dataCount);&lt;br /&gt;
&lt;br /&gt;
		Scrollbar* scrollbar = static_cast&amp;lt;Scrollbar*&amp;gt;(winMgr.getWindow(&amp;quot;Root/PseudoList/Scrollbar&amp;quot;));&lt;br /&gt;
		EventArgs scrollArgs;&lt;br /&gt;
		scrollbar-&amp;gt;fireEvent(Scrollbar::EventScrollPositionChanged, scrollArgs);&lt;br /&gt;
&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
	// The number of rows defined within the .layout&lt;br /&gt;
	int mRowCount;&lt;br /&gt;
&lt;br /&gt;
	struct DataRow&lt;br /&gt;
	{&lt;br /&gt;
		CEGUI::String label;&lt;br /&gt;
		CEGUI::String text;&lt;br /&gt;
		CEGUI::String choice;&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	typedef std::vector&amp;lt;DataRow&amp;gt; DataList;&lt;br /&gt;
	DataList mListData;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#endif // _PseudoListbox_h_&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== PseudoListbox.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;DefaultWindow&amp;quot; Name=&amp;quot;Root/PseudoList&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.01,0},{0.01,0},{0.5,0},{0.391667,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/VerticalScrollbar&amp;quot; Name=&amp;quot;Root/PseudoList/Scrollbar&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;PageSize&amp;quot; Value=&amp;quot;0&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;OverlapSize&amp;quot; Value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;DocumentSize&amp;quot; Value=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;ScrollPosition&amp;quot; Value=&amp;quot;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;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.95,0},{0.01,0},{0.99,0},{0.99,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;Root/PseudoList/LabelRow0&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.01,0},{0.01,0},{0.25,0},{0.2,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;Root/PseudoList/TextRow0&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.26,0},{0.01,0},{0.5,0},{0.2,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;Root/PseudoList/ChoiceRow0&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.51,0},{0.01,0},{0.9,0},{0.2,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;Root/PseudoList/LabelRow1&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.01,0},{0.21,0},{0.25,0},{0.4,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;Root/PseudoList/TextRow1&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;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.26,0},{0.21,0},{0.5,0},{0.4,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;Root/PseudoList/ChoiceRow1&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.51,0},{0.21,0},{0.9,0},{0.4,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;Root/PseudoList/LabelRow2&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.01,0},{0.41,0},{0.25,0},{0.6,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;Root/PseudoList/TextRow2&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;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.26,0},{0.41,0},{0.5,0},{0.6,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;Root/PseudoList/ChoiceRow2&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.51,0},{0.41,0},{0.9,0},{0.6,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;Root/PseudoList/LabelRow3&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.01,0},{0.61,0},{0.25,0},{0.8,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;Root/PseudoList/TextRow3&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;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.26,0},{0.61,0},{0.5,0},{0.8,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;Root/PseudoList/ChoiceRow3&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.51,0},{0.61,0},{0.9,0},{0.8,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;Root/PseudoList/LabelRow4&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.01,0},{0.81,0},{0.25,0},{0.99,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;Root/PseudoList/TextRow4&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;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.26,0},{0.81,0},{0.5,0},{1,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;Root/PseudoList/ChoiceRow4&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.51,0},{0.81,0},{0.9,0},{1,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&amp;gt;&lt;br /&gt;
        &amp;lt;Window Type=&amp;quot;TaharezLook/FrameWindow&amp;quot; Name=&amp;quot;Root/Config&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Configuration&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;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.6,0},{0.01,0},{0.9,0},{0.3,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/StaticText&amp;quot; Name=&amp;quot;Root/Config/Label&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Data rows:&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;HorzFormatting&amp;quot; Value=&amp;quot;RightAligned&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.03,0},{0.3,0},{0.4,0},{0.5,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;Root/Config/DataRows&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;10&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.4,0},{0.3,0},{0.95,0},{0.5,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;Root/Config/Apply&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.6,0},{0.7,0},{0.95,0},{0.9,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;br /&gt;
&lt;br /&gt;
==== main.cpp ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&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;PseudoListbox.h&amp;quot;&lt;br /&gt;
&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;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rackle</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=Template:CEGUIWikiWhatsNew&amp;diff=2866</id>
		<title>Template:CEGUIWikiWhatsNew</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=Template:CEGUIWikiWhatsNew&amp;diff=2866"/>
				<updated>2008-02-19T16:04:43Z</updated>
		
		<summary type="html">&lt;p&gt;Rackle: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Section|1=The last 5 additions to the wiki ([http://www.cegui.org.uk/wiki/index.php?title=Template:CEGUIWikiWhatsNew&amp;amp;action=edit edit])|2=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- In descending order (newest first, oldest last) --&amp;gt;&lt;br /&gt;
* Code Snippets: [[PseudoListbox]] : Implement a multi-column listbox with any widgets&lt;br /&gt;
* Articles: [[All About RenderTargets]] : Info about CEGUI's RenderTarget development.&lt;br /&gt;
* Code Snippets: [[DynamicFont]] : Dynamically create fonts&lt;br /&gt;
* Articles: [[Introduction To Auto Windows]] : &amp;quot;Auto Windows&amp;quot; article by CrazyEddie&lt;br /&gt;
* Code Snippets: [[MovingAnyWindow]] : How to move any window, not just FrameWindow&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
''To all wiki author, please edit this section when you add a new page to the wiki.''&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Rackle</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=Template:CEGUIWikiWhatsNew&amp;diff=2865</id>
		<title>Template:CEGUIWikiWhatsNew</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=Template:CEGUIWikiWhatsNew&amp;diff=2865"/>
				<updated>2008-02-19T15:57:20Z</updated>
		
		<summary type="html">&lt;p&gt;Rackle: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Section|1=The last 5 additions to the wiki ([http://www.cegui.org.uk/wiki/index.php?title=Template:CEGUIWikiWhatsNew&amp;amp;action=edit edit])|2=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- In descending order (newest first, oldest last) --&amp;gt;&lt;br /&gt;
* Code Snippets: [[PseudoList]] : Implement a multi-column listbox with any widgets&lt;br /&gt;
* Articles: [[All About RenderTargets]] : Info about CEGUI's RenderTarget development.&lt;br /&gt;
* Code Snippets: [[DynamicFont]] : Dynamically create fonts&lt;br /&gt;
* Articles: [[Introduction To Auto Windows]] : &amp;quot;Auto Windows&amp;quot; article by CrazyEddie&lt;br /&gt;
* Code Snippets: [[MovingAnyWindow]] : How to move any window, not just FrameWindow&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
''To all wiki author, please edit this section when you add a new page to the wiki.''&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Rackle</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=Sample_code_for_all_Widgets&amp;diff=2854</id>
		<title>Sample code for all Widgets</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=Sample_code_for_all_Widgets&amp;diff=2854"/>
				<updated>2008-02-12T20:10:08Z</updated>
		
		<summary type="html">&lt;p&gt;Rackle: /* WidgetGalore.h */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This code goes through every widget and demonstrates how to retrieve and set their data as well as some of their particularities.  Please post comments or questions on the message board thread for the [http://www.cegui.org.uk/phpBB2/viewtopic.php?p=7967#7967 Widget Galore]&lt;br /&gt;
&lt;br /&gt;
=== Widgets===&lt;br /&gt;
&lt;br /&gt;
==== General ====&lt;br /&gt;
A widget can be enabled/disabled via setEnabled().  Disabling a widget prevents the user from activating it and manipulating its contents.  A widget can be hidden/shown via setVisible().&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Tooltip ====&lt;br /&gt;
A Tooltip widget displays text when the mouse has been hovering over a widget for a certain amount of time.  This widget requires that time be injected within CEGUI via injectTimePulse().&lt;br /&gt;
&lt;br /&gt;
The graphical aspect (the scheme) of the tooltip can be specified via setTooltip().  The amount of hovering time required to activate the tooltip can be specified via setHoverTime().  The amount of time the tooltip is displayed can be specified via setDisplayTime().  And the fade transition time can be specified via setFadeTime(); this affects both the fade in and the fade out times.  The tooltip text of a widget can be specified via setTooltipText().  Please note that some complex widgets are composed of several widgets.  In order to have a tooltip text displayed while hovering over any region of the complex widget then every component widget needs to have a tooltip text specified.  For example a Spinner widget is composed of an Editbox widget and two Button widgets. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== StaticText ====&lt;br /&gt;
There is no StaticText within Cegui but type of widget can be obtained via the DefaultWindow class.&lt;br /&gt;
&lt;br /&gt;
The currently displayed text can be specified via setText().  The color of this text can be specified via the &amp;quot;TextColours&amp;quot; property.  The value of this property contains 4 color definitions: top left, top right, bottom left, and bottom right.  Each color is specified as a two-digit hexadecimal value of the format AARRGGBB (alpha, red, green, blue).  The text is aligned vertically via the &amp;quot;VertFormatting&amp;quot; property with a value of TopAligned, BottomAligned, or VertCentred.  The text is aligned horizontally via the &amp;quot;HorzFormatting&amp;quot; property with a value of LeftAligned, RightAligned, HorzCentred, HorzJustified, WordWrapLeftAligned, WordWrapRightAligned, WordWrapCentred, or WordWrapJustified.&lt;br /&gt;
&lt;br /&gt;
==== StaticImage ====&lt;br /&gt;
There is no StaticImage within Cegui but type of widget can be obtained via the DefaultWindow class.&lt;br /&gt;
&lt;br /&gt;
The currently displayed image can be specified via the &amp;quot;Image&amp;quot; property.  This property takes two parameters, the imageset (&amp;quot;set&amp;quot;) and the image name (&amp;quot;image&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
==== ProgressBar ====&lt;br /&gt;
A ProgressBar widget displays a progression; it does not receive inputs from a user.&lt;br /&gt;
&lt;br /&gt;
The current progress can be specified via setProgress().  Progress can be advanced through steps.  The step size can be specified via setStepSize() and a step performed via step().  Progress can be adjusted by a delta value via adjustProgress().  The current progress value can be obtained via getProgress().&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Button ====&lt;br /&gt;
A Button widget displays a text and receives an activation instruction from the user.&lt;br /&gt;
&lt;br /&gt;
The text can be specified via setText().&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== ScrollablePane ====&lt;br /&gt;
A ScrollablePane widget displays contents that can be scrolled.  Contents can be added via addChildWindow().  When that content exceeds the dimensions of the ScrollablePane then scrollbars appear to allow the use to view and interact with that hidden content.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Checkbox ====&lt;br /&gt;
A Checkbox widget controls a boolean value; true when checked and false when unchecked.  This value can be obtained via isSelected() and specified via setSelected(true) to check or setSelected(false) to uncheck.&lt;br /&gt;
&lt;br /&gt;
==== Spinner ====&lt;br /&gt;
A Spinner widget controls a numerical values (float) through an editbox or the use of the increment or decrement buttons.&lt;br /&gt;
&lt;br /&gt;
This value is bounded within a minimum and a maximum by calling setMinimumValue() and setMaximumValue().  The arrow buttons increment or decrement the value by the amount specified with setStepSize().  The numerical value can be displayed in four formats:  FloatingPoint, Integer, Hexadecimal, Octal.  &lt;br /&gt;
&lt;br /&gt;
The current value is obtained via getCurrentValue() and specified via setCurrentValue().&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Editbox ====&lt;br /&gt;
An Editbox widget controls printable character values; letters, numbers, punctuations, and symbols.  &lt;br /&gt;
&lt;br /&gt;
The maximal number of characters that can be specified is bound by setMaxTextLength().  The value can be set to readable only (modifications by users are not allowed) via setReadOnly(true).  The value can be masked via setTextMasked() and the default value of * can be modified via setMaskCodePoint().&lt;br /&gt;
&lt;br /&gt;
The current value can be obtained via getText() and specified via setText().&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Slider ====&lt;br /&gt;
A Slider widget controls a numerical value (float) through the position of a &amp;quot;thumb&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This value is bounded within a maximum by setMaxValue(); the minimum value is set to 0.0f.  The thumb can be dragged to the desired position or moved by clicking on either side of the thumb.  The increment or decrement value is set by setClickStep().&lt;br /&gt;
&lt;br /&gt;
The current value can be obtained via getCurrentValue() and specified via setCurrentValue().&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Scrollbar ====&lt;br /&gt;
A Scrollbar widget controls a numerical value (float) through the position of a &amp;quot;thumb&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This value is bounded within a maximum by setDocumentSize(); the minimum value is set to 0.0f.  The thumb can be dragged to the desired position or moved by clicking on either side of the thumb.  The increment or decrement value is set by setPageSize().  The arrow buttons increment or decrement the value by the amount specified with setStepSize().&lt;br /&gt;
&lt;br /&gt;
The current value can be obtained via getScrollPosition() and specified via setScrollPosition().  Note that the actual maximum value that the scrollbar will return is set by the following formula: document_size - page_size.  Thus, a document of size 100 and a page size of 10 will have a value from 0 to 90.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== MultiLineEditbox ====&lt;br /&gt;
A MultiLineEditbox widget controls printable character values; letters, numbers, punctuations, and symbols.&lt;br /&gt;
&lt;br /&gt;
Unlike the Editbox widget there is no maximal number of characters that can be specified.  The value can be set to readable only (modifications by users are not allowed) via setReadOnly(true).  Text can be automatically wrapped via a call to setWordWrapping(true).&lt;br /&gt;
&lt;br /&gt;
The current value can be obtained via getText() and specified via setText().&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== RadioButton ====&lt;br /&gt;
A RadioButton widget controls a single selection among many choices.&lt;br /&gt;
&lt;br /&gt;
The choices are grouped by calling setGroupID().  Only one RadioButton per group ID can be selected; this widget does not support multiple selection.  However it is possible for a choice to possess no decision; initially every RadioButton of a group is unselected.&lt;br /&gt;
&lt;br /&gt;
The currently selected RadioButton can be obtained via getSelectedButtonInGroup().  This RadioButton pointer can then be used to query the ID via getID(), the text (visible label of the RadioButton) via getText(), or user data via getUserData().  A RadioButton can be selected via setSelected(true).  Passing false will deselect the RadioButton, potentially making every RadioButton of the group unselected.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Listbox ====&lt;br /&gt;
A Listbox widget controls either a single selection or multiple selections among many choices.  Multiple selections are enabled via setMultiselectEnabled().&lt;br /&gt;
&lt;br /&gt;
The choices are listbox text items (ListboxTextItem) added to the listbox via addItem().  These do not possess a selection indicator by default; one must be specified via setSelectionBrushImage().  The call to ensureItemIsVisible() ensures that the item is visible; the listbox will automatically scroll down if necessary.  The text of the ListboxTextItem can be changed via the setText() function.  However this new text will not be displayed until you call the Listbox's handleUpdatedItemData() function.&lt;br /&gt;
&lt;br /&gt;
The selected ListboxItem can be obtained via getFirstSelectedItem() and subsequent selections through getNextSelected().  A selection can be specified via setItemSelectState().&lt;br /&gt;
&lt;br /&gt;
It is possible for a Listbox to contain list items that are not simply composed of text.  [http://www.cegui.org.uk/wiki/index.php/Create_a_CheckListboxItem CheckListboxItem] demonstrates this advanced feature.&lt;br /&gt;
&lt;br /&gt;
==== Combobox ====&lt;br /&gt;
A Combobox widget controls a single selection among many choices.&lt;br /&gt;
&lt;br /&gt;
The choices are listbox text items (ListboxTextItem) added to the combobox via addItem().  These do not possess a selection indicator by default; one must be specified via setSelectionBrushImage().&lt;br /&gt;
&lt;br /&gt;
The value of the text within the Editbox can be obtained via getText() and the last selected ListboxItem can be obtained via getSelectedItem().  However there is no guarantee that both are synchronized; typing text within the Editbox will not automatically select the corresponding ListboxItem.  Fortunately the reverse is not true; selecting a ListboxItem will place that text within the Editbox.  Placing the Editbox in read-only mode with setReadOnly(true) can avoid problems.  The current value can be specified via listboxTextItem-&amp;gt;setSelected(true) and a setText(itemCombobox-&amp;gt;getText()).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== MultiColumnList ====&lt;br /&gt;
A MultiColumnList widget controls controls either a single selection or multiple selections among many choices.  Multiple selections are enabled via setSelectionMode(MultiColumnList::RowMultiple).&lt;br /&gt;
&lt;br /&gt;
A MultiColumnList widget may contain a single column or multiple columns.  Columns are added via addColumn(), specifying a label, a column ID, and a column width.&lt;br /&gt;
&lt;br /&gt;
Three steps are required to add a row.  The first step is to add a new row with addRow().  The second step is to create a ListboxTextItem for each cell of the row and specify the selection indicator via setSelectionBrushImage().  The third step is to add the newly created ListboxTextItem to the MultiColumnList via setItem(), specifying the ListboxTextItem, the column ID, and the row ID.&lt;br /&gt;
&lt;br /&gt;
The selected row can be obtained via getFirstSelectedItem() and subsequent selections through getNextSelected().  This will iterate through every selected cell, returning each selected ListboxTextItem .  A selection can be specified via setItemSelectState(); by setting the selection mode to rows (either RowSingle or RowMultiple) you actually only need to select the ListboxTextItem of the first column.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== TabControl ====&lt;br /&gt;
A TabControl widget allows multiple windows to be displayed one at a time, via tab buttons.&lt;br /&gt;
&lt;br /&gt;
Two objects must be created within the Layout Editor to generate a functional tab control.  The first is a window of type &amp;quot;TabControl&amp;quot;.  This will be the parent window of the tab buttons as well as the pages.  The second is a window of type &amp;quot;DefaultWindow&amp;quot;.  This window will be placed within the TabControl (in code via addTab(), not through the Layout Editor) and will specify the contents of a page.  Widgets are to be placed within these TabPane via the Layout Editor.  The &amp;quot;TabButton&amp;quot; windows are not to be specified via the Layout Editor since they will be automatically created when a TabPane is added to the TabControl.&lt;br /&gt;
&lt;br /&gt;
In this demo the TabControl widget was placed within a FrameWindow.  This is not a requirement.  It could have just easily been placed alongside the widgets of the other window.&lt;br /&gt;
&lt;br /&gt;
==== Menu &amp;amp; Popup Menu ====&lt;br /&gt;
&lt;br /&gt;
See [[http://www.cegui.org.uk/wiki/index.php/MenuAndPopup Menu &amp;amp; Popup Menu]]&lt;br /&gt;
&lt;br /&gt;
=== Files ===&lt;br /&gt;
&lt;br /&gt;
==== WidgetGalore.h ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
#ifndef _WidgetGalore_h_&lt;br /&gt;
#define _WidgetGalore_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;
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;WidgetGalore.layout&amp;quot;);&lt;br /&gt;
			sheet-&amp;gt;addChildWindow(guiLayout);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
			/* Tooltip */&lt;br /&gt;
			System::getSingleton().setDefaultTooltip(&amp;quot;TaharezLook/Tooltip&amp;quot;); // Set the name of the default tooltip&lt;br /&gt;
			Tooltip* tooltip = System::getSingleton().getDefaultTooltip();&lt;br /&gt;
			tooltip-&amp;gt;setHoverTime(0.5f); // Display the tooltip after the mouse has been hovering over the widget for half a second&lt;br /&gt;
			tooltip-&amp;gt;setDisplayTime(10.0f); // Display for 15 seconds then disappear&lt;br /&gt;
			tooltip-&amp;gt;setFadeTime(1.0f); // Duration of the transition between fully visible and fully invisible&lt;br /&gt;
			// To set the tooltip text for a window simply call setTooltipText()   see staticText for an example&lt;br /&gt;
&lt;br /&gt;
			/* StaticText */&lt;br /&gt;
			DefaultWindow* staticText = static_cast&amp;lt;DefaultWindow*&amp;gt;(winMgr.getWindow(&amp;quot;StaticText&amp;quot;));&lt;br /&gt;
			staticText-&amp;gt;setText(&amp;quot;Red Static Text&amp;quot;);&lt;br /&gt;
			// Colors are specified as aarrggbb in Hexadecimal&lt;br /&gt;
			// Where aa is alpha, rr is red, gg is green, and bb is blue &lt;br /&gt;
			// tl: top left,  tr: top right,  bl: bottom left,  br: bottom right&lt;br /&gt;
			staticText-&amp;gt;setProperty(&amp;quot;TextColours&amp;quot;, &amp;quot;tl:FFFF0000 tr:FFFF0000 bl:FFFF0000 br:FFFF0000&amp;quot;);&lt;br /&gt;
			staticText-&amp;gt;setProperty(&amp;quot;VertFormatting&amp;quot;, &amp;quot;VertCentred&amp;quot;); // TopAligned, BottomAligned, VertCentred&lt;br /&gt;
			staticText-&amp;gt;setProperty(&amp;quot;HorzFormatting&amp;quot;, &amp;quot;HorzCentred&amp;quot;); // LeftAligned, RightAligned, HorzCentred&lt;br /&gt;
				// HorzJustified, WordWrapLeftAligned, WordWrapRightAligned, WordWrapCentred, WordWrapJustified&lt;br /&gt;
			staticText-&amp;gt;setTooltipText(&amp;quot;This is a StaticText widget&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			/* StaticImage */&lt;br /&gt;
			ImagesetManager::getSingleton().createImagesetFromImageFile(&amp;quot;ImageForStaticImage&amp;quot;, &amp;quot;GPN-2000-001437.tga&amp;quot;);&lt;br /&gt;
			DefaultWindow* staticImage = static_cast&amp;lt;DefaultWindow*&amp;gt;(winMgr.getWindow(&amp;quot;StaticImage&amp;quot;));&lt;br /&gt;
			staticImage-&amp;gt;setProperty(&amp;quot;Image&amp;quot;, &amp;quot;set:ImageForStaticImage image:full_image&amp;quot;); // &amp;quot;full_image&amp;quot; is a default name from CEGUIImageset::Imageset()&lt;br /&gt;
&lt;br /&gt;
			/* ProgressBar */&lt;br /&gt;
			ProgressBar* progressBar = static_cast&amp;lt;ProgressBar*&amp;gt;(winMgr.getWindow(&amp;quot;ProgressBar&amp;quot;));&lt;br /&gt;
			progressBar-&amp;gt;setProgress(0.25f); // Initial progress of 25%&lt;br /&gt;
			progressBar-&amp;gt;setStepSize(0.10f); // Calling step() will increase the progress by 10%&lt;br /&gt;
			progressBar-&amp;gt;step(); // Advance the progress by the size specified in setStepSize()&lt;br /&gt;
			progressBar-&amp;gt;adjustProgress(-0.05f); // Adjust the progress by a delta value rather than setting a new value through setProgress&lt;br /&gt;
			float valueProgressBar = progressBar-&amp;gt;getProgress(); // initial 0.25f + step 0.10f - adjustment 0.05f = 0.30f&lt;br /&gt;
&lt;br /&gt;
			/* Button */&lt;br /&gt;
			PushButton* btnClose = static_cast&amp;lt;PushButton*&amp;gt;(winMgr.getWindow(&amp;quot;btnClose&amp;quot;));&lt;br /&gt;
			btnClose-&amp;gt;setText(&amp;quot;Exit&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			/* ScrollablePane */&lt;br /&gt;
			ScrollablePane* scrollablePane = static_cast&amp;lt;ScrollablePane*&amp;gt;(winMgr.getWindow(&amp;quot;ScrollablePane&amp;quot;));&lt;br /&gt;
			ImagesetManager::getSingleton().createImagesetFromImageFile(&amp;quot;ImageForScrollablePane&amp;quot;, &amp;quot;GPN-2000-001437.tga&amp;quot;);&lt;br /&gt;
			DefaultWindow* staticImageInScrollablePane = static_cast&amp;lt;DefaultWindow*&amp;gt;(winMgr.createWindow(&amp;quot;TaharezLook/StaticImage&amp;quot;, &amp;quot;StaticImageInScrollablePane&amp;quot;));&lt;br /&gt;
				staticImageInScrollablePane-&amp;gt;setProperty(&amp;quot;Image&amp;quot;, &amp;quot;set:ImageForScrollablePane image:full_image&amp;quot;); // &amp;quot;full_image&amp;quot; is a default name from CEGUIImageset::Imageset()&lt;br /&gt;
				staticImageInScrollablePane-&amp;gt;setPosition(UVector2(UDim(0.0f, 0.0f), UDim(0.0f, 0.0f))); // Start in the upper left corner&lt;br /&gt;
				staticImageInScrollablePane-&amp;gt;setWidth(UDim(2.0f, 0.0f)); // Twice the width of the parent, the ScrollablePane&lt;br /&gt;
				staticImageInScrollablePane-&amp;gt;setHeight(UDim(2.0f, 0.0f)); // Twice the height of the parent, the ScrollablePane&lt;br /&gt;
				scrollablePane-&amp;gt;addChildWindow(staticImageInScrollablePane); // Add the image to the // Twice the width of the parent, the ScrollablePane&lt;br /&gt;
			Editbox* editboxInScrollablePane = static_cast&amp;lt;Editbox*&amp;gt;(winMgr.createWindow(&amp;quot;TaharezLook/Editbox&amp;quot;, &amp;quot;EditboxInScrollablePane&amp;quot;));&lt;br /&gt;
				editboxInScrollablePane-&amp;gt;setPosition(UVector2(UDim(0.0f, 0.0f), UDim(2.1f, 0.0f))); // Start below the image&lt;br /&gt;
				editboxInScrollablePane-&amp;gt;setWidth(UDim(2.0f, 0.0f)); &lt;br /&gt;
				editboxInScrollablePane-&amp;gt;setHeight(UDim(0.3f, 0.0f));&lt;br /&gt;
				scrollablePane-&amp;gt;addChildWindow(editboxInScrollablePane);&lt;br /&gt;
&lt;br /&gt;
			/* Check box */&lt;br /&gt;
			Checkbox* checkbox = static_cast&amp;lt;Checkbox*&amp;gt;(winMgr.getWindow(&amp;quot;Checkbox&amp;quot;));&lt;br /&gt;
			checkbox-&amp;gt;setSelected( true );&lt;br /&gt;
			bool valueCheckbox = checkbox-&amp;gt;isSelected(); // Retrieve whether it is checked&lt;br /&gt;
&lt;br /&gt;
			/* 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;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.2f);&lt;br /&gt;
			spinner-&amp;gt;setCurrentValue(5.2f);&lt;br /&gt;
			float valueSpinner = spinner-&amp;gt;getCurrentValue(); // Retrieve the value&lt;br /&gt;
&lt;br /&gt;
			/* Editbox */&lt;br /&gt;
			Editbox* editbox = static_cast&amp;lt;Editbox*&amp;gt;(winMgr.getWindow(&amp;quot;Editbox&amp;quot;));&lt;br /&gt;
			editbox-&amp;gt;setText(&amp;quot;Editbox values&amp;quot;);&lt;br /&gt;
			editbox-&amp;gt;setMaxTextLength(13); // The trailing 's' will not be displayed&lt;br /&gt;
			editbox-&amp;gt;setReadOnly(false);&lt;br /&gt;
			editbox-&amp;gt;setTextMasked(false);&lt;br /&gt;
			editbox-&amp;gt;setMaskCodePoint(0x002A); // *&lt;br /&gt;
			String valueEditbox = editbox-&amp;gt;getText(); // Retrieve the text&lt;br /&gt;
&lt;br /&gt;
			/* Slider */&lt;br /&gt;
			Slider* slider = static_cast&amp;lt;Slider*&amp;gt;(winMgr.getWindow(&amp;quot;Slider&amp;quot;));&lt;br /&gt;
			slider-&amp;gt;setMaxValue(100.0f);&lt;br /&gt;
			slider-&amp;gt;setClickStep(10.0f);&lt;br /&gt;
			slider-&amp;gt;setCurrentValue(20.0f);&lt;br /&gt;
			float valueSlider = slider-&amp;gt;getCurrentValue(); // Retrieve the value&lt;br /&gt;
&lt;br /&gt;
			/* Scrollbar (Horizontal) */&lt;br /&gt;
			Scrollbar* scrollbarHorizontal = static_cast&amp;lt;Scrollbar*&amp;gt;(winMgr.getWindow(&amp;quot;HorizontalScrollbar&amp;quot;));&lt;br /&gt;
			scrollbarHorizontal-&amp;gt;setDocumentSize(100.0f);&lt;br /&gt;
			scrollbarHorizontal-&amp;gt;setPageSize(10.0f);&lt;br /&gt;
			scrollbarHorizontal-&amp;gt;setStepSize(1.0f);&lt;br /&gt;
			scrollbarHorizontal-&amp;gt;setScrollPosition(75.0f);&lt;br /&gt;
			float valueScrollbarHorizontal = scrollbarHorizontal-&amp;gt;getScrollPosition(); // Retrieve the scroll position&lt;br /&gt;
&lt;br /&gt;
			/* Scrollbar (Vertical) */&lt;br /&gt;
			Scrollbar* scrollbarVertical = static_cast&amp;lt;Scrollbar*&amp;gt;(winMgr.getWindow(&amp;quot;VerticalScrollbar&amp;quot;));&lt;br /&gt;
			scrollbarVertical-&amp;gt;setDocumentSize(100.0f);&lt;br /&gt;
			scrollbarVertical-&amp;gt;setPageSize(10.0f);&lt;br /&gt;
			scrollbarVertical-&amp;gt;setStepSize(1.0f);&lt;br /&gt;
			scrollbarVertical-&amp;gt;setScrollPosition(25.0f);&lt;br /&gt;
			float valueScrollbarVertical = scrollbarVertical-&amp;gt;getScrollPosition(); // Retrieve the scroll position&lt;br /&gt;
&lt;br /&gt;
			/* MultiLineEditbox */&lt;br /&gt;
			MultiLineEditbox* multiLineEditbox = static_cast&amp;lt;MultiLineEditbox*&amp;gt;(winMgr.getWindow(&amp;quot;MultiLineEditbox&amp;quot;));&lt;br /&gt;
			multiLineEditbox-&amp;gt;setText(&amp;quot;MultiLineEditbox value&amp;quot;);&lt;br /&gt;
			multiLineEditbox-&amp;gt;setReadOnly(false);&lt;br /&gt;
			multiLineEditbox-&amp;gt;setWordWrapping(true);&lt;br /&gt;
			String valueMultiLineEditbox = multiLineEditbox-&amp;gt;getText(); // Retrieve the text&lt;br /&gt;
&lt;br /&gt;
			/* RadioButton */&lt;br /&gt;
			RadioButton* radioButton = static_cast&amp;lt;RadioButton*&amp;gt;(winMgr.getWindow(&amp;quot;RadioButton_A&amp;quot;));&lt;br /&gt;
				radioButton-&amp;gt;setGroupID(1);&lt;br /&gt;
				radioButton-&amp;gt;setID(101);&lt;br /&gt;
				radioButton-&amp;gt;setSelected(true);&lt;br /&gt;
			radioButton = static_cast&amp;lt;RadioButton*&amp;gt;(winMgr.getWindow(&amp;quot;RadioButton_B&amp;quot;));&lt;br /&gt;
				radioButton-&amp;gt;setGroupID(1);&lt;br /&gt;
				radioButton-&amp;gt;setID(102);&lt;br /&gt;
			radioButton = static_cast&amp;lt;RadioButton*&amp;gt;(winMgr.getWindow(&amp;quot;RadioButton_C&amp;quot;));&lt;br /&gt;
				radioButton-&amp;gt;setGroupID(1);&lt;br /&gt;
				radioButton-&amp;gt;setID(103);&lt;br /&gt;
			radioButton = static_cast&amp;lt;RadioButton*&amp;gt;(winMgr.getWindow(&amp;quot;RadioButton_1&amp;quot;));&lt;br /&gt;
				radioButton-&amp;gt;setGroupID(2);&lt;br /&gt;
				radioButton-&amp;gt;setID(201);&lt;br /&gt;
				radioButton-&amp;gt;setSelected(true);&lt;br /&gt;
			radioButton = static_cast&amp;lt;RadioButton*&amp;gt;(winMgr.getWindow(&amp;quot;RadioButton_2&amp;quot;));&lt;br /&gt;
				radioButton-&amp;gt;setGroupID(2);&lt;br /&gt;
				radioButton-&amp;gt;setID(202);&lt;br /&gt;
			radioButton = static_cast&amp;lt;RadioButton*&amp;gt;(winMgr.getWindow(&amp;quot;RadioButton_3&amp;quot;));&lt;br /&gt;
				radioButton-&amp;gt;setGroupID(2);&lt;br /&gt;
				radioButton-&amp;gt;setID(203);&lt;br /&gt;
			radioButton = static_cast&amp;lt;RadioButton*&amp;gt;(winMgr.getWindow(&amp;quot;RadioButton_A&amp;quot;)); // Get handle of one radio button from the group&lt;br /&gt;
			uint valueRadioButtonLetters = radioButton-&amp;gt;getSelectedButtonInGroup()-&amp;gt;getID(); // Get selected ID&lt;br /&gt;
			radioButton = static_cast&amp;lt;RadioButton*&amp;gt;(winMgr.getWindow(&amp;quot;RadioButton_3&amp;quot;)); // Can obtain the handle of any radio button in the group&lt;br /&gt;
			uint valueRadioButtonNumbers = radioButton-&amp;gt;getSelectedButtonInGroup()-&amp;gt;getID();&lt;br /&gt;
			radioButton-&amp;gt;setSelected(true); // Specify which button should appear selected by default&lt;br /&gt;
&lt;br /&gt;
			/* Listbox */&lt;br /&gt;
			Listbox* listbox = static_cast&amp;lt;Listbox*&amp;gt;(winMgr.getWindow(&amp;quot;Listbox&amp;quot;));&lt;br /&gt;
			listbox-&amp;gt;setMultiselectEnabled(false);&lt;br /&gt;
			ListboxTextItem* itemListbox = new ListboxTextItem(&amp;quot;Value A&amp;quot;, 1);&lt;br /&gt;
				itemListbox-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
				listbox-&amp;gt;addItem(itemListbox);&lt;br /&gt;
			itemListbox = new ListboxTextItem(&amp;quot;Value B&amp;quot;, 2);&lt;br /&gt;
				itemListbox-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
				listbox-&amp;gt;addItem(itemListbox);&lt;br /&gt;
			itemListbox = new ListboxTextItem(&amp;quot;Value C&amp;quot;, 3);&lt;br /&gt;
				itemListbox-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
				listbox-&amp;gt;addItem(itemListbox);&lt;br /&gt;
			itemListbox = new ListboxTextItem(&amp;quot;Value D&amp;quot;, 4);&lt;br /&gt;
				itemListbox-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
				listbox-&amp;gt;addItem(itemListbox);&lt;br /&gt;
			listbox-&amp;gt;setItemSelectState(itemListbox, true);&lt;br /&gt;
			listbox-&amp;gt;ensureItemIsVisible(itemListbox);&lt;br /&gt;
			uint valueListbox = listbox-&amp;gt;getFirstSelectedItem()-&amp;gt;getID(); // Retrieve the ID of the selected listbox item&lt;br /&gt;
&lt;br /&gt;
			/* Combobox */&lt;br /&gt;
			Combobox* combobox = static_cast&amp;lt;Combobox*&amp;gt;(winMgr.getWindow(&amp;quot;Combobox&amp;quot;));&lt;br /&gt;
			combobox-&amp;gt;setReadOnly(true);&lt;br /&gt;
			ListboxTextItem* itemCombobox = new ListboxTextItem(&amp;quot;Value 1&amp;quot;, 1);&lt;br /&gt;
				itemCombobox-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
				combobox-&amp;gt;addItem(itemCombobox);&lt;br /&gt;
			itemCombobox = new ListboxTextItem(&amp;quot;Value 2&amp;quot;, 2);&lt;br /&gt;
				itemCombobox-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
				combobox-&amp;gt;addItem(itemCombobox);&lt;br /&gt;
				itemCombobox-&amp;gt;setSelected(true); // Select this item&lt;br /&gt;
				combobox-&amp;gt;setText(itemCombobox-&amp;gt;getText()); // Copy the item's text into the Editbox&lt;br /&gt;
			itemCombobox = new ListboxTextItem(&amp;quot;Value 3&amp;quot;, 3);&lt;br /&gt;
				itemCombobox-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
				combobox-&amp;gt;addItem(itemCombobox);&lt;br /&gt;
			itemCombobox = new ListboxTextItem(&amp;quot;Value 4&amp;quot;, 4);&lt;br /&gt;
				itemCombobox-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
				combobox-&amp;gt;addItem(itemCombobox);&lt;br /&gt;
			String valueCombobox = combobox-&amp;gt;getText(); // Retrieve the displayed text&lt;br /&gt;
			uint idCombobox = combobox-&amp;gt;getSelectedItem()-&amp;gt;getID(); // Retrieve the ID of the selected combobox item&lt;br /&gt;
&lt;br /&gt;
			/* MultiColumnList */&lt;br /&gt;
			MultiColumnList* multiColumnList = static_cast&amp;lt;MultiColumnList*&amp;gt;(winMgr.getWindow(&amp;quot;MultiColumnList&amp;quot;));\&lt;br /&gt;
			multiColumnList-&amp;gt;addColumn(&amp;quot;Col A&amp;quot;, 0, UDim(0.32f, 0));&lt;br /&gt;
			multiColumnList-&amp;gt;addColumn(&amp;quot;Col B&amp;quot;, 1, UDim(0.32f, 0));&lt;br /&gt;
			multiColumnList-&amp;gt;addColumn(&amp;quot;Col C&amp;quot;, 2, UDim(0.32f, 0));&lt;br /&gt;
			multiColumnList-&amp;gt;setSelectionMode(MultiColumnList::RowSingle); // MultiColumnList::RowMultiple&lt;br /&gt;
			ListboxTextItem* itemMultiColumnList;&lt;br /&gt;
			multiColumnList-&amp;gt;addRow();&lt;br /&gt;
			itemMultiColumnList = new ListboxTextItem(&amp;quot;A1&amp;quot;, 101);&lt;br /&gt;
				itemMultiColumnList-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
				multiColumnList-&amp;gt;setItem(itemMultiColumnList, 0, 0); // ColumnID, RowID&lt;br /&gt;
			itemMultiColumnList = new ListboxTextItem(&amp;quot;B1&amp;quot;, 102);&lt;br /&gt;
				//itemMultiColumnList-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
				// By commenting the line above a cell does not specify a selection indicator&lt;br /&gt;
				//  selecting that line will show a &amp;quot;gap&amp;quot; in the selection.&lt;br /&gt;
				multiColumnList-&amp;gt;setItem(itemMultiColumnList, 1, 0); // ColumnID, RowID&lt;br /&gt;
			itemMultiColumnList = new ListboxTextItem(&amp;quot;C1&amp;quot;, 103);&lt;br /&gt;
				itemMultiColumnList-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
				multiColumnList-&amp;gt;setItem(itemMultiColumnList, 2, 0); // ColumnID, RowID&lt;br /&gt;
			multiColumnList-&amp;gt;addRow();&lt;br /&gt;
			itemMultiColumnList = new ListboxTextItem(&amp;quot;A2&amp;quot;, 201);&lt;br /&gt;
				itemMultiColumnList-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
				multiColumnList-&amp;gt;setItem(itemMultiColumnList, 0, 1); // ColumnID, RowID&lt;br /&gt;
			itemMultiColumnList = new ListboxTextItem(&amp;quot;B2&amp;quot;, 202);&lt;br /&gt;
				itemMultiColumnList-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
				multiColumnList-&amp;gt;setItem(itemMultiColumnList, 1, 1); // ColumnID, RowID&lt;br /&gt;
			itemMultiColumnList = new ListboxTextItem(&amp;quot;C2&amp;quot;, 203);&lt;br /&gt;
				itemMultiColumnList-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
				multiColumnList-&amp;gt;setItem(itemMultiColumnList, 2, 1); // ColumnID, RowID&lt;br /&gt;
			MCLGridRef grid_ref(1, 0); // Select according to a grid reference; second row&lt;br /&gt;
			multiColumnList-&amp;gt;setItemSelectState(grid_ref, true);&lt;br /&gt;
			ListboxItem* listboxItem = multiColumnList-&amp;gt;getFirstSelectedItem();&lt;br /&gt;
			uint valueColumnA = listboxItem-&amp;gt;getID(); // Retrieve the value of the selected item from column A&lt;br /&gt;
			listboxItem = multiColumnList-&amp;gt;getNextSelected(listboxItem);&lt;br /&gt;
			uint valueColumnB = listboxItem-&amp;gt;getID(); // Retrieve the value of the selected item from column B&lt;br /&gt;
			listboxItem = multiColumnList-&amp;gt;getNextSelected(listboxItem);&lt;br /&gt;
			uint valueColumnC = listboxItem-&amp;gt;getID(); // Retrieve the value of the selected item from column C&lt;br /&gt;
&lt;br /&gt;
			/* TabControl */&lt;br /&gt;
			TabControl* winTabControl = static_cast&amp;lt;TabControl*&amp;gt;(winMgr.getWindow(&amp;quot;TabControl&amp;quot;));&lt;br /&gt;
			winTabControl-&amp;gt;setTabHeight(UDim(0.15f, 0.0f)); // Make the tab buttons a little bigger&lt;br /&gt;
			Window* tabPage = winMgr.getWindow(&amp;quot;TabPane1&amp;quot;);&lt;br /&gt;
				tabPage-&amp;gt;setText(&amp;quot;Page 1&amp;quot;);&lt;br /&gt;
				tabPage-&amp;gt;setSize(UVector2(UDim(1.0f, 0.0f), UDim(1.0f, 0.0f))); // Size to 100% of its parent, the TabControl&lt;br /&gt;
				tabPage-&amp;gt;setPosition(UVector2(UDim(0.0f, 0.0f), UDim(0.0f, 0.0f))); // Move to the upper left corner of its parent&lt;br /&gt;
				winTabControl-&amp;gt;addTab(tabPage);&lt;br /&gt;
			tabPage = winMgr.getWindow(&amp;quot;TabPane2&amp;quot;);&lt;br /&gt;
				tabPage-&amp;gt;setText(&amp;quot;Page 2&amp;quot;);&lt;br /&gt;
				tabPage-&amp;gt;setSize(UVector2(UDim(1.0f, 0.0f), UDim(1.0f, 0.0f))); &lt;br /&gt;
				tabPage-&amp;gt;setPosition(UVector2(UDim(0.0f, 0.0f), UDim(0.0f, 0.0f))); &lt;br /&gt;
				winTabControl-&amp;gt;addTab(tabPage);&lt;br /&gt;
&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;
	}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#endif // _WidgetGalore_h_&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== main.cpp ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&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;WidgetGalore.h&amp;quot;&lt;br /&gt;
&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;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== WidgetGalore.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;Text&amp;quot; &amp;gt;1&amp;lt;/Property&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;DefaultWindow&amp;quot; Name=&amp;quot;TabPane2&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.72875,0},{0.7185,0},{0.97875,0},{0.9685,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/StaticText&amp;quot; Name=&amp;quot;StaticTextPage2&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; &amp;gt;In Page 2:&amp;lt;/Property&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.06,0},{0.226667,0},{0.415,0},{0.476667,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;EditBoxPage2&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;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.420001,0},{0.22,0},{0.99,0},{0.47,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 Type=&amp;quot;TaharezLook/FrameWindow&amp;quot; Name=&amp;quot;winTabControl&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; &amp;gt;Tab Control Window&amp;lt;/Property&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.695627,0},{0.2725,0},{0.993122,0},{0.704167,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/TabControl&amp;quot; Name=&amp;quot;TabControl&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;TabHeight&amp;quot; Value=&amp;quot;{0,0}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;TabTextPadding&amp;quot; Value=&amp;quot;{0,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;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.088566,0},{0.174378,0},{0.931404,0},{0.804637,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;btnOk&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; &amp;gt;Ok&amp;lt;/Property&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.128412,0},{0.841464,0},{0.365583,0},{0.926003,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/Button&amp;quot; Name=&amp;quot;btnCancel&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; &amp;gt;Cancel&amp;lt;/Property&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.400429,0},{0.841464,0},{0.637601,0},{0.926003,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/Button&amp;quot; Name=&amp;quot;btnApply&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; &amp;gt;Apply&amp;lt;/Property&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.668224,0},{0.843977,0},{0.905394,0},{0.928516,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&amp;gt;&lt;br /&gt;
        &amp;lt;Window Type=&amp;quot;DefaultWindow&amp;quot; Name=&amp;quot;TabPane1&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;ClippedByParent&amp;quot; Value=&amp;quot;False&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.72875,0},{0.012178,0},{0.97875,0},{0.262178,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/StaticText&amp;quot; Name=&amp;quot;StaticTextPage1&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; &amp;gt;In Page 1:&amp;lt;/Property&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.06,0},{0.226667,0},{0.415,0},{0.476667,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;EditBoxPage1&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.420001,0},{0.22,0},{0.99,0},{0.47,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 Type=&amp;quot;TaharezLook/FrameWindow&amp;quot; Name=&amp;quot;winWidgets&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; &amp;gt;Dave, it&amp;amp;apos;s full of widgets!&amp;lt;/Property&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.00375,0},{0.143333,0},{0.751248,0},{0.806665,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/Button&amp;quot; Name=&amp;quot;btnClose&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; &amp;gt;Close&amp;lt;/Property&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.732397,0},{0.895137,0},{0.976465,0},{0.975697,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;Editbox&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;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.62442,0},{0.090471,0},{0.969776,0},{0.153443,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/Checkbox&amp;quot; Name=&amp;quot;Checkbox&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; &amp;gt;Check&amp;lt;/Property&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.845164,0},{0.396859,0},{0.944201,0},{0.453147,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;Combobox&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; &amp;gt;Combo Box&amp;lt;/Property&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.183835,0},{0.090471,0},{0.613522,0},{0.413287,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/RadioButton&amp;quot; Name=&amp;quot;RadioButton_A&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; &amp;gt;A&amp;lt;/Property&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.652856,0},{0.189876,0},{0.704964,0},{0.246164,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;RadioButton_B&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; &amp;gt;B&amp;lt;/Property&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.707569,0},{0.189876,0},{0.759678,0},{0.246164,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;RadioButton_C&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; &amp;gt;C&amp;lt;/Property&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.761542,0},{0.189876,0},{0.813651,0},{0.246164,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;RadioButton_1&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; &amp;gt;1&amp;lt;/Property&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.845164,0},{0.189876,0},{0.897272,0},{0.246164,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;RadioButton_2&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; &amp;gt;2&amp;lt;/Property&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.845164,0},{0.245152,0},{0.897272,0},{0.30144,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;RadioButton_3&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; &amp;gt;3&amp;lt;/Property&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.845164,0},{0.300429,0},{0.897272,0},{0.356717,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/HorizontalScrollbar&amp;quot; Name=&amp;quot;HorizontalScrollbar&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;PageSize&amp;quot; Value=&amp;quot;0&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;OverlapSize&amp;quot; Value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;DocumentSize&amp;quot; Value=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;ScrollPosition&amp;quot; Value=&amp;quot;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;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.183835,0},{0.185427,0},{0.613522,0},{0.26206,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/VerticalScrollbar&amp;quot; Name=&amp;quot;VerticalScrollbar&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;PageSize&amp;quot; Value=&amp;quot;0&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;OverlapSize&amp;quot; Value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;DocumentSize&amp;quot; Value=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;ScrollPosition&amp;quot; Value=&amp;quot;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;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.026087,0},{0.090471,0},{0.082106,0},{0.606802,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/Listbox&amp;quot; Name=&amp;quot;Listbox&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; &amp;gt;List Box&amp;lt;/Property&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.183835,0},{0.626634,0},{0.427903,0},{0.876634,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&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/MultiColumnList&amp;quot; Name=&amp;quot;MultiColumnList&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.183835,0},{0.271357,0},{0.816779,0},{0.551507,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&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/MultiLineEditbox&amp;quot; Name=&amp;quot;MultiLineEditbox&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; &amp;gt;            &lt;br /&gt;
&amp;lt;/Property&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.462498,0},{0.626634,0},{0.706566,0},{0.876634,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/ProgressBar&amp;quot; Name=&amp;quot;ProgressBar&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;StepSize&amp;quot; Value=&amp;quot;0.01&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;CurrentProgress&amp;quot; Value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.183835,0},{0.559296,0},{0.816779,0},{0.608291,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/Slider&amp;quot; Name=&amp;quot;Slider&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;CurrentValue&amp;quot; Value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;MaximumValue&amp;quot; Value=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;ClickStepSize&amp;quot; Value=&amp;quot;0.01&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.099415,0},{0.090471,0},{0.155434,0},{0.606802,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&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;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;0&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.845164,0},{0.48995,0},{0.944201,0},{0.551507,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/StaticImage&amp;quot; Name=&amp;quot;StaticImage&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.732397,0},{0.626634,0},{0.976465,0},{0.876634,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;StaticText&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; &amp;gt;Static Text&amp;lt;/Property&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.462498,0},{0.895137,0},{0.706566,0},{0.975697,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/ScrollablePane&amp;quot; Name=&amp;quot;ScrollablePane&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;ContentArea&amp;quot; Value=&amp;quot;l:0 t:0 r:0 b:0&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;HorzStepSize&amp;quot; Value=&amp;quot;0.1&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;VertStepSize&amp;quot; Value=&amp;quot;0.1&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;HorzOverlapSize&amp;quot; Value=&amp;quot;0.01&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.019063,0},{0.629399,0},{0.157023,0},{0.879399,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;VertOverlapSize&amp;quot; Value=&amp;quot;0.01&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;HorzScrollPosition&amp;quot; Value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;VertScrollPosition&amp;quot; Value=&amp;quot;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>Rackle</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=Menu_and_Popup&amp;diff=2848</id>
		<title>Menu and Popup</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=Menu_and_Popup&amp;diff=2848"/>
				<updated>2008-02-06T16:53:11Z</updated>
		
		<summary type="html">&lt;p&gt;Rackle: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Introduction ===&lt;br /&gt;
This code demonstrates the usage of a menu as well as popup menus, created from the Layout Editor.&lt;br /&gt;
&lt;br /&gt;
Please discuss this snippet within the [http://www.cegui.org.uk/phpBB2/viewtopic.php?p=11724 Menu and Submenus] thread.&lt;br /&gt;
&lt;br /&gt;
This [http://www.cegui.org.uk/phpBB2/viewtopic.php?p=13433#13433 message board post] demonstrates the creation of a menu via code rather than loaded from a .layout file.&lt;br /&gt;
&lt;br /&gt;
==== Menu ====&lt;br /&gt;
The Menubar widget creates a menu bar, an horizontal bar containing top-level popup menus.  Traditionally menu bars are displayed just below the title bar however the Cegui menubar is not bound by this limitation; it could be placed at the bottom of a FrameWindow, or even outside of a FrameWindow.&lt;br /&gt;
&lt;br /&gt;
The configureMenu() function recursively traverses a menu hierarchy and registers three events:  EventMouseEnters, EventMouseLeaves, and EventClicked.&lt;br /&gt;
&lt;br /&gt;
The most important event triggered by a menu is the selection of a menu item.  This is accomplished by subscribing to the MenuItem::EventClicked event.  This code is within the onMenuItemClicked() function.&lt;br /&gt;
&lt;br /&gt;
Another noteworthy event is PopupMenu::EventPopupOpened, allowing you to modify the menuitems that are displayed, such as potentially (not presented here) enabling/disabling items or changing the displayed text.  This is an approach to have menus query the application to determin the state of the menu items that will be presented to the user; for example disabling a &amp;quot;paste&amp;quot; menuitem when there is nothing to paste.&lt;br /&gt;
&lt;br /&gt;
The demo subscribes to the MenuItem::EventMouseEnters event for two features.  The first is to display a message when the mouse hovers over a menuitem.  The text displayed is stored within the Tooltip property within the Layout Editor.  The second is to automatically open a submenu.  This code is within the onMouseEntersMenuItem() function.&lt;br /&gt;
&lt;br /&gt;
The code to automatically close a menu (when the mouse leaves) is within the onMouseLeavesMenuItem() and onMouseLeavesPopupMenuItem() functions, called in response to a MenuItem::EventMouseLeaves event.  &lt;br /&gt;
&lt;br /&gt;
By subscribing to the Window::EventCharacterKey event it becomes possible to open the menu in response to a special key.  The ALT key will not work in windowed mode (as opposed to fullscreen), since it is a system key.  Try pressing ALT followed by SPACE; the system menu will open (the menu in the upper left corner of a Windows window).  I've used the SLASH &amp;quot;/&amp;quot; key as an alternate.  Note that for the slash key to open the menu the FrameWindow must possess the focus.&lt;br /&gt;
&lt;br /&gt;
==== Popup Menu ====&lt;br /&gt;
&lt;br /&gt;
Since the Layout Editor does not allow us to create popup menus directly, I opted to reuse the menubar.  Traditionally a menu bar contains horizontal categories and within each category are sub-categories.  Since an application may contain numerous popup menus we would rapidly run out of space.  A better approach is to have a menu bar with a single top-level menu and popup menus defined as its sub-menus.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
* Popup Menubar&lt;br /&gt;
** Popup Menu 1&lt;br /&gt;
*** Item 1.1&lt;br /&gt;
*** Item 1.2&lt;br /&gt;
** Popup Menu 2&lt;br /&gt;
*** Item 2.1&lt;br /&gt;
*** Item 2.2&lt;br /&gt;
&lt;br /&gt;
Should you run out of room vertically then a second top-level menu could be created.&lt;br /&gt;
&lt;br /&gt;
The configureMenu() is called for each popup menu, to automatically open and close their submenus.  The Window::EventMouseButtonUp event is used to open the proper popup menu, based on which widget was right-clicked.  This code is within the onPopupMenu() function.&lt;br /&gt;
&lt;br /&gt;
The mouse cursor is traditionally displayed to the left of the popup menu.  The problem with that is that the cursor hides the first menu item.  The value of the mouseToLeftOfPopupMenu variable determines whether the traditional position is used or whether the popup menu is opened such that the mouse cursor appears to the right.  The mouseOffset variable specifies the mouse offset from the upper-left or the upper-right corner.  In addition the popup menu is moved to prevent it from opening offscreen.&lt;br /&gt;
&lt;br /&gt;
To add menuitems runtime to a popupMenu you add a CEGUI::Window childWindow to the popupMenu. You don't create a new CEGUI::MenuItem as you might think:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
CEGUI::PopupMenu* popupMenu  = (CEGUI::PopupMenu*)CEGUI::WindowManager::getSingleton().getWindow(&amp;quot;Root/Popup/PopupMenus/FirstPopup/AutoPopup&amp;quot;);  &lt;br /&gt;
CEGUI::Window* menuitem = CEGUI::WindowManager::getSingleton().createWindow(&amp;quot;TaharezLook/MenuItem&amp;quot;);&lt;br /&gt;
menuitem-&amp;gt;setText(&amp;quot;Quit&amp;quot;);&lt;br /&gt;
menuitem-&amp;gt;subscribeEvent(&amp;quot;Clicked&amp;quot;, Event::Subscriber(&amp;amp;ScrollablePaneSample::fileQuit, this));&lt;br /&gt;
popupMenu-&amp;gt;addChildWindow(menuitem);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Wishlist ====&lt;br /&gt;
&lt;br /&gt;
These feature are not implemented but would be nice to have:&lt;br /&gt;
&lt;br /&gt;
* A delay before automatically opening/closing a submenu.&lt;br /&gt;
* Closing the entire submenu tree when a parent submenu is closed.  This way the next time the submenu is opened its children are in their default mode (i.e. closed).&lt;br /&gt;
* Displaying accelerator/shortcut keys to the right of the menuitems.&lt;br /&gt;
* Keyboard navigation through the menus (up, down, left, right).  This requires access to the CeguiMenuItem::d_hover variable, which (I think) draws the menuitem as highlighted.&lt;br /&gt;
* Graphical menuitems&lt;br /&gt;
* Support for a separtor (horizontal line) menuitem.&lt;br /&gt;
* Support for a checkbox menuitem, to activate a feature&lt;br /&gt;
* Support for a radiobutton-like group of menuitems, to activate one feature among multiple choices.&lt;br /&gt;
&lt;br /&gt;
=== Files ===&lt;br /&gt;
==== Menu_Demo.h ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
#ifndef _Menu_h_&lt;br /&gt;
#define _Menu_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;
#include &amp;quot;CEGUIDefaultResourceProvider.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------------------&lt;br /&gt;
// Offset to ensure that the mouse cursor will be within the popup menu&lt;br /&gt;
// This will automatically close the popup menu whe the mouse is moved;&lt;br /&gt;
// without the offset the mouse is not really within the popup menu.&lt;br /&gt;
const float mouseOffset = 5.0f;&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------------------&lt;br /&gt;
// Specifies whether the popup menu will open to the right (default) or&lt;br /&gt;
// to the left of the mouse.  Opening to the left gives better results&lt;br /&gt;
// with the Taharez scheme since the mouse cursor is not covering the&lt;br /&gt;
// menu item.&lt;br /&gt;
const bool mouseToLeftOfPopupMenu = false;&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------------------&lt;br /&gt;
class DemoSample : public CEGuiSample&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
	//-------------------------------------------------------------------&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;Menu.layout&amp;quot;);&lt;br /&gt;
			sheet-&amp;gt;addChildWindow(guiLayout);&lt;br /&gt;
&lt;br /&gt;
			// Subscribe to the keyboard events to control the menu&lt;br /&gt;
			winMgr.getWindow(&amp;quot;Root/FrameWindow&amp;quot;)-&amp;gt;subscribeEvent(CEGUI::Window::EventCharacterKey,	CEGUI::Event::Subscriber(&amp;amp;DemoSample::onMenuKey,	this));&lt;br /&gt;
&lt;br /&gt;
			// Configure the menu bar&lt;br /&gt;
			configureMenu( winMgr.getWindow(&amp;quot;Root/FrameWindow/Menubar&amp;quot;), true );&lt;br /&gt;
&lt;br /&gt;
			// Hide the menubar of the popup menus&lt;br /&gt;
			winMgr.getWindow(&amp;quot;Root/Popup&amp;quot;)-&amp;gt;hide();&lt;br /&gt;
&lt;br /&gt;
			// Configure the popup menus&lt;br /&gt;
			configureMenu( winMgr.getWindow(&amp;quot;Root/Popup/PopupMenus&amp;quot;),	false );&lt;br /&gt;
&lt;br /&gt;
			// These &amp;quot;widgets&amp;quot; will display a contextual popup menu when right-clicked&lt;br /&gt;
			winMgr.getWindow(&amp;quot;Root/FrameWindow/FirstPopup&amp;quot;)-&amp;gt;subscribeEvent(CEGUI::Window::EventMouseButtonUp,	CEGUI::Event::Subscriber(&amp;amp;DemoSample::onPopupMenu, this));&lt;br /&gt;
			winMgr.getWindow(&amp;quot;Root/FrameWindow/SecondPopup&amp;quot;)-&amp;gt;subscribeEvent(CEGUI::Window::EventMouseButtonUp,	CEGUI::Event::Subscriber(&amp;amp;DemoSample::onPopupMenu, this));&lt;br /&gt;
			winMgr.getWindow(&amp;quot;Root/FrameWindow&amp;quot;)-&amp;gt;subscribeEvent(CEGUI::Window::EventMouseButtonUp,				CEGUI::Event::Subscriber(&amp;amp;DemoSample::onPopupMenu, this));&lt;br /&gt;
			winMgr.getWindow(&amp;quot;Root&amp;quot;)-&amp;gt;subscribeEvent(CEGUI::Window::EventMouseButtonUp,							CEGUI::Event::Subscriber(&amp;amp;DemoSample::onPopupMenu, this));&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;
	//-------------------------------------------------------------------&lt;br /&gt;
    void cleanupSample(void)&lt;br /&gt;
	{&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	//-------------------------------------------------------------------&lt;br /&gt;
	void configureMenu(CEGUI::Window* pParent, const bool&amp;amp; pMenubar) &lt;br /&gt;
	{&lt;br /&gt;
		// Recursively subscribe every menu item to the mouse enters/leaves/clicked events&lt;br /&gt;
		size_t childCount = pParent-&amp;gt;getChildCount(); &lt;br /&gt;
		for(size_t childIdx = 0; childIdx &amp;lt; childCount; childIdx++) &lt;br /&gt;
		{ &lt;br /&gt;
			if(pParent-&amp;gt;getChildAtIdx(childIdx)-&amp;gt;testClassName(&amp;quot;MenuItem&amp;quot;)&lt;br /&gt;
				|| pParent-&amp;gt;getChildAtIdx(childIdx)-&amp;gt;testClassName(&amp;quot;PopupMenu&amp;quot;) )&lt;br /&gt;
			{ &lt;br /&gt;
				pParent-&amp;gt;getChildAtIdx(childIdx)-&amp;gt;subscribeEvent(CEGUI::MenuItem::EventMouseEnters,   CEGUI::Event::Subscriber(&amp;amp;DemoSample::onMouseEntersMenuItem, this)); &lt;br /&gt;
				pParent-&amp;gt;getChildAtIdx(childIdx)-&amp;gt;subscribeEvent(CEGUI::MenuItem::EventMouseLeaves,   pMenubar ?	CEGUI::Event::Subscriber(&amp;amp;DemoSample::onMouseLeavesMenuItem, this)&lt;br /&gt;
																												:	CEGUI::Event::Subscriber(&amp;amp;DemoSample::onMouseLeavesPopupMenuItem, this)); &lt;br /&gt;
				if(pParent-&amp;gt;getChildAtIdx(childIdx)-&amp;gt;testClassName(&amp;quot;MenuItem&amp;quot;))&lt;br /&gt;
				{&lt;br /&gt;
					pParent-&amp;gt;getChildAtIdx(childIdx)-&amp;gt;subscribeEvent(CEGUI::MenuItem::EventClicked, CEGUI::Event::Subscriber(&amp;amp;DemoSample::onMenuItemClicked, this));&lt;br /&gt;
				}&lt;br /&gt;
			} &lt;br /&gt;
			configureMenu(pParent-&amp;gt;getChildAtIdx(childIdx), pMenubar); &lt;br /&gt;
		} &lt;br /&gt;
	} &lt;br /&gt;
&lt;br /&gt;
	//-------------------------------------------------------------------&lt;br /&gt;
	bool onMouseEntersMenuItem(const CEGUI::EventArgs&amp;amp; e)&lt;br /&gt;
	{&lt;br /&gt;
		// Open or close a submenu&lt;br /&gt;
		const CEGUI::WindowEventArgs&amp;amp; we = static_cast&amp;lt;const CEGUI::WindowEventArgs&amp;amp;&amp;gt;(e);&lt;br /&gt;
		CEGUI::MenuItem* menuItem = static_cast&amp;lt;CEGUI::MenuItem*&amp;gt;(we.window);&lt;br /&gt;
		if(menuItem)&lt;br /&gt;
		{&lt;br /&gt;
			setStatusText( menuItem-&amp;gt;getTooltipText() );&lt;br /&gt;
			if( menuItem-&amp;gt;getPopupMenu() )&lt;br /&gt;
			{&lt;br /&gt;
				if( menuItem-&amp;gt;isOpened() )&lt;br /&gt;
				{&lt;br /&gt;
					if(menuItem-&amp;gt;testClassName(&amp;quot;MenuItem&amp;quot;))&lt;br /&gt;
					{&lt;br /&gt;
						menuItem-&amp;gt;closePopupMenu();&lt;br /&gt;
					}&lt;br /&gt;
				}&lt;br /&gt;
				else&lt;br /&gt;
				{&lt;br /&gt;
					menuItem-&amp;gt;openPopupMenu();&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			setStatusText( &amp;quot;&amp;quot; );&lt;br /&gt;
		}&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	//-------------------------------------------------------------------&lt;br /&gt;
	bool onMouseLeavesMenuItem(const CEGUI::EventArgs&amp;amp; e)&lt;br /&gt;
	{&lt;br /&gt;
		// Close a menu&lt;br /&gt;
		const CEGUI::WindowEventArgs&amp;amp; we = static_cast&amp;lt;const CEGUI::WindowEventArgs&amp;amp;&amp;gt;(e);&lt;br /&gt;
		setStatusText( &amp;quot;&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
		CEGUI::Window* menubar = we.window;&lt;br /&gt;
		while(menubar)&lt;br /&gt;
		{&lt;br /&gt;
			if( menubar-&amp;gt;testClassName(&amp;quot;Menubar&amp;quot;) )&lt;br /&gt;
			{&lt;br /&gt;
				// We found the root; a menu bar&lt;br /&gt;
				CEGUI::Vector2 childPosition = CEGUI::MouseCursor::getSingleton().getPosition();&lt;br /&gt;
				CEGUI::Window* windowUnderTheCursor = menubar-&amp;gt;getTargetChildAtPosition(childPosition);&lt;br /&gt;
				if(!windowUnderTheCursor)&lt;br /&gt;
				{&lt;br /&gt;
					CEGUI::MenuItem* popupMenu = static_cast&amp;lt;CEGUI::Menubar*&amp;gt;(menubar)-&amp;gt;getPopupMenuItem();&lt;br /&gt;
					if(popupMenu)&lt;br /&gt;
					{&lt;br /&gt;
						// This does not close sub-popup menus, only the current one&lt;br /&gt;
						popupMenu-&amp;gt;closePopupMenu();&lt;br /&gt;
					}&lt;br /&gt;
				}&lt;br /&gt;
				break;&lt;br /&gt;
			}&lt;br /&gt;
			menubar = menubar-&amp;gt;getParent();&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	//-------------------------------------------------------------------&lt;br /&gt;
	bool onMouseLeavesPopupMenuItem(const CEGUI::EventArgs&amp;amp; e)&lt;br /&gt;
	{&lt;br /&gt;
		// Close a popup menu&lt;br /&gt;
		const CEGUI::WindowEventArgs&amp;amp; we = static_cast&amp;lt;const CEGUI::WindowEventArgs&amp;amp;&amp;gt;(e);&lt;br /&gt;
		setStatusText( &amp;quot;&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
		CEGUI::Window* menubar = we.window;&lt;br /&gt;
		CEGUI::Window* popupParent;&lt;br /&gt;
		while(menubar)&lt;br /&gt;
		{&lt;br /&gt;
			popupParent = menubar-&amp;gt;getParent();&lt;br /&gt;
			if( popupParent&lt;br /&gt;
				&amp;amp;&amp;amp; !popupParent-&amp;gt;testClassName(&amp;quot;Menubar&amp;quot;)&lt;br /&gt;
				&amp;amp;&amp;amp; !popupParent-&amp;gt;testClassName(&amp;quot;PopupMenu&amp;quot;)&lt;br /&gt;
				&amp;amp;&amp;amp; !popupParent-&amp;gt;testClassName(&amp;quot;MenuItem&amp;quot;)&lt;br /&gt;
				)&lt;br /&gt;
			{&lt;br /&gt;
				// We found the root; a popup menu&lt;br /&gt;
				CEGUI::Window* popupMenu = menubar;&lt;br /&gt;
				menubar = menubar-&amp;gt;getParent();&lt;br /&gt;
				CEGUI::Vector2 childPosition = CEGUI::MouseCursor::getSingleton().getPosition();&lt;br /&gt;
				CEGUI::Window* windowUnderTheCursor = menubar-&amp;gt;getTargetChildAtPosition(childPosition);&lt;br /&gt;
				if(!windowUnderTheCursor)&lt;br /&gt;
				{&lt;br /&gt;
					popupMenu-&amp;gt;hide();&lt;br /&gt;
				}&lt;br /&gt;
				break;&lt;br /&gt;
			}&lt;br /&gt;
			menubar = menubar-&amp;gt;getParent();&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	//-------------------------------------------------------------------&lt;br /&gt;
	bool onMenuItemClicked(const CEGUI::EventArgs&amp;amp; e)&lt;br /&gt;
	{&lt;br /&gt;
		const CEGUI::WindowEventArgs&amp;amp; we = static_cast&amp;lt;const CEGUI::WindowEventArgs&amp;amp;&amp;gt;(e);&lt;br /&gt;
		setStatusText( &amp;quot;Clicked &amp;quot; + we.window-&amp;gt;getName() );&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	//-------------------------------------------------------------------&lt;br /&gt;
	bool onMenuKey(const CEGUI::EventArgs&amp;amp; e)&lt;br /&gt;
	{&lt;br /&gt;
		// Open or close a menu&lt;br /&gt;
		const CEGUI::KeyEventArgs&amp;amp; ke = static_cast&amp;lt;const CEGUI::KeyEventArgs&amp;amp;&amp;gt;(e);&lt;br /&gt;
		if(ke.sysKeys == CEGUI::Key::LeftAlt&lt;br /&gt;
			|| ke.sysKeys == CEGUI::Key::RightAlt&lt;br /&gt;
			|| ke.sysKeys == CEGUI::Key::Slash&lt;br /&gt;
			|| ke.codepoint == 47) // Slash&lt;br /&gt;
		{&lt;br /&gt;
			CEGUI::WindowManager&amp;amp; winMgr = CEGUI::WindowManager::getSingleton();&lt;br /&gt;
			CEGUI::Menubar* menuBar = static_cast&amp;lt;CEGUI::Menubar*&amp;gt;(winMgr.getWindow(&amp;quot;Root/FrameWindow/Menubar&amp;quot;));&lt;br /&gt;
			CEGUI::MenuItem* menuItem = menuBar-&amp;gt;getPopupMenuItem();&lt;br /&gt;
			if(menuItem)&lt;br /&gt;
			{&lt;br /&gt;
				// There's a menu opened, let's close it&lt;br /&gt;
				menuBar-&amp;gt;changePopupMenuItem(0);&lt;br /&gt;
			}&lt;br /&gt;
			else&lt;br /&gt;
			{&lt;br /&gt;
				// The menu is closed, let's open the first menu&lt;br /&gt;
				menuItem = static_cast&amp;lt;CEGUI::MenuItem*&amp;gt;(winMgr.getWindow(&amp;quot;Root/FrameWindow/Menubar/File&amp;quot;));&lt;br /&gt;
				menuBar-&amp;gt;changePopupMenuItem(menuItem);&lt;br /&gt;
&lt;br /&gt;
				// Select the first item from this menu ??&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	//-------------------------------------------------------------------&lt;br /&gt;
	bool onPopupMenu(const CEGUI::EventArgs&amp;amp; e)&lt;br /&gt;
	{&lt;br /&gt;
		// Open a context-sensitive menu&lt;br /&gt;
		const CEGUI::MouseEventArgs&amp;amp; me = static_cast&amp;lt;const CEGUI::MouseEventArgs&amp;amp;&amp;gt;(e);&lt;br /&gt;
		if(me.button == CEGUI::RightButton)&lt;br /&gt;
		{&lt;br /&gt;
			CEGUI::WindowManager&amp;amp; winMgr = CEGUI::WindowManager::getSingleton();&lt;br /&gt;
			CEGUI::PopupMenu* popupMenu = 0;&lt;br /&gt;
			if(me.window-&amp;gt;getName().compare(&amp;quot;Root/FrameWindow/FirstPopup&amp;quot;) == 0)&lt;br /&gt;
			{&lt;br /&gt;
				popupMenu = static_cast&amp;lt;CEGUI::PopupMenu*&amp;gt;(winMgr.getWindow(&amp;quot;Root/Popup/PopupMenus/FirstPopup/AutoPopup&amp;quot;));&lt;br /&gt;
			}&lt;br /&gt;
			else if(me.window-&amp;gt;getName().compare(&amp;quot;Root/FrameWindow/SecondPopup&amp;quot;) == 0)&lt;br /&gt;
			{&lt;br /&gt;
				popupMenu = static_cast&amp;lt;CEGUI::PopupMenu*&amp;gt;(winMgr.getWindow(&amp;quot;Root/Popup/PopupMenus/SecondPopup/AutoPopup&amp;quot;));&lt;br /&gt;
			}&lt;br /&gt;
			else if(me.window-&amp;gt;getName().compare(&amp;quot;Root/FrameWindow&amp;quot;) == 0)&lt;br /&gt;
			{&lt;br /&gt;
				popupMenu = static_cast&amp;lt;CEGUI::PopupMenu*&amp;gt;(winMgr.getWindow(&amp;quot;Root/Popup/PopupMenus/FramePopup/AutoPopup&amp;quot;));&lt;br /&gt;
			}&lt;br /&gt;
			else if(me.window-&amp;gt;getName().compare(&amp;quot;Root&amp;quot;) == 0)&lt;br /&gt;
			{&lt;br /&gt;
				popupMenu = static_cast&amp;lt;CEGUI::PopupMenu*&amp;gt;(winMgr.getWindow(&amp;quot;Root/Popup/PopupMenus/SheetPopup/AutoPopup&amp;quot;));&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			if(popupMenu)&lt;br /&gt;
			{&lt;br /&gt;
				// Make the window the popup's parent&lt;br /&gt;
				me.window-&amp;gt;addChildWindow(popupMenu);&lt;br /&gt;
&lt;br /&gt;
				// Position of the popup menu&lt;br /&gt;
				CEGUI::UVector2 popupPosition;&lt;br /&gt;
&lt;br /&gt;
				// Ensure the popup menu will be fully displayed horizontally on the screen&lt;br /&gt;
				float screenWidth = CEGUI::System::getSingleton().getRenderer()-&amp;gt;getWidth();&lt;br /&gt;
				float popupMenuWidth = popupMenu-&amp;gt;getWidth().d_offset;&lt;br /&gt;
				if(popupMenuWidth &amp;lt; screenWidth)&lt;br /&gt;
				{&lt;br /&gt;
					// The x coordinate is either the mouse position or the right side of the&lt;br /&gt;
					// screen minus the width of the popup menu.  This ensures that the popup&lt;br /&gt;
					// menu is fully displayed rather than clipped.&lt;br /&gt;
					float x;&lt;br /&gt;
					if(mouseToLeftOfPopupMenu)&lt;br /&gt;
					{&lt;br /&gt;
						x = me.position.d_x + popupMenuWidth &amp;gt; screenWidth ? screenWidth - popupMenuWidth&lt;br /&gt;
																		   : me.position.d_x - mouseOffset;&lt;br /&gt;
					}&lt;br /&gt;
					else&lt;br /&gt;
					{&lt;br /&gt;
						x = me.position.d_x &amp;lt; popupMenuWidth ? 0.0f&lt;br /&gt;
															 : me.position.d_x - popupMenuWidth + mouseOffset;&lt;br /&gt;
					}&lt;br /&gt;
					popupPosition.d_x = cegui_absdim(CEGUI::CoordConverter::screenToWindowX(*me.window, x));&lt;br /&gt;
				}&lt;br /&gt;
				else&lt;br /&gt;
				{&lt;br /&gt;
					// The popup menu is too wide to fit within the screen&lt;br /&gt;
					popupPosition.d_x = CEGUI::UDim(0.0f, 0.0f);&lt;br /&gt;
				}&lt;br /&gt;
&lt;br /&gt;
				// Ensure the popup menu will be fully displayed vertically on the screen&lt;br /&gt;
				float screenHeight = CEGUI::System::getSingleton().getRenderer()-&amp;gt;getHeight();&lt;br /&gt;
				float popupMenuHeight = popupMenu-&amp;gt;getHeight().d_offset;&lt;br /&gt;
				if(popupMenuHeight &amp;lt; screenHeight)&lt;br /&gt;
				{&lt;br /&gt;
					// The y coordinate is either the mouse position or the bottom side of the&lt;br /&gt;
					// screen minus the height of the popup menu.  This ensures that the popup&lt;br /&gt;
					// menu is fully displayed rather than clipped.&lt;br /&gt;
					float y = me.position.d_y + popupMenuHeight &amp;gt; screenHeight ? screenHeight - popupMenuHeight&lt;br /&gt;
																			   : me.position.d_y - mouseOffset;&lt;br /&gt;
					popupPosition.d_y = cegui_absdim(CEGUI::CoordConverter::screenToWindowY(*me.window, y));&lt;br /&gt;
				}&lt;br /&gt;
				else&lt;br /&gt;
				{&lt;br /&gt;
					// The popup menu is too tall to fit within the screen&lt;br /&gt;
					popupPosition.d_y = CEGUI::UDim(0.0f, 0.0f);&lt;br /&gt;
				}&lt;br /&gt;
&lt;br /&gt;
				// Position the context menu&lt;br /&gt;
				popupMenu-&amp;gt;setPosition(popupPosition);&lt;br /&gt;
&lt;br /&gt;
				// Show the popup menu&lt;br /&gt;
				popupMenu-&amp;gt;show();&lt;br /&gt;
&lt;br /&gt;
				// Ensure it appears on top of the other widgets&lt;br /&gt;
				popupMenu-&amp;gt;moveToFront();&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	//-------------------------------------------------------------------&lt;br /&gt;
	void setStatusText(const CEGUI::String&amp;amp; pText)&lt;br /&gt;
	{&lt;br /&gt;
		CEGUI::WindowManager&amp;amp; winMgr = CEGUI::WindowManager::getSingleton();&lt;br /&gt;
		winMgr.getWindow(&amp;quot;Root/FrameWindow/Status&amp;quot;)-&amp;gt;setText(pText);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#endif // _Menu_h_&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Main.cpp ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&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;Menu_demo.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;
    int i = app.run();&lt;br /&gt;
    return i;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Menu.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;Root/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;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.00952756,0},{0.0104167,0},{0.51085,0},{0.585417,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/Menubar&amp;quot; Name=&amp;quot;Root/FrameWindow/Menubar&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;ItemSpacing&amp;quot; Value=&amp;quot;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,0},{0.09,0},{0.997727,0},{0.191014,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/FrameWindow/Menubar/File&amp;quot; &amp;gt;&lt;br /&gt;
                    &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;File&amp;quot; /&amp;gt;&lt;br /&gt;
                    &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;Yes, primary menuitems can have a tooltip&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,7},{0,0},{0,30},{0,21}}&amp;quot; /&amp;gt;&lt;br /&gt;
                    &amp;lt;Property Name=&amp;quot;VerticalAlignment&amp;quot; Value=&amp;quot;Centre&amp;quot; /&amp;gt;&lt;br /&gt;
                    &amp;lt;Window Type=&amp;quot;TaharezLook/PopupMenu&amp;quot; Name=&amp;quot;Root/FrameWindow/Menubar/File/AutoPopup&amp;quot; &amp;gt;&lt;br /&gt;
                        &amp;lt;Property Name=&amp;quot;Visible&amp;quot; Value=&amp;quot;False&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;Property Name=&amp;quot;FadeInTime&amp;quot; Value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;Property Name=&amp;quot;FadeOutTime&amp;quot; Value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;Property Name=&amp;quot;ItemSpacing&amp;quot; Value=&amp;quot;2&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;ClippedByParent&amp;quot; Value=&amp;quot;False&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0,0},{0,0},{0,42},{0,119.174}}&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;Property Name=&amp;quot;AutoResizeEnabled&amp;quot; Value=&amp;quot;True&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/FrameWindow/Menubar/File/New&amp;quot; &amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;New&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;Creates a new document.&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,2},{0,2},{0,39},{0,23}}&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;/Window&amp;gt;&lt;br /&gt;
                        &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/FrameWindow/Menubar/File/Open&amp;quot; &amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Open...&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;Opens an existing document.&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,2},{0,25},{0,39},{0,46}}&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;/Window&amp;gt;&lt;br /&gt;
                        &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/FrameWindow/Menubar/File/Close&amp;quot; &amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Close&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;Closes the active document.&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,2},{0,48},{0,39},{0,69}}&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;/Window&amp;gt;&lt;br /&gt;
                        &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/FrameWindow/Menubar/File/Save&amp;quot; &amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Save&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;Saves the active document.&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,2},{0,71},{0,39},{0,92}}&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;/Window&amp;gt;&lt;br /&gt;
                        &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/FrameWindow/Menubar/File/Exit&amp;quot; &amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Exit&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;Quits the application; prompts you to save documents.&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,2},{0,94},{0,39},{0,115}}&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;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/FrameWindow/Menubar/Edit&amp;quot; &amp;gt;&lt;br /&gt;
                    &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Edit&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,40},{0,0},{0,64},{0,21}}&amp;quot; /&amp;gt;&lt;br /&gt;
                    &amp;lt;Property Name=&amp;quot;VerticalAlignment&amp;quot; Value=&amp;quot;Centre&amp;quot; /&amp;gt;&lt;br /&gt;
                    &amp;lt;Window Type=&amp;quot;TaharezLook/PopupMenu&amp;quot; Name=&amp;quot;Root/FrameWindow/Menubar/Edit/AutoPopup&amp;quot; &amp;gt;&lt;br /&gt;
                        &amp;lt;Property Name=&amp;quot;Visible&amp;quot; Value=&amp;quot;False&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;Property Name=&amp;quot;FadeInTime&amp;quot; Value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;Property Name=&amp;quot;FadeOutTime&amp;quot; Value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;Property Name=&amp;quot;ItemSpacing&amp;quot; Value=&amp;quot;2&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;ClippedByParent&amp;quot; Value=&amp;quot;False&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0,0},{0,0},{0,65},{0,118.661}}&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;Property Name=&amp;quot;AutoResizeEnabled&amp;quot; Value=&amp;quot;True&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/FrameWindow/Menubar/Edit/Cut&amp;quot; &amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Cut&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;Cuts the selection and puts it on the Clipboard.&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,2},{0,2},{0,62},{0,23}}&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;/Window&amp;gt;&lt;br /&gt;
                        &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/FrameWindow/Menubar/Edit/Copy&amp;quot; &amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Copy&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;Copies the selection and puts it on the Clipboard.&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,2},{0,25},{0,62},{0,46}}&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;/Window&amp;gt;&lt;br /&gt;
                        &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/FrameWindow/Menubar/Edit/Paste&amp;quot; &amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Paste&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;Inserts the Clipboard contents.&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,2},{0,48},{0,62},{0,69}}&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;/Window&amp;gt;&lt;br /&gt;
                        &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/FrameWindow/Menubar/Edit/Delete&amp;quot; &amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Delete&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;Erases the selection.&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,2},{0,71},{0,62},{0,92}}&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;/Window&amp;gt;&lt;br /&gt;
                        &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/FrameWindow/Menubar/Edit/SubMenu&amp;quot; &amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;SubMenu&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;This menuitem has a submenu&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,2},{0,94},{0,62},{0,115}}&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Window Type=&amp;quot;TaharezLook/PopupMenu&amp;quot; Name=&amp;quot;Root/FrameWindow/Menubar/Edit/SubMenu/AutoPopup&amp;quot; &amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Visible&amp;quot; Value=&amp;quot;False&amp;quot; /&amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;FadeInTime&amp;quot; Value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;FadeOutTime&amp;quot; Value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;ItemSpacing&amp;quot; Value=&amp;quot;2&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;ClippedByParent&amp;quot; Value=&amp;quot;False&amp;quot; /&amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0,0},{0,0},{0,43},{0,49.5221}}&amp;quot; /&amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;AutoResizeEnabled&amp;quot; Value=&amp;quot;True&amp;quot; /&amp;gt;&lt;br /&gt;
                                &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/FrameWindow/Menubar/Edit/SubMenu/Item1&amp;quot; &amp;gt;&lt;br /&gt;
                                    &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Item 1&amp;quot; /&amp;gt;&lt;br /&gt;
                                    &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;This is sub-menu #1&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,2},{0,2},{0,40},{0,23}}&amp;quot; /&amp;gt;&lt;br /&gt;
                                &amp;lt;/Window&amp;gt;&lt;br /&gt;
                                &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/FrameWindow/Menubar/Edit/SubMenu/Item2&amp;quot; &amp;gt;&lt;br /&gt;
                                    &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Item 2&amp;quot; /&amp;gt;&lt;br /&gt;
                                    &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;This is sub-menu #2&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,2},{0,25},{0,40},{0,46}}&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;/Window&amp;gt;&lt;br /&gt;
                &amp;lt;/Window&amp;gt;&lt;br /&gt;
                &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/FrameWindow/Menubar/Help&amp;quot; &amp;gt;&lt;br /&gt;
                    &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Help&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,74},{0,0},{0,100},{0,21}}&amp;quot; /&amp;gt;&lt;br /&gt;
                    &amp;lt;Property Name=&amp;quot;VerticalAlignment&amp;quot; Value=&amp;quot;Centre&amp;quot; /&amp;gt;&lt;br /&gt;
                    &amp;lt;Window Type=&amp;quot;TaharezLook/PopupMenu&amp;quot; Name=&amp;quot;Root/FrameWindow/Menubar/Help/AutoPopup&amp;quot; &amp;gt;&lt;br /&gt;
                        &amp;lt;Property Name=&amp;quot;Visible&amp;quot; Value=&amp;quot;False&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;Property Name=&amp;quot;FadeInTime&amp;quot; Value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;Property Name=&amp;quot;FadeOutTime&amp;quot; Value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;Property Name=&amp;quot;ItemSpacing&amp;quot; Value=&amp;quot;2&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;ClippedByParent&amp;quot; Value=&amp;quot;False&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0,0},{0,0},{0,64},{0,49.1331}}&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;Property Name=&amp;quot;AutoResizeEnabled&amp;quot; Value=&amp;quot;True&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/FrameWindow/Menubar/Help/Contents&amp;quot; &amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Contents...&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;Displays the help contents.&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,2},{0,2},{0,61},{0,23}}&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;/Window&amp;gt;&lt;br /&gt;
                        &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/FrameWindow/Menubar/Help/About&amp;quot; &amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;About...&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;Displays program information, version number, and copyright.&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,2},{0,25},{0,61},{0,46}}&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;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/StaticText&amp;quot; Name=&amp;quot;Root/FrameWindow/Status&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.031818,0},{0.873954,0},{0.972728,0},{0.967087,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;Root/FrameWindow/FirstPopup&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;First Popup&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;HorzFormatting&amp;quot; Value=&amp;quot;HorzCentred&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.131194,0},{0.701449,0},{0.431194,0},{0.795652,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;Root/FrameWindow/SecondPopup&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;Second Popup&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;HorzFormatting&amp;quot; Value=&amp;quot;HorzCentred&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.572904,0},{0.701449,0},{0.872903,0},{0.795652,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 Type=&amp;quot;TaharezLook/Menubar&amp;quot; Name=&amp;quot;Root/Popup&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;ItemSpacing&amp;quot; Value=&amp;quot;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.565585,0},{0.07,0},{0.684029,0},{0.140833,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/Popup/PopupMenus&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;PopupMenus&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,7},{0,0},{0,73},{0,21}}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;VerticalAlignment&amp;quot; Value=&amp;quot;Centre&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Window Type=&amp;quot;TaharezLook/PopupMenu&amp;quot; Name=&amp;quot;Root/Popup/PopupMenus/AutoPopup&amp;quot; &amp;gt;&lt;br /&gt;
                    &amp;lt;Property Name=&amp;quot;FadeInTime&amp;quot; Value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                    &amp;lt;Property Name=&amp;quot;FadeOutTime&amp;quot; Value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                    &amp;lt;Property Name=&amp;quot;ItemSpacing&amp;quot; Value=&amp;quot;2&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;ClippedByParent&amp;quot; Value=&amp;quot;False&amp;quot; /&amp;gt;&lt;br /&gt;
                    &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0,0},{0,21},{0,57},{0,116.749}}&amp;quot; /&amp;gt;&lt;br /&gt;
                    &amp;lt;Property Name=&amp;quot;AutoResizeEnabled&amp;quot; Value=&amp;quot;True&amp;quot; /&amp;gt;&lt;br /&gt;
                    &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/Popup/PopupMenus/FirstPopup&amp;quot; &amp;gt;&lt;br /&gt;
                        &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;First&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,2},{0,2},{0,54},{0,23}}&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;Window Type=&amp;quot;TaharezLook/PopupMenu&amp;quot; Name=&amp;quot;Root/Popup/PopupMenus/FirstPopup/AutoPopup&amp;quot; &amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;FadeInTime&amp;quot; Value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;FadeOutTime&amp;quot; Value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;ItemSpacing&amp;quot; Value=&amp;quot;2&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;ClippedByParent&amp;quot; Value=&amp;quot;False&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0,52},{0,0},{0,97},{0,119.266}}&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;AutoResizeEnabled&amp;quot; Value=&amp;quot;True&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/Popup/PopupMenus/FirstPopup/First-1&amp;quot; &amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;First-1&amp;quot; /&amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;First-1&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,2},{0,2},{0,42},{0,23}}&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;/Window&amp;gt;&lt;br /&gt;
                            &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/Popup/PopupMenus/FirstPopup/First-2&amp;quot; &amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;First-2&amp;quot; /&amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;First-2&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,2},{0,25},{0,42},{0,46}}&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;/Window&amp;gt;&lt;br /&gt;
                            &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/Popup/PopupMenus/FirstPopup/First-3&amp;quot; &amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;First-3&amp;quot; /&amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;First-3&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,2},{0,48},{0,42},{0,69}}&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;/Window&amp;gt;&lt;br /&gt;
                            &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/Popup/PopupMenus/FirstPopup/First-4&amp;quot; &amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;First-4&amp;quot; /&amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;First-4&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,2},{0,71},{0,42},{0,92}}&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;/Window&amp;gt;&lt;br /&gt;
                            &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/Popup/PopupMenus/FirstPopup/First-5&amp;quot; &amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;First-5&amp;quot; /&amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;First-5&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,2},{0,94},{0,42},{0,115}}&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;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/Popup/PopupMenus/SecondPopup&amp;quot; &amp;gt;&lt;br /&gt;
                        &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Second&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,2},{0,25},{0,54},{0,46}}&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;Window Type=&amp;quot;TaharezLook/PopupMenu&amp;quot; Name=&amp;quot;Root/Popup/PopupMenus/SecondPopup/AutoPopup&amp;quot; &amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;FadeInTime&amp;quot; Value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;FadeOutTime&amp;quot; Value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;ItemSpacing&amp;quot; Value=&amp;quot;2&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;ClippedByParent&amp;quot; Value=&amp;quot;False&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0,52},{0,0},{0,117},{0,119.11}}&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;AutoResizeEnabled&amp;quot; Value=&amp;quot;True&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/Popup/PopupMenus/SecondPopup/Second-1&amp;quot; &amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Second-1&amp;quot; /&amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;Second-1&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,2},{0,2},{0,62},{0,23}}&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;/Window&amp;gt;&lt;br /&gt;
                            &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/Popup/PopupMenus/SecondPopup/Second-2&amp;quot; &amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Second-2&amp;quot; /&amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;Second-2&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,2},{0,25},{0,62},{0,46}}&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;/Window&amp;gt;&lt;br /&gt;
                            &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/Popup/PopupMenus/SecondPopup/Second-3&amp;quot; &amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Second-3&amp;quot; /&amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;Second-3&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,2},{0,48},{0,62},{0,69}}&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;/Window&amp;gt;&lt;br /&gt;
                            &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/Popup/PopupMenus/SecondPopup/Second-4&amp;quot; &amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Second-4&amp;quot; /&amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;Second-4&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,2},{0,71},{0,62},{0,92}}&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;/Window&amp;gt;&lt;br /&gt;
                            &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/Popup/PopupMenus/SecondPopup/SubMenu&amp;quot; &amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;SubMenu&amp;quot; /&amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;SubMenu&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,2},{0,94},{0,62},{0,115}}&amp;quot; /&amp;gt;&lt;br /&gt;
                                &amp;lt;Window Type=&amp;quot;TaharezLook/PopupMenu&amp;quot; Name=&amp;quot;Root/Popup/PopupMenus/SecondPopup/SubMenu/AutoPopup&amp;quot; &amp;gt;&lt;br /&gt;
                                    &amp;lt;Property Name=&amp;quot;FadeInTime&amp;quot; Value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                                    &amp;lt;Property Name=&amp;quot;FadeOutTime&amp;quot; Value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                                    &amp;lt;Property Name=&amp;quot;ItemSpacing&amp;quot; Value=&amp;quot;2&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;ClippedByParent&amp;quot; Value=&amp;quot;False&amp;quot; /&amp;gt;&lt;br /&gt;
                                    &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0,60},{0,0},{0,118},{0,49.3892}}&amp;quot; /&amp;gt;&lt;br /&gt;
                                    &amp;lt;Property Name=&amp;quot;AutoResizeEnabled&amp;quot; Value=&amp;quot;True&amp;quot; /&amp;gt;&lt;br /&gt;
                                    &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/Popup/PopupMenus/SecondPopup/SubMenu/SubItem1&amp;quot; &amp;gt;&lt;br /&gt;
                                        &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;SubItem1&amp;quot; /&amp;gt;&lt;br /&gt;
                                        &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;SubItem1&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,2},{0,2},{0,55},{0,23}}&amp;quot; /&amp;gt;&lt;br /&gt;
                                    &amp;lt;/Window&amp;gt;&lt;br /&gt;
                                    &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/Popup/PopupMenus/SecondPopup/SubMenu/SubItem2&amp;quot; &amp;gt;&lt;br /&gt;
                                        &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;SubItem2&amp;quot; /&amp;gt;&lt;br /&gt;
                                        &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;SubItem2&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,2},{0,25},{0,55},{0,46}}&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;/Window&amp;gt;&lt;br /&gt;
                    &amp;lt;/Window&amp;gt;&lt;br /&gt;
                    &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/Popup/PopupMenus/FramePopup&amp;quot; &amp;gt;&lt;br /&gt;
                        &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Frame&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,2},{0,48},{0,54},{0,69}}&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;Window Type=&amp;quot;TaharezLook/PopupMenu&amp;quot; Name=&amp;quot;Root/Popup/PopupMenus/FramePopup/AutoPopup&amp;quot; &amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;FadeInTime&amp;quot; Value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;FadeOutTime&amp;quot; Value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;ItemSpacing&amp;quot; Value=&amp;quot;2&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;ClippedByParent&amp;quot; Value=&amp;quot;False&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0,52},{0,0},{0,104},{0,49.3892}}&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;AutoResizeEnabled&amp;quot; Value=&amp;quot;True&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/Popup/PopupMenus/FramePopup/Frame-1&amp;quot; &amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Frame-1&amp;quot; /&amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;Frame-1&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,2},{0,2},{0,49},{0,23}}&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;/Window&amp;gt;&lt;br /&gt;
                            &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/Popup/PopupMenus/FramePopup/Frame-2&amp;quot; &amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Frame-2&amp;quot; /&amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;Frame-2&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,2},{0,25},{0,49},{0,46}}&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;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/Popup/PopupMenus/SheetPopup&amp;quot; &amp;gt;&lt;br /&gt;
                        &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Sheet&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,2},{0,71},{0,54},{0,92}}&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;Window Type=&amp;quot;TaharezLook/PopupMenu&amp;quot; Name=&amp;quot;Root/Popup/PopupMenus/SheetPopup/AutoPopup&amp;quot; &amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;FadeInTime&amp;quot; Value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;FadeOutTime&amp;quot; Value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;ItemSpacing&amp;quot; Value=&amp;quot;2&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;ClippedByParent&amp;quot; Value=&amp;quot;False&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0,52},{0,0},{0,87},{0,119.243}}&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;AutoResizeEnabled&amp;quot; Value=&amp;quot;True&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/Popup/PopupMenus/SheetPopup/Allo&amp;quot; &amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Allo&amp;quot; /&amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;FranÃ§ais&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,2},{0,2},{0,32},{0,23}}&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;/Window&amp;gt;&lt;br /&gt;
                            &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/Popup/PopupMenus/SheetPopup/Hello&amp;quot; &amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Hello&amp;quot; /&amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;English&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,2},{0,25},{0,32},{0,46}}&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;/Window&amp;gt;&lt;br /&gt;
                            &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/Popup/PopupMenus/SheetPopup/Hallo&amp;quot; &amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Hallo&amp;quot; /&amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;Deutsch&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,2},{0,48},{0,32},{0,69}}&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;/Window&amp;gt;&lt;br /&gt;
                            &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/Popup/PopupMenus/SheetPopup/Ciao&amp;quot; &amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Ciao&amp;quot; /&amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;Italiano&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,2},{0,71},{0,32},{0,92}}&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;/Window&amp;gt;&lt;br /&gt;
                            &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/Popup/PopupMenus/SheetPopup/Hola&amp;quot; &amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Hola&amp;quot; /&amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;EspaÃ±ol&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,2},{0,94},{0,32},{0,115}}&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;/Window&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>Rackle</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=Game_chat_box&amp;diff=2840</id>
		<title>Game chat box</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=Game_chat_box&amp;diff=2840"/>
				<updated>2008-02-02T19:50:26Z</updated>
		
		<summary type="html">&lt;p&gt;Rackle: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Introduction ===&lt;br /&gt;
This snippet implements a chat box that can display text in various fonts and font sizes as well as limiting the number of entries (history) to a certain number.  Please discuss this article within the [http://www.cegui.org.uk/phpBB2/viewtopic.php?p=13333 GameChatBox] thread.&lt;br /&gt;
&lt;br /&gt;
==== .layout Special Features ====&lt;br /&gt;
The layout definition is deceptively simple.  It defines a FrameWindow containing two widgets; a Listbox in the upper region for chat history and an Editbox at the lower region for text input.&lt;br /&gt;
&lt;br /&gt;
What is not apparent is how the bottom portion of the Listbox and the entire Editbox are defined; they specify a proportion of 100% of their parent but with a negative offset.  Essentially the bottom of the Listbox extends to the bottom of the FrameWindow (the parent) and is then moved &amp;quot;up&amp;quot; to make room for the Editbox.  And the Editbox follows the same pattern.  This allows the Editbox to retain its height as the parent FrameWindow is resized.  The height of the Editbox is controlled by the height of the font used.&lt;br /&gt;
&lt;br /&gt;
Another feature is that rather than initializing values in code I opted to initialize them via the .layout.  Thus the history has an initial value of 5 and the default font size is 10.  The font name Combobox defines the logical font name for the dynamic font used within the chat box.  This type of definition, rather than Commonwealth-10, Commonwealth-12, etc allows us to change the font of the chat box without affecting any other widget that may use a font of the same logical name.&lt;br /&gt;
&lt;br /&gt;
For more details on dynamically creating fonts consult [[DynamicFont]]&lt;br /&gt;
&lt;br /&gt;
=== Files ===&lt;br /&gt;
==== ChatBox_demo.h ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
#ifndef _ChatBox_h_&lt;br /&gt;
#define _ChatBox_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;
#include &amp;quot;CEGUIXMLAttributes.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;ChatBox.layout&amp;quot;);&lt;br /&gt;
			sheet-&amp;gt;addChildWindow(guiLayout);&lt;br /&gt;
&lt;br /&gt;
			// Obtain the handles of some widgets&lt;br /&gt;
			Window* historySize = winMgr.getWindow(&amp;quot;/ChatBox/History&amp;quot;);&lt;br /&gt;
			Window* fontName = winMgr.getWindow(&amp;quot;/ChatBox/FontName&amp;quot;);&lt;br /&gt;
			Spinner* fontSize = static_cast&amp;lt;Spinner*&amp;gt;(winMgr.getWindow(&amp;quot;/ChatBox/FontSize&amp;quot;));&lt;br /&gt;
			Window* chatText = winMgr.getWindow(&amp;quot;/ChatBox/Text&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			// Disable widgets until a valid font is registered&lt;br /&gt;
			fontName-&amp;gt;setEnabled(false);&lt;br /&gt;
			fontSize-&amp;gt;setEnabled(false);&lt;br /&gt;
			chatText-&amp;gt;setEnabled(false);&lt;br /&gt;
&lt;br /&gt;
			// Retrieve the design-specified values&lt;br /&gt;
			mHistorySize = static_cast&amp;lt;size_t&amp;gt;(PropertyHelper::stringToUint(historySize-&amp;gt;getText()));&lt;br /&gt;
			mDefaultFontSize = fontSize-&amp;gt;getText();&lt;br /&gt;
			mChatFontName = fontName-&amp;gt;getText();&lt;br /&gt;
			setHistorySize(mHistorySize);&lt;br /&gt;
			fontName-&amp;gt;setText(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			// Configure the history size&lt;br /&gt;
			// Pressing &amp;lt;ENTER&amp;gt; changes the maximal number of entries within the history Listbox&lt;br /&gt;
			historySize-&amp;gt;subscribeEvent(Editbox::EventTextAccepted,	Event::Subscriber(&amp;amp;DemoSample::Event_HistorySizeChange, this)); &lt;br /&gt;
&lt;br /&gt;
			// Configure the text Editbox&lt;br /&gt;
			// Pressing &amp;lt;ENTER&amp;gt; puts the text into the history Listbox&lt;br /&gt;
			chatText-&amp;gt;subscribeEvent(Editbox::EventTextAccepted,	Event::Subscriber(&amp;amp;DemoSample::Event_ChatTextAdded,	this)); &lt;br /&gt;
&lt;br /&gt;
			// Configure the font name Combobox&lt;br /&gt;
			// Selecting a name changes the font used in the history Listbox and the text Editbox&lt;br /&gt;
			fontName-&amp;gt;subscribeEvent(Combobox::EventTextChanged,	Event::Subscriber(&amp;amp;DemoSample::Event_FontChange,	this)); &lt;br /&gt;
&lt;br /&gt;
			// Configure the font size Spinner&lt;br /&gt;
			// Selecting a size changes the font size used in the history Listbox and the text Editbox&lt;br /&gt;
			fontSize-&amp;gt;subscribeEvent(Spinner::EventValueChanged,	Event::Subscriber(&amp;amp;DemoSample::Event_FontChange,	this)); &lt;br /&gt;
			fontSize-&amp;gt;setTextInputMode(Spinner::Integer);&lt;br /&gt;
			fontSize-&amp;gt;setMinimumValue(4.0f);&lt;br /&gt;
			fontSize-&amp;gt;setMaximumValue(72.0f);&lt;br /&gt;
			fontSize-&amp;gt;setStepSize(1.0f);&lt;br /&gt;
			fontSize-&amp;gt;setCurrentValue(PropertyHelper::stringToFloat(mDefaultFontSize));&lt;br /&gt;
&lt;br /&gt;
			// Initialize the list of fonts&lt;br /&gt;
			// The first registered font becomes the active font&lt;br /&gt;
			registerFont(&amp;quot;Commonwealth&amp;quot;,	&amp;quot;Commonv2c.ttf&amp;quot;);&lt;br /&gt;
			registerFont(&amp;quot;DejaVuSans&amp;quot;,		&amp;quot;DejaVuSans.ttf&amp;quot;);&lt;br /&gt;
			registerFont(&amp;quot;Iconified&amp;quot;,		&amp;quot;Iconiv2.ttf&amp;quot;);&lt;br /&gt;
			registerFont(&amp;quot;MissingFile&amp;quot;,		&amp;quot;MissingFile.ttf&amp;quot;);  // What happens if a font is missing?&lt;br /&gt;
			registerFont(&amp;quot;Pixmap Font&amp;quot;,		&amp;quot;FairChar-30.font&amp;quot;); // And what about a non-Freetype font?&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;
	}&lt;br /&gt;
&lt;br /&gt;
	bool Event_HistorySizeChange(const CEGUI::EventArgs&amp;amp; args)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
		CEGUI::Window* historySize = winMgr.getWindow(&amp;quot;/ChatBox/History&amp;quot;);&lt;br /&gt;
		int size = PropertyHelper::stringToInt( historySize-&amp;gt;getText() );&lt;br /&gt;
		setHistorySize(size);&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool Event_ChatTextAdded(const CEGUI::EventArgs&amp;amp; args)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
		Editbox* chatText = static_cast&amp;lt;Editbox*&amp;gt; (winMgr.getWindow(&amp;quot;/ChatBox/Text&amp;quot;));&lt;br /&gt;
		addChatText(chatText-&amp;gt;getText());&lt;br /&gt;
&lt;br /&gt;
		// Clear the text in the Editbox&lt;br /&gt;
		chatText-&amp;gt;setText(&amp;quot;&amp;quot;);&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool Event_FontChange(const CEGUI::EventArgs&amp;amp; args)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
		Window* fontName = winMgr.getWindow(&amp;quot;/ChatBox/FontName&amp;quot;);&lt;br /&gt;
		String name = fontName-&amp;gt;getText();&lt;br /&gt;
&lt;br /&gt;
		Spinner* fontSize = static_cast&amp;lt;Spinner*&amp;gt;(winMgr.getWindow(&amp;quot;/ChatBox/FontSize&amp;quot;));&lt;br /&gt;
		String size = PropertyHelper::floatToString(fontSize-&amp;gt;getCurrentValue());&lt;br /&gt;
&lt;br /&gt;
		Window* chatText = winMgr.getWindow(&amp;quot;/ChatBox/Text&amp;quot;);&lt;br /&gt;
		chatText-&amp;gt;setText(name + &amp;quot; - &amp;quot; + size);&lt;br /&gt;
&lt;br /&gt;
		changeFont(name, size);&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	void setHistorySize(const size_t&amp;amp; pSize)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		if(pSize &amp;gt; 0)&lt;br /&gt;
		{&lt;br /&gt;
			// A better validation would be to enforce a minimal and a maximal size&lt;br /&gt;
			mHistorySize = pSize;&lt;br /&gt;
&lt;br /&gt;
			WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
			Listbox* chatHistory = static_cast&amp;lt;Listbox*&amp;gt; (winMgr.getWindow(&amp;quot;/ChatBox/List&amp;quot;));&lt;br /&gt;
			ListboxItem* chatItem;&lt;br /&gt;
			while(chatHistory-&amp;gt;getItemCount() &amp;gt; mHistorySize)&lt;br /&gt;
			{&lt;br /&gt;
				// There are too many items within the history Listbox, purging them one at a time&lt;br /&gt;
				chatItem = chatHistory-&amp;gt;getListboxItemFromIndex(0);&lt;br /&gt;
				chatHistory-&amp;gt;removeItem(chatItem);&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	void addChatText(const CEGUI::String&amp;amp; pText)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
		Listbox* chatHistory = static_cast&amp;lt;Listbox*&amp;gt; (winMgr.getWindow(&amp;quot;/ChatBox/List&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
		// If there's text then add it&lt;br /&gt;
		if(pText.size())&lt;br /&gt;
		{&lt;br /&gt;
			// Add the Editbox text to the history Listbox&lt;br /&gt;
			ListboxTextItem* chatItem;&lt;br /&gt;
			if(chatHistory-&amp;gt;getItemCount() == mHistorySize)&lt;br /&gt;
			{&lt;br /&gt;
				/* We have reached the capacity of the Listbox so re-use the first Listbox item.&lt;br /&gt;
				   This code is a little crafty.  By default the ListboxTextItem is created with&lt;br /&gt;
				   the auto-delete flag set to true, which results in its automatic deletion when&lt;br /&gt;
				   removed from the Listbox.  So we change that flag to false, extract the item&lt;br /&gt;
				   from the Listbox, change its text, put the auto-delete flag back to true, and&lt;br /&gt;
				   finally put the item back into the Listbox. */&lt;br /&gt;
				chatItem = static_cast&amp;lt;ListboxTextItem*&amp;gt;(chatHistory-&amp;gt;getListboxItemFromIndex(0));&lt;br /&gt;
				chatItem-&amp;gt;setAutoDeleted(false);&lt;br /&gt;
				chatHistory-&amp;gt;removeItem(chatItem);&lt;br /&gt;
				chatItem-&amp;gt;setAutoDeleted(true);&lt;br /&gt;
				chatItem-&amp;gt;setText(pText);&lt;br /&gt;
			}&lt;br /&gt;
			else&lt;br /&gt;
			{&lt;br /&gt;
				// Create a new listbox item&lt;br /&gt;
				chatItem = new ListboxTextItem(pText);&lt;br /&gt;
			}&lt;br /&gt;
			chatHistory-&amp;gt;addItem(chatItem);&lt;br /&gt;
			chatHistory-&amp;gt;ensureItemIsVisible(chatHistory-&amp;gt;getItemCount());&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	void registerFont(const CEGUI::String&amp;amp; pLogicalName, const CEGUI::String&amp;amp; pFileName)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		// Ensure that font names are registered only once&lt;br /&gt;
		if(mFontList.find(pLogicalName) == mFontList.end())&lt;br /&gt;
		{&lt;br /&gt;
			// Test the font so that only valid fonts are available&lt;br /&gt;
			String testFont = mChatFontName;&lt;br /&gt;
			if(mFontList.size() != 0)&lt;br /&gt;
			{&lt;br /&gt;
				// If the list is empty then attempt to create the font using the &amp;quot;real&amp;quot; font name&lt;br /&gt;
				// Otherwise use a &amp;quot;test&amp;quot; font name so as not to corrupt the &amp;quot;real&amp;quot; one&lt;br /&gt;
				testFont += &amp;quot;__test_font__&amp;quot;;&lt;br /&gt;
			}&lt;br /&gt;
			Font* font = makeFont(testFont, pFileName, mDefaultFontSize);&lt;br /&gt;
			if(mFontList.size() != 0&lt;br /&gt;
				&amp;amp;&amp;amp; FontManager::getSingleton().isFontPresent(testFont))&lt;br /&gt;
			{&lt;br /&gt;
				// Since this was only a test font we destroy it&lt;br /&gt;
				FontManager::getSingleton().destroyFont(testFont);&lt;br /&gt;
			}&lt;br /&gt;
			if(!font)&lt;br /&gt;
			{&lt;br /&gt;
				// This font is invalid&lt;br /&gt;
				if(FontManager::getSingleton().isFontPresent(testFont))&lt;br /&gt;
					return;&lt;br /&gt;
				else&lt;br /&gt;
				return;&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
			Combobox* fontName = static_cast&amp;lt;Combobox*&amp;gt;(winMgr.getWindow(&amp;quot;/ChatBox/FontName&amp;quot;));&lt;br /&gt;
			mFontList[pLogicalName] = pFileName;&lt;br /&gt;
			ListboxTextItem* fontNameItem = new ListboxTextItem(pLogicalName);&lt;br /&gt;
			fontNameItem-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
			fontName-&amp;gt;addItem(fontNameItem);&lt;br /&gt;
			if(fontName-&amp;gt;getItemCount() == 1)&lt;br /&gt;
			{&lt;br /&gt;
				// Enable widgets now that at least one valid font has been found&lt;br /&gt;
				Spinner* fontSize = static_cast&amp;lt;Spinner*&amp;gt;(winMgr.getWindow(&amp;quot;/ChatBox/FontSize&amp;quot;));&lt;br /&gt;
				Window* chatText = winMgr.getWindow(&amp;quot;/ChatBox/Text&amp;quot;);&lt;br /&gt;
				fontName-&amp;gt;setEnabled(true);&lt;br /&gt;
				fontSize-&amp;gt;setEnabled(true);&lt;br /&gt;
				chatText-&amp;gt;setEnabled(true);&lt;br /&gt;
&lt;br /&gt;
				// The first registered font becomes the active font&lt;br /&gt;
				fontName-&amp;gt;setText(pLogicalName); // This triggers a call to changeFont&lt;br /&gt;
				fontName-&amp;gt;setItemSelectState(fontNameItem, true);&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
protected:&lt;br /&gt;
	CEGUI::Font* makeFont(const CEGUI::String&amp;amp; pFontName, const CEGUI::String&amp;amp; pFileName, const CEGUI::String&amp;amp; pSize)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		Font* font;&lt;br /&gt;
		try&lt;br /&gt;
		{&lt;br /&gt;
			if(FontManager::getSingleton().isFontPresent(pFontName))&lt;br /&gt;
			{&lt;br /&gt;
				// The chat font is reused rather than deleted and recreated&lt;br /&gt;
				// every time an attribute changes.  For this reason it is&lt;br /&gt;
				// important to use a unique logical name for the font.&lt;br /&gt;
				font = FontManager::getSingleton().getFont(pFontName);&lt;br /&gt;
				font-&amp;gt;setProperty(&amp;quot;FileName&amp;quot;, pFileName);&lt;br /&gt;
				font-&amp;gt;setProperty(&amp;quot;PointSize&amp;quot;, pSize);&lt;br /&gt;
			}&lt;br /&gt;
			else&lt;br /&gt;
			{&lt;br /&gt;
				// This is the first time we make the chat font so we need to create it&lt;br /&gt;
				XMLAttributes xmlAttributes;&lt;br /&gt;
&lt;br /&gt;
				// CEGUIFont.cpp&lt;br /&gt;
				xmlAttributes.add(&amp;quot;Name&amp;quot;, pFontName);&lt;br /&gt;
				xmlAttributes.add(&amp;quot;Filename&amp;quot;, pFileName);&lt;br /&gt;
				xmlAttributes.add(&amp;quot;ResourceGroup&amp;quot;, &amp;quot;&amp;quot;);&lt;br /&gt;
				xmlAttributes.add(&amp;quot;AutoScaled&amp;quot;, &amp;quot;true&amp;quot;);&lt;br /&gt;
				xmlAttributes.add(&amp;quot;NativeHorzRes&amp;quot;, &amp;quot;800&amp;quot;);&lt;br /&gt;
				xmlAttributes.add(&amp;quot;NativeVertRes&amp;quot;, &amp;quot;600&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
				// CEGUIXMLAttributes.cpp&lt;br /&gt;
				xmlAttributes.add(&amp;quot;Size&amp;quot;, pSize);&lt;br /&gt;
				xmlAttributes.add(&amp;quot;AntiAlias&amp;quot;, &amp;quot;true&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
				font = FontManager::getSingleton().createFont(&amp;quot;FreeType&amp;quot;, xmlAttributes);&lt;br /&gt;
			}&lt;br /&gt;
			font-&amp;gt;load();&lt;br /&gt;
		}&lt;br /&gt;
		catch(Exception&amp;amp; e)&lt;br /&gt;
		{&lt;br /&gt;
			// Display the error message in the chat window&lt;br /&gt;
			addChatText(e.getMessage());&lt;br /&gt;
			font = 0;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return font;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	void changeFont(const CEGUI::String&amp;amp; pFontLogicalName, const CEGUI::String&amp;amp; pFontSize)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
&lt;br /&gt;
		if(!FontManager::getSingleton().isFontPresent(mChatFontName))&lt;br /&gt;
		{&lt;br /&gt;
			addChatText(&amp;quot;You must call registerFont() at least once with a valid font&amp;quot;);&lt;br /&gt;
			return;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		FontList::iterator itFontList = mFontList.find(pFontLogicalName);&lt;br /&gt;
		if(itFontList == mFontList.end())&lt;br /&gt;
		{&lt;br /&gt;
			addChatText(pFontLogicalName + &amp;quot; has not been registered&amp;quot;);&lt;br /&gt;
			return;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Measure the height of the selected font&lt;br /&gt;
		Font* currentFont = makeFont(mChatFontName, (*itFontList).second, pFontSize);&lt;br /&gt;
		float fontHeight = currentFont-&amp;gt;getFontHeight();&lt;br /&gt;
&lt;br /&gt;
		/* Alter the area of the Editbox.  The original value is {{0.01,0},{1,-30},{0.99,0},{1,-5}}&lt;br /&gt;
		   The value we are altering is the &amp;quot;-30&amp;quot; within the second couplet, defining the position of&lt;br /&gt;
		   the upper y coordinate of the Editbox.  We base the new value on the position of the lower&lt;br /&gt;
		   y coordinate, which is &amp;quot;-5&amp;quot;, and the height of the font.  To this we add some space &amp;quot;10&amp;quot; to&lt;br /&gt;
		   account for the Editbox's border. */&lt;br /&gt;
		Editbox* editBox = static_cast&amp;lt;Editbox*&amp;gt; (winMgr.getWindow(&amp;quot;/ChatBox/Text&amp;quot;));&lt;br /&gt;
		URect chatTextArea = editBox-&amp;gt;getArea();&lt;br /&gt;
		chatTextArea.d_min.d_y.d_offset = chatTextArea.d_max.d_y.d_offset&lt;br /&gt;
										- fontHeight&lt;br /&gt;
										- 10;&lt;br /&gt;
		editBox-&amp;gt;setArea(chatTextArea);&lt;br /&gt;
		editBox-&amp;gt;setFont(currentFont);&lt;br /&gt;
&lt;br /&gt;
		/* Alther the area of the Listbox.  Here we only need the lower y coordinate.  Since this&lt;br /&gt;
		   value is the same as the upper y coordinate of the Editbox we do not need to calculate&lt;br /&gt;
		   it.  We also change the font of the Listbox and call upon handleUpdatedItemData() to&lt;br /&gt;
		   update the current Listbox items.  Finally we ensure that the last entry is still&lt;br /&gt;
		   visible. */&lt;br /&gt;
		Listbox* listBox = static_cast&amp;lt;Listbox*&amp;gt; (winMgr.getWindow(&amp;quot;/ChatBox/List&amp;quot;));&lt;br /&gt;
		URect listTextArea = listBox-&amp;gt;getArea();&lt;br /&gt;
		listTextArea.d_max.d_y.d_offset = chatTextArea.d_min.d_y.d_offset;&lt;br /&gt;
		listBox-&amp;gt;setArea(listTextArea);&lt;br /&gt;
		listBox-&amp;gt;setFont(currentFont);&lt;br /&gt;
		listBox-&amp;gt;handleUpdatedItemData();&lt;br /&gt;
		size_t itemCount = listBox-&amp;gt;getItemCount();&lt;br /&gt;
		if(itemCount)&lt;br /&gt;
		{&lt;br /&gt;
			ListboxItem* currentItem = listBox-&amp;gt;getListboxItemFromIndex(itemCount - 1);&lt;br /&gt;
			listBox-&amp;gt;ensureItemIsVisible(currentItem);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
	// Type of list for registered fonts&lt;br /&gt;
	typedef std::map&amp;lt;CEGUI::String, CEGUI::String&amp;gt; FontList;&lt;br /&gt;
&lt;br /&gt;
	// List of registered fonts&lt;br /&gt;
	FontList mFontList;&lt;br /&gt;
&lt;br /&gt;
	// Maximal number of entries to retain within the Listbox&lt;br /&gt;
	size_t mHistorySize;&lt;br /&gt;
&lt;br /&gt;
	// Logical font name dedicated to the chat box&lt;br /&gt;
	// This allows us to modify the properties of that font and not affect the fonts used elsewhere&lt;br /&gt;
	CEGUI::String mChatFontName;&lt;br /&gt;
&lt;br /&gt;
	// Default font size&lt;br /&gt;
	CEGUI::String mDefaultFontSize;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#endif // _ChatBox_h_&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Main.cpp ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&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;ChatBox_demo.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;
    int i = app.run();&lt;br /&gt;
    return i;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== ChatBox.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;/ChatBox&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Chat&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;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;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.01,0},{0.03,0},{0.6,0},{0.69375,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/Listbox&amp;quot; Name=&amp;quot;/ChatBox/List&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.02,0},{0.078,0},{0.98,0},{1,-30}}&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;/ChatBox/Text&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Error: you did not register any font or none were valid&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.02,0},{1,-30},{0.98,0},{1,-5}}&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 Type=&amp;quot;TaharezLook/Editbox&amp;quot; Name=&amp;quot;/ChatBox/History&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;5&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.77,0},{0.03,0},{0.81,0},{0.1,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;/ChatBox/HistoryLabel&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;History size:&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;HorzFormatting&amp;quot; Value=&amp;quot;RightAligned&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.65,0},{0.03,0},{0.77,0},{0.1,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;/ChatBox/FonSizeLabel&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;Font size:&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;HorzFormatting&amp;quot; Value=&amp;quot;RightAligned&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.65,0},{0.1,0},{0.77,0},{0.17,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;/Window&amp;gt;&lt;br /&gt;
        &amp;lt;Window Type=&amp;quot;TaharezLook/Spinner&amp;quot; Name=&amp;quot;/ChatBox/FontSize&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;10&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;72&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.77,0},{0.1,0},{0.83,0},{0.17,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;/ChatBox/FontNameLabel&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;Font name:&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;HorzFormatting&amp;quot; Value=&amp;quot;RightAligned&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.65,0},{0.17,0},{0.77,0},{0.24,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;/ChatBox/FontName&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;ChatBoxFont&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;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.77,0},{0.17,0},{0.99,0},{0.45,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&amp;gt;&lt;br /&gt;
&amp;lt;/GUILayout&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rackle</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=Game_chat_box&amp;diff=2839</id>
		<title>Game chat box</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=Game_chat_box&amp;diff=2839"/>
				<updated>2008-02-02T19:48:45Z</updated>
		
		<summary type="html">&lt;p&gt;Rackle: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Introduction ===&lt;br /&gt;
This snippet implements a chat box that can display text in 3 font sizes as well as limiting the number of entries (history) to a certain number.  Please discuss this article within the [http://www.cegui.org.uk/phpBB2/viewtopic.php?p=13333 GameChatBox] thread.&lt;br /&gt;
&lt;br /&gt;
==== .layout Special Features ====&lt;br /&gt;
The layout definition is deceptively simple.  It defines a FrameWindow containing two widgets; a Listbox in the upper region for chat history and an Editbox at the lower region for text input.&lt;br /&gt;
&lt;br /&gt;
What is not apparent is how the bottom portion of the Listbox and the entire Editbox are defined; they specify a proportion of 100% of their parent but with a negative offset.  Essentially the bottom of the Listbox extends to the bottom of the FrameWindow (the parent) and is then moved &amp;quot;up&amp;quot; to make room for the Editbox.  And the Editbox follows the same pattern.  This allows the Editbox to retain its height as the parent FrameWindow is resized.  The height of the Editbox is controlled by the height of the font used.&lt;br /&gt;
&lt;br /&gt;
Another feature is that rather than initializing values in code I opted to initialize them via the .layout.  Thus the history has an initial value of 5 and the default font size is 10.  The font name Combobox defines the logical font name for the dynamic font used within the chat box.  This type of definition, rather than Commonwealth-10, Commonwealth-12, etc allows us to change the font of the chat box without affecting any other widget that may use a font of the same logical name.&lt;br /&gt;
&lt;br /&gt;
For more details on dynamically creating fonts consult [[DynamicFont]]&lt;br /&gt;
&lt;br /&gt;
=== Files ===&lt;br /&gt;
==== ChatBox_demo.h ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
#ifndef _ChatBox_h_&lt;br /&gt;
#define _ChatBox_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;
#include &amp;quot;CEGUIXMLAttributes.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;ChatBox.layout&amp;quot;);&lt;br /&gt;
			sheet-&amp;gt;addChildWindow(guiLayout);&lt;br /&gt;
&lt;br /&gt;
			// Obtain the handles of some widgets&lt;br /&gt;
			Window* historySize = winMgr.getWindow(&amp;quot;/ChatBox/History&amp;quot;);&lt;br /&gt;
			Window* fontName = winMgr.getWindow(&amp;quot;/ChatBox/FontName&amp;quot;);&lt;br /&gt;
			Spinner* fontSize = static_cast&amp;lt;Spinner*&amp;gt;(winMgr.getWindow(&amp;quot;/ChatBox/FontSize&amp;quot;));&lt;br /&gt;
			Window* chatText = winMgr.getWindow(&amp;quot;/ChatBox/Text&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			// Disable widgets until a valid font is registered&lt;br /&gt;
			fontName-&amp;gt;setEnabled(false);&lt;br /&gt;
			fontSize-&amp;gt;setEnabled(false);&lt;br /&gt;
			chatText-&amp;gt;setEnabled(false);&lt;br /&gt;
&lt;br /&gt;
			// Retrieve the design-specified values&lt;br /&gt;
			mHistorySize = static_cast&amp;lt;size_t&amp;gt;(PropertyHelper::stringToUint(historySize-&amp;gt;getText()));&lt;br /&gt;
			mDefaultFontSize = fontSize-&amp;gt;getText();&lt;br /&gt;
			mChatFontName = fontName-&amp;gt;getText();&lt;br /&gt;
			setHistorySize(mHistorySize);&lt;br /&gt;
			fontName-&amp;gt;setText(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			// Configure the history size&lt;br /&gt;
			// Pressing &amp;lt;ENTER&amp;gt; changes the maximal number of entries within the history Listbox&lt;br /&gt;
			historySize-&amp;gt;subscribeEvent(Editbox::EventTextAccepted,	Event::Subscriber(&amp;amp;DemoSample::Event_HistorySizeChange, this)); &lt;br /&gt;
&lt;br /&gt;
			// Configure the text Editbox&lt;br /&gt;
			// Pressing &amp;lt;ENTER&amp;gt; puts the text into the history Listbox&lt;br /&gt;
			chatText-&amp;gt;subscribeEvent(Editbox::EventTextAccepted,	Event::Subscriber(&amp;amp;DemoSample::Event_ChatTextAdded,	this)); &lt;br /&gt;
&lt;br /&gt;
			// Configure the font name Combobox&lt;br /&gt;
			// Selecting a name changes the font used in the history Listbox and the text Editbox&lt;br /&gt;
			fontName-&amp;gt;subscribeEvent(Combobox::EventTextChanged,	Event::Subscriber(&amp;amp;DemoSample::Event_FontChange,	this)); &lt;br /&gt;
&lt;br /&gt;
			// Configure the font size Spinner&lt;br /&gt;
			// Selecting a size changes the font size used in the history Listbox and the text Editbox&lt;br /&gt;
			fontSize-&amp;gt;subscribeEvent(Spinner::EventValueChanged,	Event::Subscriber(&amp;amp;DemoSample::Event_FontChange,	this)); &lt;br /&gt;
			fontSize-&amp;gt;setTextInputMode(Spinner::Integer);&lt;br /&gt;
			fontSize-&amp;gt;setMinimumValue(4.0f);&lt;br /&gt;
			fontSize-&amp;gt;setMaximumValue(72.0f);&lt;br /&gt;
			fontSize-&amp;gt;setStepSize(1.0f);&lt;br /&gt;
			fontSize-&amp;gt;setCurrentValue(PropertyHelper::stringToFloat(mDefaultFontSize));&lt;br /&gt;
&lt;br /&gt;
			// Initialize the list of fonts&lt;br /&gt;
			// The first registered font becomes the active font&lt;br /&gt;
			registerFont(&amp;quot;Commonwealth&amp;quot;,	&amp;quot;Commonv2c.ttf&amp;quot;);&lt;br /&gt;
			registerFont(&amp;quot;DejaVuSans&amp;quot;,		&amp;quot;DejaVuSans.ttf&amp;quot;);&lt;br /&gt;
			registerFont(&amp;quot;Iconified&amp;quot;,		&amp;quot;Iconiv2.ttf&amp;quot;);&lt;br /&gt;
			registerFont(&amp;quot;MissingFile&amp;quot;,		&amp;quot;MissingFile.ttf&amp;quot;);  // What happens if a font is missing?&lt;br /&gt;
			registerFont(&amp;quot;Pixmap Font&amp;quot;,		&amp;quot;FairChar-30.font&amp;quot;); // And what about a non-Freetype font?&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;
	}&lt;br /&gt;
&lt;br /&gt;
	bool Event_HistorySizeChange(const CEGUI::EventArgs&amp;amp; args)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
		CEGUI::Window* historySize = winMgr.getWindow(&amp;quot;/ChatBox/History&amp;quot;);&lt;br /&gt;
		int size = PropertyHelper::stringToInt( historySize-&amp;gt;getText() );&lt;br /&gt;
		setHistorySize(size);&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool Event_ChatTextAdded(const CEGUI::EventArgs&amp;amp; args)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
		Editbox* chatText = static_cast&amp;lt;Editbox*&amp;gt; (winMgr.getWindow(&amp;quot;/ChatBox/Text&amp;quot;));&lt;br /&gt;
		addChatText(chatText-&amp;gt;getText());&lt;br /&gt;
&lt;br /&gt;
		// Clear the text in the Editbox&lt;br /&gt;
		chatText-&amp;gt;setText(&amp;quot;&amp;quot;);&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool Event_FontChange(const CEGUI::EventArgs&amp;amp; args)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
		Window* fontName = winMgr.getWindow(&amp;quot;/ChatBox/FontName&amp;quot;);&lt;br /&gt;
		String name = fontName-&amp;gt;getText();&lt;br /&gt;
&lt;br /&gt;
		Spinner* fontSize = static_cast&amp;lt;Spinner*&amp;gt;(winMgr.getWindow(&amp;quot;/ChatBox/FontSize&amp;quot;));&lt;br /&gt;
		String size = PropertyHelper::floatToString(fontSize-&amp;gt;getCurrentValue());&lt;br /&gt;
&lt;br /&gt;
		Window* chatText = winMgr.getWindow(&amp;quot;/ChatBox/Text&amp;quot;);&lt;br /&gt;
		chatText-&amp;gt;setText(name + &amp;quot; - &amp;quot; + size);&lt;br /&gt;
&lt;br /&gt;
		changeFont(name, size);&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	void setHistorySize(const size_t&amp;amp; pSize)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		if(pSize &amp;gt; 0)&lt;br /&gt;
		{&lt;br /&gt;
			// A better validation would be to enforce a minimal and a maximal size&lt;br /&gt;
			mHistorySize = pSize;&lt;br /&gt;
&lt;br /&gt;
			WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
			Listbox* chatHistory = static_cast&amp;lt;Listbox*&amp;gt; (winMgr.getWindow(&amp;quot;/ChatBox/List&amp;quot;));&lt;br /&gt;
			ListboxItem* chatItem;&lt;br /&gt;
			while(chatHistory-&amp;gt;getItemCount() &amp;gt; mHistorySize)&lt;br /&gt;
			{&lt;br /&gt;
				// There are too many items within the history Listbox, purging them one at a time&lt;br /&gt;
				chatItem = chatHistory-&amp;gt;getListboxItemFromIndex(0);&lt;br /&gt;
				chatHistory-&amp;gt;removeItem(chatItem);&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	void addChatText(const CEGUI::String&amp;amp; pText)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
		Listbox* chatHistory = static_cast&amp;lt;Listbox*&amp;gt; (winMgr.getWindow(&amp;quot;/ChatBox/List&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
		// If there's text then add it&lt;br /&gt;
		if(pText.size())&lt;br /&gt;
		{&lt;br /&gt;
			// Add the Editbox text to the history Listbox&lt;br /&gt;
			ListboxTextItem* chatItem;&lt;br /&gt;
			if(chatHistory-&amp;gt;getItemCount() == mHistorySize)&lt;br /&gt;
			{&lt;br /&gt;
				/* We have reached the capacity of the Listbox so re-use the first Listbox item.&lt;br /&gt;
				   This code is a little crafty.  By default the ListboxTextItem is created with&lt;br /&gt;
				   the auto-delete flag set to true, which results in its automatic deletion when&lt;br /&gt;
				   removed from the Listbox.  So we change that flag to false, extract the item&lt;br /&gt;
				   from the Listbox, change its text, put the auto-delete flag back to true, and&lt;br /&gt;
				   finally put the item back into the Listbox. */&lt;br /&gt;
				chatItem = static_cast&amp;lt;ListboxTextItem*&amp;gt;(chatHistory-&amp;gt;getListboxItemFromIndex(0));&lt;br /&gt;
				chatItem-&amp;gt;setAutoDeleted(false);&lt;br /&gt;
				chatHistory-&amp;gt;removeItem(chatItem);&lt;br /&gt;
				chatItem-&amp;gt;setAutoDeleted(true);&lt;br /&gt;
				chatItem-&amp;gt;setText(pText);&lt;br /&gt;
			}&lt;br /&gt;
			else&lt;br /&gt;
			{&lt;br /&gt;
				// Create a new listbox item&lt;br /&gt;
				chatItem = new ListboxTextItem(pText);&lt;br /&gt;
			}&lt;br /&gt;
			chatHistory-&amp;gt;addItem(chatItem);&lt;br /&gt;
			chatHistory-&amp;gt;ensureItemIsVisible(chatHistory-&amp;gt;getItemCount());&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	void registerFont(const CEGUI::String&amp;amp; pLogicalName, const CEGUI::String&amp;amp; pFileName)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		// Ensure that font names are registered only once&lt;br /&gt;
		if(mFontList.find(pLogicalName) == mFontList.end())&lt;br /&gt;
		{&lt;br /&gt;
			// Test the font so that only valid fonts are available&lt;br /&gt;
			String testFont = mChatFontName;&lt;br /&gt;
			if(mFontList.size() != 0)&lt;br /&gt;
			{&lt;br /&gt;
				// If the list is empty then attempt to create the font using the &amp;quot;real&amp;quot; font name&lt;br /&gt;
				// Otherwise use a &amp;quot;test&amp;quot; font name so as not to corrupt the &amp;quot;real&amp;quot; one&lt;br /&gt;
				testFont += &amp;quot;__test_font__&amp;quot;;&lt;br /&gt;
			}&lt;br /&gt;
			Font* font = makeFont(testFont, pFileName, mDefaultFontSize);&lt;br /&gt;
			if(mFontList.size() != 0&lt;br /&gt;
				&amp;amp;&amp;amp; FontManager::getSingleton().isFontPresent(testFont))&lt;br /&gt;
			{&lt;br /&gt;
				// Since this was only a test font we destroy it&lt;br /&gt;
				FontManager::getSingleton().destroyFont(testFont);&lt;br /&gt;
			}&lt;br /&gt;
			if(!font)&lt;br /&gt;
			{&lt;br /&gt;
				// This font is invalid&lt;br /&gt;
				if(FontManager::getSingleton().isFontPresent(testFont))&lt;br /&gt;
					return;&lt;br /&gt;
				else&lt;br /&gt;
				return;&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
			Combobox* fontName = static_cast&amp;lt;Combobox*&amp;gt;(winMgr.getWindow(&amp;quot;/ChatBox/FontName&amp;quot;));&lt;br /&gt;
			mFontList[pLogicalName] = pFileName;&lt;br /&gt;
			ListboxTextItem* fontNameItem = new ListboxTextItem(pLogicalName);&lt;br /&gt;
			fontNameItem-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
			fontName-&amp;gt;addItem(fontNameItem);&lt;br /&gt;
			if(fontName-&amp;gt;getItemCount() == 1)&lt;br /&gt;
			{&lt;br /&gt;
				// Enable widgets now that at least one valid font has been found&lt;br /&gt;
				Spinner* fontSize = static_cast&amp;lt;Spinner*&amp;gt;(winMgr.getWindow(&amp;quot;/ChatBox/FontSize&amp;quot;));&lt;br /&gt;
				Window* chatText = winMgr.getWindow(&amp;quot;/ChatBox/Text&amp;quot;);&lt;br /&gt;
				fontName-&amp;gt;setEnabled(true);&lt;br /&gt;
				fontSize-&amp;gt;setEnabled(true);&lt;br /&gt;
				chatText-&amp;gt;setEnabled(true);&lt;br /&gt;
&lt;br /&gt;
				// The first registered font becomes the active font&lt;br /&gt;
				fontName-&amp;gt;setText(pLogicalName); // This triggers a call to changeFont&lt;br /&gt;
				fontName-&amp;gt;setItemSelectState(fontNameItem, true);&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
protected:&lt;br /&gt;
	CEGUI::Font* makeFont(const CEGUI::String&amp;amp; pFontName, const CEGUI::String&amp;amp; pFileName, const CEGUI::String&amp;amp; pSize)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		Font* font;&lt;br /&gt;
		try&lt;br /&gt;
		{&lt;br /&gt;
			if(FontManager::getSingleton().isFontPresent(pFontName))&lt;br /&gt;
			{&lt;br /&gt;
				// The chat font is reused rather than deleted and recreated&lt;br /&gt;
				// every time an attribute changes.  For this reason it is&lt;br /&gt;
				// important to use a unique logical name for the font.&lt;br /&gt;
				font = FontManager::getSingleton().getFont(pFontName);&lt;br /&gt;
				font-&amp;gt;setProperty(&amp;quot;FileName&amp;quot;, pFileName);&lt;br /&gt;
				font-&amp;gt;setProperty(&amp;quot;PointSize&amp;quot;, pSize);&lt;br /&gt;
			}&lt;br /&gt;
			else&lt;br /&gt;
			{&lt;br /&gt;
				// This is the first time we make the chat font so we need to create it&lt;br /&gt;
				XMLAttributes xmlAttributes;&lt;br /&gt;
&lt;br /&gt;
				// CEGUIFont.cpp&lt;br /&gt;
				xmlAttributes.add(&amp;quot;Name&amp;quot;, pFontName);&lt;br /&gt;
				xmlAttributes.add(&amp;quot;Filename&amp;quot;, pFileName);&lt;br /&gt;
				xmlAttributes.add(&amp;quot;ResourceGroup&amp;quot;, &amp;quot;&amp;quot;);&lt;br /&gt;
				xmlAttributes.add(&amp;quot;AutoScaled&amp;quot;, &amp;quot;true&amp;quot;);&lt;br /&gt;
				xmlAttributes.add(&amp;quot;NativeHorzRes&amp;quot;, &amp;quot;800&amp;quot;);&lt;br /&gt;
				xmlAttributes.add(&amp;quot;NativeVertRes&amp;quot;, &amp;quot;600&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
				// CEGUIXMLAttributes.cpp&lt;br /&gt;
				xmlAttributes.add(&amp;quot;Size&amp;quot;, pSize);&lt;br /&gt;
				xmlAttributes.add(&amp;quot;AntiAlias&amp;quot;, &amp;quot;true&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
				font = FontManager::getSingleton().createFont(&amp;quot;FreeType&amp;quot;, xmlAttributes);&lt;br /&gt;
			}&lt;br /&gt;
			font-&amp;gt;load();&lt;br /&gt;
		}&lt;br /&gt;
		catch(Exception&amp;amp; e)&lt;br /&gt;
		{&lt;br /&gt;
			// Display the error message in the chat window&lt;br /&gt;
			addChatText(e.getMessage());&lt;br /&gt;
			font = 0;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return font;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	void changeFont(const CEGUI::String&amp;amp; pFontLogicalName, const CEGUI::String&amp;amp; pFontSize)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
&lt;br /&gt;
		if(!FontManager::getSingleton().isFontPresent(mChatFontName))&lt;br /&gt;
		{&lt;br /&gt;
			addChatText(&amp;quot;You must call registerFont() at least once with a valid font&amp;quot;);&lt;br /&gt;
			return;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		FontList::iterator itFontList = mFontList.find(pFontLogicalName);&lt;br /&gt;
		if(itFontList == mFontList.end())&lt;br /&gt;
		{&lt;br /&gt;
			addChatText(pFontLogicalName + &amp;quot; has not been registered&amp;quot;);&lt;br /&gt;
			return;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Measure the height of the selected font&lt;br /&gt;
		Font* currentFont = makeFont(mChatFontName, (*itFontList).second, pFontSize);&lt;br /&gt;
		float fontHeight = currentFont-&amp;gt;getFontHeight();&lt;br /&gt;
&lt;br /&gt;
		/* Alter the area of the Editbox.  The original value is {{0.01,0},{1,-30},{0.99,0},{1,-5}}&lt;br /&gt;
		   The value we are altering is the &amp;quot;-30&amp;quot; within the second couplet, defining the position of&lt;br /&gt;
		   the upper y coordinate of the Editbox.  We base the new value on the position of the lower&lt;br /&gt;
		   y coordinate, which is &amp;quot;-5&amp;quot;, and the height of the font.  To this we add some space &amp;quot;10&amp;quot; to&lt;br /&gt;
		   account for the Editbox's border. */&lt;br /&gt;
		Editbox* editBox = static_cast&amp;lt;Editbox*&amp;gt; (winMgr.getWindow(&amp;quot;/ChatBox/Text&amp;quot;));&lt;br /&gt;
		URect chatTextArea = editBox-&amp;gt;getArea();&lt;br /&gt;
		chatTextArea.d_min.d_y.d_offset = chatTextArea.d_max.d_y.d_offset&lt;br /&gt;
										- fontHeight&lt;br /&gt;
										- 10;&lt;br /&gt;
		editBox-&amp;gt;setArea(chatTextArea);&lt;br /&gt;
		editBox-&amp;gt;setFont(currentFont);&lt;br /&gt;
&lt;br /&gt;
		/* Alther the area of the Listbox.  Here we only need the lower y coordinate.  Since this&lt;br /&gt;
		   value is the same as the upper y coordinate of the Editbox we do not need to calculate&lt;br /&gt;
		   it.  We also change the font of the Listbox and call upon handleUpdatedItemData() to&lt;br /&gt;
		   update the current Listbox items.  Finally we ensure that the last entry is still&lt;br /&gt;
		   visible. */&lt;br /&gt;
		Listbox* listBox = static_cast&amp;lt;Listbox*&amp;gt; (winMgr.getWindow(&amp;quot;/ChatBox/List&amp;quot;));&lt;br /&gt;
		URect listTextArea = listBox-&amp;gt;getArea();&lt;br /&gt;
		listTextArea.d_max.d_y.d_offset = chatTextArea.d_min.d_y.d_offset;&lt;br /&gt;
		listBox-&amp;gt;setArea(listTextArea);&lt;br /&gt;
		listBox-&amp;gt;setFont(currentFont);&lt;br /&gt;
		listBox-&amp;gt;handleUpdatedItemData();&lt;br /&gt;
		size_t itemCount = listBox-&amp;gt;getItemCount();&lt;br /&gt;
		if(itemCount)&lt;br /&gt;
		{&lt;br /&gt;
			ListboxItem* currentItem = listBox-&amp;gt;getListboxItemFromIndex(itemCount - 1);&lt;br /&gt;
			listBox-&amp;gt;ensureItemIsVisible(currentItem);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
	// Type of list for registered fonts&lt;br /&gt;
	typedef std::map&amp;lt;CEGUI::String, CEGUI::String&amp;gt; FontList;&lt;br /&gt;
&lt;br /&gt;
	// List of registered fonts&lt;br /&gt;
	FontList mFontList;&lt;br /&gt;
&lt;br /&gt;
	// Maximal number of entries to retain within the Listbox&lt;br /&gt;
	size_t mHistorySize;&lt;br /&gt;
&lt;br /&gt;
	// Logical font name dedicated to the chat box&lt;br /&gt;
	// This allows us to modify the properties of that font and not affect the fonts used elsewhere&lt;br /&gt;
	CEGUI::String mChatFontName;&lt;br /&gt;
&lt;br /&gt;
	// Default font size&lt;br /&gt;
	CEGUI::String mDefaultFontSize;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#endif // _ChatBox_h_&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Main.cpp ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&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;ChatBox_demo.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;
    int i = app.run();&lt;br /&gt;
    return i;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== ChatBox.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;/ChatBox&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Chat&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;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;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.01,0},{0.03,0},{0.6,0},{0.69375,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/Listbox&amp;quot; Name=&amp;quot;/ChatBox/List&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.02,0},{0.078,0},{0.98,0},{1,-30}}&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;/ChatBox/Text&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Error: you did not register any font or none were valid&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.02,0},{1,-30},{0.98,0},{1,-5}}&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 Type=&amp;quot;TaharezLook/Editbox&amp;quot; Name=&amp;quot;/ChatBox/History&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;5&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.77,0},{0.03,0},{0.81,0},{0.1,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;/ChatBox/HistoryLabel&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;History size:&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;HorzFormatting&amp;quot; Value=&amp;quot;RightAligned&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.65,0},{0.03,0},{0.77,0},{0.1,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;/ChatBox/FonSizeLabel&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;Font size:&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;HorzFormatting&amp;quot; Value=&amp;quot;RightAligned&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.65,0},{0.1,0},{0.77,0},{0.17,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;/Window&amp;gt;&lt;br /&gt;
        &amp;lt;Window Type=&amp;quot;TaharezLook/Spinner&amp;quot; Name=&amp;quot;/ChatBox/FontSize&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;10&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;72&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.77,0},{0.1,0},{0.83,0},{0.17,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;/ChatBox/FontNameLabel&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;Font name:&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;HorzFormatting&amp;quot; Value=&amp;quot;RightAligned&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.65,0},{0.17,0},{0.77,0},{0.24,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;/ChatBox/FontName&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;ChatBoxFont&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;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.77,0},{0.17,0},{0.99,0},{0.45,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&amp;gt;&lt;br /&gt;
&amp;lt;/GUILayout&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rackle</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=Game_chat_box&amp;diff=2838</id>
		<title>Game chat box</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=Game_chat_box&amp;diff=2838"/>
				<updated>2008-02-02T19:45:06Z</updated>
		
		<summary type="html">&lt;p&gt;Rackle: /* .layout Special Features */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Introduction ===&lt;br /&gt;
This snippet implements a chat box that can display text in 3 font sizes as well as limiting the number of entries (history) to a certain number.  Please discuss this article within the [http://www.cegui.org.uk/phpBB2/viewtopic.php?p=13333 GameChatBox] thread.&lt;br /&gt;
&lt;br /&gt;
==== .layout Special Features ====&lt;br /&gt;
The layout definition is deceptively simple.  It defines a FrameWindow containing two widgets; a Listbox in the upper region for chat history and an Editbox at the lower region for text input.&lt;br /&gt;
&lt;br /&gt;
What is not apparent is how the bottom portion of the Listbox and the entire Editbox are defined; they specify a proportion of 100% of their parent but with a negative offset.  Essentially the bottom of the Listbox extends to the bottom of the FrameWindow (the parent) and is then moved &amp;quot;up&amp;quot; to make room for the Editbox.  And the Editbox follows the same pattern.  This allows the Editbox to retain its height as the parent FrameWindow is resized.  The height of the Editbox is controlled by the height of the font used.&lt;br /&gt;
&lt;br /&gt;
Another feature is that rather than initializing values in code I opted to initialize them via the .layout.  Thus the history has an initial value of 5 and the default font size is 10.  The font name Combobox defines the logical font name for the dynamic font used within the chat box.  This type of definition, rather than Commonwealth-10, Commonwealth-12, etc allows us to change the font of the chat box without affecting any other widget that may use a font of the same logical name.&lt;br /&gt;
&lt;br /&gt;
==== Creating the necessary .font files ====&lt;br /&gt;
A .font file is a simple text file that defines a font within Cegui.  They are located within the datafiles\fonts directory.&lt;br /&gt;
&lt;br /&gt;
This snippet uses the Commonwealth font in sizes 10, 36, and 72.  To create the missing font definitions for sizes 36 and 72 simply make two copies of the existing &amp;quot;Commonwealth-10.font&amp;quot; file.  The first copy is to be named &amp;quot;Commonwealth-36.font&amp;quot; and the second copy &amp;quot;Commonwealth-72.font&amp;quot;.  Edit the &amp;quot;Commonwealth-36.font&amp;quot; file and replace the value &amp;quot;10&amp;quot; by the value &amp;quot;36&amp;quot;.  Similarly edit the &amp;quot;Commonwealth-72.font&amp;quot; file and replace the value &amp;quot;10&amp;quot; by the value &amp;quot;72&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Another approach is to dynamically create fonts.  For more details consult [[DynamicFont]]&lt;br /&gt;
&lt;br /&gt;
=== Files ===&lt;br /&gt;
==== ChatBox_demo.h ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
#ifndef _ChatBox_h_&lt;br /&gt;
#define _ChatBox_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;
#include &amp;quot;CEGUIXMLAttributes.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;ChatBox.layout&amp;quot;);&lt;br /&gt;
			sheet-&amp;gt;addChildWindow(guiLayout);&lt;br /&gt;
&lt;br /&gt;
			// Obtain the handles of some widgets&lt;br /&gt;
			Window* historySize = winMgr.getWindow(&amp;quot;/ChatBox/History&amp;quot;);&lt;br /&gt;
			Window* fontName = winMgr.getWindow(&amp;quot;/ChatBox/FontName&amp;quot;);&lt;br /&gt;
			Spinner* fontSize = static_cast&amp;lt;Spinner*&amp;gt;(winMgr.getWindow(&amp;quot;/ChatBox/FontSize&amp;quot;));&lt;br /&gt;
			Window* chatText = winMgr.getWindow(&amp;quot;/ChatBox/Text&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			// Disable widgets until a valid font is registered&lt;br /&gt;
			fontName-&amp;gt;setEnabled(false);&lt;br /&gt;
			fontSize-&amp;gt;setEnabled(false);&lt;br /&gt;
			chatText-&amp;gt;setEnabled(false);&lt;br /&gt;
&lt;br /&gt;
			// Retrieve the design-specified values&lt;br /&gt;
			mHistorySize = static_cast&amp;lt;size_t&amp;gt;(PropertyHelper::stringToUint(historySize-&amp;gt;getText()));&lt;br /&gt;
			mDefaultFontSize = fontSize-&amp;gt;getText();&lt;br /&gt;
			mChatFontName = fontName-&amp;gt;getText();&lt;br /&gt;
			setHistorySize(mHistorySize);&lt;br /&gt;
			fontName-&amp;gt;setText(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			// Configure the history size&lt;br /&gt;
			// Pressing &amp;lt;ENTER&amp;gt; changes the maximal number of entries within the history Listbox&lt;br /&gt;
			historySize-&amp;gt;subscribeEvent(Editbox::EventTextAccepted,	Event::Subscriber(&amp;amp;DemoSample::Event_HistorySizeChange, this)); &lt;br /&gt;
&lt;br /&gt;
			// Configure the text Editbox&lt;br /&gt;
			// Pressing &amp;lt;ENTER&amp;gt; puts the text into the history Listbox&lt;br /&gt;
			chatText-&amp;gt;subscribeEvent(Editbox::EventTextAccepted,	Event::Subscriber(&amp;amp;DemoSample::Event_ChatTextAdded,	this)); &lt;br /&gt;
&lt;br /&gt;
			// Configure the font name Combobox&lt;br /&gt;
			// Selecting a name changes the font used in the history Listbox and the text Editbox&lt;br /&gt;
			fontName-&amp;gt;subscribeEvent(Combobox::EventTextChanged,	Event::Subscriber(&amp;amp;DemoSample::Event_FontChange,	this)); &lt;br /&gt;
&lt;br /&gt;
			// Configure the font size Spinner&lt;br /&gt;
			// Selecting a size changes the font size used in the history Listbox and the text Editbox&lt;br /&gt;
			fontSize-&amp;gt;subscribeEvent(Spinner::EventValueChanged,	Event::Subscriber(&amp;amp;DemoSample::Event_FontChange,	this)); &lt;br /&gt;
			fontSize-&amp;gt;setTextInputMode(Spinner::Integer);&lt;br /&gt;
			fontSize-&amp;gt;setMinimumValue(4.0f);&lt;br /&gt;
			fontSize-&amp;gt;setMaximumValue(72.0f);&lt;br /&gt;
			fontSize-&amp;gt;setStepSize(1.0f);&lt;br /&gt;
			fontSize-&amp;gt;setCurrentValue(PropertyHelper::stringToFloat(mDefaultFontSize));&lt;br /&gt;
&lt;br /&gt;
			// Initialize the list of fonts&lt;br /&gt;
			// The first registered font becomes the active font&lt;br /&gt;
			registerFont(&amp;quot;Commonwealth&amp;quot;,	&amp;quot;Commonv2c.ttf&amp;quot;);&lt;br /&gt;
			registerFont(&amp;quot;DejaVuSans&amp;quot;,		&amp;quot;DejaVuSans.ttf&amp;quot;);&lt;br /&gt;
			registerFont(&amp;quot;Iconified&amp;quot;,		&amp;quot;Iconiv2.ttf&amp;quot;);&lt;br /&gt;
			registerFont(&amp;quot;MissingFile&amp;quot;,		&amp;quot;MissingFile.ttf&amp;quot;);  // What happens if a font is missing?&lt;br /&gt;
			registerFont(&amp;quot;Pixmap Font&amp;quot;,		&amp;quot;FairChar-30.font&amp;quot;); // And what about a non-Freetype font?&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;
	}&lt;br /&gt;
&lt;br /&gt;
	bool Event_HistorySizeChange(const CEGUI::EventArgs&amp;amp; args)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
		CEGUI::Window* historySize = winMgr.getWindow(&amp;quot;/ChatBox/History&amp;quot;);&lt;br /&gt;
		int size = PropertyHelper::stringToInt( historySize-&amp;gt;getText() );&lt;br /&gt;
		setHistorySize(size);&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool Event_ChatTextAdded(const CEGUI::EventArgs&amp;amp; args)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
		Editbox* chatText = static_cast&amp;lt;Editbox*&amp;gt; (winMgr.getWindow(&amp;quot;/ChatBox/Text&amp;quot;));&lt;br /&gt;
		addChatText(chatText-&amp;gt;getText());&lt;br /&gt;
&lt;br /&gt;
		// Clear the text in the Editbox&lt;br /&gt;
		chatText-&amp;gt;setText(&amp;quot;&amp;quot;);&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool Event_FontChange(const CEGUI::EventArgs&amp;amp; args)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
		Window* fontName = winMgr.getWindow(&amp;quot;/ChatBox/FontName&amp;quot;);&lt;br /&gt;
		String name = fontName-&amp;gt;getText();&lt;br /&gt;
&lt;br /&gt;
		Spinner* fontSize = static_cast&amp;lt;Spinner*&amp;gt;(winMgr.getWindow(&amp;quot;/ChatBox/FontSize&amp;quot;));&lt;br /&gt;
		String size = PropertyHelper::floatToString(fontSize-&amp;gt;getCurrentValue());&lt;br /&gt;
&lt;br /&gt;
		Window* chatText = winMgr.getWindow(&amp;quot;/ChatBox/Text&amp;quot;);&lt;br /&gt;
		chatText-&amp;gt;setText(name + &amp;quot; - &amp;quot; + size);&lt;br /&gt;
&lt;br /&gt;
		changeFont(name, size);&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	void setHistorySize(const size_t&amp;amp; pSize)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		if(pSize &amp;gt; 0)&lt;br /&gt;
		{&lt;br /&gt;
			// A better validation would be to enforce a minimal and a maximal size&lt;br /&gt;
			mHistorySize = pSize;&lt;br /&gt;
&lt;br /&gt;
			WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
			Listbox* chatHistory = static_cast&amp;lt;Listbox*&amp;gt; (winMgr.getWindow(&amp;quot;/ChatBox/List&amp;quot;));&lt;br /&gt;
			ListboxItem* chatItem;&lt;br /&gt;
			while(chatHistory-&amp;gt;getItemCount() &amp;gt; mHistorySize)&lt;br /&gt;
			{&lt;br /&gt;
				// There are too many items within the history Listbox, purging them one at a time&lt;br /&gt;
				chatItem = chatHistory-&amp;gt;getListboxItemFromIndex(0);&lt;br /&gt;
				chatHistory-&amp;gt;removeItem(chatItem);&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	void addChatText(const CEGUI::String&amp;amp; pText)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
		Listbox* chatHistory = static_cast&amp;lt;Listbox*&amp;gt; (winMgr.getWindow(&amp;quot;/ChatBox/List&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
		// If there's text then add it&lt;br /&gt;
		if(pText.size())&lt;br /&gt;
		{&lt;br /&gt;
			// Add the Editbox text to the history Listbox&lt;br /&gt;
			ListboxTextItem* chatItem;&lt;br /&gt;
			if(chatHistory-&amp;gt;getItemCount() == mHistorySize)&lt;br /&gt;
			{&lt;br /&gt;
				/* We have reached the capacity of the Listbox so re-use the first Listbox item.&lt;br /&gt;
				   This code is a little crafty.  By default the ListboxTextItem is created with&lt;br /&gt;
				   the auto-delete flag set to true, which results in its automatic deletion when&lt;br /&gt;
				   removed from the Listbox.  So we change that flag to false, extract the item&lt;br /&gt;
				   from the Listbox, change its text, put the auto-delete flag back to true, and&lt;br /&gt;
				   finally put the item back into the Listbox. */&lt;br /&gt;
				chatItem = static_cast&amp;lt;ListboxTextItem*&amp;gt;(chatHistory-&amp;gt;getListboxItemFromIndex(0));&lt;br /&gt;
				chatItem-&amp;gt;setAutoDeleted(false);&lt;br /&gt;
				chatHistory-&amp;gt;removeItem(chatItem);&lt;br /&gt;
				chatItem-&amp;gt;setAutoDeleted(true);&lt;br /&gt;
				chatItem-&amp;gt;setText(pText);&lt;br /&gt;
			}&lt;br /&gt;
			else&lt;br /&gt;
			{&lt;br /&gt;
				// Create a new listbox item&lt;br /&gt;
				chatItem = new ListboxTextItem(pText);&lt;br /&gt;
			}&lt;br /&gt;
			chatHistory-&amp;gt;addItem(chatItem);&lt;br /&gt;
			chatHistory-&amp;gt;ensureItemIsVisible(chatHistory-&amp;gt;getItemCount());&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	void registerFont(const CEGUI::String&amp;amp; pLogicalName, const CEGUI::String&amp;amp; pFileName)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		// Ensure that font names are registered only once&lt;br /&gt;
		if(mFontList.find(pLogicalName) == mFontList.end())&lt;br /&gt;
		{&lt;br /&gt;
			// Test the font so that only valid fonts are available&lt;br /&gt;
			String testFont = mChatFontName;&lt;br /&gt;
			if(mFontList.size() != 0)&lt;br /&gt;
			{&lt;br /&gt;
				// If the list is empty then attempt to create the font using the &amp;quot;real&amp;quot; font name&lt;br /&gt;
				// Otherwise use a &amp;quot;test&amp;quot; font name so as not to corrupt the &amp;quot;real&amp;quot; one&lt;br /&gt;
				testFont += &amp;quot;__test_font__&amp;quot;;&lt;br /&gt;
			}&lt;br /&gt;
			Font* font = makeFont(testFont, pFileName, mDefaultFontSize);&lt;br /&gt;
			if(mFontList.size() != 0&lt;br /&gt;
				&amp;amp;&amp;amp; FontManager::getSingleton().isFontPresent(testFont))&lt;br /&gt;
			{&lt;br /&gt;
				// Since this was only a test font we destroy it&lt;br /&gt;
				FontManager::getSingleton().destroyFont(testFont);&lt;br /&gt;
			}&lt;br /&gt;
			if(!font)&lt;br /&gt;
			{&lt;br /&gt;
				// This font is invalid&lt;br /&gt;
				if(FontManager::getSingleton().isFontPresent(testFont))&lt;br /&gt;
					return;&lt;br /&gt;
				else&lt;br /&gt;
				return;&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
			Combobox* fontName = static_cast&amp;lt;Combobox*&amp;gt;(winMgr.getWindow(&amp;quot;/ChatBox/FontName&amp;quot;));&lt;br /&gt;
			mFontList[pLogicalName] = pFileName;&lt;br /&gt;
			ListboxTextItem* fontNameItem = new ListboxTextItem(pLogicalName);&lt;br /&gt;
			fontNameItem-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
			fontName-&amp;gt;addItem(fontNameItem);&lt;br /&gt;
			if(fontName-&amp;gt;getItemCount() == 1)&lt;br /&gt;
			{&lt;br /&gt;
				// Enable widgets now that at least one valid font has been found&lt;br /&gt;
				Spinner* fontSize = static_cast&amp;lt;Spinner*&amp;gt;(winMgr.getWindow(&amp;quot;/ChatBox/FontSize&amp;quot;));&lt;br /&gt;
				Window* chatText = winMgr.getWindow(&amp;quot;/ChatBox/Text&amp;quot;);&lt;br /&gt;
				fontName-&amp;gt;setEnabled(true);&lt;br /&gt;
				fontSize-&amp;gt;setEnabled(true);&lt;br /&gt;
				chatText-&amp;gt;setEnabled(true);&lt;br /&gt;
&lt;br /&gt;
				// The first registered font becomes the active font&lt;br /&gt;
				fontName-&amp;gt;setText(pLogicalName); // This triggers a call to changeFont&lt;br /&gt;
				fontName-&amp;gt;setItemSelectState(fontNameItem, true);&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
protected:&lt;br /&gt;
	CEGUI::Font* makeFont(const CEGUI::String&amp;amp; pFontName, const CEGUI::String&amp;amp; pFileName, const CEGUI::String&amp;amp; pSize)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		Font* font;&lt;br /&gt;
		try&lt;br /&gt;
		{&lt;br /&gt;
			if(FontManager::getSingleton().isFontPresent(pFontName))&lt;br /&gt;
			{&lt;br /&gt;
				// The chat font is reused rather than deleted and recreated&lt;br /&gt;
				// every time an attribute changes.  For this reason it is&lt;br /&gt;
				// important to use a unique logical name for the font.&lt;br /&gt;
				font = FontManager::getSingleton().getFont(pFontName);&lt;br /&gt;
				font-&amp;gt;setProperty(&amp;quot;FileName&amp;quot;, pFileName);&lt;br /&gt;
				font-&amp;gt;setProperty(&amp;quot;PointSize&amp;quot;, pSize);&lt;br /&gt;
			}&lt;br /&gt;
			else&lt;br /&gt;
			{&lt;br /&gt;
				// This is the first time we make the chat font so we need to create it&lt;br /&gt;
				XMLAttributes xmlAttributes;&lt;br /&gt;
&lt;br /&gt;
				// CEGUIFont.cpp&lt;br /&gt;
				xmlAttributes.add(&amp;quot;Name&amp;quot;, pFontName);&lt;br /&gt;
				xmlAttributes.add(&amp;quot;Filename&amp;quot;, pFileName);&lt;br /&gt;
				xmlAttributes.add(&amp;quot;ResourceGroup&amp;quot;, &amp;quot;&amp;quot;);&lt;br /&gt;
				xmlAttributes.add(&amp;quot;AutoScaled&amp;quot;, &amp;quot;true&amp;quot;);&lt;br /&gt;
				xmlAttributes.add(&amp;quot;NativeHorzRes&amp;quot;, &amp;quot;800&amp;quot;);&lt;br /&gt;
				xmlAttributes.add(&amp;quot;NativeVertRes&amp;quot;, &amp;quot;600&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
				// CEGUIXMLAttributes.cpp&lt;br /&gt;
				xmlAttributes.add(&amp;quot;Size&amp;quot;, pSize);&lt;br /&gt;
				xmlAttributes.add(&amp;quot;AntiAlias&amp;quot;, &amp;quot;true&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
				font = FontManager::getSingleton().createFont(&amp;quot;FreeType&amp;quot;, xmlAttributes);&lt;br /&gt;
			}&lt;br /&gt;
			font-&amp;gt;load();&lt;br /&gt;
		}&lt;br /&gt;
		catch(Exception&amp;amp; e)&lt;br /&gt;
		{&lt;br /&gt;
			// Display the error message in the chat window&lt;br /&gt;
			addChatText(e.getMessage());&lt;br /&gt;
			font = 0;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return font;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	void changeFont(const CEGUI::String&amp;amp; pFontLogicalName, const CEGUI::String&amp;amp; pFontSize)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
&lt;br /&gt;
		if(!FontManager::getSingleton().isFontPresent(mChatFontName))&lt;br /&gt;
		{&lt;br /&gt;
			addChatText(&amp;quot;You must call registerFont() at least once with a valid font&amp;quot;);&lt;br /&gt;
			return;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		FontList::iterator itFontList = mFontList.find(pFontLogicalName);&lt;br /&gt;
		if(itFontList == mFontList.end())&lt;br /&gt;
		{&lt;br /&gt;
			addChatText(pFontLogicalName + &amp;quot; has not been registered&amp;quot;);&lt;br /&gt;
			return;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Measure the height of the selected font&lt;br /&gt;
		Font* currentFont = makeFont(mChatFontName, (*itFontList).second, pFontSize);&lt;br /&gt;
		float fontHeight = currentFont-&amp;gt;getFontHeight();&lt;br /&gt;
&lt;br /&gt;
		/* Alter the area of the Editbox.  The original value is {{0.01,0},{1,-30},{0.99,0},{1,-5}}&lt;br /&gt;
		   The value we are altering is the &amp;quot;-30&amp;quot; within the second couplet, defining the position of&lt;br /&gt;
		   the upper y coordinate of the Editbox.  We base the new value on the position of the lower&lt;br /&gt;
		   y coordinate, which is &amp;quot;-5&amp;quot;, and the height of the font.  To this we add some space &amp;quot;10&amp;quot; to&lt;br /&gt;
		   account for the Editbox's border. */&lt;br /&gt;
		Editbox* editBox = static_cast&amp;lt;Editbox*&amp;gt; (winMgr.getWindow(&amp;quot;/ChatBox/Text&amp;quot;));&lt;br /&gt;
		URect chatTextArea = editBox-&amp;gt;getArea();&lt;br /&gt;
		chatTextArea.d_min.d_y.d_offset = chatTextArea.d_max.d_y.d_offset&lt;br /&gt;
										- fontHeight&lt;br /&gt;
										- 10;&lt;br /&gt;
		editBox-&amp;gt;setArea(chatTextArea);&lt;br /&gt;
		editBox-&amp;gt;setFont(currentFont);&lt;br /&gt;
&lt;br /&gt;
		/* Alther the area of the Listbox.  Here we only need the lower y coordinate.  Since this&lt;br /&gt;
		   value is the same as the upper y coordinate of the Editbox we do not need to calculate&lt;br /&gt;
		   it.  We also change the font of the Listbox and call upon handleUpdatedItemData() to&lt;br /&gt;
		   update the current Listbox items.  Finally we ensure that the last entry is still&lt;br /&gt;
		   visible. */&lt;br /&gt;
		Listbox* listBox = static_cast&amp;lt;Listbox*&amp;gt; (winMgr.getWindow(&amp;quot;/ChatBox/List&amp;quot;));&lt;br /&gt;
		URect listTextArea = listBox-&amp;gt;getArea();&lt;br /&gt;
		listTextArea.d_max.d_y.d_offset = chatTextArea.d_min.d_y.d_offset;&lt;br /&gt;
		listBox-&amp;gt;setArea(listTextArea);&lt;br /&gt;
		listBox-&amp;gt;setFont(currentFont);&lt;br /&gt;
		listBox-&amp;gt;handleUpdatedItemData();&lt;br /&gt;
		size_t itemCount = listBox-&amp;gt;getItemCount();&lt;br /&gt;
		if(itemCount)&lt;br /&gt;
		{&lt;br /&gt;
			ListboxItem* currentItem = listBox-&amp;gt;getListboxItemFromIndex(itemCount - 1);&lt;br /&gt;
			listBox-&amp;gt;ensureItemIsVisible(currentItem);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
	// Type of list for registered fonts&lt;br /&gt;
	typedef std::map&amp;lt;CEGUI::String, CEGUI::String&amp;gt; FontList;&lt;br /&gt;
&lt;br /&gt;
	// List of registered fonts&lt;br /&gt;
	FontList mFontList;&lt;br /&gt;
&lt;br /&gt;
	// Maximal number of entries to retain within the Listbox&lt;br /&gt;
	size_t mHistorySize;&lt;br /&gt;
&lt;br /&gt;
	// Logical font name dedicated to the chat box&lt;br /&gt;
	// This allows us to modify the properties of that font and not affect the fonts used elsewhere&lt;br /&gt;
	CEGUI::String mChatFontName;&lt;br /&gt;
&lt;br /&gt;
	// Default font size&lt;br /&gt;
	CEGUI::String mDefaultFontSize;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#endif // _ChatBox_h_&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Main.cpp ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&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;ChatBox_demo.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;
    int i = app.run();&lt;br /&gt;
    return i;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== ChatBox.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;/ChatBox&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Chat&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;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;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.01,0},{0.03,0},{0.6,0},{0.69375,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/Listbox&amp;quot; Name=&amp;quot;/ChatBox/List&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.02,0},{0.078,0},{0.98,0},{1,-30}}&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;/ChatBox/Text&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Error: you did not register any font or none were valid&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.02,0},{1,-30},{0.98,0},{1,-5}}&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 Type=&amp;quot;TaharezLook/Editbox&amp;quot; Name=&amp;quot;/ChatBox/History&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;5&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.77,0},{0.03,0},{0.81,0},{0.1,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;/ChatBox/HistoryLabel&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;History size:&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;HorzFormatting&amp;quot; Value=&amp;quot;RightAligned&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.65,0},{0.03,0},{0.77,0},{0.1,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;/ChatBox/FonSizeLabel&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;Font size:&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;HorzFormatting&amp;quot; Value=&amp;quot;RightAligned&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.65,0},{0.1,0},{0.77,0},{0.17,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;/Window&amp;gt;&lt;br /&gt;
        &amp;lt;Window Type=&amp;quot;TaharezLook/Spinner&amp;quot; Name=&amp;quot;/ChatBox/FontSize&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;10&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;72&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.77,0},{0.1,0},{0.83,0},{0.17,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;/ChatBox/FontNameLabel&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;Font name:&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;HorzFormatting&amp;quot; Value=&amp;quot;RightAligned&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.65,0},{0.17,0},{0.77,0},{0.24,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;/ChatBox/FontName&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;ChatBoxFont&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;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.77,0},{0.17,0},{0.99,0},{0.45,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&amp;gt;&lt;br /&gt;
&amp;lt;/GUILayout&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rackle</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=Game_chat_box&amp;diff=2837</id>
		<title>Game chat box</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=Game_chat_box&amp;diff=2837"/>
				<updated>2008-02-02T19:21:01Z</updated>
		
		<summary type="html">&lt;p&gt;Rackle: /* ChatBox.layout */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Introduction ===&lt;br /&gt;
This snippet implements a chat box that can display text in 3 font sizes as well as limiting the number of entries (history) to a certain number.  Please discuss this article within the [http://www.cegui.org.uk/phpBB2/viewtopic.php?p=13333 GameChatBox] thread.&lt;br /&gt;
&lt;br /&gt;
==== .layout Special Features ====&lt;br /&gt;
The layout definition is deceptively simple.  It defines a FrameWindow containing two widgets; a Listbox in the upper region for chat history and an Editbox at the lower region for text input.&lt;br /&gt;
&lt;br /&gt;
What is not apparent is how the bottom portion of the Listbox and the entire Editbox are defined; they specify a proportion of 100% of their parent but with a negative offset.  Essentially the bottom of the Listbox extends to the bottom of the FrameWindow (the parent) and is then moved &amp;quot;up&amp;quot; to make room for the Editbox.  And the Editbox follows the same pattern.  This allows the Editbox to retain its height as the parent FrameWindow is resized.&lt;br /&gt;
&lt;br /&gt;
==== Creating the necessary .font files ====&lt;br /&gt;
A .font file is a simple text file that defines a font within Cegui.  They are located within the datafiles\fonts directory.&lt;br /&gt;
&lt;br /&gt;
This snippet uses the Commonwealth font in sizes 10, 36, and 72.  To create the missing font definitions for sizes 36 and 72 simply make two copies of the existing &amp;quot;Commonwealth-10.font&amp;quot; file.  The first copy is to be named &amp;quot;Commonwealth-36.font&amp;quot; and the second copy &amp;quot;Commonwealth-72.font&amp;quot;.  Edit the &amp;quot;Commonwealth-36.font&amp;quot; file and replace the value &amp;quot;10&amp;quot; by the value &amp;quot;36&amp;quot;.  Similarly edit the &amp;quot;Commonwealth-72.font&amp;quot; file and replace the value &amp;quot;10&amp;quot; by the value &amp;quot;72&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Another approach is to dynamically create fonts.  For more details consult [[DynamicFont]]&lt;br /&gt;
&lt;br /&gt;
=== Files ===&lt;br /&gt;
==== ChatBox_demo.h ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
#ifndef _ChatBox_h_&lt;br /&gt;
#define _ChatBox_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;
#include &amp;quot;CEGUIXMLAttributes.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;ChatBox.layout&amp;quot;);&lt;br /&gt;
			sheet-&amp;gt;addChildWindow(guiLayout);&lt;br /&gt;
&lt;br /&gt;
			// Obtain the handles of some widgets&lt;br /&gt;
			Window* historySize = winMgr.getWindow(&amp;quot;/ChatBox/History&amp;quot;);&lt;br /&gt;
			Window* fontName = winMgr.getWindow(&amp;quot;/ChatBox/FontName&amp;quot;);&lt;br /&gt;
			Spinner* fontSize = static_cast&amp;lt;Spinner*&amp;gt;(winMgr.getWindow(&amp;quot;/ChatBox/FontSize&amp;quot;));&lt;br /&gt;
			Window* chatText = winMgr.getWindow(&amp;quot;/ChatBox/Text&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			// Disable widgets until a valid font is registered&lt;br /&gt;
			fontName-&amp;gt;setEnabled(false);&lt;br /&gt;
			fontSize-&amp;gt;setEnabled(false);&lt;br /&gt;
			chatText-&amp;gt;setEnabled(false);&lt;br /&gt;
&lt;br /&gt;
			// Retrieve the design-specified values&lt;br /&gt;
			mHistorySize = static_cast&amp;lt;size_t&amp;gt;(PropertyHelper::stringToUint(historySize-&amp;gt;getText()));&lt;br /&gt;
			mDefaultFontSize = fontSize-&amp;gt;getText();&lt;br /&gt;
			mChatFontName = fontName-&amp;gt;getText();&lt;br /&gt;
			setHistorySize(mHistorySize);&lt;br /&gt;
			fontName-&amp;gt;setText(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			// Configure the history size&lt;br /&gt;
			// Pressing &amp;lt;ENTER&amp;gt; changes the maximal number of entries within the history Listbox&lt;br /&gt;
			historySize-&amp;gt;subscribeEvent(Editbox::EventTextAccepted,	Event::Subscriber(&amp;amp;DemoSample::Event_HistorySizeChange, this)); &lt;br /&gt;
&lt;br /&gt;
			// Configure the text Editbox&lt;br /&gt;
			// Pressing &amp;lt;ENTER&amp;gt; puts the text into the history Listbox&lt;br /&gt;
			chatText-&amp;gt;subscribeEvent(Editbox::EventTextAccepted,	Event::Subscriber(&amp;amp;DemoSample::Event_ChatTextAdded,	this)); &lt;br /&gt;
&lt;br /&gt;
			// Configure the font name Combobox&lt;br /&gt;
			// Selecting a name changes the font used in the history Listbox and the text Editbox&lt;br /&gt;
			fontName-&amp;gt;subscribeEvent(Combobox::EventTextChanged,	Event::Subscriber(&amp;amp;DemoSample::Event_FontChange,	this)); &lt;br /&gt;
&lt;br /&gt;
			// Configure the font size Spinner&lt;br /&gt;
			// Selecting a size changes the font size used in the history Listbox and the text Editbox&lt;br /&gt;
			fontSize-&amp;gt;subscribeEvent(Spinner::EventValueChanged,	Event::Subscriber(&amp;amp;DemoSample::Event_FontChange,	this)); &lt;br /&gt;
			fontSize-&amp;gt;setTextInputMode(Spinner::Integer);&lt;br /&gt;
			fontSize-&amp;gt;setMinimumValue(4.0f);&lt;br /&gt;
			fontSize-&amp;gt;setMaximumValue(72.0f);&lt;br /&gt;
			fontSize-&amp;gt;setStepSize(1.0f);&lt;br /&gt;
			fontSize-&amp;gt;setCurrentValue(PropertyHelper::stringToFloat(mDefaultFontSize));&lt;br /&gt;
&lt;br /&gt;
			// Initialize the list of fonts&lt;br /&gt;
			// The first registered font becomes the active font&lt;br /&gt;
			registerFont(&amp;quot;Commonwealth&amp;quot;,	&amp;quot;Commonv2c.ttf&amp;quot;);&lt;br /&gt;
			registerFont(&amp;quot;DejaVuSans&amp;quot;,		&amp;quot;DejaVuSans.ttf&amp;quot;);&lt;br /&gt;
			registerFont(&amp;quot;Iconified&amp;quot;,		&amp;quot;Iconiv2.ttf&amp;quot;);&lt;br /&gt;
			registerFont(&amp;quot;MissingFile&amp;quot;,		&amp;quot;MissingFile.ttf&amp;quot;);  // What happens if a font is missing?&lt;br /&gt;
			registerFont(&amp;quot;Pixmap Font&amp;quot;,		&amp;quot;FairChar-30.font&amp;quot;); // And what about a non-Freetype font?&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;
	}&lt;br /&gt;
&lt;br /&gt;
	bool Event_HistorySizeChange(const CEGUI::EventArgs&amp;amp; args)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
		CEGUI::Window* historySize = winMgr.getWindow(&amp;quot;/ChatBox/History&amp;quot;);&lt;br /&gt;
		int size = PropertyHelper::stringToInt( historySize-&amp;gt;getText() );&lt;br /&gt;
		setHistorySize(size);&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool Event_ChatTextAdded(const CEGUI::EventArgs&amp;amp; args)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
		Editbox* chatText = static_cast&amp;lt;Editbox*&amp;gt; (winMgr.getWindow(&amp;quot;/ChatBox/Text&amp;quot;));&lt;br /&gt;
		addChatText(chatText-&amp;gt;getText());&lt;br /&gt;
&lt;br /&gt;
		// Clear the text in the Editbox&lt;br /&gt;
		chatText-&amp;gt;setText(&amp;quot;&amp;quot;);&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool Event_FontChange(const CEGUI::EventArgs&amp;amp; args)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
		Window* fontName = winMgr.getWindow(&amp;quot;/ChatBox/FontName&amp;quot;);&lt;br /&gt;
		String name = fontName-&amp;gt;getText();&lt;br /&gt;
&lt;br /&gt;
		Spinner* fontSize = static_cast&amp;lt;Spinner*&amp;gt;(winMgr.getWindow(&amp;quot;/ChatBox/FontSize&amp;quot;));&lt;br /&gt;
		String size = PropertyHelper::floatToString(fontSize-&amp;gt;getCurrentValue());&lt;br /&gt;
&lt;br /&gt;
		Window* chatText = winMgr.getWindow(&amp;quot;/ChatBox/Text&amp;quot;);&lt;br /&gt;
		chatText-&amp;gt;setText(name + &amp;quot; - &amp;quot; + size);&lt;br /&gt;
&lt;br /&gt;
		changeFont(name, size);&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	void setHistorySize(const size_t&amp;amp; pSize)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		if(pSize &amp;gt; 0)&lt;br /&gt;
		{&lt;br /&gt;
			// A better validation would be to enforce a minimal and a maximal size&lt;br /&gt;
			mHistorySize = pSize;&lt;br /&gt;
&lt;br /&gt;
			WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
			Listbox* chatHistory = static_cast&amp;lt;Listbox*&amp;gt; (winMgr.getWindow(&amp;quot;/ChatBox/List&amp;quot;));&lt;br /&gt;
			ListboxItem* chatItem;&lt;br /&gt;
			while(chatHistory-&amp;gt;getItemCount() &amp;gt; mHistorySize)&lt;br /&gt;
			{&lt;br /&gt;
				// There are too many items within the history Listbox, purging them one at a time&lt;br /&gt;
				chatItem = chatHistory-&amp;gt;getListboxItemFromIndex(0);&lt;br /&gt;
				chatHistory-&amp;gt;removeItem(chatItem);&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	void addChatText(const CEGUI::String&amp;amp; pText)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
		Listbox* chatHistory = static_cast&amp;lt;Listbox*&amp;gt; (winMgr.getWindow(&amp;quot;/ChatBox/List&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
		// If there's text then add it&lt;br /&gt;
		if(pText.size())&lt;br /&gt;
		{&lt;br /&gt;
			// Add the Editbox text to the history Listbox&lt;br /&gt;
			ListboxTextItem* chatItem;&lt;br /&gt;
			if(chatHistory-&amp;gt;getItemCount() == mHistorySize)&lt;br /&gt;
			{&lt;br /&gt;
				/* We have reached the capacity of the Listbox so re-use the first Listbox item.&lt;br /&gt;
				   This code is a little crafty.  By default the ListboxTextItem is created with&lt;br /&gt;
				   the auto-delete flag set to true, which results in its automatic deletion when&lt;br /&gt;
				   removed from the Listbox.  So we change that flag to false, extract the item&lt;br /&gt;
				   from the Listbox, change its text, put the auto-delete flag back to true, and&lt;br /&gt;
				   finally put the item back into the Listbox. */&lt;br /&gt;
				chatItem = static_cast&amp;lt;ListboxTextItem*&amp;gt;(chatHistory-&amp;gt;getListboxItemFromIndex(0));&lt;br /&gt;
				chatItem-&amp;gt;setAutoDeleted(false);&lt;br /&gt;
				chatHistory-&amp;gt;removeItem(chatItem);&lt;br /&gt;
				chatItem-&amp;gt;setAutoDeleted(true);&lt;br /&gt;
				chatItem-&amp;gt;setText(pText);&lt;br /&gt;
			}&lt;br /&gt;
			else&lt;br /&gt;
			{&lt;br /&gt;
				// Create a new listbox item&lt;br /&gt;
				chatItem = new ListboxTextItem(pText);&lt;br /&gt;
			}&lt;br /&gt;
			chatHistory-&amp;gt;addItem(chatItem);&lt;br /&gt;
			chatHistory-&amp;gt;ensureItemIsVisible(chatHistory-&amp;gt;getItemCount());&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	void registerFont(const CEGUI::String&amp;amp; pLogicalName, const CEGUI::String&amp;amp; pFileName)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		// Ensure that font names are registered only once&lt;br /&gt;
		if(mFontList.find(pLogicalName) == mFontList.end())&lt;br /&gt;
		{&lt;br /&gt;
			// Test the font so that only valid fonts are available&lt;br /&gt;
			String testFont = mChatFontName;&lt;br /&gt;
			if(mFontList.size() != 0)&lt;br /&gt;
			{&lt;br /&gt;
				// If the list is empty then attempt to create the font using the &amp;quot;real&amp;quot; font name&lt;br /&gt;
				// Otherwise use a &amp;quot;test&amp;quot; font name so as not to corrupt the &amp;quot;real&amp;quot; one&lt;br /&gt;
				testFont += &amp;quot;__test_font__&amp;quot;;&lt;br /&gt;
			}&lt;br /&gt;
			Font* font = makeFont(testFont, pFileName, mDefaultFontSize);&lt;br /&gt;
			if(mFontList.size() != 0&lt;br /&gt;
				&amp;amp;&amp;amp; FontManager::getSingleton().isFontPresent(testFont))&lt;br /&gt;
			{&lt;br /&gt;
				// Since this was only a test font we destroy it&lt;br /&gt;
				FontManager::getSingleton().destroyFont(testFont);&lt;br /&gt;
			}&lt;br /&gt;
			if(!font)&lt;br /&gt;
			{&lt;br /&gt;
				// This font is invalid&lt;br /&gt;
				if(FontManager::getSingleton().isFontPresent(testFont))&lt;br /&gt;
					return;&lt;br /&gt;
				else&lt;br /&gt;
				return;&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
			Combobox* fontName = static_cast&amp;lt;Combobox*&amp;gt;(winMgr.getWindow(&amp;quot;/ChatBox/FontName&amp;quot;));&lt;br /&gt;
			mFontList[pLogicalName] = pFileName;&lt;br /&gt;
			ListboxTextItem* fontNameItem = new ListboxTextItem(pLogicalName);&lt;br /&gt;
			fontNameItem-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
			fontName-&amp;gt;addItem(fontNameItem);&lt;br /&gt;
			if(fontName-&amp;gt;getItemCount() == 1)&lt;br /&gt;
			{&lt;br /&gt;
				// Enable widgets now that at least one valid font has been found&lt;br /&gt;
				Spinner* fontSize = static_cast&amp;lt;Spinner*&amp;gt;(winMgr.getWindow(&amp;quot;/ChatBox/FontSize&amp;quot;));&lt;br /&gt;
				Window* chatText = winMgr.getWindow(&amp;quot;/ChatBox/Text&amp;quot;);&lt;br /&gt;
				fontName-&amp;gt;setEnabled(true);&lt;br /&gt;
				fontSize-&amp;gt;setEnabled(true);&lt;br /&gt;
				chatText-&amp;gt;setEnabled(true);&lt;br /&gt;
&lt;br /&gt;
				// The first registered font becomes the active font&lt;br /&gt;
				fontName-&amp;gt;setText(pLogicalName); // This triggers a call to changeFont&lt;br /&gt;
				fontName-&amp;gt;setItemSelectState(fontNameItem, true);&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
protected:&lt;br /&gt;
	CEGUI::Font* makeFont(const CEGUI::String&amp;amp; pFontName, const CEGUI::String&amp;amp; pFileName, const CEGUI::String&amp;amp; pSize)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		Font* font;&lt;br /&gt;
		try&lt;br /&gt;
		{&lt;br /&gt;
			if(FontManager::getSingleton().isFontPresent(pFontName))&lt;br /&gt;
			{&lt;br /&gt;
				// The chat font is reused rather than deleted and recreated&lt;br /&gt;
				// every time an attribute changes.  For this reason it is&lt;br /&gt;
				// important to use a unique logical name for the font.&lt;br /&gt;
				font = FontManager::getSingleton().getFont(pFontName);&lt;br /&gt;
				font-&amp;gt;setProperty(&amp;quot;FileName&amp;quot;, pFileName);&lt;br /&gt;
				font-&amp;gt;setProperty(&amp;quot;PointSize&amp;quot;, pSize);&lt;br /&gt;
			}&lt;br /&gt;
			else&lt;br /&gt;
			{&lt;br /&gt;
				// This is the first time we make the chat font so we need to create it&lt;br /&gt;
				XMLAttributes xmlAttributes;&lt;br /&gt;
&lt;br /&gt;
				// CEGUIFont.cpp&lt;br /&gt;
				xmlAttributes.add(&amp;quot;Name&amp;quot;, pFontName);&lt;br /&gt;
				xmlAttributes.add(&amp;quot;Filename&amp;quot;, pFileName);&lt;br /&gt;
				xmlAttributes.add(&amp;quot;ResourceGroup&amp;quot;, &amp;quot;&amp;quot;);&lt;br /&gt;
				xmlAttributes.add(&amp;quot;AutoScaled&amp;quot;, &amp;quot;true&amp;quot;);&lt;br /&gt;
				xmlAttributes.add(&amp;quot;NativeHorzRes&amp;quot;, &amp;quot;800&amp;quot;);&lt;br /&gt;
				xmlAttributes.add(&amp;quot;NativeVertRes&amp;quot;, &amp;quot;600&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
				// CEGUIXMLAttributes.cpp&lt;br /&gt;
				xmlAttributes.add(&amp;quot;Size&amp;quot;, pSize);&lt;br /&gt;
				xmlAttributes.add(&amp;quot;AntiAlias&amp;quot;, &amp;quot;true&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
				font = FontManager::getSingleton().createFont(&amp;quot;FreeType&amp;quot;, xmlAttributes);&lt;br /&gt;
			}&lt;br /&gt;
			font-&amp;gt;load();&lt;br /&gt;
		}&lt;br /&gt;
		catch(Exception&amp;amp; e)&lt;br /&gt;
		{&lt;br /&gt;
			// Display the error message in the chat window&lt;br /&gt;
			addChatText(e.getMessage());&lt;br /&gt;
			font = 0;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return font;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	void changeFont(const CEGUI::String&amp;amp; pFontLogicalName, const CEGUI::String&amp;amp; pFontSize)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
&lt;br /&gt;
		if(!FontManager::getSingleton().isFontPresent(mChatFontName))&lt;br /&gt;
		{&lt;br /&gt;
			addChatText(&amp;quot;You must call registerFont() at least once with a valid font&amp;quot;);&lt;br /&gt;
			return;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		FontList::iterator itFontList = mFontList.find(pFontLogicalName);&lt;br /&gt;
		if(itFontList == mFontList.end())&lt;br /&gt;
		{&lt;br /&gt;
			addChatText(pFontLogicalName + &amp;quot; has not been registered&amp;quot;);&lt;br /&gt;
			return;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Measure the height of the selected font&lt;br /&gt;
		Font* currentFont = makeFont(mChatFontName, (*itFontList).second, pFontSize);&lt;br /&gt;
		float fontHeight = currentFont-&amp;gt;getFontHeight();&lt;br /&gt;
&lt;br /&gt;
		/* Alter the area of the Editbox.  The original value is {{0.01,0},{1,-30},{0.99,0},{1,-5}}&lt;br /&gt;
		   The value we are altering is the &amp;quot;-30&amp;quot; within the second couplet, defining the position of&lt;br /&gt;
		   the upper y coordinate of the Editbox.  We base the new value on the position of the lower&lt;br /&gt;
		   y coordinate, which is &amp;quot;-5&amp;quot;, and the height of the font.  To this we add some space &amp;quot;10&amp;quot; to&lt;br /&gt;
		   account for the Editbox's border. */&lt;br /&gt;
		Editbox* editBox = static_cast&amp;lt;Editbox*&amp;gt; (winMgr.getWindow(&amp;quot;/ChatBox/Text&amp;quot;));&lt;br /&gt;
		URect chatTextArea = editBox-&amp;gt;getArea();&lt;br /&gt;
		chatTextArea.d_min.d_y.d_offset = chatTextArea.d_max.d_y.d_offset&lt;br /&gt;
										- fontHeight&lt;br /&gt;
										- 10;&lt;br /&gt;
		editBox-&amp;gt;setArea(chatTextArea);&lt;br /&gt;
		editBox-&amp;gt;setFont(currentFont);&lt;br /&gt;
&lt;br /&gt;
		/* Alther the area of the Listbox.  Here we only need the lower y coordinate.  Since this&lt;br /&gt;
		   value is the same as the upper y coordinate of the Editbox we do not need to calculate&lt;br /&gt;
		   it.  We also change the font of the Listbox and call upon handleUpdatedItemData() to&lt;br /&gt;
		   update the current Listbox items.  Finally we ensure that the last entry is still&lt;br /&gt;
		   visible. */&lt;br /&gt;
		Listbox* listBox = static_cast&amp;lt;Listbox*&amp;gt; (winMgr.getWindow(&amp;quot;/ChatBox/List&amp;quot;));&lt;br /&gt;
		URect listTextArea = listBox-&amp;gt;getArea();&lt;br /&gt;
		listTextArea.d_max.d_y.d_offset = chatTextArea.d_min.d_y.d_offset;&lt;br /&gt;
		listBox-&amp;gt;setArea(listTextArea);&lt;br /&gt;
		listBox-&amp;gt;setFont(currentFont);&lt;br /&gt;
		listBox-&amp;gt;handleUpdatedItemData();&lt;br /&gt;
		size_t itemCount = listBox-&amp;gt;getItemCount();&lt;br /&gt;
		if(itemCount)&lt;br /&gt;
		{&lt;br /&gt;
			ListboxItem* currentItem = listBox-&amp;gt;getListboxItemFromIndex(itemCount - 1);&lt;br /&gt;
			listBox-&amp;gt;ensureItemIsVisible(currentItem);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
	// Type of list for registered fonts&lt;br /&gt;
	typedef std::map&amp;lt;CEGUI::String, CEGUI::String&amp;gt; FontList;&lt;br /&gt;
&lt;br /&gt;
	// List of registered fonts&lt;br /&gt;
	FontList mFontList;&lt;br /&gt;
&lt;br /&gt;
	// Maximal number of entries to retain within the Listbox&lt;br /&gt;
	size_t mHistorySize;&lt;br /&gt;
&lt;br /&gt;
	// Logical font name dedicated to the chat box&lt;br /&gt;
	// This allows us to modify the properties of that font and not affect the fonts used elsewhere&lt;br /&gt;
	CEGUI::String mChatFontName;&lt;br /&gt;
&lt;br /&gt;
	// Default font size&lt;br /&gt;
	CEGUI::String mDefaultFontSize;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#endif // _ChatBox_h_&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Main.cpp ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&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;ChatBox_demo.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;
    int i = app.run();&lt;br /&gt;
    return i;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== ChatBox.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;/ChatBox&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Chat&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;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;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.01,0},{0.03,0},{0.6,0},{0.69375,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/Listbox&amp;quot; Name=&amp;quot;/ChatBox/List&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.02,0},{0.078,0},{0.98,0},{1,-30}}&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;/ChatBox/Text&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Error: you did not register any font or none were valid&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.02,0},{1,-30},{0.98,0},{1,-5}}&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 Type=&amp;quot;TaharezLook/Editbox&amp;quot; Name=&amp;quot;/ChatBox/History&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;5&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.77,0},{0.03,0},{0.81,0},{0.1,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;/ChatBox/HistoryLabel&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;History size:&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;HorzFormatting&amp;quot; Value=&amp;quot;RightAligned&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.65,0},{0.03,0},{0.77,0},{0.1,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;/ChatBox/FonSizeLabel&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;Font size:&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;HorzFormatting&amp;quot; Value=&amp;quot;RightAligned&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.65,0},{0.1,0},{0.77,0},{0.17,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;/Window&amp;gt;&lt;br /&gt;
        &amp;lt;Window Type=&amp;quot;TaharezLook/Spinner&amp;quot; Name=&amp;quot;/ChatBox/FontSize&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;10&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;72&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.77,0},{0.1,0},{0.83,0},{0.17,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;/ChatBox/FontNameLabel&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;Font name:&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;HorzFormatting&amp;quot; Value=&amp;quot;RightAligned&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.65,0},{0.17,0},{0.77,0},{0.24,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;/ChatBox/FontName&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;ChatBoxFont&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;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.77,0},{0.17,0},{0.99,0},{0.45,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&amp;gt;&lt;br /&gt;
&amp;lt;/GUILayout&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rackle</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=Game_chat_box&amp;diff=2836</id>
		<title>Game chat box</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=Game_chat_box&amp;diff=2836"/>
				<updated>2008-02-02T19:20:36Z</updated>
		
		<summary type="html">&lt;p&gt;Rackle: /* ChatBox_demo.h */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Introduction ===&lt;br /&gt;
This snippet implements a chat box that can display text in 3 font sizes as well as limiting the number of entries (history) to a certain number.  Please discuss this article within the [http://www.cegui.org.uk/phpBB2/viewtopic.php?p=13333 GameChatBox] thread.&lt;br /&gt;
&lt;br /&gt;
==== .layout Special Features ====&lt;br /&gt;
The layout definition is deceptively simple.  It defines a FrameWindow containing two widgets; a Listbox in the upper region for chat history and an Editbox at the lower region for text input.&lt;br /&gt;
&lt;br /&gt;
What is not apparent is how the bottom portion of the Listbox and the entire Editbox are defined; they specify a proportion of 100% of their parent but with a negative offset.  Essentially the bottom of the Listbox extends to the bottom of the FrameWindow (the parent) and is then moved &amp;quot;up&amp;quot; to make room for the Editbox.  And the Editbox follows the same pattern.  This allows the Editbox to retain its height as the parent FrameWindow is resized.&lt;br /&gt;
&lt;br /&gt;
==== Creating the necessary .font files ====&lt;br /&gt;
A .font file is a simple text file that defines a font within Cegui.  They are located within the datafiles\fonts directory.&lt;br /&gt;
&lt;br /&gt;
This snippet uses the Commonwealth font in sizes 10, 36, and 72.  To create the missing font definitions for sizes 36 and 72 simply make two copies of the existing &amp;quot;Commonwealth-10.font&amp;quot; file.  The first copy is to be named &amp;quot;Commonwealth-36.font&amp;quot; and the second copy &amp;quot;Commonwealth-72.font&amp;quot;.  Edit the &amp;quot;Commonwealth-36.font&amp;quot; file and replace the value &amp;quot;10&amp;quot; by the value &amp;quot;36&amp;quot;.  Similarly edit the &amp;quot;Commonwealth-72.font&amp;quot; file and replace the value &amp;quot;10&amp;quot; by the value &amp;quot;72&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Another approach is to dynamically create fonts.  For more details consult [[DynamicFont]]&lt;br /&gt;
&lt;br /&gt;
=== Files ===&lt;br /&gt;
==== ChatBox_demo.h ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
#ifndef _ChatBox_h_&lt;br /&gt;
#define _ChatBox_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;
#include &amp;quot;CEGUIXMLAttributes.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;ChatBox.layout&amp;quot;);&lt;br /&gt;
			sheet-&amp;gt;addChildWindow(guiLayout);&lt;br /&gt;
&lt;br /&gt;
			// Obtain the handles of some widgets&lt;br /&gt;
			Window* historySize = winMgr.getWindow(&amp;quot;/ChatBox/History&amp;quot;);&lt;br /&gt;
			Window* fontName = winMgr.getWindow(&amp;quot;/ChatBox/FontName&amp;quot;);&lt;br /&gt;
			Spinner* fontSize = static_cast&amp;lt;Spinner*&amp;gt;(winMgr.getWindow(&amp;quot;/ChatBox/FontSize&amp;quot;));&lt;br /&gt;
			Window* chatText = winMgr.getWindow(&amp;quot;/ChatBox/Text&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			// Disable widgets until a valid font is registered&lt;br /&gt;
			fontName-&amp;gt;setEnabled(false);&lt;br /&gt;
			fontSize-&amp;gt;setEnabled(false);&lt;br /&gt;
			chatText-&amp;gt;setEnabled(false);&lt;br /&gt;
&lt;br /&gt;
			// Retrieve the design-specified values&lt;br /&gt;
			mHistorySize = static_cast&amp;lt;size_t&amp;gt;(PropertyHelper::stringToUint(historySize-&amp;gt;getText()));&lt;br /&gt;
			mDefaultFontSize = fontSize-&amp;gt;getText();&lt;br /&gt;
			mChatFontName = fontName-&amp;gt;getText();&lt;br /&gt;
			setHistorySize(mHistorySize);&lt;br /&gt;
			fontName-&amp;gt;setText(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			// Configure the history size&lt;br /&gt;
			// Pressing &amp;lt;ENTER&amp;gt; changes the maximal number of entries within the history Listbox&lt;br /&gt;
			historySize-&amp;gt;subscribeEvent(Editbox::EventTextAccepted,	Event::Subscriber(&amp;amp;DemoSample::Event_HistorySizeChange, this)); &lt;br /&gt;
&lt;br /&gt;
			// Configure the text Editbox&lt;br /&gt;
			// Pressing &amp;lt;ENTER&amp;gt; puts the text into the history Listbox&lt;br /&gt;
			chatText-&amp;gt;subscribeEvent(Editbox::EventTextAccepted,	Event::Subscriber(&amp;amp;DemoSample::Event_ChatTextAdded,	this)); &lt;br /&gt;
&lt;br /&gt;
			// Configure the font name Combobox&lt;br /&gt;
			// Selecting a name changes the font used in the history Listbox and the text Editbox&lt;br /&gt;
			fontName-&amp;gt;subscribeEvent(Combobox::EventTextChanged,	Event::Subscriber(&amp;amp;DemoSample::Event_FontChange,	this)); &lt;br /&gt;
&lt;br /&gt;
			// Configure the font size Spinner&lt;br /&gt;
			// Selecting a size changes the font size used in the history Listbox and the text Editbox&lt;br /&gt;
			fontSize-&amp;gt;subscribeEvent(Spinner::EventValueChanged,	Event::Subscriber(&amp;amp;DemoSample::Event_FontChange,	this)); &lt;br /&gt;
			fontSize-&amp;gt;setTextInputMode(Spinner::Integer);&lt;br /&gt;
			fontSize-&amp;gt;setMinimumValue(4.0f);&lt;br /&gt;
			fontSize-&amp;gt;setMaximumValue(72.0f);&lt;br /&gt;
			fontSize-&amp;gt;setStepSize(1.0f);&lt;br /&gt;
			fontSize-&amp;gt;setCurrentValue(PropertyHelper::stringToFloat(mDefaultFontSize));&lt;br /&gt;
&lt;br /&gt;
			// Initialize the list of fonts&lt;br /&gt;
			// The first registered font becomes the active font&lt;br /&gt;
			registerFont(&amp;quot;Commonwealth&amp;quot;,	&amp;quot;Commonv2c.ttf&amp;quot;);&lt;br /&gt;
			registerFont(&amp;quot;DejaVuSans&amp;quot;,		&amp;quot;DejaVuSans.ttf&amp;quot;);&lt;br /&gt;
			registerFont(&amp;quot;Iconified&amp;quot;,		&amp;quot;Iconiv2.ttf&amp;quot;);&lt;br /&gt;
			registerFont(&amp;quot;MissingFile&amp;quot;,		&amp;quot;MissingFile.ttf&amp;quot;);  // What happens if a font is missing?&lt;br /&gt;
			registerFont(&amp;quot;Pixmap Font&amp;quot;,		&amp;quot;FairChar-30.font&amp;quot;); // And what about a non-Freetype font?&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;
	}&lt;br /&gt;
&lt;br /&gt;
	bool Event_HistorySizeChange(const CEGUI::EventArgs&amp;amp; args)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
		CEGUI::Window* historySize = winMgr.getWindow(&amp;quot;/ChatBox/History&amp;quot;);&lt;br /&gt;
		int size = PropertyHelper::stringToInt( historySize-&amp;gt;getText() );&lt;br /&gt;
		setHistorySize(size);&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool Event_ChatTextAdded(const CEGUI::EventArgs&amp;amp; args)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
		Editbox* chatText = static_cast&amp;lt;Editbox*&amp;gt; (winMgr.getWindow(&amp;quot;/ChatBox/Text&amp;quot;));&lt;br /&gt;
		addChatText(chatText-&amp;gt;getText());&lt;br /&gt;
&lt;br /&gt;
		// Clear the text in the Editbox&lt;br /&gt;
		chatText-&amp;gt;setText(&amp;quot;&amp;quot;);&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool Event_FontChange(const CEGUI::EventArgs&amp;amp; args)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
		Window* fontName = winMgr.getWindow(&amp;quot;/ChatBox/FontName&amp;quot;);&lt;br /&gt;
		String name = fontName-&amp;gt;getText();&lt;br /&gt;
&lt;br /&gt;
		Spinner* fontSize = static_cast&amp;lt;Spinner*&amp;gt;(winMgr.getWindow(&amp;quot;/ChatBox/FontSize&amp;quot;));&lt;br /&gt;
		String size = PropertyHelper::floatToString(fontSize-&amp;gt;getCurrentValue());&lt;br /&gt;
&lt;br /&gt;
		Window* chatText = winMgr.getWindow(&amp;quot;/ChatBox/Text&amp;quot;);&lt;br /&gt;
		chatText-&amp;gt;setText(name + &amp;quot; - &amp;quot; + size);&lt;br /&gt;
&lt;br /&gt;
		changeFont(name, size);&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	void setHistorySize(const size_t&amp;amp; pSize)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		if(pSize &amp;gt; 0)&lt;br /&gt;
		{&lt;br /&gt;
			// A better validation would be to enforce a minimal and a maximal size&lt;br /&gt;
			mHistorySize = pSize;&lt;br /&gt;
&lt;br /&gt;
			WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
			Listbox* chatHistory = static_cast&amp;lt;Listbox*&amp;gt; (winMgr.getWindow(&amp;quot;/ChatBox/List&amp;quot;));&lt;br /&gt;
			ListboxItem* chatItem;&lt;br /&gt;
			while(chatHistory-&amp;gt;getItemCount() &amp;gt; mHistorySize)&lt;br /&gt;
			{&lt;br /&gt;
				// There are too many items within the history Listbox, purging them one at a time&lt;br /&gt;
				chatItem = chatHistory-&amp;gt;getListboxItemFromIndex(0);&lt;br /&gt;
				chatHistory-&amp;gt;removeItem(chatItem);&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	void addChatText(const CEGUI::String&amp;amp; pText)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
		Listbox* chatHistory = static_cast&amp;lt;Listbox*&amp;gt; (winMgr.getWindow(&amp;quot;/ChatBox/List&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
		// If there's text then add it&lt;br /&gt;
		if(pText.size())&lt;br /&gt;
		{&lt;br /&gt;
			// Add the Editbox text to the history Listbox&lt;br /&gt;
			ListboxTextItem* chatItem;&lt;br /&gt;
			if(chatHistory-&amp;gt;getItemCount() == mHistorySize)&lt;br /&gt;
			{&lt;br /&gt;
				/* We have reached the capacity of the Listbox so re-use the first Listbox item.&lt;br /&gt;
				   This code is a little crafty.  By default the ListboxTextItem is created with&lt;br /&gt;
				   the auto-delete flag set to true, which results in its automatic deletion when&lt;br /&gt;
				   removed from the Listbox.  So we change that flag to false, extract the item&lt;br /&gt;
				   from the Listbox, change its text, put the auto-delete flag back to true, and&lt;br /&gt;
				   finally put the item back into the Listbox. */&lt;br /&gt;
				chatItem = static_cast&amp;lt;ListboxTextItem*&amp;gt;(chatHistory-&amp;gt;getListboxItemFromIndex(0));&lt;br /&gt;
				chatItem-&amp;gt;setAutoDeleted(false);&lt;br /&gt;
				chatHistory-&amp;gt;removeItem(chatItem);&lt;br /&gt;
				chatItem-&amp;gt;setAutoDeleted(true);&lt;br /&gt;
				chatItem-&amp;gt;setText(pText);&lt;br /&gt;
			}&lt;br /&gt;
			else&lt;br /&gt;
			{&lt;br /&gt;
				// Create a new listbox item&lt;br /&gt;
				chatItem = new ListboxTextItem(pText);&lt;br /&gt;
			}&lt;br /&gt;
			chatHistory-&amp;gt;addItem(chatItem);&lt;br /&gt;
			chatHistory-&amp;gt;ensureItemIsVisible(chatHistory-&amp;gt;getItemCount());&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	void registerFont(const CEGUI::String&amp;amp; pLogicalName, const CEGUI::String&amp;amp; pFileName)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		// Ensure that font names are registered only once&lt;br /&gt;
		if(mFontList.find(pLogicalName) == mFontList.end())&lt;br /&gt;
		{&lt;br /&gt;
			// Test the font so that only valid fonts are available&lt;br /&gt;
			String testFont = mChatFontName;&lt;br /&gt;
			if(mFontList.size() != 0)&lt;br /&gt;
			{&lt;br /&gt;
				// If the list is empty then attempt to create the font using the &amp;quot;real&amp;quot; font name&lt;br /&gt;
				// Otherwise use a &amp;quot;test&amp;quot; font name so as not to corrupt the &amp;quot;real&amp;quot; one&lt;br /&gt;
				testFont += &amp;quot;__test_font__&amp;quot;;&lt;br /&gt;
			}&lt;br /&gt;
			Font* font = makeFont(testFont, pFileName, mDefaultFontSize);&lt;br /&gt;
			if(mFontList.size() != 0&lt;br /&gt;
				&amp;amp;&amp;amp; FontManager::getSingleton().isFontPresent(testFont))&lt;br /&gt;
			{&lt;br /&gt;
				// Since this was only a test font we destroy it&lt;br /&gt;
				FontManager::getSingleton().destroyFont(testFont);&lt;br /&gt;
			}&lt;br /&gt;
			if(!font)&lt;br /&gt;
			{&lt;br /&gt;
				// This font is invalid&lt;br /&gt;
				if(FontManager::getSingleton().isFontPresent(testFont))&lt;br /&gt;
					return;&lt;br /&gt;
				else&lt;br /&gt;
				return;&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
			Combobox* fontName = static_cast&amp;lt;Combobox*&amp;gt;(winMgr.getWindow(&amp;quot;/ChatBox/FontName&amp;quot;));&lt;br /&gt;
			mFontList[pLogicalName] = pFileName;&lt;br /&gt;
			ListboxTextItem* fontNameItem = new ListboxTextItem(pLogicalName);&lt;br /&gt;
			fontNameItem-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
			fontName-&amp;gt;addItem(fontNameItem);&lt;br /&gt;
			if(fontName-&amp;gt;getItemCount() == 1)&lt;br /&gt;
			{&lt;br /&gt;
				// Enable widgets now that at least one valid font has been found&lt;br /&gt;
				Spinner* fontSize = static_cast&amp;lt;Spinner*&amp;gt;(winMgr.getWindow(&amp;quot;/ChatBox/FontSize&amp;quot;));&lt;br /&gt;
				Window* chatText = winMgr.getWindow(&amp;quot;/ChatBox/Text&amp;quot;);&lt;br /&gt;
				fontName-&amp;gt;setEnabled(true);&lt;br /&gt;
				fontSize-&amp;gt;setEnabled(true);&lt;br /&gt;
				chatText-&amp;gt;setEnabled(true);&lt;br /&gt;
&lt;br /&gt;
				// The first registered font becomes the active font&lt;br /&gt;
				fontName-&amp;gt;setText(pLogicalName); // This triggers a call to changeFont&lt;br /&gt;
				fontName-&amp;gt;setItemSelectState(fontNameItem, true);&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
protected:&lt;br /&gt;
	CEGUI::Font* makeFont(const CEGUI::String&amp;amp; pFontName, const CEGUI::String&amp;amp; pFileName, const CEGUI::String&amp;amp; pSize)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		Font* font;&lt;br /&gt;
		try&lt;br /&gt;
		{&lt;br /&gt;
			if(FontManager::getSingleton().isFontPresent(pFontName))&lt;br /&gt;
			{&lt;br /&gt;
				// The chat font is reused rather than deleted and recreated&lt;br /&gt;
				// every time an attribute changes.  For this reason it is&lt;br /&gt;
				// important to use a unique logical name for the font.&lt;br /&gt;
				font = FontManager::getSingleton().getFont(pFontName);&lt;br /&gt;
				font-&amp;gt;setProperty(&amp;quot;FileName&amp;quot;, pFileName);&lt;br /&gt;
				font-&amp;gt;setProperty(&amp;quot;PointSize&amp;quot;, pSize);&lt;br /&gt;
			}&lt;br /&gt;
			else&lt;br /&gt;
			{&lt;br /&gt;
				// This is the first time we make the chat font so we need to create it&lt;br /&gt;
				XMLAttributes xmlAttributes;&lt;br /&gt;
&lt;br /&gt;
				// CEGUIFont.cpp&lt;br /&gt;
				xmlAttributes.add(&amp;quot;Name&amp;quot;, pFontName);&lt;br /&gt;
				xmlAttributes.add(&amp;quot;Filename&amp;quot;, pFileName);&lt;br /&gt;
				xmlAttributes.add(&amp;quot;ResourceGroup&amp;quot;, &amp;quot;&amp;quot;);&lt;br /&gt;
				xmlAttributes.add(&amp;quot;AutoScaled&amp;quot;, &amp;quot;true&amp;quot;);&lt;br /&gt;
				xmlAttributes.add(&amp;quot;NativeHorzRes&amp;quot;, &amp;quot;800&amp;quot;);&lt;br /&gt;
				xmlAttributes.add(&amp;quot;NativeVertRes&amp;quot;, &amp;quot;600&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
				// CEGUIXMLAttributes.cpp&lt;br /&gt;
				xmlAttributes.add(&amp;quot;Size&amp;quot;, pSize);&lt;br /&gt;
				xmlAttributes.add(&amp;quot;AntiAlias&amp;quot;, &amp;quot;true&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
				font = FontManager::getSingleton().createFont(&amp;quot;FreeType&amp;quot;, xmlAttributes);&lt;br /&gt;
			}&lt;br /&gt;
			font-&amp;gt;load();&lt;br /&gt;
		}&lt;br /&gt;
		catch(Exception&amp;amp; e)&lt;br /&gt;
		{&lt;br /&gt;
			// Display the error message in the chat window&lt;br /&gt;
			addChatText(e.getMessage());&lt;br /&gt;
			font = 0;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return font;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	void changeFont(const CEGUI::String&amp;amp; pFontLogicalName, const CEGUI::String&amp;amp; pFontSize)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
&lt;br /&gt;
		if(!FontManager::getSingleton().isFontPresent(mChatFontName))&lt;br /&gt;
		{&lt;br /&gt;
			addChatText(&amp;quot;You must call registerFont() at least once with a valid font&amp;quot;);&lt;br /&gt;
			return;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		FontList::iterator itFontList = mFontList.find(pFontLogicalName);&lt;br /&gt;
		if(itFontList == mFontList.end())&lt;br /&gt;
		{&lt;br /&gt;
			addChatText(pFontLogicalName + &amp;quot; has not been registered&amp;quot;);&lt;br /&gt;
			return;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Measure the height of the selected font&lt;br /&gt;
		Font* currentFont = makeFont(mChatFontName, (*itFontList).second, pFontSize);&lt;br /&gt;
		float fontHeight = currentFont-&amp;gt;getFontHeight();&lt;br /&gt;
&lt;br /&gt;
		/* Alter the area of the Editbox.  The original value is {{0.01,0},{1,-30},{0.99,0},{1,-5}}&lt;br /&gt;
		   The value we are altering is the &amp;quot;-30&amp;quot; within the second couplet, defining the position of&lt;br /&gt;
		   the upper y coordinate of the Editbox.  We base the new value on the position of the lower&lt;br /&gt;
		   y coordinate, which is &amp;quot;-5&amp;quot;, and the height of the font.  To this we add some space &amp;quot;10&amp;quot; to&lt;br /&gt;
		   account for the Editbox's border. */&lt;br /&gt;
		Editbox* editBox = static_cast&amp;lt;Editbox*&amp;gt; (winMgr.getWindow(&amp;quot;/ChatBox/Text&amp;quot;));&lt;br /&gt;
		URect chatTextArea = editBox-&amp;gt;getArea();&lt;br /&gt;
		chatTextArea.d_min.d_y.d_offset = chatTextArea.d_max.d_y.d_offset&lt;br /&gt;
										- fontHeight&lt;br /&gt;
										- 10;&lt;br /&gt;
		editBox-&amp;gt;setArea(chatTextArea);&lt;br /&gt;
		editBox-&amp;gt;setFont(currentFont);&lt;br /&gt;
&lt;br /&gt;
		/* Alther the area of the Listbox.  Here we only need the lower y coordinate.  Since this&lt;br /&gt;
		   value is the same as the upper y coordinate of the Editbox we do not need to calculate&lt;br /&gt;
		   it.  We also change the font of the Listbox and call upon handleUpdatedItemData() to&lt;br /&gt;
		   update the current Listbox items.  Finally we ensure that the last entry is still&lt;br /&gt;
		   visible. */&lt;br /&gt;
		Listbox* listBox = static_cast&amp;lt;Listbox*&amp;gt; (winMgr.getWindow(&amp;quot;/ChatBox/List&amp;quot;));&lt;br /&gt;
		URect listTextArea = listBox-&amp;gt;getArea();&lt;br /&gt;
		listTextArea.d_max.d_y.d_offset = chatTextArea.d_min.d_y.d_offset;&lt;br /&gt;
		listBox-&amp;gt;setArea(listTextArea);&lt;br /&gt;
		listBox-&amp;gt;setFont(currentFont);&lt;br /&gt;
		listBox-&amp;gt;handleUpdatedItemData();&lt;br /&gt;
		size_t itemCount = listBox-&amp;gt;getItemCount();&lt;br /&gt;
		if(itemCount)&lt;br /&gt;
		{&lt;br /&gt;
			ListboxItem* currentItem = listBox-&amp;gt;getListboxItemFromIndex(itemCount - 1);&lt;br /&gt;
			listBox-&amp;gt;ensureItemIsVisible(currentItem);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
	// Type of list for registered fonts&lt;br /&gt;
	typedef std::map&amp;lt;CEGUI::String, CEGUI::String&amp;gt; FontList;&lt;br /&gt;
&lt;br /&gt;
	// List of registered fonts&lt;br /&gt;
	FontList mFontList;&lt;br /&gt;
&lt;br /&gt;
	// Maximal number of entries to retain within the Listbox&lt;br /&gt;
	size_t mHistorySize;&lt;br /&gt;
&lt;br /&gt;
	// Logical font name dedicated to the chat box&lt;br /&gt;
	// This allows us to modify the properties of that font and not affect the fonts used elsewhere&lt;br /&gt;
	CEGUI::String mChatFontName;&lt;br /&gt;
&lt;br /&gt;
	// Default font size&lt;br /&gt;
	CEGUI::String mDefaultFontSize;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#endif // _ChatBox_h_&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Main.cpp ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&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;ChatBox_demo.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;
    int i = app.run();&lt;br /&gt;
    return i;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== ChatBox.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;/ChatBox&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Chat&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;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;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.15,0},{0.03,0},{0.7,0},{0.7,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/Listbox&amp;quot; Name=&amp;quot;/ChatBox/List&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.01,0},{0.078,0},{0.99,0},{1,-30}}&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;/ChatBox/Text&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.01,0},{1,-30},{0.99,0},{1,-5}}&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 Type=&amp;quot;TaharezLook/Editbox&amp;quot; Name=&amp;quot;/ChatBox/History&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.9,0},{0.03,0},{0.95,0},{0.1,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;/ChatBox/HistoryLabel&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;History size:&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.78,0},{0.03,0},{0.9,0},{0.1,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;/GUILayout&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rackle</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=Sample_code_for_all_Widgets&amp;diff=2834</id>
		<title>Sample code for all Widgets</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=Sample_code_for_all_Widgets&amp;diff=2834"/>
				<updated>2008-02-01T14:20:04Z</updated>
		
		<summary type="html">&lt;p&gt;Rackle: Link toward CheckListboxItem&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This code goes through every widget and demonstrates how to retrieve and set their data as well as some of their particularities.  Please post comments or questions on the message board thread for the [http://www.cegui.org.uk/phpBB2/viewtopic.php?p=7967#7967 Widget Galore]&lt;br /&gt;
&lt;br /&gt;
=== Widgets===&lt;br /&gt;
&lt;br /&gt;
==== General ====&lt;br /&gt;
A widget can be enabled/disabled via setEnabled().  Disabling a widget prevents the user from activating it and manipulating its contents.  A widget can be hidden/shown via setVisible().&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Tooltip ====&lt;br /&gt;
A Tooltip widget displays text when the mouse has been hovering over a widget for a certain amount of time.  This widget requires that time be injected within CEGUI via injectTimePulse().&lt;br /&gt;
&lt;br /&gt;
The graphical aspect (the scheme) of the tooltip can be specified via setTooltip().  The amount of hovering time required to activate the tooltip can be specified via setHoverTime().  The amount of time the tooltip is displayed can be specified via setDisplayTime().  And the fade transition time can be specified via setFadeTime(); this affects both the fade in and the fade out times.  The tooltip text of a widget can be specified via setTooltipText().  Please note that some complex widgets are composed of several widgets.  In order to have a tooltip text displayed while hovering over any region of the complex widget then every component widget needs to have a tooltip text specified.  For example a Spinner widget is composed of an Editbox widget and two Button widgets. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== StaticText ====&lt;br /&gt;
There is no StaticText within Cegui but type of widget can be obtained via the DefaultWindow class.&lt;br /&gt;
&lt;br /&gt;
The currently displayed text can be specified via setText().  The color of this text can be specified via the &amp;quot;TextColours&amp;quot; property.  The value of this property contains 4 color definitions: top left, top right, bottom left, and bottom right.  Each color is specified as a two-digit hexadecimal value of the format AARRGGBB (alpha, red, green, blue).  The text is aligned vertically via the &amp;quot;VertFormatting&amp;quot; property with a value of TopAligned, BottomAligned, or VertCentred.  The text is aligned horizontally via the &amp;quot;HorzFormatting&amp;quot; property with a value of LeftAligned, RightAligned, HorzCentred, HorzJustified, WordWrapLeftAligned, WordWrapRightAligned, WordWrapCentred, or WordWrapJustified.&lt;br /&gt;
&lt;br /&gt;
==== StaticImage ====&lt;br /&gt;
There is no StaticImage within Cegui but type of widget can be obtained via the DefaultWindow class.&lt;br /&gt;
&lt;br /&gt;
The currently displayed image can be specified via the &amp;quot;Image&amp;quot; property.  This property takes two parameters, the imageset (&amp;quot;set&amp;quot;) and the image name (&amp;quot;image&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
==== ProgressBar ====&lt;br /&gt;
A ProgressBar widget displays a progression; it does not receive inputs from a user.&lt;br /&gt;
&lt;br /&gt;
The current progress can be specified via setProgress().  Progress can be advanced through steps.  The step size can be specified via setStepSize() and a step performed via step().  Progress can be adjusted by a delta value via adjustProgress().  The current progress value can be obtained via getProgress().&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Button ====&lt;br /&gt;
A Button widget displays a text and receives an activation instruction from the user.&lt;br /&gt;
&lt;br /&gt;
The text can be specified via setText().&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== ScrollablePane ====&lt;br /&gt;
A ScrollablePane widget displays contents that can be scrolled.  Contents can be added via addChildWindow().  When that content exceeds the dimensions of the ScrollablePane then scrollbars appear to allow the use to view and interact with that hidden content.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Checkbox ====&lt;br /&gt;
A Checkbox widget controls a boolean value; true when checked and false when unchecked.  This value can be obtained via isSelected() and specified via setSelected(true) to check or setSelected(false) to uncheck.&lt;br /&gt;
&lt;br /&gt;
==== Spinner ====&lt;br /&gt;
A Spinner widget controls a numerical values (float) through an editbox or the use of the increment or decrement buttons.&lt;br /&gt;
&lt;br /&gt;
This value is bounded within a minimum and a maximum by calling setMinimumValue() and setMaximumValue().  The arrow buttons increment or decrement the value by the amount specified with setStepSize().  The numerical value can be displayed in four formats:  FloatingPoint, Integer, Hexadecimal, Octal.  &lt;br /&gt;
&lt;br /&gt;
The current value is obtained via getCurrentValue() and specified via setCurrentValue().&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Editbox ====&lt;br /&gt;
An Editbox widget controls printable character values; letters, numbers, punctuations, and symbols.  &lt;br /&gt;
&lt;br /&gt;
The maximal number of characters that can be specified is bound by setMaxTextLength().  The value can be set to readable only (modifications by users are not allowed) via setReadOnly(true).  The value can be masked via setTextMasked() and the default value of * can be modified via setMaskCodePoint().&lt;br /&gt;
&lt;br /&gt;
The current value can be obtained via getText() and specified via setText().&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Slider ====&lt;br /&gt;
A Slider widget controls a numerical value (float) through the position of a &amp;quot;thumb&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This value is bounded within a maximum by setMaxValue(); the minimum value is set to 0.0f.  The thumb can be dragged to the desired position or moved by clicking on either side of the thumb.  The increment or decrement value is set by setClickStep().&lt;br /&gt;
&lt;br /&gt;
The current value can be obtained via getCurrentValue() and specified via setCurrentValue().&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Scrollbar ====&lt;br /&gt;
A Scrollbar widget controls a numerical value (float) through the position of a &amp;quot;thumb&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This value is bounded within a maximum by setDocumentSize(); the minimum value is set to 0.0f.  The thumb can be dragged to the desired position or moved by clicking on either side of the thumb.  The increment or decrement value is set by setPageSize().  The arrow buttons increment or decrement the value by the amount specified with setStepSize().&lt;br /&gt;
&lt;br /&gt;
The current value can be obtained via getScrollPosition() and specified via setScrollPosition().  Note that the actual maximum value that the scrollbar will return is set by the following formula: document_size - page_size.  Thus, a document of size 100 and a page size of 10 will have a value from 0 to 90.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== MultiLineEditbox ====&lt;br /&gt;
A MultiLineEditbox widget controls printable character values; letters, numbers, punctuations, and symbols.&lt;br /&gt;
&lt;br /&gt;
Unlike the Editbox widget there is no maximal number of characters that can be specified.  The value can be set to readable only (modifications by users are not allowed) via setReadOnly(true).  Text can be automatically wrapped via a call to setWordWrapping(true).&lt;br /&gt;
&lt;br /&gt;
The current value can be obtained via getText() and specified via setText().&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== RadioButton ====&lt;br /&gt;
A RadioButton widget controls a single selection among many choices.&lt;br /&gt;
&lt;br /&gt;
The choices are grouped by calling setGroupID().  Only one RadioButton per group ID can be selected; this widget does not support multiple selection.  However it is possible for a choice to possess no decision; initially every RadioButton of a group is unselected.&lt;br /&gt;
&lt;br /&gt;
The currently selected RadioButton can be obtained via getSelectedButtonInGroup().  This RadioButton pointer can then be used to query the ID via getID(), the text (visible label of the RadioButton) via getText(), or user data via getUserData().  A RadioButton can be selected via setSelected(true).  Passing false will deselect the RadioButton, potentially making every RadioButton of the group unselected.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Listbox ====&lt;br /&gt;
A Listbox widget controls either a single selection or multiple selections among many choices.  Multiple selections are enabled via setMultiselectEnabled().&lt;br /&gt;
&lt;br /&gt;
The choices are listbox text items (ListboxTextItem) added to the listbox via addItem().  These do not possess a selection indicator by default; one must be specified via setSelectionBrushImage().  The call to ensureItemIsVisible() ensures that the item is visible; the listbox will automatically scroll down if necessary.  The text of the ListboxTextItem can be changed via the setText() function.  However this new text will not be displayed until you call the Listbox's handleUpdatedItemData() function.&lt;br /&gt;
&lt;br /&gt;
The selected ListboxItem can be obtained via getFirstSelectedItem() and subsequent selections through getNextSelected().  A selection can be specified via setItemSelectState().&lt;br /&gt;
&lt;br /&gt;
It is possible for a Listbox to contain list items that are not simply composed of text.  [http://www.cegui.org.uk/wiki/index.php/Create_a_CheckListboxItem CheckListboxItem] demonstrates this advanced feature.&lt;br /&gt;
&lt;br /&gt;
==== Combobox ====&lt;br /&gt;
A Combobox widget controls a single selection among many choices.&lt;br /&gt;
&lt;br /&gt;
The choices are listbox text items (ListboxTextItem) added to the combobox via addItem().  These do not possess a selection indicator by default; one must be specified via setSelectionBrushImage().&lt;br /&gt;
&lt;br /&gt;
The value of the text within the Editbox can be obtained via getText() and the last selected ListboxItem can be obtained via getSelectedItem().  However there is no guarantee that both are synchronized; typing text within the Editbox will not automatically select the corresponding ListboxItem.  Fortunately the reverse is not true; selecting a ListboxItem will place that text within the Editbox.  Placing the Editbox in read-only mode with setReadOnly(true) can avoid problems.  The current value can be specified via listboxTextItem-&amp;gt;setSelected(true) and a setText(itemCombobox-&amp;gt;getText()).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== MultiColumnList ====&lt;br /&gt;
A MultiColumnList widget controls controls either a single selection or multiple selections among many choices.  Multiple selections are enabled via setSelectionMode(MultiColumnList::RowMultiple).&lt;br /&gt;
&lt;br /&gt;
A MultiColumnList widget may contain a single column or multiple columns.  Columns are added via addColumn(), specifying a label, a column ID, and a column width.&lt;br /&gt;
&lt;br /&gt;
Three steps are required to add a row.  The first step is to add a new row with addRow().  The second step is to create a ListboxTextItem for each cell of the row and specify the selection indicator via setSelectionBrushImage().  The third step is to add the newly created ListboxTextItem to the MultiColumnList via setItem(), specifying the ListboxTextItem, the column ID, and the row ID.&lt;br /&gt;
&lt;br /&gt;
The selected row can be obtained via getFirstSelectedItem() and subsequent selections through getNextSelected().  This will iterate through every selected cell, returning each selected ListboxTextItem .  A selection can be specified via setItemSelectState(); by setting the selection mode to rows (either RowSingle or RowMultiple) you actually only need to select the ListboxTextItem of the first column.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== TabControl ====&lt;br /&gt;
A TabControl widget allows multiple windows to be displayed one at a time, via tab buttons.&lt;br /&gt;
&lt;br /&gt;
Two objects must be created within the Layout Editor to generate a functional tab control.  The first is a window of type &amp;quot;TabControl&amp;quot;.  This will be the parent window of the tab buttons as well as the pages.  The second is a window of type &amp;quot;DefaultWindow&amp;quot;.  This window will be placed within the TabControl (in code via addTab(), not through the Layout Editor) and will specify the contents of a page.  Widgets are to be placed within these TabPane via the Layout Editor.  The &amp;quot;TabButton&amp;quot; windows are not to be specified via the Layout Editor since they will be automatically created when a TabPane is added to the TabControl.&lt;br /&gt;
&lt;br /&gt;
In this demo the TabControl widget was placed within a FrameWindow.  This is not a requirement.  It could have just easily been placed alongside the widgets of the other window.&lt;br /&gt;
&lt;br /&gt;
==== Menu &amp;amp; Popup Menu ====&lt;br /&gt;
&lt;br /&gt;
See [[http://www.cegui.org.uk/wiki/index.php/MenuAndPopup Menu &amp;amp; Popup Menu]]&lt;br /&gt;
&lt;br /&gt;
=== Files ===&lt;br /&gt;
&lt;br /&gt;
==== WidgetGalore.h ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
#ifndef _WidgetGalore_h_&lt;br /&gt;
#define _WidgetGalore_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;
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;WidgetGalore.layout&amp;quot;);&lt;br /&gt;
			sheet-&amp;gt;addChildWindow(guiLayout);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
			/* Tooltip */&lt;br /&gt;
			System::getSingleton().setDefaultTooltip(&amp;quot;TaharezLook/Tooltip&amp;quot;); // Set the name of the default tooltip&lt;br /&gt;
			Tooltip* tooltip = System::getSingleton().getDefaultTooltip();&lt;br /&gt;
			tooltip-&amp;gt;setHoverTime(0.5f); // Display the tooltip after the mouse has been hovering over the widget for half a second&lt;br /&gt;
			tooltip-&amp;gt;setDisplayTime(10.0f); // Display for 15 seconds then disappear&lt;br /&gt;
			tooltip-&amp;gt;setFadeTime(1.0f); // Duration of the transition between fully visible and fully invisible&lt;br /&gt;
			// To set the tooltip text for a window simply call setTooltipText()   see staticText for an example&lt;br /&gt;
&lt;br /&gt;
			/* StaticText */&lt;br /&gt;
			DefaultWindow* staticText = static_cast&amp;lt;DefaultWindow*&amp;gt;(winMgr.getWindow(&amp;quot;StaticText&amp;quot;));&lt;br /&gt;
			staticText-&amp;gt;setText(&amp;quot;Red Static Text&amp;quot;);&lt;br /&gt;
			staticText-&amp;gt;setProperty(&amp;quot;TextColours&amp;quot;, &amp;quot;tl:FFFF0000 tr:FFFF0000 bl:FFFF0000 br:FFFF0000&amp;quot;); // aarrggbb in Hexadecimal&lt;br /&gt;
				// tl: top left,  tr: top right,  bl: bottom left,  br: bottom right&lt;br /&gt;
			staticText-&amp;gt;setProperty(&amp;quot;VertFormatting&amp;quot;, &amp;quot;VertCentred&amp;quot;); // TopAligned, BottomAligned, VertCentred&lt;br /&gt;
			staticText-&amp;gt;setProperty(&amp;quot;HorzFormatting&amp;quot;, &amp;quot;HorzCentred&amp;quot;); // LeftAligned, RightAligned, HorzCentred&lt;br /&gt;
				// HorzJustified, WordWrapLeftAligned, WordWrapRightAligned, WordWrapCentred, WordWrapJustified&lt;br /&gt;
			staticText-&amp;gt;setTooltipText(&amp;quot;This is a StaticText widget&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			/* StaticImage */&lt;br /&gt;
			ImagesetManager::getSingleton().createImagesetFromImageFile(&amp;quot;ImageForStaticImage&amp;quot;, &amp;quot;GPN-2000-001437.tga&amp;quot;);&lt;br /&gt;
			DefaultWindow* staticImage = static_cast&amp;lt;DefaultWindow*&amp;gt;(winMgr.getWindow(&amp;quot;StaticImage&amp;quot;));&lt;br /&gt;
			staticImage-&amp;gt;setProperty(&amp;quot;Image&amp;quot;, &amp;quot;set:ImageForStaticImage image:full_image&amp;quot;); // &amp;quot;full_image&amp;quot; is a default name from CEGUIImageset::Imageset()&lt;br /&gt;
&lt;br /&gt;
			/* ProgressBar */&lt;br /&gt;
			ProgressBar* progressBar = static_cast&amp;lt;ProgressBar*&amp;gt;(winMgr.getWindow(&amp;quot;ProgressBar&amp;quot;));&lt;br /&gt;
			progressBar-&amp;gt;setProgress(0.25f); // Initial progress of 25%&lt;br /&gt;
			progressBar-&amp;gt;setStepSize(0.10f); // Calling step() will increase the progress by 10%&lt;br /&gt;
			progressBar-&amp;gt;step(); // Advance the progress by the size specified in setStepSize()&lt;br /&gt;
			progressBar-&amp;gt;adjustProgress(-0.05f); // Adjust the progress by a delta value rather than setting a new value through setProgress&lt;br /&gt;
			float valueProgressBar = progressBar-&amp;gt;getProgress(); // initial 0.25f + step 0.10f - adjustment 0.05f = 0.30f&lt;br /&gt;
&lt;br /&gt;
			/* Button */&lt;br /&gt;
			PushButton* btnClose = static_cast&amp;lt;PushButton*&amp;gt;(winMgr.getWindow(&amp;quot;btnClose&amp;quot;));&lt;br /&gt;
			btnClose-&amp;gt;setText(&amp;quot;Exit&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			/* ScrollablePane */&lt;br /&gt;
			ScrollablePane* scrollablePane = static_cast&amp;lt;ScrollablePane*&amp;gt;(winMgr.getWindow(&amp;quot;ScrollablePane&amp;quot;));&lt;br /&gt;
			ImagesetManager::getSingleton().createImagesetFromImageFile(&amp;quot;ImageForScrollablePane&amp;quot;, &amp;quot;GPN-2000-001437.tga&amp;quot;);&lt;br /&gt;
			DefaultWindow* staticImageInScrollablePane = static_cast&amp;lt;DefaultWindow*&amp;gt;(winMgr.createWindow(&amp;quot;TaharezLook/StaticImage&amp;quot;, &amp;quot;StaticImageInScrollablePane&amp;quot;));&lt;br /&gt;
				staticImageInScrollablePane-&amp;gt;setProperty(&amp;quot;Image&amp;quot;, &amp;quot;set:ImageForScrollablePane image:full_image&amp;quot;); // &amp;quot;full_image&amp;quot; is a default name from CEGUIImageset::Imageset()&lt;br /&gt;
				staticImageInScrollablePane-&amp;gt;setPosition(UVector2(UDim(0.0f, 0.0f), UDim(0.0f, 0.0f))); // Start in the upper left corner&lt;br /&gt;
				staticImageInScrollablePane-&amp;gt;setWidth(UDim(2.0f, 0.0f)); // Twice the width of the parent, the ScrollablePane&lt;br /&gt;
				staticImageInScrollablePane-&amp;gt;setHeight(UDim(2.0f, 0.0f)); // Twice the height of the parent, the ScrollablePane&lt;br /&gt;
				scrollablePane-&amp;gt;addChildWindow(staticImageInScrollablePane); // Add the image to the // Twice the width of the parent, the ScrollablePane&lt;br /&gt;
			Editbox* editboxInScrollablePane = static_cast&amp;lt;Editbox*&amp;gt;(winMgr.createWindow(&amp;quot;TaharezLook/Editbox&amp;quot;, &amp;quot;EditboxInScrollablePane&amp;quot;));&lt;br /&gt;
				editboxInScrollablePane-&amp;gt;setPosition(UVector2(UDim(0.0f, 0.0f), UDim(2.1f, 0.0f))); // Start below the image&lt;br /&gt;
				editboxInScrollablePane-&amp;gt;setWidth(UDim(2.0f, 0.0f)); &lt;br /&gt;
				editboxInScrollablePane-&amp;gt;setHeight(UDim(0.3f, 0.0f));&lt;br /&gt;
				scrollablePane-&amp;gt;addChildWindow(editboxInScrollablePane);&lt;br /&gt;
&lt;br /&gt;
			/* Check box */&lt;br /&gt;
			Checkbox* checkbox = static_cast&amp;lt;Checkbox*&amp;gt;(winMgr.getWindow(&amp;quot;Checkbox&amp;quot;));&lt;br /&gt;
			checkbox-&amp;gt;setSelected( true );&lt;br /&gt;
			bool valueCheckbox = checkbox-&amp;gt;isSelected(); // Retrieve whether it is checked&lt;br /&gt;
&lt;br /&gt;
			/* 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;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.2f);&lt;br /&gt;
			spinner-&amp;gt;setCurrentValue(5.2f);&lt;br /&gt;
			float valueSpinner = spinner-&amp;gt;getCurrentValue(); // Retrieve the value&lt;br /&gt;
&lt;br /&gt;
			/* Editbox */&lt;br /&gt;
			Editbox* editbox = static_cast&amp;lt;Editbox*&amp;gt;(winMgr.getWindow(&amp;quot;Editbox&amp;quot;));&lt;br /&gt;
			editbox-&amp;gt;setText(&amp;quot;Editbox values&amp;quot;);&lt;br /&gt;
			editbox-&amp;gt;setMaxTextLength(13); // The trailing 's' will not be displayed&lt;br /&gt;
			editbox-&amp;gt;setReadOnly(false);&lt;br /&gt;
			editbox-&amp;gt;setTextMasked(false);&lt;br /&gt;
			editbox-&amp;gt;setMaskCodePoint(0x002A); // *&lt;br /&gt;
			String valueEditbox = editbox-&amp;gt;getText(); // Retrieve the text&lt;br /&gt;
&lt;br /&gt;
			/* Slider */&lt;br /&gt;
			Slider* slider = static_cast&amp;lt;Slider*&amp;gt;(winMgr.getWindow(&amp;quot;Slider&amp;quot;));&lt;br /&gt;
			slider-&amp;gt;setMaxValue(100.0f);&lt;br /&gt;
			slider-&amp;gt;setClickStep(10.0f);&lt;br /&gt;
			slider-&amp;gt;setCurrentValue(20.0f);&lt;br /&gt;
			float valueSlider = slider-&amp;gt;getCurrentValue(); // Retrieve the value&lt;br /&gt;
&lt;br /&gt;
			/* Scrollbar (Horizontal) */&lt;br /&gt;
			Scrollbar* scrollbarHorizontal = static_cast&amp;lt;Scrollbar*&amp;gt;(winMgr.getWindow(&amp;quot;HorizontalScrollbar&amp;quot;));&lt;br /&gt;
			scrollbarHorizontal-&amp;gt;setDocumentSize(100.0f);&lt;br /&gt;
			scrollbarHorizontal-&amp;gt;setPageSize(10.0f);&lt;br /&gt;
			scrollbarHorizontal-&amp;gt;setStepSize(1.0f);&lt;br /&gt;
			scrollbarHorizontal-&amp;gt;setScrollPosition(75.0f);&lt;br /&gt;
			float valueScrollbarHorizontal = scrollbarHorizontal-&amp;gt;getScrollPosition(); // Retrieve the scroll position&lt;br /&gt;
&lt;br /&gt;
			/* Scrollbar (Vertical) */&lt;br /&gt;
			Scrollbar* scrollbarVertical = static_cast&amp;lt;Scrollbar*&amp;gt;(winMgr.getWindow(&amp;quot;VerticalScrollbar&amp;quot;));&lt;br /&gt;
			scrollbarVertical-&amp;gt;setDocumentSize(100.0f);&lt;br /&gt;
			scrollbarVertical-&amp;gt;setPageSize(10.0f);&lt;br /&gt;
			scrollbarVertical-&amp;gt;setStepSize(1.0f);&lt;br /&gt;
			scrollbarVertical-&amp;gt;setScrollPosition(25.0f);&lt;br /&gt;
			float valueScrollbarVertical = scrollbarVertical-&amp;gt;getScrollPosition(); // Retrieve the scroll position&lt;br /&gt;
&lt;br /&gt;
			/* MultiLineEditbox */&lt;br /&gt;
			MultiLineEditbox* multiLineEditbox = static_cast&amp;lt;MultiLineEditbox*&amp;gt;(winMgr.getWindow(&amp;quot;MultiLineEditbox&amp;quot;));&lt;br /&gt;
			multiLineEditbox-&amp;gt;setText(&amp;quot;MultiLineEditbox value&amp;quot;);&lt;br /&gt;
			multiLineEditbox-&amp;gt;setReadOnly(false);&lt;br /&gt;
			multiLineEditbox-&amp;gt;setWordWrapping(true);&lt;br /&gt;
			String valueMultiLineEditbox = multiLineEditbox-&amp;gt;getText(); // Retrieve the text&lt;br /&gt;
&lt;br /&gt;
			/* RadioButton */&lt;br /&gt;
			RadioButton* radioButton = static_cast&amp;lt;RadioButton*&amp;gt;(winMgr.getWindow(&amp;quot;RadioButton_A&amp;quot;));&lt;br /&gt;
				radioButton-&amp;gt;setGroupID(1);&lt;br /&gt;
				radioButton-&amp;gt;setID(101);&lt;br /&gt;
				radioButton-&amp;gt;setSelected(true);&lt;br /&gt;
			radioButton = static_cast&amp;lt;RadioButton*&amp;gt;(winMgr.getWindow(&amp;quot;RadioButton_B&amp;quot;));&lt;br /&gt;
				radioButton-&amp;gt;setGroupID(1);&lt;br /&gt;
				radioButton-&amp;gt;setID(102);&lt;br /&gt;
			radioButton = static_cast&amp;lt;RadioButton*&amp;gt;(winMgr.getWindow(&amp;quot;RadioButton_C&amp;quot;));&lt;br /&gt;
				radioButton-&amp;gt;setGroupID(1);&lt;br /&gt;
				radioButton-&amp;gt;setID(103);&lt;br /&gt;
			radioButton = static_cast&amp;lt;RadioButton*&amp;gt;(winMgr.getWindow(&amp;quot;RadioButton_1&amp;quot;));&lt;br /&gt;
				radioButton-&amp;gt;setGroupID(2);&lt;br /&gt;
				radioButton-&amp;gt;setID(201);&lt;br /&gt;
				radioButton-&amp;gt;setSelected(true);&lt;br /&gt;
			radioButton = static_cast&amp;lt;RadioButton*&amp;gt;(winMgr.getWindow(&amp;quot;RadioButton_2&amp;quot;));&lt;br /&gt;
				radioButton-&amp;gt;setGroupID(2);&lt;br /&gt;
				radioButton-&amp;gt;setID(202);&lt;br /&gt;
			radioButton = static_cast&amp;lt;RadioButton*&amp;gt;(winMgr.getWindow(&amp;quot;RadioButton_3&amp;quot;));&lt;br /&gt;
				radioButton-&amp;gt;setGroupID(2);&lt;br /&gt;
				radioButton-&amp;gt;setID(203);&lt;br /&gt;
			radioButton = static_cast&amp;lt;RadioButton*&amp;gt;(winMgr.getWindow(&amp;quot;RadioButton_A&amp;quot;)); // Get handle of one radio button from the group&lt;br /&gt;
			uint valueRadioButtonLetters = radioButton-&amp;gt;getSelectedButtonInGroup()-&amp;gt;getID(); // Get selected ID&lt;br /&gt;
			radioButton = static_cast&amp;lt;RadioButton*&amp;gt;(winMgr.getWindow(&amp;quot;RadioButton_3&amp;quot;)); // Can obtain the handle of any radio button in the group&lt;br /&gt;
			uint valueRadioButtonNumbers = radioButton-&amp;gt;getSelectedButtonInGroup()-&amp;gt;getID();&lt;br /&gt;
			radioButton-&amp;gt;setSelected(true); // Specify which button should appear selected by default&lt;br /&gt;
&lt;br /&gt;
			/* Listbox */&lt;br /&gt;
			Listbox* listbox = static_cast&amp;lt;Listbox*&amp;gt;(winMgr.getWindow(&amp;quot;Listbox&amp;quot;));&lt;br /&gt;
			listbox-&amp;gt;setMultiselectEnabled(false);&lt;br /&gt;
			ListboxTextItem* itemListbox = new ListboxTextItem(&amp;quot;Value A&amp;quot;, 1);&lt;br /&gt;
				itemListbox-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
				listbox-&amp;gt;addItem(itemListbox);&lt;br /&gt;
			itemListbox = new ListboxTextItem(&amp;quot;Value B&amp;quot;, 2);&lt;br /&gt;
				itemListbox-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
				listbox-&amp;gt;addItem(itemListbox);&lt;br /&gt;
			itemListbox = new ListboxTextItem(&amp;quot;Value C&amp;quot;, 3);&lt;br /&gt;
				itemListbox-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
				listbox-&amp;gt;addItem(itemListbox);&lt;br /&gt;
			itemListbox = new ListboxTextItem(&amp;quot;Value D&amp;quot;, 4);&lt;br /&gt;
				itemListbox-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
				listbox-&amp;gt;addItem(itemListbox);&lt;br /&gt;
			listbox-&amp;gt;setItemSelectState(itemListbox, true);&lt;br /&gt;
			listbox-&amp;gt;ensureItemIsVisible(itemListbox);&lt;br /&gt;
			uint valueListbox = listbox-&amp;gt;getFirstSelectedItem()-&amp;gt;getID(); // Retrieve the ID of the selected listbox item&lt;br /&gt;
&lt;br /&gt;
			/* Combobox */&lt;br /&gt;
			Combobox* combobox = static_cast&amp;lt;Combobox*&amp;gt;(winMgr.getWindow(&amp;quot;Combobox&amp;quot;));&lt;br /&gt;
			combobox-&amp;gt;setReadOnly(true);&lt;br /&gt;
			ListboxTextItem* itemCombobox = new ListboxTextItem(&amp;quot;Value 1&amp;quot;, 1);&lt;br /&gt;
				itemCombobox-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
				combobox-&amp;gt;addItem(itemCombobox);&lt;br /&gt;
			itemCombobox = new ListboxTextItem(&amp;quot;Value 2&amp;quot;, 2);&lt;br /&gt;
				itemCombobox-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
				combobox-&amp;gt;addItem(itemCombobox);&lt;br /&gt;
				itemCombobox-&amp;gt;setSelected(true); // Select this item&lt;br /&gt;
				combobox-&amp;gt;setText(itemCombobox-&amp;gt;getText()); // Copy the item's text into the Editbox&lt;br /&gt;
			itemCombobox = new ListboxTextItem(&amp;quot;Value 3&amp;quot;, 3);&lt;br /&gt;
				itemCombobox-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
				combobox-&amp;gt;addItem(itemCombobox);&lt;br /&gt;
			itemCombobox = new ListboxTextItem(&amp;quot;Value 4&amp;quot;, 4);&lt;br /&gt;
				itemCombobox-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
				combobox-&amp;gt;addItem(itemCombobox);&lt;br /&gt;
			String valueCombobox = combobox-&amp;gt;getText(); // Retrieve the displayed text&lt;br /&gt;
			uint idCombobox = combobox-&amp;gt;getSelectedItem()-&amp;gt;getID(); // Retrieve the ID of the selected combobox item&lt;br /&gt;
&lt;br /&gt;
			/* MultiColumnList */&lt;br /&gt;
			MultiColumnList* multiColumnList = static_cast&amp;lt;MultiColumnList*&amp;gt;(winMgr.getWindow(&amp;quot;MultiColumnList&amp;quot;));\&lt;br /&gt;
			multiColumnList-&amp;gt;addColumn(&amp;quot;Col A&amp;quot;, 0, UDim(0.32f, 0));&lt;br /&gt;
			multiColumnList-&amp;gt;addColumn(&amp;quot;Col B&amp;quot;, 1, UDim(0.32f, 0));&lt;br /&gt;
			multiColumnList-&amp;gt;addColumn(&amp;quot;Col C&amp;quot;, 2, UDim(0.32f, 0));&lt;br /&gt;
			multiColumnList-&amp;gt;setSelectionMode(MultiColumnList::RowSingle); // MultiColumnList::RowMultiple&lt;br /&gt;
			ListboxTextItem* itemMultiColumnList;&lt;br /&gt;
			multiColumnList-&amp;gt;addRow();&lt;br /&gt;
			itemMultiColumnList = new ListboxTextItem(&amp;quot;A1&amp;quot;, 101);&lt;br /&gt;
				itemMultiColumnList-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
				multiColumnList-&amp;gt;setItem(itemMultiColumnList, 0, 0); // ColumnID, RowID&lt;br /&gt;
			itemMultiColumnList = new ListboxTextItem(&amp;quot;B1&amp;quot;, 102);&lt;br /&gt;
				//itemMultiColumnList-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
				// By commenting the line above a cell does not specify a selection indicator&lt;br /&gt;
				//  selecting that line will show a &amp;quot;gap&amp;quot; in the selection.&lt;br /&gt;
				multiColumnList-&amp;gt;setItem(itemMultiColumnList, 1, 0); // ColumnID, RowID&lt;br /&gt;
			itemMultiColumnList = new ListboxTextItem(&amp;quot;C1&amp;quot;, 103);&lt;br /&gt;
				itemMultiColumnList-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
				multiColumnList-&amp;gt;setItem(itemMultiColumnList, 2, 0); // ColumnID, RowID&lt;br /&gt;
			multiColumnList-&amp;gt;addRow();&lt;br /&gt;
			itemMultiColumnList = new ListboxTextItem(&amp;quot;A2&amp;quot;, 201);&lt;br /&gt;
				itemMultiColumnList-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
				multiColumnList-&amp;gt;setItem(itemMultiColumnList, 0, 1); // ColumnID, RowID&lt;br /&gt;
			itemMultiColumnList = new ListboxTextItem(&amp;quot;B2&amp;quot;, 202);&lt;br /&gt;
				itemMultiColumnList-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
				multiColumnList-&amp;gt;setItem(itemMultiColumnList, 1, 1); // ColumnID, RowID&lt;br /&gt;
			itemMultiColumnList = new ListboxTextItem(&amp;quot;C2&amp;quot;, 203);&lt;br /&gt;
				itemMultiColumnList-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
				multiColumnList-&amp;gt;setItem(itemMultiColumnList, 2, 1); // ColumnID, RowID&lt;br /&gt;
			MCLGridRef grid_ref(1, 0); // Select according to a grid reference; second row&lt;br /&gt;
			multiColumnList-&amp;gt;setItemSelectState(grid_ref, true);&lt;br /&gt;
			ListboxItem* listboxItem = multiColumnList-&amp;gt;getFirstSelectedItem();&lt;br /&gt;
			uint valueColumnA = listboxItem-&amp;gt;getID(); // Retrieve the value of the selected item from column A&lt;br /&gt;
			listboxItem = multiColumnList-&amp;gt;getNextSelected(listboxItem);&lt;br /&gt;
			uint valueColumnB = listboxItem-&amp;gt;getID(); // Retrieve the value of the selected item from column B&lt;br /&gt;
			listboxItem = multiColumnList-&amp;gt;getNextSelected(listboxItem);&lt;br /&gt;
			uint valueColumnC = listboxItem-&amp;gt;getID(); // Retrieve the value of the selected item from column C&lt;br /&gt;
&lt;br /&gt;
			/* TabControl */&lt;br /&gt;
			TabControl* winTabControl = static_cast&amp;lt;TabControl*&amp;gt;(winMgr.getWindow(&amp;quot;TabControl&amp;quot;));&lt;br /&gt;
			winTabControl-&amp;gt;setTabHeight(UDim(0.15f, 0.0f)); // Make the tab buttons a little bigger&lt;br /&gt;
			Window* tabPage = winMgr.getWindow(&amp;quot;TabPane1&amp;quot;);&lt;br /&gt;
				tabPage-&amp;gt;setText(&amp;quot;Page 1&amp;quot;);&lt;br /&gt;
				tabPage-&amp;gt;setSize(UVector2(UDim(1.0f, 0.0f), UDim(1.0f, 0.0f))); // Size to 100% of its parent, the TabControl&lt;br /&gt;
				tabPage-&amp;gt;setPosition(UVector2(UDim(0.0f, 0.0f), UDim(0.0f, 0.0f))); // Move to the upper left corner of its parent&lt;br /&gt;
				winTabControl-&amp;gt;addTab(tabPage);&lt;br /&gt;
			tabPage = winMgr.getWindow(&amp;quot;TabPane2&amp;quot;);&lt;br /&gt;
				tabPage-&amp;gt;setText(&amp;quot;Page 2&amp;quot;);&lt;br /&gt;
				tabPage-&amp;gt;setSize(UVector2(UDim(1.0f, 0.0f), UDim(1.0f, 0.0f))); &lt;br /&gt;
				tabPage-&amp;gt;setPosition(UVector2(UDim(0.0f, 0.0f), UDim(0.0f, 0.0f))); &lt;br /&gt;
				winTabControl-&amp;gt;addTab(tabPage);&lt;br /&gt;
&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;
	}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#endif // _WidgetGalore_h_&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== main.cpp ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&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;WidgetGalore.h&amp;quot;&lt;br /&gt;
&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;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== WidgetGalore.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;Text&amp;quot; &amp;gt;1&amp;lt;/Property&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;DefaultWindow&amp;quot; Name=&amp;quot;TabPane2&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.72875,0},{0.7185,0},{0.97875,0},{0.9685,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/StaticText&amp;quot; Name=&amp;quot;StaticTextPage2&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; &amp;gt;In Page 2:&amp;lt;/Property&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.06,0},{0.226667,0},{0.415,0},{0.476667,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;EditBoxPage2&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;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.420001,0},{0.22,0},{0.99,0},{0.47,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 Type=&amp;quot;TaharezLook/FrameWindow&amp;quot; Name=&amp;quot;winTabControl&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; &amp;gt;Tab Control Window&amp;lt;/Property&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.695627,0},{0.2725,0},{0.993122,0},{0.704167,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/TabControl&amp;quot; Name=&amp;quot;TabControl&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;TabHeight&amp;quot; Value=&amp;quot;{0,0}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;TabTextPadding&amp;quot; Value=&amp;quot;{0,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;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.088566,0},{0.174378,0},{0.931404,0},{0.804637,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;btnOk&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; &amp;gt;Ok&amp;lt;/Property&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.128412,0},{0.841464,0},{0.365583,0},{0.926003,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/Button&amp;quot; Name=&amp;quot;btnCancel&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; &amp;gt;Cancel&amp;lt;/Property&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.400429,0},{0.841464,0},{0.637601,0},{0.926003,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/Button&amp;quot; Name=&amp;quot;btnApply&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; &amp;gt;Apply&amp;lt;/Property&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.668224,0},{0.843977,0},{0.905394,0},{0.928516,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&amp;gt;&lt;br /&gt;
        &amp;lt;Window Type=&amp;quot;DefaultWindow&amp;quot; Name=&amp;quot;TabPane1&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;ClippedByParent&amp;quot; Value=&amp;quot;False&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.72875,0},{0.012178,0},{0.97875,0},{0.262178,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/StaticText&amp;quot; Name=&amp;quot;StaticTextPage1&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; &amp;gt;In Page 1:&amp;lt;/Property&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.06,0},{0.226667,0},{0.415,0},{0.476667,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;EditBoxPage1&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.420001,0},{0.22,0},{0.99,0},{0.47,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 Type=&amp;quot;TaharezLook/FrameWindow&amp;quot; Name=&amp;quot;winWidgets&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; &amp;gt;Dave, it&amp;amp;apos;s full of widgets!&amp;lt;/Property&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.00375,0},{0.143333,0},{0.751248,0},{0.806665,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/Button&amp;quot; Name=&amp;quot;btnClose&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; &amp;gt;Close&amp;lt;/Property&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.732397,0},{0.895137,0},{0.976465,0},{0.975697,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;Editbox&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;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.62442,0},{0.090471,0},{0.969776,0},{0.153443,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/Checkbox&amp;quot; Name=&amp;quot;Checkbox&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; &amp;gt;Check&amp;lt;/Property&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.845164,0},{0.396859,0},{0.944201,0},{0.453147,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;Combobox&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; &amp;gt;Combo Box&amp;lt;/Property&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.183835,0},{0.090471,0},{0.613522,0},{0.413287,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/RadioButton&amp;quot; Name=&amp;quot;RadioButton_A&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; &amp;gt;A&amp;lt;/Property&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.652856,0},{0.189876,0},{0.704964,0},{0.246164,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;RadioButton_B&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; &amp;gt;B&amp;lt;/Property&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.707569,0},{0.189876,0},{0.759678,0},{0.246164,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;RadioButton_C&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; &amp;gt;C&amp;lt;/Property&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.761542,0},{0.189876,0},{0.813651,0},{0.246164,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;RadioButton_1&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; &amp;gt;1&amp;lt;/Property&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.845164,0},{0.189876,0},{0.897272,0},{0.246164,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;RadioButton_2&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; &amp;gt;2&amp;lt;/Property&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.845164,0},{0.245152,0},{0.897272,0},{0.30144,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;RadioButton_3&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; &amp;gt;3&amp;lt;/Property&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.845164,0},{0.300429,0},{0.897272,0},{0.356717,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/HorizontalScrollbar&amp;quot; Name=&amp;quot;HorizontalScrollbar&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;PageSize&amp;quot; Value=&amp;quot;0&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;OverlapSize&amp;quot; Value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;DocumentSize&amp;quot; Value=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;ScrollPosition&amp;quot; Value=&amp;quot;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;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.183835,0},{0.185427,0},{0.613522,0},{0.26206,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/VerticalScrollbar&amp;quot; Name=&amp;quot;VerticalScrollbar&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;PageSize&amp;quot; Value=&amp;quot;0&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;OverlapSize&amp;quot; Value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;DocumentSize&amp;quot; Value=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;ScrollPosition&amp;quot; Value=&amp;quot;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;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.026087,0},{0.090471,0},{0.082106,0},{0.606802,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/Listbox&amp;quot; Name=&amp;quot;Listbox&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; &amp;gt;List Box&amp;lt;/Property&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.183835,0},{0.626634,0},{0.427903,0},{0.876634,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&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/MultiColumnList&amp;quot; Name=&amp;quot;MultiColumnList&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.183835,0},{0.271357,0},{0.816779,0},{0.551507,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&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/MultiLineEditbox&amp;quot; Name=&amp;quot;MultiLineEditbox&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; &amp;gt;            &lt;br /&gt;
&amp;lt;/Property&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.462498,0},{0.626634,0},{0.706566,0},{0.876634,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/ProgressBar&amp;quot; Name=&amp;quot;ProgressBar&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;StepSize&amp;quot; Value=&amp;quot;0.01&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;CurrentProgress&amp;quot; Value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.183835,0},{0.559296,0},{0.816779,0},{0.608291,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/Slider&amp;quot; Name=&amp;quot;Slider&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;CurrentValue&amp;quot; Value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;MaximumValue&amp;quot; Value=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;ClickStepSize&amp;quot; Value=&amp;quot;0.01&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.099415,0},{0.090471,0},{0.155434,0},{0.606802,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&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;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;0&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.845164,0},{0.48995,0},{0.944201,0},{0.551507,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/StaticImage&amp;quot; Name=&amp;quot;StaticImage&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.732397,0},{0.626634,0},{0.976465,0},{0.876634,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;StaticText&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; &amp;gt;Static Text&amp;lt;/Property&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.462498,0},{0.895137,0},{0.706566,0},{0.975697,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/ScrollablePane&amp;quot; Name=&amp;quot;ScrollablePane&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;ContentArea&amp;quot; Value=&amp;quot;l:0 t:0 r:0 b:0&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;HorzStepSize&amp;quot; Value=&amp;quot;0.1&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;VertStepSize&amp;quot; Value=&amp;quot;0.1&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;HorzOverlapSize&amp;quot; Value=&amp;quot;0.01&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.019063,0},{0.629399,0},{0.157023,0},{0.879399,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;VertOverlapSize&amp;quot; Value=&amp;quot;0.01&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;HorzScrollPosition&amp;quot; Value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;VertScrollPosition&amp;quot; Value=&amp;quot;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>Rackle</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=Dynamic_Fonts&amp;diff=2833</id>
		<title>Dynamic Fonts</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=Dynamic_Fonts&amp;diff=2833"/>
				<updated>2008-02-01T13:11:48Z</updated>
		
		<summary type="html">&lt;p&gt;Rackle: /* DynamicFont.h */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Introduction===&lt;br /&gt;
The datafiles\fonts folder contains static font definitions such as Commonwealth-10.font.  The XML contents of that file specify one particular font, mainly a logical name (Commonwealth-10), a filename (Commonv2c.ttf), and a size (10).  To load this static font definition you'd write the following line of code:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
CEGUI::FontManager::getSingleton().createFont(&amp;quot;Commonwealth-10.font&amp;quot;);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This works well, but sometimes you need to display a same font in various sizes.  One approach is to create multiple .font files, one per font size.  But there is a better approach, a way to dynamically create fonts.&lt;br /&gt;
&lt;br /&gt;
Please post comments or questions on the message board thread for the [http://www.cegui.org.uk/phpBB2/viewtopic.php?p=13350 DynamicFont]&lt;br /&gt;
&lt;br /&gt;
===Files===&lt;br /&gt;
&lt;br /&gt;
====DynamicFont.h====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/cpp&amp;gt;&lt;br /&gt;
#ifndef _DynamicFont_h_&lt;br /&gt;
#define _DynamicFont_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;
#include &amp;quot;CEGUIXMLAttributes.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;DynamicFont.layout&amp;quot;);&lt;br /&gt;
			sheet-&amp;gt;addChildWindow(guiLayout);&lt;br /&gt;
&lt;br /&gt;
			// Configure the event for the list of created fonts&lt;br /&gt;
			CEGUI::Combobox* existingFonts = static_cast&amp;lt;CEGUI::Combobox*&amp;gt;(winMgr.getWindow(&amp;quot;DynamicFont/Fonts&amp;quot;));&lt;br /&gt;
			existingFonts-&amp;gt;subscribeEvent(CEGUI::Combobox::EventListSelectionAccepted,	CEGUI::Event::Subscriber(&amp;amp;DemoSample::eventSelectExistingFont, this)); &lt;br /&gt;
&lt;br /&gt;
			// Configure the event for the add button&lt;br /&gt;
			CEGUI::PushButton* add = static_cast&amp;lt;CEGUI::PushButton*&amp;gt;(winMgr.getWindow(&amp;quot;DynamicFont/Add&amp;quot;));&lt;br /&gt;
			add-&amp;gt;subscribeEvent(CEGUI::PushButton::EventMouseClick,	CEGUI::Event::Subscriber(&amp;amp;DemoSample::eventAddFont, this)); &lt;br /&gt;
&lt;br /&gt;
			// Add the font previously created&lt;br /&gt;
			addExistingFont(&amp;quot;Commonwealth-10&amp;quot;);&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;
	}&lt;br /&gt;
&lt;br /&gt;
	bool eventAddFont(const CEGUI::EventArgs&amp;amp; args)&lt;br /&gt;
	{&lt;br /&gt;
		// Add a font from the specified parameters&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
		Window* nameText = winMgr.getWindow(&amp;quot;DynamicFont/Name&amp;quot;);&lt;br /&gt;
		Window* filenameText = winMgr.getWindow(&amp;quot;DynamicFont/Filename&amp;quot;);&lt;br /&gt;
		Window* sizeText = winMgr.getWindow(&amp;quot;DynamicFont/Size&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
		setFont(nameText-&amp;gt;getText(), filenameText-&amp;gt;getText(), sizeText-&amp;gt;getText());&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	void addExistingFont(const CEGUI::String&amp;amp; pName)&lt;br /&gt;
	{&lt;br /&gt;
		// Once a font has been created we add it to the combobox of fonts&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
&lt;br /&gt;
		Combobox* existingFonts = static_cast&amp;lt;CEGUI::Combobox*&amp;gt;(winMgr.getWindow(&amp;quot;DynamicFont/Fonts&amp;quot;));&lt;br /&gt;
		ListboxTextItem* itemCombobox = new ListboxTextItem(pName);&lt;br /&gt;
		itemCombobox-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
		itemCombobox-&amp;gt;setSelected(true);&lt;br /&gt;
		existingFonts-&amp;gt;addItem(itemCombobox);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool eventSelectExistingFont(const CEGUI::EventArgs&amp;amp; args)&lt;br /&gt;
	{&lt;br /&gt;
		// Use an already created font&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
		Combobox* existingFonts = static_cast&amp;lt;CEGUI::Combobox*&amp;gt;(winMgr.getWindow(&amp;quot;DynamicFont/Fonts&amp;quot;));&lt;br /&gt;
		setFont(existingFonts-&amp;gt;getText(), &amp;quot;&amp;quot;, &amp;quot;&amp;quot;);&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	void setFont(const CEGUI::String&amp;amp; pName, const CEGUI::String&amp;amp; pFilename, const CEGUI::String&amp;amp; pSize)&lt;br /&gt;
	{&lt;br /&gt;
		// Set the font displayed within the multiline editbox&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		String sampleText(pName);&lt;br /&gt;
&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
		CEGUI::Window* text = winMgr.getWindow(&amp;quot;DynamicFont/Text&amp;quot;);&lt;br /&gt;
		Font* font;&lt;br /&gt;
&lt;br /&gt;
		if(FontManager::getSingleton().isFontPresent(pName))&lt;br /&gt;
		{&lt;br /&gt;
			// Select a previously created font&lt;br /&gt;
			font = FontManager::getSingleton().getFont(pName);&lt;br /&gt;
		}&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			// Dynamically create a new font&lt;br /&gt;
			XMLAttributes xmlAttributes;&lt;br /&gt;
&lt;br /&gt;
			// Attributes specified within CEGUIFont.cpp&lt;br /&gt;
			xmlAttributes.add(&amp;quot;Name&amp;quot;, pName);&lt;br /&gt;
			xmlAttributes.add(&amp;quot;Filename&amp;quot;, pFilename);&lt;br /&gt;
			xmlAttributes.add(&amp;quot;ResourceGroup&amp;quot;, &amp;quot;&amp;quot;);&lt;br /&gt;
			xmlAttributes.add(&amp;quot;AutoScaled&amp;quot;, &amp;quot;true&amp;quot;);&lt;br /&gt;
			xmlAttributes.add(&amp;quot;NativeHorzRes&amp;quot;, &amp;quot;800&amp;quot;);&lt;br /&gt;
			xmlAttributes.add(&amp;quot;NativeVertRes&amp;quot;, &amp;quot;600&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			// Attributes specified within CEGUIXMLAttributes.cpp&lt;br /&gt;
			xmlAttributes.add(&amp;quot;Size&amp;quot;, pSize);&lt;br /&gt;
			xmlAttributes.add(&amp;quot;AntiAlias&amp;quot;, &amp;quot;true&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			try&lt;br /&gt;
			{&lt;br /&gt;
				font = FontManager::getSingleton().createFont(&amp;quot;FreeType&amp;quot;, xmlAttributes);&lt;br /&gt;
				if(font)&lt;br /&gt;
				{&lt;br /&gt;
					font-&amp;gt;load(); // This function must be used&lt;br /&gt;
					addExistingFont(pName);&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
			catch(Exception &amp;amp;e)&lt;br /&gt;
			{&lt;br /&gt;
				// Display the error message&lt;br /&gt;
				sampleText = e.getMessage();&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		text-&amp;gt;setFont(font);&lt;br /&gt;
		text-&amp;gt;setText(sampleText);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#endif // _DynamicFont_h_&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====main.cpp====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/cpp&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;DynamicFont.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;
}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====DynamicFont.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;TaharezLook/FrameWindow&amp;quot; Name=&amp;quot;DynamicFont&amp;quot; &amp;gt;&lt;br /&gt;
        &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Dynamic Font&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;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;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.02,0},{0.054167,0},{0.98,0},{0.781251,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;Window Type=&amp;quot;TaharezLook/MultiLineEditbox&amp;quot; Name=&amp;quot;DynamicFont/Text&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; &amp;gt;&lt;br /&gt;
&amp;lt;/Property&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.01,0},{0.075,0},{0.99,0},{0.715617,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;DynamicFont/NameLabel&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Name:&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;HorzFormatting&amp;quot; Value=&amp;quot;RightAligned&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.018409,0},{0.881661,0},{0.0809004,0},{0.968338,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;DynamicFont/Name&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.0809,0},{0.881661,0},{0.328819,0},{0.968338,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;DynamicFont/FilenameLabel&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;Filename:&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;HorzFormatting&amp;quot; Value=&amp;quot;RightAligned&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.347544,0},{0.881661,0},{0.438807,0},{0.968338,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;DynamicFont/Filename&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;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.438807,0},{0.881661,0},{0.713682,0},{0.968338,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;DynamicFont/SizeLabel&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;Size:&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;HorzFormatting&amp;quot; Value=&amp;quot;RightAligned&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.731982,0},{0.881661,0},{0.793499,0},{0.968338,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;DynamicFont/Size&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;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.793499,0},{0.881661,0},{0.858294,0},{0.968338,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;DynamicFont/Add&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Add&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.867109,0},{0.881661,0},{0.974324,0},{0.968338,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;DynamicFont/FontsLabel&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;Fonts:&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;HorzFormatting&amp;quot; Value=&amp;quot;RightAligned&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.018409,0},{0.768338,0},{0.0859395,0},{0.855015,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;DynamicFont/Fonts&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;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.085939,0},{0.768338,0},{0.974324,0},{0.994412,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&amp;gt;&lt;br /&gt;
&amp;lt;/GUILayout&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rackle</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=Moving_any_Window&amp;diff=2832</id>
		<title>Moving any Window</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=Moving_any_Window&amp;diff=2832"/>
				<updated>2008-02-01T13:11:31Z</updated>
		
		<summary type="html">&lt;p&gt;Rackle: /* MovingAnyWindow.h */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Introduction ===&lt;br /&gt;
This bit of code shows how you can play with the Cegui events to move any window, not just FrameWindows.&lt;br /&gt;
&lt;br /&gt;
The current implementation listens for a right mouse click.  When a CEGUI::Window* is right clicked it is flagged as being a &amp;quot;moving window&amp;quot;.  The GUI Sheet then subscribes to mouse move events, and upon a mouse movement event the &amp;quot;moving window&amp;quot;'s position is changed appropriately.  Right clicking again releases the window.&lt;br /&gt;
&lt;br /&gt;
A better implementation would be to have a border around the edge of the window.  When the cursor would be positioned above that border it would display a moving cursor.  Dragging (pressing down and holding the left mouse button) while above that border would move the window around.&lt;br /&gt;
&lt;br /&gt;
=== Files ===&lt;br /&gt;
==== MovingAnyWindow.h ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
#ifndef _00MovingAnyWindow_h_&lt;br /&gt;
#define _00MovingAnyWindow_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;
class DemoSample : public CEGuiSample&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
    // method to initialise the sample windows and events.&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;
			Scheme* currentScheme = 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;
			// Initially we are not moving any window&lt;br /&gt;
			mMovingWindow = 0;&lt;br /&gt;
&lt;br /&gt;
			// We have not yet clicked on the button&lt;br /&gt;
			mClickCount = 0;&lt;br /&gt;
&lt;br /&gt;
			// Create a button&lt;br /&gt;
			PushButton* pushButton = static_cast&amp;lt;PushButton*&amp;gt;(winMgr.createWindow(&amp;quot;TaharezLook/Button&amp;quot;, &amp;quot;Pushbutton&amp;quot;));&lt;br /&gt;
			sheet-&amp;gt;addChildWindow(pushButton);&lt;br /&gt;
			pushButton-&amp;gt;setPosition(UVector2(cegui_reldim(0.81f), cegui_reldim( 0.32f)));&lt;br /&gt;
			pushButton-&amp;gt;setSize(UVector2(cegui_reldim(0.15f), cegui_reldim( 0.2f)));&lt;br /&gt;
			pushButton-&amp;gt;setText(&amp;quot;Click&amp;quot;);&lt;br /&gt;
			pushButton-&amp;gt;subscribeEvent(CEGUI::PushButton::EventMouseClick, Event::Subscriber(&amp;amp;DemoSample::onRightClick,	this));&lt;br /&gt;
			pushButton-&amp;gt;subscribeEvent(CEGUI::PushButton::EventClicked, Event::Subscriber(&amp;amp;DemoSample::onLeftClick,		this));&lt;br /&gt;
&lt;br /&gt;
			// Create a multicolum list&lt;br /&gt;
			MultiColumnList* mcl = static_cast&amp;lt;MultiColumnList*&amp;gt;(winMgr.createWindow(&amp;quot;TaharezLook/MultiColumnList&amp;quot;, &amp;quot;MultiColumnList&amp;quot;));&lt;br /&gt;
			sheet-&amp;gt;addChildWindow(mcl);&lt;br /&gt;
			mcl-&amp;gt;setPosition(UVector2(cegui_reldim(0.01f), cegui_reldim( 0.1f)));&lt;br /&gt;
			mcl-&amp;gt;setSize(UVector2(cegui_reldim(0.5f), cegui_reldim( 0.8f)));&lt;br /&gt;
			mcl-&amp;gt;subscribeEvent(CEGUI::MultiColumnList::EventMouseClick, Event::Subscriber(&amp;amp;DemoSample::onRightClick,	this));&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;
    // method to perform any required cleanup operations.&lt;br /&gt;
    void cleanupSample(void)&lt;br /&gt;
	{&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool onRightClick(const CEGUI::EventArgs&amp;amp; pEventArgs)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		const MouseEventArgs mouseEventArgs = static_cast&amp;lt;const MouseEventArgs&amp;amp;&amp;gt;(pEventArgs);&lt;br /&gt;
		if(mouseEventArgs.button == CEGUI::RightButton)&lt;br /&gt;
		{&lt;br /&gt;
			if(mMovingWindow)&lt;br /&gt;
			{&lt;br /&gt;
				// We were moving a window, stop doing so on a second right click&lt;br /&gt;
				mMovingEvent-&amp;gt;disconnect();&lt;br /&gt;
				mMovingWindow = 0;&lt;br /&gt;
			}&lt;br /&gt;
			else&lt;br /&gt;
			{&lt;br /&gt;
				// Start moving a window when right clicking&lt;br /&gt;
				const WindowEventArgs windowEventArgs = static_cast&amp;lt;const WindowEventArgs&amp;amp;&amp;gt;(pEventArgs);&lt;br /&gt;
				mMovingWindow = windowEventArgs.window;&lt;br /&gt;
				mMovingEvent = System::getSingleton().getGUISheet()-&amp;gt;subscribeEvent(CEGUI::Window::EventMouseMove, Event::Subscriber(&amp;amp;DemoSample::onWindowMove,	this));&lt;br /&gt;
				mMousePosInWindow = CoordConverter::screenToWindow(*mMovingWindow, MouseCursor::getSingleton().getPosition());&lt;br /&gt;
			}&lt;br /&gt;
			return false; // Do not propagate this event to other subscribers&lt;br /&gt;
		}&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool onLeftClick(const CEGUI::EventArgs&amp;amp; pEventArgs)&lt;br /&gt;
	{&lt;br /&gt;
		// This is to check that the event is not propagated&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		const WindowEventArgs windowEventArgs = static_cast&amp;lt;const WindowEventArgs&amp;amp;&amp;gt;(pEventArgs);&lt;br /&gt;
		++mClickCount;&lt;br /&gt;
		windowEventArgs.window-&amp;gt;setText(&amp;quot;Click &amp;quot; + CEGUI::PropertyHelper::intToString(mClickCount));&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool onWindowMove(const CEGUI::EventArgs&amp;amp; pEventArgs)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		const MouseEventArgs mouseEventArgs = static_cast&amp;lt;const MouseEventArgs&amp;amp;&amp;gt;(pEventArgs);&lt;br /&gt;
		Vector2 localMousePos = CoordConverter::screenToWindow(*mMovingWindow, mouseEventArgs.position);&lt;br /&gt;
        UVector2 mouseMoveOffset(cegui_absdim(localMousePos.d_x), cegui_absdim(localMousePos.d_y));&lt;br /&gt;
		UVector2 mouseOffsetInWindow(cegui_absdim(mMousePosInWindow.d_x), cegui_absdim(mMousePosInWindow.d_y));&lt;br /&gt;
		mMovingWindow-&amp;gt;setPosition(mMovingWindow-&amp;gt;getPosition() + mouseMoveOffset - mouseOffsetInWindow);&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
	CEGUI::Window* mMovingWindow;&lt;br /&gt;
	CEGUI::Event::Connection mMovingEvent;&lt;br /&gt;
	CEGUI::Vector2 mMousePosInWindow;&lt;br /&gt;
	int mClickCount;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#endif  // _00MovingAnyWindow_h_&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== main.cpp ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&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;MovingAnyWindow.h&amp;quot;&lt;br /&gt;
&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;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rackle</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=Most_important_events&amp;diff=2831</id>
		<title>Most important events</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=Most_important_events&amp;diff=2831"/>
				<updated>2008-02-01T13:10:54Z</updated>
		
		<summary type="html">&lt;p&gt;Rackle: /* EventGalore.h */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article is going to show you the most important and usefull events of each widget.&lt;br /&gt;
&lt;br /&gt;
===Getting started===&lt;br /&gt;
I'm only going to change the initialiseSample function for each widget + adding some others.&lt;br /&gt;
====EventGalore.h====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
#ifndef _EventGalore_h_&lt;br /&gt;
#define _EventGalore_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;
class EventGalore : public CEGuiSample&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
   bool initialiseSample()&lt;br /&gt;
   {&lt;br /&gt;
       try&lt;br /&gt;
       {&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		&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;
		// Place here the code from the widgets, place functions below this function.&lt;br /&gt;
	&lt;br /&gt;
	}&lt;br /&gt;
	catch(CEGUI::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;
	return true;&lt;br /&gt;
   }&lt;br /&gt;
   void cleanupSample(void)&lt;br /&gt;
   {&lt;br /&gt;
   }&lt;br /&gt;
};&lt;br /&gt;
#endif // _EventGalore_h_&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====main.cpp====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&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;EventGalore.h&amp;quot;&lt;br /&gt;
&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;
    EventGalore app;&lt;br /&gt;
    return app.run();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Widgets===&lt;br /&gt;
&lt;br /&gt;
====Window====&lt;br /&gt;
&lt;br /&gt;
The Window widget is a important baseclass, all widgets inherit this class. It has lots 'n lots of events, where a few are introduced by other widgets, and where many are unimportant. If a event is taken from this Window class, it is mentioned.&lt;br /&gt;
&lt;br /&gt;
* EventDragDropItemEnters - Fired when a drag and drop item floats over the window.&lt;br /&gt;
* EventDragDropItemLeaves - Fired when a drag and drop item floats out of the window.&lt;br /&gt;
* EventDragDropItemDropped - Fired when the item has been dropped on the window.&lt;br /&gt;
&lt;br /&gt;
====PushButton====&lt;br /&gt;
&lt;br /&gt;
The button is a simple, expected widget. It contains only one important event, but we are going to add a few more.&lt;br /&gt;
&lt;br /&gt;
* EventClicked - Fired when the button has been clicked.&lt;br /&gt;
* EventMouseEnters - Fired when the mouse enters the widget. Inherited from Window.&lt;br /&gt;
* EventMouseLeaves - Fired when the mouse leaves the widget. Inherited from Window.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
PushButton * pushButton = static_cast&amp;lt;PushButton*&amp;gt;(winMgr.createWindow(&amp;quot;TaharezLook/Button&amp;quot;, &amp;quot;Button1&amp;quot;));&lt;br /&gt;
sheet-&amp;gt;addChildWindow(pb);&lt;br /&gt;
pushButton-&amp;gt;setPosition(UVector2(cegui_reldim(0.1f), cegui_reldim(0.1f)));&lt;br /&gt;
pushButton-&amp;gt;setSize(UVector2(cegui_reldim(0.2f), cegui_reldim(0.08f)));&lt;br /&gt;
pushButton-&amp;gt;setText(&amp;quot;Hey! Come here!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
pushButton-&amp;gt;subscribeEvent(PushButton::EventClicked, Event::Subscriber(&amp;amp;EventGalore::onPushButtonClicked, this));&lt;br /&gt;
pushButton-&amp;gt;subscribeEvent(PushButton::EventMouseEnters, Event::Subscriber(&amp;amp;EventGalore::onMouseEnters, this));&lt;br /&gt;
pushButton-&amp;gt;subscribeEvent(PushButton::EventMouseLeaves, Event::Subscriber(&amp;amp;EventGalore::onMouseLeaves, this));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
bool onPushButtonClicked(const CEGUI::EventArgs &amp;amp;e)&lt;br /&gt;
{&lt;br /&gt;
	// Our button has been clicked!&lt;br /&gt;
	CEGUI::PushButton * pushButton = static_cast&amp;lt;CEGUI::PushButton*&amp;gt;(CEGUI::WindowManager::getSingletonPtr()-&amp;gt;getWindow(&amp;quot;Button1&amp;quot;));&lt;br /&gt;
	pushButton-&amp;gt;setText(&amp;quot;We got clicked!&amp;quot;);&lt;br /&gt;
	return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool onMouseEnters(const CEGUI::EventArgs &amp;amp;e)&lt;br /&gt;
{&lt;br /&gt;
	// Mouse has entered the button. (Hover)&lt;br /&gt;
	CEGUI::PushButton * pushButton = static_cast&amp;lt;CEGUI::PushButton*&amp;gt;(CEGUI::WindowManager::getSingletonPtr()-&amp;gt;getWindow(&amp;quot;Button1&amp;quot;));&lt;br /&gt;
	pushButton-&amp;gt;setText(&amp;quot;Now click!&amp;quot;);&lt;br /&gt;
	return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool onMouseLeaves(const CEGUI::EventArgs &amp;amp;e)&lt;br /&gt;
{&lt;br /&gt;
	// Mouse has left the button.&lt;br /&gt;
	CEGUI::PushButton * pushButton = static_cast&amp;lt;CEGUI::PushButton*&amp;gt;(CEGUI::WindowManager::getSingletonPtr()-&amp;gt;getWindow(&amp;quot;Button1&amp;quot;));&lt;br /&gt;
	// Back to its original state!&lt;br /&gt;
	pushButton-&amp;gt;setText(&amp;quot;Hey! Come here!&amp;quot;);&lt;br /&gt;
	return true;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Listbox====&lt;br /&gt;
&lt;br /&gt;
The listbox is a very usefull listing widget. Only has one important event.&lt;br /&gt;
&lt;br /&gt;
* EventSelectionChanged - Fired when a or another item has been selected.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
Listbox * listBox = static_cast&amp;lt;Listbox*&amp;gt;(winMgr.createWindow(&amp;quot;TaharezLook/Listbox&amp;quot;, &amp;quot;Listbox1&amp;quot;));&lt;br /&gt;
sheet-&amp;gt;addChildWindow(listBox);&lt;br /&gt;
&lt;br /&gt;
listBox-&amp;gt;setPosition(UVector2(cegui_reldim(0.1f), cegui_reldim(0.1f)));&lt;br /&gt;
listBox-&amp;gt;setSize(UVector2(cegui_reldim(0.4f), cegui_reldim(0.4f)));&lt;br /&gt;
			&lt;br /&gt;
ListboxTextItem * listBoxItem = new ListboxTextItem(&amp;quot;Our very first item.&amp;quot;, 1);&lt;br /&gt;
listBoxItem-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
listBox-&amp;gt;addItem(listBoxItem);&lt;br /&gt;
&lt;br /&gt;
listBoxItem = new ListboxTextItem(&amp;quot;Our second item.&amp;quot;, 2);&lt;br /&gt;
listBoxItem-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
listBox-&amp;gt;addItem(listBoxItem);&lt;br /&gt;
&lt;br /&gt;
listBox-&amp;gt;subscribeEvent(Listbox::EventSelectionChanged, Event::Subscriber(&amp;amp;EventGalore::onSelectionChanged, this));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
bool onSelectionChanged(const CEGUI::EventArgs &amp;amp;e)&lt;br /&gt;
{&lt;br /&gt;
        // The selection has changed.&lt;br /&gt;
	CEGUI::Listbox * listBox = static_cast&amp;lt;CEGUI::Listbox*&amp;gt;(CEGUI::WindowManager::getSingletonPtr()-&amp;gt;getWindow(&amp;quot;Listbox1&amp;quot;));&lt;br /&gt;
	// Get the item we selected&lt;br /&gt;
	CEGUI::ListboxItem * selectedItem = listBox-&amp;gt;getFirstSelectedItem();&lt;br /&gt;
	selectedItem-&amp;gt;setText(&amp;quot;Oh we got selected!&amp;quot;);&lt;br /&gt;
		&lt;br /&gt;
	return true;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Checkbox====&lt;br /&gt;
&lt;br /&gt;
A checkable item useful for boolean(true or false) 'questions'.&lt;br /&gt;
&lt;br /&gt;
* EventCheckStateChanged - Fired when the checkbox got checked or un-checked.&lt;br /&gt;
* EventMouseEnters - Fired when the mouse hovers over the checkbox. Inherited from Window.&lt;br /&gt;
* EventMouseLeaves - Fired when the mouse moves out of the checkbox. Inherited from Window.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
Checkbox * checkBox = static_cast&amp;lt;Checkbox*&amp;gt;(winMgr.createWindow(&amp;quot;TaharezLook/Checkbox&amp;quot;, &amp;quot;Checkbox1&amp;quot;));&lt;br /&gt;
sheet-&amp;gt;addChildWindow(checkBox);&lt;br /&gt;
checkBox-&amp;gt;setPosition(UVector2(cegui_reldim(0.1f), cegui_reldim(0.1f)));&lt;br /&gt;
checkBox-&amp;gt;setSize(UVector2(cegui_reldim(0.4f), cegui_reldim(0.1f)));&lt;br /&gt;
&lt;br /&gt;
// A question where people can only answer yes or no (true or false)&lt;br /&gt;
checkBox-&amp;gt;setText(&amp;quot;Hey! Do you want to be rich?&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
checkBox-&amp;gt;subscribeEvent(Checkbox::EventCheckStateChanged, Event::Subscriber(&amp;amp;EventGalore::onCheckStateChanged, this));&lt;br /&gt;
checkBox-&amp;gt;subscribeEvent(Checkbox::EventMouseEnters, Event::Subscriber(&amp;amp;EventGalore::onMouseEnters, this));&lt;br /&gt;
checkBox-&amp;gt;subscribeEvent(Checkbox::EventMouseLeaves, Event::Subscriber(&amp;amp;EventGalore::onMouseLeaves, this));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
bool onCheckStateChanged(const CEGUI::EventArgs &amp;amp;e)&lt;br /&gt;
{&lt;br /&gt;
	// Our item has been checked or unchecked, update our item accordingly.&lt;br /&gt;
	updateCheckbox();&lt;br /&gt;
	return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool onMouseEnters(const CEGUI::EventArgs &amp;amp;e)&lt;br /&gt;
{&lt;br /&gt;
	// The mouse has entered, update the checkbox accordingly.&lt;br /&gt;
	updateCheckbox();		&lt;br /&gt;
	return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool onMouseLeaves(const CEGUI::EventArgs &amp;amp;e)&lt;br /&gt;
{&lt;br /&gt;
	CEGUI::Checkbox * checkBox = static_cast&amp;lt;CEGUI::Checkbox*&amp;gt;(CEGUI::WindowManager::getSingletonPtr()-&amp;gt;getWindow(&amp;quot;Checkbox1&amp;quot;));&lt;br /&gt;
	// Reset&lt;br /&gt;
	checkBox-&amp;gt;setText(&amp;quot;Hey! Do you want to be rich?&amp;quot;);&lt;br /&gt;
	return true;&lt;br /&gt;
}&lt;br /&gt;
	&lt;br /&gt;
void updateCheckbox()&lt;br /&gt;
{&lt;br /&gt;
	CEGUI::Checkbox * checkBox = static_cast&amp;lt;CEGUI::Checkbox*&amp;gt;(CEGUI::WindowManager::getSingletonPtr()-&amp;gt;getWindow(&amp;quot;Checkbox1&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
	if (checkBox-&amp;gt;isSelected())&lt;br /&gt;
	{&lt;br /&gt;
		// Our checkbox is selected, so someone has previously said 'yes'.&lt;br /&gt;
		checkBox-&amp;gt;setText(&amp;quot;Click to choose no!&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	else&lt;br /&gt;
	{&lt;br /&gt;
		// Our item is not selected, so someone hasn't done anything yet, or it has been previously&lt;br /&gt;
		//  unchecked.&lt;br /&gt;
		checkBox-&amp;gt;setText(&amp;quot;Click to choose yes!&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This might confuse at first sight. Let me go through this here, in steps.&lt;br /&gt;
* First, our checkbox is created and our mouse remains still.&lt;br /&gt;
* Second, the mouse enters the checkbox, updateCheckbox is called. In this case, our checkbox isn't selected by default, so the text becomes 'Click to choose yes!'.&lt;br /&gt;
* Third, we click. The onCheckStateChanged function is called, and that function calls updateCheckbox again to instantly change the text again. We have clicked the checkbox, while it wasn't previously checked, this means its checked now. Text becomes 'Click to choose no!'.&lt;br /&gt;
* Fourth, we move our mouse away from the checkbox. The onMouseLeaves function is called, where we reset the text to our question.&lt;br /&gt;
&lt;br /&gt;
====RadioButton====&lt;br /&gt;
&lt;br /&gt;
Similar to Checkbox, only it can be grouped, and once selected, it cannot be unselected (except when another button has been selected). Note, in this case, both functions are called when you click the unselected radiobutton. This is because one is unselected and one is selected.&lt;br /&gt;
&lt;br /&gt;
* EventSelectStateChanged - Fired when the radiobutton has been selected.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
RadioButton * radioButton = static_cast&amp;lt;RadioButton*&amp;gt;(winMgr.createWindow(&amp;quot;TaharezLook/RadioButton&amp;quot;, &amp;quot;RadioButton1&amp;quot;));&lt;br /&gt;
sheet-&amp;gt;addChildWindow(radioButton);&lt;br /&gt;
&lt;br /&gt;
radioButton-&amp;gt;setPosition(UVector2(cegui_reldim(0.1f), cegui_reldim(0.1f)));&lt;br /&gt;
radioButton-&amp;gt;setSize(UVector2(cegui_reldim(0.1f), cegui_reldim(0.1f)));&lt;br /&gt;
radioButton-&amp;gt;setText(&amp;quot;Yes&amp;quot;);&lt;br /&gt;
radioButton-&amp;gt;setGroupID(0);&lt;br /&gt;
&lt;br /&gt;
radioButton-&amp;gt;subscribeEvent(RadioButton::EventSelectStateChanged, Event::Subscriber(&amp;amp;EventGalore::onButton1SelectChanged, this));&lt;br /&gt;
// To make sure the event is fired.&lt;br /&gt;
radioButton-&amp;gt;setSelected(true);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
radioButton = static_cast&amp;lt;RadioButton*&amp;gt;(winMgr.createWindow(&amp;quot;TaharezLook/RadioButton&amp;quot;, &amp;quot;RadioButton2&amp;quot;));&lt;br /&gt;
sheet-&amp;gt;addChildWindow(radioButton);&lt;br /&gt;
&lt;br /&gt;
radioButton-&amp;gt;setPosition(UVector2(cegui_reldim(0.1f), cegui_reldim(0.2f)));&lt;br /&gt;
radioButton-&amp;gt;setSize(UVector2(cegui_reldim(0.1f), cegui_reldim(0.1f)));&lt;br /&gt;
radioButton-&amp;gt;setText(&amp;quot;No&amp;quot;);&lt;br /&gt;
radioButton-&amp;gt;setGroupID(0);&lt;br /&gt;
&lt;br /&gt;
radioButton-&amp;gt;subscribeEvent(RadioButton::EventSelectStateChanged, Event::Subscriber(&amp;amp;EventGalore::onButton2SelectChanged, this));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
bool onButton1SelectChanged(const CEGUI::EventArgs &amp;amp;e)&lt;br /&gt;
{&lt;br /&gt;
	CEGUI::RadioButton * radioButton1 = static_cast&amp;lt;CEGUI::RadioButton*&amp;gt;(CEGUI::WindowManager::getSingletonPtr()-&amp;gt;getWindow(&amp;quot;RadioButton1&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
	if (radioButton1-&amp;gt;isSelected())&lt;br /&gt;
	{&lt;br /&gt;
		// This one just got selected.&lt;br /&gt;
		radioButton1-&amp;gt;setText(&amp;quot;Ok then. Yes it is.&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	else&lt;br /&gt;
	{&lt;br /&gt;
		// This one got unselected. Reset it.&lt;br /&gt;
		radioButton1-&amp;gt;setText(&amp;quot;Yes&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool onButton2SelectChanged(const CEGUI::EventArgs &amp;amp;e)&lt;br /&gt;
{&lt;br /&gt;
	// We have chosen no.&lt;br /&gt;
	CEGUI::RadioButton * radioButton2 = static_cast&amp;lt;CEGUI::RadioButton*&amp;gt;(CEGUI::WindowManager::getSingletonPtr()-&amp;gt;getWindow(&amp;quot;RadioButton2&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
	if (radioButton2-&amp;gt;isSelected())&lt;br /&gt;
	{&lt;br /&gt;
		// This one just got selected.&lt;br /&gt;
		radioButton2-&amp;gt;setText(&amp;quot;Ok then. No it is.&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	else&lt;br /&gt;
	{&lt;br /&gt;
		// This one got unselected. Reset it.&lt;br /&gt;
		radioButton2-&amp;gt;setText(&amp;quot;No&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	return true;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Editbox====&lt;br /&gt;
&lt;br /&gt;
A simple editable box where text can be entered.&lt;br /&gt;
&lt;br /&gt;
* EventTextAccepted - Fired when someone has pressed TAB or RETURN, or when someone has clicked another window.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
Editbox * editBox = static_cast&amp;lt;Editbox*&amp;gt;(winMgr.createWindow(&amp;quot;TaharezLook/Editbox&amp;quot;, &amp;quot;Editbox1&amp;quot;));&lt;br /&gt;
sheet-&amp;gt;addChildWindow(editBox);&lt;br /&gt;
&lt;br /&gt;
editBox-&amp;gt;setPosition(UVector2(cegui_reldim(0.1f), cegui_reldim(0.1f)));&lt;br /&gt;
editBox-&amp;gt;setSize(UVector2(cegui_reldim(0.4f), cegui_reldim(0.1f)));&lt;br /&gt;
editBox-&amp;gt;setText(&amp;quot;Edit me!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
editBox-&amp;gt;subscribeEvent(Editbox::EventTextAccepted, Event::Subscriber(&amp;amp;EventGalore::onTextAccepted, this));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
bool onTextAccepted(const CEGUI::EventArgs &amp;amp;e)&lt;br /&gt;
{&lt;br /&gt;
	// Our text has been accepted by either deactivating it or pressing tab or enter.&lt;br /&gt;
	CEGUI::Editbox * editBox = static_cast&amp;lt;CEGUI::Editbox*&amp;gt;(CEGUI::WindowManager::getSingletonPtr()-&amp;gt;getWindow(&amp;quot;Editbox1&amp;quot;));&lt;br /&gt;
	// So we got the text here, do something with it. Lets just..put the text back in reverse order.&lt;br /&gt;
	CEGUI::String currentText = editBox-&amp;gt;getText();&lt;br /&gt;
&lt;br /&gt;
	std::string finalString;&lt;br /&gt;
&lt;br /&gt;
	CEGUI::String::reverse_iterator ppkNode = currentText.rbegin();&lt;br /&gt;
	CEGUI::String::reverse_iterator ppkEnd = currentText.rend();&lt;br /&gt;
&lt;br /&gt;
	for (; ppkNode != ppkEnd; ++ppkNode)&lt;br /&gt;
	{&lt;br /&gt;
		finalString.push_back((*ppkNode));&lt;br /&gt;
	}&lt;br /&gt;
	editBox-&amp;gt;setText(finalString);&lt;br /&gt;
	return true;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====MultiLineEditbox====&lt;br /&gt;
&lt;br /&gt;
This widget is pretty much the same as editbox, but allows more lines.&lt;br /&gt;
&lt;br /&gt;
* EventTextChanged - Fired when text has been changed. Inherited from window.&lt;br /&gt;
&lt;br /&gt;
This widget doesn't have the event TextAccepted, so you'll need to 'apply' the input by a button for example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
MultiLineEditbox * multiLineEditbox = static_cast&amp;lt;MultiLineEditbox*&amp;gt;(winMgr.createWindow(&amp;quot;TaharezLook/MultiLineEditbox&amp;quot;, &amp;quot;MultiEditbox1&amp;quot;));&lt;br /&gt;
sheet-&amp;gt;addChildWindow(multiLineEditbox);&lt;br /&gt;
multiLineEditbox-&amp;gt;setPosition(UVector2(cegui_reldim(0.1f), cegui_reldim(0.1f)));&lt;br /&gt;
multiLineEditbox-&amp;gt;setSize(UVector2(cegui_reldim(0.3f), cegui_reldim(0.3f)));&lt;br /&gt;
multiLineEditbox-&amp;gt;setText(&amp;quot;Now edit me!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
multiLineEditbox-&amp;gt;subscribeEvent(MultiLineEditbox::EventTextChanged, Event::Subscriber(&amp;amp;EventGalore::onTextChanged, this));&lt;br /&gt;
&lt;br /&gt;
// This text is going to show the result.&lt;br /&gt;
Window * textWindow = winMgr.createWindow(&amp;quot;TaharezLook/StaticText&amp;quot;, &amp;quot;StaticText1&amp;quot;);&lt;br /&gt;
sheet-&amp;gt;addChildWindow(textWindow);&lt;br /&gt;
textWindow-&amp;gt;setPosition(UVector2(cegui_reldim(0.1f), cegui_reldim(0.5f)));&lt;br /&gt;
textWindow-&amp;gt;setSize(UVector2(cegui_reldim(0.6f), cegui_reldim(0.1f)));&lt;br /&gt;
textWindow-&amp;gt;setText(&amp;quot;Now edit me!&amp;quot;);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
bool onTextChanged(const CEGUI::EventArgs &amp;amp;e)&lt;br /&gt;
{&lt;br /&gt;
	CEGUI::WindowManager * winMgr = CEGUI::WindowManager::getSingletonPtr();&lt;br /&gt;
	CEGUI::MultiLineEditbox * multiLineEditbox = static_cast&amp;lt;CEGUI::MultiLineEditbox*&amp;gt;(winMgr-&amp;gt;getWindow(&amp;quot;MultiEditbox1&amp;quot;));&lt;br /&gt;
	CEGUI::Window * textWindow = winMgr-&amp;gt;getWindow(&amp;quot;StaticText1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	textWindow-&amp;gt;setText(multiLineEditbox-&amp;gt;getText());&lt;br /&gt;
	return true;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Notice what happens when you enter text on another line though :)&lt;br /&gt;
&lt;br /&gt;
====FrameWindow====&lt;br /&gt;
&lt;br /&gt;
This is a window where you usually put your widgets on.&lt;br /&gt;
&lt;br /&gt;
* EventCloseClicked - Fired when the 'X' in the upper right corner is clicked (of the Framewindow).&lt;br /&gt;
* EventRollupToggled - Fired when the window gets rolled up, or rolled down.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
FrameWindow * frameWindow = static_cast&amp;lt;FrameWindow*&amp;gt;(winMgr.createWindow(&amp;quot;TaharezLook/FrameWindow&amp;quot;, &amp;quot;FrameWindow1&amp;quot;));&lt;br /&gt;
sheet-&amp;gt;addChildWindow(frameWindow)&lt;br /&gt;
frameWindow-&amp;gt;setPosition(UVector2(cegui_reldim(0.1f), cegui_reldim(0.1f)));&lt;br /&gt;
frameWindow-&amp;gt;setSize(UVector2(cegui_reldim(0.4f), cegui_reldim(0.4f)));&lt;br /&gt;
frameWindow-&amp;gt;setText(&amp;quot;Our window&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
frameWindow-&amp;gt;subscribeEvent(FrameWindow::EventCloseClicked, Event::Subscriber(&amp;amp;EventGalore::onCloseClicked, this));&lt;br /&gt;
frameWindow-&amp;gt;subscribeEvent(FrameWindow::EventRollupToggled, Event::Subscriber(&amp;amp;EventGalore::onRollupToggled, this));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
bool onCloseClicked(const CEGUI::EventArgs &amp;amp;e)&lt;br /&gt;
{&lt;br /&gt;
	// Someone has clicked the upper right 'X'.&lt;br /&gt;
&lt;br /&gt;
	// We don't HAVE to cast to FrameWindow, as the method we are going to use to close the window&lt;br /&gt;
	//  is available in Window, but for the sake of clarity...&lt;br /&gt;
	CEGUI::FrameWindow * frameWindow = static_cast&amp;lt;CEGUI::FrameWindow*&amp;gt;(CEGUI::WindowManager::getSingletonPtr()-&amp;gt;getWindow(&amp;quot;FrameWindow1&amp;quot;));&lt;br /&gt;
	frameWindow-&amp;gt;destroy();&lt;br /&gt;
	// Note: Dont try to delete the pointer.&lt;br /&gt;
	return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool onRollupToggled(const CEGUI::EventArgs &amp;amp;e)&lt;br /&gt;
{&lt;br /&gt;
	CEGUI::FrameWindow * frameWindow = static_cast&amp;lt;CEGUI::FrameWindow*&amp;gt;(CEGUI::WindowManager::getSingletonPtr()-&amp;gt;getWindow(&amp;quot;FrameWindow1&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
	if (frameWindow-&amp;gt;isRolledup())&lt;br /&gt;
	{&lt;br /&gt;
		frameWindow-&amp;gt;setText(&amp;quot;Rolled up&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	else&lt;br /&gt;
	{&lt;br /&gt;
		frameWindow-&amp;gt;setText(&amp;quot;Our window&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	return true;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====ProgressBar====&lt;br /&gt;
&lt;br /&gt;
A progress widget.&lt;br /&gt;
&lt;br /&gt;
* EventProgressDone - Fired when the progress bar reaches 100%(1.0f).&lt;br /&gt;
* EventProgressChanged - Fired when the progress changes.&lt;br /&gt;
* EventMouseClick - Fired when someone clicked on the window. Inherited from Window.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
ProgressBar * progressBar = static_cast&amp;lt;ProgressBar*&amp;gt;(winMgr.createWindow(&amp;quot;TaharezLook/ProgressBar&amp;quot;, &amp;quot;ProgressBar1&amp;quot;));&lt;br /&gt;
sheet-&amp;gt;addChildWindow(progressBar);&lt;br /&gt;
progressBar-&amp;gt;setPosition(UVector2(cegui_reldim(0.1f), cegui_reldim(0.1f)));&lt;br /&gt;
progressBar-&amp;gt;setSize(UVector2(cegui_reldim(0.5f), cegui_reldim(0.04f)));&lt;br /&gt;
&lt;br /&gt;
progressBar-&amp;gt;subscribeEvent(ProgressBar::EventProgressDone, Event::Subscriber(&amp;amp;EventGalore::onProgressDone, this));&lt;br /&gt;
progressBar-&amp;gt;subscribeEvent(ProgressBar::EventProgressChanged, Event::Subscriber(&amp;amp;EventGalore::onProgressChanged, this));&lt;br /&gt;
progressBar-&amp;gt;subscribeEvent(ProgressBar::EventMouseClick, Event::Subscriber(&amp;amp;EventGalore::onMouseClick, this));&lt;br /&gt;
&lt;br /&gt;
Window * resultWindow = winMgr.createWindow(&amp;quot;TaharezLook/StaticText&amp;quot;, &amp;quot;StaticText1&amp;quot;);&lt;br /&gt;
sheet-&amp;gt;addChildWindow(resultWindow);&lt;br /&gt;
resultWindow-&amp;gt;setPosition(UVector2(cegui_reldim(0.1f), cegui_reldim(0.05f)));&lt;br /&gt;
resultWindow-&amp;gt;setSize(UVector2(cegui_reldim(0.5f), cegui_reldim(0.06f)));&lt;br /&gt;
resultWindow-&amp;gt;setText(&amp;quot;Lets start progressing!&amp;quot;);&lt;br /&gt;
resultWindow-&amp;gt;setProperty(&amp;quot;FrameEnabled&amp;quot;, &amp;quot;false&amp;quot;);&lt;br /&gt;
resultWindow-&amp;gt;setProperty(&amp;quot;BackgroundEnabled&amp;quot;, &amp;quot;false&amp;quot;);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
bool onProgressDone(const CEGUI::EventArgs &amp;amp;e)&lt;br /&gt;
{&lt;br /&gt;
	// The progress bar is full.&lt;br /&gt;
	CEGUI::Window * resultWindow = CEGUI::WindowManager::getSingletonPtr()-&amp;gt;getWindow(&amp;quot;StaticText1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	resultWindow-&amp;gt;setText(&amp;quot;We are done!&amp;quot;);&lt;br /&gt;
	return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool onProgressChanged(const CEGUI::EventArgs &amp;amp;e)&lt;br /&gt;
{&lt;br /&gt;
	// The progress changed.&lt;br /&gt;
	CEGUI::WindowManager * winMgr = CEGUI::WindowManager::getSingletonPtr();&lt;br /&gt;
	CEGUI::ProgressBar * progressBar = static_cast&amp;lt;CEGUI::ProgressBar*&amp;gt;(winMgr-&amp;gt;getWindow(&amp;quot;ProgressBar1&amp;quot;));&lt;br /&gt;
	CEGUI::Window * resultWindow = winMgr-&amp;gt;getWindow(&amp;quot;StaticText1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	float progress = progressBar-&amp;gt;getProgress();&lt;br /&gt;
	int finalProgress = static_cast&amp;lt;int&amp;gt;(progress*100);&lt;br /&gt;
	std::stringstream resultStr;&lt;br /&gt;
	resultStr &amp;lt;&amp;lt; &amp;quot;Progress: &amp;quot; &amp;lt;&amp;lt; finalProgress &amp;lt;&amp;lt; &amp;quot;%&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
	resultWindow-&amp;gt;setText(resultStr.str());&lt;br /&gt;
	return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool onMouseClick(const CEGUI::EventArgs &amp;amp;e)&lt;br /&gt;
{&lt;br /&gt;
	CEGUI::ProgressBar * progressBar = static_cast&amp;lt;CEGUI::ProgressBar*&amp;gt;(CEGUI::WindowManager::getSingletonPtr()-&amp;gt;getWindow(&amp;quot;ProgressBar1&amp;quot;));&lt;br /&gt;
	progressBar-&amp;gt;setProgress(progressBar-&amp;gt;getProgress() + 0.05f);&lt;br /&gt;
	return true;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Slider====&lt;br /&gt;
&lt;br /&gt;
A widget which accepts input though moving a 'thumb' between a range.&lt;br /&gt;
&lt;br /&gt;
* EventValueChanged - Fired when the slider's thumb has moved one step left or right.&lt;br /&gt;
* EventThumbTrackEnded - Fired when the user stops moving the slider's thumb. Handy when a change causes an CPU expensive operation, because now you only catch the 'final' change.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
Slider * slider = static_cast&amp;lt;Slider*&amp;gt;(winMgr.createWindow(&amp;quot;TaharezLook/Slider&amp;quot;, &amp;quot;Slider1&amp;quot;));&lt;br /&gt;
sheet-&amp;gt;addChildWindow(slider);&lt;br /&gt;
slider-&amp;gt;setPosition(UVector2(cegui_reldim(0.1f), cegui_reldim(0.1f)));&lt;br /&gt;
slider-&amp;gt;setSize(UVector2(cegui_reldim(0.5f), cegui_reldim(0.04f)));&lt;br /&gt;
slider-&amp;gt;setMaxValue(1.0f);&lt;br /&gt;
slider-&amp;gt;setClickStep(0.1f);&lt;br /&gt;
slider-&amp;gt;setCurrentValue(0.5f); // Start half way&lt;br /&gt;
&lt;br /&gt;
slider-&amp;gt;subscribeEvent(Slider::EventValueChanged, Event::Subscriber(&amp;amp;EventGalore::onSliderValueChanged, this));&lt;br /&gt;
slider-&amp;gt;subscribeEvent(Slider::EventProgressChanged, Event::Subscriber(&amp;amp;EventGalore::onSliderChangeEnded, this));&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
bool onSliderValueChanged(const CEGUI::EventArgs &amp;amp;e)&lt;br /&gt;
{&lt;br /&gt;
	// The slider moved.&lt;br /&gt;
	CEGUI::WindowManager * winMgr = CEGUI::WindowManager::getSingletonPtr();&lt;br /&gt;
	CEGUI::Slider * slider = static_cast&amp;lt;CEGUI::Slider*&amp;gt;(winMgr-&amp;gt;getWindow(&amp;quot;Slider1&amp;quot;));&lt;br /&gt;
	CEGUI::Window * resultWindow = winMgr-&amp;gt;getWindow(&amp;quot;StaticText1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
        std::stringstream resultStr;&lt;br /&gt;
	resultStr &amp;lt;&amp;lt; &amp;quot;Moved to: &amp;quot; &amp;lt;&amp;lt; slider-&amp;gt;getCurrentValue();&lt;br /&gt;
&lt;br /&gt;
	resultWindow-&amp;gt;setText(resultStr);&lt;br /&gt;
	return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool onSliderChangeEnded(const CEGUI::EventArgs &amp;amp;e)&lt;br /&gt;
{&lt;br /&gt;
	// The slider stopped moving (user released mouse)&lt;br /&gt;
	CEGUI::WindowManager * winMgr = CEGUI::WindowManager::getSingletonPtr();&lt;br /&gt;
	CEGUI::Slider * slider = static_cast&amp;lt;CEGUI::Slider*&amp;gt;(winMgr-&amp;gt;getWindow(&amp;quot;Slider1&amp;quot;));&lt;br /&gt;
	CEGUI::Window * resultWindow = winMgr-&amp;gt;getWindow(&amp;quot;StaticText1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
        std::stringstream resultStr;&lt;br /&gt;
	resultStr &amp;lt;&amp;lt; &amp;quot;Moving stopped at: &amp;quot; &amp;lt;&amp;lt; slider-&amp;gt;getCurrentValue();&lt;br /&gt;
&lt;br /&gt;
	resultWindow-&amp;gt;setText(resultStr);&lt;br /&gt;
	return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Spinner====&lt;br /&gt;
&lt;br /&gt;
====MultiColumnList====&lt;/div&gt;</summary>
		<author><name>Rackle</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=PropertyFinder&amp;diff=2830</id>
		<title>PropertyFinder</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=PropertyFinder&amp;diff=2830"/>
				<updated>2008-02-01T13:10:11Z</updated>
		
		<summary type="html">&lt;p&gt;Rackle: /* PropertyFinder.h */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Introduction ===&lt;br /&gt;
This code creates a tool to list the properties associated with the widgets of a scheme.  It loads the .scheme files from within the Scheme directory and displays the widgets defined within that scheme.  Selecting a widget will list every property associated to that widget by default.  And selecting a property will display its help.&lt;br /&gt;
&lt;br /&gt;
Please discuss this snippet within the [http://www.cegui.org.uk/phpBB2/viewtopic.php?p=11670#11670 Property Finder] thread.  The properties for the widgets within the Taharez scheme are presented in [[http://www.cegui.org.uk/wiki/index.php/SetProperty SetProperty]] and [[SetProperty (WindowsLook)]].  The Cegui API also [http://www.cegui.org.uk/api_reference/classCEGUI_1_1Property.html lists the properties].&lt;br /&gt;
&lt;br /&gt;
=== Files ===&lt;br /&gt;
==== PropertyFinder.h ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
#ifndef _PropertyFinder_h_&lt;br /&gt;
#define _PropertyFinder_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;
#include &amp;quot;CEGUIDefaultResourceProvider.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;io.h&amp;gt;&lt;br /&gt;
#include &amp;lt;direct.h&amp;gt;&lt;br /&gt;
#include &amp;lt;map&amp;gt;&lt;br /&gt;
#include &amp;lt;vector&amp;gt;&lt;br /&gt;
#include &amp;lt;algorithm&amp;gt;&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;
&lt;br /&gt;
		// The executable is stored within &amp;lt;cegui&amp;gt;/bin&lt;br /&gt;
		// The following will change the location of the datafiles from their default of&lt;br /&gt;
		// ../datafiles (which works well for the samples) to &amp;lt;cegui&amp;gt;/samples/datafiles&lt;br /&gt;
		DefaultResourceProvider* rp = reinterpret_cast&amp;lt;DefaultResourceProvider*&amp;gt;(System::getSingleton().getResourceProvider());&lt;br /&gt;
		rp-&amp;gt;setResourceGroupDirectory(&amp;quot;fonts&amp;quot;,			&amp;quot;../samples/datafiles/fonts/&amp;quot;);&lt;br /&gt;
		rp-&amp;gt;setResourceGroupDirectory(&amp;quot;imagesets&amp;quot;,		&amp;quot;../samples/datafiles/imagesets/&amp;quot;);&lt;br /&gt;
		rp-&amp;gt;setResourceGroupDirectory(&amp;quot;layouts&amp;quot;,		&amp;quot;c:/programming/_Projects/CeguiTestBed/&amp;quot;);&lt;br /&gt;
		rp-&amp;gt;setResourceGroupDirectory(&amp;quot;looknfeels&amp;quot;,		&amp;quot;../samples/datafiles/looknfeel/&amp;quot;);&lt;br /&gt;
		rp-&amp;gt;setResourceGroupDirectory(&amp;quot;lua_scripts&amp;quot;,	&amp;quot;../samples/datafiles/lua_scripts/&amp;quot;);&lt;br /&gt;
		rp-&amp;gt;setResourceGroupDirectory(&amp;quot;schemes&amp;quot;,		&amp;quot;../samples/datafiles/schemes/&amp;quot;);&lt;br /&gt;
		Font::setDefaultResourceGroup(&amp;quot;fonts&amp;quot;);&lt;br /&gt;
		Imageset::setDefaultResourceGroup(&amp;quot;imagesets&amp;quot;);&lt;br /&gt;
		WindowManager::setDefaultResourceGroup(&amp;quot;layouts&amp;quot;);&lt;br /&gt;
		WidgetLookManager::setDefaultResourceGroup(&amp;quot;looknfeels&amp;quot;);&lt;br /&gt;
		ScriptModule::setDefaultResourceGroup(&amp;quot;lua_scripts&amp;quot;);&lt;br /&gt;
		Scheme::setDefaultResourceGroup(&amp;quot;schemes&amp;quot;);&lt;br /&gt;
&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;
			Scheme* currentScheme = 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;PropertyFinder.layout&amp;quot;);&lt;br /&gt;
			sheet-&amp;gt;addChildWindow(guiLayout);&lt;br /&gt;
&lt;br /&gt;
			// Retrieve the handle to the often used widgets&lt;br /&gt;
			mSchemes = static_cast&amp;lt;CEGUI::Combobox*&amp;gt;(winMgr.getWindow(&amp;quot;PropertyFinder/SchemeList&amp;quot;));&lt;br /&gt;
			mWidgets = static_cast&amp;lt;CEGUI::Combobox*&amp;gt;(winMgr.getWindow(&amp;quot;PropertyFinder/WidgetList&amp;quot;));&lt;br /&gt;
			mProperties = static_cast&amp;lt;CEGUI::Listbox*&amp;gt;(winMgr.getWindow(&amp;quot;PropertyFinder/Properties&amp;quot;));&lt;br /&gt;
			mInformation = static_cast&amp;lt;CEGUI::MultiLineEditbox*&amp;gt;(winMgr.getWindow(&amp;quot;PropertyFinder/Information&amp;quot;));&lt;br /&gt;
			mRadioButton = static_cast&amp;lt;CEGUI::RadioButton*&amp;gt;(winMgr.getWindow(&amp;quot;PropertyFinder/ExportWiki&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
			// Configure the schemes&lt;br /&gt;
			mSchemes-&amp;gt;subscribeEvent(Combobox::EventTextChanged,			Event::Subscriber(&amp;amp;DemoSample::onSchemeChanged,	this));&lt;br /&gt;
			mSchemes-&amp;gt;subscribeEvent(Combobox::EventListSelectionAccepted,	Event::Subscriber(&amp;amp;DemoSample::onSchemeChanged,	this));&lt;br /&gt;
			mSchemes-&amp;gt;setSortingEnabled(true);&lt;br /&gt;
&lt;br /&gt;
			// Configure the widgets&lt;br /&gt;
			mWidgets-&amp;gt;subscribeEvent(Combobox::EventTextChanged,			Event::Subscriber(&amp;amp;DemoSample::onWidgetChanged,	this));&lt;br /&gt;
			mWidgets-&amp;gt;subscribeEvent(Combobox::EventListSelectionAccepted,	Event::Subscriber(&amp;amp;DemoSample::onWidgetChanged,	this));&lt;br /&gt;
			mWidgets-&amp;gt;setSortingEnabled(true);&lt;br /&gt;
&lt;br /&gt;
			// Configure the properties&lt;br /&gt;
			mProperties-&amp;gt;setSortingEnabled(true);&lt;br /&gt;
			mProperties-&amp;gt;setMultiselectEnabled(false);&lt;br /&gt;
			mProperties-&amp;gt;subscribeEvent(Listbox::EventSelectionChanged,		Event::Subscriber(&amp;amp;DemoSample::onPropertyChanged,	this));&lt;br /&gt;
&lt;br /&gt;
			// Configure the export&lt;br /&gt;
			CEGUI::PushButton* btnExport = static_cast&amp;lt;CEGUI::PushButton*&amp;gt;(winMgr.getWindow(&amp;quot;PropertyFinder/Export&amp;quot;));&lt;br /&gt;
			btnExport-&amp;gt;subscribeEvent(PushButton::EventClicked,				Event::Subscriber(&amp;amp;DemoSample::onExport,			this));&lt;br /&gt;
			mRadioButton-&amp;gt;setGroupID(1);&lt;br /&gt;
				mRadioButton-&amp;gt;setID(Wiki);&lt;br /&gt;
				mRadioButton-&amp;gt;setSelected(true);&lt;br /&gt;
			CEGUI::RadioButton* radioButton = static_cast&amp;lt;CEGUI::RadioButton*&amp;gt;(winMgr.getWindow(&amp;quot;PropertyFinder/ExportHtml&amp;quot;));&lt;br /&gt;
				radioButton-&amp;gt;setGroupID(1);&lt;br /&gt;
				radioButton-&amp;gt;setID(Html);&lt;br /&gt;
				radioButton-&amp;gt;setSelected(false);&lt;br /&gt;
			radioButton = static_cast&amp;lt;CEGUI::RadioButton*&amp;gt;(winMgr.getWindow(&amp;quot;PropertyFinder/ExportXml&amp;quot;));&lt;br /&gt;
				radioButton-&amp;gt;setGroupID(1);&lt;br /&gt;
				radioButton-&amp;gt;setID(Xml);&lt;br /&gt;
				radioButton-&amp;gt;setSelected(false);&lt;br /&gt;
&lt;br /&gt;
			// Load every scheme&lt;br /&gt;
			loadEverySchemes(currentScheme);&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;
	}&lt;br /&gt;
&lt;br /&gt;
	void loadEverySchemes(CEGUI::Scheme* pCurrentScheme)&lt;br /&gt;
	{&lt;br /&gt;
		// Locate the scheme directory and suffix the scheme file search pattern&lt;br /&gt;
		CEGUI::DefaultResourceProvider* rp = reinterpret_cast&amp;lt;CEGUI::DefaultResourceProvider*&amp;gt;(CEGUI::System::getSingleton().getResourceProvider());&lt;br /&gt;
		CEGUI::String schemeDirectory = rp-&amp;gt;getResourceGroupDirectory(&amp;quot;schemes&amp;quot;) + &amp;quot;\\*.scheme&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
		// Read the filtered contents of the scheme directory&lt;br /&gt;
		struct _finddata_t c_file;&lt;br /&gt;
		intptr_t hFile = _findfirst(schemeDirectory.c_str(), &amp;amp;c_file );&lt;br /&gt;
		if(hFile != -1L)&lt;br /&gt;
		{&lt;br /&gt;
			do&lt;br /&gt;
			{&lt;br /&gt;
				loadScheme(c_file.name);&lt;br /&gt;
			} while( _findnext( hFile, &amp;amp;c_file ) == 0 );&lt;br /&gt;
			_findclose( hFile );&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Parse the loaded schemes and determine their internal names (as widget prefixes)&lt;br /&gt;
		const CEGUI::String separator(&amp;quot;/&amp;quot;);&lt;br /&gt;
		CEGUI::String currentFal;&lt;br /&gt;
		CEGUI::String::size_type pos;&lt;br /&gt;
		CEGUI::String newLook, currentLook;&lt;br /&gt;
		CEGUI::String widget;&lt;br /&gt;
		CEGUI::WindowFactoryManager::FalagardMappingIterator itFalagardMapping = CEGUI::WindowFactoryManager::getSingletonPtr()-&amp;gt;getFalagardMappingIterator();&lt;br /&gt;
		while( !itFalagardMapping.isAtEnd() )&lt;br /&gt;
		{&lt;br /&gt;
			currentFal = itFalagardMapping.getCurrentKey();&lt;br /&gt;
			pos = currentFal.find(separator);&lt;br /&gt;
			newLook = currentFal.substr(0, pos);&lt;br /&gt;
			if(currentLook.compare(newLook) != 0)&lt;br /&gt;
			{&lt;br /&gt;
				currentLook = newLook;&lt;br /&gt;
				addScheme(newLook);&lt;br /&gt;
			}&lt;br /&gt;
			itFalagardMapping++;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Select the &amp;quot;current&amp;quot; scheme&lt;br /&gt;
		CEGUI::ListboxItem* current = mSchemes-&amp;gt;findItemWithText( pCurrentScheme-&amp;gt;getName(), 0 );&lt;br /&gt;
		if(current)&lt;br /&gt;
		{&lt;br /&gt;
			mSchemes-&amp;gt;setText( pCurrentScheme-&amp;gt;getName() );&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	void loadScheme(const CEGUI::String&amp;amp; pScheme, const CEGUI::String&amp;amp; pResourceGroup = &amp;quot;&amp;quot;)&lt;br /&gt;
	{&lt;br /&gt;
		try&lt;br /&gt;
		{&lt;br /&gt;
			if( !CEGUI::SchemeManager::getSingleton().isSchemePresent(pScheme) )&lt;br /&gt;
			{&lt;br /&gt;
				CEGUI::Scheme* scheme = CEGUI::SchemeManager::getSingleton().loadScheme(pScheme, pResourceGroup);&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
		catch(...)&lt;br /&gt;
		{&lt;br /&gt;
			// Silently ignore errors&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	void addScheme(const CEGUI::String&amp;amp; pScheme)&lt;br /&gt;
	{&lt;br /&gt;
		if( !mSchemes-&amp;gt;findItemWithText(pScheme, 0) )&lt;br /&gt;
		{&lt;br /&gt;
			// This scheme has not yet been added&lt;br /&gt;
			CEGUI::ListboxTextItem* schemeItem = new CEGUI::ListboxTextItem(pScheme);&lt;br /&gt;
			schemeItem-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
			mSchemes-&amp;gt;addItem(schemeItem);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool onSchemeChanged(const CEGUI::EventArgs&amp;amp; args)&lt;br /&gt;
	{&lt;br /&gt;
		// Refresh the widget list&lt;br /&gt;
		mWidgets-&amp;gt;resetList();&lt;br /&gt;
		getWidgets( mSchemes-&amp;gt;getText() );&lt;br /&gt;
&lt;br /&gt;
		CEGUI::ListboxTextItem* widgetItem;&lt;br /&gt;
		WidgetList::iterator itWidgetList;&lt;br /&gt;
		for(itWidgetList = mWidgetList.begin(); itWidgetList != mWidgetList.end(); itWidgetList++)&lt;br /&gt;
		{&lt;br /&gt;
			widgetItem = new CEGUI::ListboxTextItem( (*itWidgetList) );&lt;br /&gt;
			widgetItem-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
			mWidgets-&amp;gt;addItem(widgetItem);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Select the first widget&lt;br /&gt;
		if(mWidgets-&amp;gt;getItemCount() &amp;gt; 0)&lt;br /&gt;
		{&lt;br /&gt;
			mWidgets-&amp;gt;setText( mWidgets-&amp;gt;getListboxItemFromIndex(0)-&amp;gt;getText() );&lt;br /&gt;
		}&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			mWidgets-&amp;gt;setText(&amp;quot;&amp;quot;);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	void getWidgets(const CEGUI::String&amp;amp; pScheme)&lt;br /&gt;
	{&lt;br /&gt;
		mWidgetList.clear();&lt;br /&gt;
&lt;br /&gt;
		const CEGUI::String separator(&amp;quot;/&amp;quot;);&lt;br /&gt;
		CEGUI::String currentFal;&lt;br /&gt;
		CEGUI::String::size_type pos;&lt;br /&gt;
		CEGUI::String newLook;&lt;br /&gt;
		CEGUI::String widget;&lt;br /&gt;
		CEGUI::WindowFactoryManager::FalagardMappingIterator itFalagardMapping = CEGUI::WindowFactoryManager::getSingletonPtr()-&amp;gt;getFalagardMappingIterator();&lt;br /&gt;
		while( !itFalagardMapping.isAtEnd() )&lt;br /&gt;
		{&lt;br /&gt;
			currentFal = itFalagardMapping.getCurrentKey();&lt;br /&gt;
			pos = currentFal.find(separator);&lt;br /&gt;
			newLook = currentFal.substr(0, pos);&lt;br /&gt;
			if(pScheme.compare(newLook) == 0)&lt;br /&gt;
			{&lt;br /&gt;
				widget = currentFal.substr(pos + 1);&lt;br /&gt;
				mWidgetList.push_back(widget);&lt;br /&gt;
			}&lt;br /&gt;
			itFalagardMapping++;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		std::sort( mWidgetList.begin(), mWidgetList.end() );&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool onWidgetChanged(const CEGUI::EventArgs&amp;amp; args)&lt;br /&gt;
	{&lt;br /&gt;
		// Refresh the property list&lt;br /&gt;
		mProperties-&amp;gt;resetList();&lt;br /&gt;
		getProperties( mSchemes-&amp;gt;getText(), mWidgets-&amp;gt;getText() );&lt;br /&gt;
&lt;br /&gt;
		CEGUI::ListboxTextItem* propertyItem;&lt;br /&gt;
		PropertyList::iterator itPropertyList;&lt;br /&gt;
		for(itPropertyList = mPropertyList.begin(); itPropertyList != mPropertyList.end(); itPropertyList++)&lt;br /&gt;
		{&lt;br /&gt;
			propertyItem = new CEGUI::ListboxTextItem( (*itPropertyList).first );&lt;br /&gt;
			propertyItem-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
			if( (*itPropertyList).second.find(&amp;quot;Falagard&amp;quot;) != CEGUI::String::npos)&lt;br /&gt;
			{&lt;br /&gt;
				propertyItem-&amp;gt;setTextColours(CEGUI::colour(128.0f, 128.0f, 128.0f));&lt;br /&gt;
			}&lt;br /&gt;
			mProperties-&amp;gt;addItem(propertyItem);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Select the first property&lt;br /&gt;
		if(mProperties-&amp;gt;getItemCount() &amp;gt; 0)&lt;br /&gt;
		{&lt;br /&gt;
			CEGUI::ListboxItem* selectedProperty = mProperties-&amp;gt;getListboxItemFromIndex(0);&lt;br /&gt;
			mProperties-&amp;gt;setItemSelectState(selectedProperty, true);&lt;br /&gt;
			mProperties-&amp;gt;ensureItemIsVisible(selectedProperty);&lt;br /&gt;
		}&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			mInformation-&amp;gt;setText(&amp;quot;&amp;quot;);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	void getProperties(const CEGUI::String&amp;amp; pScheme, const CEGUI::String&amp;amp; pWidget)&lt;br /&gt;
	{&lt;br /&gt;
		const CEGUI::String separator(&amp;quot;/&amp;quot;);&lt;br /&gt;
		mPropertyList.clear();&lt;br /&gt;
&lt;br /&gt;
		try&lt;br /&gt;
		{&lt;br /&gt;
			CEGUI::Window* widget = CEGUI::WindowManager::getSingleton().createWindow(pScheme + separator + pWidget);&lt;br /&gt;
			CEGUI::PropertySet::Iterator itPropertySet = ((CEGUI::PropertySet*) widget)-&amp;gt;getIterator();&lt;br /&gt;
			while (!itPropertySet.isAtEnd() ) &lt;br /&gt;
			{&lt;br /&gt;
				mPropertyList[itPropertySet.getCurrentKey()] = (*itPropertySet)-&amp;gt;getHelp();&lt;br /&gt;
				itPropertySet++;&lt;br /&gt;
			}&lt;br /&gt;
			CEGUI::WindowManager::getSingleton().destroyWindow(widget);&lt;br /&gt;
		}&lt;br /&gt;
		catch(...)&lt;br /&gt;
		{&lt;br /&gt;
			// Silently ignore errors&lt;br /&gt;
			// TaharezLook/TabPane generates one such error&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool onPropertyChanged(const CEGUI::EventArgs&amp;amp; args)&lt;br /&gt;
	{&lt;br /&gt;
		// Display the appropriate help information&lt;br /&gt;
		CEGUI::ListboxItem* selectedItem = mProperties-&amp;gt;getFirstSelectedItem();&lt;br /&gt;
		if(selectedItem)&lt;br /&gt;
		{&lt;br /&gt;
			PropertyList::iterator itPropertyList = mPropertyList.find( selectedItem-&amp;gt;getText() );&lt;br /&gt;
			if( itPropertyList != mPropertyList.end() )&lt;br /&gt;
			{&lt;br /&gt;
				mInformation-&amp;gt;setText( (*itPropertyList).second );&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			mInformation-&amp;gt;setText(&amp;quot;&amp;quot;);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool onExport(const CEGUI::EventArgs&amp;amp; args)&lt;br /&gt;
	{&lt;br /&gt;
		CEGUI::uint exportType = mRadioButton-&amp;gt;getSelectedButtonInGroup()-&amp;gt;getID();&lt;br /&gt;
		switch(exportType)&lt;br /&gt;
		{&lt;br /&gt;
		case Wiki:&lt;br /&gt;
			ExportWiki();&lt;br /&gt;
			break;&lt;br /&gt;
		case Html:&lt;br /&gt;
			ExportHtml();&lt;br /&gt;
			break;&lt;br /&gt;
		case Xml:&lt;br /&gt;
			ExportXml();&lt;br /&gt;
			break;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	void ExportWiki()&lt;br /&gt;
	{&lt;br /&gt;
		std::ofstream out(&amp;quot;PropertyFinder.txt&amp;quot;);&lt;br /&gt;
		const CEGUI::String sectionHeader(&amp;quot;===&amp;quot;);&lt;br /&gt;
		const CEGUI::String widgetHeader(&amp;quot;====&amp;quot;);&lt;br /&gt;
		const CEGUI::String propertyHeader(&amp;quot;====&amp;quot;);&lt;br /&gt;
		const CEGUI::String falagardColor(&amp;quot;bgcolor=\&amp;quot;#FFBF00\&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
		PropertyList completePropertyList;&lt;br /&gt;
&lt;br /&gt;
		CEGUI::String schemeName;&lt;br /&gt;
		WidgetList::iterator itWidgetList;&lt;br /&gt;
		PropertyList::iterator itPropertyList;&lt;br /&gt;
		&lt;br /&gt;
		const int propertiesPerLine = 5;&lt;br /&gt;
		int propertiesOnLine;&lt;br /&gt;
&lt;br /&gt;
		/******************* Option 1 *******************/&lt;br /&gt;
		// Export every detected scheme&lt;br /&gt;
		/*&lt;br /&gt;
		for(size_t schemeItem = 0; schemeItem &amp;lt; mSchemes-&amp;gt;getItemCount(); schemeItem++)&lt;br /&gt;
		{&lt;br /&gt;
			schemeName = mSchemes-&amp;gt;getListboxItemFromIndex(schemeItem)-&amp;gt;getText();&lt;br /&gt;
			getWidgets(schemeName);&lt;br /&gt;
			if(mWidgetList.size() == 0)&lt;br /&gt;
			{&lt;br /&gt;
				continue;&lt;br /&gt;
			}&lt;br /&gt;
		*/&lt;br /&gt;
&lt;br /&gt;
		/******************* Option 2 *******************/&lt;br /&gt;
		// Only export the currently selected scheme&lt;br /&gt;
		{&lt;br /&gt;
			schemeName = mSchemes-&amp;gt;getText();&lt;br /&gt;
			getWidgets(schemeName);&lt;br /&gt;
		/************** End of the options **************/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
			out &amp;lt;&amp;lt; sectionHeader&lt;br /&gt;
				&amp;lt;&amp;lt; &amp;quot; &amp;quot;&lt;br /&gt;
				&amp;lt;&amp;lt; schemeName&lt;br /&gt;
				&amp;lt;&amp;lt; &amp;quot; &amp;quot;&lt;br /&gt;
				&amp;lt;&amp;lt; sectionHeader&lt;br /&gt;
				&amp;lt;&amp;lt; &amp;quot;\n&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
			for(itWidgetList = mWidgetList.begin(); itWidgetList != mWidgetList.end(); itWidgetList++)&lt;br /&gt;
			{&lt;br /&gt;
				getProperties( schemeName, (*itWidgetList) );&lt;br /&gt;
				if(mPropertyList.size() == 0)&lt;br /&gt;
				{&lt;br /&gt;
					continue;&lt;br /&gt;
				}&lt;br /&gt;
&lt;br /&gt;
				out &amp;lt;&amp;lt; widgetHeader&lt;br /&gt;
					&amp;lt;&amp;lt; &amp;quot; &amp;quot;&lt;br /&gt;
					&amp;lt;&amp;lt; (*itWidgetList)&lt;br /&gt;
					&amp;lt;&amp;lt; &amp;quot; &amp;quot;&lt;br /&gt;
					&amp;lt;&amp;lt; widgetHeader&lt;br /&gt;
					&amp;lt;&amp;lt; &amp;quot;\n&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
				propertiesOnLine = 0;&lt;br /&gt;
				out &amp;lt;&amp;lt; &amp;quot;{| class=\&amp;quot;wikitable\&amp;quot;  border=\&amp;quot;1\&amp;quot; \n&amp;quot;;&lt;br /&gt;
				for(itPropertyList = mPropertyList.begin(); itPropertyList != mPropertyList.end(); itPropertyList++)&lt;br /&gt;
				{&lt;br /&gt;
					if( propertiesOnLine == propertiesPerLine )&lt;br /&gt;
					{&lt;br /&gt;
						out &amp;lt;&amp;lt; &amp;quot;|-\n&amp;quot;;&lt;br /&gt;
						propertiesOnLine = 0;&lt;br /&gt;
					}&lt;br /&gt;
					out &amp;lt;&amp;lt; &amp;quot;| &amp;quot;;&lt;br /&gt;
					if( (*itPropertyList).second.find(&amp;quot;Falagard&amp;quot;) != CEGUI::String::npos)&lt;br /&gt;
					{&lt;br /&gt;
						out &amp;lt;&amp;lt; falagardColor&lt;br /&gt;
							&amp;lt;&amp;lt; &amp;quot; | &amp;quot;;&lt;br /&gt;
					}&lt;br /&gt;
					out &amp;lt;&amp;lt; 	&amp;quot;[[#&amp;quot;&lt;br /&gt;
							&amp;lt;&amp;lt; (*itPropertyList).first&lt;br /&gt;
							&amp;lt;&amp;lt; &amp;quot;]]\n&amp;quot;;&lt;br /&gt;
					++propertiesOnLine;&lt;br /&gt;
&lt;br /&gt;
					if( completePropertyList.find( (*itPropertyList).first ) == completePropertyList.end() )&lt;br /&gt;
					{&lt;br /&gt;
						completePropertyList[(*itPropertyList).first] = (*itPropertyList).second;&lt;br /&gt;
					}&lt;br /&gt;
				}&lt;br /&gt;
				out &amp;lt;&amp;lt; &amp;quot;|}\n\n&amp;quot;;&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		out &amp;lt;&amp;lt; sectionHeader&lt;br /&gt;
			&amp;lt;&amp;lt; &amp;quot; Properties &amp;quot;&lt;br /&gt;
			&amp;lt;&amp;lt; sectionHeader&lt;br /&gt;
			&amp;lt;&amp;lt; &amp;quot;\n&amp;quot;;&lt;br /&gt;
		const CEGUI::String falagardKeyword(&amp;quot;Falagard&amp;quot;);&lt;br /&gt;
		CEGUI::String::size_type falagardPos;&lt;br /&gt;
		CEGUI::String propertyDescription;&lt;br /&gt;
		PropertyList::iterator itCompletePropertyList;&lt;br /&gt;
		for(itCompletePropertyList = completePropertyList.begin();&lt;br /&gt;
			itCompletePropertyList != completePropertyList.end();&lt;br /&gt;
			itCompletePropertyList++)&lt;br /&gt;
		{&lt;br /&gt;
			out &amp;lt;&amp;lt; propertyHeader&lt;br /&gt;
				&amp;lt;&amp;lt; &amp;quot; &amp;quot;&lt;br /&gt;
				&amp;lt;&amp;lt; (*itCompletePropertyList).first&lt;br /&gt;
				&amp;lt;&amp;lt; &amp;quot; &amp;quot;&lt;br /&gt;
				&amp;lt;&amp;lt; propertyHeader&lt;br /&gt;
				&amp;lt;&amp;lt; &amp;quot;\n&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
			propertyDescription = (*itCompletePropertyList).second;&lt;br /&gt;
			falagardPos = (*itCompletePropertyList).second.find(falagardKeyword);&lt;br /&gt;
			if( falagardPos != CEGUI::String::npos)&lt;br /&gt;
			{&lt;br /&gt;
				propertyDescription = propertyDescription.replace(falagardPos,&lt;br /&gt;
																	falagardKeyword.length(),&lt;br /&gt;
																	&amp;quot;&amp;lt;font COLOR=\&amp;quot;#FFBF00\&amp;quot;&amp;gt;Falagard&amp;lt;/font&amp;gt;&amp;quot;);&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			out &amp;lt;&amp;lt; propertyDescription&lt;br /&gt;
				&amp;lt;&amp;lt; &amp;quot;\n\n&amp;quot;;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		out.close();&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	void ExportHtml()&lt;br /&gt;
	{&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	void ExportXml()&lt;br /&gt;
	{&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
&lt;br /&gt;
	// Widget containing the list of schemes&lt;br /&gt;
	CEGUI::Combobox* mSchemes;&lt;br /&gt;
&lt;br /&gt;
	// Widget containing the list of widgets in a scheme&lt;br /&gt;
	CEGUI::Combobox* mWidgets;&lt;br /&gt;
&lt;br /&gt;
	// Widget containing the list of properties&lt;br /&gt;
	CEGUI::Listbox* mProperties;&lt;br /&gt;
&lt;br /&gt;
	// Type of list of widgets for a scheme&lt;br /&gt;
	typedef std::vector&amp;lt;CEGUI::String&amp;gt; WidgetList;&lt;br /&gt;
&lt;br /&gt;
	// List of widgets for a scheme&lt;br /&gt;
	WidgetList mWidgetList;&lt;br /&gt;
&lt;br /&gt;
	// Type of list of properties for a widget &amp;lt;property, help&amp;gt;&lt;br /&gt;
	typedef std::map&amp;lt;CEGUI::String, CEGUI::String&amp;gt;  PropertyList;&lt;br /&gt;
&lt;br /&gt;
	// List of properties for a widget&lt;br /&gt;
	PropertyList mPropertyList;&lt;br /&gt;
&lt;br /&gt;
	// Widget displaying additional information on a property&lt;br /&gt;
	CEGUI::MultiLineEditbox* mInformation;&lt;br /&gt;
&lt;br /&gt;
	// Radiobutton part of a group&lt;br /&gt;
	CEGUI::RadioButton* mRadioButton;&lt;br /&gt;
&lt;br /&gt;
	// Defines the types of export&lt;br /&gt;
	enum ExportType :CEGUI::uint {Wiki, Html, Xml};&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#endif // _PropertyFinder_h_&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Main.cpp ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&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;PropertyFinder.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;
    int i = app.run();&lt;br /&gt;
    return i;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== PropertyFinder.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;TaharezLook/FrameWindow&amp;quot; Name=&amp;quot;PropertyFinder&amp;quot; &amp;gt;&lt;br /&gt;
        &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Property Finder&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;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;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.0643816,0},{0.0124997,0},{0.903446,0},{0.891667,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;Window Type=&amp;quot;TaharezLook/StaticText&amp;quot; Name=&amp;quot;PropertyFinder/SchemeLabel&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Scheme:&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.019553,0},{0.0836117,0},{0.114991,0},{0.146434,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;PropertyFinder/SchemeList&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;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.116201,0},{0.0836117,0},{0.440692,0},{0.84974,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;PropertyFinder/WidgetLabel&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;Widget:&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.473929,0},{0.0836117,0},{0.569368,0},{0.146434,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;PropertyFinder/WidgetList&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;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.570578,0},{0.0836117,0},{0.969551,0},{0.823935,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/Listbox&amp;quot; Name=&amp;quot;PropertyFinder/Properties&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.019553,0},{0.164195,0},{0.440692,0},{0.89201,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;/Window&amp;gt;&lt;br /&gt;
        &amp;lt;Window Type=&amp;quot;TaharezLook/MultiLineEditbox&amp;quot; Name=&amp;quot;PropertyFinder/Information&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; &amp;gt;&lt;br /&gt;
&amp;lt;/Property&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.473929,0},{0.164195,0},{0.969551,0},{0.89201,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;PropertyFinder/Export&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Export&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.019553,0},{0.904265,0},{0.161971,0},{0.983649,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;PropertyFinder/ExportWiki&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Wiki&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Selected&amp;quot; Value=&amp;quot;True&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.186517,0},{0.904265,0},{0.251611,0},{0.981279,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;PropertyFinder/ExportHtml&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;HTML&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.271818,0},{0.904265,0},{0.336911,0},{0.98128,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;PropertyFinder/ExportXml&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;XML&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.357547,0},{0.904265,0},{0.42264,0},{0.98128,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;/GUILayout&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rackle</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=Tab_Order&amp;diff=2829</id>
		<title>Tab Order</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=Tab_Order&amp;diff=2829"/>
				<updated>2008-02-01T13:09:48Z</updated>
		
		<summary type="html">&lt;p&gt;Rackle: /* TabNavigation_demo.h */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Introduction ===&lt;br /&gt;
This code provides Tab and Shift+Tab navigation through a list of widgets.&lt;br /&gt;
&lt;br /&gt;
Create an instance of TabNavigation for each group of tab order, such as one per dialog.  Specify the parent via a call to setParent().  This will help catch '''Tab''' and '''Shift+Tab''' keys, which will then properly cycle through the widgets specified via addWidget().  Note that addWidget() accepts window names as well as the handle of TabControl; this will automatically add the TabButton of that TabControl.&lt;br /&gt;
&lt;br /&gt;
Please discuss this snippet within the [http://www.cegui.org.uk/phpBB2/viewtopic.php?p=8676#8676 Tab Order] thread.&lt;br /&gt;
&lt;br /&gt;
=== Files ===&lt;br /&gt;
==== TabNavigation.h ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
#ifndef _TabNavigation_h_&lt;br /&gt;
#define _TabNavigation_h_&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;vector&amp;gt;&lt;br /&gt;
#include &amp;quot;CEGUI.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
class TabNavigation&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
	/* Specifies the parent or container.&lt;br /&gt;
		Used to trap Tab and Shift+Tab keys and relay them to the list of tab navigation. */&lt;br /&gt;
	void setParent(const CEGUI::String&amp;amp; window);&lt;br /&gt;
&lt;br /&gt;
	/* Adds a TabControl widget.&lt;br /&gt;
		Its tab buttons will be added to the list of tab navigation. */&lt;br /&gt;
	void addWidget(const CEGUI::TabControl* tabControl);&lt;br /&gt;
&lt;br /&gt;
	/* Adds a widget to the list of tab navigation.&lt;br /&gt;
		The order in which they are added corresponds to the tab order. */&lt;br /&gt;
	void addWidget(const CEGUI::String&amp;amp; window);&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
	/* Ensures that the last known focused widget regains input. */&lt;br /&gt;
	bool _onParentActivated(const CEGUI::EventArgs&amp;amp; e);&lt;br /&gt;
&lt;br /&gt;
	/* Handles non-tab key activation.&lt;br /&gt;
		This will ensure that the next tab key navigation will start from&lt;br /&gt;
		the relevant widget. */&lt;br /&gt;
	bool _onActivated(const CEGUI::EventArgs&amp;amp; e);&lt;br /&gt;
&lt;br /&gt;
	/* Traps the Tab and Shift+Tab key and activates the next or previous &lt;br /&gt;
		widget accordingly. */&lt;br /&gt;
	bool _onCharacterKey(const CEGUI::EventArgs&amp;amp; e);&lt;br /&gt;
&lt;br /&gt;
	/* Maintains the list of widgets that participate in the tab order */&lt;br /&gt;
	std::vector&amp;lt;CEGUI::String&amp;gt; _tabNavigation;&lt;br /&gt;
&lt;br /&gt;
	/* Maintains the last known widget to have the focus. */&lt;br /&gt;
	std::vector&amp;lt;CEGUI::String&amp;gt;::iterator _lastKnownFocus;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#endif // _TabNavigation_h_&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== TabNavigation.cpp ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
#include &amp;quot;TabNavigation.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/* These provide a visual focus cue when the scheme does not provide one&lt;br /&gt;
 *	 for every widget, such as TaharezLook's PushButton */&lt;br /&gt;
#define HACKED_FOCUS_GAIN(window) CEGUI::WindowManager::getSingleton().getWindow(window)-&amp;gt;setAlpha(1.0f)&lt;br /&gt;
#define HACKED_FOCUS_LOSS(window) CEGUI::WindowManager::getSingleton().getWindow(window)-&amp;gt;setAlpha(0.8f)&lt;br /&gt;
&lt;br /&gt;
/* You can deactivate these hacked focus functions by defining the macro as a comment:&lt;br /&gt;
#define HACKED_FOCUS_GAIN(window) //&lt;br /&gt;
#define HACKED_FOCUS_LOSS(window) //&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
void TabNavigation::setParent(const CEGUI::String&amp;amp; window)&lt;br /&gt;
{&lt;br /&gt;
	// Parent will feed the tab and shift+tab navigation to the list of monitored widgets&lt;br /&gt;
	CEGUI::WindowManager&amp;amp; wmgr = CEGUI::WindowManager::getSingleton();&lt;br /&gt;
	wmgr.getWindow(window)-&amp;gt;subscribeEvent(CEGUI::Window::EventCharacterKey,	CEGUI::Event::Subscriber(&amp;amp;TabNavigation::_onCharacterKey,		this));&lt;br /&gt;
	wmgr.getWindow(window)-&amp;gt;subscribeEvent(CEGUI::Window::EventActivated,		CEGUI::Event::Subscriber(&amp;amp;TabNavigation::_onParentActivated,	this));&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void TabNavigation::addWidget(const CEGUI::String&amp;amp; window)&lt;br /&gt;
{&lt;br /&gt;
	// Add a widget to the list of widget navigation&lt;br /&gt;
	CEGUI::WindowManager&amp;amp; wmgr = CEGUI::WindowManager::getSingleton();&lt;br /&gt;
&lt;br /&gt;
	wmgr.getWindow(window)-&amp;gt;subscribeEvent(CEGUI::Window::EventCharacterKey,	CEGUI::Event::Subscriber(&amp;amp;TabNavigation::_onCharacterKey, this));&lt;br /&gt;
	wmgr.getWindow(window)-&amp;gt;subscribeEvent(CEGUI::Window::EventActivated,		CEGUI::Event::Subscriber(&amp;amp;TabNavigation::_onActivated,	this));&lt;br /&gt;
	HACKED_FOCUS_LOSS(window);&lt;br /&gt;
	if(!_tabNavigation.size())&lt;br /&gt;
	{&lt;br /&gt;
		wmgr.getWindow(window)-&amp;gt;activate(); // Activate the first widget by default&lt;br /&gt;
		HACKED_FOCUS_GAIN(window);&lt;br /&gt;
	}&lt;br /&gt;
	_tabNavigation.push_back(window);&lt;br /&gt;
	_lastKnownFocus = _tabNavigation.begin(); // Reset the iterator after each modification to the vector&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void TabNavigation::addWidget(const CEGUI::TabControl* tabControl)&lt;br /&gt;
{&lt;br /&gt;
	// Add every tab buttons of a tab control&lt;br /&gt;
	CEGUI::WindowManager&amp;amp; wmgr = CEGUI::WindowManager::getSingleton();&lt;br /&gt;
	CEGUI::Window* tabPaneButtons = wmgr.getWindow(tabControl-&amp;gt;getName() + &amp;quot;__auto_TabPane__Buttons&amp;quot;);&lt;br /&gt;
	for(size_t idx = 0; idx &amp;lt; tabPaneButtons-&amp;gt;getChildCount(); idx++)&lt;br /&gt;
	{&lt;br /&gt;
		addWidget(tabPaneButtons-&amp;gt;getChildAtIdx(idx)-&amp;gt;getName());&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool TabNavigation::_onParentActivated(const CEGUI::EventArgs&amp;amp; e)&lt;br /&gt;
{&lt;br /&gt;
	// Parent is being activated, activate the widget with the last known focus&lt;br /&gt;
	if(_tabNavigation.size() &amp;amp;&amp;amp; _lastKnownFocus != _tabNavigation.end())&lt;br /&gt;
	{&lt;br /&gt;
		CEGUI::WindowManager&amp;amp; wmgr = CEGUI::WindowManager::getSingleton();&lt;br /&gt;
		CEGUI::Window* window = wmgr.getWindow(*_lastKnownFocus);&lt;br /&gt;
		if(window)&lt;br /&gt;
			window-&amp;gt;activate();&lt;br /&gt;
	}&lt;br /&gt;
	return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool TabNavigation::_onActivated(const CEGUI::EventArgs&amp;amp; e)&lt;br /&gt;
{&lt;br /&gt;
	// A focus widget has been activated without tabbing (could be a mouse click)&lt;br /&gt;
	CEGUI::String currentlyFocused = static_cast&amp;lt;const CEGUI::WindowEventArgs&amp;amp;&amp;gt;(e).window-&amp;gt;getName();&lt;br /&gt;
	if(_tabNavigation.size() &lt;br /&gt;
		&amp;amp;&amp;amp; (_lastKnownFocus == _tabNavigation.end()&lt;br /&gt;
		|| (*_lastKnownFocus).compare(currentlyFocused))	)&lt;br /&gt;
	{&lt;br /&gt;
		if(_lastKnownFocus != _tabNavigation.end())&lt;br /&gt;
		{&lt;br /&gt;
			// These curly braces are IMPORTANT!!!&lt;br /&gt;
			HACKED_FOCUS_LOSS(*_lastKnownFocus);&lt;br /&gt;
		}&lt;br /&gt;
		for(_lastKnownFocus = _tabNavigation.begin(); _lastKnownFocus != _tabNavigation.end(); _lastKnownFocus++)&lt;br /&gt;
		{&lt;br /&gt;
			if(!(*_lastKnownFocus).compare(currentlyFocused))&lt;br /&gt;
			{&lt;br /&gt;
				HACKED_FOCUS_GAIN(currentlyFocused);&lt;br /&gt;
				return true;&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
		// Can't figure out who has the focus&lt;br /&gt;
		_lastKnownFocus = _tabNavigation.begin();&lt;br /&gt;
		HACKED_FOCUS_GAIN(*_lastKnownFocus);&lt;br /&gt;
	}&lt;br /&gt;
	return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool TabNavigation::_onCharacterKey(const CEGUI::EventArgs&amp;amp; e)&lt;br /&gt;
{&lt;br /&gt;
	// Handle Tab (next) and Shift+Tab (previous) widget navigation&lt;br /&gt;
	assert(_tabNavigation.size() &amp;amp;&amp;amp; &amp;quot;Don't simply call setParent(), also call addWidget()&amp;quot;);&lt;br /&gt;
	if(static_cast&amp;lt;const CEGUI::KeyEventArgs&amp;amp;&amp;gt;(e).codepoint == 9) // Tab or Shift+Tab&lt;br /&gt;
	{&lt;br /&gt;
		// Identify who currently has the focus&lt;br /&gt;
		CEGUI::WindowManager&amp;amp; wmgr = CEGUI::WindowManager::getSingleton();&lt;br /&gt;
		std::vector&amp;lt;CEGUI::String&amp;gt;::iterator itFocus, itCurrent;&lt;br /&gt;
		if(_lastKnownFocus != _tabNavigation.end() &amp;amp;&amp;amp; wmgr.getWindow(*_lastKnownFocus)-&amp;gt;isActive())&lt;br /&gt;
		{&lt;br /&gt;
			// The last known focus is still in focus&lt;br /&gt;
			itCurrent = _lastKnownFocus;&lt;br /&gt;
		}&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			// Figure out who (if anyone) has the focus&lt;br /&gt;
			for(itCurrent = _tabNavigation.begin(); itCurrent != _tabNavigation.end(); itCurrent++)&lt;br /&gt;
			{&lt;br /&gt;
				if(wmgr.getWindow(*itCurrent)-&amp;gt;isActive())&lt;br /&gt;
				{&lt;br /&gt;
					// Found who has the focus&lt;br /&gt;
					break;&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
			if(itCurrent == _tabNavigation.end())&lt;br /&gt;
			{&lt;br /&gt;
				// We did not find who had the focus&lt;br /&gt;
				// Someone not in our list of monitored widgets has STOLEN the focus!&lt;br /&gt;
				// Use the last known focus or, if that's invalid, the first widget&lt;br /&gt;
				itCurrent = _lastKnownFocus != _tabNavigation.end() ? _lastKnownFocus : _tabNavigation.begin();&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Change the focus&lt;br /&gt;
		itFocus = itCurrent; // The search starts from the currently focused&lt;br /&gt;
		CEGUI::Window* newWidget = 0;&lt;br /&gt;
		do&lt;br /&gt;
		{&lt;br /&gt;
			if(static_cast&amp;lt;const CEGUI::KeyEventArgs&amp;amp;&amp;gt;(e).sysKeys &amp;amp; CEGUI::Shift)&lt;br /&gt;
			{&lt;br /&gt;
				// Search previous&lt;br /&gt;
				if(itFocus == _tabNavigation.begin())&lt;br /&gt;
					itFocus = --_tabNavigation.end();&lt;br /&gt;
				else&lt;br /&gt;
					itFocus--;&lt;br /&gt;
			}&lt;br /&gt;
			else&lt;br /&gt;
			{&lt;br /&gt;
				// Search next&lt;br /&gt;
				itFocus++;&lt;br /&gt;
				if(itFocus == _tabNavigation.end())&lt;br /&gt;
					itFocus = _tabNavigation.begin();&lt;br /&gt;
			}&lt;br /&gt;
			newWidget = wmgr.getWindow(*itFocus);&lt;br /&gt;
			if(newWidget-&amp;gt;isVisible() &amp;amp;&amp;amp; !newWidget-&amp;gt;isDisabled())&lt;br /&gt;
			{&lt;br /&gt;
				// We have found a valid focus target&lt;br /&gt;
				_lastKnownFocus = itFocus;&lt;br /&gt;
				break;&lt;br /&gt;
			}&lt;br /&gt;
			newWidget = 0;&lt;br /&gt;
		} while(itFocus != itCurrent); // Iterate while we're on a different widget&lt;br /&gt;
&lt;br /&gt;
		if(newWidget)&lt;br /&gt;
		{&lt;br /&gt;
			// Remove the focus from this widget&lt;br /&gt;
			HACKED_FOCUS_LOSS(*itCurrent);&lt;br /&gt;
&lt;br /&gt;
			// Give the focus to this widget&lt;br /&gt;
			newWidget-&amp;gt;activate();&lt;br /&gt;
			HACKED_FOCUS_GAIN(newWidget-&amp;gt;getName());&lt;br /&gt;
			return true;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
	return false;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== TabNavigation_demo.h ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
#ifndef _WidgetFocus_Demo_h_&lt;br /&gt;
#define _WidgetFocus_Demo_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;
#include &amp;quot;TabNavigation.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;TabNavigation.layout&amp;quot;);&lt;br /&gt;
			sheet-&amp;gt;addChildWindow(guiLayout);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
			/* TabNavigation-specific code */&lt;br /&gt;
			navMainWindow.setParent(&amp;quot;TabOrder/MainWindow&amp;quot;);&lt;br /&gt;
			navMainWindow.addWidget(&amp;quot;TabOrder/MainWindow/Field_1&amp;quot;);&lt;br /&gt;
			navMainWindow.addWidget(&amp;quot;TabOrder/MainWindow/Field_2&amp;quot;);&lt;br /&gt;
			navMainWindow.addWidget(&amp;quot;TabOrder/MainWindow/Field_3&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			navSecondaryWindow.setParent(&amp;quot;TabOrder/SecondaryWindow&amp;quot;);&lt;br /&gt;
			navSecondaryWindow.addWidget(&amp;quot;TabOrder/SecondaryWindow/Field_1&amp;quot;);&lt;br /&gt;
			navSecondaryWindow.addWidget(&amp;quot;TabOrder/SecondaryWindow/Field_2&amp;quot;);&lt;br /&gt;
			navSecondaryWindow.addWidget(&amp;quot;TabOrder/SecondaryWindow/Field_3&amp;quot;);&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;
	}&lt;br /&gt;
private:&lt;br /&gt;
	TabNavigation navMainWindow;&lt;br /&gt;
	TabNavigation navSecondaryWindow;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#endif // _WidgetFocus_Demo_h_&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== TabNavigation.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;TabOrder&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;TabOrder/MainWindow&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Main Window&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;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.0296875,0},{0.0583334,0},{0.43125,0},{0.468749,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/Editbox&amp;quot; Name=&amp;quot;TabOrder/MainWindow/Field_1&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Field 1&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.0719849,0},{0.19543,0},{0.905642,0},{0.354059,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;TabOrder/MainWindow/Field_2&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Field 2&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.071985,0},{0.413199,0},{0.905642,0},{0.663199,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/Spinner&amp;quot; Name=&amp;quot;TabOrder/MainWindow/Field_3&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;0&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.071985,0},{0.711169,0},{0.905642,0},{0.961169,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 Type=&amp;quot;TaharezLook/FrameWindow&amp;quot; Name=&amp;quot;TabOrder/SecondaryWindow&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;Secondary Window&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;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.454688,0},{0.0583334,0},{0.856251,0},{0.468749,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/Editbox&amp;quot; Name=&amp;quot;TabOrder/SecondaryWindow/Field_1&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;Field 1&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.071985,0},{0.19543,0},{0.905642,0},{0.354059,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;TabOrder/SecondaryWindow/Field_2&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;Field 2&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.071985,0},{0.413199,0},{0.905642,0},{0.663199,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/Spinner&amp;quot; Name=&amp;quot;TabOrder/SecondaryWindow/Field_3&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;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;0&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.071985,0},{0.711169,0},{0.905642,0},{0.961169,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>Rackle</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=Formatted_Numeric_Data&amp;diff=2828</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=2828"/>
				<updated>2008-02-01T13:09:33Z</updated>
		
		<summary type="html">&lt;p&gt;Rackle: /* FormattedData.h */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;International Components for Unicode (ICU) is IBM's toolkit to internationalise applications.  Initially developped for Java it has been ported to C/C++.  Now it 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;
==IBM's ICU==&lt;br /&gt;
===Useful Links===&lt;br /&gt;
*[http://www-306.ibm.com/software/globalization/icu/index.jsp Home page]&lt;br /&gt;
*[http://icu.sourceforge.net/ Source Forge]&lt;br /&gt;
*[http://www-306.ibm.com/software/globalization/icu/license.jsp Licence]&lt;br /&gt;
*[http://icu.sourceforge.net/userguide/ Documentation]&lt;br /&gt;
*[http://icu.sourceforge.net/apiref/icu4c/index.html Doxygen API]&lt;br /&gt;
*[http://www.loc.gov/standards/iso639-2/ ISO Language Codes]&lt;br /&gt;
*[http://www.iso.ch/iso/en/prods-services/iso3166ma/index.html ISO Country Codes]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/ISO_4217 ISO Currency Codes]&lt;br /&gt;
*[http://icu.sourceforge.net/apiref/icu4c/classDecimalFormat.html#_details ICU Decimal Format Syntax]&lt;br /&gt;
*[http://icu.sourceforge.net/userguide/formatDateTime.html ICU Date/Time Format Syntax]&lt;br /&gt;
&lt;br /&gt;
===Getting started===&lt;br /&gt;
Download these [http://www-306.ibm.com/software/globalization/icu/downloads.jsp files from IBM]&lt;br /&gt;
*Source: icu-3.4.1.zip OR icu-3.4.1.tgz&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;
Compile these solutions:&lt;br /&gt;
*icu/source/allinone/allinone.sln&lt;br /&gt;
*icu/source/samples/all/all.sln&lt;br /&gt;
&lt;br /&gt;
Fix the following errors:&lt;br /&gt;
*For projects strsrch and coll&lt;br /&gt;
**Move:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        if (pOpt-&amp;gt;name == 0)&lt;br /&gt;
        {&lt;br /&gt;
            fprintf(stderr, &amp;quot;Unrecognized option \&amp;quot;%s\&amp;quot;\n&amp;quot;, pArgName);&lt;br /&gt;
            return FALSE;&lt;br /&gt;
        }&amp;lt;/pre&amp;gt;&lt;br /&gt;
**Upward just after the line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        for (OptSpec *pOpt = opts;  pOpt-&amp;gt;name != 0; pOpt ++) {&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For project legacy&lt;br /&gt;
**remove dependencies to:&lt;br /&gt;
*** ../../../../icu-1-8-1/lib/icuucd.lib&lt;br /&gt;
*** ../../../../icu-1-8-1/lib/icuind.lib&lt;br /&gt;
&lt;br /&gt;
*For project GDIFontInstance&lt;br /&gt;
**cast 6th parameter:  (LPCWSTR) &amp;amp;ttGlyphs[dyStart]&lt;br /&gt;
&lt;br /&gt;
Please note that samples will NOT run in their compilation directories.  In order to run any of the samples you must place the executable within the icu/bin directory, where the required DLLs are situated.&lt;br /&gt;
&lt;br /&gt;
===Incorporating ICU 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:&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;
IBM's ICU provides many features to support internationalisation.  The class I've created encapsultes some (not all) of these features.&lt;br /&gt;
&lt;br /&gt;
===Locale===&lt;br /&gt;
A Locale 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.  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://icu.sourceforge.net/userguide/dateCalendar.html IBM'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;  However I have found that attempting to specify a date AND time within the UDate data type results in imprecisions of up to 1 minute 47 seconds.  My solution is to use two UDate data variables, one to hold a date and another to hold a time.&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 it's 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;
/* Useful links&lt;br /&gt;
	ISO Language Codes: http://www.loc.gov/standards/iso639-2/&lt;br /&gt;
	ISO Country Codes:  http://www.iso.ch/iso/en/prods-services/iso3166ma/index.html&lt;br /&gt;
	ISO Currency Codes: http://en.wikipedia.org/wiki/ISO_4217&lt;br /&gt;
	ICU Decimal Format Syntax: http://icu.sourceforge.net/apiref/icu4c/classDecimalFormat.html#_details&lt;br /&gt;
	ICU Date/Time Format Syntax: http://icu.sourceforge.net/userguide/formatDateTime.html&lt;br /&gt;
*/&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://icu.sourceforge.net/userguide/design.html&lt;br /&gt;
	// The paragraph &amp;quot;ICU Initialization and Termination&amp;quot; mentions that this function&lt;br /&gt;
	//   should 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;
	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>Rackle</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=Dialog_Configurations&amp;diff=2827</id>
		<title>Dialog Configurations</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=Dialog_Configurations&amp;diff=2827"/>
				<updated>2008-02-01T13:09:13Z</updated>
		
		<summary type="html">&lt;p&gt;Rackle: /* DialogConfigurationsDemo.h */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Introduction ===&lt;br /&gt;
Dialogs (frame windows) can be moved around, resized, hidden, and rolled up while the application is running.  MultiColumnLists can have their columns rearranged, resized, and a column can sort its content in ascending or descending order.  However closing and then restarting the application will reset these settings to their default values, those specified within a .layout file if one was use, or those specified in code.&lt;br /&gt;
&lt;br /&gt;
This clases saves these attributes into an XML file.  When the application restarts the contents of the XML file will be read and the dialogs and MultiColumnLists will be restored to their last states.&lt;br /&gt;
&lt;br /&gt;
Please discuss this snippet in the [http://www.cegui.org.uk/phpBB2/viewtopic.php?p=8002#8002 Storing Dialog Configurations] thread on the message board.&lt;br /&gt;
&lt;br /&gt;
=== Incorporating into Sample_Demo7 ===&lt;br /&gt;
This demo contains 3 dialogs.  Let's store their configurations.&lt;br /&gt;
&lt;br /&gt;
Add DialogConfigurations.cpp to the Sample_Demo7 project.&lt;br /&gt;
&lt;br /&gt;
Edit Sample_Demo7.h:&lt;br /&gt;
* add '''#include &amp;quot;DialogConfigurations.h&amp;quot;'''&lt;br /&gt;
* add within the protected section: '''DialogConfigurations m_dialogConfigurations;'''&lt;br /&gt;
&lt;br /&gt;
Edit Sample_Demo7.cpp to add the following at the end of the Demo7Sample::initialiseSample() function, between ''initDemoEventWiring();'' and ''return true;'':&lt;br /&gt;
  m_dialogConfigurations.loadConfigurations(&amp;quot;../datafiles/configs/Sample_Demo7.xml&amp;quot;, &amp;quot;../datafiles/configs/DialogConfigurations.xsd&amp;quot;);&lt;br /&gt;
  m_dialogConfigurations.addDialog(&amp;quot;Demo7/Window1&amp;quot;);&lt;br /&gt;
  m_dialogConfigurations.addDialog(&amp;quot;Demo7/Window2&amp;quot;);&lt;br /&gt;
  m_dialogConfigurations.addDialog(&amp;quot;Demo7/Window3&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
Add the following to Demo7Sample::cleanupSample()&lt;br /&gt;
  m_dialogConfigurations.saveConfigurations();&lt;br /&gt;
&lt;br /&gt;
That's it!  From now on the 3 windows within that demo will &amp;quot;remember&amp;quot; their previous configurations.&lt;br /&gt;
&lt;br /&gt;
'''Warning:''' the Demo7Sample::cleanupSample() is never called when exiting the demo, despite what the comments might say.  A solution is presented on the  [http://www.cegui.org.uk/phpBB2/viewtopic.php?t=1550 message board].&lt;br /&gt;
&lt;br /&gt;
=== Configuration Attributes ===&lt;br /&gt;
The XML configuration file is loaded by a call to loadConfigurations().  It silently ignores errors within that XML file.  The worst that will happen is that some dialogs and MultiColumnLists will revert to their initial values.&lt;br /&gt;
&lt;br /&gt;
Calling addDialog() and passing the window name as parameter will register that dialog to have its configuration written to the XML file.  The next call to saveConfigurations() will write the configuration of that registered window such that the next time loadConfigurations() is called the window will be automatically registered.&lt;br /&gt;
&lt;br /&gt;
The second parameter of addDialog() allows you to specify which attributes to monitor.  By default every attribute is monitored.  However you can specify to monitor one or many of the following, separated by spaces:  Position, Visible, and RolledUp.&lt;br /&gt;
&lt;br /&gt;
The addMultiColumnList() function behaves in a similar manner, allowing you to specify which MultiColumnLists and which of their attributes to monitor.  Again the default is to monitor every attribute but you can also specify one or many of the following:  ColumnSequence, ColumnWidths, SortedColumn, and AscendingSort.&lt;br /&gt;
&lt;br /&gt;
=== Files ===&lt;br /&gt;
&lt;br /&gt;
==== DialogConfigurations.h ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
#ifndef _DialogConfigurations_h_&lt;br /&gt;
#define _DialogConfigurations_h_&lt;br /&gt;
&lt;br /&gt;
#include &amp;quot;CEGUI.h&amp;quot;&lt;br /&gt;
#include &amp;quot;CEGUIXMLHandler.h&amp;quot;&lt;br /&gt;
#include &amp;quot;CEGUIXMLParser.h&amp;quot;&lt;br /&gt;
#include &amp;quot;CEGUIXMLAttributes.h&amp;quot;&lt;br /&gt;
#include &amp;lt;map&amp;gt;&lt;br /&gt;
&lt;br /&gt;
class DialogConfigurations : public CEGUI::XMLHandler&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
	// Constructor.&lt;br /&gt;
	// Sets various default values.&lt;br /&gt;
	DialogConfigurations();&lt;br /&gt;
&lt;br /&gt;
	// Load the configuration of every stored dialog and multi column list.&lt;br /&gt;
	// By default, also apply these configurations.&lt;br /&gt;
	bool loadConfigurations(const CEGUI::String&amp;amp; xmlFile, const CEGUI::String&amp;amp; schema = &amp;quot;&amp;quot;, const bool&amp;amp; applyConfigurations = true);&lt;br /&gt;
&lt;br /&gt;
	// Store the configuration of every dialog and multi column list.&lt;br /&gt;
	bool saveConfigurations();&lt;br /&gt;
&lt;br /&gt;
	// Set default configurations for dialogs.&lt;br /&gt;
	void setDialogDefaults(const CEGUI::URect&amp;amp; position, const bool&amp;amp; visible, const bool&amp;amp; rolledup);&lt;br /&gt;
&lt;br /&gt;
	// Specify which dialog attributes are monitored by default.&lt;br /&gt;
	void setDefaultDialogAttributesMonitored(const CEGUI::String&amp;amp; attributesMonitored);&lt;br /&gt;
&lt;br /&gt;
	// Add a dialog to be monitored.&lt;br /&gt;
	// Optionally specify which attributes this specific dialog monitors.&lt;br /&gt;
	bool addDialog(const CEGUI::String&amp;amp; widget, const CEGUI::String&amp;amp; attributesMonitored = &amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	// Return the position of the specified dialog.&lt;br /&gt;
	const CEGUI::URect&amp;amp; getDialogSavedPosition(const CEGUI::String&amp;amp; dialog);&lt;br /&gt;
&lt;br /&gt;
	// Return the visible/hidden state of the specified dialog.&lt;br /&gt;
	const bool&amp;amp; getDialogSavedVisible(const CEGUI::String&amp;amp; dialog);&lt;br /&gt;
&lt;br /&gt;
	// Return the expansion state of the specified dialog.&lt;br /&gt;
	const bool&amp;amp; getDialogSavedRolledup(const CEGUI::String&amp;amp; dialog);&lt;br /&gt;
&lt;br /&gt;
	// Apply the saved configuration to the specified dialog.&lt;br /&gt;
	bool applyDialogConfiguration(const CEGUI::String&amp;amp; dialog = &amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	// Set default configurations for multi column lists.&lt;br /&gt;
	void setMultiColumnListDefaults(const std::vector&amp;lt;CEGUI::String&amp;gt;&amp;amp; columnSequence, const CEGUI::uint&amp;amp; sortedColumn, const bool&amp;amp; sortAscending, const std::vector&amp;lt;CEGUI::String&amp;gt;&amp;amp; columnWidths);&lt;br /&gt;
&lt;br /&gt;
	// Specify which dialog attributes are monitored by default.&lt;br /&gt;
	void setDefaultMultiColumnListAttributesMonitored(const CEGUI::String&amp;amp; attributesMonitored);&lt;br /&gt;
&lt;br /&gt;
	// Add a MultiColumnList to be monitored.&lt;br /&gt;
	bool addMultiColumnList(const CEGUI::String&amp;amp; widget, const CEGUI::String&amp;amp; attributesMonitored = &amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	// Apply the saved configuration to the specified multi column list.&lt;br /&gt;
	bool applyMultiColumnListConfiguration(const CEGUI::String&amp;amp; multiColumnList = &amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
	// Whether a particular attribute is monitored.&lt;br /&gt;
	bool isMonitoringAttribute(const std::vector&amp;lt;CEGUI::String&amp;gt;&amp;amp; list, const CEGUI::String&amp;amp; attribute);&lt;br /&gt;
&lt;br /&gt;
	// Performs the actual load every stored configuration.&lt;br /&gt;
    void elementStart(const CEGUI::String&amp;amp; element, const CEGUI::XMLAttributes&amp;amp; xmlAttributes);&lt;br /&gt;
&lt;br /&gt;
	// Tag name for dialog positions element.&lt;br /&gt;
	static const CEGUI::String m_DialogConfigurationElement;&lt;br /&gt;
&lt;br /&gt;
	// Tag name for position elements.&lt;br /&gt;
	static const CEGUI::String m_configurationElementDialog;&lt;br /&gt;
&lt;br /&gt;
	// Attribute name that stores the name of the window.&lt;br /&gt;
	static const char windowNameAttribute[];&lt;br /&gt;
&lt;br /&gt;
	// Attribute name that stores the position of the window.&lt;br /&gt;
	static const char windowPosAttribute[];&lt;br /&gt;
&lt;br /&gt;
	// Attribute name that stores the visible state of the window.&lt;br /&gt;
	static const char windowVisibleAttribute[];&lt;br /&gt;
&lt;br /&gt;
	// Attribute name that stores the rolledUp state of the window.&lt;br /&gt;
	static const char windowRolledupAttribute[];&lt;br /&gt;
&lt;br /&gt;
	// Tag name of MultiColumnList elements.&lt;br /&gt;
	static const CEGUI::String m_configurationElementMultiColumnList;&lt;br /&gt;
&lt;br /&gt;
	// Attribute name that stores the sequence of the columns.&lt;br /&gt;
	static const char mclColumnSequenceAttribute[];&lt;br /&gt;
&lt;br /&gt;
	// Attribute name that stores which column is sorted.&lt;br /&gt;
	static const char mclSortedColumnAttribute[];&lt;br /&gt;
&lt;br /&gt;
	// Attribute name that stores the sort order direction.&lt;br /&gt;
	static const char mclAscendingSortAttribute[];&lt;br /&gt;
&lt;br /&gt;
	// Attribute name that stores the widths of the columns.&lt;br /&gt;
	static const char DialogConfigurations::mclColumnWidthAttribute[];&lt;br /&gt;
&lt;br /&gt;
	// Separator for the column sequences.&lt;br /&gt;
	static const char DialogConfigurations::mclColumnSequenceSeparator;&lt;br /&gt;
&lt;br /&gt;
	// Separator for the column widths.&lt;br /&gt;
	static const char DialogConfigurations::mclColumnWidthSeparator;&lt;br /&gt;
&lt;br /&gt;
	// Special attribute name to monitor every attribute.&lt;br /&gt;
	static const char monitoredAttributeAll[];&lt;br /&gt;
&lt;br /&gt;
	// Special attribute name to monitor no attribute.&lt;br /&gt;
	static const char monitoredAttributeNone[];&lt;br /&gt;
&lt;br /&gt;
	// The value of one dialog configuration.&lt;br /&gt;
	struct DialogConfig {&lt;br /&gt;
		CEGUI::URect position;&lt;br /&gt;
		bool visible;&lt;br /&gt;
		bool rolledup;&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	// List of the dialog configurations.&lt;br /&gt;
	std::map&amp;lt;CEGUI::String, DialogConfig&amp;gt; m_dialogConfigurations;&lt;br /&gt;
&lt;br /&gt;
	// Default position.&lt;br /&gt;
	CEGUI::URect m_defaultPosition;&lt;br /&gt;
&lt;br /&gt;
	// Default visible/hidden.&lt;br /&gt;
	bool m_defaultVisible;&lt;br /&gt;
&lt;br /&gt;
	// Default rolled up/expanded.&lt;br /&gt;
	bool m_defaultRolledup;&lt;br /&gt;
&lt;br /&gt;
	// Specify which attributes to monitor for this dialog.&lt;br /&gt;
	void _setDialogAttributesMonitored(const CEGUI::String&amp;amp; dialog, const CEGUI::String&amp;amp; attributesMonitored);&lt;br /&gt;
&lt;br /&gt;
	// List of the attributes monitored per dialog.&lt;br /&gt;
	std::map&amp;lt;CEGUI::String, std::vector&amp;lt;CEGUI::String&amp;gt;&amp;gt; m_attributesMonitoredDialog;&lt;br /&gt;
&lt;br /&gt;
	// The value of one multi column list configuration.&lt;br /&gt;
	struct MultiColumnListConfig {&lt;br /&gt;
		std::vector&amp;lt;CEGUI::String&amp;gt; columnSequence;&lt;br /&gt;
		CEGUI::uint sortedColumn;&lt;br /&gt;
		bool sortAscending;&lt;br /&gt;
		std::vector&amp;lt;CEGUI::String&amp;gt; columnWidths;&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	// List of the multi column list configurations.&lt;br /&gt;
	std::map&amp;lt;CEGUI::String, MultiColumnListConfig&amp;gt; m_multiColumnListConfigurations;&lt;br /&gt;
&lt;br /&gt;
	// Default column sequence.&lt;br /&gt;
	std::vector&amp;lt;CEGUI::String&amp;gt; m_defaultColumnSequence;&lt;br /&gt;
&lt;br /&gt;
	// Default sorted column.&lt;br /&gt;
	CEGUI::uint m_defaultSortedColumn;&lt;br /&gt;
&lt;br /&gt;
	// Default sort order.&lt;br /&gt;
	bool m_defaultSortAscending;&lt;br /&gt;
&lt;br /&gt;
	// Default column widths.&lt;br /&gt;
	std::vector&amp;lt;CEGUI::String&amp;gt; m_defaultColumnWidths;&lt;br /&gt;
&lt;br /&gt;
	// Specify which attributes to monitor for this multi column list.&lt;br /&gt;
	void _setMultiColumnListAttributesMonitored(const CEGUI::String&amp;amp; multiColumnList, const CEGUI::String&amp;amp; attributesMonitored);&lt;br /&gt;
&lt;br /&gt;
	// List of the attributes monitored per MultiColumnList&lt;br /&gt;
	std::map&amp;lt;CEGUI::String, std::vector&amp;lt;CEGUI::String&amp;gt;&amp;gt; m_attributesMonitoredMultiColumnList;&lt;br /&gt;
&lt;br /&gt;
	// File containing the positions.&lt;br /&gt;
	CEGUI::String m_configFile;&lt;br /&gt;
&lt;br /&gt;
	// List of the supported attributes.&lt;br /&gt;
	static std::vector&amp;lt;CEGUI::String&amp;gt; m_attributeList;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#endif // _DialogConfigurations_h_&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== DialogConfigurations.cpp ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
#include &amp;quot;DialogConfigurations.h&amp;quot;&lt;br /&gt;
#include &amp;quot;CEGUIPropertyHelper.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
//Definition of XML elements and attributes&lt;br /&gt;
const CEGUI::String DialogConfigurations::m_DialogConfigurationElement( &amp;quot;DialogConfigurations&amp;quot; );&lt;br /&gt;
const CEGUI::String DialogConfigurations::m_configurationElementDialog( &amp;quot;DialogConfiguration&amp;quot; );&lt;br /&gt;
const char DialogConfigurations::windowNameAttribute[]		= &amp;quot;Name&amp;quot;;&lt;br /&gt;
const char DialogConfigurations::windowPosAttribute[]		= &amp;quot;Position&amp;quot;;&lt;br /&gt;
const char DialogConfigurations::windowVisibleAttribute[]	= &amp;quot;Visible&amp;quot;;&lt;br /&gt;
const char DialogConfigurations::windowRolledupAttribute[]	= &amp;quot;RolledUp&amp;quot;;&lt;br /&gt;
const char DialogConfigurations::monitoredAttributeAll[]	= &amp;quot;All&amp;quot;;&lt;br /&gt;
const char DialogConfigurations::monitoredAttributeNone[]	= &amp;quot;None&amp;quot;;&lt;br /&gt;
const CEGUI::String DialogConfigurations::m_configurationElementMultiColumnList( &amp;quot;MultiColumnListConfiguration&amp;quot; );&lt;br /&gt;
const char DialogConfigurations::mclColumnSequenceAttribute[]	= &amp;quot;ColumnSequence&amp;quot;;&lt;br /&gt;
const char DialogConfigurations::mclColumnWidthAttribute[]	= &amp;quot;ColumnWidths&amp;quot;;&lt;br /&gt;
const char DialogConfigurations::mclSortedColumnAttribute[]	= &amp;quot;SortedColumn&amp;quot;;&lt;br /&gt;
const char DialogConfigurations::mclAscendingSortAttribute[]= &amp;quot;AscendingSort&amp;quot;;&lt;br /&gt;
const char DialogConfigurations::mclColumnSequenceSeparator	= ',';&lt;br /&gt;
const char DialogConfigurations::mclColumnWidthSeparator	= ';';&lt;br /&gt;
&lt;br /&gt;
// List of the supported attributes&lt;br /&gt;
// Each attribute is enclosed within spaces&lt;br /&gt;
//const CEGUI::String DialogConfigurations::m_attributeList = &amp;quot; All None Position Visible RolledUp MCLWidths MCLSequence MCLSort &amp;quot;;&lt;br /&gt;
std::vector&amp;lt;CEGUI::String&amp;gt; DialogConfigurations::m_attributeList;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
void Tokenize(const CEGUI::String&amp;amp; str, std::vector&amp;lt;CEGUI::String&amp;gt;&amp;amp; tokens, const char delimiters = ' ')&lt;br /&gt;
{&lt;br /&gt;
	// Break a sentence into multiple words separated by delimiters&lt;br /&gt;
	// Does not handle words within double-quotes: One &amp;quot;2 &amp;amp;2&amp;quot; three, four&lt;br /&gt;
&lt;br /&gt;
    // Skip delimiters at beginning&lt;br /&gt;
	CEGUI::String::size_type lastPos = str.find_first_not_of(delimiters, 0);&lt;br /&gt;
&lt;br /&gt;
    // Find first &amp;quot;non-delimiter&amp;quot;&lt;br /&gt;
	CEGUI::String::size_type pos = str.find_first_of(delimiters, lastPos);&lt;br /&gt;
&lt;br /&gt;
	CEGUI::String::size_type length = str.length();&lt;br /&gt;
	while (str.npos != pos || str.npos != lastPos)&lt;br /&gt;
    {&lt;br /&gt;
		// Cap the position to the length of the string&lt;br /&gt;
		if(pos == str.npos)&lt;br /&gt;
			pos = length;&lt;br /&gt;
		if(lastPos == str.npos)&lt;br /&gt;
			lastPos = length;&lt;br /&gt;
&lt;br /&gt;
        // Found a token, add it to the vector&lt;br /&gt;
        tokens.push_back(str.substr(lastPos, pos - lastPos));&lt;br /&gt;
&lt;br /&gt;
        // Skip delimiters&lt;br /&gt;
        lastPos = str.find_first_not_of(delimiters, pos);&lt;br /&gt;
&lt;br /&gt;
        // Find next &amp;quot;non-delimiter&amp;quot;&lt;br /&gt;
        pos = str.find_first_of(delimiters, lastPos);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
DialogConfigurations::DialogConfigurations()&lt;br /&gt;
{&lt;br /&gt;
	setDialogDefaults(CEGUI::URect( CEGUI::UDim(0.0f, 0.0f),&lt;br /&gt;
									CEGUI::UDim(0.0f, 0.0f),&lt;br /&gt;
									CEGUI::UDim(0.5f, 0.0f),&lt;br /&gt;
									CEGUI::UDim(0.5f, 0.0f)),&lt;br /&gt;
					true,&lt;br /&gt;
					true);&lt;br /&gt;
&lt;br /&gt;
	// setMultiColumnListDefaults()&lt;br /&gt;
	m_defaultSortedColumn  = 0;&lt;br /&gt;
	m_defaultSortAscending = true;&lt;br /&gt;
&lt;br /&gt;
	if(m_attributeList.empty())&lt;br /&gt;
	{&lt;br /&gt;
		// This is a static variable, only initialize once&lt;br /&gt;
		m_attributeList.push_back(monitoredAttributeAll);&lt;br /&gt;
		m_attributeList.push_back(monitoredAttributeNone);&lt;br /&gt;
		m_attributeList.push_back(windowPosAttribute);&lt;br /&gt;
		m_attributeList.push_back(windowVisibleAttribute);&lt;br /&gt;
		m_attributeList.push_back(windowRolledupAttribute);&lt;br /&gt;
		m_attributeList.push_back(mclColumnSequenceAttribute);&lt;br /&gt;
		m_attributeList.push_back(mclSortedColumnAttribute);&lt;br /&gt;
		m_attributeList.push_back(mclAscendingSortAttribute);&lt;br /&gt;
		m_attributeList.push_back(mclColumnWidthAttribute);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	// The default is to monitor every attribute&lt;br /&gt;
	_setDialogAttributesMonitored(&amp;quot;&amp;quot;, monitoredAttributeAll);&lt;br /&gt;
	_setMultiColumnListAttributesMonitored(&amp;quot;&amp;quot;, monitoredAttributeAll);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool DialogConfigurations::loadConfigurations(const CEGUI::String&amp;amp; xmlFile, const CEGUI::String&amp;amp; schema, const bool&amp;amp; applyConfigurations)&lt;br /&gt;
{&lt;br /&gt;
	// Load the config of every stored dialog&lt;br /&gt;
	assert(!xmlFile.empty() &amp;amp;&amp;amp; &amp;quot;You must specify an xml file to loadConfigurations()&amp;quot;);&lt;br /&gt;
	m_configFile = xmlFile;&lt;br /&gt;
	bool loadedOk = true;&lt;br /&gt;
	try&lt;br /&gt;
	{&lt;br /&gt;
		CEGUI::System::getSingleton().getXMLParser()-&amp;gt;parseXMLFile(*this, m_configFile, schema, &amp;quot;&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	catch(const CEGUI::Exception&amp;amp;)&lt;br /&gt;
	{&lt;br /&gt;
		// File is empty or parse error&lt;br /&gt;
		// Silently ignore; we'll create a new file when saving&lt;br /&gt;
		loadedOk = false;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	if(applyConfigurations)&lt;br /&gt;
	{&lt;br /&gt;
		applyDialogConfiguration();&lt;br /&gt;
		applyMultiColumnListConfiguration();&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	return loadedOk;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool DialogConfigurations::saveConfigurations()&lt;br /&gt;
{&lt;br /&gt;
	// Store the configuration of every registered dialog, either within&lt;br /&gt;
	// the loaded XML file or those manually registered via addDialog() &lt;br /&gt;
	assert(!m_configFile.empty() &amp;amp;&amp;amp; &amp;quot;You must specify an xml file by calling loadConfigurations() before saveConfigurations()&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	// Try to open the XML file in writing mode&lt;br /&gt;
    std::ofstream fileSave;&lt;br /&gt;
	fileSave.open(m_configFile.c_str(), std::ios::out) ;&lt;br /&gt;
    if( !fileSave.is_open() )&lt;br /&gt;
    {&lt;br /&gt;
		CEGUI::Logger::getSingleton().logEvent(&amp;quot;Could not write to dialog configuration file (&amp;quot;&lt;br /&gt;
												+ m_configFile&lt;br /&gt;
												+ &amp;quot;).  Is it read-only?&amp;quot;,&lt;br /&gt;
												CEGUI::Errors);&lt;br /&gt;
        return false;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
	// Write the header&lt;br /&gt;
	fileSave &amp;lt;&amp;lt; &amp;quot;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; ?&amp;gt;&amp;quot; &amp;lt;&amp;lt; std::endl&lt;br /&gt;
			&amp;lt;&amp;lt; &amp;quot;&amp;lt;&amp;quot; &amp;lt;&amp;lt; m_DialogConfigurationElement &amp;lt;&amp;lt; &amp;quot;&amp;gt;&amp;quot;&lt;br /&gt;
			&amp;lt;&amp;lt; std::endl;&lt;br /&gt;
&lt;br /&gt;
	// Write each dialog's configuration&lt;br /&gt;
	DialogConfig dialogConfig;&lt;br /&gt;
	CEGUI::WindowManager&amp;amp; winMgr = CEGUI::WindowManager::getSingleton();&lt;br /&gt;
	std::map&amp;lt;CEGUI::String, DialogConfig&amp;gt;::iterator itDialogConfig;&lt;br /&gt;
	std::map&amp;lt;CEGUI::String, std::vector&amp;lt;CEGUI::String&amp;gt;&amp;gt;::iterator itAttributesMonitored;&lt;br /&gt;
	std::vector&amp;lt;CEGUI::String&amp;gt; attributesMonitored;&lt;br /&gt;
	CEGUI::Window* window;&lt;br /&gt;
	for(itDialogConfig = m_dialogConfigurations.begin(); itDialogConfig != m_dialogConfigurations.end(); ++itDialogConfig)&lt;br /&gt;
	{&lt;br /&gt;
		if(!winMgr.isWindowPresent(itDialogConfig-&amp;gt;first))&lt;br /&gt;
			continue;&lt;br /&gt;
&lt;br /&gt;
		itAttributesMonitored = m_attributesMonitoredDialog.find(itDialogConfig-&amp;gt;first);&lt;br /&gt;
		if(itAttributesMonitored != m_attributesMonitoredDialog.end())&lt;br /&gt;
			attributesMonitored = (*itAttributesMonitored).second; // Dialog has specified attributes&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			// Use default attributes&lt;br /&gt;
			itAttributesMonitored = m_attributesMonitoredDialog.find(&amp;quot;&amp;quot;);&lt;br /&gt;
			if(itAttributesMonitored != m_attributesMonitoredDialog.end())&lt;br /&gt;
				attributesMonitored = (*itAttributesMonitored).second;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		window = winMgr.getWindow(itDialogConfig-&amp;gt;first);&lt;br /&gt;
		dialogConfig.position = window-&amp;gt;getArea();&lt;br /&gt;
		dialogConfig.visible	= window-&amp;gt;isVisible();&lt;br /&gt;
		if( window-&amp;gt;testClassName(&amp;quot;FrameWindow&amp;quot;) )&lt;br /&gt;
			dialogConfig.rolledup = static_cast&amp;lt;CEGUI::FrameWindow*&amp;gt;(window)-&amp;gt;isRolledup();&lt;br /&gt;
		else&lt;br /&gt;
			dialogConfig.rolledup = false;&lt;br /&gt;
		fileSave &amp;lt;&amp;lt; &amp;quot;  &amp;lt;&amp;quot; &amp;lt;&amp;lt; m_configurationElementDialog.c_str() &amp;lt;&amp;lt; &amp;quot; &amp;quot;&lt;br /&gt;
			&amp;lt;&amp;lt; windowNameAttribute		&amp;lt;&amp;lt; &amp;quot;=\&amp;quot;&amp;quot; &amp;lt;&amp;lt; itDialogConfig-&amp;gt;first	&amp;lt;&amp;lt; &amp;quot;\&amp;quot; &amp;quot;;&lt;br /&gt;
		if(isMonitoringAttribute(attributesMonitored, windowPosAttribute))&lt;br /&gt;
			fileSave &amp;lt;&amp;lt; windowPosAttribute		&amp;lt;&amp;lt; &amp;quot;=\&amp;quot;&amp;quot; &amp;lt;&amp;lt; CEGUI::PropertyHelper::urectToString(dialogConfig.position)	&amp;lt;&amp;lt; &amp;quot;\&amp;quot; &amp;quot;;&lt;br /&gt;
		if(isMonitoringAttribute(attributesMonitored, windowVisibleAttribute))&lt;br /&gt;
			fileSave &amp;lt;&amp;lt; windowVisibleAttribute	&amp;lt;&amp;lt; &amp;quot;=\&amp;quot;&amp;quot; &amp;lt;&amp;lt; dialogConfig.visible	&amp;lt;&amp;lt; &amp;quot;\&amp;quot; &amp;quot;;&lt;br /&gt;
		if(isMonitoringAttribute(attributesMonitored, windowRolledupAttribute))&lt;br /&gt;
			fileSave &amp;lt;&amp;lt; windowRolledupAttribute	&amp;lt;&amp;lt; &amp;quot;=\&amp;quot;&amp;quot; &amp;lt;&amp;lt; dialogConfig.rolledup	&amp;lt;&amp;lt; &amp;quot;\&amp;quot; &amp;quot;;&lt;br /&gt;
		fileSave &amp;lt;&amp;lt; &amp;quot;/&amp;gt;&amp;quot; &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	// Write each MultiColumnList's configuration&lt;br /&gt;
	std::map&amp;lt;CEGUI::String, MultiColumnListConfig&amp;gt;::iterator itMultiColumnListConfig;&lt;br /&gt;
	attributesMonitored.clear();&lt;br /&gt;
	CEGUI::MultiColumnList* multiColumnList;&lt;br /&gt;
	for(itMultiColumnListConfig = m_multiColumnListConfigurations.begin(); itMultiColumnListConfig != m_multiColumnListConfigurations.end(); ++itMultiColumnListConfig)&lt;br /&gt;
	{&lt;br /&gt;
		itAttributesMonitored = m_attributesMonitoredMultiColumnList.find(itMultiColumnListConfig-&amp;gt;first);&lt;br /&gt;
		if(itAttributesMonitored != m_attributesMonitoredMultiColumnList.end())&lt;br /&gt;
			attributesMonitored = (*itAttributesMonitored).second; // Dialog has specified attributes&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			// Use default attributes&lt;br /&gt;
			itAttributesMonitored = m_attributesMonitoredMultiColumnList.find(&amp;quot;&amp;quot;);&lt;br /&gt;
			if(itAttributesMonitored != m_attributesMonitoredMultiColumnList.end())&lt;br /&gt;
				attributesMonitored = (*itAttributesMonitored).second;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		multiColumnList = static_cast&amp;lt;CEGUI::MultiColumnList*&amp;gt;(winMgr.getWindow(itMultiColumnListConfig-&amp;gt;first));&lt;br /&gt;
		fileSave &amp;lt;&amp;lt; &amp;quot;  &amp;lt;&amp;quot; &amp;lt;&amp;lt; m_configurationElementMultiColumnList.c_str() &amp;lt;&amp;lt; &amp;quot; &amp;quot;&lt;br /&gt;
			&amp;lt;&amp;lt; windowNameAttribute		&amp;lt;&amp;lt; &amp;quot;=\&amp;quot;&amp;quot; &amp;lt;&amp;lt; itMultiColumnListConfig-&amp;gt;first	&amp;lt;&amp;lt; &amp;quot;\&amp;quot; &amp;quot;;&lt;br /&gt;
		if(isMonitoringAttribute(attributesMonitored, mclColumnSequenceAttribute) &amp;amp;&amp;amp; multiColumnList-&amp;gt;getColumnCount())&lt;br /&gt;
		{&lt;br /&gt;
			fileSave &amp;lt;&amp;lt; mclColumnSequenceAttribute &amp;lt;&amp;lt; &amp;quot;=\&amp;quot;&amp;quot;;&lt;br /&gt;
			for(CEGUI::uint columnIndex = 0; columnIndex &amp;lt; multiColumnList-&amp;gt;getColumnCount(); ++columnIndex)&lt;br /&gt;
			{&lt;br /&gt;
				if(columnIndex)&lt;br /&gt;
					fileSave &amp;lt;&amp;lt; mclColumnSequenceSeparator;&lt;br /&gt;
				fileSave &amp;lt;&amp;lt; multiColumnList-&amp;gt;getColumnID(columnIndex);&lt;br /&gt;
			}&lt;br /&gt;
			fileSave &amp;lt;&amp;lt; &amp;quot;\&amp;quot; &amp;quot;;&lt;br /&gt;
		}&lt;br /&gt;
		if(isMonitoringAttribute(attributesMonitored, mclColumnWidthAttribute) &amp;amp;&amp;amp; multiColumnList-&amp;gt;getColumnCount())&lt;br /&gt;
		{&lt;br /&gt;
			fileSave &amp;lt;&amp;lt; mclColumnWidthAttribute &amp;lt;&amp;lt; &amp;quot;=\&amp;quot;&amp;quot;;&lt;br /&gt;
			for(CEGUI::uint columnIndex = 0; columnIndex &amp;lt; multiColumnList-&amp;gt;getColumnCount(); ++columnIndex)&lt;br /&gt;
			{&lt;br /&gt;
				if(columnIndex)&lt;br /&gt;
					fileSave &amp;lt;&amp;lt; mclColumnWidthSeparator;&lt;br /&gt;
				fileSave &amp;lt;&amp;lt; CEGUI::PropertyHelper::udimToString(multiColumnList-&amp;gt;getColumnHeaderWidth(columnIndex));&lt;br /&gt;
			}&lt;br /&gt;
			fileSave &amp;lt;&amp;lt; &amp;quot;\&amp;quot; &amp;quot;;&lt;br /&gt;
		}&lt;br /&gt;
		if(isMonitoringAttribute(attributesMonitored, mclSortedColumnAttribute))&lt;br /&gt;
			fileSave &amp;lt;&amp;lt; mclSortedColumnAttribute	&amp;lt;&amp;lt; &amp;quot;=\&amp;quot;&amp;quot; &amp;lt;&amp;lt; multiColumnList-&amp;gt;getColumnID(multiColumnList-&amp;gt;getSortColumn()) &amp;lt;&amp;lt; &amp;quot;\&amp;quot; &amp;quot;;&lt;br /&gt;
		if(isMonitoringAttribute(attributesMonitored, mclAscendingSortAttribute))&lt;br /&gt;
			fileSave &amp;lt;&amp;lt; mclAscendingSortAttribute &amp;lt;&amp;lt; &amp;quot;=\&amp;quot;&amp;quot; &amp;lt;&amp;lt; (multiColumnList-&amp;gt;getSortDirection() != CEGUI::ListHeaderSegment::Descending) &amp;lt;&amp;lt; &amp;quot;\&amp;quot; &amp;quot;;&lt;br /&gt;
		fileSave &amp;lt;&amp;lt; &amp;quot;/&amp;gt;&amp;quot; &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	// Write the footer&lt;br /&gt;
	fileSave &amp;lt;&amp;lt; &amp;quot;&amp;lt;/&amp;quot; &amp;lt;&amp;lt; m_DialogConfigurationElement &amp;lt;&amp;lt; &amp;quot;&amp;gt;&amp;quot; &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
	fileSave.close();&lt;br /&gt;
	return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void DialogConfigurations::setDialogDefaults(const CEGUI::URect&amp;amp; position, const bool&amp;amp; visible, const bool&amp;amp; rolledup)&lt;br /&gt;
{&lt;br /&gt;
	// Set default values&lt;br /&gt;
	// Should validate what's being passed as parameters&lt;br /&gt;
	m_defaultPosition	= position;&lt;br /&gt;
	m_defaultVisible	= visible;&lt;br /&gt;
	m_defaultRolledup	= rolledup;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void DialogConfigurations::setDefaultDialogAttributesMonitored(const CEGUI::String&amp;amp; attributesMonitored)&lt;br /&gt;
{&lt;br /&gt;
	_setDialogAttributesMonitored(&amp;quot;&amp;quot;, attributesMonitored);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool DialogConfigurations::addDialog(const CEGUI::String&amp;amp; widget, const CEGUI::String&amp;amp; attributesMonitored)&lt;br /&gt;
{&lt;br /&gt;
	// Add a dialog to be monitored&lt;br /&gt;
	// This can be used to automatically write the contents of the initial XML file&lt;br /&gt;
	//   rather than editing it by hand.&lt;br /&gt;
	assert(!widget.empty() &amp;amp;&amp;amp; &amp;quot;You must pass a dialog name to addDialog()&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	if(!attributesMonitored.empty())&lt;br /&gt;
		_setDialogAttributesMonitored(widget, attributesMonitored);&lt;br /&gt;
&lt;br /&gt;
	std::map&amp;lt;CEGUI::String, DialogConfig&amp;gt;::iterator itConfig;&lt;br /&gt;
	itConfig = m_dialogConfigurations.find(widget);&lt;br /&gt;
	if(itConfig != m_dialogConfigurations.end())&lt;br /&gt;
		return false; // This dialog is already added&lt;br /&gt;
&lt;br /&gt;
	CEGUI::Window* window = CEGUI::WindowManager::getSingleton().getWindow(widget);&lt;br /&gt;
	DialogConfig config;&lt;br /&gt;
	config.position = window-&amp;gt;getArea();&lt;br /&gt;
	config.visible	= window-&amp;gt;isVisible();&lt;br /&gt;
	if( window-&amp;gt;testClassName(&amp;quot;FrameWindow&amp;quot;) )&lt;br /&gt;
		config.rolledup = static_cast&amp;lt;CEGUI::FrameWindow*&amp;gt;(window)-&amp;gt;isRolledup();&lt;br /&gt;
	else&lt;br /&gt;
		config.rolledup = m_defaultRolledup; // Not really needed, unless this window inherits from FrameWindow after being loaded&lt;br /&gt;
&lt;br /&gt;
	m_dialogConfigurations[widget] = config;&lt;br /&gt;
	return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
const CEGUI::URect&amp;amp; DialogConfigurations::getDialogSavedPosition(const CEGUI::String&amp;amp; dialog)&lt;br /&gt;
{&lt;br /&gt;
	// Return the position of the specified dialog&lt;br /&gt;
	std::map&amp;lt;CEGUI::String, DialogConfig&amp;gt;::iterator itConfig;&lt;br /&gt;
	itConfig = m_dialogConfigurations.find(dialog);&lt;br /&gt;
	return itConfig == m_dialogConfigurations.end() ? m_defaultPosition : (*itConfig).second.position;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
const bool&amp;amp; DialogConfigurations::getDialogSavedVisible(const CEGUI::String&amp;amp; dialog)&lt;br /&gt;
{&lt;br /&gt;
	// Return the visible/hidden state of the specified dialog&lt;br /&gt;
	std::map&amp;lt;CEGUI::String, DialogConfig&amp;gt;::iterator itConfig;&lt;br /&gt;
	itConfig = m_dialogConfigurations.find(dialog);&lt;br /&gt;
	return itConfig == m_dialogConfigurations.end() ? m_defaultVisible : (*itConfig).second.visible;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
const bool&amp;amp; DialogConfigurations::getDialogSavedRolledup(const CEGUI::String&amp;amp; dialog)&lt;br /&gt;
{&lt;br /&gt;
	// Return the expansion state of the specified dialog&lt;br /&gt;
	std::map&amp;lt;CEGUI::String, DialogConfig&amp;gt;::iterator itConfig;&lt;br /&gt;
	itConfig = m_dialogConfigurations.find(dialog);&lt;br /&gt;
	return itConfig == m_dialogConfigurations.end() ? m_defaultRolledup : (*itConfig).second.rolledup;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool DialogConfigurations::applyDialogConfiguration(const CEGUI::String&amp;amp; dialog)&lt;br /&gt;
{&lt;br /&gt;
	// Apply the saved configuration to a dialog&lt;br /&gt;
	if(dialog.length() == 0)&lt;br /&gt;
	{&lt;br /&gt;
		// Load every dialog configurations&lt;br /&gt;
		std::map&amp;lt;CEGUI::String, DialogConfig&amp;gt;::iterator itConfig;&lt;br /&gt;
		for(itConfig = m_dialogConfigurations.begin(); itConfig != m_dialogConfigurations.end(); itConfig++)&lt;br /&gt;
		{&lt;br /&gt;
			applyDialogConfiguration((*itConfig).first);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
	else&lt;br /&gt;
	{&lt;br /&gt;
		// Find this dialog's configuration&lt;br /&gt;
		CEGUI::WindowManager&amp;amp; winMgr = CEGUI::WindowManager::getSingleton();&lt;br /&gt;
		std::map&amp;lt;CEGUI::String, DialogConfig&amp;gt;::iterator itConfig;&lt;br /&gt;
		itConfig = m_dialogConfigurations.find(dialog);&lt;br /&gt;
		if(itConfig == m_dialogConfigurations.end() || !winMgr.isWindowPresent(dialog))&lt;br /&gt;
			return false;&lt;br /&gt;
&lt;br /&gt;
		// Determine which attributes are monitored&lt;br /&gt;
		std::vector&amp;lt;CEGUI::String&amp;gt; attributesMonitored;&lt;br /&gt;
		std::map&amp;lt;CEGUI::String, std::vector&amp;lt;CEGUI::String&amp;gt;&amp;gt;::iterator itAttributesMonitored;&lt;br /&gt;
		itAttributesMonitored = m_attributesMonitoredDialog.find(dialog);&lt;br /&gt;
		if(itAttributesMonitored != m_attributesMonitoredDialog.end())&lt;br /&gt;
			attributesMonitored = (*itAttributesMonitored).second; // Dialog has specified attributes&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			// Use default attributes&lt;br /&gt;
			itAttributesMonitored = m_attributesMonitoredDialog.find(&amp;quot;&amp;quot;);&lt;br /&gt;
			if(itAttributesMonitored == m_attributesMonitoredDialog.end())&lt;br /&gt;
				return false;  // Could not retrieve the default attributes (should never happen)&lt;br /&gt;
			attributesMonitored = (*itAttributesMonitored).second;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Apply the configuration to the dialog&lt;br /&gt;
		CEGUI::Window* window = winMgr.getWindow(dialog);&lt;br /&gt;
		if(isMonitoringAttribute(attributesMonitored, windowPosAttribute))&lt;br /&gt;
			window-&amp;gt;setArea((*itConfig).second.position);&lt;br /&gt;
		if(isMonitoringAttribute(attributesMonitored, windowVisibleAttribute))&lt;br /&gt;
			window-&amp;gt;setVisible((*itConfig).second.visible);&lt;br /&gt;
		if(isMonitoringAttribute(attributesMonitored, windowRolledupAttribute))&lt;br /&gt;
		{&lt;br /&gt;
			if( window-&amp;gt;testClassName(&amp;quot;FrameWindow&amp;quot;) )&lt;br /&gt;
			{&lt;br /&gt;
				CEGUI::FrameWindow* frameWindow = static_cast&amp;lt;CEGUI::FrameWindow*&amp;gt;(window);&lt;br /&gt;
				if(frameWindow-&amp;gt;isRolledup() != (*itConfig).second.rolledup)&lt;br /&gt;
					frameWindow-&amp;gt;toggleRollup();&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
	return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void DialogConfigurations::setMultiColumnListDefaults(const std::vector&amp;lt;CEGUI::String&amp;gt;&amp;amp; columnSequence, const CEGUI::uint&amp;amp; sortedColumn, const bool&amp;amp; sortAscending, const std::vector&amp;lt;CEGUI::String&amp;gt;&amp;amp; columnWidths)&lt;br /&gt;
{&lt;br /&gt;
	// Set default values&lt;br /&gt;
	// Should validate what's being passed as parameters&lt;br /&gt;
	m_defaultColumnSequence = columnSequence;&lt;br /&gt;
	m_defaultSortedColumn	= sortedColumn;&lt;br /&gt;
	m_defaultSortAscending	= sortAscending;&lt;br /&gt;
	m_defaultColumnWidths	= columnWidths;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void DialogConfigurations::setDefaultMultiColumnListAttributesMonitored(const CEGUI::String&amp;amp; attributesMonitored)&lt;br /&gt;
{&lt;br /&gt;
	_setMultiColumnListAttributesMonitored(&amp;quot;&amp;quot;, attributesMonitored);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool DialogConfigurations::addMultiColumnList(const CEGUI::String&amp;amp; widget, const CEGUI::String&amp;amp; attributesMonitored)&lt;br /&gt;
{&lt;br /&gt;
	// Add a MultiColumnList to be monitored&lt;br /&gt;
	// This can be used to automatically write the contents of the initial XML file&lt;br /&gt;
	//   rather than editing it by hand.&lt;br /&gt;
	assert(!widget.empty() &amp;amp;&amp;amp; &amp;quot;You must pass a multiColumnList name to addMultiColumnList()&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	if(!attributesMonitored.empty())&lt;br /&gt;
		_setMultiColumnListAttributesMonitored(widget, attributesMonitored);&lt;br /&gt;
&lt;br /&gt;
	std::map&amp;lt;CEGUI::String, MultiColumnListConfig&amp;gt;::iterator itConfig;&lt;br /&gt;
	itConfig = m_multiColumnListConfigurations.find(widget);&lt;br /&gt;
	if(itConfig != m_multiColumnListConfigurations.end())&lt;br /&gt;
		return false; // This MultiColumnList is already added&lt;br /&gt;
&lt;br /&gt;
	MultiColumnListConfig config;&lt;br /&gt;
	CEGUI::MultiColumnList* multiColumnList = static_cast&amp;lt;CEGUI::MultiColumnList*&amp;gt;(CEGUI::WindowManager::getSingleton().getWindow(widget));&lt;br /&gt;
	assert(multiColumnList-&amp;gt;testClassName(&amp;quot;MultiColumnList&amp;quot;) &amp;amp;&amp;amp; &amp;quot;This widget is not a MultiColumnList&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	for(CEGUI::uint columnIndex = 0; columnIndex &amp;lt; multiColumnList-&amp;gt;getColumnCount(); ++columnIndex)&lt;br /&gt;
	{&lt;br /&gt;
		config.columnSequence.push_back(CEGUI::PropertyHelper::uintToString(multiColumnList-&amp;gt;getColumnID(columnIndex)));&lt;br /&gt;
		config.columnWidths.push_back(CEGUI::PropertyHelper::udimToString(multiColumnList-&amp;gt;getColumnHeaderWidth(columnIndex)));&lt;br /&gt;
	}&lt;br /&gt;
	config.sortedColumn  = multiColumnList-&amp;gt;getSortColumn();&lt;br /&gt;
	config.sortAscending = multiColumnList-&amp;gt;getSortDirection() != CEGUI::ListHeaderSegment::Descending;&lt;br /&gt;
&lt;br /&gt;
	m_multiColumnListConfigurations[widget] = config;&lt;br /&gt;
	return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool DialogConfigurations::applyMultiColumnListConfiguration(const CEGUI::String&amp;amp; multiColumnList)&lt;br /&gt;
{&lt;br /&gt;
	// Apply the saved configuration to a multi column list&lt;br /&gt;
	if(multiColumnList.length() == 0)&lt;br /&gt;
	{&lt;br /&gt;
		// Load every multi column list configurations&lt;br /&gt;
		std::map&amp;lt;CEGUI::String, MultiColumnListConfig&amp;gt;::iterator itConfig;&lt;br /&gt;
		for(itConfig = m_multiColumnListConfigurations.begin(); itConfig != m_multiColumnListConfigurations.end(); itConfig++)&lt;br /&gt;
		{&lt;br /&gt;
			applyMultiColumnListConfiguration((*itConfig).first);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
	else&lt;br /&gt;
	{&lt;br /&gt;
		// Find this multi column list's configuration&lt;br /&gt;
		CEGUI::WindowManager&amp;amp; winMgr = CEGUI::WindowManager::getSingleton();&lt;br /&gt;
		std::map&amp;lt;CEGUI::String, MultiColumnListConfig&amp;gt;::iterator itConfig;&lt;br /&gt;
		itConfig = m_multiColumnListConfigurations.find(multiColumnList);&lt;br /&gt;
		if(itConfig == m_multiColumnListConfigurations.end() || !winMgr.isWindowPresent(multiColumnList))&lt;br /&gt;
			return false;&lt;br /&gt;
&lt;br /&gt;
		// Determine which attributes are monitored&lt;br /&gt;
		std::vector&amp;lt;CEGUI::String&amp;gt; attributesMonitored;&lt;br /&gt;
		std::map&amp;lt;CEGUI::String, std::vector&amp;lt;CEGUI::String&amp;gt;&amp;gt;::iterator itAttributesMonitored;&lt;br /&gt;
		itAttributesMonitored = m_attributesMonitoredMultiColumnList.find(multiColumnList);&lt;br /&gt;
		if(itAttributesMonitored != m_attributesMonitoredMultiColumnList.end())&lt;br /&gt;
			attributesMonitored = (*itAttributesMonitored).second; // Multi column list has specified attributes&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			// Use default attributes&lt;br /&gt;
			itAttributesMonitored = m_attributesMonitoredMultiColumnList.find(&amp;quot;&amp;quot;);&lt;br /&gt;
			if(itAttributesMonitored == m_attributesMonitoredMultiColumnList.end())&lt;br /&gt;
				return false;  // Could not retrieve the default attributes (should never happen)&lt;br /&gt;
			attributesMonitored = (*itAttributesMonitored).second;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Apply the configuration to the multi column list&lt;br /&gt;
		CEGUI::MultiColumnList* window = static_cast&amp;lt;CEGUI::MultiColumnList*&amp;gt;(winMgr.getWindow(multiColumnList));&lt;br /&gt;
		if(isMonitoringAttribute(attributesMonitored, mclColumnSequenceAttribute))&lt;br /&gt;
		{&lt;br /&gt;
			for(CEGUI::uint columnIndex = 0; columnIndex &amp;lt; window-&amp;gt;getColumnCount() &amp;amp;&amp;amp; columnIndex &amp;lt; (*itConfig).second.columnSequence.size(); ++columnIndex)&lt;br /&gt;
			{&lt;br /&gt;
				window-&amp;gt;moveColumn(window-&amp;gt;getColumnWithID(CEGUI::PropertyHelper::stringToUint((*itConfig).second.columnSequence.at(columnIndex))),&lt;br /&gt;
									columnIndex);&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
		if(isMonitoringAttribute(attributesMonitored, mclColumnWidthAttribute))&lt;br /&gt;
		{&lt;br /&gt;
			CEGUI::UDim width;&lt;br /&gt;
			for(CEGUI::uint columnIndex = 0; columnIndex &amp;lt; window-&amp;gt;getColumnCount() &amp;amp;&amp;amp; columnIndex &amp;lt; (*itConfig).second.columnWidths.size(); ++columnIndex)&lt;br /&gt;
			{&lt;br /&gt;
				width = CEGUI::PropertyHelper::stringToUDim((*itConfig).second.columnWidths.at(columnIndex));&lt;br /&gt;
				window-&amp;gt;setColumnHeaderWidth(columnIndex, width);&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
		if(isMonitoringAttribute(attributesMonitored, mclSortedColumnAttribute))&lt;br /&gt;
		{&lt;br /&gt;
			window-&amp;gt;setSortColumn( window-&amp;gt;getColumnWithID((*itConfig).second.sortedColumn) );&lt;br /&gt;
		}&lt;br /&gt;
		if(isMonitoringAttribute(attributesMonitored, mclAscendingSortAttribute))&lt;br /&gt;
		{&lt;br /&gt;
			window-&amp;gt;setSortDirection( (*itConfig).second.sortAscending ? CEGUI::ListHeaderSegment::Ascending&lt;br /&gt;
																		: CEGUI::ListHeaderSegment::Descending);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
	return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool DialogConfigurations::isMonitoringAttribute(const std::vector&amp;lt;CEGUI::String&amp;gt;&amp;amp; list, const CEGUI::String&amp;amp; attribute)&lt;br /&gt;
{&lt;br /&gt;
	std::vector&amp;lt;CEGUI::String&amp;gt;::const_iterator itList;&lt;br /&gt;
	for(itList = list.begin(); itList != list.end(); itList++)&lt;br /&gt;
	{&lt;br /&gt;
		if(!(*itList).compare(attribute))&lt;br /&gt;
			return true;&lt;br /&gt;
	}&lt;br /&gt;
	return false;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void DialogConfigurations::elementStart(const CEGUI::String&amp;amp; element, const CEGUI::XMLAttributes&amp;amp; xmlAttributes)&lt;br /&gt;
{&lt;br /&gt;
	// Performs the actual load every stored configuration&lt;br /&gt;
	if (element == m_configurationElementDialog)&lt;br /&gt;
    {&lt;br /&gt;
		DialogConfig config;&lt;br /&gt;
		config.position = m_defaultPosition;&lt;br /&gt;
		config.visible  = m_defaultVisible;&lt;br /&gt;
		config.rolledup = m_defaultRolledup;&lt;br /&gt;
		CEGUI::String name, monitoredAttributes;&lt;br /&gt;
		CEGUI::WindowManager&amp;amp; winMgr = CEGUI::WindowManager::getSingleton();&lt;br /&gt;
&lt;br /&gt;
		name = xmlAttributes.getValueAsString(windowNameAttribute);&lt;br /&gt;
&lt;br /&gt;
		if(xmlAttributes.exists(windowPosAttribute))&lt;br /&gt;
		{&lt;br /&gt;
			config.position	= CEGUI::PropertyHelper::stringToURect(xmlAttributes.getValueAsString(windowPosAttribute));&lt;br /&gt;
			monitoredAttributes.append(&amp;quot; &amp;quot;).append(windowPosAttribute);&lt;br /&gt;
		}&lt;br /&gt;
		if(xmlAttributes.exists(windowVisibleAttribute))&lt;br /&gt;
		{&lt;br /&gt;
			config.visible = xmlAttributes.getValueAsBool(windowVisibleAttribute);&lt;br /&gt;
			monitoredAttributes.append(&amp;quot; &amp;quot;).append(windowVisibleAttribute);&lt;br /&gt;
		}&lt;br /&gt;
		if(xmlAttributes.exists(windowRolledupAttribute))&lt;br /&gt;
		{&lt;br /&gt;
			config.rolledup	= xmlAttributes.getValueAsBool(windowRolledupAttribute);&lt;br /&gt;
			monitoredAttributes.append(&amp;quot; &amp;quot;).append(windowRolledupAttribute);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		_setDialogAttributesMonitored(name, monitoredAttributes);&lt;br /&gt;
		m_dialogConfigurations[name] = config;&lt;br /&gt;
	}&lt;br /&gt;
	else if (element == m_configurationElementMultiColumnList)&lt;br /&gt;
    {&lt;br /&gt;
		MultiColumnListConfig config;&lt;br /&gt;
		config.sortedColumn  = m_defaultSortedColumn;&lt;br /&gt;
		config.sortAscending = m_defaultSortAscending;&lt;br /&gt;
		CEGUI::String name, monitoredAttributes;&lt;br /&gt;
&lt;br /&gt;
		name = xmlAttributes.getValueAsString(windowNameAttribute);&lt;br /&gt;
&lt;br /&gt;
		if(xmlAttributes.exists(mclColumnSequenceAttribute))&lt;br /&gt;
		{&lt;br /&gt;
			CEGUI::String columnSequence = xmlAttributes.getValueAsString(mclColumnSequenceAttribute);&lt;br /&gt;
			Tokenize(columnSequence, config.columnSequence, mclColumnSequenceSeparator);&lt;br /&gt;
			monitoredAttributes.append(&amp;quot; &amp;quot;).append(mclColumnSequenceAttribute);&lt;br /&gt;
		}&lt;br /&gt;
		if(xmlAttributes.exists(mclColumnWidthAttribute))&lt;br /&gt;
		{&lt;br /&gt;
			CEGUI::String columnWidths = xmlAttributes.getValueAsString(mclColumnWidthAttribute);&lt;br /&gt;
			Tokenize(columnWidths, config.columnWidths, mclColumnWidthSeparator);&lt;br /&gt;
			monitoredAttributes.append(&amp;quot; &amp;quot;).append(mclColumnWidthAttribute);&lt;br /&gt;
		}&lt;br /&gt;
		if(xmlAttributes.exists(mclSortedColumnAttribute))&lt;br /&gt;
		{&lt;br /&gt;
			config.sortedColumn = xmlAttributes.getValueAsInteger(mclSortedColumnAttribute);&lt;br /&gt;
			monitoredAttributes.append(&amp;quot; &amp;quot;).append(mclSortedColumnAttribute);&lt;br /&gt;
		}&lt;br /&gt;
		if(xmlAttributes.exists(mclAscendingSortAttribute))&lt;br /&gt;
		{&lt;br /&gt;
			config.sortAscending = xmlAttributes.getValueAsBool(mclAscendingSortAttribute);&lt;br /&gt;
			monitoredAttributes.append(&amp;quot; &amp;quot;).append(mclAscendingSortAttribute);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		_setMultiColumnListAttributesMonitored(name, monitoredAttributes);&lt;br /&gt;
		m_multiColumnListConfigurations[name] = config;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void DialogConfigurations::_setDialogAttributesMonitored(const CEGUI::String&amp;amp; dialog, const CEGUI::String&amp;amp; attributesMonitored)&lt;br /&gt;
{&lt;br /&gt;
	// Validate the attributes to be monitored&lt;br /&gt;
	std::vector&amp;lt;CEGUI::String&amp;gt; newAttributes;&lt;br /&gt;
	std::vector&amp;lt;CEGUI::String&amp;gt; listAttributesMonitored;&lt;br /&gt;
	Tokenize(attributesMonitored, listAttributesMonitored); // Convert attributesMonitored into a vector&lt;br /&gt;
	std::vector&amp;lt;CEGUI::String&amp;gt;::iterator itToken;&lt;br /&gt;
	for(itToken = listAttributesMonitored.begin(); itToken != listAttributesMonitored.end(); itToken++)&lt;br /&gt;
	{&lt;br /&gt;
		if(!(*itToken).compare(monitoredAttributeAll))&lt;br /&gt;
		{&lt;br /&gt;
			newAttributes.push_back(windowPosAttribute);&lt;br /&gt;
			newAttributes.push_back(windowVisibleAttribute);&lt;br /&gt;
			newAttributes.push_back(windowRolledupAttribute);&lt;br /&gt;
		}&lt;br /&gt;
		else if(!(*itToken).compare(monitoredAttributeNone))&lt;br /&gt;
		{&lt;br /&gt;
			newAttributes.clear();&lt;br /&gt;
		}&lt;br /&gt;
		else if(!(*itToken).compare(windowPosAttribute))&lt;br /&gt;
			newAttributes.push_back(windowPosAttribute);&lt;br /&gt;
		else if(!(*itToken).compare(windowVisibleAttribute))&lt;br /&gt;
			newAttributes.push_back(windowVisibleAttribute);&lt;br /&gt;
		else if(!(*itToken).compare(windowRolledupAttribute))&lt;br /&gt;
			newAttributes.push_back(windowRolledupAttribute);&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			// Attribute is not supported&lt;br /&gt;
			assert(false &amp;amp;&amp;amp; &amp;quot;Unsupported attribute specified for a dialog&amp;quot;);&lt;br /&gt;
			CEGUI::Logger::getSingleton().logEvent(&amp;quot;The attribute \&amp;quot;&amp;quot;&lt;br /&gt;
													+ (*itToken)&lt;br /&gt;
													+ &amp;quot;\&amp;quot; is unsupported for dialogs.&amp;quot;,&lt;br /&gt;
													CEGUI::Errors);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	// Store the attributes to be monitored&lt;br /&gt;
	m_attributesMonitoredDialog[dialog] = newAttributes;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void DialogConfigurations::_setMultiColumnListAttributesMonitored(const CEGUI::String&amp;amp; multiColumnList, const CEGUI::String&amp;amp; attributesMonitored)&lt;br /&gt;
{&lt;br /&gt;
	// Validate the attributes to be monitored&lt;br /&gt;
	std::vector&amp;lt;CEGUI::String&amp;gt; newAttributes;&lt;br /&gt;
	std::vector&amp;lt;CEGUI::String&amp;gt; listAttributesMonitored;&lt;br /&gt;
	Tokenize(attributesMonitored, listAttributesMonitored); // Convert attributesMonitored into a vector&lt;br /&gt;
	std::vector&amp;lt;CEGUI::String&amp;gt;::iterator itToken;&lt;br /&gt;
	for(itToken = listAttributesMonitored.begin(); itToken != listAttributesMonitored.end(); itToken++)&lt;br /&gt;
	{&lt;br /&gt;
		if(!(*itToken).compare(monitoredAttributeAll))&lt;br /&gt;
		{&lt;br /&gt;
			newAttributes.push_back(mclColumnSequenceAttribute);&lt;br /&gt;
			newAttributes.push_back(mclSortedColumnAttribute);&lt;br /&gt;
			newAttributes.push_back(mclAscendingSortAttribute);&lt;br /&gt;
			newAttributes.push_back(mclColumnWidthAttribute);&lt;br /&gt;
		}&lt;br /&gt;
		else if(!(*itToken).compare(monitoredAttributeNone))&lt;br /&gt;
		{&lt;br /&gt;
			newAttributes.clear();&lt;br /&gt;
		}&lt;br /&gt;
		else if(!(*itToken).compare(mclColumnSequenceAttribute))&lt;br /&gt;
			newAttributes.push_back(mclColumnSequenceAttribute);&lt;br /&gt;
		else if(!(*itToken).compare(mclSortedColumnAttribute))&lt;br /&gt;
			newAttributes.push_back(mclSortedColumnAttribute);&lt;br /&gt;
		else if(!(*itToken).compare(mclAscendingSortAttribute))&lt;br /&gt;
			newAttributes.push_back(mclAscendingSortAttribute);&lt;br /&gt;
		else if(!(*itToken).compare(mclColumnWidthAttribute))&lt;br /&gt;
			newAttributes.push_back(mclColumnWidthAttribute);&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			// Attribute is not supported&lt;br /&gt;
			assert(false &amp;amp;&amp;amp; &amp;quot;Unsupported attribute specified for a MultiColumnList&amp;quot;);&lt;br /&gt;
			CEGUI::Logger::getSingleton().logEvent(&amp;quot;The attribute \&amp;quot;&amp;quot;&lt;br /&gt;
													+ (*itToken)&lt;br /&gt;
													+ &amp;quot;\&amp;quot; is unsupported for MultiColumnLists.&amp;quot;,&lt;br /&gt;
													CEGUI::Errors);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	// Store the attributes to be monitored&lt;br /&gt;
	m_attributesMonitoredMultiColumnList[multiColumnList] = newAttributes;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== DialogConfigurationsDemo.h ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
#ifndef _DialogConfigurationsDemo_h_&lt;br /&gt;
#define _DialogConfigurationsDemo_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;
#include &amp;quot;DialogConfigurations.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;DialogConfigurations.layout&amp;quot;);&lt;br /&gt;
			sheet-&amp;gt;addChildWindow(guiLayout);&lt;br /&gt;
&lt;br /&gt;
			// Configure the toolbar&lt;br /&gt;
			winMgr.getWindow(&amp;quot;DialogConfigurations/Toolbar/ShowA&amp;quot;)-&amp;gt;subscribeEvent(PushButton::EventClicked, Event::Subscriber(&amp;amp;DemoSample::showA, this));&lt;br /&gt;
			winMgr.getWindow(&amp;quot;DialogConfigurations/Toolbar/ShowC&amp;quot;)-&amp;gt;subscribeEvent(PushButton::EventClicked, Event::Subscriber(&amp;amp;DemoSample::showC, this));&lt;br /&gt;
			winMgr.getWindow(&amp;quot;DialogConfigurations/Toolbar/ShowD&amp;quot;)-&amp;gt;subscribeEvent(PushButton::EventClicked, Event::Subscriber(&amp;amp;DemoSample::showD, this));&lt;br /&gt;
&lt;br /&gt;
			// Activate the close buttons&lt;br /&gt;
			winMgr.getWindow(&amp;quot;DialogConfigurations/Window_A&amp;quot;)-&amp;gt;subscribeEvent(FrameWindow::EventCloseClicked, Event::Subscriber(&amp;amp;DemoSample::closeA, this));&lt;br /&gt;
			winMgr.getWindow(&amp;quot;DialogConfigurations/Window_B&amp;quot;)-&amp;gt;subscribeEvent(FrameWindow::EventCloseClicked, Event::Subscriber(&amp;amp;DemoSample::closeB, this));&lt;br /&gt;
			winMgr.getWindow(&amp;quot;DialogConfigurations/Window_C&amp;quot;)-&amp;gt;subscribeEvent(FrameWindow::EventCloseClicked, Event::Subscriber(&amp;amp;DemoSample::closeC, this));&lt;br /&gt;
			winMgr.getWindow(&amp;quot;DialogConfigurations/Window_D&amp;quot;)-&amp;gt;subscribeEvent(FrameWindow::EventCloseClicked, Event::Subscriber(&amp;amp;DemoSample::closeD, this));&lt;br /&gt;
&lt;br /&gt;
			// Add columns to the MultiColumnList&lt;br /&gt;
			MultiColumnList* multiColumnList = static_cast&amp;lt;MultiColumnList*&amp;gt;(winMgr.getWindow(&amp;quot;DialogConfigurations/Window_D/MultiColumnList&amp;quot;));&lt;br /&gt;
			multiColumnList-&amp;gt;addColumn(&amp;quot;Col A&amp;quot;, 0, UDim(0.32f, 0));&lt;br /&gt;
			multiColumnList-&amp;gt;addColumn(&amp;quot;Col B&amp;quot;, 1, UDim(0.32f, 0));&lt;br /&gt;
			multiColumnList-&amp;gt;addColumn(&amp;quot;Col C&amp;quot;, 2, UDim(0.32f, 0));&lt;br /&gt;
&lt;br /&gt;
			// Add rows&lt;br /&gt;
			multiColumnList-&amp;gt;addRow();&lt;br /&gt;
			multiColumnList-&amp;gt;setItem(new ListboxTextItem(&amp;quot;1&amp;quot;, 101), 0, 0); // ColumnID, RowID&lt;br /&gt;
			multiColumnList-&amp;gt;setItem(new ListboxTextItem(&amp;quot;4&amp;quot;, 102), 1, 0);&lt;br /&gt;
			multiColumnList-&amp;gt;setItem(new ListboxTextItem(&amp;quot;7&amp;quot;, 103), 2, 0);&lt;br /&gt;
			multiColumnList-&amp;gt;addRow();&lt;br /&gt;
			multiColumnList-&amp;gt;setItem(new ListboxTextItem(&amp;quot;4&amp;quot;, 201), 0, 1);&lt;br /&gt;
			multiColumnList-&amp;gt;setItem(new ListboxTextItem(&amp;quot;7&amp;quot;, 202), 1, 1);&lt;br /&gt;
			multiColumnList-&amp;gt;setItem(new ListboxTextItem(&amp;quot;1&amp;quot;, 203), 2, 1);&lt;br /&gt;
			multiColumnList-&amp;gt;addRow();&lt;br /&gt;
			multiColumnList-&amp;gt;setItem(new ListboxTextItem(&amp;quot;7&amp;quot;, 301), 0, 2);&lt;br /&gt;
			multiColumnList-&amp;gt;setItem(new ListboxTextItem(&amp;quot;1&amp;quot;, 302), 1, 2);&lt;br /&gt;
			multiColumnList-&amp;gt;setItem(new ListboxTextItem(&amp;quot;4&amp;quot;, 303), 2, 2);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
			// Activate dialog configurations&lt;br /&gt;
			m_DialogConfigurations.loadConfigurations(&amp;quot;DialogConfigurations.xml&amp;quot;);&lt;br /&gt;
			m_DialogConfigurations.addDialog(&amp;quot;DialogConfigurations/Window_A&amp;quot;, &amp;quot;Position Visible&amp;quot;);&lt;br /&gt;
			m_DialogConfigurations.addDialog(&amp;quot;DialogConfigurations/Window_B&amp;quot;, &amp;quot;Position RolledUp&amp;quot;);&lt;br /&gt;
			m_DialogConfigurations.addDialog(&amp;quot;DialogConfigurations/Window_C&amp;quot;, &amp;quot;Visible RolledUp&amp;quot;);&lt;br /&gt;
			m_DialogConfigurations.addDialog(&amp;quot;DialogConfigurations/Window_D&amp;quot;); // Saves every attribute: Position, Visible, and RolledUp&lt;br /&gt;
			m_DialogConfigurations.addMultiColumnList(&amp;quot;DialogConfigurations/Window_D/MultiColumnList&amp;quot;); // Saves every attribute: ColumnSequence, ColumnWidths, SortedColumn, and AscendingSort&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;
		m_DialogConfigurations.saveConfigurations();&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool showA(const CEGUI::EventArgs&amp;amp; e)&lt;br /&gt;
	{&lt;br /&gt;
		CEGUI::WindowManager::getSingleton().getWindow(&amp;quot;DialogConfigurations/Window_A&amp;quot;)-&amp;gt;setVisible(true);&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool showC(const CEGUI::EventArgs&amp;amp; e)&lt;br /&gt;
	{&lt;br /&gt;
		CEGUI::WindowManager::getSingleton().getWindow(&amp;quot;DialogConfigurations/Window_C&amp;quot;)-&amp;gt;setVisible(true);&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool showD(const CEGUI::EventArgs&amp;amp; e)&lt;br /&gt;
	{&lt;br /&gt;
		CEGUI::WindowManager::getSingleton().getWindow(&amp;quot;DialogConfigurations/Window_D&amp;quot;)-&amp;gt;setVisible(true);&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool closeA(const CEGUI::EventArgs&amp;amp; e)&lt;br /&gt;
	{&lt;br /&gt;
		CEGUI::WindowManager::getSingleton().getWindow(&amp;quot;DialogConfigurations/Window_A&amp;quot;)-&amp;gt;setVisible(false);&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool closeB(const CEGUI::EventArgs&amp;amp; e)&lt;br /&gt;
	{&lt;br /&gt;
		CEGUI::WindowManager::getSingleton().getWindow(&amp;quot;DialogConfigurations/Window_B&amp;quot;)-&amp;gt;setVisible(false);&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool closeC(const CEGUI::EventArgs&amp;amp; e)&lt;br /&gt;
	{&lt;br /&gt;
		CEGUI::WindowManager::getSingleton().getWindow(&amp;quot;DialogConfigurations/Window_C&amp;quot;)-&amp;gt;setVisible(false);&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool closeD(const CEGUI::EventArgs&amp;amp; e)&lt;br /&gt;
	{&lt;br /&gt;
		CEGUI::WindowManager::getSingleton().getWindow(&amp;quot;DialogConfigurations/Window_D&amp;quot;)-&amp;gt;setVisible(false);&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
private:&lt;br /&gt;
	DialogConfigurations m_DialogConfigurations;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#endif // _DialogConfigurationsDemo_h_&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== main.cpp ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&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;DialogConfigurationsDemo.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;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== DialogConfigurations.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;DialogConfigurations&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/StaticText&amp;quot; Name=&amp;quot;DialogConfigurations/Toolbar&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.1875,0},{0.00833335,0},{0.8025,0},{0.111667,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/Button&amp;quot; Name=&amp;quot;DialogConfigurations/Toolbar/ShowA&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Show A&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.0581303,0},{0.156452,0},{0.30813,0},{0.858064,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;DialogConfigurations/Toolbar/ShowC&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;Show C&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.388618,0},{0.156452,0},{0.638618,0},{0.858064,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;DialogConfigurations/Toolbar/ShowD&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;Show D&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.704878,0},{0.156452,0},{0.954878,0},{0.858064,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 Type=&amp;quot;TaharezLook/FrameWindow&amp;quot; Name=&amp;quot;DialogConfigurations/Window_A&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;A - RolledUp not saved&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;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.035,0},{0.123333,0},{0.325,0},{0.47,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;/Window&amp;gt;&lt;br /&gt;
        &amp;lt;Window Type=&amp;quot;TaharezLook/FrameWindow&amp;quot; Name=&amp;quot;DialogConfigurations/Window_B&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;B - Visible not saved&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;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.35125,0},{0.123333,0},{0.64125,0},{0.47,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;/Window&amp;gt;&lt;br /&gt;
        &amp;lt;Window Type=&amp;quot;TaharezLook/FrameWindow&amp;quot; Name=&amp;quot;DialogConfigurations/Window_C&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;C - Position &amp;amp;amp; Size not saved&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;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.6675,0},{0.123333,0},{0.957501,0},{0.47,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;/Window&amp;gt;&lt;br /&gt;
        &amp;lt;Window Type=&amp;quot;TaharezLook/FrameWindow&amp;quot; Name=&amp;quot;DialogConfigurations/Window_D&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;D Saves MultiColumnList column width, sequence, and sort&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;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.10625,0},{0.53375,0},{0.86625,0},{0.962083,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/MultiColumnList&amp;quot; Name=&amp;quot;DialogConfigurations/Window_D/MultiColumnList&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.031235,0},{0.140467,0},{0.968886,0},{0.950778,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>Rackle</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=Sample_code_for_all_Widgets&amp;diff=2826</id>
		<title>Sample code for all Widgets</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=Sample_code_for_all_Widgets&amp;diff=2826"/>
				<updated>2008-02-01T13:08:23Z</updated>
		
		<summary type="html">&lt;p&gt;Rackle: /* WidgetGalore.h */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This code goes through every widget and demonstrates how to retrieve and set their data as well as some of their particularities.  Please post comments or questions on the message board thread for the [http://www.cegui.org.uk/phpBB2/viewtopic.php?p=7967#7967 Widget Galore]&lt;br /&gt;
&lt;br /&gt;
=== Widgets===&lt;br /&gt;
&lt;br /&gt;
==== General ====&lt;br /&gt;
A widget can be enabled/disabled via setEnabled().  Disabling a widget prevents the user from activating it and manipulating its contents.  A widget can be hidden/shown via setVisible().&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Tooltip ====&lt;br /&gt;
A Tooltip widget displays text when the mouse has been hovering over a widget for a certain amount of time.  This widget requires that time be injected within CEGUI via injectTimePulse().&lt;br /&gt;
&lt;br /&gt;
The graphical aspect (the scheme) of the tooltip can be specified via setTooltip().  The amount of hovering time required to activate the tooltip can be specified via setHoverTime().  The amount of time the tooltip is displayed can be specified via setDisplayTime().  And the fade transition time can be specified via setFadeTime(); this affects both the fade in and the fade out times.  The tooltip text of a widget can be specified via setTooltipText().  Please note that some complex widgets are composed of several widgets.  In order to have a tooltip text displayed while hovering over any region of the complex widget then every component widget needs to have a tooltip text specified.  For example a Spinner widget is composed of an Editbox widget and two Button widgets. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== StaticText ====&lt;br /&gt;
There is no StaticText within Cegui but type of widget can be obtained via the DefaultWindow class.&lt;br /&gt;
&lt;br /&gt;
The currently displayed text can be specified via setText().  The color of this text can be specified via the &amp;quot;TextColours&amp;quot; property.  The value of this property contains 4 color definitions: top left, top right, bottom left, and bottom right.  Each color is specified as a two-digit hexadecimal value of the format AARRGGBB (alpha, red, green, blue).  The text is aligned vertically via the &amp;quot;VertFormatting&amp;quot; property with a value of TopAligned, BottomAligned, or VertCentred.  The text is aligned horizontally via the &amp;quot;HorzFormatting&amp;quot; property with a value of LeftAligned, RightAligned, HorzCentred, HorzJustified, WordWrapLeftAligned, WordWrapRightAligned, WordWrapCentred, or WordWrapJustified.&lt;br /&gt;
&lt;br /&gt;
==== StaticImage ====&lt;br /&gt;
There is no StaticImage within Cegui but type of widget can be obtained via the DefaultWindow class.&lt;br /&gt;
&lt;br /&gt;
The currently displayed image can be specified via the &amp;quot;Image&amp;quot; property.  This property takes two parameters, the imageset (&amp;quot;set&amp;quot;) and the image name (&amp;quot;image&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
==== ProgressBar ====&lt;br /&gt;
A ProgressBar widget displays a progression; it does not receive inputs from a user.&lt;br /&gt;
&lt;br /&gt;
The current progress can be specified via setProgress().  Progress can be advanced through steps.  The step size can be specified via setStepSize() and a step performed via step().  Progress can be adjusted by a delta value via adjustProgress().  The current progress value can be obtained via getProgress().&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Button ====&lt;br /&gt;
A Button widget displays a text and receives an activation instruction from the user.&lt;br /&gt;
&lt;br /&gt;
The text can be specified via setText().&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== ScrollablePane ====&lt;br /&gt;
A ScrollablePane widget displays contents that can be scrolled.  Contents can be added via addChildWindow().  When that content exceeds the dimensions of the ScrollablePane then scrollbars appear to allow the use to view and interact with that hidden content.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Checkbox ====&lt;br /&gt;
A Checkbox widget controls a boolean value; true when checked and false when unchecked.  This value can be obtained via isSelected() and specified via setSelected(true) to check or setSelected(false) to uncheck.&lt;br /&gt;
&lt;br /&gt;
==== Spinner ====&lt;br /&gt;
A Spinner widget controls a numerical values (float) through an editbox or the use of the increment or decrement buttons.&lt;br /&gt;
&lt;br /&gt;
This value is bounded within a minimum and a maximum by calling setMinimumValue() and setMaximumValue().  The arrow buttons increment or decrement the value by the amount specified with setStepSize().  The numerical value can be displayed in four formats:  FloatingPoint, Integer, Hexadecimal, Octal.  &lt;br /&gt;
&lt;br /&gt;
The current value is obtained via getCurrentValue() and specified via setCurrentValue().&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Editbox ====&lt;br /&gt;
An Editbox widget controls printable character values; letters, numbers, punctuations, and symbols.  &lt;br /&gt;
&lt;br /&gt;
The maximal number of characters that can be specified is bound by setMaxTextLength().  The value can be set to readable only (modifications by users are not allowed) via setReadOnly(true).  The value can be masked via setTextMasked() and the default value of * can be modified via setMaskCodePoint().&lt;br /&gt;
&lt;br /&gt;
The current value can be obtained via getText() and specified via setText().&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Slider ====&lt;br /&gt;
A Slider widget controls a numerical value (float) through the position of a &amp;quot;thumb&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This value is bounded within a maximum by setMaxValue(); the minimum value is set to 0.0f.  The thumb can be dragged to the desired position or moved by clicking on either side of the thumb.  The increment or decrement value is set by setClickStep().&lt;br /&gt;
&lt;br /&gt;
The current value can be obtained via getCurrentValue() and specified via setCurrentValue().&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Scrollbar ====&lt;br /&gt;
A Scrollbar widget controls a numerical value (float) through the position of a &amp;quot;thumb&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This value is bounded within a maximum by setDocumentSize(); the minimum value is set to 0.0f.  The thumb can be dragged to the desired position or moved by clicking on either side of the thumb.  The increment or decrement value is set by setPageSize().  The arrow buttons increment or decrement the value by the amount specified with setStepSize().&lt;br /&gt;
&lt;br /&gt;
The current value can be obtained via getScrollPosition() and specified via setScrollPosition().  Note that the actual maximum value that the scrollbar will return is set by the following formula: document_size - page_size.  Thus, a document of size 100 and a page size of 10 will have a value from 0 to 90.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== MultiLineEditbox ====&lt;br /&gt;
A MultiLineEditbox widget controls printable character values; letters, numbers, punctuations, and symbols.&lt;br /&gt;
&lt;br /&gt;
Unlike the Editbox widget there is no maximal number of characters that can be specified.  The value can be set to readable only (modifications by users are not allowed) via setReadOnly(true).  Text can be automatically wrapped via a call to setWordWrapping(true).&lt;br /&gt;
&lt;br /&gt;
The current value can be obtained via getText() and specified via setText().&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== RadioButton ====&lt;br /&gt;
A RadioButton widget controls a single selection among many choices.&lt;br /&gt;
&lt;br /&gt;
The choices are grouped by calling setGroupID().  Only one RadioButton per group ID can be selected; this widget does not support multiple selection.  However it is possible for a choice to possess no decision; initially every RadioButton of a group is unselected.&lt;br /&gt;
&lt;br /&gt;
The currently selected RadioButton can be obtained via getSelectedButtonInGroup().  This RadioButton pointer can then be used to query the ID via getID(), the text (visible label of the RadioButton) via getText(), or user data via getUserData().  A RadioButton can be selected via setSelected(true).  Passing false will deselect the RadioButton, potentially making every RadioButton of the group unselected.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Listbox ====&lt;br /&gt;
A Listbox widget controls either a single selection or multiple selections among many choices.  Multiple selections are enabled via setMultiselectEnabled().&lt;br /&gt;
&lt;br /&gt;
The choices are listbox text items (ListboxTextItem) added to the listbox via addItem().  These do not possess a selection indicator by default; one must be specified via setSelectionBrushImage().  The call to ensureItemIsVisible() ensures that the item is visible; the listbox will automatically scroll down if necessary.  The text of the ListboxTextItem can be changed via the setText() function.  However this new text will not be displayed until you call the Listbox's handleUpdatedItemData() function.&lt;br /&gt;
&lt;br /&gt;
The selected ListboxItem can be obtained via getFirstSelectedItem() and subsequent selections through getNextSelected().  A selection can be specified via setItemSelectState().&lt;br /&gt;
&lt;br /&gt;
==== Combobox ====&lt;br /&gt;
A Combobox widget controls a single selection among many choices.&lt;br /&gt;
&lt;br /&gt;
The choices are listbox text items (ListboxTextItem) added to the combobox via addItem().  These do not possess a selection indicator by default; one must be specified via setSelectionBrushImage().&lt;br /&gt;
&lt;br /&gt;
The value of the text within the Editbox can be obtained via getText() and the last selected ListboxItem can be obtained via getSelectedItem().  However there is no guarantee that both are synchronized; typing text within the Editbox will not automatically select the corresponding ListboxItem.  Fortunately the reverse is not true; selecting a ListboxItem will place that text within the Editbox.  Placing the Editbox in read-only mode with setReadOnly(true) can avoid problems.  The current value can be specified via listboxTextItem-&amp;gt;setSelected(true) and a setText(itemCombobox-&amp;gt;getText()).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== MultiColumnList ====&lt;br /&gt;
A MultiColumnList widget controls controls either a single selection or multiple selections among many choices.  Multiple selections are enabled via setSelectionMode(MultiColumnList::RowMultiple).&lt;br /&gt;
&lt;br /&gt;
A MultiColumnList widget may contain a single column or multiple columns.  Columns are added via addColumn(), specifying a label, a column ID, and a column width.&lt;br /&gt;
&lt;br /&gt;
Three steps are required to add a row.  The first step is to add a new row with addRow().  The second step is to create a ListboxTextItem for each cell of the row and specify the selection indicator via setSelectionBrushImage().  The third step is to add the newly created ListboxTextItem to the MultiColumnList via setItem(), specifying the ListboxTextItem, the column ID, and the row ID.&lt;br /&gt;
&lt;br /&gt;
The selected row can be obtained via getFirstSelectedItem() and subsequent selections through getNextSelected().  This will iterate through every selected cell, returning each selected ListboxTextItem .  A selection can be specified via setItemSelectState(); by setting the selection mode to rows (either RowSingle or RowMultiple) you actually only need to select the ListboxTextItem of the first column.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== TabControl ====&lt;br /&gt;
A TabControl widget allows multiple windows to be displayed one at a time, via tab buttons.&lt;br /&gt;
&lt;br /&gt;
Two objects must be created within the Layout Editor to generate a functional tab control.  The first is a window of type &amp;quot;TabControl&amp;quot;.  This will be the parent window of the tab buttons as well as the pages.  The second is a window of type &amp;quot;DefaultWindow&amp;quot;.  This window will be placed within the TabControl (in code via addTab(), not through the Layout Editor) and will specify the contents of a page.  Widgets are to be placed within these TabPane via the Layout Editor.  The &amp;quot;TabButton&amp;quot; windows are not to be specified via the Layout Editor since they will be automatically created when a TabPane is added to the TabControl.&lt;br /&gt;
&lt;br /&gt;
In this demo the TabControl widget was placed within a FrameWindow.  This is not a requirement.  It could have just easily been placed alongside the widgets of the other window.&lt;br /&gt;
&lt;br /&gt;
==== Menu &amp;amp; Popup Menu ====&lt;br /&gt;
&lt;br /&gt;
See [[http://www.cegui.org.uk/wiki/index.php/MenuAndPopup Menu &amp;amp; Popup Menu]]&lt;br /&gt;
&lt;br /&gt;
=== Files ===&lt;br /&gt;
&lt;br /&gt;
==== WidgetGalore.h ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
#ifndef _WidgetGalore_h_&lt;br /&gt;
#define _WidgetGalore_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;
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;WidgetGalore.layout&amp;quot;);&lt;br /&gt;
			sheet-&amp;gt;addChildWindow(guiLayout);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
			/* Tooltip */&lt;br /&gt;
			System::getSingleton().setDefaultTooltip(&amp;quot;TaharezLook/Tooltip&amp;quot;); // Set the name of the default tooltip&lt;br /&gt;
			Tooltip* tooltip = System::getSingleton().getDefaultTooltip();&lt;br /&gt;
			tooltip-&amp;gt;setHoverTime(0.5f); // Display the tooltip after the mouse has been hovering over the widget for half a second&lt;br /&gt;
			tooltip-&amp;gt;setDisplayTime(10.0f); // Display for 15 seconds then disappear&lt;br /&gt;
			tooltip-&amp;gt;setFadeTime(1.0f); // Duration of the transition between fully visible and fully invisible&lt;br /&gt;
			// To set the tooltip text for a window simply call setTooltipText()   see staticText for an example&lt;br /&gt;
&lt;br /&gt;
			/* StaticText */&lt;br /&gt;
			DefaultWindow* staticText = static_cast&amp;lt;DefaultWindow*&amp;gt;(winMgr.getWindow(&amp;quot;StaticText&amp;quot;));&lt;br /&gt;
			staticText-&amp;gt;setText(&amp;quot;Red Static Text&amp;quot;);&lt;br /&gt;
			staticText-&amp;gt;setProperty(&amp;quot;TextColours&amp;quot;, &amp;quot;tl:FFFF0000 tr:FFFF0000 bl:FFFF0000 br:FFFF0000&amp;quot;); // aarrggbb in Hexadecimal&lt;br /&gt;
				// tl: top left,  tr: top right,  bl: bottom left,  br: bottom right&lt;br /&gt;
			staticText-&amp;gt;setProperty(&amp;quot;VertFormatting&amp;quot;, &amp;quot;VertCentred&amp;quot;); // TopAligned, BottomAligned, VertCentred&lt;br /&gt;
			staticText-&amp;gt;setProperty(&amp;quot;HorzFormatting&amp;quot;, &amp;quot;HorzCentred&amp;quot;); // LeftAligned, RightAligned, HorzCentred&lt;br /&gt;
				// HorzJustified, WordWrapLeftAligned, WordWrapRightAligned, WordWrapCentred, WordWrapJustified&lt;br /&gt;
			staticText-&amp;gt;setTooltipText(&amp;quot;This is a StaticText widget&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			/* StaticImage */&lt;br /&gt;
			ImagesetManager::getSingleton().createImagesetFromImageFile(&amp;quot;ImageForStaticImage&amp;quot;, &amp;quot;GPN-2000-001437.tga&amp;quot;);&lt;br /&gt;
			DefaultWindow* staticImage = static_cast&amp;lt;DefaultWindow*&amp;gt;(winMgr.getWindow(&amp;quot;StaticImage&amp;quot;));&lt;br /&gt;
			staticImage-&amp;gt;setProperty(&amp;quot;Image&amp;quot;, &amp;quot;set:ImageForStaticImage image:full_image&amp;quot;); // &amp;quot;full_image&amp;quot; is a default name from CEGUIImageset::Imageset()&lt;br /&gt;
&lt;br /&gt;
			/* ProgressBar */&lt;br /&gt;
			ProgressBar* progressBar = static_cast&amp;lt;ProgressBar*&amp;gt;(winMgr.getWindow(&amp;quot;ProgressBar&amp;quot;));&lt;br /&gt;
			progressBar-&amp;gt;setProgress(0.25f); // Initial progress of 25%&lt;br /&gt;
			progressBar-&amp;gt;setStepSize(0.10f); // Calling step() will increase the progress by 10%&lt;br /&gt;
			progressBar-&amp;gt;step(); // Advance the progress by the size specified in setStepSize()&lt;br /&gt;
			progressBar-&amp;gt;adjustProgress(-0.05f); // Adjust the progress by a delta value rather than setting a new value through setProgress&lt;br /&gt;
			float valueProgressBar = progressBar-&amp;gt;getProgress(); // initial 0.25f + step 0.10f - adjustment 0.05f = 0.30f&lt;br /&gt;
&lt;br /&gt;
			/* Button */&lt;br /&gt;
			PushButton* btnClose = static_cast&amp;lt;PushButton*&amp;gt;(winMgr.getWindow(&amp;quot;btnClose&amp;quot;));&lt;br /&gt;
			btnClose-&amp;gt;setText(&amp;quot;Exit&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			/* ScrollablePane */&lt;br /&gt;
			ScrollablePane* scrollablePane = static_cast&amp;lt;ScrollablePane*&amp;gt;(winMgr.getWindow(&amp;quot;ScrollablePane&amp;quot;));&lt;br /&gt;
			ImagesetManager::getSingleton().createImagesetFromImageFile(&amp;quot;ImageForScrollablePane&amp;quot;, &amp;quot;GPN-2000-001437.tga&amp;quot;);&lt;br /&gt;
			DefaultWindow* staticImageInScrollablePane = static_cast&amp;lt;DefaultWindow*&amp;gt;(winMgr.createWindow(&amp;quot;TaharezLook/StaticImage&amp;quot;, &amp;quot;StaticImageInScrollablePane&amp;quot;));&lt;br /&gt;
				staticImageInScrollablePane-&amp;gt;setProperty(&amp;quot;Image&amp;quot;, &amp;quot;set:ImageForScrollablePane image:full_image&amp;quot;); // &amp;quot;full_image&amp;quot; is a default name from CEGUIImageset::Imageset()&lt;br /&gt;
				staticImageInScrollablePane-&amp;gt;setPosition(UVector2(UDim(0.0f, 0.0f), UDim(0.0f, 0.0f))); // Start in the upper left corner&lt;br /&gt;
				staticImageInScrollablePane-&amp;gt;setWidth(UDim(2.0f, 0.0f)); // Twice the width of the parent, the ScrollablePane&lt;br /&gt;
				staticImageInScrollablePane-&amp;gt;setHeight(UDim(2.0f, 0.0f)); // Twice the height of the parent, the ScrollablePane&lt;br /&gt;
				scrollablePane-&amp;gt;addChildWindow(staticImageInScrollablePane); // Add the image to the // Twice the width of the parent, the ScrollablePane&lt;br /&gt;
			Editbox* editboxInScrollablePane = static_cast&amp;lt;Editbox*&amp;gt;(winMgr.createWindow(&amp;quot;TaharezLook/Editbox&amp;quot;, &amp;quot;EditboxInScrollablePane&amp;quot;));&lt;br /&gt;
				editboxInScrollablePane-&amp;gt;setPosition(UVector2(UDim(0.0f, 0.0f), UDim(2.1f, 0.0f))); // Start below the image&lt;br /&gt;
				editboxInScrollablePane-&amp;gt;setWidth(UDim(2.0f, 0.0f)); &lt;br /&gt;
				editboxInScrollablePane-&amp;gt;setHeight(UDim(0.3f, 0.0f));&lt;br /&gt;
				scrollablePane-&amp;gt;addChildWindow(editboxInScrollablePane);&lt;br /&gt;
&lt;br /&gt;
			/* Check box */&lt;br /&gt;
			Checkbox* checkbox = static_cast&amp;lt;Checkbox*&amp;gt;(winMgr.getWindow(&amp;quot;Checkbox&amp;quot;));&lt;br /&gt;
			checkbox-&amp;gt;setSelected( true );&lt;br /&gt;
			bool valueCheckbox = checkbox-&amp;gt;isSelected(); // Retrieve whether it is checked&lt;br /&gt;
&lt;br /&gt;
			/* 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;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.2f);&lt;br /&gt;
			spinner-&amp;gt;setCurrentValue(5.2f);&lt;br /&gt;
			float valueSpinner = spinner-&amp;gt;getCurrentValue(); // Retrieve the value&lt;br /&gt;
&lt;br /&gt;
			/* Editbox */&lt;br /&gt;
			Editbox* editbox = static_cast&amp;lt;Editbox*&amp;gt;(winMgr.getWindow(&amp;quot;Editbox&amp;quot;));&lt;br /&gt;
			editbox-&amp;gt;setText(&amp;quot;Editbox values&amp;quot;);&lt;br /&gt;
			editbox-&amp;gt;setMaxTextLength(13); // The trailing 's' will not be displayed&lt;br /&gt;
			editbox-&amp;gt;setReadOnly(false);&lt;br /&gt;
			editbox-&amp;gt;setTextMasked(false);&lt;br /&gt;
			editbox-&amp;gt;setMaskCodePoint(0x002A); // *&lt;br /&gt;
			String valueEditbox = editbox-&amp;gt;getText(); // Retrieve the text&lt;br /&gt;
&lt;br /&gt;
			/* Slider */&lt;br /&gt;
			Slider* slider = static_cast&amp;lt;Slider*&amp;gt;(winMgr.getWindow(&amp;quot;Slider&amp;quot;));&lt;br /&gt;
			slider-&amp;gt;setMaxValue(100.0f);&lt;br /&gt;
			slider-&amp;gt;setClickStep(10.0f);&lt;br /&gt;
			slider-&amp;gt;setCurrentValue(20.0f);&lt;br /&gt;
			float valueSlider = slider-&amp;gt;getCurrentValue(); // Retrieve the value&lt;br /&gt;
&lt;br /&gt;
			/* Scrollbar (Horizontal) */&lt;br /&gt;
			Scrollbar* scrollbarHorizontal = static_cast&amp;lt;Scrollbar*&amp;gt;(winMgr.getWindow(&amp;quot;HorizontalScrollbar&amp;quot;));&lt;br /&gt;
			scrollbarHorizontal-&amp;gt;setDocumentSize(100.0f);&lt;br /&gt;
			scrollbarHorizontal-&amp;gt;setPageSize(10.0f);&lt;br /&gt;
			scrollbarHorizontal-&amp;gt;setStepSize(1.0f);&lt;br /&gt;
			scrollbarHorizontal-&amp;gt;setScrollPosition(75.0f);&lt;br /&gt;
			float valueScrollbarHorizontal = scrollbarHorizontal-&amp;gt;getScrollPosition(); // Retrieve the scroll position&lt;br /&gt;
&lt;br /&gt;
			/* Scrollbar (Vertical) */&lt;br /&gt;
			Scrollbar* scrollbarVertical = static_cast&amp;lt;Scrollbar*&amp;gt;(winMgr.getWindow(&amp;quot;VerticalScrollbar&amp;quot;));&lt;br /&gt;
			scrollbarVertical-&amp;gt;setDocumentSize(100.0f);&lt;br /&gt;
			scrollbarVertical-&amp;gt;setPageSize(10.0f);&lt;br /&gt;
			scrollbarVertical-&amp;gt;setStepSize(1.0f);&lt;br /&gt;
			scrollbarVertical-&amp;gt;setScrollPosition(25.0f);&lt;br /&gt;
			float valueScrollbarVertical = scrollbarVertical-&amp;gt;getScrollPosition(); // Retrieve the scroll position&lt;br /&gt;
&lt;br /&gt;
			/* MultiLineEditbox */&lt;br /&gt;
			MultiLineEditbox* multiLineEditbox = static_cast&amp;lt;MultiLineEditbox*&amp;gt;(winMgr.getWindow(&amp;quot;MultiLineEditbox&amp;quot;));&lt;br /&gt;
			multiLineEditbox-&amp;gt;setText(&amp;quot;MultiLineEditbox value&amp;quot;);&lt;br /&gt;
			multiLineEditbox-&amp;gt;setReadOnly(false);&lt;br /&gt;
			multiLineEditbox-&amp;gt;setWordWrapping(true);&lt;br /&gt;
			String valueMultiLineEditbox = multiLineEditbox-&amp;gt;getText(); // Retrieve the text&lt;br /&gt;
&lt;br /&gt;
			/* RadioButton */&lt;br /&gt;
			RadioButton* radioButton = static_cast&amp;lt;RadioButton*&amp;gt;(winMgr.getWindow(&amp;quot;RadioButton_A&amp;quot;));&lt;br /&gt;
				radioButton-&amp;gt;setGroupID(1);&lt;br /&gt;
				radioButton-&amp;gt;setID(101);&lt;br /&gt;
				radioButton-&amp;gt;setSelected(true);&lt;br /&gt;
			radioButton = static_cast&amp;lt;RadioButton*&amp;gt;(winMgr.getWindow(&amp;quot;RadioButton_B&amp;quot;));&lt;br /&gt;
				radioButton-&amp;gt;setGroupID(1);&lt;br /&gt;
				radioButton-&amp;gt;setID(102);&lt;br /&gt;
			radioButton = static_cast&amp;lt;RadioButton*&amp;gt;(winMgr.getWindow(&amp;quot;RadioButton_C&amp;quot;));&lt;br /&gt;
				radioButton-&amp;gt;setGroupID(1);&lt;br /&gt;
				radioButton-&amp;gt;setID(103);&lt;br /&gt;
			radioButton = static_cast&amp;lt;RadioButton*&amp;gt;(winMgr.getWindow(&amp;quot;RadioButton_1&amp;quot;));&lt;br /&gt;
				radioButton-&amp;gt;setGroupID(2);&lt;br /&gt;
				radioButton-&amp;gt;setID(201);&lt;br /&gt;
				radioButton-&amp;gt;setSelected(true);&lt;br /&gt;
			radioButton = static_cast&amp;lt;RadioButton*&amp;gt;(winMgr.getWindow(&amp;quot;RadioButton_2&amp;quot;));&lt;br /&gt;
				radioButton-&amp;gt;setGroupID(2);&lt;br /&gt;
				radioButton-&amp;gt;setID(202);&lt;br /&gt;
			radioButton = static_cast&amp;lt;RadioButton*&amp;gt;(winMgr.getWindow(&amp;quot;RadioButton_3&amp;quot;));&lt;br /&gt;
				radioButton-&amp;gt;setGroupID(2);&lt;br /&gt;
				radioButton-&amp;gt;setID(203);&lt;br /&gt;
			radioButton = static_cast&amp;lt;RadioButton*&amp;gt;(winMgr.getWindow(&amp;quot;RadioButton_A&amp;quot;)); // Get handle of one radio button from the group&lt;br /&gt;
			uint valueRadioButtonLetters = radioButton-&amp;gt;getSelectedButtonInGroup()-&amp;gt;getID(); // Get selected ID&lt;br /&gt;
			radioButton = static_cast&amp;lt;RadioButton*&amp;gt;(winMgr.getWindow(&amp;quot;RadioButton_3&amp;quot;)); // Can obtain the handle of any radio button in the group&lt;br /&gt;
			uint valueRadioButtonNumbers = radioButton-&amp;gt;getSelectedButtonInGroup()-&amp;gt;getID();&lt;br /&gt;
			radioButton-&amp;gt;setSelected(true); // Specify which button should appear selected by default&lt;br /&gt;
&lt;br /&gt;
			/* Listbox */&lt;br /&gt;
			Listbox* listbox = static_cast&amp;lt;Listbox*&amp;gt;(winMgr.getWindow(&amp;quot;Listbox&amp;quot;));&lt;br /&gt;
			listbox-&amp;gt;setMultiselectEnabled(false);&lt;br /&gt;
			ListboxTextItem* itemListbox = new ListboxTextItem(&amp;quot;Value A&amp;quot;, 1);&lt;br /&gt;
				itemListbox-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
				listbox-&amp;gt;addItem(itemListbox);&lt;br /&gt;
			itemListbox = new ListboxTextItem(&amp;quot;Value B&amp;quot;, 2);&lt;br /&gt;
				itemListbox-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
				listbox-&amp;gt;addItem(itemListbox);&lt;br /&gt;
			itemListbox = new ListboxTextItem(&amp;quot;Value C&amp;quot;, 3);&lt;br /&gt;
				itemListbox-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
				listbox-&amp;gt;addItem(itemListbox);&lt;br /&gt;
			itemListbox = new ListboxTextItem(&amp;quot;Value D&amp;quot;, 4);&lt;br /&gt;
				itemListbox-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
				listbox-&amp;gt;addItem(itemListbox);&lt;br /&gt;
			listbox-&amp;gt;setItemSelectState(itemListbox, true);&lt;br /&gt;
			listbox-&amp;gt;ensureItemIsVisible(itemListbox);&lt;br /&gt;
			uint valueListbox = listbox-&amp;gt;getFirstSelectedItem()-&amp;gt;getID(); // Retrieve the ID of the selected listbox item&lt;br /&gt;
&lt;br /&gt;
			/* Combobox */&lt;br /&gt;
			Combobox* combobox = static_cast&amp;lt;Combobox*&amp;gt;(winMgr.getWindow(&amp;quot;Combobox&amp;quot;));&lt;br /&gt;
			combobox-&amp;gt;setReadOnly(true);&lt;br /&gt;
			ListboxTextItem* itemCombobox = new ListboxTextItem(&amp;quot;Value 1&amp;quot;, 1);&lt;br /&gt;
				itemCombobox-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
				combobox-&amp;gt;addItem(itemCombobox);&lt;br /&gt;
			itemCombobox = new ListboxTextItem(&amp;quot;Value 2&amp;quot;, 2);&lt;br /&gt;
				itemCombobox-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
				combobox-&amp;gt;addItem(itemCombobox);&lt;br /&gt;
				itemCombobox-&amp;gt;setSelected(true); // Select this item&lt;br /&gt;
				combobox-&amp;gt;setText(itemCombobox-&amp;gt;getText()); // Copy the item's text into the Editbox&lt;br /&gt;
			itemCombobox = new ListboxTextItem(&amp;quot;Value 3&amp;quot;, 3);&lt;br /&gt;
				itemCombobox-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
				combobox-&amp;gt;addItem(itemCombobox);&lt;br /&gt;
			itemCombobox = new ListboxTextItem(&amp;quot;Value 4&amp;quot;, 4);&lt;br /&gt;
				itemCombobox-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
				combobox-&amp;gt;addItem(itemCombobox);&lt;br /&gt;
			String valueCombobox = combobox-&amp;gt;getText(); // Retrieve the displayed text&lt;br /&gt;
			uint idCombobox = combobox-&amp;gt;getSelectedItem()-&amp;gt;getID(); // Retrieve the ID of the selected combobox item&lt;br /&gt;
&lt;br /&gt;
			/* MultiColumnList */&lt;br /&gt;
			MultiColumnList* multiColumnList = static_cast&amp;lt;MultiColumnList*&amp;gt;(winMgr.getWindow(&amp;quot;MultiColumnList&amp;quot;));\&lt;br /&gt;
			multiColumnList-&amp;gt;addColumn(&amp;quot;Col A&amp;quot;, 0, UDim(0.32f, 0));&lt;br /&gt;
			multiColumnList-&amp;gt;addColumn(&amp;quot;Col B&amp;quot;, 1, UDim(0.32f, 0));&lt;br /&gt;
			multiColumnList-&amp;gt;addColumn(&amp;quot;Col C&amp;quot;, 2, UDim(0.32f, 0));&lt;br /&gt;
			multiColumnList-&amp;gt;setSelectionMode(MultiColumnList::RowSingle); // MultiColumnList::RowMultiple&lt;br /&gt;
			ListboxTextItem* itemMultiColumnList;&lt;br /&gt;
			multiColumnList-&amp;gt;addRow();&lt;br /&gt;
			itemMultiColumnList = new ListboxTextItem(&amp;quot;A1&amp;quot;, 101);&lt;br /&gt;
				itemMultiColumnList-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
				multiColumnList-&amp;gt;setItem(itemMultiColumnList, 0, 0); // ColumnID, RowID&lt;br /&gt;
			itemMultiColumnList = new ListboxTextItem(&amp;quot;B1&amp;quot;, 102);&lt;br /&gt;
				//itemMultiColumnList-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
				// By commenting the line above a cell does not specify a selection indicator&lt;br /&gt;
				//  selecting that line will show a &amp;quot;gap&amp;quot; in the selection.&lt;br /&gt;
				multiColumnList-&amp;gt;setItem(itemMultiColumnList, 1, 0); // ColumnID, RowID&lt;br /&gt;
			itemMultiColumnList = new ListboxTextItem(&amp;quot;C1&amp;quot;, 103);&lt;br /&gt;
				itemMultiColumnList-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
				multiColumnList-&amp;gt;setItem(itemMultiColumnList, 2, 0); // ColumnID, RowID&lt;br /&gt;
			multiColumnList-&amp;gt;addRow();&lt;br /&gt;
			itemMultiColumnList = new ListboxTextItem(&amp;quot;A2&amp;quot;, 201);&lt;br /&gt;
				itemMultiColumnList-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
				multiColumnList-&amp;gt;setItem(itemMultiColumnList, 0, 1); // ColumnID, RowID&lt;br /&gt;
			itemMultiColumnList = new ListboxTextItem(&amp;quot;B2&amp;quot;, 202);&lt;br /&gt;
				itemMultiColumnList-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
				multiColumnList-&amp;gt;setItem(itemMultiColumnList, 1, 1); // ColumnID, RowID&lt;br /&gt;
			itemMultiColumnList = new ListboxTextItem(&amp;quot;C2&amp;quot;, 203);&lt;br /&gt;
				itemMultiColumnList-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
				multiColumnList-&amp;gt;setItem(itemMultiColumnList, 2, 1); // ColumnID, RowID&lt;br /&gt;
			MCLGridRef grid_ref(1, 0); // Select according to a grid reference; second row&lt;br /&gt;
			multiColumnList-&amp;gt;setItemSelectState(grid_ref, true);&lt;br /&gt;
			ListboxItem* listboxItem = multiColumnList-&amp;gt;getFirstSelectedItem();&lt;br /&gt;
			uint valueColumnA = listboxItem-&amp;gt;getID(); // Retrieve the value of the selected item from column A&lt;br /&gt;
			listboxItem = multiColumnList-&amp;gt;getNextSelected(listboxItem);&lt;br /&gt;
			uint valueColumnB = listboxItem-&amp;gt;getID(); // Retrieve the value of the selected item from column B&lt;br /&gt;
			listboxItem = multiColumnList-&amp;gt;getNextSelected(listboxItem);&lt;br /&gt;
			uint valueColumnC = listboxItem-&amp;gt;getID(); // Retrieve the value of the selected item from column C&lt;br /&gt;
&lt;br /&gt;
			/* TabControl */&lt;br /&gt;
			TabControl* winTabControl = static_cast&amp;lt;TabControl*&amp;gt;(winMgr.getWindow(&amp;quot;TabControl&amp;quot;));&lt;br /&gt;
			winTabControl-&amp;gt;setTabHeight(UDim(0.15f, 0.0f)); // Make the tab buttons a little bigger&lt;br /&gt;
			Window* tabPage = winMgr.getWindow(&amp;quot;TabPane1&amp;quot;);&lt;br /&gt;
				tabPage-&amp;gt;setText(&amp;quot;Page 1&amp;quot;);&lt;br /&gt;
				tabPage-&amp;gt;setSize(UVector2(UDim(1.0f, 0.0f), UDim(1.0f, 0.0f))); // Size to 100% of its parent, the TabControl&lt;br /&gt;
				tabPage-&amp;gt;setPosition(UVector2(UDim(0.0f, 0.0f), UDim(0.0f, 0.0f))); // Move to the upper left corner of its parent&lt;br /&gt;
				winTabControl-&amp;gt;addTab(tabPage);&lt;br /&gt;
			tabPage = winMgr.getWindow(&amp;quot;TabPane2&amp;quot;);&lt;br /&gt;
				tabPage-&amp;gt;setText(&amp;quot;Page 2&amp;quot;);&lt;br /&gt;
				tabPage-&amp;gt;setSize(UVector2(UDim(1.0f, 0.0f), UDim(1.0f, 0.0f))); &lt;br /&gt;
				tabPage-&amp;gt;setPosition(UVector2(UDim(0.0f, 0.0f), UDim(0.0f, 0.0f))); &lt;br /&gt;
				winTabControl-&amp;gt;addTab(tabPage);&lt;br /&gt;
&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;
	}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#endif // _WidgetGalore_h_&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== main.cpp ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&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;WidgetGalore.h&amp;quot;&lt;br /&gt;
&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;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== WidgetGalore.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;Text&amp;quot; &amp;gt;1&amp;lt;/Property&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;DefaultWindow&amp;quot; Name=&amp;quot;TabPane2&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.72875,0},{0.7185,0},{0.97875,0},{0.9685,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/StaticText&amp;quot; Name=&amp;quot;StaticTextPage2&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; &amp;gt;In Page 2:&amp;lt;/Property&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.06,0},{0.226667,0},{0.415,0},{0.476667,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;EditBoxPage2&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;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.420001,0},{0.22,0},{0.99,0},{0.47,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 Type=&amp;quot;TaharezLook/FrameWindow&amp;quot; Name=&amp;quot;winTabControl&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; &amp;gt;Tab Control Window&amp;lt;/Property&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.695627,0},{0.2725,0},{0.993122,0},{0.704167,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/TabControl&amp;quot; Name=&amp;quot;TabControl&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;TabHeight&amp;quot; Value=&amp;quot;{0,0}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;TabTextPadding&amp;quot; Value=&amp;quot;{0,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;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.088566,0},{0.174378,0},{0.931404,0},{0.804637,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;btnOk&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; &amp;gt;Ok&amp;lt;/Property&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.128412,0},{0.841464,0},{0.365583,0},{0.926003,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/Button&amp;quot; Name=&amp;quot;btnCancel&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; &amp;gt;Cancel&amp;lt;/Property&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.400429,0},{0.841464,0},{0.637601,0},{0.926003,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/Button&amp;quot; Name=&amp;quot;btnApply&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; &amp;gt;Apply&amp;lt;/Property&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.668224,0},{0.843977,0},{0.905394,0},{0.928516,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&amp;gt;&lt;br /&gt;
        &amp;lt;Window Type=&amp;quot;DefaultWindow&amp;quot; Name=&amp;quot;TabPane1&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;ClippedByParent&amp;quot; Value=&amp;quot;False&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.72875,0},{0.012178,0},{0.97875,0},{0.262178,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/StaticText&amp;quot; Name=&amp;quot;StaticTextPage1&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; &amp;gt;In Page 1:&amp;lt;/Property&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.06,0},{0.226667,0},{0.415,0},{0.476667,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;EditBoxPage1&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.420001,0},{0.22,0},{0.99,0},{0.47,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 Type=&amp;quot;TaharezLook/FrameWindow&amp;quot; Name=&amp;quot;winWidgets&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; &amp;gt;Dave, it&amp;amp;apos;s full of widgets!&amp;lt;/Property&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.00375,0},{0.143333,0},{0.751248,0},{0.806665,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/Button&amp;quot; Name=&amp;quot;btnClose&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; &amp;gt;Close&amp;lt;/Property&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.732397,0},{0.895137,0},{0.976465,0},{0.975697,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;Editbox&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;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.62442,0},{0.090471,0},{0.969776,0},{0.153443,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/Checkbox&amp;quot; Name=&amp;quot;Checkbox&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; &amp;gt;Check&amp;lt;/Property&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.845164,0},{0.396859,0},{0.944201,0},{0.453147,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;Combobox&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; &amp;gt;Combo Box&amp;lt;/Property&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.183835,0},{0.090471,0},{0.613522,0},{0.413287,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/RadioButton&amp;quot; Name=&amp;quot;RadioButton_A&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; &amp;gt;A&amp;lt;/Property&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.652856,0},{0.189876,0},{0.704964,0},{0.246164,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;RadioButton_B&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; &amp;gt;B&amp;lt;/Property&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.707569,0},{0.189876,0},{0.759678,0},{0.246164,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;RadioButton_C&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; &amp;gt;C&amp;lt;/Property&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.761542,0},{0.189876,0},{0.813651,0},{0.246164,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;RadioButton_1&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; &amp;gt;1&amp;lt;/Property&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.845164,0},{0.189876,0},{0.897272,0},{0.246164,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;RadioButton_2&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; &amp;gt;2&amp;lt;/Property&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.845164,0},{0.245152,0},{0.897272,0},{0.30144,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;RadioButton_3&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; &amp;gt;3&amp;lt;/Property&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.845164,0},{0.300429,0},{0.897272,0},{0.356717,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/HorizontalScrollbar&amp;quot; Name=&amp;quot;HorizontalScrollbar&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;PageSize&amp;quot; Value=&amp;quot;0&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;OverlapSize&amp;quot; Value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;DocumentSize&amp;quot; Value=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;ScrollPosition&amp;quot; Value=&amp;quot;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;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.183835,0},{0.185427,0},{0.613522,0},{0.26206,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/VerticalScrollbar&amp;quot; Name=&amp;quot;VerticalScrollbar&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;PageSize&amp;quot; Value=&amp;quot;0&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;OverlapSize&amp;quot; Value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;DocumentSize&amp;quot; Value=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;ScrollPosition&amp;quot; Value=&amp;quot;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;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.026087,0},{0.090471,0},{0.082106,0},{0.606802,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/Listbox&amp;quot; Name=&amp;quot;Listbox&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; &amp;gt;List Box&amp;lt;/Property&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.183835,0},{0.626634,0},{0.427903,0},{0.876634,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&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/MultiColumnList&amp;quot; Name=&amp;quot;MultiColumnList&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.183835,0},{0.271357,0},{0.816779,0},{0.551507,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&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/MultiLineEditbox&amp;quot; Name=&amp;quot;MultiLineEditbox&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; &amp;gt;            &lt;br /&gt;
&amp;lt;/Property&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.462498,0},{0.626634,0},{0.706566,0},{0.876634,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/ProgressBar&amp;quot; Name=&amp;quot;ProgressBar&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;StepSize&amp;quot; Value=&amp;quot;0.01&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;CurrentProgress&amp;quot; Value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.183835,0},{0.559296,0},{0.816779,0},{0.608291,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/Slider&amp;quot; Name=&amp;quot;Slider&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;CurrentValue&amp;quot; Value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;MaximumValue&amp;quot; Value=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;ClickStepSize&amp;quot; Value=&amp;quot;0.01&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.099415,0},{0.090471,0},{0.155434,0},{0.606802,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&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;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;0&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.845164,0},{0.48995,0},{0.944201,0},{0.551507,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/StaticImage&amp;quot; Name=&amp;quot;StaticImage&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.732397,0},{0.626634,0},{0.976465,0},{0.876634,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;StaticText&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; &amp;gt;Static Text&amp;lt;/Property&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.462498,0},{0.895137,0},{0.706566,0},{0.975697,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/ScrollablePane&amp;quot; Name=&amp;quot;ScrollablePane&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;ContentArea&amp;quot; Value=&amp;quot;l:0 t:0 r:0 b:0&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;HorzStepSize&amp;quot; Value=&amp;quot;0.1&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;VertStepSize&amp;quot; Value=&amp;quot;0.1&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;HorzOverlapSize&amp;quot; Value=&amp;quot;0.01&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.019063,0},{0.629399,0},{0.157023,0},{0.879399,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;VertOverlapSize&amp;quot; Value=&amp;quot;0.01&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;HorzScrollPosition&amp;quot; Value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;VertScrollPosition&amp;quot; Value=&amp;quot;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>Rackle</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=Dialog_System&amp;diff=2825</id>
		<title>Dialog System</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=Dialog_System&amp;diff=2825"/>
				<updated>2008-02-01T12:26:30Z</updated>
		
		<summary type="html">&lt;p&gt;Rackle: /* DialogSystemDemo.h */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The default CEGUI implementation stores the currently specified values of the widgets such that closing and then reopening a window will redisplay those values.  Presented here is a different approach, to allow values to be saved or cancelled.&lt;br /&gt;
&lt;br /&gt;
==== Explanation ====&lt;br /&gt;
The DemoSample class is the &amp;quot;main&amp;quot; application.  It initializes CEGUI and loads a simple layout.  It then initialises instances of the SimpleWindow and the SimpleDialog classes.  These contain the specific code to handle the behavior of the Simple Window and the Simple Dialog.  In turn they rely on the behaviors define within the DialogSystem class to activate higher level features. &lt;br /&gt;
&lt;br /&gt;
The DialogSystem class implements the behavior of the 'Ok', 'Cancel', and 'Apply' buttons that we've become accustomed to in the world of Windows.  The DialogSystem::DialogSystemEvents enumaration defines the high level events supported by the DialogSystem class:&lt;br /&gt;
  open: display the window and its data&lt;br /&gt;
  ok: save the data and close the window&lt;br /&gt;
  cancel: close the window without saving the data&lt;br /&gt;
  escape: close the window without saving the data&lt;br /&gt;
  apply: save the data without closing the window&lt;br /&gt;
  modified: enable the 'apply' button&lt;br /&gt;
&lt;br /&gt;
These high level events accomplish their jobs through the use of four basic actions:&lt;br /&gt;
  doOpen(): display the window&lt;br /&gt;
  doLoad(): copy the value of variables into their associated widgets&lt;br /&gt;
  doSave(): copy the value of the widgets into their associated variables&lt;br /&gt;
  doClose(): hide the window&lt;br /&gt;
&lt;br /&gt;
The SimpleWindow class will manage everything that has to do with the Simple Window.  The initWindow() function initialises the DialogSystem by specifying the handle of the window/dialog (the name specified within the layout file) and whether it should initially be visible or not.  Then it instructs the DialogSystem to handle four events as well as which action to initiate in response to these events:&lt;br /&gt;
1) Pressing the &amp;quot;Toolbar_btnSimpleWindow&amp;quot; button opens the SimpleWindow.&lt;br /&gt;
2) Pressing the &amp;quot;SimpleWindow_btnClose&amp;quot; button performs an 'Ok', saving the data and closing the window.&lt;br /&gt;
3) Clicking on the 'X' button closes the dialog without saving any modifications (cancel).&lt;br /&gt;
4) Pressing the 'escape' key closes the dialog without saving any modifications (cancel).&lt;br /&gt;
&lt;br /&gt;
The SimpleWindow class then overrides the doLoad() virtual function to place the contents of a variable (dataString) into its associated Editbox.  It also overrides the doSave() virtual function to place the contents of the Editbox back into the variable.&lt;br /&gt;
&lt;br /&gt;
The SimpleDialog class replicates many of what the SimpleWindow performed.  The first difference is that it specifies the handle of a parent window.  This signals the DialogSystem class that when the Simple Dialog is opened it should disable its parent, making the Simple Dialog modal; inputs to the parent are blocked while this dialog is opened.&lt;br /&gt;
&lt;br /&gt;
The second difference is the addition of an apply button.  This apply button requires that two events be specified.  The event of clicking on the apply button &amp;quot;SimpleDialog_btnApply&amp;quot; is bound to the high level event of DialogSystem::apply, which will call upon doSave() to move the widget data into the variables.  Text changes within the edit box &amp;quot;SimpleDialog_edtValue&amp;quot; are also bound to the high level event of DialogSystem::modified, which will enable the apply button whenever the contents of the edit box are modified.  If there were additional widgets within the window then their 'modified' events would also need to be specified.&lt;br /&gt;
&lt;br /&gt;
CEGUI has more widgets than an Editbox.  These can easily be incorporated within the logic presented here.&lt;br /&gt;
&lt;br /&gt;
Please post comments or questions on the message board thread for the [http://www.cegui.org.uk/phpBB2/viewtopic.php?p=7966#7966 Dialog System]&lt;br /&gt;
&lt;br /&gt;
==== DialogSystemDemo.h ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#ifndef _DialogSystemDemo_h_&lt;br /&gt;
#define _DialogSystemDemo_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;
#include &amp;quot;DemoUtils.h&amp;quot;&lt;br /&gt;
#include &amp;quot;DialogSystem.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
class SimpleWindow : public DialogSystem&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
	void initWindow()&lt;br /&gt;
	{&lt;br /&gt;
		// Initialise the window&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		// Initialise the windowing system&lt;br /&gt;
		DialogSystem::initialise(&amp;quot;winSimpleWindow&amp;quot;,	// The handle of this window&lt;br /&gt;
					false);			// Initially invisible&lt;br /&gt;
								// A modeless window does not have a parent&lt;br /&gt;
&lt;br /&gt;
		// Subscribe to widget events&lt;br /&gt;
		// Note that the &amp;quot;close&amp;quot; button is set to behave as an &amp;quot;ok&amp;quot; button&lt;br /&gt;
		DialogSystem::bindEvent( &amp;quot;Toolbar_btnSimpleWindow&amp;quot;,	PushButton::EventClicked, DialogSystem::open);&lt;br /&gt;
		DialogSystem::bindEvent( &amp;quot;SimpleWindow_btnClose&amp;quot;,	PushButton::EventClicked, DialogSystem::ok);&lt;br /&gt;
&lt;br /&gt;
		// Subscribe to window events&lt;br /&gt;
		DialogSystem::bindEvent(&amp;quot;winSimpleWindow&amp;quot;, FrameWindow::EventCloseClicked,	DialogSystem::cancel); // The 'X' button was clicked&lt;br /&gt;
		DialogSystem::bindEvent(&amp;quot;winSimpleWindow&amp;quot;, FrameWindow::EventKeyDown,		DialogSystem::escape); // The 'escape' key was pressed&lt;br /&gt;
	}&lt;br /&gt;
protected:&lt;br /&gt;
	bool doLoad()&lt;br /&gt;
	{&lt;br /&gt;
		// Handle the load action by placing data into widgets&lt;br /&gt;
		CEGUI::WindowManager::getSingleton().getWindow(&amp;quot;SimpleWindow_edtValue&amp;quot;)-&amp;gt;setText(dataString);&lt;br /&gt;
		return DialogSystem::doLoad(); &lt;br /&gt;
	}&lt;br /&gt;
	bool doSave()&lt;br /&gt;
	{&lt;br /&gt;
		// Handle the save action by moving widget data into variables&lt;br /&gt;
		dataString = CEGUI::WindowManager::getSingleton().getWindow(&amp;quot;SimpleWindow_edtValue&amp;quot;)-&amp;gt;getText();&lt;br /&gt;
		return DialogSystem::doSave(); &lt;br /&gt;
	}&lt;br /&gt;
private:&lt;br /&gt;
	CEGUI::String dataString; // Variable associated with the Editbox&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
//////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
class SimpleDialog : public DialogSystem&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
	void initWindow()&lt;br /&gt;
	{&lt;br /&gt;
		// Initialise the dialog&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
&lt;br /&gt;
		// Initialise the windowing system&lt;br /&gt;
		DialogSystem::initialise(&amp;quot;dlgSimpleDialog&amp;quot;,	// The handle of this window&lt;br /&gt;
					false,			// Initially invisible&lt;br /&gt;
						&amp;quot;winToolbar&amp;quot;);	// The handle of its parent, making it a modal dialog&lt;br /&gt;
&lt;br /&gt;
		// Subscribe to widget events&lt;br /&gt;
		DialogSystem::bindEvent( &amp;quot;Toolbar_btnSimpleDialog&amp;quot;,	PushButton::EventClicked,	DialogSystem::open);&lt;br /&gt;
		DialogSystem::bindEvent( &amp;quot;SimpleDialog_btnOk&amp;quot;,		PushButton::EventClicked,	DialogSystem::ok);&lt;br /&gt;
		DialogSystem::bindEvent( &amp;quot;SimpleDialog_btnCancel&amp;quot;,	PushButton::EventClicked,	DialogSystem::cancel);&lt;br /&gt;
		DialogSystem::bindEvent( &amp;quot;SimpleDialog_btnApply&amp;quot;,	PushButton::EventClicked,	DialogSystem::apply);&lt;br /&gt;
&lt;br /&gt;
		// These events trigger a 'modified' event, activating the 'apply' button&lt;br /&gt;
		DialogSystem::bindEvent( &amp;quot;SimpleDialog_edtValue&amp;quot;,	Editbox::EventTextChanged,	DialogSystem::modified);&lt;br /&gt;
&lt;br /&gt;
		// Subscribe to window events&lt;br /&gt;
		// Pressing the 'X' button will behave as a cancel&lt;br /&gt;
		DialogSystem::bindEvent( &amp;quot;dlgSimpleDialog&amp;quot;, FrameWindow::EventCloseClicked,	DialogSystem::cancel); // The 'X' button was clicked&lt;br /&gt;
		DialogSystem::bindEvent( &amp;quot;dlgSimpleDialog&amp;quot;, FrameWindow::EventKeyDown,		DialogSystem::escape); // The 'escape' key was pressed&lt;br /&gt;
	}&lt;br /&gt;
protected:&lt;br /&gt;
	bool doLoad()&lt;br /&gt;
	{&lt;br /&gt;
		// Handle the load action by placing data into widgets&lt;br /&gt;
		CEGUI::WindowManager::getSingleton().getWindow(&amp;quot;SimpleDialog_edtValue&amp;quot;)-&amp;gt;setText(dataString);&lt;br /&gt;
		return DialogSystem::doLoad(); &lt;br /&gt;
	}&lt;br /&gt;
	bool doSave()&lt;br /&gt;
	{&lt;br /&gt;
		// Handle the save action by moving widget data into variables&lt;br /&gt;
		dataString = CEGUI::WindowManager::getSingleton().getWindow(&amp;quot;SimpleDialog_edtValue&amp;quot;)-&amp;gt;getText();&lt;br /&gt;
		return DialogSystem::doSave(); &lt;br /&gt;
	}&lt;br /&gt;
private:&lt;br /&gt;
	CEGUI::String dataString;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
//////////////////////////////////////////&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;DialogSystem.layout&amp;quot;);&lt;br /&gt;
			sheet-&amp;gt;addChildWindow(guiLayout);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
			// Initialise the Simple Window and the Simple Dialog&lt;br /&gt;
			simpleWindow.initWindow();&lt;br /&gt;
			simpleDialog.initWindow();&lt;br /&gt;
		}&lt;br /&gt;
		catch(Exception &amp;amp;e)&lt;br /&gt;
		{&lt;br /&gt;
			ErrorMessage(e.getMessage().c_str(), &amp;quot;Error initializing the demo&amp;quot;);&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;
	}&lt;br /&gt;
private:&lt;br /&gt;
	SimpleWindow simpleWindow;&lt;br /&gt;
	SimpleDialog simpleDialog;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#endif // _DialogSystemDemo_h_&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== DialogSystem.h ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#ifndef _DialogSystem_h_&lt;br /&gt;
#define _DialogSystem_h_&lt;br /&gt;
&lt;br /&gt;
#include &amp;quot;CEGUI.h&amp;quot;&lt;br /&gt;
#include &amp;quot;vector&amp;quot;&lt;br /&gt;
&lt;br /&gt;
class DialogSystem&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
	DialogSystem();&lt;br /&gt;
	enum DialogSystemEvents { open, ok, cancel, escape, apply, modified };&lt;br /&gt;
	bool isModified(); // Return whether data within the window is modified&lt;br /&gt;
&lt;br /&gt;
	// Actions&lt;br /&gt;
	virtual bool doOpen(); // Open the window&lt;br /&gt;
	virtual bool doLoad(); // Assign the data into the widgets&lt;br /&gt;
	virtual bool doSave(); // Assign the widgets into the data&lt;br /&gt;
	virtual bool doClose(); // Close the window&lt;br /&gt;
	void initialise(const CEGUI::String&amp;amp; window, bool visible, const CEGUI::String&amp;amp; parent = &amp;quot;&amp;quot;); // Initialise the window system&lt;br /&gt;
	void bindEvent(const CEGUI::String&amp;amp; widget, const CEGUI::String&amp;amp; event, DialogSystem::DialogSystemEvents action); // Subscribe to window events&lt;br /&gt;
private:&lt;br /&gt;
	// Events&lt;br /&gt;
	bool onOpen(const CEGUI::EventArgs&amp;amp; e); // Open the window&lt;br /&gt;
	bool onOk(const CEGUI::EventArgs&amp;amp; e); // Save the data and close the window&lt;br /&gt;
	bool onCancel(const CEGUI::EventArgs&amp;amp; e); // Close the window&lt;br /&gt;
	bool onEscape(const CEGUI::EventArgs&amp;amp; e); // Close the window&lt;br /&gt;
	bool onApply(const CEGUI::EventArgs&amp;amp; e); // Save the data&lt;br /&gt;
	bool onModified(const CEGUI::EventArgs&amp;amp; e); // A widget in the window has been modified&lt;br /&gt;
&lt;br /&gt;
	CEGUI::String m_parent; // Handle to the parent&lt;br /&gt;
	CEGUI::String m_window; // Handle to the window&lt;br /&gt;
	CEGUI::String m_apply;  // Handle of the apply button&lt;br /&gt;
	bool m_modal; // Whether the window is modal&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#endif // _DialogSystem_h_&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== DialogSystem.cpp ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;quot;DialogSystem.h&amp;quot;&lt;br /&gt;
#include &amp;quot;assert.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
DialogSystem::DialogSystem()&lt;br /&gt;
{&lt;br /&gt;
	m_modal  = false;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool DialogSystem::isModified()&lt;br /&gt;
{&lt;br /&gt;
	// Return whether data within the window is modified&lt;br /&gt;
	assert(!m_apply.empty() &amp;amp;&amp;amp; &amp;quot;The isModified() function requires that you specify an \&amp;quot;Apply\&amp;quot; button&amp;quot;);&lt;br /&gt;
	return !CEGUI::WindowManager::getSingleton().getWindow(m_apply)-&amp;gt;isDisabled();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool DialogSystem::doOpen()&lt;br /&gt;
{&lt;br /&gt;
	// Open the window&lt;br /&gt;
	assert(!m_window.empty() &amp;amp;&amp;amp; &amp;quot;You have forgotten to call initialise()&amp;quot;);&lt;br /&gt;
	if(m_modal)&lt;br /&gt;
	{&lt;br /&gt;
		// Displaying a modal window disables its parent&lt;br /&gt;
		assert(!m_parent.empty() &amp;amp;&amp;amp; &amp;quot;The value of m_modal or m_parent has become corrupted&amp;quot;);&lt;br /&gt;
		CEGUI::WindowManager::getSingleton().getWindow(m_parent)-&amp;gt;setEnabled(false);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	// Display the window&lt;br /&gt;
	CEGUI::WindowManager::getSingleton().getWindow(m_window)-&amp;gt;setVisible(true);&lt;br /&gt;
&lt;br /&gt;
	// Load the data into the widgets&lt;br /&gt;
	return doLoad();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool DialogSystem::doLoad()&lt;br /&gt;
{&lt;br /&gt;
	// Populate the window widgets with data&lt;br /&gt;
	// Note that this can also be used to simulate an undo for every widget&lt;br /&gt;
	// present in the window&lt;br /&gt;
&lt;br /&gt;
	// Disable the apply button since there are no modifications&lt;br /&gt;
	if(!m_apply.empty())&lt;br /&gt;
		CEGUI::WindowManager::getSingleton().getWindow(m_apply)-&amp;gt;setEnabled(false);&lt;br /&gt;
	return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool DialogSystem::doSave()&lt;br /&gt;
{&lt;br /&gt;
	// Update the data with the inputs from the widgets&lt;br /&gt;
&lt;br /&gt;
	// Disable the apply button since there are no modifications&lt;br /&gt;
	if(!m_apply.empty())&lt;br /&gt;
		CEGUI::WindowManager::getSingleton().getWindow(m_apply)-&amp;gt;setEnabled(false);&lt;br /&gt;
&lt;br /&gt;
	return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool DialogSystem::doClose()&lt;br /&gt;
{&lt;br /&gt;
	// Close the window&lt;br /&gt;
	assert(!m_window.empty() &amp;amp;&amp;amp; &amp;quot;You have forgotten to call initialise()&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	if(m_modal)&lt;br /&gt;
	{&lt;br /&gt;
		// Closing a modal window enables its parent&lt;br /&gt;
		assert(!m_parent.empty() &amp;amp;&amp;amp; &amp;quot;The value of m_modal or m_parent has become corrupted&amp;quot;);&lt;br /&gt;
		CEGUI::WindowManager::getSingleton().getWindow(m_parent)-&amp;gt;setEnabled(true);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	CEGUI::WindowManager::getSingleton().getWindow(m_window)-&amp;gt;setVisible(false);&lt;br /&gt;
	return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void DialogSystem::initialise(const CEGUI::String&amp;amp; window, bool visible, const CEGUI::String&amp;amp; parent)&lt;br /&gt;
{&lt;br /&gt;
	// Initialise the window system&lt;br /&gt;
	// Specifying a parent makes this window modal&lt;br /&gt;
	m_window = window;&lt;br /&gt;
	CEGUI::WindowManager::getSingleton().getWindow(m_window)-&amp;gt;setVisible(visible);&lt;br /&gt;
	m_parent = parent;&lt;br /&gt;
	m_modal  = !m_parent.empty();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
void DialogSystem::bindEvent(const CEGUI::String&amp;amp; widget, const CEGUI::String&amp;amp; widgetEvent, DialogSystemEvents action)&lt;br /&gt;
{&lt;br /&gt;
	// Subscribe to events&lt;br /&gt;
	CEGUI::Window* widgetHandle = CEGUI::WindowManager::getSingleton().getWindow(widget);&lt;br /&gt;
	switch(action)&lt;br /&gt;
	{&lt;br /&gt;
	case open:&lt;br /&gt;
		widgetHandle-&amp;gt;subscribeEvent(widgetEvent, CEGUI::Event::Subscriber(&amp;amp;DialogSystem::onOpen, this));&lt;br /&gt;
		break;&lt;br /&gt;
	case ok:&lt;br /&gt;
		widgetHandle-&amp;gt;subscribeEvent(widgetEvent, CEGUI::Event::Subscriber(&amp;amp;DialogSystem::onOk, this));&lt;br /&gt;
		break;&lt;br /&gt;
	case cancel:&lt;br /&gt;
		widgetHandle-&amp;gt;subscribeEvent(widgetEvent, CEGUI::Event::Subscriber(&amp;amp;DialogSystem::onCancel, this));&lt;br /&gt;
		break;&lt;br /&gt;
	case escape:&lt;br /&gt;
		widgetHandle-&amp;gt;subscribeEvent(widgetEvent, CEGUI::Event::Subscriber(&amp;amp;DialogSystem::onEscape, this));&lt;br /&gt;
		break;&lt;br /&gt;
	case apply:&lt;br /&gt;
		widgetHandle-&amp;gt;subscribeEvent(widgetEvent, CEGUI::Event::Subscriber(&amp;amp;DialogSystem::onApply, this));&lt;br /&gt;
		m_apply = widget;&lt;br /&gt;
		break;&lt;br /&gt;
	case modified:&lt;br /&gt;
		if(!m_apply.empty())&lt;br /&gt;
			widgetHandle-&amp;gt;subscribeEvent(widgetEvent, CEGUI::Event::Subscriber(&amp;amp;DialogSystem::onModified, this));&lt;br /&gt;
		break;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool DialogSystem::onOpen(const CEGUI::EventArgs&amp;amp; e)&lt;br /&gt;
{&lt;br /&gt;
	// Open the window&lt;br /&gt;
	return doOpen();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool DialogSystem::onOk(const CEGUI::EventArgs&amp;amp; e)&lt;br /&gt;
{&lt;br /&gt;
	// The 'ok' button was pressed&lt;br /&gt;
	// Respond by saving the data and closing the window&lt;br /&gt;
	return doSave() &amp;amp;&amp;amp; doClose();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool DialogSystem::onCancel(const CEGUI::EventArgs&amp;amp; e)&lt;br /&gt;
{&lt;br /&gt;
	// The 'cancel' button was pressed&lt;br /&gt;
	// Respond by closing the window without saving the data&lt;br /&gt;
	return doClose();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool DialogSystem::onEscape(const CEGUI::EventArgs&amp;amp; e)&lt;br /&gt;
{&lt;br /&gt;
	// The 'escape' key was pressed&lt;br /&gt;
	// Respond by closing the dialog without saving the data&lt;br /&gt;
	// Note that Win32AppHelper::doDirectInputEvents() intercepts this key&lt;br /&gt;
	// This means that the escape key will NOT reach here&lt;br /&gt;
    const CEGUI::KeyEventArgs&amp;amp; keyArgs = static_cast&amp;lt;const CEGUI::KeyEventArgs&amp;amp;&amp;gt;(e);&lt;br /&gt;
	if(keyArgs.scancode == CEGUI::Key::Escape)&lt;br /&gt;
	{&lt;br /&gt;
		return doClose();&lt;br /&gt;
	}&lt;br /&gt;
	else&lt;br /&gt;
		return false;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool DialogSystem::onApply(const CEGUI::EventArgs&amp;amp; e)&lt;br /&gt;
{&lt;br /&gt;
	// The 'apply' button was pressed&lt;br /&gt;
	// Respond by saving the data without closing the window&lt;br /&gt;
	return doSave();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool DialogSystem::onModified(const CEGUI::EventArgs&amp;amp; e)&lt;br /&gt;
{&lt;br /&gt;
	// A widget within the window was modified&lt;br /&gt;
	// Respond by enabling the 'apply' button&lt;br /&gt;
	CEGUI::WindowManager::getSingleton().getWindow(m_apply)-&amp;gt;setEnabled(true);&lt;br /&gt;
	return true;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== DialogSystem.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;winToolbar&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Toolbar&amp;quot; /&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;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;False&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.24875,0},{0.010001,0},{0.568749,0},{0.081667,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;Property Name=&amp;quot;CloseButtonEnabled&amp;quot; Value=&amp;quot;False&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/Button&amp;quot; Name=&amp;quot;Toolbar_btnSimpleWindow&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Simple Window&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.065103,0},{0.227595,0},{0.475554,0},{0.686899,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/Button&amp;quot; Name=&amp;quot;Toolbar_btnSimpleDialog&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Simple Dialog&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.538253,0},{0.227595,0},{0.948703,0},{0.686899,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&amp;gt;&lt;br /&gt;
        &amp;lt;Window Type=&amp;quot;TaharezLook/FrameWindow&amp;quot; Name=&amp;quot;winSimpleWindow&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Simple Window&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.005,0},{0.168333,0},{0.42,0},{0.511666,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/Button&amp;quot; Name=&amp;quot;SimpleWindow_btnClose&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Close&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.688554,0},{0.804855,0},{0.938554,0},{0.943204,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/StaticText&amp;quot; Name=&amp;quot;SimpleWindow_lblValue&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;Value:&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.455591,0},{0.430746,0},{0.606068,0},{0.569095,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;SimpleWindow_edtValue&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;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.618241,0},{0.430746,0},{0.970525,0},{0.569095,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 Type=&amp;quot;TaharezLook/FrameWindow&amp;quot; Name=&amp;quot;dlgSimpleDialog&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Simple Dialog&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.43625,0},{0.165,0},{0.916249,0},{0.508333,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/Button&amp;quot; Name=&amp;quot;SimpleDialog_btnOk&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Ok&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.173754,0},{0.804855,0},{0.423754,0},{0.943204,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/Button&amp;quot; Name=&amp;quot;SimpleDialog_btnCancel&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Cancel&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.451828,0},{0.804855,0},{0.701828,0},{0.943204,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/Button&amp;quot; Name=&amp;quot;SimpleDialog_btnApply&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.73123,0},{0.804855,0},{0.98123,0},{0.943204,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;SimpleDialog_edtValue&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;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.626093,0},{0.418446,0},{0.971449,0},{0.556795,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;SimpleDialog_lblValue&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Value:&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.482291,0},{0.418446,0},{0.617709,0},{0.556795,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;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;DialogSystemDemo.h&amp;quot;&lt;br /&gt;
&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;/div&gt;</summary>
		<author><name>Rackle</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=Menu_and_Popup&amp;diff=2824</id>
		<title>Menu and Popup</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=Menu_and_Popup&amp;diff=2824"/>
				<updated>2008-02-01T12:25:47Z</updated>
		
		<summary type="html">&lt;p&gt;Rackle: /* Menu_Demo.h */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Introduction ===&lt;br /&gt;
This code demonstrates the usage of a menu as well as popup menus, created from the Layout Editor.&lt;br /&gt;
&lt;br /&gt;
Please discuss this snippet within the [http://www.cegui.org.uk/phpBB2/viewtopic.php?p=11724 Menu and Submenus] thread.&lt;br /&gt;
&lt;br /&gt;
==== Menu ====&lt;br /&gt;
The Menubar widget creates a menu bar, an horizontal bar containing top-level popup menus.  Traditionally menu bars are displayed just below the title bar however the Cegui menubar is not bound by this limitation; it could be placed at the bottom of a FrameWindow, or even outside of a FrameWindow.&lt;br /&gt;
&lt;br /&gt;
The configureMenu() function recursively traverses a menu hierarchy and registers three events:  EventMouseEnters, EventMouseLeaves, and EventClicked.&lt;br /&gt;
&lt;br /&gt;
The most important event triggered by a menu is the selection of a menu item.  This is accomplished by subscribing to the MenuItem::EventClicked event.  This code is within the onMenuItemClicked() function.&lt;br /&gt;
&lt;br /&gt;
Another noteworthy event is PopupMenu::EventPopupOpened, allowing you to modify the menuitems that are displayed, such as potentially (not presented here) enabling/disabling items or changing the displayed text.  This is an approach to have menus query the application to determin the state of the menu items that will be presented to the user; for example disabling a &amp;quot;paste&amp;quot; menuitem when there is nothing to paste.&lt;br /&gt;
&lt;br /&gt;
The demo subscribes to the MenuItem::EventMouseEnters event for two features.  The first is to display a message when the mouse hovers over a menuitem.  The text displayed is stored within the Tooltip property within the Layout Editor.  The second is to automatically open a submenu.  This code is within the onMouseEntersMenuItem() function.&lt;br /&gt;
&lt;br /&gt;
The code to automatically close a menu (when the mouse leaves) is within the onMouseLeavesMenuItem() and onMouseLeavesPopupMenuItem() functions, called in response to a MenuItem::EventMouseLeaves event.  &lt;br /&gt;
&lt;br /&gt;
By subscribing to the Window::EventCharacterKey event it becomes possible to open the menu in response to a special key.  The ALT key will not work in windowed mode (as opposed to fullscreen), since it is a system key.  Try pressing ALT followed by SPACE; the system menu will open (the menu in the upper left corner of a Windows window).  I've used the SLASH &amp;quot;/&amp;quot; key as an alternate.  Note that for the slash key to open the menu the FrameWindow must possess the focus.&lt;br /&gt;
&lt;br /&gt;
==== Popup Menu ====&lt;br /&gt;
&lt;br /&gt;
Since the Layout Editor does not allow us to create popup menus directly, I opted to reuse the menubar.  Traditionally a menu bar contains horizontal categories and within each category are sub-categories.  Since an application may contain numerous popup menus we would rapidly run out of space.  A better approach is to have a menu bar with a single top-level menu and popup menus defined as its sub-menus.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
* Popup Menubar&lt;br /&gt;
** Popup Menu 1&lt;br /&gt;
*** Item 1.1&lt;br /&gt;
*** Item 1.2&lt;br /&gt;
** Popup Menu 2&lt;br /&gt;
*** Item 2.1&lt;br /&gt;
*** Item 2.2&lt;br /&gt;
&lt;br /&gt;
Should you run out of room vertically then a second top-level menu could be created.&lt;br /&gt;
&lt;br /&gt;
The configureMenu() is called for each popup menu, to automatically open and close their submenus.  The Window::EventMouseButtonUp event is used to open the proper popup menu, based on which widget was right-clicked.  This code is within the onPopupMenu() function.&lt;br /&gt;
&lt;br /&gt;
The mouse cursor is traditionally displayed to the left of the popup menu.  The problem with that is that the cursor hides the first menu item.  The value of the mouseToLeftOfPopupMenu variable determines whether the traditional position is used or whether the popup menu is opened such that the mouse cursor appears to the right.  The mouseOffset variable specifies the mouse offset from the upper-left or the upper-right corner.  In addition the popup menu is moved to prevent it from opening offscreen.&lt;br /&gt;
&lt;br /&gt;
To add menuitems runtime to a popupMenu you add a CEGUI::Window childWindow to the popupMenu. You don't create a new CEGUI::MenuItem as you might think:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
CEGUI::PopupMenu* popupMenu  = (CEGUI::PopupMenu*)CEGUI::WindowManager::getSingleton().getWindow(&amp;quot;Root/Popup/PopupMenus/FirstPopup/AutoPopup&amp;quot;);  &lt;br /&gt;
CEGUI::Window* menuitem = CEGUI::WindowManager::getSingleton().createWindow(&amp;quot;TaharezLook/MenuItem&amp;quot;);&lt;br /&gt;
menuitem-&amp;gt;setText(&amp;quot;Quit&amp;quot;);&lt;br /&gt;
menuitem-&amp;gt;subscribeEvent(&amp;quot;Clicked&amp;quot;, Event::Subscriber(&amp;amp;ScrollablePaneSample::fileQuit, this));&lt;br /&gt;
popupMenu-&amp;gt;addChildWindow(menuitem);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Wishlist ====&lt;br /&gt;
&lt;br /&gt;
These feature are not implemented but would be nice to have:&lt;br /&gt;
&lt;br /&gt;
* A delay before automatically opening/closing a submenu.&lt;br /&gt;
* Closing the entire submenu tree when a parent submenu is closed.  This way the next time the submenu is opened its children are in their default mode (i.e. closed).&lt;br /&gt;
* Displaying accelerator/shortcut keys to the right of the menuitems.&lt;br /&gt;
* Keyboard navigation through the menus (up, down, left, right).  This requires access to the CeguiMenuItem::d_hover variable, which (I think) draws the menuitem as highlighted.&lt;br /&gt;
* Graphical menuitems&lt;br /&gt;
* Support for a separtor (horizontal line) menuitem.&lt;br /&gt;
* Support for a checkbox menuitem, to activate a feature&lt;br /&gt;
* Support for a radiobutton-like group of menuitems, to activate one feature among multiple choices.&lt;br /&gt;
&lt;br /&gt;
=== Files ===&lt;br /&gt;
==== Menu_Demo.h ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
#ifndef _Menu_h_&lt;br /&gt;
#define _Menu_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;
#include &amp;quot;CEGUIDefaultResourceProvider.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------------------&lt;br /&gt;
// Offset to ensure that the mouse cursor will be within the popup menu&lt;br /&gt;
// This will automatically close the popup menu whe the mouse is moved;&lt;br /&gt;
// without the offset the mouse is not really within the popup menu.&lt;br /&gt;
const float mouseOffset = 5.0f;&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------------------&lt;br /&gt;
// Specifies whether the popup menu will open to the right (default) or&lt;br /&gt;
// to the left of the mouse.  Opening to the left gives better results&lt;br /&gt;
// with the Taharez scheme since the mouse cursor is not covering the&lt;br /&gt;
// menu item.&lt;br /&gt;
const bool mouseToLeftOfPopupMenu = false;&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------------------&lt;br /&gt;
class DemoSample : public CEGuiSample&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
	//-------------------------------------------------------------------&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;Menu.layout&amp;quot;);&lt;br /&gt;
			sheet-&amp;gt;addChildWindow(guiLayout);&lt;br /&gt;
&lt;br /&gt;
			// Subscribe to the keyboard events to control the menu&lt;br /&gt;
			winMgr.getWindow(&amp;quot;Root/FrameWindow&amp;quot;)-&amp;gt;subscribeEvent(CEGUI::Window::EventCharacterKey,	CEGUI::Event::Subscriber(&amp;amp;DemoSample::onMenuKey,	this));&lt;br /&gt;
&lt;br /&gt;
			// Configure the menu bar&lt;br /&gt;
			configureMenu( winMgr.getWindow(&amp;quot;Root/FrameWindow/Menubar&amp;quot;), true );&lt;br /&gt;
&lt;br /&gt;
			// Hide the menubar of the popup menus&lt;br /&gt;
			winMgr.getWindow(&amp;quot;Root/Popup&amp;quot;)-&amp;gt;hide();&lt;br /&gt;
&lt;br /&gt;
			// Configure the popup menus&lt;br /&gt;
			configureMenu( winMgr.getWindow(&amp;quot;Root/Popup/PopupMenus&amp;quot;),	false );&lt;br /&gt;
&lt;br /&gt;
			// These &amp;quot;widgets&amp;quot; will display a contextual popup menu when right-clicked&lt;br /&gt;
			winMgr.getWindow(&amp;quot;Root/FrameWindow/FirstPopup&amp;quot;)-&amp;gt;subscribeEvent(CEGUI::Window::EventMouseButtonUp,	CEGUI::Event::Subscriber(&amp;amp;DemoSample::onPopupMenu, this));&lt;br /&gt;
			winMgr.getWindow(&amp;quot;Root/FrameWindow/SecondPopup&amp;quot;)-&amp;gt;subscribeEvent(CEGUI::Window::EventMouseButtonUp,	CEGUI::Event::Subscriber(&amp;amp;DemoSample::onPopupMenu, this));&lt;br /&gt;
			winMgr.getWindow(&amp;quot;Root/FrameWindow&amp;quot;)-&amp;gt;subscribeEvent(CEGUI::Window::EventMouseButtonUp,				CEGUI::Event::Subscriber(&amp;amp;DemoSample::onPopupMenu, this));&lt;br /&gt;
			winMgr.getWindow(&amp;quot;Root&amp;quot;)-&amp;gt;subscribeEvent(CEGUI::Window::EventMouseButtonUp,							CEGUI::Event::Subscriber(&amp;amp;DemoSample::onPopupMenu, this));&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;
	//-------------------------------------------------------------------&lt;br /&gt;
    void cleanupSample(void)&lt;br /&gt;
	{&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	//-------------------------------------------------------------------&lt;br /&gt;
	void configureMenu(CEGUI::Window* pParent, const bool&amp;amp; pMenubar) &lt;br /&gt;
	{&lt;br /&gt;
		// Recursively subscribe every menu item to the mouse enters/leaves/clicked events&lt;br /&gt;
		size_t childCount = pParent-&amp;gt;getChildCount(); &lt;br /&gt;
		for(size_t childIdx = 0; childIdx &amp;lt; childCount; childIdx++) &lt;br /&gt;
		{ &lt;br /&gt;
			if(pParent-&amp;gt;getChildAtIdx(childIdx)-&amp;gt;testClassName(&amp;quot;MenuItem&amp;quot;)&lt;br /&gt;
				|| pParent-&amp;gt;getChildAtIdx(childIdx)-&amp;gt;testClassName(&amp;quot;PopupMenu&amp;quot;) )&lt;br /&gt;
			{ &lt;br /&gt;
				pParent-&amp;gt;getChildAtIdx(childIdx)-&amp;gt;subscribeEvent(CEGUI::MenuItem::EventMouseEnters,   CEGUI::Event::Subscriber(&amp;amp;DemoSample::onMouseEntersMenuItem, this)); &lt;br /&gt;
				pParent-&amp;gt;getChildAtIdx(childIdx)-&amp;gt;subscribeEvent(CEGUI::MenuItem::EventMouseLeaves,   pMenubar ?	CEGUI::Event::Subscriber(&amp;amp;DemoSample::onMouseLeavesMenuItem, this)&lt;br /&gt;
																												:	CEGUI::Event::Subscriber(&amp;amp;DemoSample::onMouseLeavesPopupMenuItem, this)); &lt;br /&gt;
				if(pParent-&amp;gt;getChildAtIdx(childIdx)-&amp;gt;testClassName(&amp;quot;MenuItem&amp;quot;))&lt;br /&gt;
				{&lt;br /&gt;
					pParent-&amp;gt;getChildAtIdx(childIdx)-&amp;gt;subscribeEvent(CEGUI::MenuItem::EventClicked, CEGUI::Event::Subscriber(&amp;amp;DemoSample::onMenuItemClicked, this));&lt;br /&gt;
				}&lt;br /&gt;
			} &lt;br /&gt;
			configureMenu(pParent-&amp;gt;getChildAtIdx(childIdx), pMenubar); &lt;br /&gt;
		} &lt;br /&gt;
	} &lt;br /&gt;
&lt;br /&gt;
	//-------------------------------------------------------------------&lt;br /&gt;
	bool onMouseEntersMenuItem(const CEGUI::EventArgs&amp;amp; e)&lt;br /&gt;
	{&lt;br /&gt;
		// Open or close a submenu&lt;br /&gt;
		const CEGUI::WindowEventArgs&amp;amp; we = static_cast&amp;lt;const CEGUI::WindowEventArgs&amp;amp;&amp;gt;(e);&lt;br /&gt;
		CEGUI::MenuItem* menuItem = static_cast&amp;lt;CEGUI::MenuItem*&amp;gt;(we.window);&lt;br /&gt;
		if(menuItem)&lt;br /&gt;
		{&lt;br /&gt;
			setStatusText( menuItem-&amp;gt;getTooltipText() );&lt;br /&gt;
			if( menuItem-&amp;gt;getPopupMenu() )&lt;br /&gt;
			{&lt;br /&gt;
				if( menuItem-&amp;gt;isOpened() )&lt;br /&gt;
				{&lt;br /&gt;
					if(menuItem-&amp;gt;testClassName(&amp;quot;MenuItem&amp;quot;))&lt;br /&gt;
					{&lt;br /&gt;
						menuItem-&amp;gt;closePopupMenu();&lt;br /&gt;
					}&lt;br /&gt;
				}&lt;br /&gt;
				else&lt;br /&gt;
				{&lt;br /&gt;
					menuItem-&amp;gt;openPopupMenu();&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			setStatusText( &amp;quot;&amp;quot; );&lt;br /&gt;
		}&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	//-------------------------------------------------------------------&lt;br /&gt;
	bool onMouseLeavesMenuItem(const CEGUI::EventArgs&amp;amp; e)&lt;br /&gt;
	{&lt;br /&gt;
		// Close a menu&lt;br /&gt;
		const CEGUI::WindowEventArgs&amp;amp; we = static_cast&amp;lt;const CEGUI::WindowEventArgs&amp;amp;&amp;gt;(e);&lt;br /&gt;
		setStatusText( &amp;quot;&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
		CEGUI::Window* menubar = we.window;&lt;br /&gt;
		while(menubar)&lt;br /&gt;
		{&lt;br /&gt;
			if( menubar-&amp;gt;testClassName(&amp;quot;Menubar&amp;quot;) )&lt;br /&gt;
			{&lt;br /&gt;
				// We found the root; a menu bar&lt;br /&gt;
				CEGUI::Vector2 childPosition = CEGUI::MouseCursor::getSingleton().getPosition();&lt;br /&gt;
				CEGUI::Window* windowUnderTheCursor = menubar-&amp;gt;getTargetChildAtPosition(childPosition);&lt;br /&gt;
				if(!windowUnderTheCursor)&lt;br /&gt;
				{&lt;br /&gt;
					CEGUI::MenuItem* popupMenu = static_cast&amp;lt;CEGUI::Menubar*&amp;gt;(menubar)-&amp;gt;getPopupMenuItem();&lt;br /&gt;
					if(popupMenu)&lt;br /&gt;
					{&lt;br /&gt;
						// This does not close sub-popup menus, only the current one&lt;br /&gt;
						popupMenu-&amp;gt;closePopupMenu();&lt;br /&gt;
					}&lt;br /&gt;
				}&lt;br /&gt;
				break;&lt;br /&gt;
			}&lt;br /&gt;
			menubar = menubar-&amp;gt;getParent();&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	//-------------------------------------------------------------------&lt;br /&gt;
	bool onMouseLeavesPopupMenuItem(const CEGUI::EventArgs&amp;amp; e)&lt;br /&gt;
	{&lt;br /&gt;
		// Close a popup menu&lt;br /&gt;
		const CEGUI::WindowEventArgs&amp;amp; we = static_cast&amp;lt;const CEGUI::WindowEventArgs&amp;amp;&amp;gt;(e);&lt;br /&gt;
		setStatusText( &amp;quot;&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
		CEGUI::Window* menubar = we.window;&lt;br /&gt;
		CEGUI::Window* popupParent;&lt;br /&gt;
		while(menubar)&lt;br /&gt;
		{&lt;br /&gt;
			popupParent = menubar-&amp;gt;getParent();&lt;br /&gt;
			if( popupParent&lt;br /&gt;
				&amp;amp;&amp;amp; !popupParent-&amp;gt;testClassName(&amp;quot;Menubar&amp;quot;)&lt;br /&gt;
				&amp;amp;&amp;amp; !popupParent-&amp;gt;testClassName(&amp;quot;PopupMenu&amp;quot;)&lt;br /&gt;
				&amp;amp;&amp;amp; !popupParent-&amp;gt;testClassName(&amp;quot;MenuItem&amp;quot;)&lt;br /&gt;
				)&lt;br /&gt;
			{&lt;br /&gt;
				// We found the root; a popup menu&lt;br /&gt;
				CEGUI::Window* popupMenu = menubar;&lt;br /&gt;
				menubar = menubar-&amp;gt;getParent();&lt;br /&gt;
				CEGUI::Vector2 childPosition = CEGUI::MouseCursor::getSingleton().getPosition();&lt;br /&gt;
				CEGUI::Window* windowUnderTheCursor = menubar-&amp;gt;getTargetChildAtPosition(childPosition);&lt;br /&gt;
				if(!windowUnderTheCursor)&lt;br /&gt;
				{&lt;br /&gt;
					popupMenu-&amp;gt;hide();&lt;br /&gt;
				}&lt;br /&gt;
				break;&lt;br /&gt;
			}&lt;br /&gt;
			menubar = menubar-&amp;gt;getParent();&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	//-------------------------------------------------------------------&lt;br /&gt;
	bool onMenuItemClicked(const CEGUI::EventArgs&amp;amp; e)&lt;br /&gt;
	{&lt;br /&gt;
		const CEGUI::WindowEventArgs&amp;amp; we = static_cast&amp;lt;const CEGUI::WindowEventArgs&amp;amp;&amp;gt;(e);&lt;br /&gt;
		setStatusText( &amp;quot;Clicked &amp;quot; + we.window-&amp;gt;getName() );&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	//-------------------------------------------------------------------&lt;br /&gt;
	bool onMenuKey(const CEGUI::EventArgs&amp;amp; e)&lt;br /&gt;
	{&lt;br /&gt;
		// Open or close a menu&lt;br /&gt;
		const CEGUI::KeyEventArgs&amp;amp; ke = static_cast&amp;lt;const CEGUI::KeyEventArgs&amp;amp;&amp;gt;(e);&lt;br /&gt;
		if(ke.sysKeys == CEGUI::Key::LeftAlt&lt;br /&gt;
			|| ke.sysKeys == CEGUI::Key::RightAlt&lt;br /&gt;
			|| ke.sysKeys == CEGUI::Key::Slash&lt;br /&gt;
			|| ke.codepoint == 47) // Slash&lt;br /&gt;
		{&lt;br /&gt;
			CEGUI::WindowManager&amp;amp; winMgr = CEGUI::WindowManager::getSingleton();&lt;br /&gt;
			CEGUI::Menubar* menuBar = static_cast&amp;lt;CEGUI::Menubar*&amp;gt;(winMgr.getWindow(&amp;quot;Root/FrameWindow/Menubar&amp;quot;));&lt;br /&gt;
			CEGUI::MenuItem* menuItem = menuBar-&amp;gt;getPopupMenuItem();&lt;br /&gt;
			if(menuItem)&lt;br /&gt;
			{&lt;br /&gt;
				// There's a menu opened, let's close it&lt;br /&gt;
				menuBar-&amp;gt;changePopupMenuItem(0);&lt;br /&gt;
			}&lt;br /&gt;
			else&lt;br /&gt;
			{&lt;br /&gt;
				// The menu is closed, let's open the first menu&lt;br /&gt;
				menuItem = static_cast&amp;lt;CEGUI::MenuItem*&amp;gt;(winMgr.getWindow(&amp;quot;Root/FrameWindow/Menubar/File&amp;quot;));&lt;br /&gt;
				menuBar-&amp;gt;changePopupMenuItem(menuItem);&lt;br /&gt;
&lt;br /&gt;
				// Select the first item from this menu ??&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	//-------------------------------------------------------------------&lt;br /&gt;
	bool onPopupMenu(const CEGUI::EventArgs&amp;amp; e)&lt;br /&gt;
	{&lt;br /&gt;
		// Open a context-sensitive menu&lt;br /&gt;
		const CEGUI::MouseEventArgs&amp;amp; me = static_cast&amp;lt;const CEGUI::MouseEventArgs&amp;amp;&amp;gt;(e);&lt;br /&gt;
		if(me.button == CEGUI::RightButton)&lt;br /&gt;
		{&lt;br /&gt;
			CEGUI::WindowManager&amp;amp; winMgr = CEGUI::WindowManager::getSingleton();&lt;br /&gt;
			CEGUI::PopupMenu* popupMenu = 0;&lt;br /&gt;
			if(me.window-&amp;gt;getName().compare(&amp;quot;Root/FrameWindow/FirstPopup&amp;quot;) == 0)&lt;br /&gt;
			{&lt;br /&gt;
				popupMenu = static_cast&amp;lt;CEGUI::PopupMenu*&amp;gt;(winMgr.getWindow(&amp;quot;Root/Popup/PopupMenus/FirstPopup/AutoPopup&amp;quot;));&lt;br /&gt;
			}&lt;br /&gt;
			else if(me.window-&amp;gt;getName().compare(&amp;quot;Root/FrameWindow/SecondPopup&amp;quot;) == 0)&lt;br /&gt;
			{&lt;br /&gt;
				popupMenu = static_cast&amp;lt;CEGUI::PopupMenu*&amp;gt;(winMgr.getWindow(&amp;quot;Root/Popup/PopupMenus/SecondPopup/AutoPopup&amp;quot;));&lt;br /&gt;
			}&lt;br /&gt;
			else if(me.window-&amp;gt;getName().compare(&amp;quot;Root/FrameWindow&amp;quot;) == 0)&lt;br /&gt;
			{&lt;br /&gt;
				popupMenu = static_cast&amp;lt;CEGUI::PopupMenu*&amp;gt;(winMgr.getWindow(&amp;quot;Root/Popup/PopupMenus/FramePopup/AutoPopup&amp;quot;));&lt;br /&gt;
			}&lt;br /&gt;
			else if(me.window-&amp;gt;getName().compare(&amp;quot;Root&amp;quot;) == 0)&lt;br /&gt;
			{&lt;br /&gt;
				popupMenu = static_cast&amp;lt;CEGUI::PopupMenu*&amp;gt;(winMgr.getWindow(&amp;quot;Root/Popup/PopupMenus/SheetPopup/AutoPopup&amp;quot;));&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			if(popupMenu)&lt;br /&gt;
			{&lt;br /&gt;
				// Make the window the popup's parent&lt;br /&gt;
				me.window-&amp;gt;addChildWindow(popupMenu);&lt;br /&gt;
&lt;br /&gt;
				// Position of the popup menu&lt;br /&gt;
				CEGUI::UVector2 popupPosition;&lt;br /&gt;
&lt;br /&gt;
				// Ensure the popup menu will be fully displayed horizontally on the screen&lt;br /&gt;
				float screenWidth = CEGUI::System::getSingleton().getRenderer()-&amp;gt;getWidth();&lt;br /&gt;
				float popupMenuWidth = popupMenu-&amp;gt;getWidth().d_offset;&lt;br /&gt;
				if(popupMenuWidth &amp;lt; screenWidth)&lt;br /&gt;
				{&lt;br /&gt;
					// The x coordinate is either the mouse position or the right side of the&lt;br /&gt;
					// screen minus the width of the popup menu.  This ensures that the popup&lt;br /&gt;
					// menu is fully displayed rather than clipped.&lt;br /&gt;
					float x;&lt;br /&gt;
					if(mouseToLeftOfPopupMenu)&lt;br /&gt;
					{&lt;br /&gt;
						x = me.position.d_x + popupMenuWidth &amp;gt; screenWidth ? screenWidth - popupMenuWidth&lt;br /&gt;
																		   : me.position.d_x - mouseOffset;&lt;br /&gt;
					}&lt;br /&gt;
					else&lt;br /&gt;
					{&lt;br /&gt;
						x = me.position.d_x &amp;lt; popupMenuWidth ? 0.0f&lt;br /&gt;
															 : me.position.d_x - popupMenuWidth + mouseOffset;&lt;br /&gt;
					}&lt;br /&gt;
					popupPosition.d_x = cegui_absdim(CEGUI::CoordConverter::screenToWindowX(*me.window, x));&lt;br /&gt;
				}&lt;br /&gt;
				else&lt;br /&gt;
				{&lt;br /&gt;
					// The popup menu is too wide to fit within the screen&lt;br /&gt;
					popupPosition.d_x = CEGUI::UDim(0.0f, 0.0f);&lt;br /&gt;
				}&lt;br /&gt;
&lt;br /&gt;
				// Ensure the popup menu will be fully displayed vertically on the screen&lt;br /&gt;
				float screenHeight = CEGUI::System::getSingleton().getRenderer()-&amp;gt;getHeight();&lt;br /&gt;
				float popupMenuHeight = popupMenu-&amp;gt;getHeight().d_offset;&lt;br /&gt;
				if(popupMenuHeight &amp;lt; screenHeight)&lt;br /&gt;
				{&lt;br /&gt;
					// The y coordinate is either the mouse position or the bottom side of the&lt;br /&gt;
					// screen minus the height of the popup menu.  This ensures that the popup&lt;br /&gt;
					// menu is fully displayed rather than clipped.&lt;br /&gt;
					float y = me.position.d_y + popupMenuHeight &amp;gt; screenHeight ? screenHeight - popupMenuHeight&lt;br /&gt;
																			   : me.position.d_y - mouseOffset;&lt;br /&gt;
					popupPosition.d_y = cegui_absdim(CEGUI::CoordConverter::screenToWindowY(*me.window, y));&lt;br /&gt;
				}&lt;br /&gt;
				else&lt;br /&gt;
				{&lt;br /&gt;
					// The popup menu is too tall to fit within the screen&lt;br /&gt;
					popupPosition.d_y = CEGUI::UDim(0.0f, 0.0f);&lt;br /&gt;
				}&lt;br /&gt;
&lt;br /&gt;
				// Position the context menu&lt;br /&gt;
				popupMenu-&amp;gt;setPosition(popupPosition);&lt;br /&gt;
&lt;br /&gt;
				// Show the popup menu&lt;br /&gt;
				popupMenu-&amp;gt;show();&lt;br /&gt;
&lt;br /&gt;
				// Ensure it appears on top of the other widgets&lt;br /&gt;
				popupMenu-&amp;gt;moveToFront();&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	//-------------------------------------------------------------------&lt;br /&gt;
	void setStatusText(const CEGUI::String&amp;amp; pText)&lt;br /&gt;
	{&lt;br /&gt;
		CEGUI::WindowManager&amp;amp; winMgr = CEGUI::WindowManager::getSingleton();&lt;br /&gt;
		winMgr.getWindow(&amp;quot;Root/FrameWindow/Status&amp;quot;)-&amp;gt;setText(pText);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#endif // _Menu_h_&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Main.cpp ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&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;Menu_demo.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;
    int i = app.run();&lt;br /&gt;
    return i;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Menu.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;Root/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;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.00952756,0},{0.0104167,0},{0.51085,0},{0.585417,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/Menubar&amp;quot; Name=&amp;quot;Root/FrameWindow/Menubar&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;ItemSpacing&amp;quot; Value=&amp;quot;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,0},{0.09,0},{0.997727,0},{0.191014,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/FrameWindow/Menubar/File&amp;quot; &amp;gt;&lt;br /&gt;
                    &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;File&amp;quot; /&amp;gt;&lt;br /&gt;
                    &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;Yes, primary menuitems can have a tooltip&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,7},{0,0},{0,30},{0,21}}&amp;quot; /&amp;gt;&lt;br /&gt;
                    &amp;lt;Property Name=&amp;quot;VerticalAlignment&amp;quot; Value=&amp;quot;Centre&amp;quot; /&amp;gt;&lt;br /&gt;
                    &amp;lt;Window Type=&amp;quot;TaharezLook/PopupMenu&amp;quot; Name=&amp;quot;Root/FrameWindow/Menubar/File/AutoPopup&amp;quot; &amp;gt;&lt;br /&gt;
                        &amp;lt;Property Name=&amp;quot;Visible&amp;quot; Value=&amp;quot;False&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;Property Name=&amp;quot;FadeInTime&amp;quot; Value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;Property Name=&amp;quot;FadeOutTime&amp;quot; Value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;Property Name=&amp;quot;ItemSpacing&amp;quot; Value=&amp;quot;2&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;ClippedByParent&amp;quot; Value=&amp;quot;False&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0,0},{0,0},{0,42},{0,119.174}}&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;Property Name=&amp;quot;AutoResizeEnabled&amp;quot; Value=&amp;quot;True&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/FrameWindow/Menubar/File/New&amp;quot; &amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;New&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;Creates a new document.&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,2},{0,2},{0,39},{0,23}}&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;/Window&amp;gt;&lt;br /&gt;
                        &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/FrameWindow/Menubar/File/Open&amp;quot; &amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Open...&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;Opens an existing document.&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,2},{0,25},{0,39},{0,46}}&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;/Window&amp;gt;&lt;br /&gt;
                        &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/FrameWindow/Menubar/File/Close&amp;quot; &amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Close&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;Closes the active document.&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,2},{0,48},{0,39},{0,69}}&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;/Window&amp;gt;&lt;br /&gt;
                        &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/FrameWindow/Menubar/File/Save&amp;quot; &amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Save&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;Saves the active document.&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,2},{0,71},{0,39},{0,92}}&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;/Window&amp;gt;&lt;br /&gt;
                        &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/FrameWindow/Menubar/File/Exit&amp;quot; &amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Exit&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;Quits the application; prompts you to save documents.&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,2},{0,94},{0,39},{0,115}}&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;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/FrameWindow/Menubar/Edit&amp;quot; &amp;gt;&lt;br /&gt;
                    &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Edit&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,40},{0,0},{0,64},{0,21}}&amp;quot; /&amp;gt;&lt;br /&gt;
                    &amp;lt;Property Name=&amp;quot;VerticalAlignment&amp;quot; Value=&amp;quot;Centre&amp;quot; /&amp;gt;&lt;br /&gt;
                    &amp;lt;Window Type=&amp;quot;TaharezLook/PopupMenu&amp;quot; Name=&amp;quot;Root/FrameWindow/Menubar/Edit/AutoPopup&amp;quot; &amp;gt;&lt;br /&gt;
                        &amp;lt;Property Name=&amp;quot;Visible&amp;quot; Value=&amp;quot;False&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;Property Name=&amp;quot;FadeInTime&amp;quot; Value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;Property Name=&amp;quot;FadeOutTime&amp;quot; Value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;Property Name=&amp;quot;ItemSpacing&amp;quot; Value=&amp;quot;2&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;ClippedByParent&amp;quot; Value=&amp;quot;False&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0,0},{0,0},{0,65},{0,118.661}}&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;Property Name=&amp;quot;AutoResizeEnabled&amp;quot; Value=&amp;quot;True&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/FrameWindow/Menubar/Edit/Cut&amp;quot; &amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Cut&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;Cuts the selection and puts it on the Clipboard.&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,2},{0,2},{0,62},{0,23}}&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;/Window&amp;gt;&lt;br /&gt;
                        &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/FrameWindow/Menubar/Edit/Copy&amp;quot; &amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Copy&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;Copies the selection and puts it on the Clipboard.&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,2},{0,25},{0,62},{0,46}}&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;/Window&amp;gt;&lt;br /&gt;
                        &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/FrameWindow/Menubar/Edit/Paste&amp;quot; &amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Paste&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;Inserts the Clipboard contents.&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,2},{0,48},{0,62},{0,69}}&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;/Window&amp;gt;&lt;br /&gt;
                        &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/FrameWindow/Menubar/Edit/Delete&amp;quot; &amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Delete&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;Erases the selection.&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,2},{0,71},{0,62},{0,92}}&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;/Window&amp;gt;&lt;br /&gt;
                        &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/FrameWindow/Menubar/Edit/SubMenu&amp;quot; &amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;SubMenu&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;This menuitem has a submenu&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,2},{0,94},{0,62},{0,115}}&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Window Type=&amp;quot;TaharezLook/PopupMenu&amp;quot; Name=&amp;quot;Root/FrameWindow/Menubar/Edit/SubMenu/AutoPopup&amp;quot; &amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Visible&amp;quot; Value=&amp;quot;False&amp;quot; /&amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;FadeInTime&amp;quot; Value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;FadeOutTime&amp;quot; Value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;ItemSpacing&amp;quot; Value=&amp;quot;2&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;ClippedByParent&amp;quot; Value=&amp;quot;False&amp;quot; /&amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0,0},{0,0},{0,43},{0,49.5221}}&amp;quot; /&amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;AutoResizeEnabled&amp;quot; Value=&amp;quot;True&amp;quot; /&amp;gt;&lt;br /&gt;
                                &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/FrameWindow/Menubar/Edit/SubMenu/Item1&amp;quot; &amp;gt;&lt;br /&gt;
                                    &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Item 1&amp;quot; /&amp;gt;&lt;br /&gt;
                                    &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;This is sub-menu #1&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,2},{0,2},{0,40},{0,23}}&amp;quot; /&amp;gt;&lt;br /&gt;
                                &amp;lt;/Window&amp;gt;&lt;br /&gt;
                                &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/FrameWindow/Menubar/Edit/SubMenu/Item2&amp;quot; &amp;gt;&lt;br /&gt;
                                    &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Item 2&amp;quot; /&amp;gt;&lt;br /&gt;
                                    &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;This is sub-menu #2&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,2},{0,25},{0,40},{0,46}}&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;/Window&amp;gt;&lt;br /&gt;
                &amp;lt;/Window&amp;gt;&lt;br /&gt;
                &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/FrameWindow/Menubar/Help&amp;quot; &amp;gt;&lt;br /&gt;
                    &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Help&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,74},{0,0},{0,100},{0,21}}&amp;quot; /&amp;gt;&lt;br /&gt;
                    &amp;lt;Property Name=&amp;quot;VerticalAlignment&amp;quot; Value=&amp;quot;Centre&amp;quot; /&amp;gt;&lt;br /&gt;
                    &amp;lt;Window Type=&amp;quot;TaharezLook/PopupMenu&amp;quot; Name=&amp;quot;Root/FrameWindow/Menubar/Help/AutoPopup&amp;quot; &amp;gt;&lt;br /&gt;
                        &amp;lt;Property Name=&amp;quot;Visible&amp;quot; Value=&amp;quot;False&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;Property Name=&amp;quot;FadeInTime&amp;quot; Value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;Property Name=&amp;quot;FadeOutTime&amp;quot; Value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;Property Name=&amp;quot;ItemSpacing&amp;quot; Value=&amp;quot;2&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;ClippedByParent&amp;quot; Value=&amp;quot;False&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0,0},{0,0},{0,64},{0,49.1331}}&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;Property Name=&amp;quot;AutoResizeEnabled&amp;quot; Value=&amp;quot;True&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/FrameWindow/Menubar/Help/Contents&amp;quot; &amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Contents...&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;Displays the help contents.&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,2},{0,2},{0,61},{0,23}}&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;/Window&amp;gt;&lt;br /&gt;
                        &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/FrameWindow/Menubar/Help/About&amp;quot; &amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;About...&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;Displays program information, version number, and copyright.&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,2},{0,25},{0,61},{0,46}}&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;/Window&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/StaticText&amp;quot; Name=&amp;quot;Root/FrameWindow/Status&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.031818,0},{0.873954,0},{0.972728,0},{0.967087,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;Root/FrameWindow/FirstPopup&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;First Popup&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;HorzFormatting&amp;quot; Value=&amp;quot;HorzCentred&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.131194,0},{0.701449,0},{0.431194,0},{0.795652,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;Root/FrameWindow/SecondPopup&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;Second Popup&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;HorzFormatting&amp;quot; Value=&amp;quot;HorzCentred&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.572904,0},{0.701449,0},{0.872903,0},{0.795652,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 Type=&amp;quot;TaharezLook/Menubar&amp;quot; Name=&amp;quot;Root/Popup&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;ItemSpacing&amp;quot; Value=&amp;quot;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.565585,0},{0.07,0},{0.684029,0},{0.140833,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/Popup/PopupMenus&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;PopupMenus&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,7},{0,0},{0,73},{0,21}}&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;VerticalAlignment&amp;quot; Value=&amp;quot;Centre&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Window Type=&amp;quot;TaharezLook/PopupMenu&amp;quot; Name=&amp;quot;Root/Popup/PopupMenus/AutoPopup&amp;quot; &amp;gt;&lt;br /&gt;
                    &amp;lt;Property Name=&amp;quot;FadeInTime&amp;quot; Value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                    &amp;lt;Property Name=&amp;quot;FadeOutTime&amp;quot; Value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                    &amp;lt;Property Name=&amp;quot;ItemSpacing&amp;quot; Value=&amp;quot;2&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;ClippedByParent&amp;quot; Value=&amp;quot;False&amp;quot; /&amp;gt;&lt;br /&gt;
                    &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0,0},{0,21},{0,57},{0,116.749}}&amp;quot; /&amp;gt;&lt;br /&gt;
                    &amp;lt;Property Name=&amp;quot;AutoResizeEnabled&amp;quot; Value=&amp;quot;True&amp;quot; /&amp;gt;&lt;br /&gt;
                    &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/Popup/PopupMenus/FirstPopup&amp;quot; &amp;gt;&lt;br /&gt;
                        &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;First&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,2},{0,2},{0,54},{0,23}}&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;Window Type=&amp;quot;TaharezLook/PopupMenu&amp;quot; Name=&amp;quot;Root/Popup/PopupMenus/FirstPopup/AutoPopup&amp;quot; &amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;FadeInTime&amp;quot; Value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;FadeOutTime&amp;quot; Value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;ItemSpacing&amp;quot; Value=&amp;quot;2&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;ClippedByParent&amp;quot; Value=&amp;quot;False&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0,52},{0,0},{0,97},{0,119.266}}&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;AutoResizeEnabled&amp;quot; Value=&amp;quot;True&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/Popup/PopupMenus/FirstPopup/First-1&amp;quot; &amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;First-1&amp;quot; /&amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;First-1&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,2},{0,2},{0,42},{0,23}}&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;/Window&amp;gt;&lt;br /&gt;
                            &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/Popup/PopupMenus/FirstPopup/First-2&amp;quot; &amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;First-2&amp;quot; /&amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;First-2&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,2},{0,25},{0,42},{0,46}}&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;/Window&amp;gt;&lt;br /&gt;
                            &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/Popup/PopupMenus/FirstPopup/First-3&amp;quot; &amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;First-3&amp;quot; /&amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;First-3&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,2},{0,48},{0,42},{0,69}}&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;/Window&amp;gt;&lt;br /&gt;
                            &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/Popup/PopupMenus/FirstPopup/First-4&amp;quot; &amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;First-4&amp;quot; /&amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;First-4&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,2},{0,71},{0,42},{0,92}}&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;/Window&amp;gt;&lt;br /&gt;
                            &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/Popup/PopupMenus/FirstPopup/First-5&amp;quot; &amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;First-5&amp;quot; /&amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;First-5&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,2},{0,94},{0,42},{0,115}}&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;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/Popup/PopupMenus/SecondPopup&amp;quot; &amp;gt;&lt;br /&gt;
                        &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Second&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,2},{0,25},{0,54},{0,46}}&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;Window Type=&amp;quot;TaharezLook/PopupMenu&amp;quot; Name=&amp;quot;Root/Popup/PopupMenus/SecondPopup/AutoPopup&amp;quot; &amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;FadeInTime&amp;quot; Value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;FadeOutTime&amp;quot; Value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;ItemSpacing&amp;quot; Value=&amp;quot;2&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;ClippedByParent&amp;quot; Value=&amp;quot;False&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0,52},{0,0},{0,117},{0,119.11}}&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;AutoResizeEnabled&amp;quot; Value=&amp;quot;True&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/Popup/PopupMenus/SecondPopup/Second-1&amp;quot; &amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Second-1&amp;quot; /&amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;Second-1&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,2},{0,2},{0,62},{0,23}}&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;/Window&amp;gt;&lt;br /&gt;
                            &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/Popup/PopupMenus/SecondPopup/Second-2&amp;quot; &amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Second-2&amp;quot; /&amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;Second-2&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,2},{0,25},{0,62},{0,46}}&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;/Window&amp;gt;&lt;br /&gt;
                            &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/Popup/PopupMenus/SecondPopup/Second-3&amp;quot; &amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Second-3&amp;quot; /&amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;Second-3&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,2},{0,48},{0,62},{0,69}}&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;/Window&amp;gt;&lt;br /&gt;
                            &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/Popup/PopupMenus/SecondPopup/Second-4&amp;quot; &amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Second-4&amp;quot; /&amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;Second-4&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,2},{0,71},{0,62},{0,92}}&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;/Window&amp;gt;&lt;br /&gt;
                            &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/Popup/PopupMenus/SecondPopup/SubMenu&amp;quot; &amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;SubMenu&amp;quot; /&amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;SubMenu&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,2},{0,94},{0,62},{0,115}}&amp;quot; /&amp;gt;&lt;br /&gt;
                                &amp;lt;Window Type=&amp;quot;TaharezLook/PopupMenu&amp;quot; Name=&amp;quot;Root/Popup/PopupMenus/SecondPopup/SubMenu/AutoPopup&amp;quot; &amp;gt;&lt;br /&gt;
                                    &amp;lt;Property Name=&amp;quot;FadeInTime&amp;quot; Value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                                    &amp;lt;Property Name=&amp;quot;FadeOutTime&amp;quot; Value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                                    &amp;lt;Property Name=&amp;quot;ItemSpacing&amp;quot; Value=&amp;quot;2&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;ClippedByParent&amp;quot; Value=&amp;quot;False&amp;quot; /&amp;gt;&lt;br /&gt;
                                    &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0,60},{0,0},{0,118},{0,49.3892}}&amp;quot; /&amp;gt;&lt;br /&gt;
                                    &amp;lt;Property Name=&amp;quot;AutoResizeEnabled&amp;quot; Value=&amp;quot;True&amp;quot; /&amp;gt;&lt;br /&gt;
                                    &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/Popup/PopupMenus/SecondPopup/SubMenu/SubItem1&amp;quot; &amp;gt;&lt;br /&gt;
                                        &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;SubItem1&amp;quot; /&amp;gt;&lt;br /&gt;
                                        &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;SubItem1&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,2},{0,2},{0,55},{0,23}}&amp;quot; /&amp;gt;&lt;br /&gt;
                                    &amp;lt;/Window&amp;gt;&lt;br /&gt;
                                    &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/Popup/PopupMenus/SecondPopup/SubMenu/SubItem2&amp;quot; &amp;gt;&lt;br /&gt;
                                        &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;SubItem2&amp;quot; /&amp;gt;&lt;br /&gt;
                                        &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;SubItem2&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,2},{0,25},{0,55},{0,46}}&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;/Window&amp;gt;&lt;br /&gt;
                    &amp;lt;/Window&amp;gt;&lt;br /&gt;
                    &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/Popup/PopupMenus/FramePopup&amp;quot; &amp;gt;&lt;br /&gt;
                        &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Frame&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,2},{0,48},{0,54},{0,69}}&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;Window Type=&amp;quot;TaharezLook/PopupMenu&amp;quot; Name=&amp;quot;Root/Popup/PopupMenus/FramePopup/AutoPopup&amp;quot; &amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;FadeInTime&amp;quot; Value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;FadeOutTime&amp;quot; Value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;ItemSpacing&amp;quot; Value=&amp;quot;2&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;ClippedByParent&amp;quot; Value=&amp;quot;False&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0,52},{0,0},{0,104},{0,49.3892}}&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;AutoResizeEnabled&amp;quot; Value=&amp;quot;True&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/Popup/PopupMenus/FramePopup/Frame-1&amp;quot; &amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Frame-1&amp;quot; /&amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;Frame-1&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,2},{0,2},{0,49},{0,23}}&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;/Window&amp;gt;&lt;br /&gt;
                            &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/Popup/PopupMenus/FramePopup/Frame-2&amp;quot; &amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Frame-2&amp;quot; /&amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;Frame-2&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,2},{0,25},{0,49},{0,46}}&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;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/Popup/PopupMenus/SheetPopup&amp;quot; &amp;gt;&lt;br /&gt;
                        &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Sheet&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,2},{0,71},{0,54},{0,92}}&amp;quot; /&amp;gt;&lt;br /&gt;
                        &amp;lt;Window Type=&amp;quot;TaharezLook/PopupMenu&amp;quot; Name=&amp;quot;Root/Popup/PopupMenus/SheetPopup/AutoPopup&amp;quot; &amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;FadeInTime&amp;quot; Value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;FadeOutTime&amp;quot; Value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;ItemSpacing&amp;quot; Value=&amp;quot;2&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;ClippedByParent&amp;quot; Value=&amp;quot;False&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0,52},{0,0},{0,87},{0,119.243}}&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Property Name=&amp;quot;AutoResizeEnabled&amp;quot; Value=&amp;quot;True&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/Popup/PopupMenus/SheetPopup/Allo&amp;quot; &amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Allo&amp;quot; /&amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;FranÃ§ais&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,2},{0,2},{0,32},{0,23}}&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;/Window&amp;gt;&lt;br /&gt;
                            &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/Popup/PopupMenus/SheetPopup/Hello&amp;quot; &amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Hello&amp;quot; /&amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;English&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,2},{0,25},{0,32},{0,46}}&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;/Window&amp;gt;&lt;br /&gt;
                            &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/Popup/PopupMenus/SheetPopup/Hallo&amp;quot; &amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Hallo&amp;quot; /&amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;Deutsch&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,2},{0,48},{0,32},{0,69}}&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;/Window&amp;gt;&lt;br /&gt;
                            &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/Popup/PopupMenus/SheetPopup/Ciao&amp;quot; &amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Ciao&amp;quot; /&amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;Italiano&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,2},{0,71},{0,32},{0,92}}&amp;quot; /&amp;gt;&lt;br /&gt;
                            &amp;lt;/Window&amp;gt;&lt;br /&gt;
                            &amp;lt;Window Type=&amp;quot;TaharezLook/MenuItem&amp;quot; Name=&amp;quot;Root/Popup/PopupMenus/SheetPopup/Hola&amp;quot; &amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Hola&amp;quot; /&amp;gt;&lt;br /&gt;
                                &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;EspaÃ±ol&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,2},{0,94},{0,32},{0,115}}&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;/Window&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>Rackle</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=The_Main_Menu&amp;diff=2823</id>
		<title>The Main Menu</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=The_Main_Menu&amp;diff=2823"/>
				<updated>2008-02-01T12:23:54Z</updated>
		
		<summary type="html">&lt;p&gt;Rackle: /* Wrapping It all up */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;So, you've probably read all the Beginner Guide to X tutorials (if not then go back and read them !), your sitting there still feeling lost, and you can't find exactly how to bring all the stuff you've read together to make a simple GUI. I too found it specially hard to wrap everything together when starting out and hopefully this article should help address this problem for others, I'm still a beginner so there might be a few errors, but for the most part the code has been tested. This tutorial will be rather Ogre oriented since thats what I use, I'll try to keep things a little generic though.&lt;br /&gt;
&lt;br /&gt;
This tutorial was last updated on: 7th January 2008 by CrazyEddie&lt;br /&gt;
&lt;br /&gt;
== Getting started ==&lt;br /&gt;
For tutorial purposes, we will quickly run over the Initialisation part (as this has been addressed in other tutorials more thoroughly and is usually engine specific). I will not litter the tutorial with unlrelated code like framelisteners, includes and other stuff. We will be making a main menu which is basicly just a collection of buttons and a StaticImage for background, but it is cruical that you have read the following tutorials and understood them, specially the file types.&lt;br /&gt;
[[http://www.cegui.org.uk/wiki/index.php/Tutorials#CrazyEddie.27s_Beginner_Guides CrazyEddie's Beginner Guides ]]&lt;br /&gt;
[[http://www.ogre3d.org/wiki/index.php/Basic_Tutorial_6 Ogre's Basic Tutorial 6]]&lt;br /&gt;
&lt;br /&gt;
== Creating the Menu: A plan of action ==&lt;br /&gt;
There are 3 ways to go about this, one way is to hardcode the menu (which is a bad idea unless you don't want your menu to be customisable), the 2nd way is to use although uses an xml based approach by writing layout files, imageset files..etc. The 3rd way is to use the falagard system which is subset of the 2nd approach, but expands even more on the functionality by offering the .looknfeel files which allow you to skin any existing scheme or even create your own. &lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
Ok, before we get started we need to have a few things initialised first, other then Ogre root, scene manager, framelistener....etc. If you've read [[http://www.ogre3d.org/wiki/index.php/Basic_Tutorial_6 basic tutorial 6]] you'll see that we need to have the following defiendone of the looks loaded as well as a font. I'll be using TaharezLook and tahoma-12 for this tutorial, but I'll load the font at a later stage in the tutorial. I'll only use CEGUI:: in this area, but I'll drop using it since it'll be obvious where to use it after a while. Just assume I've used using namespace CEGUI; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
// Initialisation Area&lt;br /&gt;
CEGUI::OgreCEGUIRenderer* mGUIRenderer = new CEGUI::OgreCEGUIRenderer(Root::getSingletonPtr()-&amp;gt;getAutoCreatedWindow(), Ogre::RENDER_QUEUE_OVERLAY, false, 3000);&lt;br /&gt;
CEGUI::System* mGUISystem = new CEGUI::System(mGUIRenderer);&lt;br /&gt;
CEGUI::Logger::getSingleton().setLoggingLevel(CEGUI::Informative); // this is recommended to help with debugging, but not neccessary&lt;br /&gt;
&lt;br /&gt;
CEGUI::SchemeManager::getSingleton().loadScheme((CEGUI::utf8*)&amp;quot;TaharezLook.scheme&amp;quot;);&lt;br /&gt;
mGUISystem-&amp;gt;setDefaultMouseCursor((CEGUI::utf8*)&amp;quot;TaharezLook&amp;quot;, (CEGUI::utf8*)&amp;quot;MouseArrow&amp;quot;);&lt;br /&gt;
CEGUI::Window* mRootWindow= CEGUI::WindowManager::getSingleton().createWindow((CEGUI::utf8*)&amp;quot;DefaultWindow&amp;quot;, (CEGUI::utf8*)&amp;quot;RootWindow&amp;quot;);  &lt;br /&gt;
mGUISystem-&amp;gt;setGUISheet(mRootWindow); // set active Window&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Note 1: Casting string params to UTF8* isn't neccessary, if your application will only use english (latin based languages), it shouldn't be of any use. But if you want to use other languages which are not covered by the ascii chart, you can use the utf8 cast. I won't be using it for this tutorial, but it should be obvious where you can use it&lt;br /&gt;
*Note 2: While its totally legal to use different windows and have children assigned to them, I prefer to have a single root window in which all other windows are childs to it. I initialise it as DefaultWindow* to set it apart from other window types&lt;br /&gt;
*Note 3: You can start your app without initialising a font, so long as you use a Window that doesn't use fonts (e.g: StaticImages)&lt;br /&gt;
&lt;br /&gt;
==== Includes ====&lt;br /&gt;
As I said earlier, I won't be adding #include lines to the tutorial's code to make it smaller. But here is a helpful tip that should spare you wasted time looking for which header to include. &lt;br /&gt;
Unless you #included &amp;quot;CEGUI.h&amp;quot;, you'll need to #include a header when you use a CEGUI class. Since the naming convention of CEGUI is rather helpful. You can almost always count on that class being in &amp;quot;CEGUI'''ClassName'''.h&amp;quot;. Make sure to make the first letter of the word upper case. If the class is 2 words, then each first letter is upper case. Like so&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
#include &amp;quot;CEGUISchemeManager.h&amp;quot;&lt;br /&gt;
#include &amp;quot;CEGUIFontManager.h&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
....etc :)&lt;br /&gt;
&lt;br /&gt;
=== The Code Approach ===&lt;br /&gt;
&lt;br /&gt;
There are a few things you'll constantly need when writing a menu, assuming your gui code is in a different class, we'll attempt to get pointers to them at the beginning of the code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
WindowManager* Wmgr = WindowManager::getSingletonPtr();&lt;br /&gt;
System* mGUISystem = System::getSingletonPtr();&lt;br /&gt;
Window* myRoot = Wmgr-&amp;gt;getWindow(&amp;quot;RootWindow&amp;quot;); // get default window&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== The Menu code ====&lt;br /&gt;
Anyways, now that we got that out of the way, lets get started. I'll write code, then explain it below&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
// Menu Background&lt;br /&gt;
Window* MenuBackground = Wmgr-&amp;gt;createWindow(&amp;quot;TaharezLook/StaticImage&amp;quot;, &amp;quot;Background&amp;quot;);&lt;br /&gt;
myRoot-&amp;gt;addChildWindow( MenuBackground );&lt;br /&gt;
MenuBackground-&amp;gt;setPosition( UVector2( UDim( 0.0f, 0.0f ), UDim( 0.0f, 0.0f) ) );&lt;br /&gt;
MenuBackground-&amp;gt;setSize( UVector2( UDim( 1.0f, 0.0f ), UDim( 1.0f, 0.0f ) ) );  // full screen&lt;br /&gt;
&lt;br /&gt;
// New game Button &lt;br /&gt;
PushButton* NewGame = (PushButton*)Wmgr-&amp;gt;createWindow(&amp;quot;TaharezLook/Button&amp;quot;, &amp;quot;NewGame&amp;quot;);&lt;br /&gt;
MenuBackground-&amp;gt;addChildWindow( NewGame );&lt;br /&gt;
NewGame-&amp;gt;setPosition( UVector2( UDim( 0.2f, 0.0f), UDim( 0.2f, 0.0f ) ) );&lt;br /&gt;
NewGame-&amp;gt;setSize( UVector2( UDim( 0.4f, 0.0f ), UDim( 0.2f, 0.0f ) ) );&lt;br /&gt;
&lt;br /&gt;
// Load game Button &lt;br /&gt;
PushButton* LoadGame= (PushButton*)Wmgr-&amp;gt;createWindow(&amp;quot;TaharezLook/Button&amp;quot;, &amp;quot;LoadGame&amp;quot;);&lt;br /&gt;
MenuBackground-&amp;gt;addChildWindow( LoadGame );&lt;br /&gt;
LoadGame-&amp;gt;setPosition( UVector2( UDim( 0.2f, 0.0f ), UDim( 0.45f, 0.0f ) ) );&lt;br /&gt;
LoadGame-&amp;gt;setSize( UVector2( UDim( 0.4f, 0.0f ), UDim( 0.2f, 0.0f ) ) );&lt;br /&gt;
&lt;br /&gt;
// Quit game Button &lt;br /&gt;
PushButton* QuitGame= (PushButton*)Wmgr-&amp;gt;createWindow(&amp;quot;TaharezLook/Button&amp;quot;, &amp;quot;QuitGame&amp;quot;);&lt;br /&gt;
MenuBackground-&amp;gt;addChildWindow( QuitGame );&lt;br /&gt;
QuitGame-&amp;gt;setPosition( UVector2( UDim( 0.2f, 0.0f ), UDim( 0.7f, 0.0f ) ) );&lt;br /&gt;
QuitGame-&amp;gt;setSize( UVector2( UDim( 0.4f, 0.0f ), UDim( 0.2f, 0.0f ) ) );&lt;br /&gt;
&lt;br /&gt;
mGUISystem-&amp;gt;setGUISheet(myRoot); // this line is redundant since you didn't change gui sheets, but its here to make sure&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will create a menu with 3 empty buttons positioned below each other with an empty background. You always need to define the starting position of the window (the top left edge) and how big the window will be. If you don't you'll never see the window.&lt;br /&gt;
You'll see that the 3 buttons are childs of the Background Menu window, which is a child of the RootWindow.&lt;br /&gt;
&lt;br /&gt;
==== Changing the look ====&lt;br /&gt;
But this is no fun, we want to set Images to the buttons, display text on them, perhaps even use tooltips. The menu isn't really usable this way. But before we start jumping into things, we must do a few things first.&lt;br /&gt;
&lt;br /&gt;
===== Using Fonts ===== &lt;br /&gt;
Before we use text, we'll need to define a font. If you've already done that then skip forward. If not then please add this line to your initialisation code in Prerequisites area.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
if(!FontManager::getSingleton().isFontPresent(&amp;quot;Tahoma-12&amp;quot;))&lt;br /&gt;
  FontManager::getSingleton().createFont(&amp;quot;Tahoma-12.font&amp;quot;);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To add a text line for a button you use:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
ButtonPtr-&amp;gt;setText(&amp;quot;foo&amp;quot;);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Using Tooltips =====&lt;br /&gt;
Now that we've defined a font, we should define tooltips as well in initialisation area. &lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
myGUISystem-&amp;gt;setDefaultTooltip(&amp;quot;TaharezLook/Tooltip&amp;quot;);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should usually just leave this with initialisation along with initialisation. You'll need to inject time pulses each frame though, that was explained here already [[ToolTips]].&lt;br /&gt;
To add a tooltip for a button you use:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
ButtonPtr-&amp;gt;setTooltipText(&amp;quot;foo&amp;quot;);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Using Images =====&lt;br /&gt;
Before using images, we need to define an imageset. You can skip forward to the [[http://www.cegui.org.uk/wiki/index.php/The_Main_Menu#Imagesets imageset explanation in the XML area]] to understand what it means. &lt;br /&gt;
&lt;br /&gt;
Note that you could easily create a full image from a texture using the line below, the auto-created image will be called &amp;quot;full_image&amp;quot;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
Imageset* foo = ImagesetManager::getSingletonPtr()-&amp;gt;createImagesetFromImageFile(&amp;quot;NameOfImageset&amp;quot;, &amp;quot;Image.jpg&amp;quot;);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
But if you want to split it up it'll be alittle harder. You'll need to define a texture&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
Texture* texturePtr = System::getSingletonPtr()-&amp;gt;getRenderer()-&amp;gt;createTexture(&amp;quot;ImageFile.jpg&amp;quot;, &amp;quot;&amp;quot;);&lt;br /&gt;
Imageset* MenuImageset = ImagesetManager::getSingletonPtr()-&amp;gt;createImageset(&amp;quot;ImageName&amp;quot;, texturePtr);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since I'm no artist, we'll just assume we have 2 image files, one with the background image and the other with the different button states (make sure they're loaded in resources.cfg). While there are 4 different states( Normal, Hover, pushed &amp;amp; Disabled) we'll just use 2 different looks (to avoid writing more similar code), one for normal &amp;amp; the other will be shared amongst Hover, Pushed &amp;amp; disabled. The 2nd image will contain the different looks for the button, indicating Up or Down states, check the illustration figure below. Each of the 2 images will have its own imageset.&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;15&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ MenuButtons.jpg&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | Button Up&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | Button Down&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
Imageset* MenuImageset = ImagesetManager::getSingletonPtr()-&amp;gt;createImagesetFromImageFile(&amp;quot;Background&amp;quot;,&amp;quot;MenuBackground.jpg&amp;quot;);&lt;br /&gt;
Texture* texturePtr = System::getSingletonPtr()-&amp;gt;getRenderer()-&amp;gt;createTexture(&amp;quot;MenuButtons.jpg&amp;quot;, &amp;quot;&amp;quot;);&lt;br /&gt;
Imageset* MenuImageset = ImagesetManager::getSingletonPtr()-&amp;gt;createImageset(&amp;quot;Buttons&amp;quot;, texturePtr);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we have our imagesets, we'll need define images in each. The first we'll need to define an the Background image, which will be full size. For the 2nd imageset we'll need to split it up and define 2 images inside of it. One for Button Up, and one for Button Down.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
MenuImageset-&amp;gt;defineImage(&amp;quot;Background&amp;quot;, Point(0.0f,0.0f), Size( 1.0f, 1.0f ), Point(0.0f,0.0f)); // Whole Image&lt;br /&gt;
ButtonsImageset-&amp;gt;defineImage(&amp;quot;ButtonUp&amp;quot;, Point(0.0f,0.0f), Size( 1.0f, 0.5f ), Point(0.0f,0.0f)); // Top half of image&lt;br /&gt;
ButtonsImageset-&amp;gt;defineImage(&amp;quot;ButtonDown&amp;quot;, Point(0.0f,0.5f), Size( 1.0f, 0.5f ), Point(0.0f,0.0f)); // Bottom Half&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
now that we have images defined, we can easily apply them to a window that supports images.  Note the value (second) string used here - is is of the format &amp;quot;set:&amp;lt;imageset name&amp;gt; image:&amp;lt;image name&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
Window-&amp;gt;setProperty( &amp;quot;Image&amp;quot;, &amp;quot;set:ImagesetName image:ImageName&amp;quot; );&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Wrapping It all up ====&lt;br /&gt;
Now lets write the code above again with the new adjustments&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
/*** Stuff you need to do in the initialisation phase ***/&lt;br /&gt;
if(!FontManager::getSingleton().isFontPresent(&amp;quot;Tahoma-12&amp;quot;))&lt;br /&gt;
  FontManager::getSingleton().createFont(&amp;quot;Tahoma-12.font&amp;quot;);&lt;br /&gt;
mGUISystem-&amp;gt;setDefaultTooltip(&amp;quot;TaharezLook/Tooltip&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
// Creating Imagesets and defining images&lt;br /&gt;
Imageset* MenuImageset = ImagesetManager::getSingletonPtr()-&amp;gt;createImagesetFromImageFile(&amp;quot;Background&amp;quot;,&amp;quot;MenuBackground.jpg&amp;quot;);&lt;br /&gt;
Texture* texturePtr = System::getSingletonPtr()-&amp;gt;getRenderer()-&amp;gt;createTexture(&amp;quot;MenuButtons.jpg&amp;quot;, &amp;quot;&amp;quot;); // default resource group&lt;br /&gt;
Imageset* ButtonsImageset = ImagesetManager::getSingletonPtr()-&amp;gt;createImageset(&amp;quot;Buttons&amp;quot;, texturePtr);&lt;br /&gt;
ButtonsImageset-&amp;gt;defineImage(&amp;quot;ButtonUp&amp;quot;, Point(0.0f,0.0f), Size( 0.5f, 0.5f ), Point(0.0f,0.0f)); &lt;br /&gt;
ButtonsImageset-&amp;gt;defineImage(&amp;quot;ButtonDown&amp;quot;, Point(0.0f,0.5f), Size( 0.5f, 0.5f ), Point(0.0f,0.0f));&lt;br /&gt;
&lt;br /&gt;
/*** the menu code ***/&lt;br /&gt;
Window* MenuBackground = Wmgr-&amp;gt;createWindow(&amp;quot;TaharezLook/StaticImage&amp;quot;, &amp;quot;Background&amp;quot;);&lt;br /&gt;
myRoot-&amp;gt;addChildWindow( MenuBackground );&lt;br /&gt;
MenuBackground-&amp;gt;setPosition( UVector2( UDim( 0.0f, 0.0f), UDim( 0.0f, 0.0f ) ) );&lt;br /&gt;
MenuBackground-&amp;gt;setSize( UVector2( UDim( 1.0f, 0.0f), UDim( 1.0f, 0.0f ) ) );  // full screen&lt;br /&gt;
// this is the preferred way to set the image.&lt;br /&gt;
MenuBackground-&amp;gt;setProperty( &amp;quot;Image&amp;quot;, &amp;quot;set:Background image:full_image&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
PushButton* NewGame = (PushButton*)Wmgr-&amp;gt;createWindow(&amp;quot;TaharezLook/Button&amp;quot;, &amp;quot;NewGame&amp;quot;);&lt;br /&gt;
MenuBackground-&amp;gt;addChildWindow( NewGame );&lt;br /&gt;
NewGame-&amp;gt;setPosition( UVector2( UDim( 0.2f, 0.0f ), UDim( 0.2f, 0.0f ) ) );&lt;br /&gt;
NewGame-&amp;gt;setSize( UVector2( UDim( 0.4f, 0.0f ), UDim( 0.2f, 0.0f ) ) );&lt;br /&gt;
NewGame-&amp;gt;setText(&amp;quot;New Game&amp;quot;);&lt;br /&gt;
NewGame-&amp;gt;setProperty( &amp;quot;NormalImage&amp;quot;, &amp;quot;set:Buttons image:ButtonUp&amp;quot; );&lt;br /&gt;
NewGame-&amp;gt;setProperty( &amp;quot;HoverImage&amp;quot;, &amp;quot;set:Buttons image:ButtonDown&amp;quot; );&lt;br /&gt;
NewGame-&amp;gt;setProperty( &amp;quot;PushedImage&amp;quot;, &amp;quot;set:Buttons image:ButtonDown&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
PushButton* LoadGame = (PushButton*)Wmgr-&amp;gt;createWindow(&amp;quot;TaharezLook/Button&amp;quot;, &amp;quot;LoadGame&amp;quot;);&lt;br /&gt;
MenuBackground-&amp;gt;addChildWindow( LoadGame );&lt;br /&gt;
LoadGame-&amp;gt;setPosition( UVector2( UDim(0.2f, 0.0f ), UDim( 0.45f, 0.0f ) ) );&lt;br /&gt;
LoadGame-&amp;gt;setSize( UVector2( UDim(0.4f, 0.0f ), UDim( 0.2f, 0.0f ) ) );&lt;br /&gt;
LoadGame-&amp;gt;setText(&amp;quot;Load Game&amp;quot;);&lt;br /&gt;
LoadGame-&amp;gt;setTooltipText(&amp;quot;Disabled, not implemented yet&amp;quot;);&lt;br /&gt;
LoadGame-&amp;gt;disable();&lt;br /&gt;
LoadGame-&amp;gt;setProperty( &amp;quot;NormalImage&amp;quot;, &amp;quot;set:Buttons image:ButtonUp&amp;quot; );&lt;br /&gt;
LoadGame-&amp;gt;setProperty( &amp;quot;HoverImage&amp;quot;, &amp;quot;set:Buttons image:ButtonDown&amp;quot; );&lt;br /&gt;
LoadGame-&amp;gt;setProperty( &amp;quot;PushedImage&amp;quot;, &amp;quot;set:Buttons image:ButtonDown&amp;quot; );&lt;br /&gt;
LoadGame-&amp;gt;setProperty( &amp;quot;DisabledImage&amp;quot;, &amp;quot;set:Buttons image:ButtonDown&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
PushButton* QuitGame= (PushButton*)Wmgr-&amp;gt;createWindow(&amp;quot;TaharezLook/Button&amp;quot;, &amp;quot;QuitGame&amp;quot;);&lt;br /&gt;
MenuBackground-&amp;gt;addChildWindow( QuitGame );&lt;br /&gt;
QuitGame-&amp;gt;setPosition( UVector2( UDim( 0.2f, 0.0f ), UDim( 0.7f, 0.0f ) ) );&lt;br /&gt;
QuitGame-&amp;gt;setSize( UVector2( UDim( 0.4f, 0.0f ), UDim( 0.2f, 0.0f ) ) );&lt;br /&gt;
QuitGame-&amp;gt;setText(&amp;quot;Quit Game&amp;quot;);&lt;br /&gt;
QuitGame-&amp;gt;setProperty( &amp;quot;NormalImage&amp;quot;, &amp;quot;set:Buttons image:ButtonUp&amp;quot; );&lt;br /&gt;
QuitGame-&amp;gt;setProperty( &amp;quot;HoverImage&amp;quot;, &amp;quot;set:Buttons image:ButtonDown&amp;quot; );&lt;br /&gt;
QuitGame-&amp;gt;setProperty( &amp;quot;PushedImage&amp;quot;, &amp;quot;set:Buttons image:ButtonDown&amp;quot; );&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now go ahead and test, doesn't that look much better ? It looks more like a proper menu now. You could start handling events from here on (explained later).&lt;br /&gt;
But this way isn't really very good. Should you want to change anything in the menu, you'll have to edit several lines of code &amp;amp; recompile your application. Besides, just making a menu as simple as that took about 50 lines of code, there must be a simpler way.&lt;br /&gt;
&lt;br /&gt;
=== XML based approach (non-falagard way) ===&lt;br /&gt;
&lt;br /&gt;
This way is much more efficient then hard-coding the menu. Its less code, easier to edit and use as well. I personally think this way is even better then using the falagard system if you're just after doing small and simple menu's, despite the fact falagard is supposed to be better performance wise and more flexible.&lt;br /&gt;
Before we start we need &lt;br /&gt;
&lt;br /&gt;
*Note 1: The .xsd files included in the cegui datafiles aren't needed if you're using Ogre. Ogre uses a different XML parser (tinyXML) which doesn't use these files so feel free to remove them, but if you're not using ogre and you didn't specify a different xml parser, you'll need those files.&lt;br /&gt;
&lt;br /&gt;
==== XML Crash Course ====&lt;br /&gt;
&lt;br /&gt;
If you're familiar with xml, feel free to skip this area (or better yet, rewrite it to make it more helpful).&lt;br /&gt;
&lt;br /&gt;
A code line is usually encapsulated in &amp;lt; &amp;gt;. To start a declare a new type you can use &amp;lt;Type/&amp;gt; or &amp;lt;Type&amp;gt; &amp;lt;/Type&amp;gt;. The first way should be used to declare objects that don't have too many settings. e.g:&lt;br /&gt;
 &amp;lt;Image Name=&amp;quot;Background&amp;quot; XPos=&amp;quot;0.0&amp;quot; YPos=&amp;quot;0.0&amp;quot; Width=&amp;quot;800&amp;quot; Height=&amp;quot;600&amp;quot; /&amp;gt;&lt;br /&gt;
As you've probably noticed, you can set its settings in the same line. As for the second way, it should be used to open up bigger types. e.g:&lt;br /&gt;
 &amp;lt;Window Type=&amp;quot;TaharezLook/Button&amp;quot; Name=&amp;quot;NewGame&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.2,0.0},{0.45,0.0},{0.6,0.0},{0.65,0.0}}&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;/Window&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can start nesting types in other types, you should be able to pickup the rest of the basics from xml files included with CEGUI and the ones in this tutorial.&lt;br /&gt;
 &lt;br /&gt;
*Note 1: Please use a proper text editor and not notepad or wordpad, there are many available for free online, using google would be a good time here :).&lt;br /&gt;
&lt;br /&gt;
==== XML File types ====&lt;br /&gt;
Now I'll explain the filetypes (copied from the beginner tutorial to loading data) and thier uses, there are 3 types. .layout .imageset .scheme ( there is a 4th one .looknfeel used with falagard)&lt;br /&gt;
While you can just call them .xml and be done with it, this way makes it more clearer.&lt;br /&gt;
&lt;br /&gt;
===== Imagesets =====&lt;br /&gt;
&lt;br /&gt;
Effectively, an Imageset is just a collection of defined regions upon the source image / texture file (which is also specified in the Imageset definition). Each of these defined regions has a unique name and is known within the system as an Image. An Image as defined in an Imageset is the basic level of imagery used by CEGUI. By modifying the source image / texture file and also the position and size of the defined regions within the Imageset files you can easily change the appearance of what gets drawn by CEGUI. &lt;br /&gt;
&lt;br /&gt;
Since each imageset cannot contain more then one Image file. We'll have to make 2 imageset files. For both images, we'll assume the width and hieght are 512x512. But for the second image, we'll assume it has 4 different button images inside instead of just 2 like the code part of tutorial, each button image is 1/4 the size of the full image. The only reason behind this is its much easier to assign &amp;amp; define images now. Here is an illustration figure for the 2nd image&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;10&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ MenuButtons.jpg&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | Button Up&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | Button Down&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | Button Highlighted&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | Button Greyed Out&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* MenuBackground.imageset&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
 &amp;lt;Imageset Name=&amp;quot;Background&amp;quot; Imagefile=&amp;quot;MenuBackground.jpg&amp;quot; NativeHorzRes=&amp;quot;800&amp;quot; NativeVertRes=&amp;quot;600&amp;quot; AutoScaled=&amp;quot;true&amp;quot; ResourceGroup=&amp;quot;General&amp;quot;&amp;gt;&lt;br /&gt;
 	&amp;lt;Image Name=&amp;quot;Background&amp;quot; XPos=&amp;quot;0.0&amp;quot; YPos=&amp;quot;0.0&amp;quot; Width=&amp;quot;512&amp;quot; Height=&amp;quot;512&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;/Imageset&amp;gt;&lt;br /&gt;
* MenuButtons.imageset&lt;br /&gt;
  &amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
  &amp;lt;Imageset Name=&amp;quot;Buttons&amp;quot; Imagefile=&amp;quot;MenuButtons.jpg&amp;quot; NativeHorzRes=&amp;quot;800&amp;quot; NativeVertRes=&amp;quot;600&amp;quot; AutoScaled=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
 	&amp;lt;Image Name=&amp;quot;ButtonUp&amp;quot; XPos=&amp;quot;0.0&amp;quot; YPos=&amp;quot;0.0&amp;quot; Width=&amp;quot;512&amp;quot; Height=&amp;quot;128&amp;quot; /&amp;gt;&lt;br /&gt;
 	&amp;lt;Image Name=&amp;quot;ButtonDown&amp;quot; XPos=&amp;quot;0.0&amp;quot; YPos=&amp;quot;128.0&amp;quot; Width=&amp;quot;512&amp;quot; Height=&amp;quot;128&amp;quot; /&amp;gt;&lt;br /&gt;
 	&amp;lt;Image Name=&amp;quot;ButtonDisabled&amp;quot; XPos=&amp;quot;0.0&amp;quot; YPos=&amp;quot;256.0&amp;quot; Width=&amp;quot;512&amp;quot; Height=&amp;quot;128&amp;quot; /&amp;gt;&lt;br /&gt;
 	&amp;lt;Image Name=&amp;quot;ButtonHighlighted&amp;quot; XPos=&amp;quot;0.0&amp;quot; YPos=&amp;quot;384.14&amp;quot; Width=&amp;quot;512&amp;quot; Height=&amp;quot;128&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;/Imageset&amp;gt;&lt;br /&gt;
&lt;br /&gt;
While the ResourceGroup=&amp;quot;&amp;quot; line isn't necessary, I just added it so you can see where to use it.&lt;br /&gt;
To load Imagesets by code you do &lt;br /&gt;
 ImagesetManager::getSingletonPtr()-&amp;gt;createImageset( &amp;quot;MenuBackground.imageset&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
===== Layouts =====&lt;br /&gt;
&lt;br /&gt;
A layout file contains an XML representation of a window layout. Each nested 'Window' element defines a window or widget to be created, the 'Property' elements define the desired settings and property values for each window defined. &lt;br /&gt;
&lt;br /&gt;
* Menu.layout&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;WindowsLook/StaticImage&amp;quot; Name=&amp;quot;Menu/Background&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;Property Name=&amp;quot;UnifiedSize&amp;quot; Value=&amp;quot;{{1.0,0},{1.0,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;lt;Property Name=&amp;quot;Image&amp;quot; Value=&amp;quot;set:Background image:Background&amp;quot; /&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
         &amp;lt;Window Type=&amp;quot;WindowsLook/Button&amp;quot; Name=&amp;quot;Menu/NewGame&amp;quot;&amp;gt;&lt;br /&gt;
             &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.2,0.0},{0.2,0.0},{0.6,0.0},{0.4,0.0}}&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Property Name=&amp;quot;NormalImage&amp;quot; Value=&amp;quot;set:Buttons image:ButtonUp&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Property Name=&amp;quot;HoverImage&amp;quot; Value=&amp;quot;set:Buttons image:ButtonDisabled&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Property Name=&amp;quot;PushedImage&amp;quot; Value=&amp;quot;set:Buttons image:ButtonHighlighted&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Property Name=&amp;quot;DisabledImage&amp;quot; Value=&amp;quot;set:Buttons image:ButtonDisabled&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;Start a new game&amp;quot;/&amp;gt;&lt;br /&gt;
         &amp;lt;/Window&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
         &amp;lt;Window Type=&amp;quot;WindowsLook/Button&amp;quot; Name=&amp;quot;Menu/LoadGame&amp;quot;&amp;gt;&lt;br /&gt;
             &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.2,0.0},{0.45,0.0},{0.6,0.0},{0.65,0.0}}&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Property Name=&amp;quot;NormalImage&amp;quot; Value=&amp;quot;set:Buttons image:ButtonUp&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Property Name=&amp;quot;HoverImage&amp;quot; Value=&amp;quot;set:Buttons image:ButtonDisabled&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Property Name=&amp;quot;PushedImage&amp;quot; Value=&amp;quot;set:Buttons image:ButtonHighlighted&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Property Name=&amp;quot;DisabledImage&amp;quot; Value=&amp;quot;set:Buttons image:ButtonDisabled&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;Not implemented yet&amp;quot;/&amp;gt;&lt;br /&gt;
          &amp;lt;/Window&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
         &amp;lt;Window Type=&amp;quot;WindowsLook/Button&amp;quot; Name=&amp;quot;Menu/QuitGame&amp;quot;&amp;gt;&lt;br /&gt;
             &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.2,0.0},{0.7,0.0},{0.6,0.0},{0.9,0.0}}&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Property Name=&amp;quot;NormalImage&amp;quot; Value=&amp;quot;set:Buttons image:ButtonUp&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Property Name=&amp;quot;HoverImage&amp;quot; Value=&amp;quot;set:Buttons image:ButtonDisabled&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Property Name=&amp;quot;PushedImage&amp;quot; Value=&amp;quot;set:Buttons image:ButtonHighlighted&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Property Name=&amp;quot;DisabledImage&amp;quot; Value=&amp;quot;set:Buttons image:ButtonDisabled&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;Exit To Desktop&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;
This does basicly all the stuff we did in the code portion of the tutorial. The only new term here is UnifiedAreaRect, the first pair defines where the XPos starts, the 3rd defines where it ends. Same goes for 2nd &amp;amp; 4th but for YPos&lt;br /&gt;
 &lt;br /&gt;
To load a .layout file in code you do&lt;br /&gt;
 Window* Menu = WindowManager::getSingletonPtr()-&amp;gt;loadWindowLayout(&amp;quot;Menu.layout&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
*Note 1: There is an editor file for layouts written by scriptkid, its preferable if you get it from CVS and build it, but its possible to get the binaries from the downloads area in the cegui website. While its rather limited atm, it allows you to create and place the various widgets and export into a .layout file. It doesn't support custom images as of yet (8/12/2005).&lt;br /&gt;
*Note 2: Since the layout file is usually the most error prone, I usually encase it in a try catch statement to catch any parsing exceptions and pause on them. If you don't do that you won't get informed of errors when they happen, which could lead to other errors happening and crashing ultimatley.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
try&lt;br /&gt;
{&lt;br /&gt;
	Window* Menu = WindowManager::getSingletonPtr()-&amp;gt;loadWindowLayout(&amp;quot;Menu.layout&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
catch(CEGUI::Exception &amp;amp;e)&lt;br /&gt;
{&lt;br /&gt;
 OGRE_EXCEPT(Ogre::Exception::ERR_INTERNAL_ERROR, string(e.getMessage().c_str()), &amp;quot;Error Parsing Menu&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Schemes =====&lt;br /&gt;
&lt;br /&gt;
A Scheme is a means to group other data files together, it's also the most convenient way to load and register widget types. A Scheme can contain one or more of the following (which will be loaded and initialised when the scheme is loaded): &lt;br /&gt;
Imageset &lt;br /&gt;
Window Set &lt;br /&gt;
Window Alias &lt;br /&gt;
A 'Window Set' basically specifies the name of a loadable module or skin(.dll , .so, .looknfeel), and a set of widgets contained within that modules that you wish to register with the system. A 'Window Alias' provides a means to refer to a window / widget type by alternative names, it can also be used to 'hide' an already registered widget type with another widget type (so that other widget type gets used instead). &lt;br /&gt;
&lt;br /&gt;
This file isn't totally needed in the current approach, we're just using it here as a means of grouping imagesets for loading. However this file will be used in greater detail in the Falagard system. &lt;br /&gt;
&lt;br /&gt;
* GameGUI.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;GameGUI&amp;quot;&amp;gt;&lt;br /&gt;
 	&amp;lt;Imageset Name=&amp;quot;Background&amp;quot; Filename=&amp;quot;MenuButtons.imageset&amp;quot; ResourceGroup=&amp;quot;General&amp;quot;/&amp;gt;&lt;br /&gt;
 	&amp;lt;Imageset Name=&amp;quot;Buttons&amp;quot; Filename=&amp;quot;MenuButtons.imageset&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;/GUIScheme&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This simply just loads the 2 imagesets. To load the scheme by code you use&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
SchemeManager::getSingleton().loadScheme(&amp;quot;GameGUI.scheme);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Wrapping It all up ====&lt;br /&gt;
&lt;br /&gt;
Save the xml files above and add them somewhere in your Resource hierarchy (which should be your media folder unless you changed it).&lt;br /&gt;
&lt;br /&gt;
Now for the code portion, the initialisation area will remain the same. However, you'll need to have this line before your menu code&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
SchemeManager::getSingleton().loadScheme(&amp;quot;GameGUI.scheme);&lt;br /&gt;
// Or you could do this if you skip the scheme part&lt;br /&gt;
//ImagesetManager::getSingletonPtr()-&amp;gt;createImageset( &amp;quot;MenuBackground.imageset&amp;quot;);&lt;br /&gt;
//ImagesetManager::getSingletonPtr()-&amp;gt;createImageset( &amp;quot;MenuButtons.imageset&amp;quot;);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now its time to write the menu code&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
WindowManager* Wmgr = WindowManager::getSingletonPtr();&lt;br /&gt;
System* mGUISystem = System::getSingletonPtr();&lt;br /&gt;
Window* myRoot = Wmgr-&amp;gt;getWindow(&amp;quot;RootWindow&amp;quot;); // get default window&lt;br /&gt;
&lt;br /&gt;
try&lt;br /&gt;
{&lt;br /&gt;
	Window* Menu = Wmgr-&amp;gt;loadWindowLayout(&amp;quot;Menu.layout&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
catch(CEGUI::Exception &amp;amp;e)&lt;br /&gt;
{&lt;br /&gt;
	OGRE_EXCEPT(Ogre::Exception::ERR_INTERNAL_ERROR, string(e.getMessage().c_str()), &amp;quot;Error Parsing Menu&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
myRoot-&amp;gt;addChildWindow(Menu);&lt;br /&gt;
GUISys-&amp;gt;setGUISheet(myRoot); // this line is redundant since you didn't change gui sheets, but its here to make sure&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And thats it ! 50 lines of code are now alittle less then 10 lines. The menu is now easily editable by editing the xml files without the need of recompiling. Should any errors occur, checking the cegui.log should be very handy.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Falagard Way &amp;amp; the looknfeel system ===&lt;br /&gt;
TO DO&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Handling events for the menu ==&lt;br /&gt;
Ok, so we've seen how to make our menu. But so far we can only look at it, we can't use it. Here we'll learn how to start subscribing events and handle them. To start handling events we need to have pointers for each menu button you want handled (even the background if you want to do anything special). If you've followed the code approach, you should already have them. Otherwise, we'll need to start getting them. Simply do this for each button&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
PushButton* Button1 = (PushButton*)wmgr-&amp;gt;getWindow(&amp;quot;Widget Reference Name&amp;quot;);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now that we have pointers to the buttons we wan't to handle. You need to subscribe it to a function that will do the &amp;quot;handling&amp;quot;. If you're function is a global function (or not part of a class). you do this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
Button1 -&amp;gt;subscribeEvent(PushButton::EventClicked, HandleButton1);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
if it is part of a class you do this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
Button1-&amp;gt;subscribeEvent(PushButton::EventClicked, Event::Subscriber(&amp;amp;ClassName::HandleButton1, this));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
What this does is tell the Window to trigger function HandleButton1() should EventClicked happen. There are much more events which you can find out about them from the API reference.&lt;br /&gt;
&lt;br /&gt;
Now here is a typical action &lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
bool HandleButton1(const EventArgs&amp;amp; e)&lt;br /&gt;
{&lt;br /&gt;
  //Code you want Button1 to do&lt;br /&gt;
  return true;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the event is triggered, HandleButton1 is called and an EventArgs is passed to it. This has some useful info you might need to operate on, &lt;br /&gt;
&lt;br /&gt;
*Note 1 : the function needs to be of type bool and return true. it also needs to take one parameter only and thats const CEGUI::EventArgs&amp;amp;&lt;br /&gt;
&lt;br /&gt;
=== What you need in your Frame Listener ===&lt;br /&gt;
&lt;br /&gt;
But wait a minute, CEGUI doesn't detect keyboard &amp;amp; mouse input itself. This means none of the code above will work just yet, we'll need to inject Input as we get it. So you'll have to modify your framelistener to do so. This part is based in portion from [[http://www.ogre3d.org/wiki/index.php/Basic_Tutorial_6 basic tutorial 6]]. This area is heavily ogre specific btw for those who didn't notice&lt;br /&gt;
&lt;br /&gt;
First you'll need to subclass your framelistener (or whatever class handles your input) from KeyListener, MouseMotionListener &amp;amp; MouseListener then overload the pure virtual functions(check the ogre api to see which functions you'll need to overload)&lt;br /&gt;
Here is a list off all of them (might be some more), some of them you don't need to inject so provide empty &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
// Helper function&lt;br /&gt;
ConvertOgreButtonToCegui(int ButtonID);&lt;br /&gt;
&lt;br /&gt;
//key listener&lt;br /&gt;
void keyPressed(KeyEvent *e);&lt;br /&gt;
void keyClicked(KeyEvent *e);&lt;br /&gt;
void keyReleased(KeyEvent *e);&lt;br /&gt;
&lt;br /&gt;
//mouse motion listener&lt;br /&gt;
void mouseMoved(MouseEvent *e);&lt;br /&gt;
void mouseDragMoved(MouseEvent *e){}&lt;br /&gt;
void mouseDragged(MouseEvent *e);&lt;br /&gt;
 &lt;br /&gt;
// mouse listener&lt;br /&gt;
void mouseReleased (MouseEvent *e);&lt;br /&gt;
void mousePressed (MouseEvent *e);&lt;br /&gt;
void mouseClicked (MouseEvent *e){};&lt;br /&gt;
void mouseEntered (MouseEvent *e){};&lt;br /&gt;
void mouseExited (MouseEvent *e){};&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
here is thier implementations&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
MouseButton YourInputListenerClass::ConvertOgreButtonToCegui(int ButtonID)&lt;br /&gt;
{&lt;br /&gt;
   switch (ButtonID)&lt;br /&gt;
   {&lt;br /&gt;
   case MouseEvent::BUTTON0_MASK:&lt;br /&gt;
       return CEGUI::LeftButton;&lt;br /&gt;
   case MouseEvent::BUTTON1_MASK:&lt;br /&gt;
       return CEGUI::RightButton;&lt;br /&gt;
   case MouseEvent::BUTTON2_MASK:&lt;br /&gt;
       return CEGUI::MiddleButton;&lt;br /&gt;
   case MouseEvent::BUTTON3_MASK:&lt;br /&gt;
       return CEGUI::X1Button;&lt;br /&gt;
   default:&lt;br /&gt;
       return CEGUI::LeftButton;&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
void YourInputListenerClass::keyPressed(KeyEvent *e)&lt;br /&gt;
{&lt;br /&gt;
	mGUISystem-&amp;gt;injectKeyDown(e-&amp;gt;getKey());   // I'm not totally sure about this area, can someone confirm ?&lt;br /&gt;
	mGUISystem-&amp;gt;injectChar(e-&amp;gt;getKeyChar());&lt;br /&gt;
	e-&amp;gt;consume();&lt;br /&gt;
}&lt;br /&gt;
void YourInputListenerClass::keyReleased(KeyEvent *e)&lt;br /&gt;
{&lt;br /&gt;
	mGUISystem-&amp;gt;injectKeyUp(e-&amp;gt;getKey());&lt;br /&gt;
	e-&amp;gt;consume();&lt;br /&gt;
}&lt;br /&gt;
void YourInputListenerClass::mouseMoved (MouseEvent *e)&lt;br /&gt;
{&lt;br /&gt;
	mGUISystem-&amp;gt;injectMouseMove(e-&amp;gt;getRelX() * mGUIRenderer -&amp;gt;getWidth(),e-&amp;gt;getRelY() * GuiRenderer-&amp;gt;getHeight());&lt;br /&gt;
	e-&amp;gt;consume();&lt;br /&gt;
}&lt;br /&gt;
void YourInputListenerClass::mousePressed (MouseEvent *e)&lt;br /&gt;
{&lt;br /&gt;
	mGUISystem-&amp;gt;injectMouseButtonDown(ConvertOgreButtonToCegui(e-&amp;gt;getButtonID()));&lt;br /&gt;
	e-&amp;gt;consume();&lt;br /&gt;
}&lt;br /&gt;
void YourInputListenerClass::mouseReleased(MouseEvent *e)&lt;br /&gt;
{&lt;br /&gt;
 	mGUISystem-&amp;gt;injectMouseButtonUp(ConvertOgreButtonToCegui(e-&amp;gt;getButtonID()));&lt;br /&gt;
 	e-&amp;gt;consume();&lt;br /&gt;
}&lt;br /&gt;
void YourInputListenerClass::mouseDragged (MouseEvent *e) &lt;br /&gt;
{ &lt;br /&gt;
	mouseMoved(e);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
=== Handling events for the layout approach ===&lt;br /&gt;
I'll show an example based on the layout approach, you could easily adapt it to any of the other approaches.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
// handler functions declarations&lt;br /&gt;
bool handleNewGame(const EventArgs&amp;amp; e);&lt;br /&gt;
bool handleQuit(const EventArgs&amp;amp; e);&lt;br /&gt;
bool handleHover(const EventArgs&amp;amp; e);&lt;br /&gt;
&lt;br /&gt;
WindowManager* Wmgr = WindowManager::getSingletonPtr();&lt;br /&gt;
System* mGUISystem = System::getSingletonPtr();&lt;br /&gt;
Window* myRoot = Wmgr-&amp;gt;getWindow(&amp;quot;RootWindow&amp;quot;); // get default window&lt;br /&gt;
&lt;br /&gt;
try&lt;br /&gt;
{&lt;br /&gt;
	Window* Menu = Wmgr-&amp;gt;loadWindowLayout(&amp;quot;Menu.layout&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
catch(CEGUI::Exception &amp;amp;e)&lt;br /&gt;
{&lt;br /&gt;
	OGRE_EXCEPT(Ogre::Exception::ERR_INTERNAL_ERROR, string(e.getMessage().c_str()), &amp;quot;Error Parsing Menu&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
myRoot-&amp;gt;addChildWindow(Menu);&lt;br /&gt;
mGUISystem-&amp;gt;setGUISheet(myRoot); &lt;br /&gt;
&lt;br /&gt;
bool handleNewGame(const EventArgs&amp;amp; e)&lt;br /&gt;
{&lt;br /&gt;
    // your project specific code to start game&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool handleHover(const EventArgs&amp;amp; e)&lt;br /&gt;
{&lt;br /&gt;
    // Play a beep sound &lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool handleQuit(const EventArgs&amp;amp; e)&lt;br /&gt;
{&lt;br /&gt;
    // your engine specific code to shut down&lt;br /&gt;
    Root::getSingletonPtr()-&amp;gt;queueEndRendering(); // ogre specific&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thats it. Theoritically it should work. Now go ahead and try :)&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
Now it should be easy to and clear to beginner users how to begin making use of CEGUI, you can easily extend what you've learnt here to start making more complex GUIs.&lt;br /&gt;
If you find that something isn't clear or you want help with it you can post on the forums or join the #cegui channel on IRC (freenode server). I usually idle on IRC often, nick MandM.&lt;/div&gt;</summary>
		<author><name>Rackle</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=Game_chat_box&amp;diff=2822</id>
		<title>Game chat box</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=Game_chat_box&amp;diff=2822"/>
				<updated>2008-02-01T12:23:03Z</updated>
		
		<summary type="html">&lt;p&gt;Rackle: /* ChatBox_demo.h */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Introduction ===&lt;br /&gt;
This snippet implements a chat box that can display text in 3 font sizes as well as limiting the number of entries (history) to a certain number.  Please discuss this article within the [http://www.cegui.org.uk/phpBB2/viewtopic.php?p=13333 GameChatBox] thread.&lt;br /&gt;
&lt;br /&gt;
==== .layout Special Features ====&lt;br /&gt;
The layout definition is deceptively simple.  It defines a FrameWindow containing two widgets; a Listbox in the upper region for chat history and an Editbox at the lower region for text input.&lt;br /&gt;
&lt;br /&gt;
What is not apparent is how the bottom portion of the Listbox and the entire Editbox are defined; they specify a proportion of 100% of their parent but with a negative offset.  Essentially the bottom of the Listbox extends to the bottom of the FrameWindow (the parent) and is then moved &amp;quot;up&amp;quot; to make room for the Editbox.  And the Editbox follows the same pattern.  This allows the Editbox to retain its height as the parent FrameWindow is resized.&lt;br /&gt;
&lt;br /&gt;
==== Creating the necessary .font files ====&lt;br /&gt;
A .font file is a simple text file that defines a font within Cegui.  They are located within the datafiles\fonts directory.&lt;br /&gt;
&lt;br /&gt;
This snippet uses the Commonwealth font in sizes 10, 36, and 72.  To create the missing font definitions for sizes 36 and 72 simply make two copies of the existing &amp;quot;Commonwealth-10.font&amp;quot; file.  The first copy is to be named &amp;quot;Commonwealth-36.font&amp;quot; and the second copy &amp;quot;Commonwealth-72.font&amp;quot;.  Edit the &amp;quot;Commonwealth-36.font&amp;quot; file and replace the value &amp;quot;10&amp;quot; by the value &amp;quot;36&amp;quot;.  Similarly edit the &amp;quot;Commonwealth-72.font&amp;quot; file and replace the value &amp;quot;10&amp;quot; by the value &amp;quot;72&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Another approach is to dynamically create fonts.  For more details consult [[DynamicFont]]&lt;br /&gt;
&lt;br /&gt;
=== Files ===&lt;br /&gt;
==== ChatBox_demo.h ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
#ifndef _ChatBox_h_&lt;br /&gt;
#define _ChatBox_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;
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;
			// Initialize the list of available fonts&lt;br /&gt;
			mCurrentFont = 0;&lt;br /&gt;
			addFont(&amp;quot;Commonwealth-10&amp;quot;);&lt;br /&gt;
			addFont(&amp;quot;Commonwealth-36&amp;quot;);&lt;br /&gt;
			addFont(&amp;quot;Commonwealth-72&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;ChatBox.layout&amp;quot;);&lt;br /&gt;
			sheet-&amp;gt;addChildWindow(guiLayout);&lt;br /&gt;
&lt;br /&gt;
			// Configure the events for the chat box&lt;br /&gt;
			CEGUI::Window* editBox = winMgr.getWindow(&amp;quot;/ChatBox/Text&amp;quot;);&lt;br /&gt;
			editBox-&amp;gt;subscribeEvent(CEGUI::Editbox::EventTextAccepted,	CEGUI::Event::Subscriber(&amp;amp;DemoSample::EditTextAccepted, this)); &lt;br /&gt;
			editBox-&amp;gt;subscribeEvent(CEGUI::Editbox::EventMouseClick,	CEGUI::Event::Subscriber(&amp;amp;DemoSample::FontChange,		this)); &lt;br /&gt;
&lt;br /&gt;
			// Configure the history size&lt;br /&gt;
			mHistorySize = 100;&lt;br /&gt;
			CEGUI::Window* historyBox = winMgr.getWindow(&amp;quot;/ChatBox/History&amp;quot;);&lt;br /&gt;
			historyBox-&amp;gt;subscribeEvent(CEGUI::Editbox::EventTextAccepted,	CEGUI::Event::Subscriber(&amp;amp;DemoSample::HistoryTextAccepted, this)); &lt;br /&gt;
			historyBox-&amp;gt;setText( PropertyHelper::intToString(static_cast&amp;lt;int&amp;gt;(mHistorySize)) );&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;
	}&lt;br /&gt;
&lt;br /&gt;
	void setHistorySize(const size_t&amp;amp; pSize)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		if(pSize &amp;gt; 0)&lt;br /&gt;
		{&lt;br /&gt;
			// A better validation would be to enforce a minimal and a maximal size&lt;br /&gt;
			mHistorySize = pSize;&lt;br /&gt;
&lt;br /&gt;
			WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
			Listbox* listBox = static_cast&amp;lt;Listbox*&amp;gt; (winMgr.getWindow(&amp;quot;/ChatBox/List&amp;quot;));&lt;br /&gt;
			ListboxItem* item;&lt;br /&gt;
			while(listBox-&amp;gt;getItemCount() &amp;gt; mHistorySize)&lt;br /&gt;
			{&lt;br /&gt;
				item = listBox-&amp;gt;getListboxItemFromIndex(0);&lt;br /&gt;
				listBox-&amp;gt;removeItem(item);&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool HistoryTextAccepted(const CEGUI::EventArgs&amp;amp; args)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
		CEGUI::Window* historyBox = winMgr.getWindow(&amp;quot;/ChatBox/History&amp;quot;);&lt;br /&gt;
		int historySize = PropertyHelper::stringToInt( historyBox-&amp;gt;getText() );&lt;br /&gt;
		setHistorySize(historySize);&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool EditTextAccepted(const CEGUI::EventArgs&amp;amp; args)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		// Variables for the Listbox and the Editbox&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
		Editbox* editBox = static_cast&amp;lt;Editbox*&amp;gt; (winMgr.getWindow(&amp;quot;/ChatBox/Text&amp;quot;));&lt;br /&gt;
		Listbox* listBox = static_cast&amp;lt;Listbox*&amp;gt; (winMgr.getWindow(&amp;quot;/ChatBox/List&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
		// Add the Editbox text to the Listbox&lt;br /&gt;
		ListboxTextItem* textItem;&lt;br /&gt;
		if(listBox-&amp;gt;getItemCount() == mHistorySize)&lt;br /&gt;
		{&lt;br /&gt;
			/* We have reached the capacity of the Listbox so re-use the first Listbox item.&lt;br /&gt;
			   This code is a little crafty.  By default the ListboxTextItem is created with&lt;br /&gt;
			   the auto-delete flag set to true, which results in its automatic deletion when&lt;br /&gt;
			   removed from the Listbox.  So we change that flag to false, extract the item&lt;br /&gt;
			   from the Listbox, change its text, put the auto-delete flag back to true, and&lt;br /&gt;
			   finally put the item back into the Listbox. */&lt;br /&gt;
			textItem = static_cast&amp;lt;ListboxTextItem*&amp;gt;(listBox-&amp;gt;getListboxItemFromIndex(0));&lt;br /&gt;
			textItem-&amp;gt;setAutoDeleted(false);&lt;br /&gt;
			listBox-&amp;gt;removeItem(textItem);&lt;br /&gt;
			textItem-&amp;gt;setAutoDeleted(true);&lt;br /&gt;
			textItem-&amp;gt;setText(editBox-&amp;gt;getText());&lt;br /&gt;
		}&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			// Create a new listbox item&lt;br /&gt;
			textItem = new ListboxTextItem(editBox-&amp;gt;getText());&lt;br /&gt;
		}&lt;br /&gt;
		listBox-&amp;gt;addItem(textItem);&lt;br /&gt;
		listBox-&amp;gt;setItemSelectState(textItem, true);&lt;br /&gt;
&lt;br /&gt;
		// Scroll the Listbox entries such that the new text is visible&lt;br /&gt;
		listBox-&amp;gt;ensureItemIsVisible(listBox-&amp;gt;getItemCount());&lt;br /&gt;
&lt;br /&gt;
		// Clear the text in the Editbox&lt;br /&gt;
		editBox-&amp;gt;setText(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	void addFont(const CEGUI::String&amp;amp; pFont)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		if(!FontManager::getSingleton().isFontPresent(pFont))&lt;br /&gt;
		{&lt;br /&gt;
			mFontList.push_back(pFont);&lt;br /&gt;
			FontManager::getSingleton().createFont(pFont + &amp;quot;.font&amp;quot;);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool FontChange(const CEGUI::EventArgs&amp;amp; args)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		const MouseEventArgs&amp;amp; mouseEventArgs = static_cast&amp;lt;const MouseEventArgs&amp;amp;&amp;gt;(args);&lt;br /&gt;
		if(mouseEventArgs.button == RightButton)&lt;br /&gt;
		{&lt;br /&gt;
			// Cycle through the installed fonts upon a right-click&lt;br /&gt;
			mCurrentFont++;&lt;br /&gt;
			if(mCurrentFont &amp;gt;= mFontList.size())&lt;br /&gt;
				mCurrentFont = 0;&lt;br /&gt;
&lt;br /&gt;
			changeFont(mFontList[mCurrentFont]);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	void changeFont(const CEGUI::String&amp;amp; pFont)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
&lt;br /&gt;
		// Measure the height of the selected font&lt;br /&gt;
		Font* currentFont = FontManager::getSingleton().getFont(pFont);&lt;br /&gt;
		float fontHeight = currentFont-&amp;gt;getFontHeight();&lt;br /&gt;
&lt;br /&gt;
		/* Alter the area of the Editbox.  The original value is {{0.01,0},{1,-30},{0.99,0},{1,-5}}&lt;br /&gt;
		   The value we are altering is the &amp;quot;-30&amp;quot; within the second couplet, defining the position of&lt;br /&gt;
		   the upper y coordinate of the Editbox.  We base the new value on the position of the lower&lt;br /&gt;
		   y coordinate, which is &amp;quot;-5&amp;quot;, and the height of the font.  To this we add some space &amp;quot;10&amp;quot; to&lt;br /&gt;
		   account for the Editbox's border. */&lt;br /&gt;
		Editbox* editBox = static_cast&amp;lt;Editbox*&amp;gt; (winMgr.getWindow(&amp;quot;/ChatBox/Text&amp;quot;));&lt;br /&gt;
		URect chatTextArea = editBox-&amp;gt;getArea();&lt;br /&gt;
		chatTextArea.d_min.d_y.d_offset = chatTextArea.d_max.d_y.d_offset&lt;br /&gt;
										- fontHeight&lt;br /&gt;
										- 10;&lt;br /&gt;
		editBox-&amp;gt;setArea(chatTextArea);&lt;br /&gt;
		editBox-&amp;gt;setFont(currentFont);&lt;br /&gt;
&lt;br /&gt;
		/* Alther the area of the Listbox.  Here we only need the lower y coordinate.  Since this&lt;br /&gt;
		   value is the same as the upper y coordinate of the Editbox we do not need to calculate&lt;br /&gt;
		   it.  We also change the font of the Listbox and call upon handleUpdatedItemData() to&lt;br /&gt;
		   update the current Listbox items.  Finally we ensure that the last entry is still&lt;br /&gt;
		   visible. */&lt;br /&gt;
		Listbox* listBox = static_cast&amp;lt;Listbox*&amp;gt; (winMgr.getWindow(&amp;quot;/ChatBox/List&amp;quot;));&lt;br /&gt;
		URect listTextArea = listBox-&amp;gt;getArea();&lt;br /&gt;
		listTextArea.d_max.d_y.d_offset = chatTextArea.d_min.d_y.d_offset;&lt;br /&gt;
		listBox-&amp;gt;setArea(listTextArea);&lt;br /&gt;
		listBox-&amp;gt;setFont(currentFont);&lt;br /&gt;
		listBox-&amp;gt;handleUpdatedItemData();&lt;br /&gt;
		size_t itemCount = listBox-&amp;gt;getItemCount();&lt;br /&gt;
		if(itemCount)&lt;br /&gt;
		{&lt;br /&gt;
			ListboxItem* currentItem = listBox-&amp;gt;getListboxItemFromIndex(itemCount - 1);&lt;br /&gt;
			listBox-&amp;gt;ensureItemIsVisible(currentItem);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
	// List of available fonts&lt;br /&gt;
	std::vector&amp;lt;CEGUI::String&amp;gt; mFontList;&lt;br /&gt;
&lt;br /&gt;
	// Currently active font&lt;br /&gt;
	std::vector&amp;lt;CEGUI::String&amp;gt;::size_type mCurrentFont;&lt;br /&gt;
&lt;br /&gt;
	// Maximal number of entries to retain within the Listbox&lt;br /&gt;
	size_t mHistorySize;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#endif // _ChatBox_h_&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Main.cpp ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&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;ChatBox_demo.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;
    int i = app.run();&lt;br /&gt;
    return i;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== ChatBox.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;/ChatBox&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Chat&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;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;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.15,0},{0.03,0},{0.7,0},{0.7,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/Listbox&amp;quot; Name=&amp;quot;/ChatBox/List&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.01,0},{0.078,0},{0.99,0},{1,-30}}&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;/ChatBox/Text&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.01,0},{1,-30},{0.99,0},{1,-5}}&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 Type=&amp;quot;TaharezLook/Editbox&amp;quot; Name=&amp;quot;/ChatBox/History&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.9,0},{0.03,0},{0.95,0},{0.1,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;/ChatBox/HistoryLabel&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;History size:&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.78,0},{0.03,0},{0.9,0},{0.1,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;/GUILayout&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rackle</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=The_Beginner_Guide_to_Loading_Data_Files_and_Initialisation&amp;diff=2821</id>
		<title>The Beginner Guide to Loading Data Files and Initialisation</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=The_Beginner_Guide_to_Loading_Data_Files_and_Initialisation&amp;diff=2821"/>
				<updated>2008-02-01T12:22:02Z</updated>
		
		<summary type="html">&lt;p&gt;Rackle: /* Loading the Basic Files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&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 learn how to load some data files so that CEGUI has some source materials to use when rendering.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Overview: Data Files and the ResourceProvider ==&lt;br /&gt;
CEGUI uses a variety of data files and initially there may be some confusion over what these are, how they relate to each other and how they get loaded.  So before we get started with the meat of all this, I will introduce the data files, what they are, what they're used for, and how they get loaded into CEGUI.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Resources Provided – What is the 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.&lt;br /&gt;
&lt;br /&gt;
The Direct3D and OpenGL renderers do not, by default, use a specialised ResourceProvider; these systems default to loading ''all'' resources from the current working directory for the running application (usually the directory containing the executable).  This fact is of major importance when specifying paths to files within other files; they are all relative to the same directory, they are ''not relative to each other''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== XML, XSD?  It's all XML! ===&lt;br /&gt;
With the exception of graphical image files and loadable modules (DLLs / .soS, etc), all data files used by CEGUI are actually XML.  This leads us to the first obstacle that people run into; the schema (.xsd) files.&lt;br /&gt;
&lt;br /&gt;
By default, CEGUI uses Xerces-C++ to handle parsing XML files with ''schema validation''.  Schema validation is a means by which we can check, at parse time, whether the input file contains the expected data and that the data is correctly specified.  To do this, the system requires some additional files which are known as schema files, which have the .xsd file extension (the master copies of these are in the ''cegui_mk2/XMLRefSchema/'' directory).  Anyway, the only thing you need to know about these .xsd files for now is that they must be available to the ResourceProvider system; usually this can be achieved by placing a copy of the appropriate .xsd file in the same directory as the XML data you'll be loading.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The Data Files ===&lt;br /&gt;
As mentioned above, with a couple of exceptions, all data files in CEGUI are XML.  Rather than using the generic '.xml' file extension, the data files are named according to what the files actually represent; so .imageset for an Imageset and .font for a Font, etc.  Below is a very brief overview of each file type; more advanced discussion of the files and their capabilities can be found elsewhere.&lt;br /&gt;
&lt;br /&gt;
==== Imageset ====&lt;br /&gt;
Effectively, an Imageset is just a collection of defined regions upon the source image / texture file (which is also specified in the Imageset definition).  Each of these defined regions has a unique name and is known within the system as an Image.  An Image as defined in an Imageset is the basic level of  imagery used by CEGUI.  By modifying the source image / texture file and also the position and size of the defined regions within the Imageset files you can easily change the appearance of what gets drawn by CEGUI.&lt;br /&gt;
&lt;br /&gt;
==== Font ====&lt;br /&gt;
A Font file, unsurprisingly, defines a font for use in CEGUI.  There are two types of font which can be defined:&lt;br /&gt;
; FreeType Font : This is a font based upon a true-type (.ttf) font file. It is denoted with Type=&amp;quot;FreeType&amp;quot; in the .font file starting with version 0.5.0 of CEGUI. In previous versions it was known as &amp;quot;Dynamic&amp;quot;.&lt;br /&gt;
; Pixmap Font : Also known as a bitmapped font, this type of font is based upon an Imageset which defines Images for the font glyphs. It is denoted with Type=&amp;quot;Pixmap&amp;quot; in the .font file starting with version 0.5.0 of CEGUI. In previous versions it was known as &amp;quot;Static&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Scheme ====&lt;br /&gt;
A Scheme is a means to group other data files together, it's also the most convenient way to load and register widget types.  A Scheme can contain one or more of the following (which will be loaded and initialised when the scheme is loaded):&lt;br /&gt;
* Imageset&lt;br /&gt;
* Font&lt;br /&gt;
* Window Set&lt;br /&gt;
* Window Alias&lt;br /&gt;
&lt;br /&gt;
Imageset and Font have already been mentioned.  A 'Window Set' basically specifies the name of a loadable module (.dll / .so, etc), and a set of widgets contained within that modules that you wish to register with the system.  A 'Window Alias' provides a means to refer to a window / widget type by alternative names, it can also be used to 'hide' an already registered widget type with another widget type (so that other widget type gets used instead).&lt;br /&gt;
&lt;br /&gt;
==== Layout ====&lt;br /&gt;
A layout file contains an XML representation of a window layout.  Each nested 'Window' element defines a window or widget to be created, the 'Property' elements define the desired settings and property values for each window defined.&lt;br /&gt;
&lt;br /&gt;
==== Config ====&lt;br /&gt;
CEGUI Supports the use of a config file.  This file allows you to specify some defaults, such as a Scheme to load, a layout to load, initialisation and termination script files (when using a ScriptModule), and some other things which are not discussed here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Loading the Basic Files ==&lt;br /&gt;
In order to get things up and running you need to load in some files.  The minimal set of files required are:&lt;br /&gt;
* Imageset&lt;br /&gt;
* Font&lt;br /&gt;
* Scheme&lt;br /&gt;
&lt;br /&gt;
The good thing about the Scheme file is that it can be used to load the other two automatically.  Though the sample schemes currently provided in CEGUI only specify the Imageset and not the Font.  So for the purposes of this tutorial, we will load a scheme file and a font file.  This is done as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;// load in the scheme file, which auto-loads the TaharezLook imageset&lt;br /&gt;
CEGUI::SchemeManager::getSingleton().loadScheme(“../datafiles/schemes/TaharezLook.scheme”);&lt;br /&gt;
&lt;br /&gt;
// load in a font.  The first font loaded automatically becomes the default font.&lt;br /&gt;
if(! CEGUI::FontManager::getSingleton().isFontPresent(“../datafiles/fonts/Commonwealth-10”) )&lt;br /&gt;
  CEGUI::FontManager::getSingleton().createFont(“../datafiles/fonts/Commonwealth-10.font”);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above code snippet (and in the sample files) it is assumed that a 'datafiles' directory exists above the current directory, and that it contains all the files from the cegui_mk2/Samples/datafiles/ directory.&lt;br /&gt;
&lt;br /&gt;
'''Important note for Ogre users''':  To use the unmodified sample data files, you must ensure that the current working directory is specified as a resource location in the Ogre resource manager (usually via the resources.cfg file).  Alternatively, you could add all the datafiles sub-directories and remove the relative path information from the sample datafiles.  The reason the files are provided in this manner, is because they need to work under the default ResourceProvider used with raw D3D/OpenGL, as discussed above.&lt;br /&gt;
&lt;br /&gt;
== Simple Defaults Initialisation ==&lt;br /&gt;
Finally, you need to specify some defaults.  This is to ensure that the system always has a font and mouse cursor available for when a window or widget specifies no preference of its own.&lt;br /&gt;
&lt;br /&gt;
In reality, we no longer need to specify a default font, since the FontManager will now automatically set the first loaded font as the default.  Although if this is not the default font you require, you can set a different one as you desire.  The code to set a default font is as follows:&lt;br /&gt;
&lt;br /&gt;
 System::getSingleton().setDefaultFont(“Commonwealth-10”);&lt;br /&gt;
&lt;br /&gt;
The other default object you need to set is the mouse cursor.  This is to ensure that when you move the mouse over any element that does not set a cursor of its own the cursor does not disappear.  The code to set the default mouse cursor is as follows (NB: This uses the TaharezLook imageset which was loaded with the scheme above).&lt;br /&gt;
&lt;br /&gt;
 System::getSingleton().setDefaultMouseCursor(“TaharezLook”, “MouseArrow”);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Here we have learned the very basics of what the various data files used by CEGUI are, how they are loaded, and the minimal initialisation needed for CEGUI applications.  Other articles will discuss each of the data files types in greater detail allowing advanced uses to be discovered.&lt;br /&gt;
&lt;br /&gt;
--[[User:CrazyEddie|CrazyEddie]] 13:23, 11 Apr 2005 (BST)&lt;/div&gt;</summary>
		<author><name>Rackle</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=The_Main_Menu&amp;diff=2820</id>
		<title>The Main Menu</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=The_Main_Menu&amp;diff=2820"/>
				<updated>2008-02-01T12:19:13Z</updated>
		
		<summary type="html">&lt;p&gt;Rackle: /* Using Fonts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;So, you've probably read all the Beginner Guide to X tutorials (if not then go back and read them !), your sitting there still feeling lost, and you can't find exactly how to bring all the stuff you've read together to make a simple GUI. I too found it specially hard to wrap everything together when starting out and hopefully this article should help address this problem for others, I'm still a beginner so there might be a few errors, but for the most part the code has been tested. This tutorial will be rather Ogre oriented since thats what I use, I'll try to keep things a little generic though.&lt;br /&gt;
&lt;br /&gt;
This tutorial was last updated on: 7th January 2008 by CrazyEddie&lt;br /&gt;
&lt;br /&gt;
== Getting started ==&lt;br /&gt;
For tutorial purposes, we will quickly run over the Initialisation part (as this has been addressed in other tutorials more thoroughly and is usually engine specific). I will not litter the tutorial with unlrelated code like framelisteners, includes and other stuff. We will be making a main menu which is basicly just a collection of buttons and a StaticImage for background, but it is cruical that you have read the following tutorials and understood them, specially the file types.&lt;br /&gt;
[[http://www.cegui.org.uk/wiki/index.php/Tutorials#CrazyEddie.27s_Beginner_Guides CrazyEddie's Beginner Guides ]]&lt;br /&gt;
[[http://www.ogre3d.org/wiki/index.php/Basic_Tutorial_6 Ogre's Basic Tutorial 6]]&lt;br /&gt;
&lt;br /&gt;
== Creating the Menu: A plan of action ==&lt;br /&gt;
There are 3 ways to go about this, one way is to hardcode the menu (which is a bad idea unless you don't want your menu to be customisable), the 2nd way is to use although uses an xml based approach by writing layout files, imageset files..etc. The 3rd way is to use the falagard system which is subset of the 2nd approach, but expands even more on the functionality by offering the .looknfeel files which allow you to skin any existing scheme or even create your own. &lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
Ok, before we get started we need to have a few things initialised first, other then Ogre root, scene manager, framelistener....etc. If you've read [[http://www.ogre3d.org/wiki/index.php/Basic_Tutorial_6 basic tutorial 6]] you'll see that we need to have the following defiendone of the looks loaded as well as a font. I'll be using TaharezLook and tahoma-12 for this tutorial, but I'll load the font at a later stage in the tutorial. I'll only use CEGUI:: in this area, but I'll drop using it since it'll be obvious where to use it after a while. Just assume I've used using namespace CEGUI; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
// Initialisation Area&lt;br /&gt;
CEGUI::OgreCEGUIRenderer* mGUIRenderer = new CEGUI::OgreCEGUIRenderer(Root::getSingletonPtr()-&amp;gt;getAutoCreatedWindow(), Ogre::RENDER_QUEUE_OVERLAY, false, 3000);&lt;br /&gt;
CEGUI::System* mGUISystem = new CEGUI::System(mGUIRenderer);&lt;br /&gt;
CEGUI::Logger::getSingleton().setLoggingLevel(CEGUI::Informative); // this is recommended to help with debugging, but not neccessary&lt;br /&gt;
&lt;br /&gt;
CEGUI::SchemeManager::getSingleton().loadScheme((CEGUI::utf8*)&amp;quot;TaharezLook.scheme&amp;quot;);&lt;br /&gt;
mGUISystem-&amp;gt;setDefaultMouseCursor((CEGUI::utf8*)&amp;quot;TaharezLook&amp;quot;, (CEGUI::utf8*)&amp;quot;MouseArrow&amp;quot;);&lt;br /&gt;
CEGUI::Window* mRootWindow= CEGUI::WindowManager::getSingleton().createWindow((CEGUI::utf8*)&amp;quot;DefaultWindow&amp;quot;, (CEGUI::utf8*)&amp;quot;RootWindow&amp;quot;);  &lt;br /&gt;
mGUISystem-&amp;gt;setGUISheet(mRootWindow); // set active Window&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Note 1: Casting string params to UTF8* isn't neccessary, if your application will only use english (latin based languages), it shouldn't be of any use. But if you want to use other languages which are not covered by the ascii chart, you can use the utf8 cast. I won't be using it for this tutorial, but it should be obvious where you can use it&lt;br /&gt;
*Note 2: While its totally legal to use different windows and have children assigned to them, I prefer to have a single root window in which all other windows are childs to it. I initialise it as DefaultWindow* to set it apart from other window types&lt;br /&gt;
*Note 3: You can start your app without initialising a font, so long as you use a Window that doesn't use fonts (e.g: StaticImages)&lt;br /&gt;
&lt;br /&gt;
==== Includes ====&lt;br /&gt;
As I said earlier, I won't be adding #include lines to the tutorial's code to make it smaller. But here is a helpful tip that should spare you wasted time looking for which header to include. &lt;br /&gt;
Unless you #included &amp;quot;CEGUI.h&amp;quot;, you'll need to #include a header when you use a CEGUI class. Since the naming convention of CEGUI is rather helpful. You can almost always count on that class being in &amp;quot;CEGUI'''ClassName'''.h&amp;quot;. Make sure to make the first letter of the word upper case. If the class is 2 words, then each first letter is upper case. Like so&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
#include &amp;quot;CEGUISchemeManager.h&amp;quot;&lt;br /&gt;
#include &amp;quot;CEGUIFontManager.h&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
....etc :)&lt;br /&gt;
&lt;br /&gt;
=== The Code Approach ===&lt;br /&gt;
&lt;br /&gt;
There are a few things you'll constantly need when writing a menu, assuming your gui code is in a different class, we'll attempt to get pointers to them at the beginning of the code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
WindowManager* Wmgr = WindowManager::getSingletonPtr();&lt;br /&gt;
System* mGUISystem = System::getSingletonPtr();&lt;br /&gt;
Window* myRoot = Wmgr-&amp;gt;getWindow(&amp;quot;RootWindow&amp;quot;); // get default window&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== The Menu code ====&lt;br /&gt;
Anyways, now that we got that out of the way, lets get started. I'll write code, then explain it below&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
// Menu Background&lt;br /&gt;
Window* MenuBackground = Wmgr-&amp;gt;createWindow(&amp;quot;TaharezLook/StaticImage&amp;quot;, &amp;quot;Background&amp;quot;);&lt;br /&gt;
myRoot-&amp;gt;addChildWindow( MenuBackground );&lt;br /&gt;
MenuBackground-&amp;gt;setPosition( UVector2( UDim( 0.0f, 0.0f ), UDim( 0.0f, 0.0f) ) );&lt;br /&gt;
MenuBackground-&amp;gt;setSize( UVector2( UDim( 1.0f, 0.0f ), UDim( 1.0f, 0.0f ) ) );  // full screen&lt;br /&gt;
&lt;br /&gt;
// New game Button &lt;br /&gt;
PushButton* NewGame = (PushButton*)Wmgr-&amp;gt;createWindow(&amp;quot;TaharezLook/Button&amp;quot;, &amp;quot;NewGame&amp;quot;);&lt;br /&gt;
MenuBackground-&amp;gt;addChildWindow( NewGame );&lt;br /&gt;
NewGame-&amp;gt;setPosition( UVector2( UDim( 0.2f, 0.0f), UDim( 0.2f, 0.0f ) ) );&lt;br /&gt;
NewGame-&amp;gt;setSize( UVector2( UDim( 0.4f, 0.0f ), UDim( 0.2f, 0.0f ) ) );&lt;br /&gt;
&lt;br /&gt;
// Load game Button &lt;br /&gt;
PushButton* LoadGame= (PushButton*)Wmgr-&amp;gt;createWindow(&amp;quot;TaharezLook/Button&amp;quot;, &amp;quot;LoadGame&amp;quot;);&lt;br /&gt;
MenuBackground-&amp;gt;addChildWindow( LoadGame );&lt;br /&gt;
LoadGame-&amp;gt;setPosition( UVector2( UDim( 0.2f, 0.0f ), UDim( 0.45f, 0.0f ) ) );&lt;br /&gt;
LoadGame-&amp;gt;setSize( UVector2( UDim( 0.4f, 0.0f ), UDim( 0.2f, 0.0f ) ) );&lt;br /&gt;
&lt;br /&gt;
// Quit game Button &lt;br /&gt;
PushButton* QuitGame= (PushButton*)Wmgr-&amp;gt;createWindow(&amp;quot;TaharezLook/Button&amp;quot;, &amp;quot;QuitGame&amp;quot;);&lt;br /&gt;
MenuBackground-&amp;gt;addChildWindow( QuitGame );&lt;br /&gt;
QuitGame-&amp;gt;setPosition( UVector2( UDim( 0.2f, 0.0f ), UDim( 0.7f, 0.0f ) ) );&lt;br /&gt;
QuitGame-&amp;gt;setSize( UVector2( UDim( 0.4f, 0.0f ), UDim( 0.2f, 0.0f ) ) );&lt;br /&gt;
&lt;br /&gt;
mGUISystem-&amp;gt;setGUISheet(myRoot); // this line is redundant since you didn't change gui sheets, but its here to make sure&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will create a menu with 3 empty buttons positioned below each other with an empty background. You always need to define the starting position of the window (the top left edge) and how big the window will be. If you don't you'll never see the window.&lt;br /&gt;
You'll see that the 3 buttons are childs of the Background Menu window, which is a child of the RootWindow.&lt;br /&gt;
&lt;br /&gt;
==== Changing the look ====&lt;br /&gt;
But this is no fun, we want to set Images to the buttons, display text on them, perhaps even use tooltips. The menu isn't really usable this way. But before we start jumping into things, we must do a few things first.&lt;br /&gt;
&lt;br /&gt;
===== Using Fonts ===== &lt;br /&gt;
Before we use text, we'll need to define a font. If you've already done that then skip forward. If not then please add this line to your initialisation code in Prerequisites area.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
if(!FontManager::getSingleton().isFontPresent(&amp;quot;Tahoma-12&amp;quot;))&lt;br /&gt;
  FontManager::getSingleton().createFont(&amp;quot;Tahoma-12.font&amp;quot;);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To add a text line for a button you use:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
ButtonPtr-&amp;gt;setText(&amp;quot;foo&amp;quot;);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Using Tooltips =====&lt;br /&gt;
Now that we've defined a font, we should define tooltips as well in initialisation area. &lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
myGUISystem-&amp;gt;setDefaultTooltip(&amp;quot;TaharezLook/Tooltip&amp;quot;);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should usually just leave this with initialisation along with initialisation. You'll need to inject time pulses each frame though, that was explained here already [[ToolTips]].&lt;br /&gt;
To add a tooltip for a button you use:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
ButtonPtr-&amp;gt;setTooltipText(&amp;quot;foo&amp;quot;);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Using Images =====&lt;br /&gt;
Before using images, we need to define an imageset. You can skip forward to the [[http://www.cegui.org.uk/wiki/index.php/The_Main_Menu#Imagesets imageset explanation in the XML area]] to understand what it means. &lt;br /&gt;
&lt;br /&gt;
Note that you could easily create a full image from a texture using the line below, the auto-created image will be called &amp;quot;full_image&amp;quot;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
Imageset* foo = ImagesetManager::getSingletonPtr()-&amp;gt;createImagesetFromImageFile(&amp;quot;NameOfImageset&amp;quot;, &amp;quot;Image.jpg&amp;quot;);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
But if you want to split it up it'll be alittle harder. You'll need to define a texture&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
Texture* texturePtr = System::getSingletonPtr()-&amp;gt;getRenderer()-&amp;gt;createTexture(&amp;quot;ImageFile.jpg&amp;quot;, &amp;quot;&amp;quot;);&lt;br /&gt;
Imageset* MenuImageset = ImagesetManager::getSingletonPtr()-&amp;gt;createImageset(&amp;quot;ImageName&amp;quot;, texturePtr);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since I'm no artist, we'll just assume we have 2 image files, one with the background image and the other with the different button states (make sure they're loaded in resources.cfg). While there are 4 different states( Normal, Hover, pushed &amp;amp; Disabled) we'll just use 2 different looks (to avoid writing more similar code), one for normal &amp;amp; the other will be shared amongst Hover, Pushed &amp;amp; disabled. The 2nd image will contain the different looks for the button, indicating Up or Down states, check the illustration figure below. Each of the 2 images will have its own imageset.&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;15&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ MenuButtons.jpg&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | Button Up&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | Button Down&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
Imageset* MenuImageset = ImagesetManager::getSingletonPtr()-&amp;gt;createImagesetFromImageFile(&amp;quot;Background&amp;quot;,&amp;quot;MenuBackground.jpg&amp;quot;);&lt;br /&gt;
Texture* texturePtr = System::getSingletonPtr()-&amp;gt;getRenderer()-&amp;gt;createTexture(&amp;quot;MenuButtons.jpg&amp;quot;, &amp;quot;&amp;quot;);&lt;br /&gt;
Imageset* MenuImageset = ImagesetManager::getSingletonPtr()-&amp;gt;createImageset(&amp;quot;Buttons&amp;quot;, texturePtr);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we have our imagesets, we'll need define images in each. The first we'll need to define an the Background image, which will be full size. For the 2nd imageset we'll need to split it up and define 2 images inside of it. One for Button Up, and one for Button Down.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
MenuImageset-&amp;gt;defineImage(&amp;quot;Background&amp;quot;, Point(0.0f,0.0f), Size( 1.0f, 1.0f ), Point(0.0f,0.0f)); // Whole Image&lt;br /&gt;
ButtonsImageset-&amp;gt;defineImage(&amp;quot;ButtonUp&amp;quot;, Point(0.0f,0.0f), Size( 1.0f, 0.5f ), Point(0.0f,0.0f)); // Top half of image&lt;br /&gt;
ButtonsImageset-&amp;gt;defineImage(&amp;quot;ButtonDown&amp;quot;, Point(0.0f,0.5f), Size( 1.0f, 0.5f ), Point(0.0f,0.0f)); // Bottom Half&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
now that we have images defined, we can easily apply them to a window that supports images.  Note the value (second) string used here - is is of the format &amp;quot;set:&amp;lt;imageset name&amp;gt; image:&amp;lt;image name&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
Window-&amp;gt;setProperty( &amp;quot;Image&amp;quot;, &amp;quot;set:ImagesetName image:ImageName&amp;quot; );&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Wrapping It all up ====&lt;br /&gt;
Now lets write the code above again with the new adjustments&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
/*** Stuff you need to do in the initialisation phase ***/&lt;br /&gt;
FontManager::getSingletonPtr()-&amp;gt;createFont(&amp;quot;Tahoma-12.font&amp;quot;);&lt;br /&gt;
mGUISystem-&amp;gt;setDefaultTooltip(&amp;quot;TaharezLook/Tooltip&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
// Creating Imagesets and defining images&lt;br /&gt;
Imageset* MenuImageset = ImagesetManager::getSingletonPtr()-&amp;gt;createImagesetFromImageFile(&amp;quot;Background&amp;quot;,&amp;quot;MenuBackground.jpg&amp;quot;);&lt;br /&gt;
Texture* texturePtr = System::getSingletonPtr()-&amp;gt;getRenderer()-&amp;gt;createTexture(&amp;quot;MenuButtons.jpg&amp;quot;, &amp;quot;&amp;quot;); // default resource group&lt;br /&gt;
Imageset* ButtonsImageset = ImagesetManager::getSingletonPtr()-&amp;gt;createImageset(&amp;quot;Buttons&amp;quot;, texturePtr);&lt;br /&gt;
ButtonsImageset-&amp;gt;defineImage(&amp;quot;ButtonUp&amp;quot;, Point(0.0f,0.0f), Size( 0.5f, 0.5f ), Point(0.0f,0.0f)); &lt;br /&gt;
ButtonsImageset-&amp;gt;defineImage(&amp;quot;ButtonDown&amp;quot;, Point(0.0f,0.5f), Size( 0.5f, 0.5f ), Point(0.0f,0.0f));&lt;br /&gt;
&lt;br /&gt;
/*** the menu code ***/&lt;br /&gt;
Window* MenuBackground = Wmgr-&amp;gt;createWindow(&amp;quot;TaharezLook/StaticImage&amp;quot;, &amp;quot;Background&amp;quot;);&lt;br /&gt;
myRoot-&amp;gt;addChildWindow( MenuBackground );&lt;br /&gt;
MenuBackground-&amp;gt;setPosition( UVector2( UDim( 0.0f, 0.0f), UDim( 0.0f, 0.0f ) ) );&lt;br /&gt;
MenuBackground-&amp;gt;setSize( UVector2( UDim( 1.0f, 0.0f), UDim( 1.0f, 0.0f ) ) );  // full screen&lt;br /&gt;
// this is the preferred way to set the image.&lt;br /&gt;
MenuBackground-&amp;gt;setProperty( &amp;quot;Image&amp;quot;, &amp;quot;set:Background image:full_image&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
PushButton* NewGame = (PushButton*)Wmgr-&amp;gt;createWindow(&amp;quot;TaharezLook/Button&amp;quot;, &amp;quot;NewGame&amp;quot;);&lt;br /&gt;
MenuBackground-&amp;gt;addChildWindow( NewGame );&lt;br /&gt;
NewGame-&amp;gt;setPosition( UVector2( UDim( 0.2f, 0.0f ), UDim( 0.2f, 0.0f ) ) );&lt;br /&gt;
NewGame-&amp;gt;setSize( UVector2( UDim( 0.4f, 0.0f ), UDim( 0.2f, 0.0f ) ) );&lt;br /&gt;
NewGame-&amp;gt;setText(&amp;quot;New Game&amp;quot;);&lt;br /&gt;
NewGame-&amp;gt;setProperty( &amp;quot;NormalImage&amp;quot;, &amp;quot;set:Buttons image:ButtonUp&amp;quot; );&lt;br /&gt;
NewGame-&amp;gt;setProperty( &amp;quot;HoverImage&amp;quot;, &amp;quot;set:Buttons image:ButtonDown&amp;quot; );&lt;br /&gt;
NewGame-&amp;gt;setProperty( &amp;quot;PushedImage&amp;quot;, &amp;quot;set:Buttons image:ButtonDown&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
PushButton* LoadGame = (PushButton*)Wmgr-&amp;gt;createWindow(&amp;quot;TaharezLook/Button&amp;quot;, &amp;quot;LoadGame&amp;quot;);&lt;br /&gt;
MenuBackground-&amp;gt;addChildWindow( LoadGame );&lt;br /&gt;
LoadGame-&amp;gt;setPosition( UVector2( UDim(0.2f, 0.0f ), UDim( 0.45f, 0.0f ) ) );&lt;br /&gt;
LoadGame-&amp;gt;setSize( UVector2( UDim(0.4f, 0.0f ), UDim( 0.2f, 0.0f ) ) );&lt;br /&gt;
LoadGame-&amp;gt;setText(&amp;quot;Load Game&amp;quot;);&lt;br /&gt;
LoadGame-&amp;gt;setTooltipText(&amp;quot;Disabled, not implemented yet&amp;quot;);&lt;br /&gt;
LoadGame-&amp;gt;disable();&lt;br /&gt;
LoadGame-&amp;gt;setProperty( &amp;quot;NormalImage&amp;quot;, &amp;quot;set:Buttons image:ButtonUp&amp;quot; );&lt;br /&gt;
LoadGame-&amp;gt;setProperty( &amp;quot;HoverImage&amp;quot;, &amp;quot;set:Buttons image:ButtonDown&amp;quot; );&lt;br /&gt;
LoadGame-&amp;gt;setProperty( &amp;quot;PushedImage&amp;quot;, &amp;quot;set:Buttons image:ButtonDown&amp;quot; );&lt;br /&gt;
LoadGame-&amp;gt;setProperty( &amp;quot;DisabledImage&amp;quot;, &amp;quot;set:Buttons image:ButtonDown&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
PushButton* QuitGame= (PushButton*)Wmgr-&amp;gt;createWindow(&amp;quot;TaharezLook/Button&amp;quot;, &amp;quot;QuitGame&amp;quot;);&lt;br /&gt;
MenuBackground-&amp;gt;addChildWindow( QuitGame );&lt;br /&gt;
QuitGame-&amp;gt;setPosition( UVector2( UDim( 0.2f, 0.0f ), UDim( 0.7f, 0.0f ) ) );&lt;br /&gt;
QuitGame-&amp;gt;setSize( UVector2( UDim( 0.4f, 0.0f ), UDim( 0.2f, 0.0f ) ) );&lt;br /&gt;
QuitGame-&amp;gt;setText(&amp;quot;Quit Game&amp;quot;);&lt;br /&gt;
QuitGame-&amp;gt;setProperty( &amp;quot;NormalImage&amp;quot;, &amp;quot;set:Buttons image:ButtonUp&amp;quot; );&lt;br /&gt;
QuitGame-&amp;gt;setProperty( &amp;quot;HoverImage&amp;quot;, &amp;quot;set:Buttons image:ButtonDown&amp;quot; );&lt;br /&gt;
QuitGame-&amp;gt;setProperty( &amp;quot;PushedImage&amp;quot;, &amp;quot;set:Buttons image:ButtonDown&amp;quot; );&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now go ahead and test, doesn't that look much better ? It looks more like a proper menu now. You could start handling events from here on (explained later).&lt;br /&gt;
But this way isn't really very good. Should you want to change anything in the menu, you'll have to edit several lines of code &amp;amp; recompile your application. Besides, just making a menu as simple as that took about 50 lines of code, there must be a simpler way.&lt;br /&gt;
&lt;br /&gt;
=== XML based approach (non-falagard way) ===&lt;br /&gt;
&lt;br /&gt;
This way is much more efficient then hard-coding the menu. Its less code, easier to edit and use as well. I personally think this way is even better then using the falagard system if you're just after doing small and simple menu's, despite the fact falagard is supposed to be better performance wise and more flexible.&lt;br /&gt;
Before we start we need &lt;br /&gt;
&lt;br /&gt;
*Note 1: The .xsd files included in the cegui datafiles aren't needed if you're using Ogre. Ogre uses a different XML parser (tinyXML) which doesn't use these files so feel free to remove them, but if you're not using ogre and you didn't specify a different xml parser, you'll need those files.&lt;br /&gt;
&lt;br /&gt;
==== XML Crash Course ====&lt;br /&gt;
&lt;br /&gt;
If you're familiar with xml, feel free to skip this area (or better yet, rewrite it to make it more helpful).&lt;br /&gt;
&lt;br /&gt;
A code line is usually encapsulated in &amp;lt; &amp;gt;. To start a declare a new type you can use &amp;lt;Type/&amp;gt; or &amp;lt;Type&amp;gt; &amp;lt;/Type&amp;gt;. The first way should be used to declare objects that don't have too many settings. e.g:&lt;br /&gt;
 &amp;lt;Image Name=&amp;quot;Background&amp;quot; XPos=&amp;quot;0.0&amp;quot; YPos=&amp;quot;0.0&amp;quot; Width=&amp;quot;800&amp;quot; Height=&amp;quot;600&amp;quot; /&amp;gt;&lt;br /&gt;
As you've probably noticed, you can set its settings in the same line. As for the second way, it should be used to open up bigger types. e.g:&lt;br /&gt;
 &amp;lt;Window Type=&amp;quot;TaharezLook/Button&amp;quot; Name=&amp;quot;NewGame&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.2,0.0},{0.45,0.0},{0.6,0.0},{0.65,0.0}}&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;/Window&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can start nesting types in other types, you should be able to pickup the rest of the basics from xml files included with CEGUI and the ones in this tutorial.&lt;br /&gt;
 &lt;br /&gt;
*Note 1: Please use a proper text editor and not notepad or wordpad, there are many available for free online, using google would be a good time here :).&lt;br /&gt;
&lt;br /&gt;
==== XML File types ====&lt;br /&gt;
Now I'll explain the filetypes (copied from the beginner tutorial to loading data) and thier uses, there are 3 types. .layout .imageset .scheme ( there is a 4th one .looknfeel used with falagard)&lt;br /&gt;
While you can just call them .xml and be done with it, this way makes it more clearer.&lt;br /&gt;
&lt;br /&gt;
===== Imagesets =====&lt;br /&gt;
&lt;br /&gt;
Effectively, an Imageset is just a collection of defined regions upon the source image / texture file (which is also specified in the Imageset definition). Each of these defined regions has a unique name and is known within the system as an Image. An Image as defined in an Imageset is the basic level of imagery used by CEGUI. By modifying the source image / texture file and also the position and size of the defined regions within the Imageset files you can easily change the appearance of what gets drawn by CEGUI. &lt;br /&gt;
&lt;br /&gt;
Since each imageset cannot contain more then one Image file. We'll have to make 2 imageset files. For both images, we'll assume the width and hieght are 512x512. But for the second image, we'll assume it has 4 different button images inside instead of just 2 like the code part of tutorial, each button image is 1/4 the size of the full image. The only reason behind this is its much easier to assign &amp;amp; define images now. Here is an illustration figure for the 2nd image&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;10&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ MenuButtons.jpg&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | Button Up&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | Button Down&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | Button Highlighted&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | Button Greyed Out&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* MenuBackground.imageset&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
 &amp;lt;Imageset Name=&amp;quot;Background&amp;quot; Imagefile=&amp;quot;MenuBackground.jpg&amp;quot; NativeHorzRes=&amp;quot;800&amp;quot; NativeVertRes=&amp;quot;600&amp;quot; AutoScaled=&amp;quot;true&amp;quot; ResourceGroup=&amp;quot;General&amp;quot;&amp;gt;&lt;br /&gt;
 	&amp;lt;Image Name=&amp;quot;Background&amp;quot; XPos=&amp;quot;0.0&amp;quot; YPos=&amp;quot;0.0&amp;quot; Width=&amp;quot;512&amp;quot; Height=&amp;quot;512&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;/Imageset&amp;gt;&lt;br /&gt;
* MenuButtons.imageset&lt;br /&gt;
  &amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
  &amp;lt;Imageset Name=&amp;quot;Buttons&amp;quot; Imagefile=&amp;quot;MenuButtons.jpg&amp;quot; NativeHorzRes=&amp;quot;800&amp;quot; NativeVertRes=&amp;quot;600&amp;quot; AutoScaled=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
 	&amp;lt;Image Name=&amp;quot;ButtonUp&amp;quot; XPos=&amp;quot;0.0&amp;quot; YPos=&amp;quot;0.0&amp;quot; Width=&amp;quot;512&amp;quot; Height=&amp;quot;128&amp;quot; /&amp;gt;&lt;br /&gt;
 	&amp;lt;Image Name=&amp;quot;ButtonDown&amp;quot; XPos=&amp;quot;0.0&amp;quot; YPos=&amp;quot;128.0&amp;quot; Width=&amp;quot;512&amp;quot; Height=&amp;quot;128&amp;quot; /&amp;gt;&lt;br /&gt;
 	&amp;lt;Image Name=&amp;quot;ButtonDisabled&amp;quot; XPos=&amp;quot;0.0&amp;quot; YPos=&amp;quot;256.0&amp;quot; Width=&amp;quot;512&amp;quot; Height=&amp;quot;128&amp;quot; /&amp;gt;&lt;br /&gt;
 	&amp;lt;Image Name=&amp;quot;ButtonHighlighted&amp;quot; XPos=&amp;quot;0.0&amp;quot; YPos=&amp;quot;384.14&amp;quot; Width=&amp;quot;512&amp;quot; Height=&amp;quot;128&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;/Imageset&amp;gt;&lt;br /&gt;
&lt;br /&gt;
While the ResourceGroup=&amp;quot;&amp;quot; line isn't necessary, I just added it so you can see where to use it.&lt;br /&gt;
To load Imagesets by code you do &lt;br /&gt;
 ImagesetManager::getSingletonPtr()-&amp;gt;createImageset( &amp;quot;MenuBackground.imageset&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
===== Layouts =====&lt;br /&gt;
&lt;br /&gt;
A layout file contains an XML representation of a window layout. Each nested 'Window' element defines a window or widget to be created, the 'Property' elements define the desired settings and property values for each window defined. &lt;br /&gt;
&lt;br /&gt;
* Menu.layout&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;WindowsLook/StaticImage&amp;quot; Name=&amp;quot;Menu/Background&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;Property Name=&amp;quot;UnifiedSize&amp;quot; Value=&amp;quot;{{1.0,0},{1.0,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;lt;Property Name=&amp;quot;Image&amp;quot; Value=&amp;quot;set:Background image:Background&amp;quot; /&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
         &amp;lt;Window Type=&amp;quot;WindowsLook/Button&amp;quot; Name=&amp;quot;Menu/NewGame&amp;quot;&amp;gt;&lt;br /&gt;
             &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.2,0.0},{0.2,0.0},{0.6,0.0},{0.4,0.0}}&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Property Name=&amp;quot;NormalImage&amp;quot; Value=&amp;quot;set:Buttons image:ButtonUp&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Property Name=&amp;quot;HoverImage&amp;quot; Value=&amp;quot;set:Buttons image:ButtonDisabled&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Property Name=&amp;quot;PushedImage&amp;quot; Value=&amp;quot;set:Buttons image:ButtonHighlighted&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Property Name=&amp;quot;DisabledImage&amp;quot; Value=&amp;quot;set:Buttons image:ButtonDisabled&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;Start a new game&amp;quot;/&amp;gt;&lt;br /&gt;
         &amp;lt;/Window&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
         &amp;lt;Window Type=&amp;quot;WindowsLook/Button&amp;quot; Name=&amp;quot;Menu/LoadGame&amp;quot;&amp;gt;&lt;br /&gt;
             &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.2,0.0},{0.45,0.0},{0.6,0.0},{0.65,0.0}}&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Property Name=&amp;quot;NormalImage&amp;quot; Value=&amp;quot;set:Buttons image:ButtonUp&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Property Name=&amp;quot;HoverImage&amp;quot; Value=&amp;quot;set:Buttons image:ButtonDisabled&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Property Name=&amp;quot;PushedImage&amp;quot; Value=&amp;quot;set:Buttons image:ButtonHighlighted&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Property Name=&amp;quot;DisabledImage&amp;quot; Value=&amp;quot;set:Buttons image:ButtonDisabled&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;Not implemented yet&amp;quot;/&amp;gt;&lt;br /&gt;
          &amp;lt;/Window&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
         &amp;lt;Window Type=&amp;quot;WindowsLook/Button&amp;quot; Name=&amp;quot;Menu/QuitGame&amp;quot;&amp;gt;&lt;br /&gt;
             &amp;lt;Property Name=&amp;quot;UnifiedAreaRect&amp;quot; Value=&amp;quot;{{0.2,0.0},{0.7,0.0},{0.6,0.0},{0.9,0.0}}&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Property Name=&amp;quot;NormalImage&amp;quot; Value=&amp;quot;set:Buttons image:ButtonUp&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Property Name=&amp;quot;HoverImage&amp;quot; Value=&amp;quot;set:Buttons image:ButtonDisabled&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Property Name=&amp;quot;PushedImage&amp;quot; Value=&amp;quot;set:Buttons image:ButtonHighlighted&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Property Name=&amp;quot;DisabledImage&amp;quot; Value=&amp;quot;set:Buttons image:ButtonDisabled&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Property Name=&amp;quot;Tooltip&amp;quot; Value=&amp;quot;Exit To Desktop&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;
This does basicly all the stuff we did in the code portion of the tutorial. The only new term here is UnifiedAreaRect, the first pair defines where the XPos starts, the 3rd defines where it ends. Same goes for 2nd &amp;amp; 4th but for YPos&lt;br /&gt;
 &lt;br /&gt;
To load a .layout file in code you do&lt;br /&gt;
 Window* Menu = WindowManager::getSingletonPtr()-&amp;gt;loadWindowLayout(&amp;quot;Menu.layout&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
*Note 1: There is an editor file for layouts written by scriptkid, its preferable if you get it from CVS and build it, but its possible to get the binaries from the downloads area in the cegui website. While its rather limited atm, it allows you to create and place the various widgets and export into a .layout file. It doesn't support custom images as of yet (8/12/2005).&lt;br /&gt;
*Note 2: Since the layout file is usually the most error prone, I usually encase it in a try catch statement to catch any parsing exceptions and pause on them. If you don't do that you won't get informed of errors when they happen, which could lead to other errors happening and crashing ultimatley.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
try&lt;br /&gt;
{&lt;br /&gt;
	Window* Menu = WindowManager::getSingletonPtr()-&amp;gt;loadWindowLayout(&amp;quot;Menu.layout&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
catch(CEGUI::Exception &amp;amp;e)&lt;br /&gt;
{&lt;br /&gt;
 OGRE_EXCEPT(Ogre::Exception::ERR_INTERNAL_ERROR, string(e.getMessage().c_str()), &amp;quot;Error Parsing Menu&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Schemes =====&lt;br /&gt;
&lt;br /&gt;
A Scheme is a means to group other data files together, it's also the most convenient way to load and register widget types. A Scheme can contain one or more of the following (which will be loaded and initialised when the scheme is loaded): &lt;br /&gt;
Imageset &lt;br /&gt;
Window Set &lt;br /&gt;
Window Alias &lt;br /&gt;
A 'Window Set' basically specifies the name of a loadable module or skin(.dll , .so, .looknfeel), and a set of widgets contained within that modules that you wish to register with the system. A 'Window Alias' provides a means to refer to a window / widget type by alternative names, it can also be used to 'hide' an already registered widget type with another widget type (so that other widget type gets used instead). &lt;br /&gt;
&lt;br /&gt;
This file isn't totally needed in the current approach, we're just using it here as a means of grouping imagesets for loading. However this file will be used in greater detail in the Falagard system. &lt;br /&gt;
&lt;br /&gt;
* GameGUI.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;GameGUI&amp;quot;&amp;gt;&lt;br /&gt;
 	&amp;lt;Imageset Name=&amp;quot;Background&amp;quot; Filename=&amp;quot;MenuButtons.imageset&amp;quot; ResourceGroup=&amp;quot;General&amp;quot;/&amp;gt;&lt;br /&gt;
 	&amp;lt;Imageset Name=&amp;quot;Buttons&amp;quot; Filename=&amp;quot;MenuButtons.imageset&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;/GUIScheme&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This simply just loads the 2 imagesets. To load the scheme by code you use&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
SchemeManager::getSingleton().loadScheme(&amp;quot;GameGUI.scheme);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Wrapping It all up ====&lt;br /&gt;
&lt;br /&gt;
Save the xml files above and add them somewhere in your Resource hierarchy (which should be your media folder unless you changed it).&lt;br /&gt;
&lt;br /&gt;
Now for the code portion, the initialisation area will remain the same. However, you'll need to have this line before your menu code&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
SchemeManager::getSingleton().loadScheme(&amp;quot;GameGUI.scheme);&lt;br /&gt;
// Or you could do this if you skip the scheme part&lt;br /&gt;
//ImagesetManager::getSingletonPtr()-&amp;gt;createImageset( &amp;quot;MenuBackground.imageset&amp;quot;);&lt;br /&gt;
//ImagesetManager::getSingletonPtr()-&amp;gt;createImageset( &amp;quot;MenuButtons.imageset&amp;quot;);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now its time to write the menu code&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
WindowManager* Wmgr = WindowManager::getSingletonPtr();&lt;br /&gt;
System* mGUISystem = System::getSingletonPtr();&lt;br /&gt;
Window* myRoot = Wmgr-&amp;gt;getWindow(&amp;quot;RootWindow&amp;quot;); // get default window&lt;br /&gt;
&lt;br /&gt;
try&lt;br /&gt;
{&lt;br /&gt;
	Window* Menu = Wmgr-&amp;gt;loadWindowLayout(&amp;quot;Menu.layout&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
catch(CEGUI::Exception &amp;amp;e)&lt;br /&gt;
{&lt;br /&gt;
	OGRE_EXCEPT(Ogre::Exception::ERR_INTERNAL_ERROR, string(e.getMessage().c_str()), &amp;quot;Error Parsing Menu&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
myRoot-&amp;gt;addChildWindow(Menu);&lt;br /&gt;
GUISys-&amp;gt;setGUISheet(myRoot); // this line is redundant since you didn't change gui sheets, but its here to make sure&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And thats it ! 50 lines of code are now alittle less then 10 lines. The menu is now easily editable by editing the xml files without the need of recompiling. Should any errors occur, checking the cegui.log should be very handy.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Falagard Way &amp;amp; the looknfeel system ===&lt;br /&gt;
TO DO&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Handling events for the menu ==&lt;br /&gt;
Ok, so we've seen how to make our menu. But so far we can only look at it, we can't use it. Here we'll learn how to start subscribing events and handle them. To start handling events we need to have pointers for each menu button you want handled (even the background if you want to do anything special). If you've followed the code approach, you should already have them. Otherwise, we'll need to start getting them. Simply do this for each button&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
PushButton* Button1 = (PushButton*)wmgr-&amp;gt;getWindow(&amp;quot;Widget Reference Name&amp;quot;);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now that we have pointers to the buttons we wan't to handle. You need to subscribe it to a function that will do the &amp;quot;handling&amp;quot;. If you're function is a global function (or not part of a class). you do this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
Button1 -&amp;gt;subscribeEvent(PushButton::EventClicked, HandleButton1);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
if it is part of a class you do this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
Button1-&amp;gt;subscribeEvent(PushButton::EventClicked, Event::Subscriber(&amp;amp;ClassName::HandleButton1, this));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
What this does is tell the Window to trigger function HandleButton1() should EventClicked happen. There are much more events which you can find out about them from the API reference.&lt;br /&gt;
&lt;br /&gt;
Now here is a typical action &lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
bool HandleButton1(const EventArgs&amp;amp; e)&lt;br /&gt;
{&lt;br /&gt;
  //Code you want Button1 to do&lt;br /&gt;
  return true;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the event is triggered, HandleButton1 is called and an EventArgs is passed to it. This has some useful info you might need to operate on, &lt;br /&gt;
&lt;br /&gt;
*Note 1 : the function needs to be of type bool and return true. it also needs to take one parameter only and thats const CEGUI::EventArgs&amp;amp;&lt;br /&gt;
&lt;br /&gt;
=== What you need in your Frame Listener ===&lt;br /&gt;
&lt;br /&gt;
But wait a minute, CEGUI doesn't detect keyboard &amp;amp; mouse input itself. This means none of the code above will work just yet, we'll need to inject Input as we get it. So you'll have to modify your framelistener to do so. This part is based in portion from [[http://www.ogre3d.org/wiki/index.php/Basic_Tutorial_6 basic tutorial 6]]. This area is heavily ogre specific btw for those who didn't notice&lt;br /&gt;
&lt;br /&gt;
First you'll need to subclass your framelistener (or whatever class handles your input) from KeyListener, MouseMotionListener &amp;amp; MouseListener then overload the pure virtual functions(check the ogre api to see which functions you'll need to overload)&lt;br /&gt;
Here is a list off all of them (might be some more), some of them you don't need to inject so provide empty &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
// Helper function&lt;br /&gt;
ConvertOgreButtonToCegui(int ButtonID);&lt;br /&gt;
&lt;br /&gt;
//key listener&lt;br /&gt;
void keyPressed(KeyEvent *e);&lt;br /&gt;
void keyClicked(KeyEvent *e);&lt;br /&gt;
void keyReleased(KeyEvent *e);&lt;br /&gt;
&lt;br /&gt;
//mouse motion listener&lt;br /&gt;
void mouseMoved(MouseEvent *e);&lt;br /&gt;
void mouseDragMoved(MouseEvent *e){}&lt;br /&gt;
void mouseDragged(MouseEvent *e);&lt;br /&gt;
 &lt;br /&gt;
// mouse listener&lt;br /&gt;
void mouseReleased (MouseEvent *e);&lt;br /&gt;
void mousePressed (MouseEvent *e);&lt;br /&gt;
void mouseClicked (MouseEvent *e){};&lt;br /&gt;
void mouseEntered (MouseEvent *e){};&lt;br /&gt;
void mouseExited (MouseEvent *e){};&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
here is thier implementations&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
MouseButton YourInputListenerClass::ConvertOgreButtonToCegui(int ButtonID)&lt;br /&gt;
{&lt;br /&gt;
   switch (ButtonID)&lt;br /&gt;
   {&lt;br /&gt;
   case MouseEvent::BUTTON0_MASK:&lt;br /&gt;
       return CEGUI::LeftButton;&lt;br /&gt;
   case MouseEvent::BUTTON1_MASK:&lt;br /&gt;
       return CEGUI::RightButton;&lt;br /&gt;
   case MouseEvent::BUTTON2_MASK:&lt;br /&gt;
       return CEGUI::MiddleButton;&lt;br /&gt;
   case MouseEvent::BUTTON3_MASK:&lt;br /&gt;
       return CEGUI::X1Button;&lt;br /&gt;
   default:&lt;br /&gt;
       return CEGUI::LeftButton;&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
void YourInputListenerClass::keyPressed(KeyEvent *e)&lt;br /&gt;
{&lt;br /&gt;
	mGUISystem-&amp;gt;injectKeyDown(e-&amp;gt;getKey());   // I'm not totally sure about this area, can someone confirm ?&lt;br /&gt;
	mGUISystem-&amp;gt;injectChar(e-&amp;gt;getKeyChar());&lt;br /&gt;
	e-&amp;gt;consume();&lt;br /&gt;
}&lt;br /&gt;
void YourInputListenerClass::keyReleased(KeyEvent *e)&lt;br /&gt;
{&lt;br /&gt;
	mGUISystem-&amp;gt;injectKeyUp(e-&amp;gt;getKey());&lt;br /&gt;
	e-&amp;gt;consume();&lt;br /&gt;
}&lt;br /&gt;
void YourInputListenerClass::mouseMoved (MouseEvent *e)&lt;br /&gt;
{&lt;br /&gt;
	mGUISystem-&amp;gt;injectMouseMove(e-&amp;gt;getRelX() * mGUIRenderer -&amp;gt;getWidth(),e-&amp;gt;getRelY() * GuiRenderer-&amp;gt;getHeight());&lt;br /&gt;
	e-&amp;gt;consume();&lt;br /&gt;
}&lt;br /&gt;
void YourInputListenerClass::mousePressed (MouseEvent *e)&lt;br /&gt;
{&lt;br /&gt;
	mGUISystem-&amp;gt;injectMouseButtonDown(ConvertOgreButtonToCegui(e-&amp;gt;getButtonID()));&lt;br /&gt;
	e-&amp;gt;consume();&lt;br /&gt;
}&lt;br /&gt;
void YourInputListenerClass::mouseReleased(MouseEvent *e)&lt;br /&gt;
{&lt;br /&gt;
 	mGUISystem-&amp;gt;injectMouseButtonUp(ConvertOgreButtonToCegui(e-&amp;gt;getButtonID()));&lt;br /&gt;
 	e-&amp;gt;consume();&lt;br /&gt;
}&lt;br /&gt;
void YourInputListenerClass::mouseDragged (MouseEvent *e) &lt;br /&gt;
{ &lt;br /&gt;
	mouseMoved(e);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
=== Handling events for the layout approach ===&lt;br /&gt;
I'll show an example based on the layout approach, you could easily adapt it to any of the other approaches.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
// handler functions declarations&lt;br /&gt;
bool handleNewGame(const EventArgs&amp;amp; e);&lt;br /&gt;
bool handleQuit(const EventArgs&amp;amp; e);&lt;br /&gt;
bool handleHover(const EventArgs&amp;amp; e);&lt;br /&gt;
&lt;br /&gt;
WindowManager* Wmgr = WindowManager::getSingletonPtr();&lt;br /&gt;
System* mGUISystem = System::getSingletonPtr();&lt;br /&gt;
Window* myRoot = Wmgr-&amp;gt;getWindow(&amp;quot;RootWindow&amp;quot;); // get default window&lt;br /&gt;
&lt;br /&gt;
try&lt;br /&gt;
{&lt;br /&gt;
	Window* Menu = Wmgr-&amp;gt;loadWindowLayout(&amp;quot;Menu.layout&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
catch(CEGUI::Exception &amp;amp;e)&lt;br /&gt;
{&lt;br /&gt;
	OGRE_EXCEPT(Ogre::Exception::ERR_INTERNAL_ERROR, string(e.getMessage().c_str()), &amp;quot;Error Parsing Menu&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
myRoot-&amp;gt;addChildWindow(Menu);&lt;br /&gt;
mGUISystem-&amp;gt;setGUISheet(myRoot); &lt;br /&gt;
&lt;br /&gt;
bool handleNewGame(const EventArgs&amp;amp; e)&lt;br /&gt;
{&lt;br /&gt;
    // your project specific code to start game&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool handleHover(const EventArgs&amp;amp; e)&lt;br /&gt;
{&lt;br /&gt;
    // Play a beep sound &lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool handleQuit(const EventArgs&amp;amp; e)&lt;br /&gt;
{&lt;br /&gt;
    // your engine specific code to shut down&lt;br /&gt;
    Root::getSingletonPtr()-&amp;gt;queueEndRendering(); // ogre specific&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thats it. Theoritically it should work. Now go ahead and try :)&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
Now it should be easy to and clear to beginner users how to begin making use of CEGUI, you can easily extend what you've learnt here to start making more complex GUIs.&lt;br /&gt;
If you find that something isn't clear or you want help with it you can post on the forums or join the #cegui channel on IRC (freenode server). I usually idle on IRC often, nick MandM.&lt;/div&gt;</summary>
		<author><name>Rackle</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=Game_chat_box&amp;diff=2819</id>
		<title>Game chat box</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=Game_chat_box&amp;diff=2819"/>
				<updated>2008-02-01T12:16:55Z</updated>
		
		<summary type="html">&lt;p&gt;Rackle: /* ChatBox_demo.h */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Introduction ===&lt;br /&gt;
This snippet implements a chat box that can display text in 3 font sizes as well as limiting the number of entries (history) to a certain number.  Please discuss this article within the [http://www.cegui.org.uk/phpBB2/viewtopic.php?p=13333 GameChatBox] thread.&lt;br /&gt;
&lt;br /&gt;
==== .layout Special Features ====&lt;br /&gt;
The layout definition is deceptively simple.  It defines a FrameWindow containing two widgets; a Listbox in the upper region for chat history and an Editbox at the lower region for text input.&lt;br /&gt;
&lt;br /&gt;
What is not apparent is how the bottom portion of the Listbox and the entire Editbox are defined; they specify a proportion of 100% of their parent but with a negative offset.  Essentially the bottom of the Listbox extends to the bottom of the FrameWindow (the parent) and is then moved &amp;quot;up&amp;quot; to make room for the Editbox.  And the Editbox follows the same pattern.  This allows the Editbox to retain its height as the parent FrameWindow is resized.&lt;br /&gt;
&lt;br /&gt;
==== Creating the necessary .font files ====&lt;br /&gt;
A .font file is a simple text file that defines a font within Cegui.  They are located within the datafiles\fonts directory.&lt;br /&gt;
&lt;br /&gt;
This snippet uses the Commonwealth font in sizes 10, 36, and 72.  To create the missing font definitions for sizes 36 and 72 simply make two copies of the existing &amp;quot;Commonwealth-10.font&amp;quot; file.  The first copy is to be named &amp;quot;Commonwealth-36.font&amp;quot; and the second copy &amp;quot;Commonwealth-72.font&amp;quot;.  Edit the &amp;quot;Commonwealth-36.font&amp;quot; file and replace the value &amp;quot;10&amp;quot; by the value &amp;quot;36&amp;quot;.  Similarly edit the &amp;quot;Commonwealth-72.font&amp;quot; file and replace the value &amp;quot;10&amp;quot; by the value &amp;quot;72&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Another approach is to dynamically create fonts.  For more details consult [[DynamicFont]]&lt;br /&gt;
&lt;br /&gt;
=== Files ===&lt;br /&gt;
==== ChatBox_demo.h ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
#ifndef _ChatBox_h_&lt;br /&gt;
#define _ChatBox_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;
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.font&amp;quot;))&lt;br /&gt;
				FontManager::getSingleton().createFont(&amp;quot;Commonwealth-10.font&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			// Initialize the list of available fonts&lt;br /&gt;
			mCurrentFont = 0;&lt;br /&gt;
			addFont(&amp;quot;Commonwealth-10&amp;quot;);&lt;br /&gt;
			addFont(&amp;quot;Commonwealth-36&amp;quot;);&lt;br /&gt;
			addFont(&amp;quot;Commonwealth-72&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;ChatBox.layout&amp;quot;);&lt;br /&gt;
			sheet-&amp;gt;addChildWindow(guiLayout);&lt;br /&gt;
&lt;br /&gt;
			// Configure the events for the chat box&lt;br /&gt;
			CEGUI::Window* editBox = winMgr.getWindow(&amp;quot;/ChatBox/Text&amp;quot;);&lt;br /&gt;
			editBox-&amp;gt;subscribeEvent(CEGUI::Editbox::EventTextAccepted,	CEGUI::Event::Subscriber(&amp;amp;DemoSample::EditTextAccepted, this)); &lt;br /&gt;
			editBox-&amp;gt;subscribeEvent(CEGUI::Editbox::EventMouseClick,	CEGUI::Event::Subscriber(&amp;amp;DemoSample::FontChange,		this)); &lt;br /&gt;
&lt;br /&gt;
			// Configure the history size&lt;br /&gt;
			mHistorySize = 100;&lt;br /&gt;
			CEGUI::Window* historyBox = winMgr.getWindow(&amp;quot;/ChatBox/History&amp;quot;);&lt;br /&gt;
			historyBox-&amp;gt;subscribeEvent(CEGUI::Editbox::EventTextAccepted,	CEGUI::Event::Subscriber(&amp;amp;DemoSample::HistoryTextAccepted, this)); &lt;br /&gt;
			historyBox-&amp;gt;setText( PropertyHelper::intToString(static_cast&amp;lt;int&amp;gt;(mHistorySize)) );&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;
	}&lt;br /&gt;
&lt;br /&gt;
	void setHistorySize(const size_t&amp;amp; pSize)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		if(pSize &amp;gt; 0)&lt;br /&gt;
		{&lt;br /&gt;
			// A better validation would be to enforce a minimal and a maximal size&lt;br /&gt;
			mHistorySize = pSize;&lt;br /&gt;
&lt;br /&gt;
			WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
			Listbox* listBox = static_cast&amp;lt;Listbox*&amp;gt; (winMgr.getWindow(&amp;quot;/ChatBox/List&amp;quot;));&lt;br /&gt;
			ListboxItem* item;&lt;br /&gt;
			while(listBox-&amp;gt;getItemCount() &amp;gt; mHistorySize)&lt;br /&gt;
			{&lt;br /&gt;
				item = listBox-&amp;gt;getListboxItemFromIndex(0);&lt;br /&gt;
				listBox-&amp;gt;removeItem(item);&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool HistoryTextAccepted(const CEGUI::EventArgs&amp;amp; args)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
		CEGUI::Window* historyBox = winMgr.getWindow(&amp;quot;/ChatBox/History&amp;quot;);&lt;br /&gt;
		int historySize = PropertyHelper::stringToInt( historyBox-&amp;gt;getText() );&lt;br /&gt;
		setHistorySize(historySize);&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool EditTextAccepted(const CEGUI::EventArgs&amp;amp; args)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		// Variables for the Listbox and the Editbox&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
		Editbox* editBox = static_cast&amp;lt;Editbox*&amp;gt; (winMgr.getWindow(&amp;quot;/ChatBox/Text&amp;quot;));&lt;br /&gt;
		Listbox* listBox = static_cast&amp;lt;Listbox*&amp;gt; (winMgr.getWindow(&amp;quot;/ChatBox/List&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
		// Add the Editbox text to the Listbox&lt;br /&gt;
		ListboxTextItem* textItem;&lt;br /&gt;
		if(listBox-&amp;gt;getItemCount() == mHistorySize)&lt;br /&gt;
		{&lt;br /&gt;
			/* We have reached the capacity of the Listbox so re-use the first Listbox item.&lt;br /&gt;
			   This code is a little crafty.  By default the ListboxTextItem is created with&lt;br /&gt;
			   the auto-delete flag set to true, which results in its automatic deletion when&lt;br /&gt;
			   removed from the Listbox.  So we change that flag to false, extract the item&lt;br /&gt;
			   from the Listbox, change its text, put the auto-delete flag back to true, and&lt;br /&gt;
			   finally put the item back into the Listbox. */&lt;br /&gt;
			textItem = static_cast&amp;lt;ListboxTextItem*&amp;gt;(listBox-&amp;gt;getListboxItemFromIndex(0));&lt;br /&gt;
			textItem-&amp;gt;setAutoDeleted(false);&lt;br /&gt;
			listBox-&amp;gt;removeItem(textItem);&lt;br /&gt;
			textItem-&amp;gt;setAutoDeleted(true);&lt;br /&gt;
			textItem-&amp;gt;setText(editBox-&amp;gt;getText());&lt;br /&gt;
		}&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			// Create a new listbox item&lt;br /&gt;
			textItem = new ListboxTextItem(editBox-&amp;gt;getText());&lt;br /&gt;
		}&lt;br /&gt;
		listBox-&amp;gt;addItem(textItem);&lt;br /&gt;
		listBox-&amp;gt;setItemSelectState(textItem, true);&lt;br /&gt;
&lt;br /&gt;
		// Scroll the Listbox entries such that the new text is visible&lt;br /&gt;
		listBox-&amp;gt;ensureItemIsVisible(listBox-&amp;gt;getItemCount());&lt;br /&gt;
&lt;br /&gt;
		// Clear the text in the Editbox&lt;br /&gt;
		editBox-&amp;gt;setText(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	void addFont(const CEGUI::String&amp;amp; pFont)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		if(!FontManager::getSingleton().isFontPresent(pFont))&lt;br /&gt;
		{&lt;br /&gt;
			mFontList.push_back(pFont);&lt;br /&gt;
			FontManager::getSingleton().createFont(pFont + &amp;quot;.font&amp;quot;);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool FontChange(const CEGUI::EventArgs&amp;amp; args)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		const MouseEventArgs&amp;amp; mouseEventArgs = static_cast&amp;lt;const MouseEventArgs&amp;amp;&amp;gt;(args);&lt;br /&gt;
		if(mouseEventArgs.button == RightButton)&lt;br /&gt;
		{&lt;br /&gt;
			// Cycle through the installed fonts upon a right-click&lt;br /&gt;
			mCurrentFont++;&lt;br /&gt;
			if(mCurrentFont &amp;gt;= mFontList.size())&lt;br /&gt;
				mCurrentFont = 0;&lt;br /&gt;
&lt;br /&gt;
			changeFont(mFontList[mCurrentFont]);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	void changeFont(const CEGUI::String&amp;amp; pFont)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
&lt;br /&gt;
		// Measure the height of the selected font&lt;br /&gt;
		Font* currentFont = FontManager::getSingleton().getFont(pFont);&lt;br /&gt;
		float fontHeight = currentFont-&amp;gt;getFontHeight();&lt;br /&gt;
&lt;br /&gt;
		/* Alter the area of the Editbox.  The original value is {{0.01,0},{1,-30},{0.99,0},{1,-5}}&lt;br /&gt;
		   The value we are altering is the &amp;quot;-30&amp;quot; within the second couplet, defining the position of&lt;br /&gt;
		   the upper y coordinate of the Editbox.  We base the new value on the position of the lower&lt;br /&gt;
		   y coordinate, which is &amp;quot;-5&amp;quot;, and the height of the font.  To this we add some space &amp;quot;10&amp;quot; to&lt;br /&gt;
		   account for the Editbox's border. */&lt;br /&gt;
		Editbox* editBox = static_cast&amp;lt;Editbox*&amp;gt; (winMgr.getWindow(&amp;quot;/ChatBox/Text&amp;quot;));&lt;br /&gt;
		URect chatTextArea = editBox-&amp;gt;getArea();&lt;br /&gt;
		chatTextArea.d_min.d_y.d_offset = chatTextArea.d_max.d_y.d_offset&lt;br /&gt;
										- fontHeight&lt;br /&gt;
										- 10;&lt;br /&gt;
		editBox-&amp;gt;setArea(chatTextArea);&lt;br /&gt;
		editBox-&amp;gt;setFont(currentFont);&lt;br /&gt;
&lt;br /&gt;
		/* Alther the area of the Listbox.  Here we only need the lower y coordinate.  Since this&lt;br /&gt;
		   value is the same as the upper y coordinate of the Editbox we do not need to calculate&lt;br /&gt;
		   it.  We also change the font of the Listbox and call upon handleUpdatedItemData() to&lt;br /&gt;
		   update the current Listbox items.  Finally we ensure that the last entry is still&lt;br /&gt;
		   visible. */&lt;br /&gt;
		Listbox* listBox = static_cast&amp;lt;Listbox*&amp;gt; (winMgr.getWindow(&amp;quot;/ChatBox/List&amp;quot;));&lt;br /&gt;
		URect listTextArea = listBox-&amp;gt;getArea();&lt;br /&gt;
		listTextArea.d_max.d_y.d_offset = chatTextArea.d_min.d_y.d_offset;&lt;br /&gt;
		listBox-&amp;gt;setArea(listTextArea);&lt;br /&gt;
		listBox-&amp;gt;setFont(currentFont);&lt;br /&gt;
		listBox-&amp;gt;handleUpdatedItemData();&lt;br /&gt;
		size_t itemCount = listBox-&amp;gt;getItemCount();&lt;br /&gt;
		if(itemCount)&lt;br /&gt;
		{&lt;br /&gt;
			ListboxItem* currentItem = listBox-&amp;gt;getListboxItemFromIndex(itemCount - 1);&lt;br /&gt;
			listBox-&amp;gt;ensureItemIsVisible(currentItem);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
	// List of available fonts&lt;br /&gt;
	std::vector&amp;lt;CEGUI::String&amp;gt; mFontList;&lt;br /&gt;
&lt;br /&gt;
	// Currently active font&lt;br /&gt;
	std::vector&amp;lt;CEGUI::String&amp;gt;::size_type mCurrentFont;&lt;br /&gt;
&lt;br /&gt;
	// Maximal number of entries to retain within the Listbox&lt;br /&gt;
	size_t mHistorySize;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#endif // _ChatBox_h_&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Main.cpp ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&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;ChatBox_demo.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;
    int i = app.run();&lt;br /&gt;
    return i;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== ChatBox.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;/ChatBox&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Chat&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;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;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.15,0},{0.03,0},{0.7,0},{0.7,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/Listbox&amp;quot; Name=&amp;quot;/ChatBox/List&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.01,0},{0.078,0},{0.99,0},{1,-30}}&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;/ChatBox/Text&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.01,0},{1,-30},{0.99,0},{1,-5}}&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 Type=&amp;quot;TaharezLook/Editbox&amp;quot; Name=&amp;quot;/ChatBox/History&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.9,0},{0.03,0},{0.95,0},{0.1,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;/ChatBox/HistoryLabel&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;History size:&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.78,0},{0.03,0},{0.9,0},{0.1,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;/GUILayout&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rackle</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=The_Beginner_Guide_to_Loading_Data_Files_and_Initialisation&amp;diff=2818</id>
		<title>The Beginner Guide to Loading Data Files and Initialisation</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=The_Beginner_Guide_to_Loading_Data_Files_and_Initialisation&amp;diff=2818"/>
				<updated>2008-02-01T12:13:44Z</updated>
		
		<summary type="html">&lt;p&gt;Rackle: /* Loading the Basic Files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&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 learn how to load some data files so that CEGUI has some source materials to use when rendering.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Overview: Data Files and the ResourceProvider ==&lt;br /&gt;
CEGUI uses a variety of data files and initially there may be some confusion over what these are, how they relate to each other and how they get loaded.  So before we get started with the meat of all this, I will introduce the data files, what they are, what they're used for, and how they get loaded into CEGUI.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Resources Provided – What is the 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.&lt;br /&gt;
&lt;br /&gt;
The Direct3D and OpenGL renderers do not, by default, use a specialised ResourceProvider; these systems default to loading ''all'' resources from the current working directory for the running application (usually the directory containing the executable).  This fact is of major importance when specifying paths to files within other files; they are all relative to the same directory, they are ''not relative to each other''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== XML, XSD?  It's all XML! ===&lt;br /&gt;
With the exception of graphical image files and loadable modules (DLLs / .soS, etc), all data files used by CEGUI are actually XML.  This leads us to the first obstacle that people run into; the schema (.xsd) files.&lt;br /&gt;
&lt;br /&gt;
By default, CEGUI uses Xerces-C++ to handle parsing XML files with ''schema validation''.  Schema validation is a means by which we can check, at parse time, whether the input file contains the expected data and that the data is correctly specified.  To do this, the system requires some additional files which are known as schema files, which have the .xsd file extension (the master copies of these are in the ''cegui_mk2/XMLRefSchema/'' directory).  Anyway, the only thing you need to know about these .xsd files for now is that they must be available to the ResourceProvider system; usually this can be achieved by placing a copy of the appropriate .xsd file in the same directory as the XML data you'll be loading.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The Data Files ===&lt;br /&gt;
As mentioned above, with a couple of exceptions, all data files in CEGUI are XML.  Rather than using the generic '.xml' file extension, the data files are named according to what the files actually represent; so .imageset for an Imageset and .font for a Font, etc.  Below is a very brief overview of each file type; more advanced discussion of the files and their capabilities can be found elsewhere.&lt;br /&gt;
&lt;br /&gt;
==== Imageset ====&lt;br /&gt;
Effectively, an Imageset is just a collection of defined regions upon the source image / texture file (which is also specified in the Imageset definition).  Each of these defined regions has a unique name and is known within the system as an Image.  An Image as defined in an Imageset is the basic level of  imagery used by CEGUI.  By modifying the source image / texture file and also the position and size of the defined regions within the Imageset files you can easily change the appearance of what gets drawn by CEGUI.&lt;br /&gt;
&lt;br /&gt;
==== Font ====&lt;br /&gt;
A Font file, unsurprisingly, defines a font for use in CEGUI.  There are two types of font which can be defined:&lt;br /&gt;
; FreeType Font : This is a font based upon a true-type (.ttf) font file. It is denoted with Type=&amp;quot;FreeType&amp;quot; in the .font file starting with version 0.5.0 of CEGUI. In previous versions it was known as &amp;quot;Dynamic&amp;quot;.&lt;br /&gt;
; Pixmap Font : Also known as a bitmapped font, this type of font is based upon an Imageset which defines Images for the font glyphs. It is denoted with Type=&amp;quot;Pixmap&amp;quot; in the .font file starting with version 0.5.0 of CEGUI. In previous versions it was known as &amp;quot;Static&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Scheme ====&lt;br /&gt;
A Scheme is a means to group other data files together, it's also the most convenient way to load and register widget types.  A Scheme can contain one or more of the following (which will be loaded and initialised when the scheme is loaded):&lt;br /&gt;
* Imageset&lt;br /&gt;
* Font&lt;br /&gt;
* Window Set&lt;br /&gt;
* Window Alias&lt;br /&gt;
&lt;br /&gt;
Imageset and Font have already been mentioned.  A 'Window Set' basically specifies the name of a loadable module (.dll / .so, etc), and a set of widgets contained within that modules that you wish to register with the system.  A 'Window Alias' provides a means to refer to a window / widget type by alternative names, it can also be used to 'hide' an already registered widget type with another widget type (so that other widget type gets used instead).&lt;br /&gt;
&lt;br /&gt;
==== Layout ====&lt;br /&gt;
A layout file contains an XML representation of a window layout.  Each nested 'Window' element defines a window or widget to be created, the 'Property' elements define the desired settings and property values for each window defined.&lt;br /&gt;
&lt;br /&gt;
==== Config ====&lt;br /&gt;
CEGUI Supports the use of a config file.  This file allows you to specify some defaults, such as a Scheme to load, a layout to load, initialisation and termination script files (when using a ScriptModule), and some other things which are not discussed here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Loading the Basic Files ==&lt;br /&gt;
In order to get things up and running you need to load in some files.  The minimal set of files required are:&lt;br /&gt;
* Imageset&lt;br /&gt;
* Font&lt;br /&gt;
* Scheme&lt;br /&gt;
&lt;br /&gt;
The good thing about the Scheme file is that it can be used to load the other two automatically.  Though the sample schemes currently provided in CEGUI only specify the Imageset and not the Font.  So for the purposes of this tutorial, we will load a scheme file and a font file.  This is done as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;// load in the scheme file, which auto-loads the TaharezLook imageset&lt;br /&gt;
CEGUI::SchemeManager::getSingleton().loadScheme(“../datafiles/schemes/TaharezLook.scheme”);&lt;br /&gt;
&lt;br /&gt;
// load in a font.  The first font loaded automatically becomes the default font.&lt;br /&gt;
if(! CEGUI::FontManager::getSingleton().isFontPresent(“../datafiles/fonts/Commonwealth-10.font”) )&lt;br /&gt;
  CEGUI::FontManager::getSingleton().createFont(“../datafiles/fonts/Commonwealth-10.font”);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above code snippet (and in the sample files) it is assumed that a 'datafiles' directory exists above the current directory, and that it contains all the files from the cegui_mk2/Samples/datafiles/ directory.&lt;br /&gt;
&lt;br /&gt;
'''Important note for Ogre users''':  To use the unmodified sample data files, you must ensure that the current working directory is specified as a resource location in the Ogre resource manager (usually via the resources.cfg file).  Alternatively, you could add all the datafiles sub-directories and remove the relative path information from the sample datafiles.  The reason the files are provided in this manner, is because they need to work under the default ResourceProvider used with raw D3D/OpenGL, as discussed above.&lt;br /&gt;
&lt;br /&gt;
== Simple Defaults Initialisation ==&lt;br /&gt;
Finally, you need to specify some defaults.  This is to ensure that the system always has a font and mouse cursor available for when a window or widget specifies no preference of its own.&lt;br /&gt;
&lt;br /&gt;
In reality, we no longer need to specify a default font, since the FontManager will now automatically set the first loaded font as the default.  Although if this is not the default font you require, you can set a different one as you desire.  The code to set a default font is as follows:&lt;br /&gt;
&lt;br /&gt;
 System::getSingleton().setDefaultFont(“Commonwealth-10”);&lt;br /&gt;
&lt;br /&gt;
The other default object you need to set is the mouse cursor.  This is to ensure that when you move the mouse over any element that does not set a cursor of its own the cursor does not disappear.  The code to set the default mouse cursor is as follows (NB: This uses the TaharezLook imageset which was loaded with the scheme above).&lt;br /&gt;
&lt;br /&gt;
 System::getSingleton().setDefaultMouseCursor(“TaharezLook”, “MouseArrow”);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Here we have learned the very basics of what the various data files used by CEGUI are, how they are loaded, and the minimal initialisation needed for CEGUI applications.  Other articles will discuss each of the data files types in greater detail allowing advanced uses to be discovered.&lt;br /&gt;
&lt;br /&gt;
--[[User:CrazyEddie|CrazyEddie]] 13:23, 11 Apr 2005 (BST)&lt;/div&gt;</summary>
		<author><name>Rackle</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=Game_chat_box&amp;diff=2817</id>
		<title>Game chat box</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=Game_chat_box&amp;diff=2817"/>
				<updated>2008-01-31T16:18:30Z</updated>
		
		<summary type="html">&lt;p&gt;Rackle: /* Creating the necessary .font files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Introduction ===&lt;br /&gt;
This snippet implements a chat box that can display text in 3 font sizes as well as limiting the number of entries (history) to a certain number.  Please discuss this article within the [http://www.cegui.org.uk/phpBB2/viewtopic.php?p=13333 GameChatBox] thread.&lt;br /&gt;
&lt;br /&gt;
==== .layout Special Features ====&lt;br /&gt;
The layout definition is deceptively simple.  It defines a FrameWindow containing two widgets; a Listbox in the upper region for chat history and an Editbox at the lower region for text input.&lt;br /&gt;
&lt;br /&gt;
What is not apparent is how the bottom portion of the Listbox and the entire Editbox are defined; they specify a proportion of 100% of their parent but with a negative offset.  Essentially the bottom of the Listbox extends to the bottom of the FrameWindow (the parent) and is then moved &amp;quot;up&amp;quot; to make room for the Editbox.  And the Editbox follows the same pattern.  This allows the Editbox to retain its height as the parent FrameWindow is resized.&lt;br /&gt;
&lt;br /&gt;
==== Creating the necessary .font files ====&lt;br /&gt;
A .font file is a simple text file that defines a font within Cegui.  They are located within the datafiles\fonts directory.&lt;br /&gt;
&lt;br /&gt;
This snippet uses the Commonwealth font in sizes 10, 36, and 72.  To create the missing font definitions for sizes 36 and 72 simply make two copies of the existing &amp;quot;Commonwealth-10.font&amp;quot; file.  The first copy is to be named &amp;quot;Commonwealth-36.font&amp;quot; and the second copy &amp;quot;Commonwealth-72.font&amp;quot;.  Edit the &amp;quot;Commonwealth-36.font&amp;quot; file and replace the value &amp;quot;10&amp;quot; by the value &amp;quot;36&amp;quot;.  Similarly edit the &amp;quot;Commonwealth-72.font&amp;quot; file and replace the value &amp;quot;10&amp;quot; by the value &amp;quot;72&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Another approach is to dynamically create fonts.  For more details consult [[DynamicFont]]&lt;br /&gt;
&lt;br /&gt;
=== Files ===&lt;br /&gt;
==== ChatBox_demo.h ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
#ifndef _ChatBox_h_&lt;br /&gt;
#define _ChatBox_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;
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;
			//FontManager::getSingleton().createFont(&amp;quot;Commonwealth-10.font&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			// Initialize the list of available fonts&lt;br /&gt;
			mCurrentFont = 0;&lt;br /&gt;
			addFont(&amp;quot;Commonwealth-10&amp;quot;);&lt;br /&gt;
			addFont(&amp;quot;Commonwealth-36&amp;quot;);&lt;br /&gt;
			addFont(&amp;quot;Commonwealth-72&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;ChatBox.layout&amp;quot;);&lt;br /&gt;
			sheet-&amp;gt;addChildWindow(guiLayout);&lt;br /&gt;
&lt;br /&gt;
			// Configure the events for the chat box&lt;br /&gt;
			CEGUI::Window* editBox = winMgr.getWindow(&amp;quot;/ChatBox/Text&amp;quot;);&lt;br /&gt;
			editBox-&amp;gt;subscribeEvent(CEGUI::Editbox::EventTextAccepted,	CEGUI::Event::Subscriber(&amp;amp;DemoSample::EditTextAccepted, this)); &lt;br /&gt;
			editBox-&amp;gt;subscribeEvent(CEGUI::Editbox::EventMouseClick,	CEGUI::Event::Subscriber(&amp;amp;DemoSample::FontChange,		this)); &lt;br /&gt;
&lt;br /&gt;
			// Configure the history size&lt;br /&gt;
			mHistorySize = 100;&lt;br /&gt;
			CEGUI::Window* historyBox = winMgr.getWindow(&amp;quot;/ChatBox/History&amp;quot;);&lt;br /&gt;
			historyBox-&amp;gt;subscribeEvent(CEGUI::Editbox::EventTextAccepted,	CEGUI::Event::Subscriber(&amp;amp;DemoSample::HistoryTextAccepted, this)); &lt;br /&gt;
			historyBox-&amp;gt;setText( PropertyHelper::intToString(static_cast&amp;lt;int&amp;gt;(mHistorySize)) );&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;
	}&lt;br /&gt;
&lt;br /&gt;
	void setHistorySize(const size_t&amp;amp; pSize)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		if(pSize &amp;gt; 0)&lt;br /&gt;
		{&lt;br /&gt;
			// A better validation would be to enforce a minimal and a maximal size&lt;br /&gt;
			mHistorySize = pSize;&lt;br /&gt;
&lt;br /&gt;
			WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
			Listbox* listBox = static_cast&amp;lt;Listbox*&amp;gt; (winMgr.getWindow(&amp;quot;/ChatBox/List&amp;quot;));&lt;br /&gt;
			ListboxItem* item;&lt;br /&gt;
			while(listBox-&amp;gt;getItemCount() &amp;gt; mHistorySize)&lt;br /&gt;
			{&lt;br /&gt;
				item = listBox-&amp;gt;getListboxItemFromIndex(0);&lt;br /&gt;
				listBox-&amp;gt;removeItem(item);&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool HistoryTextAccepted(const CEGUI::EventArgs&amp;amp; args)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
		CEGUI::Window* historyBox = winMgr.getWindow(&amp;quot;/ChatBox/History&amp;quot;);&lt;br /&gt;
		int historySize = PropertyHelper::stringToInt( historyBox-&amp;gt;getText() );&lt;br /&gt;
		setHistorySize(historySize);&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool EditTextAccepted(const CEGUI::EventArgs&amp;amp; args)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		// Variables for the Listbox and the Editbox&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
		Editbox* editBox = static_cast&amp;lt;Editbox*&amp;gt; (winMgr.getWindow(&amp;quot;/ChatBox/Text&amp;quot;));&lt;br /&gt;
		Listbox* listBox = static_cast&amp;lt;Listbox*&amp;gt; (winMgr.getWindow(&amp;quot;/ChatBox/List&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
		// Add the Editbox text to the Listbox&lt;br /&gt;
		ListboxTextItem* textItem;&lt;br /&gt;
		if(listBox-&amp;gt;getItemCount() == mHistorySize)&lt;br /&gt;
		{&lt;br /&gt;
			/* We have reached the capacity of the Listbox so re-use the first Listbox item.&lt;br /&gt;
			   This code is a little crafty.  By default the ListboxTextItem is created with&lt;br /&gt;
			   the auto-delete flag set to true, which results in its automatic deletion when&lt;br /&gt;
			   removed from the Listbox.  So we change that flag to false, extract the item&lt;br /&gt;
			   from the Listbox, change its text, put the auto-delete flag back to true, and&lt;br /&gt;
			   finally put the item back into the Listbox. */&lt;br /&gt;
			textItem = static_cast&amp;lt;ListboxTextItem*&amp;gt;(listBox-&amp;gt;getListboxItemFromIndex(0));&lt;br /&gt;
			textItem-&amp;gt;setAutoDeleted(false);&lt;br /&gt;
			listBox-&amp;gt;removeItem(textItem);&lt;br /&gt;
			textItem-&amp;gt;setAutoDeleted(true);&lt;br /&gt;
			textItem-&amp;gt;setText(editBox-&amp;gt;getText());&lt;br /&gt;
		}&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			// Create a new listbox item&lt;br /&gt;
			textItem = new ListboxTextItem(editBox-&amp;gt;getText());&lt;br /&gt;
		}&lt;br /&gt;
		listBox-&amp;gt;addItem(textItem);&lt;br /&gt;
		listBox-&amp;gt;setItemSelectState(textItem, true);&lt;br /&gt;
&lt;br /&gt;
		// Scroll the Listbox entries such that the new text is visible&lt;br /&gt;
		listBox-&amp;gt;ensureItemIsVisible(listBox-&amp;gt;getItemCount());&lt;br /&gt;
&lt;br /&gt;
		// Clear the text in the Editbox&lt;br /&gt;
		editBox-&amp;gt;setText(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	void addFont(const CEGUI::String&amp;amp; pFont)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		if(!FontManager::getSingleton().isFontPresent(pFont))&lt;br /&gt;
		{&lt;br /&gt;
			mFontList.push_back(pFont);&lt;br /&gt;
			FontManager::getSingleton().createFont(pFont + &amp;quot;.font&amp;quot;);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool FontChange(const CEGUI::EventArgs&amp;amp; args)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		const MouseEventArgs&amp;amp; mouseEventArgs = static_cast&amp;lt;const MouseEventArgs&amp;amp;&amp;gt;(args);&lt;br /&gt;
		if(mouseEventArgs.button == RightButton)&lt;br /&gt;
		{&lt;br /&gt;
			// Cycle through the installed fonts upon a right-click&lt;br /&gt;
			mCurrentFont++;&lt;br /&gt;
			if(mCurrentFont &amp;gt;= mFontList.size())&lt;br /&gt;
				mCurrentFont = 0;&lt;br /&gt;
&lt;br /&gt;
			changeFont(mFontList[mCurrentFont]);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	void changeFont(const CEGUI::String&amp;amp; pFont)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
&lt;br /&gt;
		// Measure the height of the selected font&lt;br /&gt;
		Font* currentFont = FontManager::getSingleton().getFont(pFont);&lt;br /&gt;
		float fontHeight = currentFont-&amp;gt;getFontHeight();&lt;br /&gt;
&lt;br /&gt;
		/* Alter the area of the Editbox.  The original value is {{0.01,0},{1,-30},{0.99,0},{1,-5}}&lt;br /&gt;
		   The value we are altering is the &amp;quot;-30&amp;quot; within the second couplet, defining the position of&lt;br /&gt;
		   the upper y coordinate of the Editbox.  We base the new value on the position of the lower&lt;br /&gt;
		   y coordinate, which is &amp;quot;-5&amp;quot;, and the height of the font.  To this we add some space &amp;quot;10&amp;quot; to&lt;br /&gt;
		   account for the Editbox's border. */&lt;br /&gt;
		Editbox* editBox = static_cast&amp;lt;Editbox*&amp;gt; (winMgr.getWindow(&amp;quot;/ChatBox/Text&amp;quot;));&lt;br /&gt;
		URect chatTextArea = editBox-&amp;gt;getArea();&lt;br /&gt;
		chatTextArea.d_min.d_y.d_offset = chatTextArea.d_max.d_y.d_offset&lt;br /&gt;
										- fontHeight&lt;br /&gt;
										- 10;&lt;br /&gt;
		editBox-&amp;gt;setArea(chatTextArea);&lt;br /&gt;
		editBox-&amp;gt;setFont(currentFont);&lt;br /&gt;
&lt;br /&gt;
		/* Alther the area of the Listbox.  Here we only need the lower y coordinate.  Since this&lt;br /&gt;
		   value is the same as the upper y coordinate of the Editbox we do not need to calculate&lt;br /&gt;
		   it.  We also change the font of the Listbox and call upon handleUpdatedItemData() to&lt;br /&gt;
		   update the current Listbox items.  Finally we ensure that the last entry is still&lt;br /&gt;
		   visible. */&lt;br /&gt;
		Listbox* listBox = static_cast&amp;lt;Listbox*&amp;gt; (winMgr.getWindow(&amp;quot;/ChatBox/List&amp;quot;));&lt;br /&gt;
		URect listTextArea = listBox-&amp;gt;getArea();&lt;br /&gt;
		listTextArea.d_max.d_y.d_offset = chatTextArea.d_min.d_y.d_offset;&lt;br /&gt;
		listBox-&amp;gt;setArea(listTextArea);&lt;br /&gt;
		listBox-&amp;gt;setFont(currentFont);&lt;br /&gt;
		listBox-&amp;gt;handleUpdatedItemData();&lt;br /&gt;
		size_t itemCount = listBox-&amp;gt;getItemCount();&lt;br /&gt;
		if(itemCount)&lt;br /&gt;
		{&lt;br /&gt;
			ListboxItem* currentItem = listBox-&amp;gt;getListboxItemFromIndex(itemCount - 1);&lt;br /&gt;
			listBox-&amp;gt;ensureItemIsVisible(currentItem);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
	// List of available fonts&lt;br /&gt;
	std::vector&amp;lt;CEGUI::String&amp;gt; mFontList;&lt;br /&gt;
&lt;br /&gt;
	// Currently active font&lt;br /&gt;
	std::vector&amp;lt;CEGUI::String&amp;gt;::size_type mCurrentFont;&lt;br /&gt;
&lt;br /&gt;
	// Maximal number of entries to retain within the Listbox&lt;br /&gt;
	size_t mHistorySize;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#endif // _ChatBox_h_&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Main.cpp ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&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;ChatBox_demo.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;
    int i = app.run();&lt;br /&gt;
    return i;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== ChatBox.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;/ChatBox&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Chat&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;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;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.15,0},{0.03,0},{0.7,0},{0.7,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/Listbox&amp;quot; Name=&amp;quot;/ChatBox/List&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.01,0},{0.078,0},{0.99,0},{1,-30}}&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;/ChatBox/Text&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.01,0},{1,-30},{0.99,0},{1,-5}}&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 Type=&amp;quot;TaharezLook/Editbox&amp;quot; Name=&amp;quot;/ChatBox/History&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.9,0},{0.03,0},{0.95,0},{0.1,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;/ChatBox/HistoryLabel&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;History size:&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.78,0},{0.03,0},{0.9,0},{0.1,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;/GUILayout&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rackle</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=Dynamic_Fonts&amp;diff=2815</id>
		<title>Dynamic Fonts</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=Dynamic_Fonts&amp;diff=2815"/>
				<updated>2008-01-31T15:44:25Z</updated>
		
		<summary type="html">&lt;p&gt;Rackle: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Introduction===&lt;br /&gt;
The datafiles\fonts folder contains static font definitions such as Commonwealth-10.font.  The XML contents of that file specify one particular font, mainly a logical name (Commonwealth-10), a filename (Commonv2c.ttf), and a size (10).  To load this static font definition you'd write the following line of code:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
CEGUI::FontManager::getSingleton().createFont(&amp;quot;Commonwealth-10.font&amp;quot;);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This works well, but sometimes you need to display a same font in various sizes.  One approach is to create multiple .font files, one per font size.  But there is a better approach, a way to dynamically create fonts.&lt;br /&gt;
&lt;br /&gt;
Please post comments or questions on the message board thread for the [http://www.cegui.org.uk/phpBB2/viewtopic.php?p=13350 DynamicFont]&lt;br /&gt;
&lt;br /&gt;
===Files===&lt;br /&gt;
&lt;br /&gt;
====DynamicFont.h====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/cpp&amp;gt;&lt;br /&gt;
#ifndef _DynamicFont_h_&lt;br /&gt;
#define _DynamicFont_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;
#include &amp;quot;CEGUIXMLAttributes.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;
			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;DynamicFont.layout&amp;quot;);&lt;br /&gt;
			sheet-&amp;gt;addChildWindow(guiLayout);&lt;br /&gt;
&lt;br /&gt;
			// Configure the event for the list of created fonts&lt;br /&gt;
			CEGUI::Combobox* existingFonts = static_cast&amp;lt;CEGUI::Combobox*&amp;gt;(winMgr.getWindow(&amp;quot;DynamicFont/Fonts&amp;quot;));&lt;br /&gt;
			existingFonts-&amp;gt;subscribeEvent(CEGUI::Combobox::EventListSelectionAccepted,	CEGUI::Event::Subscriber(&amp;amp;DemoSample::eventSelectExistingFont, this)); &lt;br /&gt;
&lt;br /&gt;
			// Configure the event for the add button&lt;br /&gt;
			CEGUI::PushButton* add = static_cast&amp;lt;CEGUI::PushButton*&amp;gt;(winMgr.getWindow(&amp;quot;DynamicFont/Add&amp;quot;));&lt;br /&gt;
			add-&amp;gt;subscribeEvent(CEGUI::PushButton::EventMouseClick,	CEGUI::Event::Subscriber(&amp;amp;DemoSample::eventAddFont, this)); &lt;br /&gt;
&lt;br /&gt;
			// Add the font previously created&lt;br /&gt;
			addExistingFont(&amp;quot;Commonwealth-10&amp;quot;);&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;
	}&lt;br /&gt;
&lt;br /&gt;
	bool eventAddFont(const CEGUI::EventArgs&amp;amp; args)&lt;br /&gt;
	{&lt;br /&gt;
		// Add a font from the specified parameters&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
		Window* nameText = winMgr.getWindow(&amp;quot;DynamicFont/Name&amp;quot;);&lt;br /&gt;
		Window* filenameText = winMgr.getWindow(&amp;quot;DynamicFont/Filename&amp;quot;);&lt;br /&gt;
		Window* sizeText = winMgr.getWindow(&amp;quot;DynamicFont/Size&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
		setFont(nameText-&amp;gt;getText(), filenameText-&amp;gt;getText(), sizeText-&amp;gt;getText());&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	void addExistingFont(const CEGUI::String&amp;amp; pName)&lt;br /&gt;
	{&lt;br /&gt;
		// Once a font has been created we add it to the combobox of fonts&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
&lt;br /&gt;
		Combobox* existingFonts = static_cast&amp;lt;CEGUI::Combobox*&amp;gt;(winMgr.getWindow(&amp;quot;DynamicFont/Fonts&amp;quot;));&lt;br /&gt;
		ListboxTextItem* itemCombobox = new ListboxTextItem(pName);&lt;br /&gt;
		itemCombobox-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
		itemCombobox-&amp;gt;setSelected(true);&lt;br /&gt;
		existingFonts-&amp;gt;addItem(itemCombobox);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool eventSelectExistingFont(const CEGUI::EventArgs&amp;amp; args)&lt;br /&gt;
	{&lt;br /&gt;
		// Use an already created font&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
		Combobox* existingFonts = static_cast&amp;lt;CEGUI::Combobox*&amp;gt;(winMgr.getWindow(&amp;quot;DynamicFont/Fonts&amp;quot;));&lt;br /&gt;
		setFont(existingFonts-&amp;gt;getText(), &amp;quot;&amp;quot;, &amp;quot;&amp;quot;);&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	void setFont(const CEGUI::String&amp;amp; pName, const CEGUI::String&amp;amp; pFilename, const CEGUI::String&amp;amp; pSize)&lt;br /&gt;
	{&lt;br /&gt;
		// Set the font displayed within the multiline editbox&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		String sampleText(pName);&lt;br /&gt;
&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
		CEGUI::Window* text = winMgr.getWindow(&amp;quot;DynamicFont/Text&amp;quot;);&lt;br /&gt;
		Font* font;&lt;br /&gt;
&lt;br /&gt;
		if(FontManager::getSingleton().isFontPresent(pName))&lt;br /&gt;
		{&lt;br /&gt;
			// Select a previously created font&lt;br /&gt;
			font = FontManager::getSingleton().getFont(pName);&lt;br /&gt;
		}&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			// Dynamically create a new font&lt;br /&gt;
			XMLAttributes xmlAttributes;&lt;br /&gt;
&lt;br /&gt;
			// Attributes specified within CEGUIFont.cpp&lt;br /&gt;
			xmlAttributes.add(&amp;quot;Name&amp;quot;, pName);&lt;br /&gt;
			xmlAttributes.add(&amp;quot;Filename&amp;quot;, pFilename);&lt;br /&gt;
			xmlAttributes.add(&amp;quot;ResourceGroup&amp;quot;, &amp;quot;&amp;quot;);&lt;br /&gt;
			xmlAttributes.add(&amp;quot;AutoScaled&amp;quot;, &amp;quot;true&amp;quot;);&lt;br /&gt;
			xmlAttributes.add(&amp;quot;NativeHorzRes&amp;quot;, &amp;quot;800&amp;quot;);&lt;br /&gt;
			xmlAttributes.add(&amp;quot;NativeVertRes&amp;quot;, &amp;quot;600&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			// Attributes specified within CEGUIXMLAttributes.cpp&lt;br /&gt;
			xmlAttributes.add(&amp;quot;Size&amp;quot;, pSize);&lt;br /&gt;
			xmlAttributes.add(&amp;quot;AntiAlias&amp;quot;, &amp;quot;true&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			try&lt;br /&gt;
			{&lt;br /&gt;
				font = FontManager::getSingleton().createFont(&amp;quot;FreeType&amp;quot;, xmlAttributes);&lt;br /&gt;
				if(font)&lt;br /&gt;
				{&lt;br /&gt;
					font-&amp;gt;load(); // This function must be used&lt;br /&gt;
					addExistingFont(pName);&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
			catch(Exception &amp;amp;e)&lt;br /&gt;
			{&lt;br /&gt;
				// Display the error message&lt;br /&gt;
				sampleText = e.getMessage();&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		text-&amp;gt;setFont(font);&lt;br /&gt;
		text-&amp;gt;setText(sampleText);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#endif // _DynamicFont_h_&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====main.cpp====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/cpp&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;DynamicFont.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;
}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====DynamicFont.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;TaharezLook/FrameWindow&amp;quot; Name=&amp;quot;DynamicFont&amp;quot; &amp;gt;&lt;br /&gt;
        &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Dynamic Font&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;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;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.02,0},{0.054167,0},{0.98,0},{0.781251,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;Window Type=&amp;quot;TaharezLook/MultiLineEditbox&amp;quot; Name=&amp;quot;DynamicFont/Text&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; &amp;gt;&lt;br /&gt;
&amp;lt;/Property&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.01,0},{0.075,0},{0.99,0},{0.715617,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;DynamicFont/NameLabel&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Name:&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;HorzFormatting&amp;quot; Value=&amp;quot;RightAligned&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.018409,0},{0.881661,0},{0.0809004,0},{0.968338,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;DynamicFont/Name&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.0809,0},{0.881661,0},{0.328819,0},{0.968338,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;DynamicFont/FilenameLabel&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;Filename:&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;HorzFormatting&amp;quot; Value=&amp;quot;RightAligned&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.347544,0},{0.881661,0},{0.438807,0},{0.968338,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;DynamicFont/Filename&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;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.438807,0},{0.881661,0},{0.713682,0},{0.968338,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;DynamicFont/SizeLabel&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;Size:&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;HorzFormatting&amp;quot; Value=&amp;quot;RightAligned&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.731982,0},{0.881661,0},{0.793499,0},{0.968338,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;DynamicFont/Size&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;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.793499,0},{0.881661,0},{0.858294,0},{0.968338,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;DynamicFont/Add&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Add&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.867109,0},{0.881661,0},{0.974324,0},{0.968338,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;DynamicFont/FontsLabel&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;Fonts:&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;HorzFormatting&amp;quot; Value=&amp;quot;RightAligned&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.018409,0},{0.768338,0},{0.0859395,0},{0.855015,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;DynamicFont/Fonts&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;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.085939,0},{0.768338,0},{0.974324,0},{0.994412,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&amp;gt;&lt;br /&gt;
&amp;lt;/GUILayout&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rackle</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=Dynamic_Fonts&amp;diff=2814</id>
		<title>Dynamic Fonts</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=Dynamic_Fonts&amp;diff=2814"/>
				<updated>2008-01-31T15:37:10Z</updated>
		
		<summary type="html">&lt;p&gt;Rackle: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Introduction===&lt;br /&gt;
The datafiles\fonts folder contains static font definitions such as Commonwealth-10.font.  The XML contents of that file specify one particular font, mainly a logical name (Commonwealth-10), a filename (Commonv2c.ttf), and a size (10).  To load this static font definition you'd write the following line of code:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
CEGUI::FontManager::getSingleton().createFont(&amp;quot;Commonwealth-10.font&amp;quot;);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This works well, but sometimes you need to display a same font in various sizes.  One approach is to create multiple .font files, one per font size.  But there is a better approach, a way to dynamically create fonts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Files===&lt;br /&gt;
&lt;br /&gt;
====DynamicFont.h====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/cpp&amp;gt;&lt;br /&gt;
#ifndef _DynamicFont_h_&lt;br /&gt;
#define _DynamicFont_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;
#include &amp;quot;CEGUIXMLAttributes.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;
			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;DynamicFont.layout&amp;quot;);&lt;br /&gt;
			sheet-&amp;gt;addChildWindow(guiLayout);&lt;br /&gt;
&lt;br /&gt;
			// Configure the event for the list of created fonts&lt;br /&gt;
			CEGUI::Combobox* existingFonts = static_cast&amp;lt;CEGUI::Combobox*&amp;gt;(winMgr.getWindow(&amp;quot;DynamicFont/Fonts&amp;quot;));&lt;br /&gt;
			existingFonts-&amp;gt;subscribeEvent(CEGUI::Combobox::EventListSelectionAccepted,	CEGUI::Event::Subscriber(&amp;amp;DemoSample::eventSelectExistingFont, this)); &lt;br /&gt;
&lt;br /&gt;
			// Configure the event for the add button&lt;br /&gt;
			CEGUI::PushButton* add = static_cast&amp;lt;CEGUI::PushButton*&amp;gt;(winMgr.getWindow(&amp;quot;DynamicFont/Add&amp;quot;));&lt;br /&gt;
			add-&amp;gt;subscribeEvent(CEGUI::PushButton::EventMouseClick,	CEGUI::Event::Subscriber(&amp;amp;DemoSample::eventAddFont, this)); &lt;br /&gt;
&lt;br /&gt;
			// Add the font previously created&lt;br /&gt;
			addExistingFont(&amp;quot;Commonwealth-10&amp;quot;);&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;
	}&lt;br /&gt;
&lt;br /&gt;
	bool eventAddFont(const CEGUI::EventArgs&amp;amp; args)&lt;br /&gt;
	{&lt;br /&gt;
		// Add a font from the specified parameters&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
		Window* nameText = winMgr.getWindow(&amp;quot;DynamicFont/Name&amp;quot;);&lt;br /&gt;
		Window* filenameText = winMgr.getWindow(&amp;quot;DynamicFont/Filename&amp;quot;);&lt;br /&gt;
		Window* sizeText = winMgr.getWindow(&amp;quot;DynamicFont/Size&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
		setFont(nameText-&amp;gt;getText(), filenameText-&amp;gt;getText(), sizeText-&amp;gt;getText());&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	void addExistingFont(const CEGUI::String&amp;amp; pName)&lt;br /&gt;
	{&lt;br /&gt;
		// Once a font has been created we add it to the combobox of fonts&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
&lt;br /&gt;
		Combobox* existingFonts = static_cast&amp;lt;CEGUI::Combobox*&amp;gt;(winMgr.getWindow(&amp;quot;DynamicFont/Fonts&amp;quot;));&lt;br /&gt;
		ListboxTextItem* itemCombobox = new ListboxTextItem(pName);&lt;br /&gt;
		itemCombobox-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;MultiListSelectionBrush&amp;quot;);&lt;br /&gt;
		itemCombobox-&amp;gt;setSelected(true);&lt;br /&gt;
		existingFonts-&amp;gt;addItem(itemCombobox);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool eventSelectExistingFont(const CEGUI::EventArgs&amp;amp; args)&lt;br /&gt;
	{&lt;br /&gt;
		// Use an already created font&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
		Combobox* existingFonts = static_cast&amp;lt;CEGUI::Combobox*&amp;gt;(winMgr.getWindow(&amp;quot;DynamicFont/Fonts&amp;quot;));&lt;br /&gt;
		setFont(existingFonts-&amp;gt;getText(), &amp;quot;&amp;quot;, &amp;quot;&amp;quot;);&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	void setFont(const CEGUI::String&amp;amp; pName, const CEGUI::String&amp;amp; pFilename, const CEGUI::String&amp;amp; pSize)&lt;br /&gt;
	{&lt;br /&gt;
		// Set the font displayed within the multiline editbox&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		String sampleText(pName);&lt;br /&gt;
&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
		CEGUI::Window* text = winMgr.getWindow(&amp;quot;DynamicFont/Text&amp;quot;);&lt;br /&gt;
		Font* font;&lt;br /&gt;
&lt;br /&gt;
		if(FontManager::getSingleton().isFontPresent(pName))&lt;br /&gt;
		{&lt;br /&gt;
			// Select a previously created font&lt;br /&gt;
			font = FontManager::getSingleton().getFont(pName);&lt;br /&gt;
		}&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			// Dynamically create a new font&lt;br /&gt;
			XMLAttributes xmlAttributes;&lt;br /&gt;
&lt;br /&gt;
			// Attributes specified within CEGUIFont.cpp&lt;br /&gt;
			xmlAttributes.add(&amp;quot;Name&amp;quot;, pName);&lt;br /&gt;
			xmlAttributes.add(&amp;quot;Filename&amp;quot;, pFilename);&lt;br /&gt;
			xmlAttributes.add(&amp;quot;ResourceGroup&amp;quot;, &amp;quot;&amp;quot;);&lt;br /&gt;
			xmlAttributes.add(&amp;quot;AutoScaled&amp;quot;, &amp;quot;true&amp;quot;);&lt;br /&gt;
			xmlAttributes.add(&amp;quot;NativeHorzRes&amp;quot;, &amp;quot;800&amp;quot;);&lt;br /&gt;
			xmlAttributes.add(&amp;quot;NativeVertRes&amp;quot;, &amp;quot;600&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			// Attributes specified within CEGUIXMLAttributes.cpp&lt;br /&gt;
			xmlAttributes.add(&amp;quot;Size&amp;quot;, pSize);&lt;br /&gt;
			xmlAttributes.add(&amp;quot;AntiAlias&amp;quot;, &amp;quot;true&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			try&lt;br /&gt;
			{&lt;br /&gt;
				font = FontManager::getSingleton().createFont(&amp;quot;FreeType&amp;quot;, xmlAttributes);&lt;br /&gt;
				if(font)&lt;br /&gt;
				{&lt;br /&gt;
					font-&amp;gt;load(); // This function must be used&lt;br /&gt;
					addExistingFont(pName);&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
			catch(Exception &amp;amp;e)&lt;br /&gt;
			{&lt;br /&gt;
				// Display the error message&lt;br /&gt;
				sampleText = e.getMessage();&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		text-&amp;gt;setFont(font);&lt;br /&gt;
		text-&amp;gt;setText(sampleText);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#endif // _DynamicFont_h_&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====main.cpp====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/cpp&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;DynamicFont.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;
}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====DynamicFont.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;TaharezLook/FrameWindow&amp;quot; Name=&amp;quot;DynamicFont&amp;quot; &amp;gt;&lt;br /&gt;
        &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Dynamic Font&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;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;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.02,0},{0.054167,0},{0.98,0},{0.781251,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;Window Type=&amp;quot;TaharezLook/MultiLineEditbox&amp;quot; Name=&amp;quot;DynamicFont/Text&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; &amp;gt;&lt;br /&gt;
&amp;lt;/Property&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.01,0},{0.075,0},{0.99,0},{0.715617,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;DynamicFont/NameLabel&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Name:&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;HorzFormatting&amp;quot; Value=&amp;quot;RightAligned&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.018409,0},{0.881661,0},{0.0809004,0},{0.968338,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;DynamicFont/Name&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.0809,0},{0.881661,0},{0.328819,0},{0.968338,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;DynamicFont/FilenameLabel&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;Filename:&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;HorzFormatting&amp;quot; Value=&amp;quot;RightAligned&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.347544,0},{0.881661,0},{0.438807,0},{0.968338,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;DynamicFont/Filename&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;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.438807,0},{0.881661,0},{0.713682,0},{0.968338,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;DynamicFont/SizeLabel&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;Size:&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;HorzFormatting&amp;quot; Value=&amp;quot;RightAligned&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.731982,0},{0.881661,0},{0.793499,0},{0.968338,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;DynamicFont/Size&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;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.793499,0},{0.881661,0},{0.858294,0},{0.968338,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;DynamicFont/Add&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Add&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.867109,0},{0.881661,0},{0.974324,0},{0.968338,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;DynamicFont/FontsLabel&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;Fonts:&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;HorzFormatting&amp;quot; Value=&amp;quot;RightAligned&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.018409,0},{0.768338,0},{0.0859395,0},{0.855015,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;DynamicFont/Fonts&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;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.085939,0},{0.768338,0},{0.974324,0},{0.994412,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&amp;gt;&lt;br /&gt;
&amp;lt;/GUILayout&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rackle</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=Template:CEGUIWikiWhatsNew&amp;diff=2813</id>
		<title>Template:CEGUIWikiWhatsNew</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=Template:CEGUIWikiWhatsNew&amp;diff=2813"/>
				<updated>2008-01-31T15:25:28Z</updated>
		
		<summary type="html">&lt;p&gt;Rackle: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Section|1=The last 5 additions to the wiki ([http://www.cegui.org.uk/wiki/index.php?title=Template:CEGUIWikiWhatsNew&amp;amp;action=edit edit])|2=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- In descending order (newest first, oldest last) --&amp;gt;&lt;br /&gt;
* Code Snippets: [[DynamicFont]] : Dynamically create fonts&lt;br /&gt;
* Articles: [[Introduction To Auto Windows]] : &amp;quot;Auto Windows&amp;quot; article by CrazyEddie&lt;br /&gt;
* Code Snippets: [[MovingAnyWindow]] : How to move any window, not just FrameWindow&lt;br /&gt;
* Code Snippets: [[GridLayout]] : A QT-like layout manager for CEGUI &amp;gt;= 0.5.0&lt;br /&gt;
* Tutorials: [[Cool_window_effects]] : A collection of cool &amp;quot;special&amp;quot; effects on (frame)windows. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
''To all wiki author, please edit this section when you add a new page to the wiki.''&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Rackle</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=Game_chat_box&amp;diff=2812</id>
		<title>Game chat box</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=Game_chat_box&amp;diff=2812"/>
				<updated>2008-01-29T20:09:32Z</updated>
		
		<summary type="html">&lt;p&gt;Rackle: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Introduction ===&lt;br /&gt;
This snippet implements a chat box that can display text in 3 font sizes as well as limiting the number of entries (history) to a certain number.  Please discuss this article within the [http://www.cegui.org.uk/phpBB2/viewtopic.php?p=13333 GameChatBox] thread.&lt;br /&gt;
&lt;br /&gt;
==== .layout Special Features ====&lt;br /&gt;
The layout definition is deceptively simple.  It defines a FrameWindow containing two widgets; a Listbox in the upper region for chat history and an Editbox at the lower region for text input.&lt;br /&gt;
&lt;br /&gt;
What is not apparent is how the bottom portion of the Listbox and the entire Editbox are defined; they specify a proportion of 100% of their parent but with a negative offset.  Essentially the bottom of the Listbox extends to the bottom of the FrameWindow (the parent) and is then moved &amp;quot;up&amp;quot; to make room for the Editbox.  And the Editbox follows the same pattern.  This allows the Editbox to retain its height as the parent FrameWindow is resized.&lt;br /&gt;
&lt;br /&gt;
==== Creating the necessary .font files ====&lt;br /&gt;
A .font file is a simple text file that defines a font within Cegui.  They are located within the Samples\datafiles\fonts directory.  This snippet uses the Commonwealth font in sizes 10, 36, and 72.  To create the missing font definitions for sizes 36 and 72 simply make two copies of the existing &amp;quot;Commonwealth-10.font&amp;quot; file.  The first copy is to be named &amp;quot;Commonwealth-36.font&amp;quot; and the second copy &amp;quot;Commonwealth-72.font&amp;quot;.  Edit the &amp;quot;Commonwealth-36.font&amp;quot; file and replace the value &amp;quot;10&amp;quot; by the value &amp;quot;36&amp;quot;.  Similarly edit the &amp;quot;Commonwealth-72.font&amp;quot; file and replace the value &amp;quot;10&amp;quot; by the value &amp;quot;72&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Files ===&lt;br /&gt;
==== ChatBox_demo.h ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
#ifndef _ChatBox_h_&lt;br /&gt;
#define _ChatBox_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;
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;
			//FontManager::getSingleton().createFont(&amp;quot;Commonwealth-10.font&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			// Initialize the list of available fonts&lt;br /&gt;
			mCurrentFont = 0;&lt;br /&gt;
			addFont(&amp;quot;Commonwealth-10&amp;quot;);&lt;br /&gt;
			addFont(&amp;quot;Commonwealth-36&amp;quot;);&lt;br /&gt;
			addFont(&amp;quot;Commonwealth-72&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;ChatBox.layout&amp;quot;);&lt;br /&gt;
			sheet-&amp;gt;addChildWindow(guiLayout);&lt;br /&gt;
&lt;br /&gt;
			// Configure the events for the chat box&lt;br /&gt;
			CEGUI::Window* editBox = winMgr.getWindow(&amp;quot;/ChatBox/Text&amp;quot;);&lt;br /&gt;
			editBox-&amp;gt;subscribeEvent(CEGUI::Editbox::EventTextAccepted,	CEGUI::Event::Subscriber(&amp;amp;DemoSample::EditTextAccepted, this)); &lt;br /&gt;
			editBox-&amp;gt;subscribeEvent(CEGUI::Editbox::EventMouseClick,	CEGUI::Event::Subscriber(&amp;amp;DemoSample::FontChange,		this)); &lt;br /&gt;
&lt;br /&gt;
			// Configure the history size&lt;br /&gt;
			mHistorySize = 100;&lt;br /&gt;
			CEGUI::Window* historyBox = winMgr.getWindow(&amp;quot;/ChatBox/History&amp;quot;);&lt;br /&gt;
			historyBox-&amp;gt;subscribeEvent(CEGUI::Editbox::EventTextAccepted,	CEGUI::Event::Subscriber(&amp;amp;DemoSample::HistoryTextAccepted, this)); &lt;br /&gt;
			historyBox-&amp;gt;setText( PropertyHelper::intToString(static_cast&amp;lt;int&amp;gt;(mHistorySize)) );&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;
	}&lt;br /&gt;
&lt;br /&gt;
	void setHistorySize(const size_t&amp;amp; pSize)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		if(pSize &amp;gt; 0)&lt;br /&gt;
		{&lt;br /&gt;
			// A better validation would be to enforce a minimal and a maximal size&lt;br /&gt;
			mHistorySize = pSize;&lt;br /&gt;
&lt;br /&gt;
			WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
			Listbox* listBox = static_cast&amp;lt;Listbox*&amp;gt; (winMgr.getWindow(&amp;quot;/ChatBox/List&amp;quot;));&lt;br /&gt;
			ListboxItem* item;&lt;br /&gt;
			while(listBox-&amp;gt;getItemCount() &amp;gt; mHistorySize)&lt;br /&gt;
			{&lt;br /&gt;
				item = listBox-&amp;gt;getListboxItemFromIndex(0);&lt;br /&gt;
				listBox-&amp;gt;removeItem(item);&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool HistoryTextAccepted(const CEGUI::EventArgs&amp;amp; args)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
		CEGUI::Window* historyBox = winMgr.getWindow(&amp;quot;/ChatBox/History&amp;quot;);&lt;br /&gt;
		int historySize = PropertyHelper::stringToInt( historyBox-&amp;gt;getText() );&lt;br /&gt;
		setHistorySize(historySize);&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool EditTextAccepted(const CEGUI::EventArgs&amp;amp; args)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		// Variables for the Listbox and the Editbox&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
		Editbox* editBox = static_cast&amp;lt;Editbox*&amp;gt; (winMgr.getWindow(&amp;quot;/ChatBox/Text&amp;quot;));&lt;br /&gt;
		Listbox* listBox = static_cast&amp;lt;Listbox*&amp;gt; (winMgr.getWindow(&amp;quot;/ChatBox/List&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
		// Add the Editbox text to the Listbox&lt;br /&gt;
		ListboxTextItem* textItem;&lt;br /&gt;
		if(listBox-&amp;gt;getItemCount() == mHistorySize)&lt;br /&gt;
		{&lt;br /&gt;
			/* We have reached the capacity of the Listbox so re-use the first Listbox item.&lt;br /&gt;
			   This code is a little crafty.  By default the ListboxTextItem is created with&lt;br /&gt;
			   the auto-delete flag set to true, which results in its automatic deletion when&lt;br /&gt;
			   removed from the Listbox.  So we change that flag to false, extract the item&lt;br /&gt;
			   from the Listbox, change its text, put the auto-delete flag back to true, and&lt;br /&gt;
			   finally put the item back into the Listbox. */&lt;br /&gt;
			textItem = static_cast&amp;lt;ListboxTextItem*&amp;gt;(listBox-&amp;gt;getListboxItemFromIndex(0));&lt;br /&gt;
			textItem-&amp;gt;setAutoDeleted(false);&lt;br /&gt;
			listBox-&amp;gt;removeItem(textItem);&lt;br /&gt;
			textItem-&amp;gt;setAutoDeleted(true);&lt;br /&gt;
			textItem-&amp;gt;setText(editBox-&amp;gt;getText());&lt;br /&gt;
		}&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			// Create a new listbox item&lt;br /&gt;
			textItem = new ListboxTextItem(editBox-&amp;gt;getText());&lt;br /&gt;
		}&lt;br /&gt;
		listBox-&amp;gt;addItem(textItem);&lt;br /&gt;
		listBox-&amp;gt;setItemSelectState(textItem, true);&lt;br /&gt;
&lt;br /&gt;
		// Scroll the Listbox entries such that the new text is visible&lt;br /&gt;
		listBox-&amp;gt;ensureItemIsVisible(listBox-&amp;gt;getItemCount());&lt;br /&gt;
&lt;br /&gt;
		// Clear the text in the Editbox&lt;br /&gt;
		editBox-&amp;gt;setText(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	void addFont(const CEGUI::String&amp;amp; pFont)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		if(!FontManager::getSingleton().isFontPresent(pFont))&lt;br /&gt;
		{&lt;br /&gt;
			mFontList.push_back(pFont);&lt;br /&gt;
			FontManager::getSingleton().createFont(pFont + &amp;quot;.font&amp;quot;);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool FontChange(const CEGUI::EventArgs&amp;amp; args)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		const MouseEventArgs&amp;amp; mouseEventArgs = static_cast&amp;lt;const MouseEventArgs&amp;amp;&amp;gt;(args);&lt;br /&gt;
		if(mouseEventArgs.button == RightButton)&lt;br /&gt;
		{&lt;br /&gt;
			// Cycle through the installed fonts upon a right-click&lt;br /&gt;
			mCurrentFont++;&lt;br /&gt;
			if(mCurrentFont &amp;gt;= mFontList.size())&lt;br /&gt;
				mCurrentFont = 0;&lt;br /&gt;
&lt;br /&gt;
			changeFont(mFontList[mCurrentFont]);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	void changeFont(const CEGUI::String&amp;amp; pFont)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
&lt;br /&gt;
		// Measure the height of the selected font&lt;br /&gt;
		Font* currentFont = FontManager::getSingleton().getFont(pFont);&lt;br /&gt;
		float fontHeight = currentFont-&amp;gt;getFontHeight();&lt;br /&gt;
&lt;br /&gt;
		/* Alter the area of the Editbox.  The original value is {{0.01,0},{1,-30},{0.99,0},{1,-5}}&lt;br /&gt;
		   The value we are altering is the &amp;quot;-30&amp;quot; within the second couplet, defining the position of&lt;br /&gt;
		   the upper y coordinate of the Editbox.  We base the new value on the position of the lower&lt;br /&gt;
		   y coordinate, which is &amp;quot;-5&amp;quot;, and the height of the font.  To this we add some space &amp;quot;10&amp;quot; to&lt;br /&gt;
		   account for the Editbox's border. */&lt;br /&gt;
		Editbox* editBox = static_cast&amp;lt;Editbox*&amp;gt; (winMgr.getWindow(&amp;quot;/ChatBox/Text&amp;quot;));&lt;br /&gt;
		URect chatTextArea = editBox-&amp;gt;getArea();&lt;br /&gt;
		chatTextArea.d_min.d_y.d_offset = chatTextArea.d_max.d_y.d_offset&lt;br /&gt;
										- fontHeight&lt;br /&gt;
										- 10;&lt;br /&gt;
		editBox-&amp;gt;setArea(chatTextArea);&lt;br /&gt;
		editBox-&amp;gt;setFont(currentFont);&lt;br /&gt;
&lt;br /&gt;
		/* Alther the area of the Listbox.  Here we only need the lower y coordinate.  Since this&lt;br /&gt;
		   value is the same as the upper y coordinate of the Editbox we do not need to calculate&lt;br /&gt;
		   it.  We also change the font of the Listbox and call upon handleUpdatedItemData() to&lt;br /&gt;
		   update the current Listbox items.  Finally we ensure that the last entry is still&lt;br /&gt;
		   visible. */&lt;br /&gt;
		Listbox* listBox = static_cast&amp;lt;Listbox*&amp;gt; (winMgr.getWindow(&amp;quot;/ChatBox/List&amp;quot;));&lt;br /&gt;
		URect listTextArea = listBox-&amp;gt;getArea();&lt;br /&gt;
		listTextArea.d_max.d_y.d_offset = chatTextArea.d_min.d_y.d_offset;&lt;br /&gt;
		listBox-&amp;gt;setArea(listTextArea);&lt;br /&gt;
		listBox-&amp;gt;setFont(currentFont);&lt;br /&gt;
		listBox-&amp;gt;handleUpdatedItemData();&lt;br /&gt;
		size_t itemCount = listBox-&amp;gt;getItemCount();&lt;br /&gt;
		if(itemCount)&lt;br /&gt;
		{&lt;br /&gt;
			ListboxItem* currentItem = listBox-&amp;gt;getListboxItemFromIndex(itemCount - 1);&lt;br /&gt;
			listBox-&amp;gt;ensureItemIsVisible(currentItem);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
	// List of available fonts&lt;br /&gt;
	std::vector&amp;lt;CEGUI::String&amp;gt; mFontList;&lt;br /&gt;
&lt;br /&gt;
	// Currently active font&lt;br /&gt;
	std::vector&amp;lt;CEGUI::String&amp;gt;::size_type mCurrentFont;&lt;br /&gt;
&lt;br /&gt;
	// Maximal number of entries to retain within the Listbox&lt;br /&gt;
	size_t mHistorySize;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#endif // _ChatBox_h_&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Main.cpp ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&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;ChatBox_demo.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;
    int i = app.run();&lt;br /&gt;
    return i;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== ChatBox.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;/ChatBox&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Chat&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;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;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.15,0},{0.03,0},{0.7,0},{0.7,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/Listbox&amp;quot; Name=&amp;quot;/ChatBox/List&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.01,0},{0.078,0},{0.99,0},{1,-30}}&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;/ChatBox/Text&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.01,0},{1,-30},{0.99,0},{1,-5}}&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 Type=&amp;quot;TaharezLook/Editbox&amp;quot; Name=&amp;quot;/ChatBox/History&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.9,0},{0.03,0},{0.95,0},{0.1,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;/ChatBox/HistoryLabel&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;History size:&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.78,0},{0.03,0},{0.9,0},{0.1,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;/GUILayout&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rackle</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=Game_chat_box&amp;diff=2811</id>
		<title>Game chat box</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=Game_chat_box&amp;diff=2811"/>
				<updated>2008-01-29T20:02:31Z</updated>
		
		<summary type="html">&lt;p&gt;Rackle: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Introduction ===&lt;br /&gt;
This snippet implements a chat box that can display text in 3 font sizes as well as limiting the number of entries (history) to a certain number.&lt;br /&gt;
&lt;br /&gt;
==== .layout Special Features ====&lt;br /&gt;
The layout definition is deceptively simple.  It defines a FrameWindow containing two widgets; a Listbox in the upper region for chat history and an Editbox at the lower region for text input.&lt;br /&gt;
&lt;br /&gt;
What is not apparent is how the bottom portion of the Listbox and the entire Editbox are defined; they specify a proportion of 100% of their parent but with a negative offset.  Essentially the bottom of the Listbox extends to the bottom of the FrameWindow (the parent) and is then moved &amp;quot;up&amp;quot; to make room for the Editbox.  And the Editbox follows the same pattern.  This allows the Editbox to retain its height as the parent FrameWindow is resized.&lt;br /&gt;
&lt;br /&gt;
==== Creating the necessary .font files ====&lt;br /&gt;
A .font file is a simple text file that defines a font within Cegui.  They are located within the Samples\datafiles\fonts directory.  This snippet uses the Commonwealth font in sizes 10, 36, and 72.  To create the missing font definitions for sizes 36 and 72 simply make two copies of the existing &amp;quot;Commonwealth-10.font&amp;quot; file.  The first copy is to be named &amp;quot;Commonwealth-36.font&amp;quot; and the second copy &amp;quot;Commonwealth-72.font&amp;quot;.  Edit the &amp;quot;Commonwealth-36.font&amp;quot; file and replace the value &amp;quot;10&amp;quot; by the value &amp;quot;36&amp;quot;.  Similarly edit the &amp;quot;Commonwealth-72.font&amp;quot; file and replace the value &amp;quot;10&amp;quot; by the value &amp;quot;72&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Files ===&lt;br /&gt;
==== ChatBox_demo.h ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
#ifndef _ChatBox_h_&lt;br /&gt;
#define _ChatBox_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;
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;
			//FontManager::getSingleton().createFont(&amp;quot;Commonwealth-10.font&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			// Initialize the list of available fonts&lt;br /&gt;
			mCurrentFont = 0;&lt;br /&gt;
			addFont(&amp;quot;Commonwealth-10&amp;quot;);&lt;br /&gt;
			addFont(&amp;quot;Commonwealth-36&amp;quot;);&lt;br /&gt;
			addFont(&amp;quot;Commonwealth-72&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;ChatBox.layout&amp;quot;);&lt;br /&gt;
			sheet-&amp;gt;addChildWindow(guiLayout);&lt;br /&gt;
&lt;br /&gt;
			// Configure the events for the chat box&lt;br /&gt;
			CEGUI::Window* editBox = winMgr.getWindow(&amp;quot;/ChatBox/Text&amp;quot;);&lt;br /&gt;
			editBox-&amp;gt;subscribeEvent(CEGUI::Editbox::EventTextAccepted,	CEGUI::Event::Subscriber(&amp;amp;DemoSample::EditTextAccepted, this)); &lt;br /&gt;
			editBox-&amp;gt;subscribeEvent(CEGUI::Editbox::EventMouseClick,	CEGUI::Event::Subscriber(&amp;amp;DemoSample::FontChange,		this)); &lt;br /&gt;
&lt;br /&gt;
			// Configure the history size&lt;br /&gt;
			mHistorySize = 100;&lt;br /&gt;
			CEGUI::Window* historyBox = winMgr.getWindow(&amp;quot;/ChatBox/History&amp;quot;);&lt;br /&gt;
			historyBox-&amp;gt;subscribeEvent(CEGUI::Editbox::EventTextAccepted,	CEGUI::Event::Subscriber(&amp;amp;DemoSample::HistoryTextAccepted, this)); &lt;br /&gt;
			historyBox-&amp;gt;setText( PropertyHelper::intToString(static_cast&amp;lt;int&amp;gt;(mHistorySize)) );&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;
	}&lt;br /&gt;
&lt;br /&gt;
	void setHistorySize(const size_t&amp;amp; pSize)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		if(pSize &amp;gt; 0)&lt;br /&gt;
		{&lt;br /&gt;
			// A better validation would be to enforce a minimal and a maximal size&lt;br /&gt;
			mHistorySize = pSize;&lt;br /&gt;
&lt;br /&gt;
			WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
			Listbox* listBox = static_cast&amp;lt;Listbox*&amp;gt; (winMgr.getWindow(&amp;quot;/ChatBox/List&amp;quot;));&lt;br /&gt;
			ListboxItem* item;&lt;br /&gt;
			while(listBox-&amp;gt;getItemCount() &amp;gt; mHistorySize)&lt;br /&gt;
			{&lt;br /&gt;
				item = listBox-&amp;gt;getListboxItemFromIndex(0);&lt;br /&gt;
				listBox-&amp;gt;removeItem(item);&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool HistoryTextAccepted(const CEGUI::EventArgs&amp;amp; args)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
		CEGUI::Window* historyBox = winMgr.getWindow(&amp;quot;/ChatBox/History&amp;quot;);&lt;br /&gt;
		int historySize = PropertyHelper::stringToInt( historyBox-&amp;gt;getText() );&lt;br /&gt;
		setHistorySize(historySize);&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool EditTextAccepted(const CEGUI::EventArgs&amp;amp; args)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		// Variables for the Listbox and the Editbox&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
		Editbox* editBox = static_cast&amp;lt;Editbox*&amp;gt; (winMgr.getWindow(&amp;quot;/ChatBox/Text&amp;quot;));&lt;br /&gt;
		Listbox* listBox = static_cast&amp;lt;Listbox*&amp;gt; (winMgr.getWindow(&amp;quot;/ChatBox/List&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
		// Add the Editbox text to the Listbox&lt;br /&gt;
		ListboxTextItem* textItem;&lt;br /&gt;
		if(listBox-&amp;gt;getItemCount() == mHistorySize)&lt;br /&gt;
		{&lt;br /&gt;
			/* We have reached the capacity of the Listbox so re-use the first Listbox item.&lt;br /&gt;
			   This code is a little crafty.  By default the ListboxTextItem is created with&lt;br /&gt;
			   the auto-delete flag set to true, which results in its automatic deletion when&lt;br /&gt;
			   removed from the Listbox.  So we change that flag to false, extract the item&lt;br /&gt;
			   from the Listbox, change its text, put the auto-delete flag back to true, and&lt;br /&gt;
			   finally put the item back into the Listbox. */&lt;br /&gt;
			textItem = static_cast&amp;lt;ListboxTextItem*&amp;gt;(listBox-&amp;gt;getListboxItemFromIndex(0));&lt;br /&gt;
			textItem-&amp;gt;setAutoDeleted(false);&lt;br /&gt;
			listBox-&amp;gt;removeItem(textItem);&lt;br /&gt;
			textItem-&amp;gt;setAutoDeleted(true);&lt;br /&gt;
			textItem-&amp;gt;setText(editBox-&amp;gt;getText());&lt;br /&gt;
		}&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			// Create a new listbox item&lt;br /&gt;
			textItem = new ListboxTextItem(editBox-&amp;gt;getText());&lt;br /&gt;
		}&lt;br /&gt;
		listBox-&amp;gt;addItem(textItem);&lt;br /&gt;
		listBox-&amp;gt;setItemSelectState(textItem, true);&lt;br /&gt;
&lt;br /&gt;
		// Scroll the Listbox entries such that the new text is visible&lt;br /&gt;
		listBox-&amp;gt;ensureItemIsVisible(listBox-&amp;gt;getItemCount());&lt;br /&gt;
&lt;br /&gt;
		// Clear the text in the Editbox&lt;br /&gt;
		editBox-&amp;gt;setText(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	void addFont(const CEGUI::String&amp;amp; pFont)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		if(!FontManager::getSingleton().isFontPresent(pFont))&lt;br /&gt;
		{&lt;br /&gt;
			mFontList.push_back(pFont);&lt;br /&gt;
			FontManager::getSingleton().createFont(pFont + &amp;quot;.font&amp;quot;);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool FontChange(const CEGUI::EventArgs&amp;amp; args)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		const MouseEventArgs&amp;amp; mouseEventArgs = static_cast&amp;lt;const MouseEventArgs&amp;amp;&amp;gt;(args);&lt;br /&gt;
		if(mouseEventArgs.button == RightButton)&lt;br /&gt;
		{&lt;br /&gt;
			// Cycle through the installed fonts upon a right-click&lt;br /&gt;
			mCurrentFont++;&lt;br /&gt;
			if(mCurrentFont &amp;gt;= mFontList.size())&lt;br /&gt;
				mCurrentFont = 0;&lt;br /&gt;
&lt;br /&gt;
			changeFont(mFontList[mCurrentFont]);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	void changeFont(const CEGUI::String&amp;amp; pFont)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
&lt;br /&gt;
		// Measure the height of the selected font&lt;br /&gt;
		Font* currentFont = FontManager::getSingleton().getFont(pFont);&lt;br /&gt;
		float fontHeight = currentFont-&amp;gt;getFontHeight();&lt;br /&gt;
&lt;br /&gt;
		/* Alter the area of the Editbox.  The original value is {{0.01,0},{1,-30},{0.99,0},{1,-5}}&lt;br /&gt;
		   The value we are altering is the &amp;quot;-30&amp;quot; within the second couplet, defining the position of&lt;br /&gt;
		   the upper y coordinate of the Editbox.  We base the new value on the position of the lower&lt;br /&gt;
		   y coordinate, which is &amp;quot;-5&amp;quot;, and the height of the font.  To this we add some space &amp;quot;10&amp;quot; to&lt;br /&gt;
		   account for the Editbox's border. */&lt;br /&gt;
		Editbox* editBox = static_cast&amp;lt;Editbox*&amp;gt; (winMgr.getWindow(&amp;quot;/ChatBox/Text&amp;quot;));&lt;br /&gt;
		URect chatTextArea = editBox-&amp;gt;getArea();&lt;br /&gt;
		chatTextArea.d_min.d_y.d_offset = chatTextArea.d_max.d_y.d_offset&lt;br /&gt;
										- fontHeight&lt;br /&gt;
										- 10;&lt;br /&gt;
		editBox-&amp;gt;setArea(chatTextArea);&lt;br /&gt;
		editBox-&amp;gt;setFont(currentFont);&lt;br /&gt;
&lt;br /&gt;
		/* Alther the area of the Listbox.  Here we only need the lower y coordinate.  Since this&lt;br /&gt;
		   value is the same as the upper y coordinate of the Editbox we do not need to calculate&lt;br /&gt;
		   it.  We also change the font of the Listbox and call upon handleUpdatedItemData() to&lt;br /&gt;
		   update the current Listbox items.  Finally we ensure that the last entry is still&lt;br /&gt;
		   visible. */&lt;br /&gt;
		Listbox* listBox = static_cast&amp;lt;Listbox*&amp;gt; (winMgr.getWindow(&amp;quot;/ChatBox/List&amp;quot;));&lt;br /&gt;
		URect listTextArea = listBox-&amp;gt;getArea();&lt;br /&gt;
		listTextArea.d_max.d_y.d_offset = chatTextArea.d_min.d_y.d_offset;&lt;br /&gt;
		listBox-&amp;gt;setArea(listTextArea);&lt;br /&gt;
		listBox-&amp;gt;setFont(currentFont);&lt;br /&gt;
		listBox-&amp;gt;handleUpdatedItemData();&lt;br /&gt;
		size_t itemCount = listBox-&amp;gt;getItemCount();&lt;br /&gt;
		if(itemCount)&lt;br /&gt;
		{&lt;br /&gt;
			ListboxItem* currentItem = listBox-&amp;gt;getListboxItemFromIndex(itemCount - 1);&lt;br /&gt;
			listBox-&amp;gt;ensureItemIsVisible(currentItem);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
	// List of available fonts&lt;br /&gt;
	std::vector&amp;lt;CEGUI::String&amp;gt; mFontList;&lt;br /&gt;
&lt;br /&gt;
	// Currently active font&lt;br /&gt;
	std::vector&amp;lt;CEGUI::String&amp;gt;::size_type mCurrentFont;&lt;br /&gt;
&lt;br /&gt;
	// Maximal number of entries to retain within the Listbox&lt;br /&gt;
	size_t mHistorySize;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#endif // _ChatBox_h_&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Main.cpp ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&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;ChatBox_demo.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;
    int i = app.run();&lt;br /&gt;
    return i;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== ChatBox.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;/ChatBox&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Chat&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;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;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.15,0},{0.03,0},{0.7,0},{0.7,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/Listbox&amp;quot; Name=&amp;quot;/ChatBox/List&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.01,0},{0.078,0},{0.99,0},{1,-30}}&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;/ChatBox/Text&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.01,0},{1,-30},{0.99,0},{1,-5}}&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 Type=&amp;quot;TaharezLook/Editbox&amp;quot; Name=&amp;quot;/ChatBox/History&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.9,0},{0.03,0},{0.95,0},{0.1,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;/ChatBox/HistoryLabel&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;History size:&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.78,0},{0.03,0},{0.9,0},{0.1,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;/GUILayout&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rackle</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=Game_chat_box&amp;diff=2810</id>
		<title>Game chat box</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=Game_chat_box&amp;diff=2810"/>
				<updated>2008-01-29T20:01:57Z</updated>
		
		<summary type="html">&lt;p&gt;Rackle: Ability to change font size and limit the number of entries (history)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Introduction ===&lt;br /&gt;
This snippet implements a chat box that can display text in 3 font sizes as well as limiting the number of entries (history) to a certain number.&lt;br /&gt;
&lt;br /&gt;
==== .layout Special Features ====&lt;br /&gt;
The layout definition is deceptively simple.  It defines a FrameWindow containing two widgets; a Listbox in the upper region for chat history and an Editbox at the lower region for text input.&lt;br /&gt;
&lt;br /&gt;
What is not apparent is how the bottom portion of the Listbox and the entire Editbox are defined; they specify a proportion of 100% of their parent but with a negative offset.  Essentially the bottom of the Listbox extends to the bottom of the FrameWindow (the parent) and is then moved &amp;quot;up&amp;quot; to make room for the Editbox.  And the Editbox follows the same pattern.  This allows the Editbox to retain its height as the parent FrameWindow is resized.&lt;br /&gt;
&lt;br /&gt;
==== Creating the necessary .font files ====&lt;br /&gt;
A .font file is a simple text file that defines a font within Cegui.  They are located within the Samples\datafiles\fonts directory.  This snippet uses the Commonwealth font in sizes 10, 36, and 72.  To create the missing font definitions for sizes 36 and 72 simply make two copies of the existing &amp;quot;Commonwealth-10.font&amp;quot; file.  The first copy is to be named &amp;quot;Commonwealth-36.font&amp;quot; and the second copy &amp;quot;Commonwealth-72.font&amp;quot;.  Edit the &amp;quot;Commonwealth-36.font&amp;quot; file and replace the value &amp;quot;10&amp;quot; by the value &amp;quot;36&amp;quot;.  Similarly edit the &amp;quot;Commonwealth-72.font&amp;quot; file and replace the value &amp;quot;10&amp;quot; by the value &amp;quot;72&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Files ===&lt;br /&gt;
==== ChatBox_demo.h ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
#ifndef _ChatBox_h_&lt;br /&gt;
#define _ChatBox_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;
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;
			//FontManager::getSingleton().createFont(&amp;quot;Commonwealth-10.font&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			// Initialize the list of available fonts&lt;br /&gt;
			mCurrentFont = 0;&lt;br /&gt;
			addFont(&amp;quot;Commonwealth-10&amp;quot;);&lt;br /&gt;
			addFont(&amp;quot;Commonwealth-36&amp;quot;);&lt;br /&gt;
			addFont(&amp;quot;Commonwealth-72&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;ChatBox.layout&amp;quot;);&lt;br /&gt;
			sheet-&amp;gt;addChildWindow(guiLayout);&lt;br /&gt;
&lt;br /&gt;
			// Configure the events for the chat box&lt;br /&gt;
			CEGUI::Window* editBox = winMgr.getWindow(&amp;quot;/ChatBox/Text&amp;quot;);&lt;br /&gt;
			editBox-&amp;gt;subscribeEvent(CEGUI::Editbox::EventTextAccepted,	CEGUI::Event::Subscriber(&amp;amp;DemoSample::EditTextAccepted, this)); &lt;br /&gt;
			editBox-&amp;gt;subscribeEvent(CEGUI::Editbox::EventMouseClick,	CEGUI::Event::Subscriber(&amp;amp;DemoSample::FontChange,		this)); &lt;br /&gt;
&lt;br /&gt;
			// Configure the history size&lt;br /&gt;
			mHistorySize = 100;&lt;br /&gt;
			CEGUI::Window* historyBox = winMgr.getWindow(&amp;quot;/ChatBox/History&amp;quot;);&lt;br /&gt;
			historyBox-&amp;gt;subscribeEvent(CEGUI::Editbox::EventTextAccepted,	CEGUI::Event::Subscriber(&amp;amp;DemoSample::HistoryTextAccepted, this)); &lt;br /&gt;
			historyBox-&amp;gt;setText( PropertyHelper::intToString(static_cast&amp;lt;int&amp;gt;(mHistorySize)) );&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;
	}&lt;br /&gt;
&lt;br /&gt;
	void setHistorySize(const size_t&amp;amp; pSize)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		if(pSize &amp;gt; 0)&lt;br /&gt;
		{&lt;br /&gt;
			// A better validation would be to enforce a minimal and a maximal size&lt;br /&gt;
			mHistorySize = pSize;&lt;br /&gt;
&lt;br /&gt;
			WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
			Listbox* listBox = static_cast&amp;lt;Listbox*&amp;gt; (winMgr.getWindow(&amp;quot;/ChatBox/List&amp;quot;));&lt;br /&gt;
			ListboxItem* item;&lt;br /&gt;
			while(listBox-&amp;gt;getItemCount() &amp;gt; mHistorySize)&lt;br /&gt;
			{&lt;br /&gt;
				item = listBox-&amp;gt;getListboxItemFromIndex(0);&lt;br /&gt;
				listBox-&amp;gt;removeItem(item);&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool HistoryTextAccepted(const CEGUI::EventArgs&amp;amp; args)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
		CEGUI::Window* historyBox = winMgr.getWindow(&amp;quot;/ChatBox/History&amp;quot;);&lt;br /&gt;
		int historySize = PropertyHelper::stringToInt( historyBox-&amp;gt;getText() );&lt;br /&gt;
		setHistorySize(historySize);&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool EditTextAccepted(const CEGUI::EventArgs&amp;amp; args)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		// Variables for the Listbox and the Editbox&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
		Editbox* editBox = static_cast&amp;lt;Editbox*&amp;gt; (winMgr.getWindow(&amp;quot;/ChatBox/Text&amp;quot;));&lt;br /&gt;
		Listbox* listBox = static_cast&amp;lt;Listbox*&amp;gt; (winMgr.getWindow(&amp;quot;/ChatBox/List&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
		// Add the Editbox text to the Listbox&lt;br /&gt;
		ListboxTextItem* textItem;&lt;br /&gt;
		if(listBox-&amp;gt;getItemCount() == mHistorySize)&lt;br /&gt;
		{&lt;br /&gt;
			/* We have reached the capacity of the Listbox so re-use the first Listbox item.&lt;br /&gt;
			   This code is a little crafty.  By default the ListboxTextItem is created with&lt;br /&gt;
			   the auto-delete flag set to true, which results in its automatic deletion when&lt;br /&gt;
			   removed from the Listbox.  So we change that flag to false, extract the item&lt;br /&gt;
			   from the Listbox, change its text, put the auto-delete flag back to true, and&lt;br /&gt;
			   finally put the item back into the Listbox. */&lt;br /&gt;
			textItem = static_cast&amp;lt;ListboxTextItem*&amp;gt;(listBox-&amp;gt;getListboxItemFromIndex(0));&lt;br /&gt;
			textItem-&amp;gt;setAutoDeleted(false);&lt;br /&gt;
			listBox-&amp;gt;removeItem(textItem);&lt;br /&gt;
			textItem-&amp;gt;setAutoDeleted(true);&lt;br /&gt;
			textItem-&amp;gt;setText(editBox-&amp;gt;getText());&lt;br /&gt;
		}&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			// Create a new listbox item&lt;br /&gt;
			textItem = new ListboxTextItem(editBox-&amp;gt;getText());&lt;br /&gt;
		}&lt;br /&gt;
		listBox-&amp;gt;addItem(textItem);&lt;br /&gt;
		listBox-&amp;gt;setItemSelectState(textItem, true);&lt;br /&gt;
&lt;br /&gt;
		// Scroll the Listbox entries such that the new text is visible&lt;br /&gt;
		listBox-&amp;gt;ensureItemIsVisible(listBox-&amp;gt;getItemCount());&lt;br /&gt;
&lt;br /&gt;
		// Clear the text in the Editbox&lt;br /&gt;
		editBox-&amp;gt;setText(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	void addFont(const CEGUI::String&amp;amp; pFont)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		if(!FontManager::getSingleton().isFontPresent(pFont))&lt;br /&gt;
		{&lt;br /&gt;
			mFontList.push_back(pFont);&lt;br /&gt;
			FontManager::getSingleton().createFont(pFont + &amp;quot;.font&amp;quot;);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool FontChange(const CEGUI::EventArgs&amp;amp; args)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		const MouseEventArgs&amp;amp; mouseEventArgs = static_cast&amp;lt;const MouseEventArgs&amp;amp;&amp;gt;(args);&lt;br /&gt;
		if(mouseEventArgs.button == RightButton)&lt;br /&gt;
		{&lt;br /&gt;
			// Cycle through the installed fonts upon a right-click&lt;br /&gt;
			mCurrentFont++;&lt;br /&gt;
			if(mCurrentFont &amp;gt;= mFontList.size())&lt;br /&gt;
				mCurrentFont = 0;&lt;br /&gt;
&lt;br /&gt;
			changeFont(mFontList[mCurrentFont]);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	void changeFont(const CEGUI::String&amp;amp; pFont)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
&lt;br /&gt;
		// Measure the height of the selected font&lt;br /&gt;
		Font* currentFont = FontManager::getSingleton().getFont(pFont);&lt;br /&gt;
		float fontHeight = currentFont-&amp;gt;getFontHeight();&lt;br /&gt;
&lt;br /&gt;
		/* Alter the area of the Editbox.  The original value is {{0.01,0},{1,-30},{0.99,0},{1,-5}}&lt;br /&gt;
		   The value we are altering is the &amp;quot;-30&amp;quot; within the second couplet, defining the position of&lt;br /&gt;
		   the upper y coordinate of the Editbox.  We base the new value on the position of the lower&lt;br /&gt;
		   y coordinate, which is &amp;quot;-5&amp;quot;, and the height of the font.  To this we add some space &amp;quot;10&amp;quot; to&lt;br /&gt;
		   account for the Editbox's border. */&lt;br /&gt;
		Editbox* editBox = static_cast&amp;lt;Editbox*&amp;gt; (winMgr.getWindow(&amp;quot;/ChatBox/Text&amp;quot;));&lt;br /&gt;
		URect chatTextArea = editBox-&amp;gt;getArea();&lt;br /&gt;
		chatTextArea.d_min.d_y.d_offset = chatTextArea.d_max.d_y.d_offset&lt;br /&gt;
										- fontHeight&lt;br /&gt;
										- 10;&lt;br /&gt;
		editBox-&amp;gt;setArea(chatTextArea);&lt;br /&gt;
		editBox-&amp;gt;setFont(currentFont);&lt;br /&gt;
&lt;br /&gt;
		/* Alther the area of the Listbox.  Here we only need the lower y coordinate.  Since this&lt;br /&gt;
		   value is the same as the upper y coordinate of the Editbox we do not need to calculate&lt;br /&gt;
		   it.  We also change the font of the Listbox and call upon handleUpdatedItemData() to&lt;br /&gt;
		   update the current Listbox items.  Finally we ensure that the last entry is still&lt;br /&gt;
		   visible. */&lt;br /&gt;
		Listbox* listBox = static_cast&amp;lt;Listbox*&amp;gt; (winMgr.getWindow(&amp;quot;/ChatBox/List&amp;quot;));&lt;br /&gt;
		URect listTextArea = listBox-&amp;gt;getArea();&lt;br /&gt;
		listTextArea.d_max.d_y.d_offset = chatTextArea.d_min.d_y.d_offset;&lt;br /&gt;
		listBox-&amp;gt;setArea(listTextArea);&lt;br /&gt;
		listBox-&amp;gt;setFont(currentFont);&lt;br /&gt;
		listBox-&amp;gt;handleUpdatedItemData();&lt;br /&gt;
		size_t itemCount = listBox-&amp;gt;getItemCount();&lt;br /&gt;
		if(itemCount)&lt;br /&gt;
		{&lt;br /&gt;
			ListboxItem* currentItem = listBox-&amp;gt;getListboxItemFromIndex(itemCount - 1);&lt;br /&gt;
			listBox-&amp;gt;ensureItemIsVisible(currentItem);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
	// List of available fonts&lt;br /&gt;
	std::vector&amp;lt;CEGUI::String&amp;gt; mFontList;&lt;br /&gt;
&lt;br /&gt;
	// Currently active font&lt;br /&gt;
	std::vector&amp;lt;CEGUI::String&amp;gt;::size_type mCurrentFont;&lt;br /&gt;
&lt;br /&gt;
	// Maximal number of entries to retain within the Listbox&lt;br /&gt;
	size_t mHistorySize;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#endif // _ChatBox_h_&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Main.cpp ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&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;ChatBox_demo.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;
    int i = app.run();&lt;br /&gt;
    return i;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== ChatBox.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;/ChatBox&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Chat&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;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;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.15,0},{0.03,0},{0.7,0},{0.7,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/Listbox&amp;quot; Name=&amp;quot;/ChatBox/List&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.01,0},{0.078,0},{0.99,0},{1,-30}}&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;/ChatBox/Text&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.01,0},{1,-30},{0.99,0},{1,-5}}&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 Type=&amp;quot;TaharezLook/Editbox&amp;quot; Name=&amp;quot;/ChatBox/History&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.9,0},{0.03,0},{0.95,0},{0.1,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;/ChatBox/HistoryLabel&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;History size:&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.78,0},{0.03,0},{0.9,0},{0.1,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;/GUILayout&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TODO: Create a new version that handles different fonts, both font names (such as Arial, Times New Roman) and font sizes (such as 8, 10, 12).  This will be done by adding a new widget within a looknfeel (such as TaharezLook.looknfeel).  The main feature will be that the Editbox's height will rely on the LineSpacing value of the font.&lt;/div&gt;</summary>
		<author><name>Rackle</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=Game_chat_box&amp;diff=2809</id>
		<title>Game chat box</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=Game_chat_box&amp;diff=2809"/>
				<updated>2008-01-29T16:13:32Z</updated>
		
		<summary type="html">&lt;p&gt;Rackle: /* ChatBox_demo.h */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Introduction ===&lt;br /&gt;
This snippet presents a .layout and sample code to implement a chat box.&lt;br /&gt;
&lt;br /&gt;
The layout definition is deceptively simple.  It defines a FrameWindow containing two widgets; a Listbox in the upper region for chat history and an Editbox at the lower region for text input.&lt;br /&gt;
&lt;br /&gt;
What is not apparent is how the bottom portion of the Listbox and the entire Editbox are defined; they specify a proportion of 100% of their parent but with a negative offset.  Essentially the bottom of the Listbox extends to the bottom of the FrameWindow (the parent) and is then moved &amp;quot;up&amp;quot; to make room for the Editbox.  And the Editbox follows the same pattern.  This allows the Editbox to retain its height as the parent FrameWindow is resized.&lt;br /&gt;
&lt;br /&gt;
=== Files ===&lt;br /&gt;
==== ChatBox_demo.h ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
#ifndef _ChatBox_h_&lt;br /&gt;
#define _ChatBox_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;
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;
			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;ChatBox.layout&amp;quot;);&lt;br /&gt;
			sheet-&amp;gt;addChildWindow(guiLayout);&lt;br /&gt;
&lt;br /&gt;
			// The only event we're interested is when the &amp;lt;ENTER&amp;gt; key is pressed&lt;br /&gt;
			// This will call upon the EditTextAccepted() function to add the text to the Listbox&lt;br /&gt;
			CEGUI::Window* editBox = winMgr.getWindow(&amp;quot;/ChatBox/Text&amp;quot;);&lt;br /&gt;
			editBox-&amp;gt;subscribeEvent(CEGUI::Editbox::EventTextAccepted, CEGUI::Event::Subscriber(&amp;amp;DemoSample::EditTextAccepted, this)); &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;
	}&lt;br /&gt;
&lt;br /&gt;
	bool EditTextAccepted(const CEGUI::EventArgs&amp;amp; args)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		// Variables for the Listbox and the Editbox&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
		Editbox* editBox = static_cast&amp;lt;Editbox*&amp;gt; (winMgr.getWindow(&amp;quot;/ChatBox/Text&amp;quot;));&lt;br /&gt;
		Listbox* listBox = static_cast&amp;lt;Listbox*&amp;gt; (winMgr.getWindow(&amp;quot;/ChatBox/List&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
		// Add the Editbox text to the Listbox&lt;br /&gt;
		ListboxTextItem* item = new ListboxTextItem(editBox-&amp;gt;getText());&lt;br /&gt;
		listBox-&amp;gt;addItem ( item );&lt;br /&gt;
&lt;br /&gt;
		// Scroll the Listbox entries such that the new text is visible&lt;br /&gt;
		listBox-&amp;gt;ensureItemIsVisible(listBox-&amp;gt;getItemCount());&lt;br /&gt;
&lt;br /&gt;
		// Clear the text in the Editbox&lt;br /&gt;
		editBox-&amp;gt;setText(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#endif // _ChatBox_h_&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Main.cpp ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&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;ChatBox_demo.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;
    int i = app.run();&lt;br /&gt;
    return i;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== ChatBox.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;
&amp;lt;GUILayout &amp;gt;&lt;br /&gt;
    &amp;lt;Window Type=&amp;quot;TaharezLook/FrameWindow&amp;quot; Name=&amp;quot;/ChatBox&amp;quot; &amp;gt;&lt;br /&gt;
        &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Chat&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;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;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.15,0},{0.03,0},{0.7,0},{0.7,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;Window Type=&amp;quot;TaharezLook/Listbox&amp;quot; Name=&amp;quot;/ChatBox/List&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.01,0},{0.078,0},{0.99,0},{1,-30}}&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;/ChatBox/Text&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.01,0},{1,-30},{0.99,0},{1,-5}}&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;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TODO: Create a new version that handles different fonts, both font names (such as Arial, Times New Roman) and font sizes (such as 8, 10, 12).  This will be done by adding a new widget within a looknfeel (such as TaharezLook.looknfeel).  The main feature will be that the Editbox's height will rely on the LineSpacing value of the font.&lt;/div&gt;</summary>
		<author><name>Rackle</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=Game_chat_box&amp;diff=2808</id>
		<title>Game chat box</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=Game_chat_box&amp;diff=2808"/>
				<updated>2008-01-29T16:12:21Z</updated>
		
		<summary type="html">&lt;p&gt;Rackle: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Introduction ===&lt;br /&gt;
This snippet presents a .layout and sample code to implement a chat box.&lt;br /&gt;
&lt;br /&gt;
The layout definition is deceptively simple.  It defines a FrameWindow containing two widgets; a Listbox in the upper region for chat history and an Editbox at the lower region for text input.&lt;br /&gt;
&lt;br /&gt;
What is not apparent is how the bottom portion of the Listbox and the entire Editbox are defined; they specify a proportion of 100% of their parent but with a negative offset.  Essentially the bottom of the Listbox extends to the bottom of the FrameWindow (the parent) and is then moved &amp;quot;up&amp;quot; to make room for the Editbox.  And the Editbox follows the same pattern.  This allows the Editbox to retain its height as the parent FrameWindow is resized.&lt;br /&gt;
&lt;br /&gt;
=== Files ===&lt;br /&gt;
==== ChatBox_demo.h ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
#ifndef _ChatBox_h_&lt;br /&gt;
#define _ChatBox_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;
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;
			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;ChatBox.layout&amp;quot;);&lt;br /&gt;
			sheet-&amp;gt;addChildWindow(guiLayout);&lt;br /&gt;
&lt;br /&gt;
			// The only event we're interested is when the &amp;lt;ENTER&amp;gt; key is pressed&lt;br /&gt;
			// This will call upon the EditTextAccepted() function to add the text to the Listbox&lt;br /&gt;
			CEGUI::Window* editBox = winMgr.getWindow(&amp;quot;/ChatBox/Text&amp;quot;);&lt;br /&gt;
			editBox-&amp;gt;subscribeEvent(CEGUI::Editbox::EventTextAccepted, CEGUI::Event::Subscriber(&amp;amp;DemoSample::EditTextAccepted, this)); &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;
	}&lt;br /&gt;
&lt;br /&gt;
	bool EditTextAccepted(const CEGUI::EventArgs&amp;amp; args)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
&lt;br /&gt;
		// Variables for the Listbox and the Editbox&lt;br /&gt;
		WindowManager&amp;amp; winMgr = WindowManager::getSingleton();&lt;br /&gt;
		Editbox* editBox = static_cast&amp;lt;Editbox*&amp;gt; (winMgr.getWindow(&amp;quot;/ChatBox/Text&amp;quot;));&lt;br /&gt;
		Listbox* listBox = static_cast&amp;lt;Listbox*&amp;gt; (winMgr.getWindow(&amp;quot;/ChatBox/List&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
		// Add the Editbox text to the Listbox&lt;br /&gt;
		ListboxTextItem* item = new ListboxTextItem(editBox-&amp;gt;getText());&lt;br /&gt;
		listBox-&amp;gt;addItem ( item );&lt;br /&gt;
&lt;br /&gt;
		// Scroll the Listbox entries such that the new text is visible&lt;br /&gt;
		listBox-&amp;gt;ensureItemIsVisible(listBox-&amp;gt;getItemCount());&lt;br /&gt;
&lt;br /&gt;
		// Clear the text in the Editbox&lt;br /&gt;
		editBox-&amp;gt;setText(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#endif // _ChatBox_h_&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Main.cpp ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&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;ChatBox_demo.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;
    int i = app.run();&lt;br /&gt;
    return i;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== ChatBox.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;
&amp;lt;GUILayout &amp;gt;&lt;br /&gt;
    &amp;lt;Window Type=&amp;quot;TaharezLook/FrameWindow&amp;quot; Name=&amp;quot;/ChatBox&amp;quot; &amp;gt;&lt;br /&gt;
        &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Chat&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;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;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.15,0},{0.03,0},{0.7,0},{0.7,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;Window Type=&amp;quot;TaharezLook/Listbox&amp;quot; Name=&amp;quot;/ChatBox/List&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.01,0},{0.078,0},{0.99,0},{1,-30}}&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;/ChatBox/Text&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.01,0},{1,-30},{0.99,0},{1,-5}}&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;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TODO: Create a new version that handles different fonts, both font names (such as Arial, Times New Roman) and font sizes (such as 8, 10, 12).  This will be done by adding a new widget within a looknfeel (such as TaharezLook.looknfeel).  The main feature will be that the Editbox's height will rely on the LineSpacing value of the font.&lt;/div&gt;</summary>
		<author><name>Rackle</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=Game_chat_box&amp;diff=2807</id>
		<title>Game chat box</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=Game_chat_box&amp;diff=2807"/>
				<updated>2008-01-29T15:33:06Z</updated>
		
		<summary type="html">&lt;p&gt;Rackle: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following .layout defines a FrameWindow containing two widgets; a Listbox in the upper region for chat history and an Editbox at the lower region for text input.&lt;br /&gt;
&lt;br /&gt;
'''chat.layout'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;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;TaharezLook/FrameWindow&amp;quot; Name=&amp;quot;/Chat&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;Property Name=&amp;quot;Position&amp;quot; Value=&amp;quot;x:0.0 y:0.0&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;Property Name=&amp;quot;Size&amp;quot; Value=&amp;quot;w:0.25 h:0.25&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;Property Name=&amp;quot;Alpha&amp;quot; Value=&amp;quot;0.8&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;Window Type=&amp;quot;DefaultWindow&amp;quot; Name=&amp;quot;/Chat/Wnd&amp;quot;&amp;gt; &lt;br /&gt;
		&amp;lt;Property Name=&amp;quot;Alpha&amp;quot; Value=&amp;quot;0.8&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Property Name=&amp;quot;Position&amp;quot; Value=&amp;quot;x:0.0 y:0.00&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Property Name=&amp;quot;Size&amp;quot; Value=&amp;quot;w:1 h:1&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Window Type=&amp;quot;TaharezLook/Listbox&amp;quot; Name=&amp;quot;/Chat/Wnd/List&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;Property Name=&amp;quot;Position&amp;quot; Value=&amp;quot;x:0.0 y:0.1&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Property Name=&amp;quot;Size&amp;quot; Value=&amp;quot;w:1 h:0.77&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;/Chat/Wnd/Edit&amp;quot; &amp;gt;&lt;br /&gt;
			&amp;lt;Property Name=&amp;quot;Position&amp;quot; Value=&amp;quot;x:0.01 y:0.87&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Property Name=&amp;quot;Size&amp;quot; Value=&amp;quot;w:0.98 h:0.12&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;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''InitialiseChatBox()'''&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
// A helper variable&lt;br /&gt;
CEGUI::WindowManager&amp;amp; winMgr = CEGUI::WindowManager::getSingleton();&lt;br /&gt;
&lt;br /&gt;
// Load the chat layout and add it to the GUI sheet&lt;br /&gt;
mMainWindow = winMgr.loadWindowLayout(&amp;quot;chat.layout&amp;quot;);&lt;br /&gt;
if (mMainWindow)&lt;br /&gt;
    CEGUI::System::getSingleton().getGUISheet()-&amp;gt;addChildWindow(mMainWindow);&lt;br /&gt;
&lt;br /&gt;
// The only event we're interested is when the &amp;lt;ENTER&amp;gt; key is pressed&lt;br /&gt;
// This will call upon the EditTextAccepted() function to add the text to the Listbox&lt;br /&gt;
CEGUI::Window* editBox = winMgr.getWindow(&amp;quot;/Chat/Wnd/Edit&amp;quot;);&lt;br /&gt;
editBox-&amp;gt;subscribeEvent(CEGUI::Editbox::EventTextAccepted, CEGUI::Event::Subscriber(&amp;amp;ChatWidget::EditTextAccepted, this)); &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''EditTextAccepted()'''&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
bool ChatWidget::EditTextAccepted(const CEGUI::EventArgs&amp;amp; args)&lt;br /&gt;
{&lt;br /&gt;
	// Variables for the Listbox and the Editbox&lt;br /&gt;
	mEditBox = static_cast&amp;lt;CEGUI::Editbox*&amp;gt; (winMgr.getWindow(&amp;quot;/Chat/Wnd/Edit&amp;quot;));&lt;br /&gt;
	mListBox = static_cast&amp;lt;CEGUI::Listbox*&amp;gt; (winMgr.getWindow(&amp;quot;/Chat/Wnd/List&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
	// Add the Editbox text to the Listbox&lt;br /&gt;
	CEGUI::ListboxTextItem* item = new CEGUI::ListboxTextItem(mEditBox-&amp;gt;getText());&lt;br /&gt;
	mListBox-&amp;gt;addItem ( item );&lt;br /&gt;
&lt;br /&gt;
	// Scroll the Listbox entries such that the new text is visible&lt;br /&gt;
	mListBox-&amp;gt;ensureItemIsVisible(mListBox-&amp;gt;getItemCount());&lt;br /&gt;
&lt;br /&gt;
	// Clear the text in the Editbox&lt;br /&gt;
	mEditBox-&amp;gt;setText(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	return true;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TODO: Create a new version that handles different fonts, both font names (such as Arial, Times New Roman) and font sizes (such as 8, 10, 12).  This will be done by adding a new widget within a looknfeel (such as TaharezLook.looknfeel).  The main feature will be that the Editbox's height will rely on the LineSpacing value of the font.&lt;/div&gt;</summary>
		<author><name>Rackle</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=Game_chat_box&amp;diff=2806</id>
		<title>Game chat box</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=Game_chat_box&amp;diff=2806"/>
				<updated>2008-01-29T15:28:56Z</updated>
		
		<summary type="html">&lt;p&gt;Rackle: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following .layout defines a FrameWindow containing two widgets; a Listbox in the upper region for chat history and an Editbox at the lower region for text input.&lt;br /&gt;
&lt;br /&gt;
'''chat.layout'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;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;TaharezLook/FrameWindow&amp;quot; Name=&amp;quot;/Chat&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;Property Name=&amp;quot;Position&amp;quot; Value=&amp;quot;x:0.0 y:0.0&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;Property Name=&amp;quot;Size&amp;quot; Value=&amp;quot;w:0.25 h:0.25&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;Property Name=&amp;quot;Alpha&amp;quot; Value=&amp;quot;0.8&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;Window Type=&amp;quot;DefaultWindow&amp;quot; Name=&amp;quot;/Chat/Wnd&amp;quot;&amp;gt; &lt;br /&gt;
		&amp;lt;Property Name=&amp;quot;Alpha&amp;quot; Value=&amp;quot;0.8&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Property Name=&amp;quot;Position&amp;quot; Value=&amp;quot;x:0.0 y:0.00&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Property Name=&amp;quot;Size&amp;quot; Value=&amp;quot;w:1 h:1&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Window Type=&amp;quot;TaharezLook/Listbox&amp;quot; Name=&amp;quot;/Chat/Wnd/List&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;Property Name=&amp;quot;Position&amp;quot; Value=&amp;quot;x:0.0 y:0.1&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Property Name=&amp;quot;Size&amp;quot; Value=&amp;quot;w:1 h:0.77&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;/Chat/Wnd/Edit&amp;quot; &amp;gt;&lt;br /&gt;
			&amp;lt;Property Name=&amp;quot;Position&amp;quot; Value=&amp;quot;x:0.01 y:0.87&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Property Name=&amp;quot;Size&amp;quot; Value=&amp;quot;w:0.98 h:0.12&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;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''InitialiseChatBox()'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// A helper variable&lt;br /&gt;
CEGUI::WindowManager&amp;amp; winMgr = CEGUI::WindowManager::getSingleton();&lt;br /&gt;
&lt;br /&gt;
// Load the chat layout and add it to the GUI sheet&lt;br /&gt;
mMainWindow = winMgr.loadWindowLayout(&amp;quot;chat.layout&amp;quot;);&lt;br /&gt;
if (mMainWindow)&lt;br /&gt;
    CEGUI::System::getSingleton().getGUISheet()-&amp;gt;addChildWindow(mMainWindow);&lt;br /&gt;
&lt;br /&gt;
// The only event we're interested is when the &amp;lt;ENTER&amp;gt; key is pressed&lt;br /&gt;
// This will call upon the EditTextAccepted() function to add the text to the Listbox&lt;br /&gt;
CEGUI::Window* editBox = winMgr.getWindow(&amp;quot;/Chat/Wnd/Edit&amp;quot;);&lt;br /&gt;
editBox-&amp;gt;subscribeEvent(CEGUI::Editbox::EventTextAccepted, CEGUI::Event::Subscriber(&amp;amp;ChatWidget::EditTextAccepted, this)); &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''EditTextAccepted()'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bool ChatWidget::EditTextAccepted(const CEGUI::EventArgs&amp;amp; args)&lt;br /&gt;
{&lt;br /&gt;
	// Variables for the Listbox and the Editbox&lt;br /&gt;
	mEditBox = static_cast&amp;lt;CEGUI::Editbox*&amp;gt; (winMgr.getWindow(&amp;quot;/Chat/Wnd/Edit&amp;quot;));&lt;br /&gt;
	mListBox = static_cast&amp;lt;CEGUI::Listbox*&amp;gt; (winMgr.getWindow(&amp;quot;/Chat/Wnd/List&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
	// Add the Editbox text to the Listbox&lt;br /&gt;
	CEGUI::ListboxTextItem* item = new CEGUI::ListboxTextItem(mEditBox-&amp;gt;getText());&lt;br /&gt;
	mListBox-&amp;gt;addItem ( item );&lt;br /&gt;
&lt;br /&gt;
	// Scroll the Listbox entries such that the new text is visible&lt;br /&gt;
	mListBox-&amp;gt;ensureItemIsVisible(mListBox-&amp;gt;getItemCount());&lt;br /&gt;
&lt;br /&gt;
	// Clear the text in the Editbox&lt;br /&gt;
	mEditBox-&amp;gt;setText(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	return true;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TODO: Create a new version that handles different fonts, both font names (such as Arial, Times New Roman) and font sizes (such as 8, 10, 12).  This will be done by adding a new widget within a looknfeel (such as TaharezLook.looknfeel).  The main feature will be that the Editbox's height will rely on the LineSpacing value of the font.&lt;/div&gt;</summary>
		<author><name>Rackle</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=FAQ&amp;diff=2784</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=FAQ&amp;diff=2784"/>
				<updated>2008-01-02T23:56:52Z</updated>
		
		<summary type="html">&lt;p&gt;Rackle: /* What properties are available for use in XML layouts, and what format do I use for the value strings? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== General Questions ==&lt;br /&gt;
=== What is CEGUI? ===&lt;br /&gt;
CEGUI stands for ''Crazy Eddie's Gui System''; a free library providing windowing and widgets for graphics APIs / engines where such functionality is not natively available, or severely lacking. The library is object orientated, written in C++, and targeted at games developers who should be spending their time creating great games, not building GUI sub-systems!&lt;br /&gt;
&lt;br /&gt;
CEGUI is used as the GUI of choice in the [http://www.ogre3d.org Ogre3D project] but supports Microsoft® DirectX® 8.1 and 9, OpenGL, and the Irrlicht engine natively.&lt;br /&gt;
&lt;br /&gt;
CEGUI was started by Paul Turner (&amp;quot;[[User:CrazyEddie|CrazyEddie]]&amp;quot;) about two years ago and is currently in it's second major revision, &amp;quot;Mk2&amp;quot;. The project supports windows, linux and MacOS.&lt;br /&gt;
&lt;br /&gt;
=== How is CEGUI licensed? ===&lt;br /&gt;
Up and until version 0.4.1, CEGUI '''is''' licensed under [http://www.gnu.org/licenses/lgpl.html LGPL], which basically means you can dynamically link to it (ie. use it as a library) in a non-GPL project, as long as you fulfill the other requirements of the LGPL.&lt;br /&gt;
&lt;br /&gt;
However, from 0.5 on the library is released under the [http://www.opensource.org/licenses/mit-license.php MIT] license, which is less restrictive then LGPL. You may for example statically link to libraries. The main reason for this switch is the fact that the Ogre3D project has started to provide dual licensing to allow console development. And in order to keep CEGUI as their preferred GUI system, we have switched as well.&lt;br /&gt;
&lt;br /&gt;
=== What is the situation with the Falagard components and the Creative Commons license? ===&lt;br /&gt;
There is no situation!  The Creative Commons license only applies to the documentation where that notice appears; the source code, libraries, and all other materials relating to the Falagard skinning system are licensed under LGPL or MIT (depending upon the version; see above).&lt;br /&gt;
&lt;br /&gt;
=== Why is the Falagard documentation licensed separately?  Why is it not LGPL/MIT like the rest of the library? ===&lt;br /&gt;
Originally that documentation was only to be available as a PDF file intended for self-printing into a mini-book, and the &amp;quot;this work&amp;quot; portion of the license notification applies to the text of that book; the documentation is considered a separate work from the code / library itself, and so it licensed separately.&lt;br /&gt;
&lt;br /&gt;
=== How much does CEGUI cost? ===&lt;br /&gt;
Nothing. The use of CEGUI is totally free within the bounds of the license as described above.&lt;br /&gt;
&lt;br /&gt;
=== I am developing a commercial, closed-source product. Should i use the 0.4 or 0.5 version of the library? ===&lt;br /&gt;
When you are creating a product for PC, where it is possible for users to update any of your used third-party DLL's (a requirement for LGPL), you can choose both versions. However if you are shipping a product on a read-only device, such as a console DVD, you must use 0.5 or higher, because the MIT license does not require that users can update anything.&lt;br /&gt;
&lt;br /&gt;
However before deciding, do always carefully check the mentioned licenses to make sure that your project doesn't do something uncommon.&lt;br /&gt;
&lt;br /&gt;
=== I am not happy with the LGPL / MIT license, do you offer alternative licensing? ===&lt;br /&gt;
No. Alternative licensing is not available, nor is it planned. But you won't find anything much less restrictive then the MIT license.&lt;br /&gt;
&lt;br /&gt;
=== Does CEGUI rely upon any third party libraries? If so what are they? ===&lt;br /&gt;
CEGUI currently depends upon the following external libraries:&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; &lt;br /&gt;
|| '''Library''' || '''Required''' || '''Url''' || '''License''' &lt;br /&gt;
|- &lt;br /&gt;
|| FreeType2 || yes || [http://www.freetype.org/freetype2/index.html http://www.freetype.org/freetype2/index.html] || BSD-like [http://www.freetype.org/FTL.TXT FreeType License] ou [http://www.freetype.org/GPL.TXT GPL] &lt;br /&gt;
|-&lt;br /&gt;
|| Perl C Regular Expression || yes || [http://www.pcre.org/ http://www.pcre.org/] || [http://www.pcre.org/license.txt BSD]&lt;br /&gt;
|-&lt;br /&gt;
|| Xerces-C++ || no || [http://xerces.apache.org/ http://xerces.apache.org/] || [http://www.apache.org/licenses/LICENSE-2.0.html  Apache Software License, Version 2.0]&lt;br /&gt;
|-&lt;br /&gt;
|| Expat || no || [http://expat.sourceforge.net/ http://expat.sourceforge.net/] || [http://www.opensource.org/licenses/mit-license.html MIT]&lt;br /&gt;
|-&lt;br /&gt;
|| Libxml || no ||  [http://www.xmlsoft.org/ http://www.xmlsoft.org/] || [http://www.opensource.org/licenses/mit-license.html MIT]&lt;br /&gt;
|-&lt;br /&gt;
|| DevIL || no ||  [http://openil.sourceforge.net/ http://openil.sourceforge.net/] || [http://openil.sourceforge.net/license.php  LGPL License Version 2.1] &lt;br /&gt;
|}&lt;br /&gt;
You will also require a supported rendering system, and some form of input library.&lt;br /&gt;
&lt;br /&gt;
=== Do I have to compile the third part libraries myself? ===&lt;br /&gt;
It depends. Under Linux and similar systems, you will need to perform your own compilation. For Microsoft® Windows® users, we have supplied packages containing binary versions of the libraries for a selection of popular compiler configurations. See the &amp;quot;Current Releases&amp;quot; on the home page.&lt;br /&gt;
&lt;br /&gt;
=== You mentioned something about &amp;quot;supported rendering systems&amp;quot;, what's that all about and which systems are supported? ===&lt;br /&gt;
CEGUI can be used with various rendering systems. There are currently CEGUI renderer modules for Microsoft® DirectX® 8.1 and 9, OpenGL, the Ogre engine, and the Irrlicht engine.&lt;br /&gt;
&lt;br /&gt;
=== There is no renderer module for my rendering engine or API of choice, will other rendering system be supported? ===&lt;br /&gt;
It is likely that, over time, CEGUI will add support for other APIs and engines. Having said this, it is fairly simple to write your own renderer module for CEGUI, so you might consider taking that option if you do not want to wait.&lt;br /&gt;
&lt;br /&gt;
=== And what about input libraries? ===&lt;br /&gt;
CEGUI requires you to ''inject'' inputs into it, these inputs can come from any source that you choose. All you need to do is pass mouse movements, mouse button up and down events, and keyboard inputs to CEGUI.&lt;br /&gt;
&lt;br /&gt;
=== Why doesn't CEGUI collect its own inputs? Why do I need to inject the inputs myself? ===&lt;br /&gt;
CEGUI does not collect its own input so that the system can remain as flexible as possible. We don't want to tie people down to one system or input library.&lt;br /&gt;
&lt;br /&gt;
=== I have seen mention of a Lua scripting module, how can I get this? ===&lt;br /&gt;
The Lua scripting module is provided with CEGUI and resides in the same source repository. Downloading CEGUI binary/source/svn will get you everything you need.&lt;br /&gt;
&lt;br /&gt;
=== What is the Mk-1 version of CEGUI? ===&lt;br /&gt;
The Mk-1 version was a Windows®/DirectX® only library and was really a dry run for what became the Mk-2 system. There was only ever 'alpha' versions of the Mk-1 code, and it is now considered obselete and is not supported.  &lt;br /&gt;
&lt;br /&gt;
=== I am having major troubles integrating CEGUI with my project, will you do it for me? ===&lt;br /&gt;
No. The CEGUI developers have enough to do without writing users projects for them. Refer to the Howto's and Tutorials from the home page.&lt;br /&gt;
&lt;br /&gt;
=== I have (or think I have) found a bug. How should I proceed? ===&lt;br /&gt;
If you are certain that it's a bug and not, for example, a misunderstanding of what is happening, then the bug should be reported via the [http://www.cegui.org.uk/mantis/index.php | Mantis Tracker] However, before submitting a bug to the tracker, it is asked that you first do a quick search to see if the bug has already been reported. If you are unsure whether something is a bug or not, then it may be discussed on the web site forums prior to submitting a bug report to the project bug tracker.&lt;br /&gt;
&lt;br /&gt;
=== I notice that feature/widget 'X' is missing. Will this be added to CEGUI? ===&lt;br /&gt;
Requests for new features and/or widgets are welcomed in this forum: http://www.cegui.org.uk/phpBB2/viewforum.php?f=3&amp;amp;sid=587eedf3463c00490686f8cddc61a257&lt;br /&gt;
This is the best way because most people will read it, including the team. This helps others to give input as well, which migth result in clearly defined requests.&lt;br /&gt;
&lt;br /&gt;
Note that no promises are made with regards to which features will and will not be added, or how long such things will take, but all requests will be seriously considered.&lt;br /&gt;
&lt;br /&gt;
=== How can I get involved with CEGUI development? ===&lt;br /&gt;
Each new member gets added by invitation by the current team. Most probably because that person has contributed some valuable patches, or is of great help in the forums. It will of course depend on the current state of the project to know which positions are required.&lt;br /&gt;
&lt;br /&gt;
So the best way to become involved is to show your face at the web site forums, the irc channel, and state what your intentions are (to help in avoiding duplicated effort), thereby becoming a constructive individual for CEGUI and its community.&lt;br /&gt;
&lt;br /&gt;
=== Is there managed code / Microsoft .Net support for the CEGUI library? ===&lt;br /&gt;
Yes, there is ''ceguisharp'' at http://ceguisharp.sourceforge.net/ This is a C# port of the library which will support Managed Direct 3D, OpenGL, as well as higher-level engines such as the excellent Axiom rendering engine.&lt;br /&gt;
&lt;br /&gt;
=== This FAQ doesn't answer my question, what should I do now? ===&lt;br /&gt;
Feel free to post your question on the web site forums, somebody will gladly answer your question and/or offer further advice.&lt;br /&gt;
&lt;br /&gt;
== Building CEGUI ==&lt;br /&gt;
&lt;br /&gt;
This section has moved to [http://www.cegui.org.uk/wiki/index.php/HOWTO:_Obtain_the_library_source_from_subversion New location]&lt;br /&gt;
&lt;br /&gt;
== Usage Questions ==&lt;br /&gt;
''(This whole section should be moved to a Tutorial or a Howto).''&lt;br /&gt;
=== What is the correct way to subscribe for an event? ===&lt;br /&gt;
Event notification is a vital aspect of GUI programming. CEGUI handles those using subscribers.&lt;br /&gt;
In order to subscribe a window for an event, you have to call the method 'Window::subscribeEvent', passing the function&lt;br /&gt;
to be called when the specified event occurs, and the instance on which the method is called.&lt;br /&gt;
&lt;br /&gt;
 class MyButtonHandler&lt;br /&gt;
 {&lt;br /&gt;
 private:&lt;br /&gt;
     PushButton* mButton;&lt;br /&gt;
 &lt;br /&gt;
 public:&lt;br /&gt;
     MyButtonHandler::MyButtonHandler(PushButton* btn) : mButton(btn)&lt;br /&gt;
     {&lt;br /&gt;
         btn-&amp;gt;subscribeEvent(PushButton::EventClicked, Event::Subscriber(&amp;amp;MyButtonHandler::ButtonClicked,this));&lt;br /&gt;
     }&lt;br /&gt;
     &lt;br /&gt;
     bool MyButtonHandler::ButtonClicked(const EventArgs&amp;amp;)&lt;br /&gt;
     {&lt;br /&gt;
         //This function gets called when the button is clicked&lt;br /&gt;
         std::cout &amp;lt;&amp;lt; &amp;quot;Button clicked&amp;quot; &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
The 'subscribeEvent' method returns an Event::Connection, which can be used later to unsubscribe for a registered event with&lt;br /&gt;
the 'disconnect' method.&lt;br /&gt;
&lt;br /&gt;
 Event::Connection myCon = btn-&amp;gt;subscribeEvent(...);&lt;br /&gt;
 &lt;br /&gt;
 ...&lt;br /&gt;
 &lt;br /&gt;
 myCon-&amp;gt;disconnect();&lt;br /&gt;
&lt;br /&gt;
In order to totally remove the event itself, you have to call the 'removeEvent' function:&lt;br /&gt;
all the connections to the specified event will be disconnected. &lt;br /&gt;
There's also an Event::ScopedConnection, which can be used to auto-unsubscribe when the event goes out of scope.&lt;br /&gt;
&lt;br /&gt;
Similar way for the scripted events, which can be subscribed with the 'subscribeScriptedEvent' method.&lt;br /&gt;
In addition, you can do it in XML, using this syntax:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Event Name=&amp;quot;Clicked&amp;quot; Function=&amp;quot;luabtn_clicked&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== How can I make the ListBox highlight the selected item? ===&lt;br /&gt;
In order to highlight selected items you need to set selection brush image and the selection colours of that item. The selection image is modulated by the colours you set. Note, that the alpha component needs to be smaller than 1.0, for the content of the selected item to be seen.&lt;br /&gt;
 // set selection highlight to a half transparent blue to red gradient.&lt;br /&gt;
 colour blue(0.0, 0.0, 1.0, 0.5);&lt;br /&gt;
 colour red(1.0, 0.0, 0.0, 0.5);&lt;br /&gt;
 myListBoxItem-&amp;gt;setSelectionColours(blue, blue, red, red);&lt;br /&gt;
 // this default image is a simple white rectangle&lt;br /&gt;
 myListBoxItem-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;ListboxSelectionBrush&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
=== How can I remove the border of a StaticImage? ===&lt;br /&gt;
Either put the following property into the window definition:&lt;br /&gt;
 &amp;lt;Property Name=&amp;quot;FrameEnabled&amp;quot; Value=&amp;quot;false&amp;quot; /&amp;gt;&lt;br /&gt;
Or set it by code:&lt;br /&gt;
 myStaticImage-&amp;gt;setFrameEnabled(false);&lt;br /&gt;
&lt;br /&gt;
=== How can I set the background of a StaticImage? ===&lt;br /&gt;
The first thing you need in order to do this is an Imageset that defines the Image that you wish to use. When wanting to use an image file for this as you suggest, you basically have an imageset defined like this:&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
 &amp;lt;Imageset Name=&amp;quot;BackdropImageset&amp;quot; Imagefile=&amp;quot;backdrop.tga&amp;quot; NativeHorzRes=&amp;quot;1024&amp;quot; NativeVertRes=&amp;quot;768&amp;quot; AutoScaled=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
 	&amp;lt;Image Name=&amp;quot;Backdrop&amp;quot; XPos=&amp;quot;0&amp;quot; YPos=&amp;quot;0&amp;quot; Width=&amp;quot;1024&amp;quot; Height=&amp;quot;768&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;/Imageset&amp;gt;&lt;br /&gt;
&lt;br /&gt;
What this does is define an Imageset using the backdrop.tga. A single image &amp;quot;Backdrop&amp;quot; is defined that starts at location (0,0) and is 1024 x 768 in size. You should be careful in that the source image file should have dimensions that are powers of two - this is because the image is loaded as a texture, and may be stretched if the powers-of-two requirement is not observed.&amp;lt;br&amp;gt;&lt;br /&gt;
Once you have your imageset defined, you can load it either by adding a reference to it in whichever scheme you are loading, or manually using the ImagesetManager:&lt;br /&gt;
 CEGUI::ImagesetManager::getSingleton().createImageset(&amp;quot;myImageset.imagset&amp;quot;);&lt;br /&gt;
Once the thing is loaded, you set the image into the StaticImage like so:&lt;br /&gt;
 myStaticImage-&amp;gt;setImage(&amp;quot;BackdropImageset&amp;quot;, &amp;quot;Backdrop&amp;quot;);&lt;br /&gt;
Notice that the names we specify here are the ones that were originally specified in the imageset XML file.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== I can't see the items I've added to my Combobox, how do I get the list to show when I press the button? ===&lt;br /&gt;
The height you specify for the combobox widget includes the height of the drop down list; it's not just for the 'Editbox' portion of the widget (the height of which  is usually automatically determined based upon the font).  Ensure that when specifying the height for your combobox, you have provided sufficient space for the list to appear.&lt;br /&gt;
&lt;br /&gt;
=== What properties are available for use in XML layouts, and what format do I use for the value strings? ===&lt;br /&gt;
If you start at the documentation for the base Property class ([http://www.cegui.org.uk/api_reference/classCEGUI_1_1Property.html Property base]), you will get an inheritance diagram showing all properties in the system. When you click one, you'll get its page. Each page has a description of the format in which you should provide its value.&lt;br /&gt;
&lt;br /&gt;
Besides, as an overview, each widget has its properties placed within an appropriately named C++ namespace within the [http://www.cegui.org.uk/api_reference/namespaces.html namespaces section of the API reference].&lt;br /&gt;
&lt;br /&gt;
Also, remember that properties are inherited.  So for example, when looking up properties for a PushButton, also check the properties for ButtonBase and Window too - since these properties are also available to you.&lt;br /&gt;
&lt;br /&gt;
The [[PropertyFinder]] tool generates a list of the properties for every widget.  Lists of properties for the [[SetProperty |Taharez]] and [[SetProperty (WindowsLook) |Windows]] schemes are available online.&lt;br /&gt;
&lt;br /&gt;
=== (How) can I create a menu ? ===&lt;br /&gt;
Yes you can. Rackle wrote [http://www.cegui.org.uk/wiki/index.php?title=MenuAndPopup an article] about how to create menus, submenus and popup menus, including some code.&lt;/div&gt;</summary>
		<author><name>Rackle</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=FAQ&amp;diff=2783</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=FAQ&amp;diff=2783"/>
				<updated>2008-01-02T23:49:12Z</updated>
		
		<summary type="html">&lt;p&gt;Rackle: /* (How) can I create a menu ? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== General Questions ==&lt;br /&gt;
=== What is CEGUI? ===&lt;br /&gt;
CEGUI stands for ''Crazy Eddie's Gui System''; a free library providing windowing and widgets for graphics APIs / engines where such functionality is not natively available, or severely lacking. The library is object orientated, written in C++, and targeted at games developers who should be spending their time creating great games, not building GUI sub-systems!&lt;br /&gt;
&lt;br /&gt;
CEGUI is used as the GUI of choice in the [http://www.ogre3d.org Ogre3D project] but supports Microsoft® DirectX® 8.1 and 9, OpenGL, and the Irrlicht engine natively.&lt;br /&gt;
&lt;br /&gt;
CEGUI was started by Paul Turner (&amp;quot;[[User:CrazyEddie|CrazyEddie]]&amp;quot;) about two years ago and is currently in it's second major revision, &amp;quot;Mk2&amp;quot;. The project supports windows, linux and MacOS.&lt;br /&gt;
&lt;br /&gt;
=== How is CEGUI licensed? ===&lt;br /&gt;
Up and until version 0.4.1, CEGUI '''is''' licensed under [http://www.gnu.org/licenses/lgpl.html LGPL], which basically means you can dynamically link to it (ie. use it as a library) in a non-GPL project, as long as you fulfill the other requirements of the LGPL.&lt;br /&gt;
&lt;br /&gt;
However, from 0.5 on the library is released under the [http://www.opensource.org/licenses/mit-license.php MIT] license, which is less restrictive then LGPL. You may for example statically link to libraries. The main reason for this switch is the fact that the Ogre3D project has started to provide dual licensing to allow console development. And in order to keep CEGUI as their preferred GUI system, we have switched as well.&lt;br /&gt;
&lt;br /&gt;
=== What is the situation with the Falagard components and the Creative Commons license? ===&lt;br /&gt;
There is no situation!  The Creative Commons license only applies to the documentation where that notice appears; the source code, libraries, and all other materials relating to the Falagard skinning system are licensed under LGPL or MIT (depending upon the version; see above).&lt;br /&gt;
&lt;br /&gt;
=== Why is the Falagard documentation licensed separately?  Why is it not LGPL/MIT like the rest of the library? ===&lt;br /&gt;
Originally that documentation was only to be available as a PDF file intended for self-printing into a mini-book, and the &amp;quot;this work&amp;quot; portion of the license notification applies to the text of that book; the documentation is considered a separate work from the code / library itself, and so it licensed separately.&lt;br /&gt;
&lt;br /&gt;
=== How much does CEGUI cost? ===&lt;br /&gt;
Nothing. The use of CEGUI is totally free within the bounds of the license as described above.&lt;br /&gt;
&lt;br /&gt;
=== I am developing a commercial, closed-source product. Should i use the 0.4 or 0.5 version of the library? ===&lt;br /&gt;
When you are creating a product for PC, where it is possible for users to update any of your used third-party DLL's (a requirement for LGPL), you can choose both versions. However if you are shipping a product on a read-only device, such as a console DVD, you must use 0.5 or higher, because the MIT license does not require that users can update anything.&lt;br /&gt;
&lt;br /&gt;
However before deciding, do always carefully check the mentioned licenses to make sure that your project doesn't do something uncommon.&lt;br /&gt;
&lt;br /&gt;
=== I am not happy with the LGPL / MIT license, do you offer alternative licensing? ===&lt;br /&gt;
No. Alternative licensing is not available, nor is it planned. But you won't find anything much less restrictive then the MIT license.&lt;br /&gt;
&lt;br /&gt;
=== Does CEGUI rely upon any third party libraries? If so what are they? ===&lt;br /&gt;
CEGUI currently depends upon the following external libraries:&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; &lt;br /&gt;
|| '''Library''' || '''Required''' || '''Url''' || '''License''' &lt;br /&gt;
|- &lt;br /&gt;
|| FreeType2 || yes || [http://www.freetype.org/freetype2/index.html http://www.freetype.org/freetype2/index.html] || BSD-like [http://www.freetype.org/FTL.TXT FreeType License] ou [http://www.freetype.org/GPL.TXT GPL] &lt;br /&gt;
|-&lt;br /&gt;
|| Perl C Regular Expression || yes || [http://www.pcre.org/ http://www.pcre.org/] || [http://www.pcre.org/license.txt BSD]&lt;br /&gt;
|-&lt;br /&gt;
|| Xerces-C++ || no || [http://xerces.apache.org/ http://xerces.apache.org/] || [http://www.apache.org/licenses/LICENSE-2.0.html  Apache Software License, Version 2.0]&lt;br /&gt;
|-&lt;br /&gt;
|| Expat || no || [http://expat.sourceforge.net/ http://expat.sourceforge.net/] || [http://www.opensource.org/licenses/mit-license.html MIT]&lt;br /&gt;
|-&lt;br /&gt;
|| Libxml || no ||  [http://www.xmlsoft.org/ http://www.xmlsoft.org/] || [http://www.opensource.org/licenses/mit-license.html MIT]&lt;br /&gt;
|-&lt;br /&gt;
|| DevIL || no ||  [http://openil.sourceforge.net/ http://openil.sourceforge.net/] || [http://openil.sourceforge.net/license.php  LGPL License Version 2.1] &lt;br /&gt;
|}&lt;br /&gt;
You will also require a supported rendering system, and some form of input library.&lt;br /&gt;
&lt;br /&gt;
=== Do I have to compile the third part libraries myself? ===&lt;br /&gt;
It depends. Under Linux and similar systems, you will need to perform your own compilation. For Microsoft® Windows® users, we have supplied packages containing binary versions of the libraries for a selection of popular compiler configurations. See the &amp;quot;Current Releases&amp;quot; on the home page.&lt;br /&gt;
&lt;br /&gt;
=== You mentioned something about &amp;quot;supported rendering systems&amp;quot;, what's that all about and which systems are supported? ===&lt;br /&gt;
CEGUI can be used with various rendering systems. There are currently CEGUI renderer modules for Microsoft® DirectX® 8.1 and 9, OpenGL, the Ogre engine, and the Irrlicht engine.&lt;br /&gt;
&lt;br /&gt;
=== There is no renderer module for my rendering engine or API of choice, will other rendering system be supported? ===&lt;br /&gt;
It is likely that, over time, CEGUI will add support for other APIs and engines. Having said this, it is fairly simple to write your own renderer module for CEGUI, so you might consider taking that option if you do not want to wait.&lt;br /&gt;
&lt;br /&gt;
=== And what about input libraries? ===&lt;br /&gt;
CEGUI requires you to ''inject'' inputs into it, these inputs can come from any source that you choose. All you need to do is pass mouse movements, mouse button up and down events, and keyboard inputs to CEGUI.&lt;br /&gt;
&lt;br /&gt;
=== Why doesn't CEGUI collect its own inputs? Why do I need to inject the inputs myself? ===&lt;br /&gt;
CEGUI does not collect its own input so that the system can remain as flexible as possible. We don't want to tie people down to one system or input library.&lt;br /&gt;
&lt;br /&gt;
=== I have seen mention of a Lua scripting module, how can I get this? ===&lt;br /&gt;
The Lua scripting module is provided with CEGUI and resides in the same source repository. Downloading CEGUI binary/source/svn will get you everything you need.&lt;br /&gt;
&lt;br /&gt;
=== What is the Mk-1 version of CEGUI? ===&lt;br /&gt;
The Mk-1 version was a Windows®/DirectX® only library and was really a dry run for what became the Mk-2 system. There was only ever 'alpha' versions of the Mk-1 code, and it is now considered obselete and is not supported.  &lt;br /&gt;
&lt;br /&gt;
=== I am having major troubles integrating CEGUI with my project, will you do it for me? ===&lt;br /&gt;
No. The CEGUI developers have enough to do without writing users projects for them. Refer to the Howto's and Tutorials from the home page.&lt;br /&gt;
&lt;br /&gt;
=== I have (or think I have) found a bug. How should I proceed? ===&lt;br /&gt;
If you are certain that it's a bug and not, for example, a misunderstanding of what is happening, then the bug should be reported via the [http://www.cegui.org.uk/mantis/index.php | Mantis Tracker] However, before submitting a bug to the tracker, it is asked that you first do a quick search to see if the bug has already been reported. If you are unsure whether something is a bug or not, then it may be discussed on the web site forums prior to submitting a bug report to the project bug tracker.&lt;br /&gt;
&lt;br /&gt;
=== I notice that feature/widget 'X' is missing. Will this be added to CEGUI? ===&lt;br /&gt;
Requests for new features and/or widgets are welcomed in this forum: http://www.cegui.org.uk/phpBB2/viewforum.php?f=3&amp;amp;sid=587eedf3463c00490686f8cddc61a257&lt;br /&gt;
This is the best way because most people will read it, including the team. This helps others to give input as well, which migth result in clearly defined requests.&lt;br /&gt;
&lt;br /&gt;
Note that no promises are made with regards to which features will and will not be added, or how long such things will take, but all requests will be seriously considered.&lt;br /&gt;
&lt;br /&gt;
=== How can I get involved with CEGUI development? ===&lt;br /&gt;
Each new member gets added by invitation by the current team. Most probably because that person has contributed some valuable patches, or is of great help in the forums. It will of course depend on the current state of the project to know which positions are required.&lt;br /&gt;
&lt;br /&gt;
So the best way to become involved is to show your face at the web site forums, the irc channel, and state what your intentions are (to help in avoiding duplicated effort), thereby becoming a constructive individual for CEGUI and its community.&lt;br /&gt;
&lt;br /&gt;
=== Is there managed code / Microsoft .Net support for the CEGUI library? ===&lt;br /&gt;
Yes, there is ''ceguisharp'' at http://ceguisharp.sourceforge.net/ This is a C# port of the library which will support Managed Direct 3D, OpenGL, as well as higher-level engines such as the excellent Axiom rendering engine.&lt;br /&gt;
&lt;br /&gt;
=== This FAQ doesn't answer my question, what should I do now? ===&lt;br /&gt;
Feel free to post your question on the web site forums, somebody will gladly answer your question and/or offer further advice.&lt;br /&gt;
&lt;br /&gt;
== Building CEGUI ==&lt;br /&gt;
&lt;br /&gt;
This section has moved to [http://www.cegui.org.uk/wiki/index.php/HOWTO:_Obtain_the_library_source_from_subversion New location]&lt;br /&gt;
&lt;br /&gt;
== Usage Questions ==&lt;br /&gt;
''(This whole section should be moved to a Tutorial or a Howto).''&lt;br /&gt;
=== What is the correct way to subscribe for an event? ===&lt;br /&gt;
Event notification is a vital aspect of GUI programming. CEGUI handles those using subscribers.&lt;br /&gt;
In order to subscribe a window for an event, you have to call the method 'Window::subscribeEvent', passing the function&lt;br /&gt;
to be called when the specified event occurs, and the instance on which the method is called.&lt;br /&gt;
&lt;br /&gt;
 class MyButtonHandler&lt;br /&gt;
 {&lt;br /&gt;
 private:&lt;br /&gt;
     PushButton* mButton;&lt;br /&gt;
 &lt;br /&gt;
 public:&lt;br /&gt;
     MyButtonHandler::MyButtonHandler(PushButton* btn) : mButton(btn)&lt;br /&gt;
     {&lt;br /&gt;
         btn-&amp;gt;subscribeEvent(PushButton::EventClicked, Event::Subscriber(&amp;amp;MyButtonHandler::ButtonClicked,this));&lt;br /&gt;
     }&lt;br /&gt;
     &lt;br /&gt;
     bool MyButtonHandler::ButtonClicked(const EventArgs&amp;amp;)&lt;br /&gt;
     {&lt;br /&gt;
         //This function gets called when the button is clicked&lt;br /&gt;
         std::cout &amp;lt;&amp;lt; &amp;quot;Button clicked&amp;quot; &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
The 'subscribeEvent' method returns an Event::Connection, which can be used later to unsubscribe for a registered event with&lt;br /&gt;
the 'disconnect' method.&lt;br /&gt;
&lt;br /&gt;
 Event::Connection myCon = btn-&amp;gt;subscribeEvent(...);&lt;br /&gt;
 &lt;br /&gt;
 ...&lt;br /&gt;
 &lt;br /&gt;
 myCon-&amp;gt;disconnect();&lt;br /&gt;
&lt;br /&gt;
In order to totally remove the event itself, you have to call the 'removeEvent' function:&lt;br /&gt;
all the connections to the specified event will be disconnected. &lt;br /&gt;
There's also an Event::ScopedConnection, which can be used to auto-unsubscribe when the event goes out of scope.&lt;br /&gt;
&lt;br /&gt;
Similar way for the scripted events, which can be subscribed with the 'subscribeScriptedEvent' method.&lt;br /&gt;
In addition, you can do it in XML, using this syntax:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Event Name=&amp;quot;Clicked&amp;quot; Function=&amp;quot;luabtn_clicked&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== How can I make the ListBox highlight the selected item? ===&lt;br /&gt;
In order to highlight selected items you need to set selection brush image and the selection colours of that item. The selection image is modulated by the colours you set. Note, that the alpha component needs to be smaller than 1.0, for the content of the selected item to be seen.&lt;br /&gt;
 // set selection highlight to a half transparent blue to red gradient.&lt;br /&gt;
 colour blue(0.0, 0.0, 1.0, 0.5);&lt;br /&gt;
 colour red(1.0, 0.0, 0.0, 0.5);&lt;br /&gt;
 myListBoxItem-&amp;gt;setSelectionColours(blue, blue, red, red);&lt;br /&gt;
 // this default image is a simple white rectangle&lt;br /&gt;
 myListBoxItem-&amp;gt;setSelectionBrushImage(&amp;quot;TaharezLook&amp;quot;, &amp;quot;ListboxSelectionBrush&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
=== How can I remove the border of a StaticImage? ===&lt;br /&gt;
Either put the following property into the window definition:&lt;br /&gt;
 &amp;lt;Property Name=&amp;quot;FrameEnabled&amp;quot; Value=&amp;quot;false&amp;quot; /&amp;gt;&lt;br /&gt;
Or set it by code:&lt;br /&gt;
 myStaticImage-&amp;gt;setFrameEnabled(false);&lt;br /&gt;
&lt;br /&gt;
=== How can I set the background of a StaticImage? ===&lt;br /&gt;
The first thing you need in order to do this is an Imageset that defines the Image that you wish to use. When wanting to use an image file for this as you suggest, you basically have an imageset defined like this:&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
 &amp;lt;Imageset Name=&amp;quot;BackdropImageset&amp;quot; Imagefile=&amp;quot;backdrop.tga&amp;quot; NativeHorzRes=&amp;quot;1024&amp;quot; NativeVertRes=&amp;quot;768&amp;quot; AutoScaled=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
 	&amp;lt;Image Name=&amp;quot;Backdrop&amp;quot; XPos=&amp;quot;0&amp;quot; YPos=&amp;quot;0&amp;quot; Width=&amp;quot;1024&amp;quot; Height=&amp;quot;768&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;/Imageset&amp;gt;&lt;br /&gt;
&lt;br /&gt;
What this does is define an Imageset using the backdrop.tga. A single image &amp;quot;Backdrop&amp;quot; is defined that starts at location (0,0) and is 1024 x 768 in size. You should be careful in that the source image file should have dimensions that are powers of two - this is because the image is loaded as a texture, and may be stretched if the powers-of-two requirement is not observed.&amp;lt;br&amp;gt;&lt;br /&gt;
Once you have your imageset defined, you can load it either by adding a reference to it in whichever scheme you are loading, or manually using the ImagesetManager:&lt;br /&gt;
 CEGUI::ImagesetManager::getSingleton().createImageset(&amp;quot;myImageset.imagset&amp;quot;);&lt;br /&gt;
Once the thing is loaded, you set the image into the StaticImage like so:&lt;br /&gt;
 myStaticImage-&amp;gt;setImage(&amp;quot;BackdropImageset&amp;quot;, &amp;quot;Backdrop&amp;quot;);&lt;br /&gt;
Notice that the names we specify here are the ones that were originally specified in the imageset XML file.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== I can't see the items I've added to my Combobox, how do I get the list to show when I press the button? ===&lt;br /&gt;
The height you specify for the combobox widget includes the height of the drop down list; it's not just for the 'Editbox' portion of the widget (the height of which  is usually automatically determined based upon the font).  Ensure that when specifying the height for your combobox, you have provided sufficient space for the list to appear.&lt;br /&gt;
&lt;br /&gt;
=== What properties are available for use in XML layouts, and what format do I use for the value strings? ===&lt;br /&gt;
If you start at the documentation for the base Property class ([http://www.cegui.org.uk/api_reference/classCEGUI_1_1Property.html Property base]), you will get an inheritance diagram showing all properties in the system. When you click one, you'll get its page. Each page has a description of the format in which you should provide its value.&lt;br /&gt;
&lt;br /&gt;
Besides, as an overview, each widget has its properties placed within an appropriately named C++ namespace within the [http://www.cegui.org.uk/api_reference/namespaces.html namespaces section of the API reference].&lt;br /&gt;
&lt;br /&gt;
Also, remember that properties are inherited.  So for example, when looking up properties for a PushButton, also check the properties for ButtonBase and Window too - since these properties are also available to you.&lt;br /&gt;
&lt;br /&gt;
An [http://www.cegui.org.uk/wiki/index.php/SetProperty overview of all properties of every widget], with a short description of each property has been automatically generated by [http://www.cegui.org.uk/wiki/index.php?title=PropertyFinder Rackle's PropertFinder]&lt;br /&gt;
&lt;br /&gt;
=== (How) can I create a menu ? ===&lt;br /&gt;
Read this [http://www.cegui.org.uk/wiki/index.php?title=MenuAndPopup article] about creating menus, submenus and popup menus, including some code.&lt;/div&gt;</summary>
		<author><name>Rackle</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=Moving_any_Window&amp;diff=2715</id>
		<title>Moving any Window</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=Moving_any_Window&amp;diff=2715"/>
				<updated>2007-09-13T16:54:09Z</updated>
		
		<summary type="html">&lt;p&gt;Rackle: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Introduction ===&lt;br /&gt;
This bit of code shows how you can play with the Cegui events to move any window, not just FrameWindows.&lt;br /&gt;
&lt;br /&gt;
The current implementation listens for a right mouse click.  When a CEGUI::Window* is right clicked it is flagged as being a &amp;quot;moving window&amp;quot;.  The GUI Sheet then subscribes to mouse move events, and upon a mouse movement event the &amp;quot;moving window&amp;quot;'s position is changed appropriately.  Right clicking again releases the window.&lt;br /&gt;
&lt;br /&gt;
A better implementation would be to have a border around the edge of the window.  When the cursor would be positioned above that border it would display a moving cursor.  Dragging (pressing down and holding the left mouse button) while above that border would move the window around.&lt;br /&gt;
&lt;br /&gt;
=== Files ===&lt;br /&gt;
==== MovingAnyWindow.h ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
#ifndef _00MovingAnyWindow_h_&lt;br /&gt;
#define _00MovingAnyWindow_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;
class DemoSample : public CEGuiSample&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
    // method to initialise the sample windows and events.&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;
			Scheme* currentScheme = 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;
			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;
			// Initially we are not moving any window&lt;br /&gt;
			mMovingWindow = 0;&lt;br /&gt;
&lt;br /&gt;
			// We have not yet clicked on the button&lt;br /&gt;
			mClickCount = 0;&lt;br /&gt;
&lt;br /&gt;
			// Create a button&lt;br /&gt;
			PushButton* pushButton = static_cast&amp;lt;PushButton*&amp;gt;(winMgr.createWindow(&amp;quot;TaharezLook/Button&amp;quot;, &amp;quot;Pushbutton&amp;quot;));&lt;br /&gt;
			sheet-&amp;gt;addChildWindow(pushButton);&lt;br /&gt;
			pushButton-&amp;gt;setPosition(UVector2(cegui_reldim(0.81f), cegui_reldim( 0.32f)));&lt;br /&gt;
			pushButton-&amp;gt;setSize(UVector2(cegui_reldim(0.15f), cegui_reldim( 0.2f)));&lt;br /&gt;
			pushButton-&amp;gt;setText(&amp;quot;Click&amp;quot;);&lt;br /&gt;
			pushButton-&amp;gt;subscribeEvent(CEGUI::PushButton::EventMouseClick, Event::Subscriber(&amp;amp;DemoSample::onRightClick,	this));&lt;br /&gt;
			pushButton-&amp;gt;subscribeEvent(CEGUI::PushButton::EventClicked, Event::Subscriber(&amp;amp;DemoSample::onLeftClick,		this));&lt;br /&gt;
&lt;br /&gt;
			// Create a multicolum list&lt;br /&gt;
			MultiColumnList* mcl = static_cast&amp;lt;MultiColumnList*&amp;gt;(winMgr.createWindow(&amp;quot;TaharezLook/MultiColumnList&amp;quot;, &amp;quot;MultiColumnList&amp;quot;));&lt;br /&gt;
			sheet-&amp;gt;addChildWindow(mcl);&lt;br /&gt;
			mcl-&amp;gt;setPosition(UVector2(cegui_reldim(0.01f), cegui_reldim( 0.1f)));&lt;br /&gt;
			mcl-&amp;gt;setSize(UVector2(cegui_reldim(0.5f), cegui_reldim( 0.8f)));&lt;br /&gt;
			mcl-&amp;gt;subscribeEvent(CEGUI::MultiColumnList::EventMouseClick, Event::Subscriber(&amp;amp;DemoSample::onRightClick,	this));&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;
    // method to perform any required cleanup operations.&lt;br /&gt;
    void cleanupSample(void)&lt;br /&gt;
	{&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool onRightClick(const CEGUI::EventArgs&amp;amp; pEventArgs)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		const MouseEventArgs mouseEventArgs = static_cast&amp;lt;const MouseEventArgs&amp;amp;&amp;gt;(pEventArgs);&lt;br /&gt;
		if(mouseEventArgs.button == CEGUI::RightButton)&lt;br /&gt;
		{&lt;br /&gt;
			if(mMovingWindow)&lt;br /&gt;
			{&lt;br /&gt;
				// We were moving a window, stop doing so on a second right click&lt;br /&gt;
				mMovingEvent-&amp;gt;disconnect();&lt;br /&gt;
				mMovingWindow = 0;&lt;br /&gt;
			}&lt;br /&gt;
			else&lt;br /&gt;
			{&lt;br /&gt;
				// Start moving a window when right clicking&lt;br /&gt;
				const WindowEventArgs windowEventArgs = static_cast&amp;lt;const WindowEventArgs&amp;amp;&amp;gt;(pEventArgs);&lt;br /&gt;
				mMovingWindow = windowEventArgs.window;&lt;br /&gt;
				mMovingEvent = System::getSingleton().getGUISheet()-&amp;gt;subscribeEvent(CEGUI::Window::EventMouseMove, Event::Subscriber(&amp;amp;DemoSample::onWindowMove,	this));&lt;br /&gt;
				mMousePosInWindow = CoordConverter::screenToWindow(*mMovingWindow, MouseCursor::getSingleton().getPosition());&lt;br /&gt;
			}&lt;br /&gt;
			return false; // Do not propagate this event to other subscribers&lt;br /&gt;
		}&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool onLeftClick(const CEGUI::EventArgs&amp;amp; pEventArgs)&lt;br /&gt;
	{&lt;br /&gt;
		// This is to check that the event is not propagated&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		const WindowEventArgs windowEventArgs = static_cast&amp;lt;const WindowEventArgs&amp;amp;&amp;gt;(pEventArgs);&lt;br /&gt;
		++mClickCount;&lt;br /&gt;
		windowEventArgs.window-&amp;gt;setText(&amp;quot;Click &amp;quot; + CEGUI::PropertyHelper::intToString(mClickCount));&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool onWindowMove(const CEGUI::EventArgs&amp;amp; pEventArgs)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		const MouseEventArgs mouseEventArgs = static_cast&amp;lt;const MouseEventArgs&amp;amp;&amp;gt;(pEventArgs);&lt;br /&gt;
		Vector2 localMousePos = CoordConverter::screenToWindow(*mMovingWindow, mouseEventArgs.position);&lt;br /&gt;
        UVector2 mouseMoveOffset(cegui_absdim(localMousePos.d_x), cegui_absdim(localMousePos.d_y));&lt;br /&gt;
		UVector2 mouseOffsetInWindow(cegui_absdim(mMousePosInWindow.d_x), cegui_absdim(mMousePosInWindow.d_y));&lt;br /&gt;
		mMovingWindow-&amp;gt;setPosition(mMovingWindow-&amp;gt;getPosition() + mouseMoveOffset - mouseOffsetInWindow);&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
	CEGUI::Window* mMovingWindow;&lt;br /&gt;
	CEGUI::Event::Connection mMovingEvent;&lt;br /&gt;
	CEGUI::Vector2 mMousePosInWindow;&lt;br /&gt;
	int mClickCount;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#endif  // _00MovingAnyWindow_h_&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== main.cpp ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&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;MovingAnyWindow.h&amp;quot;&lt;br /&gt;
&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;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rackle</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=Moving_any_Window&amp;diff=2714</id>
		<title>Moving any Window</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=Moving_any_Window&amp;diff=2714"/>
				<updated>2007-09-13T16:49:52Z</updated>
		
		<summary type="html">&lt;p&gt;Rackle: Fixed the problem with right-click not activating the move mode&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Introduction ===&lt;br /&gt;
This bit of code shows how you can play with the Cegui events to move any window, not just FrameWindows.&lt;br /&gt;
&lt;br /&gt;
The current implementation listens for a left mouse click.  When a CEGUI::Window* is clicked it is flagged as being a &amp;quot;moving window&amp;quot;.  The GUI Sheet then subscribes to mouse move events, and upon a mouse movement the &amp;quot;moving window&amp;quot;'s position is changed.  Left clicking again releases the window.&lt;br /&gt;
&lt;br /&gt;
=== Files ===&lt;br /&gt;
==== MovingAnyWindow.h ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
#ifndef _00MovingAnyWindow_h_&lt;br /&gt;
#define _00MovingAnyWindow_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;
class DemoSample : public CEGuiSample&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
    // method to initialise the sample windows and events.&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;
			Scheme* currentScheme = 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;
			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;
			// Initially we are not moving any window&lt;br /&gt;
			mMovingWindow = 0;&lt;br /&gt;
&lt;br /&gt;
			// We have not yet clicked on the button&lt;br /&gt;
			mClickCount = 0;&lt;br /&gt;
&lt;br /&gt;
			// Create a button&lt;br /&gt;
			PushButton* pushButton = static_cast&amp;lt;PushButton*&amp;gt;(winMgr.createWindow(&amp;quot;TaharezLook/Button&amp;quot;, &amp;quot;Pushbutton&amp;quot;));&lt;br /&gt;
			sheet-&amp;gt;addChildWindow(pushButton);&lt;br /&gt;
			pushButton-&amp;gt;setPosition(UVector2(cegui_reldim(0.81f), cegui_reldim( 0.32f)));&lt;br /&gt;
			pushButton-&amp;gt;setSize(UVector2(cegui_reldim(0.15f), cegui_reldim( 0.2f)));&lt;br /&gt;
			pushButton-&amp;gt;setText(&amp;quot;Click&amp;quot;);&lt;br /&gt;
			pushButton-&amp;gt;subscribeEvent(CEGUI::PushButton::EventMouseClick, Event::Subscriber(&amp;amp;DemoSample::onRightClick,	this));&lt;br /&gt;
			pushButton-&amp;gt;subscribeEvent(CEGUI::PushButton::EventClicked, Event::Subscriber(&amp;amp;DemoSample::onLeftClick,		this));&lt;br /&gt;
&lt;br /&gt;
			// Create a multicolum list&lt;br /&gt;
			MultiColumnList* mcl = static_cast&amp;lt;MultiColumnList*&amp;gt;(winMgr.createWindow(&amp;quot;TaharezLook/MultiColumnList&amp;quot;, &amp;quot;MultiColumnList&amp;quot;));&lt;br /&gt;
			sheet-&amp;gt;addChildWindow(mcl);&lt;br /&gt;
			mcl-&amp;gt;setPosition(UVector2(cegui_reldim(0.01f), cegui_reldim( 0.1f)));&lt;br /&gt;
			mcl-&amp;gt;setSize(UVector2(cegui_reldim(0.5f), cegui_reldim( 0.8f)));&lt;br /&gt;
			mcl-&amp;gt;subscribeEvent(CEGUI::MultiColumnList::EventMouseClick, Event::Subscriber(&amp;amp;DemoSample::onRightClick,	this));&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;
    // method to perform any required cleanup operations.&lt;br /&gt;
    void cleanupSample(void)&lt;br /&gt;
	{&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool onRightClick(const CEGUI::EventArgs&amp;amp; pEventArgs)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		const MouseEventArgs mouseEventArgs = static_cast&amp;lt;const MouseEventArgs&amp;amp;&amp;gt;(pEventArgs);&lt;br /&gt;
		if(mouseEventArgs.button == CEGUI::RightButton)&lt;br /&gt;
		{&lt;br /&gt;
			if(mMovingWindow)&lt;br /&gt;
			{&lt;br /&gt;
				// We were moving a window, stop doing so on a second right click&lt;br /&gt;
				mMovingEvent-&amp;gt;disconnect();&lt;br /&gt;
				mMovingWindow = 0;&lt;br /&gt;
			}&lt;br /&gt;
			else&lt;br /&gt;
			{&lt;br /&gt;
				// Start moving a window when right clicking&lt;br /&gt;
				const WindowEventArgs windowEventArgs = static_cast&amp;lt;const WindowEventArgs&amp;amp;&amp;gt;(pEventArgs);&lt;br /&gt;
				mMovingWindow = windowEventArgs.window;&lt;br /&gt;
				mMovingEvent = System::getSingleton().getGUISheet()-&amp;gt;subscribeEvent(CEGUI::Window::EventMouseMove, Event::Subscriber(&amp;amp;DemoSample::onWindowMove,	this));&lt;br /&gt;
				mMousePosInWindow = CoordConverter::screenToWindow(*mMovingWindow, MouseCursor::getSingleton().getPosition());&lt;br /&gt;
			}&lt;br /&gt;
			return false; // Do not propagate this event to other subscribers&lt;br /&gt;
		}&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool onLeftClick(const CEGUI::EventArgs&amp;amp; pEventArgs)&lt;br /&gt;
	{&lt;br /&gt;
		// This is to check that the event is not propagated&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		const WindowEventArgs windowEventArgs = static_cast&amp;lt;const WindowEventArgs&amp;amp;&amp;gt;(pEventArgs);&lt;br /&gt;
		++mClickCount;&lt;br /&gt;
		windowEventArgs.window-&amp;gt;setText(&amp;quot;Click &amp;quot; + CEGUI::PropertyHelper::intToString(mClickCount));&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool onWindowMove(const CEGUI::EventArgs&amp;amp; pEventArgs)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		const MouseEventArgs mouseEventArgs = static_cast&amp;lt;const MouseEventArgs&amp;amp;&amp;gt;(pEventArgs);&lt;br /&gt;
		Vector2 localMousePos = CoordConverter::screenToWindow(*mMovingWindow, mouseEventArgs.position);&lt;br /&gt;
        UVector2 mouseMoveOffset(cegui_absdim(localMousePos.d_x), cegui_absdim(localMousePos.d_y));&lt;br /&gt;
		UVector2 mouseOffsetInWindow(cegui_absdim(mMousePosInWindow.d_x), cegui_absdim(mMousePosInWindow.d_y));&lt;br /&gt;
		mMovingWindow-&amp;gt;setPosition(mMovingWindow-&amp;gt;getPosition() + mouseMoveOffset - mouseOffsetInWindow);&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
	CEGUI::Window* mMovingWindow;&lt;br /&gt;
	CEGUI::Event::Connection mMovingEvent;&lt;br /&gt;
	CEGUI::Vector2 mMousePosInWindow;&lt;br /&gt;
	int mClickCount;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#endif  // _00MovingAnyWindow_h_&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== main.cpp ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&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;MovingAnyWindow.h&amp;quot;&lt;br /&gt;
&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;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rackle</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=Moving_any_Window&amp;diff=2713</id>
		<title>Moving any Window</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=Moving_any_Window&amp;diff=2713"/>
				<updated>2007-09-13T16:38:09Z</updated>
		
		<summary type="html">&lt;p&gt;Rackle: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Introduction ===&lt;br /&gt;
This bit of code shows how you can play with the Cegui events to move any window, not just FrameWindows.&lt;br /&gt;
&lt;br /&gt;
The current implementation listens for a left mouse click.  When a CEGUI::Window* is clicked it is flagged as being a &amp;quot;moving window&amp;quot;.  The GUI Sheet then subscribes to mouse move events, and upon a mouse movement the &amp;quot;moving window&amp;quot;'s position is changed.  Left clicking again releases the window.&lt;br /&gt;
&lt;br /&gt;
There is a problem with this implementation.  I tried to use a right-click as the trigger but could not.  There may be a problem with the way mouse clicks are injected or with my code.&lt;br /&gt;
&lt;br /&gt;
=== Files ===&lt;br /&gt;
==== MovingAnyWindow.h ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
#ifndef _00MovingAnyWindow_h_&lt;br /&gt;
#define _00MovingAnyWindow_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;
class DemoSample : public CEGuiSample&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
    // method to initialise the sample windows and events.&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;
			Scheme* currentScheme = 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;
			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;
			// Initially we are not moving any window&lt;br /&gt;
			mMovingWindow = 0;&lt;br /&gt;
&lt;br /&gt;
			// We have not yet clicked on the button&lt;br /&gt;
			mClickCount = 0;&lt;br /&gt;
&lt;br /&gt;
			// Create a button&lt;br /&gt;
			PushButton* pushButton = static_cast&amp;lt;PushButton*&amp;gt;(winMgr.createWindow(&amp;quot;TaharezLook/Button&amp;quot;, &amp;quot;Pushbutton&amp;quot;));&lt;br /&gt;
			sheet-&amp;gt;addChildWindow(pushButton);&lt;br /&gt;
			pushButton-&amp;gt;setPosition(UVector2(cegui_reldim(0.81f), cegui_reldim( 0.32f)));&lt;br /&gt;
			pushButton-&amp;gt;setSize(UVector2(cegui_reldim(0.15f), cegui_reldim( 0.2f)));&lt;br /&gt;
			pushButton-&amp;gt;setText(&amp;quot;Click&amp;quot;);&lt;br /&gt;
			pushButton-&amp;gt;subscribeEvent(CEGUI::PushButton::EventClicked, Event::Subscriber(&amp;amp;DemoSample::onRightClick,	this));&lt;br /&gt;
			pushButton-&amp;gt;subscribeEvent(CEGUI::PushButton::EventClicked, Event::Subscriber(&amp;amp;DemoSample::onLeftClick,		this));&lt;br /&gt;
&lt;br /&gt;
			// Create a multicolum list&lt;br /&gt;
			MultiColumnList* mcl = static_cast&amp;lt;MultiColumnList*&amp;gt;(winMgr.createWindow(&amp;quot;TaharezLook/MultiColumnList&amp;quot;, &amp;quot;MultiColumnList&amp;quot;));&lt;br /&gt;
			sheet-&amp;gt;addChildWindow(mcl);&lt;br /&gt;
			mcl-&amp;gt;setPosition(UVector2(cegui_reldim(0.01f), cegui_reldim( 0.1f)));&lt;br /&gt;
			mcl-&amp;gt;setSize(UVector2(cegui_reldim(0.5f), cegui_reldim( 0.8f)));&lt;br /&gt;
			mcl-&amp;gt;subscribeEvent(CEGUI::MultiColumnList::EventMouseClick, Event::Subscriber(&amp;amp;DemoSample::onRightClick,	this));&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;
    // method to perform any required cleanup operations.&lt;br /&gt;
    void cleanupSample(void)&lt;br /&gt;
	{&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool onRightClick(const CEGUI::EventArgs&amp;amp; pEventArgs)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		const MouseEventArgs mouseEventArgs = static_cast&amp;lt;const MouseEventArgs&amp;amp;&amp;gt;(pEventArgs);&lt;br /&gt;
// Check if right click is injected properly because this never works&lt;br /&gt;
		if(true) // if(mouseEventArgs.button == CEGUI::RightButton)&lt;br /&gt;
		{&lt;br /&gt;
			if(mMovingWindow)&lt;br /&gt;
			{&lt;br /&gt;
				// We were moving a window, stop doing so on a second right click&lt;br /&gt;
				mMovingEvent-&amp;gt;disconnect();&lt;br /&gt;
				mMovingWindow = 0;&lt;br /&gt;
			}&lt;br /&gt;
			else&lt;br /&gt;
			{&lt;br /&gt;
				// Start moving a window when right clicking&lt;br /&gt;
				const WindowEventArgs windowEventArgs = static_cast&amp;lt;const WindowEventArgs&amp;amp;&amp;gt;(pEventArgs);&lt;br /&gt;
				mMovingWindow = windowEventArgs.window;&lt;br /&gt;
				mMovingEvent = System::getSingleton().getGUISheet()-&amp;gt;subscribeEvent(CEGUI::Window::EventMouseMove, Event::Subscriber(&amp;amp;DemoSample::onWindowMove,	this));&lt;br /&gt;
				mMousePosInWindow = CoordConverter::screenToWindow(*mMovingWindow, MouseCursor::getSingleton().getPosition());&lt;br /&gt;
			}&lt;br /&gt;
			return false; // Do not propagate this event to other subscribers&lt;br /&gt;
		}&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool onLeftClick(const CEGUI::EventArgs&amp;amp; pEventArgs)&lt;br /&gt;
	{&lt;br /&gt;
		// This is to check that the event is not propagated&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		const WindowEventArgs windowEventArgs = static_cast&amp;lt;const WindowEventArgs&amp;amp;&amp;gt;(pEventArgs);&lt;br /&gt;
		++mClickCount;&lt;br /&gt;
		windowEventArgs.window-&amp;gt;setText(&amp;quot;Click &amp;quot; + CEGUI::PropertyHelper::intToString(mClickCount));&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool onWindowMove(const CEGUI::EventArgs&amp;amp; pEventArgs)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		const MouseEventArgs mouseEventArgs = static_cast&amp;lt;const MouseEventArgs&amp;amp;&amp;gt;(pEventArgs);&lt;br /&gt;
		Vector2 localMousePos = CoordConverter::screenToWindow(*mMovingWindow, mouseEventArgs.position);&lt;br /&gt;
        UVector2 mouseMoveOffset(cegui_absdim(localMousePos.d_x), cegui_absdim(localMousePos.d_y));&lt;br /&gt;
		UVector2 mouseOffsetInWindow(cegui_absdim(mMousePosInWindow.d_x), cegui_absdim(mMousePosInWindow.d_y));&lt;br /&gt;
		mMovingWindow-&amp;gt;setPosition(mMovingWindow-&amp;gt;getPosition() + mouseMoveOffset - mouseOffsetInWindow);&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
	CEGUI::Window* mMovingWindow;&lt;br /&gt;
	CEGUI::Event::Connection mMovingEvent;&lt;br /&gt;
	CEGUI::Vector2 mMousePosInWindow;&lt;br /&gt;
	int mClickCount;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#endif  // _00MovingAnyWindow_h_&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== main.cpp ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&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;MovingAnyWindow.h&amp;quot;&lt;br /&gt;
&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;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rackle</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=Moving_any_Window&amp;diff=2712</id>
		<title>Moving any Window</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=Moving_any_Window&amp;diff=2712"/>
				<updated>2007-09-13T16:37:21Z</updated>
		
		<summary type="html">&lt;p&gt;Rackle: Fixed the initial movement of the window&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Introduction ===&lt;br /&gt;
This bit of code shows how you can play with the Cegui events to move any window, not just FrameWindows.&lt;br /&gt;
&lt;br /&gt;
The current implementation listens for a left mouse click.  When a CEGUI::Window* is clicked it is flagged as being a &amp;quot;moving window&amp;quot;.  The GUI Sheet then subscribes to mouse move events, and upon a mouse movement the &amp;quot;moving window&amp;quot;'s position is changed.  Left clicking again releases the window.&lt;br /&gt;
&lt;br /&gt;
There are two problems with this implementation.  I tried to use a right-click as the trigger but could not.  There may be a problem with the way mouse clicks are injected or with my code.  The second problem is that the CEGUI::Window* jumps when initially moved.  That's become I'm not taking into account the offset of the mouse within that window.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Files ===&lt;br /&gt;
==== MovingAnyWindow.h ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
#ifndef _00MovingAnyWindow_h_&lt;br /&gt;
#define _00MovingAnyWindow_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;
class DemoSample : public CEGuiSample&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
    // method to initialise the sample windows and events.&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;
			Scheme* currentScheme = 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;
			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;
			// Initially we are not moving any window&lt;br /&gt;
			mMovingWindow = 0;&lt;br /&gt;
&lt;br /&gt;
			// We have not yet clicked on the button&lt;br /&gt;
			mClickCount = 0;&lt;br /&gt;
&lt;br /&gt;
			// Create a button&lt;br /&gt;
			PushButton* pushButton = static_cast&amp;lt;PushButton*&amp;gt;(winMgr.createWindow(&amp;quot;TaharezLook/Button&amp;quot;, &amp;quot;Pushbutton&amp;quot;));&lt;br /&gt;
			sheet-&amp;gt;addChildWindow(pushButton);&lt;br /&gt;
			pushButton-&amp;gt;setPosition(UVector2(cegui_reldim(0.81f), cegui_reldim( 0.32f)));&lt;br /&gt;
			pushButton-&amp;gt;setSize(UVector2(cegui_reldim(0.15f), cegui_reldim( 0.2f)));&lt;br /&gt;
			pushButton-&amp;gt;setText(&amp;quot;Click&amp;quot;);&lt;br /&gt;
			pushButton-&amp;gt;subscribeEvent(CEGUI::PushButton::EventClicked, Event::Subscriber(&amp;amp;DemoSample::onRightClick,	this));&lt;br /&gt;
			pushButton-&amp;gt;subscribeEvent(CEGUI::PushButton::EventClicked, Event::Subscriber(&amp;amp;DemoSample::onLeftClick,		this));&lt;br /&gt;
&lt;br /&gt;
			// Create a multicolum list&lt;br /&gt;
			MultiColumnList* mcl = static_cast&amp;lt;MultiColumnList*&amp;gt;(winMgr.createWindow(&amp;quot;TaharezLook/MultiColumnList&amp;quot;, &amp;quot;MultiColumnList&amp;quot;));&lt;br /&gt;
			sheet-&amp;gt;addChildWindow(mcl);&lt;br /&gt;
			mcl-&amp;gt;setPosition(UVector2(cegui_reldim(0.01f), cegui_reldim( 0.1f)));&lt;br /&gt;
			mcl-&amp;gt;setSize(UVector2(cegui_reldim(0.5f), cegui_reldim( 0.8f)));&lt;br /&gt;
			mcl-&amp;gt;subscribeEvent(CEGUI::MultiColumnList::EventMouseClick, Event::Subscriber(&amp;amp;DemoSample::onRightClick,	this));&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;
    // method to perform any required cleanup operations.&lt;br /&gt;
    void cleanupSample(void)&lt;br /&gt;
	{&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool onRightClick(const CEGUI::EventArgs&amp;amp; pEventArgs)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		const MouseEventArgs mouseEventArgs = static_cast&amp;lt;const MouseEventArgs&amp;amp;&amp;gt;(pEventArgs);&lt;br /&gt;
// Check if right click is injected properly because this never works&lt;br /&gt;
		if(true) // if(mouseEventArgs.button == CEGUI::RightButton)&lt;br /&gt;
		{&lt;br /&gt;
			if(mMovingWindow)&lt;br /&gt;
			{&lt;br /&gt;
				// We were moving a window, stop doing so on a second right click&lt;br /&gt;
				mMovingEvent-&amp;gt;disconnect();&lt;br /&gt;
				mMovingWindow = 0;&lt;br /&gt;
			}&lt;br /&gt;
			else&lt;br /&gt;
			{&lt;br /&gt;
				// Start moving a window when right clicking&lt;br /&gt;
				const WindowEventArgs windowEventArgs = static_cast&amp;lt;const WindowEventArgs&amp;amp;&amp;gt;(pEventArgs);&lt;br /&gt;
				mMovingWindow = windowEventArgs.window;&lt;br /&gt;
				mMovingEvent = System::getSingleton().getGUISheet()-&amp;gt;subscribeEvent(CEGUI::Window::EventMouseMove, Event::Subscriber(&amp;amp;DemoSample::onWindowMove,	this));&lt;br /&gt;
				mMousePosInWindow = CoordConverter::screenToWindow(*mMovingWindow, MouseCursor::getSingleton().getPosition());&lt;br /&gt;
			}&lt;br /&gt;
			return false; // Do not propagate this event to other subscribers&lt;br /&gt;
		}&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool onLeftClick(const CEGUI::EventArgs&amp;amp; pEventArgs)&lt;br /&gt;
	{&lt;br /&gt;
		// This is to check that the event is not propagated&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		const WindowEventArgs windowEventArgs = static_cast&amp;lt;const WindowEventArgs&amp;amp;&amp;gt;(pEventArgs);&lt;br /&gt;
		++mClickCount;&lt;br /&gt;
		windowEventArgs.window-&amp;gt;setText(&amp;quot;Click &amp;quot; + CEGUI::PropertyHelper::intToString(mClickCount));&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool onWindowMove(const CEGUI::EventArgs&amp;amp; pEventArgs)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		const MouseEventArgs mouseEventArgs = static_cast&amp;lt;const MouseEventArgs&amp;amp;&amp;gt;(pEventArgs);&lt;br /&gt;
		Vector2 localMousePos = CoordConverter::screenToWindow(*mMovingWindow, mouseEventArgs.position);&lt;br /&gt;
        UVector2 mouseMoveOffset(cegui_absdim(localMousePos.d_x), cegui_absdim(localMousePos.d_y));&lt;br /&gt;
		UVector2 mouseOffsetInWindow(cegui_absdim(mMousePosInWindow.d_x), cegui_absdim(mMousePosInWindow.d_y));&lt;br /&gt;
		mMovingWindow-&amp;gt;setPosition(mMovingWindow-&amp;gt;getPosition() + mouseMoveOffset - mouseOffsetInWindow);&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
	CEGUI::Window* mMovingWindow;&lt;br /&gt;
	CEGUI::Event::Connection mMovingEvent;&lt;br /&gt;
	CEGUI::Vector2 mMousePosInWindow;&lt;br /&gt;
	int mClickCount;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#endif  // _00MovingAnyWindow_h_&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== main.cpp ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&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;MovingAnyWindow.h&amp;quot;&lt;br /&gt;
&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;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rackle</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=Template:CEGUIWikiWhatsNew&amp;diff=2711</id>
		<title>Template:CEGUIWikiWhatsNew</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=Template:CEGUIWikiWhatsNew&amp;diff=2711"/>
				<updated>2007-09-12T18:15:05Z</updated>
		
		<summary type="html">&lt;p&gt;Rackle: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Section|1=The last 5 additions to the wiki ([http://www.cegui.org.uk/wiki/index.php?title=Template:CEGUIWikiWhatsNew&amp;amp;action=edit edit])|2=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- In descending order (newest first, oldest last) --&amp;gt;&lt;br /&gt;
* Code Snippets: [[MovingAnyWindow]] : How to move any window, not just FrameWindow&lt;br /&gt;
* Code Snippets: [[GridLayout]] : A QT-like layout manager for CEGUI &amp;gt;= 0.5.0&lt;br /&gt;
* Tutorials: [[Cool_window_effects]] : A collection of cool &amp;quot;special&amp;quot; effects on (frame)windows. &lt;br /&gt;
* Code Snippets: [[MenuAndPopup]] : Menu and popup menu&lt;br /&gt;
* Code Snippets: [[PropertyFinder]] : Find the properties of every widget from any scheme&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
''To all wiki author, please edit this section when you add a new page to the wiki.''&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Rackle</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=Template:CEGUIWikiWhatsNew&amp;diff=2710</id>
		<title>Template:CEGUIWikiWhatsNew</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=Template:CEGUIWikiWhatsNew&amp;diff=2710"/>
				<updated>2007-09-12T18:14:33Z</updated>
		
		<summary type="html">&lt;p&gt;Rackle: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Section|1=The last 5 additions to the wiki ([http://www.cegui.org.uk/wiki/index.php?title=Template:CEGUIWikiWhatsNew&amp;amp;action=edit edit])|2=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- In descending order (newest first, oldest last) --&amp;gt;&lt;br /&gt;
* Code Snippets: [[MovingAnyWindow] : How to move any window, not just FrameWindow&lt;br /&gt;
* Code Snippets: [[GridLayout]] : A QT-like layout manager for CEGUI &amp;gt;= 0.5.0&lt;br /&gt;
* Tutorials: [[Cool_window_effects]] : A collection of cool &amp;quot;special&amp;quot; effects on (frame)windows. &lt;br /&gt;
* Code Snippets: [[MenuAndPopup]] : Menu and popup menu&lt;br /&gt;
* Code Snippets: [[PropertyFinder]] : Find the properties of every widget from any scheme&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
''To all wiki author, please edit this section when you add a new page to the wiki.''&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Rackle</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=Moving_any_Window&amp;diff=2709</id>
		<title>Moving any Window</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=Moving_any_Window&amp;diff=2709"/>
				<updated>2007-09-12T18:12:08Z</updated>
		
		<summary type="html">&lt;p&gt;Rackle: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Introduction ===&lt;br /&gt;
This bit of code shows how you can play with the Cegui events to move any window, not just FrameWindows.&lt;br /&gt;
&lt;br /&gt;
The current implementation listens for a left mouse click.  When a CEGUI::Window* is clicked it is flagged as being a &amp;quot;moving window&amp;quot;.  The GUI Sheet then subscribes to mouse move events, and upon a mouse movement the &amp;quot;moving window&amp;quot;'s position is changed.  Left clicking again releases the window.&lt;br /&gt;
&lt;br /&gt;
There are two problems with this implementation.  I tried to use a right-click as the trigger but could not.  There may be a problem with the way mouse clicks are injected or with my code.  The second problem is that the CEGUI::Window* jumps when initially moved.  That's become I'm not taking into account the offset of the mouse within that window.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Files ===&lt;br /&gt;
==== MovingAnyWindow.h ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
#ifndef _00MovingAnyWindow_h_&lt;br /&gt;
#define _00MovingAnyWindow_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;
class DemoSample : public CEGuiSample&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
    // method to initialise the sample windows and events.&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;
			Scheme* currentScheme = 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;
			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;
			// Initially we are not moving any window&lt;br /&gt;
			mMovingWindow = 0;&lt;br /&gt;
&lt;br /&gt;
			// We have not yet clicked on the button&lt;br /&gt;
			mClickCount = 0;&lt;br /&gt;
&lt;br /&gt;
			// Create a button&lt;br /&gt;
			PushButton* pushButton = static_cast&amp;lt;PushButton*&amp;gt;(winMgr.createWindow(&amp;quot;TaharezLook/Button&amp;quot;, &amp;quot;Pushbutton&amp;quot;));&lt;br /&gt;
			sheet-&amp;gt;addChildWindow(pushButton);&lt;br /&gt;
			pushButton-&amp;gt;setPosition(UVector2(cegui_reldim(0.81f), cegui_reldim( 0.32f)));&lt;br /&gt;
			pushButton-&amp;gt;setSize(UVector2(cegui_reldim(0.15f), cegui_reldim( 0.2f)));&lt;br /&gt;
			pushButton-&amp;gt;setText(&amp;quot;Click&amp;quot;);&lt;br /&gt;
			pushButton-&amp;gt;subscribeEvent(CEGUI::PushButton::EventClicked, Event::Subscriber(&amp;amp;DemoSample::onRightClick,	this));&lt;br /&gt;
			pushButton-&amp;gt;subscribeEvent(CEGUI::PushButton::EventClicked, Event::Subscriber(&amp;amp;DemoSample::onLeftClick,		this));&lt;br /&gt;
&lt;br /&gt;
			// Create a multicolum list&lt;br /&gt;
			MultiColumnList* mcl = static_cast&amp;lt;MultiColumnList*&amp;gt;(winMgr.createWindow(&amp;quot;TaharezLook/MultiColumnList&amp;quot;, &amp;quot;MultiColumnList&amp;quot;));&lt;br /&gt;
			sheet-&amp;gt;addChildWindow(mcl);&lt;br /&gt;
			mcl-&amp;gt;setPosition(UVector2(cegui_reldim(0.01f), cegui_reldim( 0.1f)));&lt;br /&gt;
			mcl-&amp;gt;setSize(UVector2(cegui_reldim(0.5f), cegui_reldim( 0.8f)));&lt;br /&gt;
			mcl-&amp;gt;subscribeEvent(CEGUI::MultiColumnList::EventMouseClick, Event::Subscriber(&amp;amp;DemoSample::onRightClick,	this));&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;
    // method to perform any required cleanup operations.&lt;br /&gt;
    void cleanupSample(void)&lt;br /&gt;
	{&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool onRightClick(const CEGUI::EventArgs&amp;amp; pEventArgs)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		const MouseEventArgs mouseEventArgs = static_cast&amp;lt;const MouseEventArgs&amp;amp;&amp;gt;(pEventArgs);&lt;br /&gt;
// Check if right click is injected properly because this never works&lt;br /&gt;
		if(true) // if(mouseEventArgs.button == CEGUI::RightButton)&lt;br /&gt;
		{&lt;br /&gt;
			if(mMovingWindow)&lt;br /&gt;
			{&lt;br /&gt;
				// We were moving a window, stop doing so on a second right click&lt;br /&gt;
				mMovingEvent-&amp;gt;disconnect();&lt;br /&gt;
				mMovingWindow = 0;&lt;br /&gt;
			}&lt;br /&gt;
			else&lt;br /&gt;
			{&lt;br /&gt;
				// Start moving a window when right clicking&lt;br /&gt;
				const WindowEventArgs windowEventArgs = static_cast&amp;lt;const WindowEventArgs&amp;amp;&amp;gt;(pEventArgs);&lt;br /&gt;
				mMovingWindow = windowEventArgs.window;&lt;br /&gt;
				mMovingEvent = System::getSingleton().getGUISheet()-&amp;gt;subscribeEvent(CEGUI::Window::EventMouseMove, Event::Subscriber(&amp;amp;DemoSample::onWindowMove,	this));&lt;br /&gt;
			}&lt;br /&gt;
			return false; // Do not propagate this event to other subscribers&lt;br /&gt;
		}&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool onLeftClick(const CEGUI::EventArgs&amp;amp; pEventArgs)&lt;br /&gt;
	{&lt;br /&gt;
		// This is to check that the event is not propagated&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		const WindowEventArgs windowEventArgs = static_cast&amp;lt;const WindowEventArgs&amp;amp;&amp;gt;(pEventArgs);&lt;br /&gt;
		++mClickCount;&lt;br /&gt;
		windowEventArgs.window-&amp;gt;setText(&amp;quot;Click &amp;quot; + CEGUI::PropertyHelper::intToString(mClickCount));&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool onWindowMove(const CEGUI::EventArgs&amp;amp; pEventArgs)&lt;br /&gt;
	{&lt;br /&gt;
		using namespace CEGUI;&lt;br /&gt;
		const MouseEventArgs mouseEventArgs = static_cast&amp;lt;const MouseEventArgs&amp;amp;&amp;gt;(pEventArgs);&lt;br /&gt;
		Vector2 localMousePos = CoordConverter::screenToWindow(*mMovingWindow, mouseEventArgs.position);&lt;br /&gt;
        UVector2 offset(cegui_absdim(localMousePos.d_x), cegui_absdim(localMousePos.d_y));&lt;br /&gt;
        mMovingWindow-&amp;gt;setPosition(mMovingWindow-&amp;gt;getPosition() + offset);&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
	CEGUI::Window* mMovingWindow;&lt;br /&gt;
	CEGUI::Event::Connection mMovingEvent;&lt;br /&gt;
	int mClickCount;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#endif  // _00MovingAnyWindow_h_&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== main.cpp ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&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;MovingAnyWindow.h&amp;quot;&lt;br /&gt;
&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;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rackle</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=Dialog_Configurations&amp;diff=2696</id>
		<title>Dialog Configurations</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=Dialog_Configurations&amp;diff=2696"/>
				<updated>2007-07-03T17:57:29Z</updated>
		
		<summary type="html">&lt;p&gt;Rackle: /* Configuration Attributes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Introduction ===&lt;br /&gt;
Dialogs (frame windows) can be moved around, resized, hidden, and rolled up while the application is running.  MultiColumnLists can have their columns rearranged, resized, and a column can sort its content in ascending or descending order.  However closing and then restarting the application will reset these settings to their default values, those specified within a .layout file if one was use, or those specified in code.&lt;br /&gt;
&lt;br /&gt;
This clases saves these attributes into an XML file.  When the application restarts the contents of the XML file will be read and the dialogs and MultiColumnLists will be restored to their last states.&lt;br /&gt;
&lt;br /&gt;
Please discuss this snippet in the [http://www.cegui.org.uk/phpBB2/viewtopic.php?p=8002#8002 Storing Dialog Configurations] thread on the message board.&lt;br /&gt;
&lt;br /&gt;
=== Incorporating into Sample_Demo7 ===&lt;br /&gt;
This demo contains 3 dialogs.  Let's store their configurations.&lt;br /&gt;
&lt;br /&gt;
Add DialogConfigurations.cpp to the Sample_Demo7 project.&lt;br /&gt;
&lt;br /&gt;
Edit Sample_Demo7.h:&lt;br /&gt;
* add '''#include &amp;quot;DialogConfigurations.h&amp;quot;'''&lt;br /&gt;
* add within the protected section: '''DialogConfigurations m_dialogConfigurations;'''&lt;br /&gt;
&lt;br /&gt;
Edit Sample_Demo7.cpp to add the following at the end of the Demo7Sample::initialiseSample() function, between ''initDemoEventWiring();'' and ''return true;'':&lt;br /&gt;
  m_dialogConfigurations.loadConfigurations(&amp;quot;../datafiles/configs/Sample_Demo7.xml&amp;quot;, &amp;quot;../datafiles/configs/DialogConfigurations.xsd&amp;quot;);&lt;br /&gt;
  m_dialogConfigurations.addDialog(&amp;quot;Demo7/Window1&amp;quot;);&lt;br /&gt;
  m_dialogConfigurations.addDialog(&amp;quot;Demo7/Window2&amp;quot;);&lt;br /&gt;
  m_dialogConfigurations.addDialog(&amp;quot;Demo7/Window3&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
Add the following to Demo7Sample::cleanupSample()&lt;br /&gt;
  m_dialogConfigurations.saveConfigurations();&lt;br /&gt;
&lt;br /&gt;
That's it!  From now on the 3 windows within that demo will &amp;quot;remember&amp;quot; their previous configurations.&lt;br /&gt;
&lt;br /&gt;
'''Warning:''' the Demo7Sample::cleanupSample() is never called when exiting the demo, despite what the comments might say.  A solution is presented on the  [http://www.cegui.org.uk/phpBB2/viewtopic.php?t=1550 message board].&lt;br /&gt;
&lt;br /&gt;
=== Configuration Attributes ===&lt;br /&gt;
The XML configuration file is loaded by a call to loadConfigurations().  It silently ignores errors within that XML file.  The worst that will happen is that some dialogs and MultiColumnLists will revert to their initial values.&lt;br /&gt;
&lt;br /&gt;
Calling addDialog() and passing the window name as parameter will register that dialog to have its configuration written to the XML file.  The next call to saveConfigurations() will write the configuration of that registered window such that the next time loadConfigurations() is called the window will be automatically registered.&lt;br /&gt;
&lt;br /&gt;
The second parameter of addDialog() allows you to specify which attributes to monitor.  By default every attribute is monitored.  However you can specify to monitor one or many of the following, separated by spaces:  Position, Visible, and RolledUp.&lt;br /&gt;
&lt;br /&gt;
The addMultiColumnList() function behaves in a similar manner, allowing you to specify which MultiColumnLists and which of their attributes to monitor.  Again the default is to monitor every attribute but you can also specify one or many of the following:  ColumnSequence, ColumnWidths, SortedColumn, and AscendingSort.&lt;br /&gt;
&lt;br /&gt;
=== Files ===&lt;br /&gt;
&lt;br /&gt;
==== DialogConfigurations.h ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
#ifndef _DialogConfigurations_h_&lt;br /&gt;
#define _DialogConfigurations_h_&lt;br /&gt;
&lt;br /&gt;
#include &amp;quot;CEGUI.h&amp;quot;&lt;br /&gt;
#include &amp;quot;CEGUIXMLHandler.h&amp;quot;&lt;br /&gt;
#include &amp;quot;CEGUIXMLParser.h&amp;quot;&lt;br /&gt;
#include &amp;quot;CEGUIXMLAttributes.h&amp;quot;&lt;br /&gt;
#include &amp;lt;map&amp;gt;&lt;br /&gt;
&lt;br /&gt;
class DialogConfigurations : public CEGUI::XMLHandler&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
	// Constructor.&lt;br /&gt;
	// Sets various default values.&lt;br /&gt;
	DialogConfigurations();&lt;br /&gt;
&lt;br /&gt;
	// Load the configuration of every stored dialog and multi column list.&lt;br /&gt;
	// By default, also apply these configurations.&lt;br /&gt;
	bool loadConfigurations(const CEGUI::String&amp;amp; xmlFile, const CEGUI::String&amp;amp; schema = &amp;quot;&amp;quot;, const bool&amp;amp; applyConfigurations = true);&lt;br /&gt;
&lt;br /&gt;
	// Store the configuration of every dialog and multi column list.&lt;br /&gt;
	bool saveConfigurations();&lt;br /&gt;
&lt;br /&gt;
	// Set default configurations for dialogs.&lt;br /&gt;
	void setDialogDefaults(const CEGUI::URect&amp;amp; position, const bool&amp;amp; visible, const bool&amp;amp; rolledup);&lt;br /&gt;
&lt;br /&gt;
	// Specify which dialog attributes are monitored by default.&lt;br /&gt;
	void setDefaultDialogAttributesMonitored(const CEGUI::String&amp;amp; attributesMonitored);&lt;br /&gt;
&lt;br /&gt;
	// Add a dialog to be monitored.&lt;br /&gt;
	// Optionally specify which attributes this specific dialog monitors.&lt;br /&gt;
	bool addDialog(const CEGUI::String&amp;amp; widget, const CEGUI::String&amp;amp; attributesMonitored = &amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	// Return the position of the specified dialog.&lt;br /&gt;
	const CEGUI::URect&amp;amp; getDialogSavedPosition(const CEGUI::String&amp;amp; dialog);&lt;br /&gt;
&lt;br /&gt;
	// Return the visible/hidden state of the specified dialog.&lt;br /&gt;
	const bool&amp;amp; getDialogSavedVisible(const CEGUI::String&amp;amp; dialog);&lt;br /&gt;
&lt;br /&gt;
	// Return the expansion state of the specified dialog.&lt;br /&gt;
	const bool&amp;amp; getDialogSavedRolledup(const CEGUI::String&amp;amp; dialog);&lt;br /&gt;
&lt;br /&gt;
	// Apply the saved configuration to the specified dialog.&lt;br /&gt;
	bool applyDialogConfiguration(const CEGUI::String&amp;amp; dialog = &amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	// Set default configurations for multi column lists.&lt;br /&gt;
	void setMultiColumnListDefaults(const std::vector&amp;lt;CEGUI::String&amp;gt;&amp;amp; columnSequence, const CEGUI::uint&amp;amp; sortedColumn, const bool&amp;amp; sortAscending, const std::vector&amp;lt;CEGUI::String&amp;gt;&amp;amp; columnWidths);&lt;br /&gt;
&lt;br /&gt;
	// Specify which dialog attributes are monitored by default.&lt;br /&gt;
	void setDefaultMultiColumnListAttributesMonitored(const CEGUI::String&amp;amp; attributesMonitored);&lt;br /&gt;
&lt;br /&gt;
	// Add a MultiColumnList to be monitored.&lt;br /&gt;
	bool addMultiColumnList(const CEGUI::String&amp;amp; widget, const CEGUI::String&amp;amp; attributesMonitored = &amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	// Apply the saved configuration to the specified multi column list.&lt;br /&gt;
	bool applyMultiColumnListConfiguration(const CEGUI::String&amp;amp; multiColumnList = &amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
	// Whether a particular attribute is monitored.&lt;br /&gt;
	bool isMonitoringAttribute(const std::vector&amp;lt;CEGUI::String&amp;gt;&amp;amp; list, const CEGUI::String&amp;amp; attribute);&lt;br /&gt;
&lt;br /&gt;
	// Performs the actual load every stored configuration.&lt;br /&gt;
    void elementStart(const CEGUI::String&amp;amp; element, const CEGUI::XMLAttributes&amp;amp; xmlAttributes);&lt;br /&gt;
&lt;br /&gt;
	// Tag name for dialog positions element.&lt;br /&gt;
	static const CEGUI::String m_DialogConfigurationElement;&lt;br /&gt;
&lt;br /&gt;
	// Tag name for position elements.&lt;br /&gt;
	static const CEGUI::String m_configurationElementDialog;&lt;br /&gt;
&lt;br /&gt;
	// Attribute name that stores the name of the window.&lt;br /&gt;
	static const char windowNameAttribute[];&lt;br /&gt;
&lt;br /&gt;
	// Attribute name that stores the position of the window.&lt;br /&gt;
	static const char windowPosAttribute[];&lt;br /&gt;
&lt;br /&gt;
	// Attribute name that stores the visible state of the window.&lt;br /&gt;
	static const char windowVisibleAttribute[];&lt;br /&gt;
&lt;br /&gt;
	// Attribute name that stores the rolledUp state of the window.&lt;br /&gt;
	static const char windowRolledupAttribute[];&lt;br /&gt;
&lt;br /&gt;
	// Tag name of MultiColumnList elements.&lt;br /&gt;
	static const CEGUI::String m_configurationElementMultiColumnList;&lt;br /&gt;
&lt;br /&gt;
	// Attribute name that stores the sequence of the columns.&lt;br /&gt;
	static const char mclColumnSequenceAttribute[];&lt;br /&gt;
&lt;br /&gt;
	// Attribute name that stores which column is sorted.&lt;br /&gt;
	static const char mclSortedColumnAttribute[];&lt;br /&gt;
&lt;br /&gt;
	// Attribute name that stores the sort order direction.&lt;br /&gt;
	static const char mclAscendingSortAttribute[];&lt;br /&gt;
&lt;br /&gt;
	// Attribute name that stores the widths of the columns.&lt;br /&gt;
	static const char DialogConfigurations::mclColumnWidthAttribute[];&lt;br /&gt;
&lt;br /&gt;
	// Separator for the column sequences.&lt;br /&gt;
	static const char DialogConfigurations::mclColumnSequenceSeparator;&lt;br /&gt;
&lt;br /&gt;
	// Separator for the column widths.&lt;br /&gt;
	static const char DialogConfigurations::mclColumnWidthSeparator;&lt;br /&gt;
&lt;br /&gt;
	// Special attribute name to monitor every attribute.&lt;br /&gt;
	static const char monitoredAttributeAll[];&lt;br /&gt;
&lt;br /&gt;
	// Special attribute name to monitor no attribute.&lt;br /&gt;
	static const char monitoredAttributeNone[];&lt;br /&gt;
&lt;br /&gt;
	// The value of one dialog configuration.&lt;br /&gt;
	struct DialogConfig {&lt;br /&gt;
		CEGUI::URect position;&lt;br /&gt;
		bool visible;&lt;br /&gt;
		bool rolledup;&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	// List of the dialog configurations.&lt;br /&gt;
	std::map&amp;lt;CEGUI::String, DialogConfig&amp;gt; m_dialogConfigurations;&lt;br /&gt;
&lt;br /&gt;
	// Default position.&lt;br /&gt;
	CEGUI::URect m_defaultPosition;&lt;br /&gt;
&lt;br /&gt;
	// Default visible/hidden.&lt;br /&gt;
	bool m_defaultVisible;&lt;br /&gt;
&lt;br /&gt;
	// Default rolled up/expanded.&lt;br /&gt;
	bool m_defaultRolledup;&lt;br /&gt;
&lt;br /&gt;
	// Specify which attributes to monitor for this dialog.&lt;br /&gt;
	void _setDialogAttributesMonitored(const CEGUI::String&amp;amp; dialog, const CEGUI::String&amp;amp; attributesMonitored);&lt;br /&gt;
&lt;br /&gt;
	// List of the attributes monitored per dialog.&lt;br /&gt;
	std::map&amp;lt;CEGUI::String, std::vector&amp;lt;CEGUI::String&amp;gt;&amp;gt; m_attributesMonitoredDialog;&lt;br /&gt;
&lt;br /&gt;
	// The value of one multi column list configuration.&lt;br /&gt;
	struct MultiColumnListConfig {&lt;br /&gt;
		std::vector&amp;lt;CEGUI::String&amp;gt; columnSequence;&lt;br /&gt;
		CEGUI::uint sortedColumn;&lt;br /&gt;
		bool sortAscending;&lt;br /&gt;
		std::vector&amp;lt;CEGUI::String&amp;gt; columnWidths;&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	// List of the multi column list configurations.&lt;br /&gt;
	std::map&amp;lt;CEGUI::String, MultiColumnListConfig&amp;gt; m_multiColumnListConfigurations;&lt;br /&gt;
&lt;br /&gt;
	// Default column sequence.&lt;br /&gt;
	std::vector&amp;lt;CEGUI::String&amp;gt; m_defaultColumnSequence;&lt;br /&gt;
&lt;br /&gt;
	// Default sorted column.&lt;br /&gt;
	CEGUI::uint m_defaultSortedColumn;&lt;br /&gt;
&lt;br /&gt;
	// Default sort order.&lt;br /&gt;
	bool m_defaultSortAscending;&lt;br /&gt;
&lt;br /&gt;
	// Default column widths.&lt;br /&gt;
	std::vector&amp;lt;CEGUI::String&amp;gt; m_defaultColumnWidths;&lt;br /&gt;
&lt;br /&gt;
	// Specify which attributes to monitor for this multi column list.&lt;br /&gt;
	void _setMultiColumnListAttributesMonitored(const CEGUI::String&amp;amp; multiColumnList, const CEGUI::String&amp;amp; attributesMonitored);&lt;br /&gt;
&lt;br /&gt;
	// List of the attributes monitored per MultiColumnList&lt;br /&gt;
	std::map&amp;lt;CEGUI::String, std::vector&amp;lt;CEGUI::String&amp;gt;&amp;gt; m_attributesMonitoredMultiColumnList;&lt;br /&gt;
&lt;br /&gt;
	// File containing the positions.&lt;br /&gt;
	CEGUI::String m_configFile;&lt;br /&gt;
&lt;br /&gt;
	// List of the supported attributes.&lt;br /&gt;
	static std::vector&amp;lt;CEGUI::String&amp;gt; m_attributeList;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#endif // _DialogConfigurations_h_&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== DialogConfigurations.cpp ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
#include &amp;quot;DialogConfigurations.h&amp;quot;&lt;br /&gt;
#include &amp;quot;CEGUIPropertyHelper.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
//Definition of XML elements and attributes&lt;br /&gt;
const CEGUI::String DialogConfigurations::m_DialogConfigurationElement( &amp;quot;DialogConfigurations&amp;quot; );&lt;br /&gt;
const CEGUI::String DialogConfigurations::m_configurationElementDialog( &amp;quot;DialogConfiguration&amp;quot; );&lt;br /&gt;
const char DialogConfigurations::windowNameAttribute[]		= &amp;quot;Name&amp;quot;;&lt;br /&gt;
const char DialogConfigurations::windowPosAttribute[]		= &amp;quot;Position&amp;quot;;&lt;br /&gt;
const char DialogConfigurations::windowVisibleAttribute[]	= &amp;quot;Visible&amp;quot;;&lt;br /&gt;
const char DialogConfigurations::windowRolledupAttribute[]	= &amp;quot;RolledUp&amp;quot;;&lt;br /&gt;
const char DialogConfigurations::monitoredAttributeAll[]	= &amp;quot;All&amp;quot;;&lt;br /&gt;
const char DialogConfigurations::monitoredAttributeNone[]	= &amp;quot;None&amp;quot;;&lt;br /&gt;
const CEGUI::String DialogConfigurations::m_configurationElementMultiColumnList( &amp;quot;MultiColumnListConfiguration&amp;quot; );&lt;br /&gt;
const char DialogConfigurations::mclColumnSequenceAttribute[]	= &amp;quot;ColumnSequence&amp;quot;;&lt;br /&gt;
const char DialogConfigurations::mclColumnWidthAttribute[]	= &amp;quot;ColumnWidths&amp;quot;;&lt;br /&gt;
const char DialogConfigurations::mclSortedColumnAttribute[]	= &amp;quot;SortedColumn&amp;quot;;&lt;br /&gt;
const char DialogConfigurations::mclAscendingSortAttribute[]= &amp;quot;AscendingSort&amp;quot;;&lt;br /&gt;
const char DialogConfigurations::mclColumnSequenceSeparator	= ',';&lt;br /&gt;
const char DialogConfigurations::mclColumnWidthSeparator	= ';';&lt;br /&gt;
&lt;br /&gt;
// List of the supported attributes&lt;br /&gt;
// Each attribute is enclosed within spaces&lt;br /&gt;
//const CEGUI::String DialogConfigurations::m_attributeList = &amp;quot; All None Position Visible RolledUp MCLWidths MCLSequence MCLSort &amp;quot;;&lt;br /&gt;
std::vector&amp;lt;CEGUI::String&amp;gt; DialogConfigurations::m_attributeList;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
void Tokenize(const CEGUI::String&amp;amp; str, std::vector&amp;lt;CEGUI::String&amp;gt;&amp;amp; tokens, const char delimiters = ' ')&lt;br /&gt;
{&lt;br /&gt;
	// Break a sentence into multiple words separated by delimiters&lt;br /&gt;
	// Does not handle words within double-quotes: One &amp;quot;2 &amp;amp;2&amp;quot; three, four&lt;br /&gt;
&lt;br /&gt;
    // Skip delimiters at beginning&lt;br /&gt;
	CEGUI::String::size_type lastPos = str.find_first_not_of(delimiters, 0);&lt;br /&gt;
&lt;br /&gt;
    // Find first &amp;quot;non-delimiter&amp;quot;&lt;br /&gt;
	CEGUI::String::size_type pos = str.find_first_of(delimiters, lastPos);&lt;br /&gt;
&lt;br /&gt;
	CEGUI::String::size_type length = str.length();&lt;br /&gt;
	while (str.npos != pos || str.npos != lastPos)&lt;br /&gt;
    {&lt;br /&gt;
		// Cap the position to the length of the string&lt;br /&gt;
		if(pos == str.npos)&lt;br /&gt;
			pos = length;&lt;br /&gt;
		if(lastPos == str.npos)&lt;br /&gt;
			lastPos = length;&lt;br /&gt;
&lt;br /&gt;
        // Found a token, add it to the vector&lt;br /&gt;
        tokens.push_back(str.substr(lastPos, pos - lastPos));&lt;br /&gt;
&lt;br /&gt;
        // Skip delimiters&lt;br /&gt;
        lastPos = str.find_first_not_of(delimiters, pos);&lt;br /&gt;
&lt;br /&gt;
        // Find next &amp;quot;non-delimiter&amp;quot;&lt;br /&gt;
        pos = str.find_first_of(delimiters, lastPos);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
DialogConfigurations::DialogConfigurations()&lt;br /&gt;
{&lt;br /&gt;
	setDialogDefaults(CEGUI::URect( CEGUI::UDim(0.0f, 0.0f),&lt;br /&gt;
									CEGUI::UDim(0.0f, 0.0f),&lt;br /&gt;
									CEGUI::UDim(0.5f, 0.0f),&lt;br /&gt;
									CEGUI::UDim(0.5f, 0.0f)),&lt;br /&gt;
					true,&lt;br /&gt;
					true);&lt;br /&gt;
&lt;br /&gt;
	// setMultiColumnListDefaults()&lt;br /&gt;
	m_defaultSortedColumn  = 0;&lt;br /&gt;
	m_defaultSortAscending = true;&lt;br /&gt;
&lt;br /&gt;
	if(m_attributeList.empty())&lt;br /&gt;
	{&lt;br /&gt;
		// This is a static variable, only initialize once&lt;br /&gt;
		m_attributeList.push_back(monitoredAttributeAll);&lt;br /&gt;
		m_attributeList.push_back(monitoredAttributeNone);&lt;br /&gt;
		m_attributeList.push_back(windowPosAttribute);&lt;br /&gt;
		m_attributeList.push_back(windowVisibleAttribute);&lt;br /&gt;
		m_attributeList.push_back(windowRolledupAttribute);&lt;br /&gt;
		m_attributeList.push_back(mclColumnSequenceAttribute);&lt;br /&gt;
		m_attributeList.push_back(mclSortedColumnAttribute);&lt;br /&gt;
		m_attributeList.push_back(mclAscendingSortAttribute);&lt;br /&gt;
		m_attributeList.push_back(mclColumnWidthAttribute);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	// The default is to monitor every attribute&lt;br /&gt;
	_setDialogAttributesMonitored(&amp;quot;&amp;quot;, monitoredAttributeAll);&lt;br /&gt;
	_setMultiColumnListAttributesMonitored(&amp;quot;&amp;quot;, monitoredAttributeAll);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool DialogConfigurations::loadConfigurations(const CEGUI::String&amp;amp; xmlFile, const CEGUI::String&amp;amp; schema, const bool&amp;amp; applyConfigurations)&lt;br /&gt;
{&lt;br /&gt;
	// Load the config of every stored dialog&lt;br /&gt;
	assert(!xmlFile.empty() &amp;amp;&amp;amp; &amp;quot;You must specify an xml file to loadConfigurations()&amp;quot;);&lt;br /&gt;
	m_configFile = xmlFile;&lt;br /&gt;
	bool loadedOk = true;&lt;br /&gt;
	try&lt;br /&gt;
	{&lt;br /&gt;
		CEGUI::System::getSingleton().getXMLParser()-&amp;gt;parseXMLFile(*this, m_configFile, schema, &amp;quot;&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
	catch(const CEGUI::Exception&amp;amp;)&lt;br /&gt;
	{&lt;br /&gt;
		// File is empty or parse error&lt;br /&gt;
		// Silently ignore; we'll create a new file when saving&lt;br /&gt;
		loadedOk = false;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	if(applyConfigurations)&lt;br /&gt;
	{&lt;br /&gt;
		applyDialogConfiguration();&lt;br /&gt;
		applyMultiColumnListConfiguration();&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	return loadedOk;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool DialogConfigurations::saveConfigurations()&lt;br /&gt;
{&lt;br /&gt;
	// Store the configuration of every registered dialog, either within&lt;br /&gt;
	// the loaded XML file or those manually registered via addDialog() &lt;br /&gt;
	assert(!m_configFile.empty() &amp;amp;&amp;amp; &amp;quot;You must specify an xml file by calling loadConfigurations() before saveConfigurations()&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	// Try to open the XML file in writing mode&lt;br /&gt;
    std::ofstream fileSave;&lt;br /&gt;
	fileSave.open(m_configFile.c_str(), std::ios::out) ;&lt;br /&gt;
    if( !fileSave.is_open() )&lt;br /&gt;
    {&lt;br /&gt;
		CEGUI::Logger::getSingleton().logEvent(&amp;quot;Could not write to dialog configuration file (&amp;quot;&lt;br /&gt;
												+ m_configFile&lt;br /&gt;
												+ &amp;quot;).  Is it read-only?&amp;quot;,&lt;br /&gt;
												CEGUI::Errors);&lt;br /&gt;
        return false;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
	// Write the header&lt;br /&gt;
	fileSave &amp;lt;&amp;lt; &amp;quot;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; ?&amp;gt;&amp;quot; &amp;lt;&amp;lt; std::endl&lt;br /&gt;
			&amp;lt;&amp;lt; &amp;quot;&amp;lt;&amp;quot; &amp;lt;&amp;lt; m_DialogConfigurationElement &amp;lt;&amp;lt; &amp;quot;&amp;gt;&amp;quot;&lt;br /&gt;
			&amp;lt;&amp;lt; std::endl;&lt;br /&gt;
&lt;br /&gt;
	// Write each dialog's configuration&lt;br /&gt;
	DialogConfig dialogConfig;&lt;br /&gt;
	CEGUI::WindowManager&amp;amp; winMgr = CEGUI::WindowManager::getSingleton();&lt;br /&gt;
	std::map&amp;lt;CEGUI::String, DialogConfig&amp;gt;::iterator itDialogConfig;&lt;br /&gt;
	std::map&amp;lt;CEGUI::String, std::vector&amp;lt;CEGUI::String&amp;gt;&amp;gt;::iterator itAttributesMonitored;&lt;br /&gt;
	std::vector&amp;lt;CEGUI::String&amp;gt; attributesMonitored;&lt;br /&gt;
	CEGUI::Window* window;&lt;br /&gt;
	for(itDialogConfig = m_dialogConfigurations.begin(); itDialogConfig != m_dialogConfigurations.end(); ++itDialogConfig)&lt;br /&gt;
	{&lt;br /&gt;
		if(!winMgr.isWindowPresent(itDialogConfig-&amp;gt;first))&lt;br /&gt;
			continue;&lt;br /&gt;
&lt;br /&gt;
		itAttributesMonitored = m_attributesMonitoredDialog.find(itDialogConfig-&amp;gt;first);&lt;br /&gt;
		if(itAttributesMonitored != m_attributesMonitoredDialog.end())&lt;br /&gt;
			attributesMonitored = (*itAttributesMonitored).second; // Dialog has specified attributes&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			// Use default attributes&lt;br /&gt;
			itAttributesMonitored = m_attributesMonitoredDialog.find(&amp;quot;&amp;quot;);&lt;br /&gt;
			if(itAttributesMonitored != m_attributesMonitoredDialog.end())&lt;br /&gt;
				attributesMonitored = (*itAttributesMonitored).second;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		window = winMgr.getWindow(itDialogConfig-&amp;gt;first);&lt;br /&gt;
		dialogConfig.position = window-&amp;gt;getArea();&lt;br /&gt;
		dialogConfig.visible	= window-&amp;gt;isVisible();&lt;br /&gt;
		if( window-&amp;gt;testClassName(&amp;quot;FrameWindow&amp;quot;) )&lt;br /&gt;
			dialogConfig.rolledup = static_cast&amp;lt;CEGUI::FrameWindow*&amp;gt;(window)-&amp;gt;isRolledup();&lt;br /&gt;
		else&lt;br /&gt;
			dialogConfig.rolledup = false;&lt;br /&gt;
		fileSave &amp;lt;&amp;lt; &amp;quot;  &amp;lt;&amp;quot; &amp;lt;&amp;lt; m_configurationElementDialog.c_str() &amp;lt;&amp;lt; &amp;quot; &amp;quot;&lt;br /&gt;
			&amp;lt;&amp;lt; windowNameAttribute		&amp;lt;&amp;lt; &amp;quot;=\&amp;quot;&amp;quot; &amp;lt;&amp;lt; itDialogConfig-&amp;gt;first	&amp;lt;&amp;lt; &amp;quot;\&amp;quot; &amp;quot;;&lt;br /&gt;
		if(isMonitoringAttribute(attributesMonitored, windowPosAttribute))&lt;br /&gt;
			fileSave &amp;lt;&amp;lt; windowPosAttribute		&amp;lt;&amp;lt; &amp;quot;=\&amp;quot;&amp;quot; &amp;lt;&amp;lt; CEGUI::PropertyHelper::urectToString(dialogConfig.position)	&amp;lt;&amp;lt; &amp;quot;\&amp;quot; &amp;quot;;&lt;br /&gt;
		if(isMonitoringAttribute(attributesMonitored, windowVisibleAttribute))&lt;br /&gt;
			fileSave &amp;lt;&amp;lt; windowVisibleAttribute	&amp;lt;&amp;lt; &amp;quot;=\&amp;quot;&amp;quot; &amp;lt;&amp;lt; dialogConfig.visible	&amp;lt;&amp;lt; &amp;quot;\&amp;quot; &amp;quot;;&lt;br /&gt;
		if(isMonitoringAttribute(attributesMonitored, windowRolledupAttribute))&lt;br /&gt;
			fileSave &amp;lt;&amp;lt; windowRolledupAttribute	&amp;lt;&amp;lt; &amp;quot;=\&amp;quot;&amp;quot; &amp;lt;&amp;lt; dialogConfig.rolledup	&amp;lt;&amp;lt; &amp;quot;\&amp;quot; &amp;quot;;&lt;br /&gt;
		fileSave &amp;lt;&amp;lt; &amp;quot;/&amp;gt;&amp;quot; &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	// Write each MultiColumnList's configuration&lt;br /&gt;
	std::map&amp;lt;CEGUI::String, MultiColumnListConfig&amp;gt;::iterator itMultiColumnListConfig;&lt;br /&gt;
	attributesMonitored.clear();&lt;br /&gt;
	CEGUI::MultiColumnList* multiColumnList;&lt;br /&gt;
	for(itMultiColumnListConfig = m_multiColumnListConfigurations.begin(); itMultiColumnListConfig != m_multiColumnListConfigurations.end(); ++itMultiColumnListConfig)&lt;br /&gt;
	{&lt;br /&gt;
		itAttributesMonitored = m_attributesMonitoredMultiColumnList.find(itMultiColumnListConfig-&amp;gt;first);&lt;br /&gt;
		if(itAttributesMonitored != m_attributesMonitoredMultiColumnList.end())&lt;br /&gt;
			attributesMonitored = (*itAttributesMonitored).second; // Dialog has specified attributes&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			// Use default attributes&lt;br /&gt;
			itAttributesMonitored = m_attributesMonitoredMultiColumnList.find(&amp;quot;&amp;quot;);&lt;br /&gt;
			if(itAttributesMonitored != m_attributesMonitoredMultiColumnList.end())&lt;br /&gt;
				attributesMonitored = (*itAttributesMonitored).second;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		multiColumnList = static_cast&amp;lt;CEGUI::MultiColumnList*&amp;gt;(winMgr.getWindow(itMultiColumnListConfig-&amp;gt;first));&lt;br /&gt;
		fileSave &amp;lt;&amp;lt; &amp;quot;  &amp;lt;&amp;quot; &amp;lt;&amp;lt; m_configurationElementMultiColumnList.c_str() &amp;lt;&amp;lt; &amp;quot; &amp;quot;&lt;br /&gt;
			&amp;lt;&amp;lt; windowNameAttribute		&amp;lt;&amp;lt; &amp;quot;=\&amp;quot;&amp;quot; &amp;lt;&amp;lt; itMultiColumnListConfig-&amp;gt;first	&amp;lt;&amp;lt; &amp;quot;\&amp;quot; &amp;quot;;&lt;br /&gt;
		if(isMonitoringAttribute(attributesMonitored, mclColumnSequenceAttribute) &amp;amp;&amp;amp; multiColumnList-&amp;gt;getColumnCount())&lt;br /&gt;
		{&lt;br /&gt;
			fileSave &amp;lt;&amp;lt; mclColumnSequenceAttribute &amp;lt;&amp;lt; &amp;quot;=\&amp;quot;&amp;quot;;&lt;br /&gt;
			for(CEGUI::uint columnIndex = 0; columnIndex &amp;lt; multiColumnList-&amp;gt;getColumnCount(); ++columnIndex)&lt;br /&gt;
			{&lt;br /&gt;
				if(columnIndex)&lt;br /&gt;
					fileSave &amp;lt;&amp;lt; mclColumnSequenceSeparator;&lt;br /&gt;
				fileSave &amp;lt;&amp;lt; multiColumnList-&amp;gt;getColumnID(columnIndex);&lt;br /&gt;
			}&lt;br /&gt;
			fileSave &amp;lt;&amp;lt; &amp;quot;\&amp;quot; &amp;quot;;&lt;br /&gt;
		}&lt;br /&gt;
		if(isMonitoringAttribute(attributesMonitored, mclColumnWidthAttribute) &amp;amp;&amp;amp; multiColumnList-&amp;gt;getColumnCount())&lt;br /&gt;
		{&lt;br /&gt;
			fileSave &amp;lt;&amp;lt; mclColumnWidthAttribute &amp;lt;&amp;lt; &amp;quot;=\&amp;quot;&amp;quot;;&lt;br /&gt;
			for(CEGUI::uint columnIndex = 0; columnIndex &amp;lt; multiColumnList-&amp;gt;getColumnCount(); ++columnIndex)&lt;br /&gt;
			{&lt;br /&gt;
				if(columnIndex)&lt;br /&gt;
					fileSave &amp;lt;&amp;lt; mclColumnWidthSeparator;&lt;br /&gt;
				fileSave &amp;lt;&amp;lt; CEGUI::PropertyHelper::udimToString(multiColumnList-&amp;gt;getColumnHeaderWidth(columnIndex));&lt;br /&gt;
			}&lt;br /&gt;
			fileSave &amp;lt;&amp;lt; &amp;quot;\&amp;quot; &amp;quot;;&lt;br /&gt;
		}&lt;br /&gt;
		if(isMonitoringAttribute(attributesMonitored, mclSortedColumnAttribute))&lt;br /&gt;
			fileSave &amp;lt;&amp;lt; mclSortedColumnAttribute	&amp;lt;&amp;lt; &amp;quot;=\&amp;quot;&amp;quot; &amp;lt;&amp;lt; multiColumnList-&amp;gt;getColumnID(multiColumnList-&amp;gt;getSortColumn()) &amp;lt;&amp;lt; &amp;quot;\&amp;quot; &amp;quot;;&lt;br /&gt;
		if(isMonitoringAttribute(attributesMonitored, mclAscendingSortAttribute))&lt;br /&gt;
			fileSave &amp;lt;&amp;lt; mclAscendingSortAttribute &amp;lt;&amp;lt; &amp;quot;=\&amp;quot;&amp;quot; &amp;lt;&amp;lt; (multiColumnList-&amp;gt;getSortDirection() != CEGUI::ListHeaderSegment::Descending) &amp;lt;&amp;lt; &amp;quot;\&amp;quot; &amp;quot;;&lt;br /&gt;
		fileSave &amp;lt;&amp;lt; &amp;quot;/&amp;gt;&amp;quot; &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	// Write the footer&lt;br /&gt;
	fileSave &amp;lt;&amp;lt; &amp;quot;&amp;lt;/&amp;quot; &amp;lt;&amp;lt; m_DialogConfigurationElement &amp;lt;&amp;lt; &amp;quot;&amp;gt;&amp;quot; &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
	fileSave.close();&lt;br /&gt;
	return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void DialogConfigurations::setDialogDefaults(const CEGUI::URect&amp;amp; position, const bool&amp;amp; visible, const bool&amp;amp; rolledup)&lt;br /&gt;
{&lt;br /&gt;
	// Set default values&lt;br /&gt;
	// Should validate what's being passed as parameters&lt;br /&gt;
	m_defaultPosition	= position;&lt;br /&gt;
	m_defaultVisible	= visible;&lt;br /&gt;
	m_defaultRolledup	= rolledup;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void DialogConfigurations::setDefaultDialogAttributesMonitored(const CEGUI::String&amp;amp; attributesMonitored)&lt;br /&gt;
{&lt;br /&gt;
	_setDialogAttributesMonitored(&amp;quot;&amp;quot;, attributesMonitored);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool DialogConfigurations::addDialog(const CEGUI::String&amp;amp; widget, const CEGUI::String&amp;amp; attributesMonitored)&lt;br /&gt;
{&lt;br /&gt;
	// Add a dialog to be monitored&lt;br /&gt;
	// This can be used to automatically write the contents of the initial XML file&lt;br /&gt;
	//   rather than editing it by hand.&lt;br /&gt;
	assert(!widget.empty() &amp;amp;&amp;amp; &amp;quot;You must pass a dialog name to addDialog()&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	if(!attributesMonitored.empty())&lt;br /&gt;
		_setDialogAttributesMonitored(widget, attributesMonitored);&lt;br /&gt;
&lt;br /&gt;
	std::map&amp;lt;CEGUI::String, DialogConfig&amp;gt;::iterator itConfig;&lt;br /&gt;
	itConfig = m_dialogConfigurations.find(widget);&lt;br /&gt;
	if(itConfig != m_dialogConfigurations.end())&lt;br /&gt;
		return false; // This dialog is already added&lt;br /&gt;
&lt;br /&gt;
	CEGUI::Window* window = CEGUI::WindowManager::getSingleton().getWindow(widget);&lt;br /&gt;
	DialogConfig config;&lt;br /&gt;
	config.position = window-&amp;gt;getArea();&lt;br /&gt;
	config.visible	= window-&amp;gt;isVisible();&lt;br /&gt;
	if( window-&amp;gt;testClassName(&amp;quot;FrameWindow&amp;quot;) )&lt;br /&gt;
		config.rolledup = static_cast&amp;lt;CEGUI::FrameWindow*&amp;gt;(window)-&amp;gt;isRolledup();&lt;br /&gt;
	else&lt;br /&gt;
		config.rolledup = m_defaultRolledup; // Not really needed, unless this window inherits from FrameWindow after being loaded&lt;br /&gt;
&lt;br /&gt;
	m_dialogConfigurations[widget] = config;&lt;br /&gt;
	return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
const CEGUI::URect&amp;amp; DialogConfigurations::getDialogSavedPosition(const CEGUI::String&amp;amp; dialog)&lt;br /&gt;
{&lt;br /&gt;
	// Return the position of the specified dialog&lt;br /&gt;
	std::map&amp;lt;CEGUI::String, DialogConfig&amp;gt;::iterator itConfig;&lt;br /&gt;
	itConfig = m_dialogConfigurations.find(dialog);&lt;br /&gt;
	return itConfig == m_dialogConfigurations.end() ? m_defaultPosition : (*itConfig).second.position;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
const bool&amp;amp; DialogConfigurations::getDialogSavedVisible(const CEGUI::String&amp;amp; dialog)&lt;br /&gt;
{&lt;br /&gt;
	// Return the visible/hidden state of the specified dialog&lt;br /&gt;
	std::map&amp;lt;CEGUI::String, DialogConfig&amp;gt;::iterator itConfig;&lt;br /&gt;
	itConfig = m_dialogConfigurations.find(dialog);&lt;br /&gt;
	return itConfig == m_dialogConfigurations.end() ? m_defaultVisible : (*itConfig).second.visible;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
const bool&amp;amp; DialogConfigurations::getDialogSavedRolledup(const CEGUI::String&amp;amp; dialog)&lt;br /&gt;
{&lt;br /&gt;
	// Return the expansion state of the specified dialog&lt;br /&gt;
	std::map&amp;lt;CEGUI::String, DialogConfig&amp;gt;::iterator itConfig;&lt;br /&gt;
	itConfig = m_dialogConfigurations.find(dialog);&lt;br /&gt;
	return itConfig == m_dialogConfigurations.end() ? m_defaultRolledup : (*itConfig).second.rolledup;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool DialogConfigurations::applyDialogConfiguration(const CEGUI::String&amp;amp; dialog)&lt;br /&gt;
{&lt;br /&gt;
	// Apply the saved configuration to a dialog&lt;br /&gt;
	if(dialog.length() == 0)&lt;br /&gt;
	{&lt;br /&gt;
		// Load every dialog configurations&lt;br /&gt;
		std::map&amp;lt;CEGUI::String, DialogConfig&amp;gt;::iterator itConfig;&lt;br /&gt;
		for(itConfig = m_dialogConfigurations.begin(); itConfig != m_dialogConfigurations.end(); itConfig++)&lt;br /&gt;
		{&lt;br /&gt;
			applyDialogConfiguration((*itConfig).first);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
	else&lt;br /&gt;
	{&lt;br /&gt;
		// Find this dialog's configuration&lt;br /&gt;
		CEGUI::WindowManager&amp;amp; winMgr = CEGUI::WindowManager::getSingleton();&lt;br /&gt;
		std::map&amp;lt;CEGUI::String, DialogConfig&amp;gt;::iterator itConfig;&lt;br /&gt;
		itConfig = m_dialogConfigurations.find(dialog);&lt;br /&gt;
		if(itConfig == m_dialogConfigurations.end() || !winMgr.isWindowPresent(dialog))&lt;br /&gt;
			return false;&lt;br /&gt;
&lt;br /&gt;
		// Determine which attributes are monitored&lt;br /&gt;
		std::vector&amp;lt;CEGUI::String&amp;gt; attributesMonitored;&lt;br /&gt;
		std::map&amp;lt;CEGUI::String, std::vector&amp;lt;CEGUI::String&amp;gt;&amp;gt;::iterator itAttributesMonitored;&lt;br /&gt;
		itAttributesMonitored = m_attributesMonitoredDialog.find(dialog);&lt;br /&gt;
		if(itAttributesMonitored != m_attributesMonitoredDialog.end())&lt;br /&gt;
			attributesMonitored = (*itAttributesMonitored).second; // Dialog has specified attributes&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			// Use default attributes&lt;br /&gt;
			itAttributesMonitored = m_attributesMonitoredDialog.find(&amp;quot;&amp;quot;);&lt;br /&gt;
			if(itAttributesMonitored == m_attributesMonitoredDialog.end())&lt;br /&gt;
				return false;  // Could not retrieve the default attributes (should never happen)&lt;br /&gt;
			attributesMonitored = (*itAttributesMonitored).second;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Apply the configuration to the dialog&lt;br /&gt;
		CEGUI::Window* window = winMgr.getWindow(dialog);&lt;br /&gt;
		if(isMonitoringAttribute(attributesMonitored, windowPosAttribute))&lt;br /&gt;
			window-&amp;gt;setArea((*itConfig).second.position);&lt;br /&gt;
		if(isMonitoringAttribute(attributesMonitored, windowVisibleAttribute))&lt;br /&gt;
			window-&amp;gt;setVisible((*itConfig).second.visible);&lt;br /&gt;
		if(isMonitoringAttribute(attributesMonitored, windowRolledupAttribute))&lt;br /&gt;
		{&lt;br /&gt;
			if( window-&amp;gt;testClassName(&amp;quot;FrameWindow&amp;quot;) )&lt;br /&gt;
			{&lt;br /&gt;
				CEGUI::FrameWindow* frameWindow = static_cast&amp;lt;CEGUI::FrameWindow*&amp;gt;(window);&lt;br /&gt;
				if(frameWindow-&amp;gt;isRolledup() != (*itConfig).second.rolledup)&lt;br /&gt;
					frameWindow-&amp;gt;toggleRollup();&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
	return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void DialogConfigurations::setMultiColumnListDefaults(const std::vector&amp;lt;CEGUI::String&amp;gt;&amp;amp; columnSequence, const CEGUI::uint&amp;amp; sortedColumn, const bool&amp;amp; sortAscending, const std::vector&amp;lt;CEGUI::String&amp;gt;&amp;amp; columnWidths)&lt;br /&gt;
{&lt;br /&gt;
	// Set default values&lt;br /&gt;
	// Should validate what's being passed as parameters&lt;br /&gt;
	m_defaultColumnSequence = columnSequence;&lt;br /&gt;
	m_defaultSortedColumn	= sortedColumn;&lt;br /&gt;
	m_defaultSortAscending	= sortAscending;&lt;br /&gt;
	m_defaultColumnWidths	= columnWidths;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void DialogConfigurations::setDefaultMultiColumnListAttributesMonitored(const CEGUI::String&amp;amp; attributesMonitored)&lt;br /&gt;
{&lt;br /&gt;
	_setMultiColumnListAttributesMonitored(&amp;quot;&amp;quot;, attributesMonitored);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool DialogConfigurations::addMultiColumnList(const CEGUI::String&amp;amp; widget, const CEGUI::String&amp;amp; attributesMonitored)&lt;br /&gt;
{&lt;br /&gt;
	// Add a MultiColumnList to be monitored&lt;br /&gt;
	// This can be used to automatically write the contents of the initial XML file&lt;br /&gt;
	//   rather than editing it by hand.&lt;br /&gt;
	assert(!widget.empty() &amp;amp;&amp;amp; &amp;quot;You must pass a multiColumnList name to addMultiColumnList()&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	if(!attributesMonitored.empty())&lt;br /&gt;
		_setMultiColumnListAttributesMonitored(widget, attributesMonitored);&lt;br /&gt;
&lt;br /&gt;
	std::map&amp;lt;CEGUI::String, MultiColumnListConfig&amp;gt;::iterator itConfig;&lt;br /&gt;
	itConfig = m_multiColumnListConfigurations.find(widget);&lt;br /&gt;
	if(itConfig != m_multiColumnListConfigurations.end())&lt;br /&gt;
		return false; // This MultiColumnList is already added&lt;br /&gt;
&lt;br /&gt;
	MultiColumnListConfig config;&lt;br /&gt;
	CEGUI::MultiColumnList* multiColumnList = static_cast&amp;lt;CEGUI::MultiColumnList*&amp;gt;(CEGUI::WindowManager::getSingleton().getWindow(widget));&lt;br /&gt;
	assert(multiColumnList-&amp;gt;testClassName(&amp;quot;MultiColumnList&amp;quot;) &amp;amp;&amp;amp; &amp;quot;This widget is not a MultiColumnList&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	for(CEGUI::uint columnIndex = 0; columnIndex &amp;lt; multiColumnList-&amp;gt;getColumnCount(); ++columnIndex)&lt;br /&gt;
	{&lt;br /&gt;
		config.columnSequence.push_back(CEGUI::PropertyHelper::uintToString(multiColumnList-&amp;gt;getColumnID(columnIndex)));&lt;br /&gt;
		config.columnWidths.push_back(CEGUI::PropertyHelper::udimToString(multiColumnList-&amp;gt;getColumnHeaderWidth(columnIndex)));&lt;br /&gt;
	}&lt;br /&gt;
	config.sortedColumn  = multiColumnList-&amp;gt;getSortColumn();&lt;br /&gt;
	config.sortAscending = multiColumnList-&amp;gt;getSortDirection() != CEGUI::ListHeaderSegment::Descending;&lt;br /&gt;
&lt;br /&gt;
	m_multiColumnListConfigurations[widget] = config;&lt;br /&gt;
	return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool DialogConfigurations::applyMultiColumnListConfiguration(const CEGUI::String&amp;amp; multiColumnList)&lt;br /&gt;
{&lt;br /&gt;
	// Apply the saved configuration to a multi column list&lt;br /&gt;
	if(multiColumnList.length() == 0)&lt;br /&gt;
	{&lt;br /&gt;
		// Load every multi column list configurations&lt;br /&gt;
		std::map&amp;lt;CEGUI::String, MultiColumnListConfig&amp;gt;::iterator itConfig;&lt;br /&gt;
		for(itConfig = m_multiColumnListConfigurations.begin(); itConfig != m_multiColumnListConfigurations.end(); itConfig++)&lt;br /&gt;
		{&lt;br /&gt;
			applyMultiColumnListConfiguration((*itConfig).first);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
	else&lt;br /&gt;
	{&lt;br /&gt;
		// Find this multi column list's configuration&lt;br /&gt;
		CEGUI::WindowManager&amp;amp; winMgr = CEGUI::WindowManager::getSingleton();&lt;br /&gt;
		std::map&amp;lt;CEGUI::String, MultiColumnListConfig&amp;gt;::iterator itConfig;&lt;br /&gt;
		itConfig = m_multiColumnListConfigurations.find(multiColumnList);&lt;br /&gt;
		if(itConfig == m_multiColumnListConfigurations.end() || !winMgr.isWindowPresent(multiColumnList))&lt;br /&gt;
			return false;&lt;br /&gt;
&lt;br /&gt;
		// Determine which attributes are monitored&lt;br /&gt;
		std::vector&amp;lt;CEGUI::String&amp;gt; attributesMonitored;&lt;br /&gt;
		std::map&amp;lt;CEGUI::String, std::vector&amp;lt;CEGUI::String&amp;gt;&amp;gt;::iterator itAttributesMonitored;&lt;br /&gt;
		itAttributesMonitored = m_attributesMonitoredMultiColumnList.find(multiColumnList);&lt;br /&gt;
		if(itAttributesMonitored != m_attributesMonitoredMultiColumnList.end())&lt;br /&gt;
			attributesMonitored = (*itAttributesMonitored).second; // Multi column list has specified attributes&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			// Use default attributes&lt;br /&gt;
			itAttributesMonitored = m_attributesMonitoredMultiColumnList.find(&amp;quot;&amp;quot;);&lt;br /&gt;
			if(itAttributesMonitored == m_attributesMonitoredMultiColumnList.end())&lt;br /&gt;
				return false;  // Could not retrieve the default attributes (should never happen)&lt;br /&gt;
			attributesMonitored = (*itAttributesMonitored).second;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Apply the configuration to the multi column list&lt;br /&gt;
		CEGUI::MultiColumnList* window = static_cast&amp;lt;CEGUI::MultiColumnList*&amp;gt;(winMgr.getWindow(multiColumnList));&lt;br /&gt;
		if(isMonitoringAttribute(attributesMonitored, mclColumnSequenceAttribute))&lt;br /&gt;
		{&lt;br /&gt;
			for(CEGUI::uint columnIndex = 0; columnIndex &amp;lt; window-&amp;gt;getColumnCount() &amp;amp;&amp;amp; columnIndex &amp;lt; (*itConfig).second.columnSequence.size(); ++columnIndex)&lt;br /&gt;
			{&lt;br /&gt;
				window-&amp;gt;moveColumn(window-&amp;gt;getColumnWithID(CEGUI::PropertyHelper::stringToUint((*itConfig).second.columnSequence.at(columnIndex))),&lt;br /&gt;
									columnIndex);&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
		if(isMonitoringAttribute(attributesMonitored, mclColumnWidthAttribute))&lt;br /&gt;
		{&lt;br /&gt;
			CEGUI::UDim width;&lt;br /&gt;
			for(CEGUI::uint columnIndex = 0; columnIndex &amp;lt; window-&amp;gt;getColumnCount() &amp;amp;&amp;amp; columnIndex &amp;lt; (*itConfig).second.columnWidths.size(); ++columnIndex)&lt;br /&gt;
			{&lt;br /&gt;
				width = CEGUI::PropertyHelper::stringToUDim((*itConfig).second.columnWidths.at(columnIndex));&lt;br /&gt;
				window-&amp;gt;setColumnHeaderWidth(columnIndex, width);&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
		if(isMonitoringAttribute(attributesMonitored, mclSortedColumnAttribute))&lt;br /&gt;
		{&lt;br /&gt;
			window-&amp;gt;setSortColumn( window-&amp;gt;getColumnWithID((*itConfig).second.sortedColumn) );&lt;br /&gt;
		}&lt;br /&gt;
		if(isMonitoringAttribute(attributesMonitored, mclAscendingSortAttribute))&lt;br /&gt;
		{&lt;br /&gt;
			window-&amp;gt;setSortDirection( (*itConfig).second.sortAscending ? CEGUI::ListHeaderSegment::Ascending&lt;br /&gt;
																		: CEGUI::ListHeaderSegment::Descending);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
	return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool DialogConfigurations::isMonitoringAttribute(const std::vector&amp;lt;CEGUI::String&amp;gt;&amp;amp; list, const CEGUI::String&amp;amp; attribute)&lt;br /&gt;
{&lt;br /&gt;
	std::vector&amp;lt;CEGUI::String&amp;gt;::const_iterator itList;&lt;br /&gt;
	for(itList = list.begin(); itList != list.end(); itList++)&lt;br /&gt;
	{&lt;br /&gt;
		if(!(*itList).compare(attribute))&lt;br /&gt;
			return true;&lt;br /&gt;
	}&lt;br /&gt;
	return false;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void DialogConfigurations::elementStart(const CEGUI::String&amp;amp; element, const CEGUI::XMLAttributes&amp;amp; xmlAttributes)&lt;br /&gt;
{&lt;br /&gt;
	// Performs the actual load every stored configuration&lt;br /&gt;
	if (element == m_configurationElementDialog)&lt;br /&gt;
    {&lt;br /&gt;
		DialogConfig config;&lt;br /&gt;
		config.position = m_defaultPosition;&lt;br /&gt;
		config.visible  = m_defaultVisible;&lt;br /&gt;
		config.rolledup = m_defaultRolledup;&lt;br /&gt;
		CEGUI::String name, monitoredAttributes;&lt;br /&gt;
		CEGUI::WindowManager&amp;amp; winMgr = CEGUI::WindowManager::getSingleton();&lt;br /&gt;
&lt;br /&gt;
		name = xmlAttributes.getValueAsString(windowNameAttribute);&lt;br /&gt;
&lt;br /&gt;
		if(xmlAttributes.exists(windowPosAttribute))&lt;br /&gt;
		{&lt;br /&gt;
			config.position	= CEGUI::PropertyHelper::stringToURect(xmlAttributes.getValueAsString(windowPosAttribute));&lt;br /&gt;
			monitoredAttributes.append(&amp;quot; &amp;quot;).append(windowPosAttribute);&lt;br /&gt;
		}&lt;br /&gt;
		if(xmlAttributes.exists(windowVisibleAttribute))&lt;br /&gt;
		{&lt;br /&gt;
			config.visible = xmlAttributes.getValueAsBool(windowVisibleAttribute);&lt;br /&gt;
			monitoredAttributes.append(&amp;quot; &amp;quot;).append(windowVisibleAttribute);&lt;br /&gt;
		}&lt;br /&gt;
		if(xmlAttributes.exists(windowRolledupAttribute))&lt;br /&gt;
		{&lt;br /&gt;
			config.rolledup	= xmlAttributes.getValueAsBool(windowRolledupAttribute);&lt;br /&gt;
			monitoredAttributes.append(&amp;quot; &amp;quot;).append(windowRolledupAttribute);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		_setDialogAttributesMonitored(name, monitoredAttributes);&lt;br /&gt;
		m_dialogConfigurations[name] = config;&lt;br /&gt;
	}&lt;br /&gt;
	else if (element == m_configurationElementMultiColumnList)&lt;br /&gt;
    {&lt;br /&gt;
		MultiColumnListConfig config;&lt;br /&gt;
		config.sortedColumn  = m_defaultSortedColumn;&lt;br /&gt;
		config.sortAscending = m_defaultSortAscending;&lt;br /&gt;
		CEGUI::String name, monitoredAttributes;&lt;br /&gt;
&lt;br /&gt;
		name = xmlAttributes.getValueAsString(windowNameAttribute);&lt;br /&gt;
&lt;br /&gt;
		if(xmlAttributes.exists(mclColumnSequenceAttribute))&lt;br /&gt;
		{&lt;br /&gt;
			CEGUI::String columnSequence = xmlAttributes.getValueAsString(mclColumnSequenceAttribute);&lt;br /&gt;
			Tokenize(columnSequence, config.columnSequence, mclColumnSequenceSeparator);&lt;br /&gt;
			monitoredAttributes.append(&amp;quot; &amp;quot;).append(mclColumnSequenceAttribute);&lt;br /&gt;
		}&lt;br /&gt;
		if(xmlAttributes.exists(mclColumnWidthAttribute))&lt;br /&gt;
		{&lt;br /&gt;
			CEGUI::String columnWidths = xmlAttributes.getValueAsString(mclColumnWidthAttribute);&lt;br /&gt;
			Tokenize(columnWidths, config.columnWidths, mclColumnWidthSeparator);&lt;br /&gt;
			monitoredAttributes.append(&amp;quot; &amp;quot;).append(mclColumnWidthAttribute);&lt;br /&gt;
		}&lt;br /&gt;
		if(xmlAttributes.exists(mclSortedColumnAttribute))&lt;br /&gt;
		{&lt;br /&gt;
			config.sortedColumn = xmlAttributes.getValueAsInteger(mclSortedColumnAttribute);&lt;br /&gt;
			monitoredAttributes.append(&amp;quot; &amp;quot;).append(mclSortedColumnAttribute);&lt;br /&gt;
		}&lt;br /&gt;
		if(xmlAttributes.exists(mclAscendingSortAttribute))&lt;br /&gt;
		{&lt;br /&gt;
			config.sortAscending = xmlAttributes.getValueAsBool(mclAscendingSortAttribute);&lt;br /&gt;
			monitoredAttributes.append(&amp;quot; &amp;quot;).append(mclAscendingSortAttribute);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		_setMultiColumnListAttributesMonitored(name, monitoredAttributes);&lt;br /&gt;
		m_multiColumnListConfigurations[name] = config;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void DialogConfigurations::_setDialogAttributesMonitored(const CEGUI::String&amp;amp; dialog, const CEGUI::String&amp;amp; attributesMonitored)&lt;br /&gt;
{&lt;br /&gt;
	// Validate the attributes to be monitored&lt;br /&gt;
	std::vector&amp;lt;CEGUI::String&amp;gt; newAttributes;&lt;br /&gt;
	std::vector&amp;lt;CEGUI::String&amp;gt; listAttributesMonitored;&lt;br /&gt;
	Tokenize(attributesMonitored, listAttributesMonitored); // Convert attributesMonitored into a vector&lt;br /&gt;
	std::vector&amp;lt;CEGUI::String&amp;gt;::iterator itToken;&lt;br /&gt;
	for(itToken = listAttributesMonitored.begin(); itToken != listAttributesMonitored.end(); itToken++)&lt;br /&gt;
	{&lt;br /&gt;
		if(!(*itToken).compare(monitoredAttributeAll))&lt;br /&gt;
		{&lt;br /&gt;
			newAttributes.push_back(windowPosAttribute);&lt;br /&gt;
			newAttributes.push_back(windowVisibleAttribute);&lt;br /&gt;
			newAttributes.push_back(windowRolledupAttribute);&lt;br /&gt;
		}&lt;br /&gt;
		else if(!(*itToken).compare(monitoredAttributeNone))&lt;br /&gt;
		{&lt;br /&gt;
			newAttributes.clear();&lt;br /&gt;
		}&lt;br /&gt;
		else if(!(*itToken).compare(windowPosAttribute))&lt;br /&gt;
			newAttributes.push_back(windowPosAttribute);&lt;br /&gt;
		else if(!(*itToken).compare(windowVisibleAttribute))&lt;br /&gt;
			newAttributes.push_back(windowVisibleAttribute);&lt;br /&gt;
		else if(!(*itToken).compare(windowRolledupAttribute))&lt;br /&gt;
			newAttributes.push_back(windowRolledupAttribute);&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			// Attribute is not supported&lt;br /&gt;
			assert(false &amp;amp;&amp;amp; &amp;quot;Unsupported attribute specified for a dialog&amp;quot;);&lt;br /&gt;
			CEGUI::Logger::getSingleton().logEvent(&amp;quot;The attribute \&amp;quot;&amp;quot;&lt;br /&gt;
													+ (*itToken)&lt;br /&gt;
													+ &amp;quot;\&amp;quot; is unsupported for dialogs.&amp;quot;,&lt;br /&gt;
													CEGUI::Errors);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	// Store the attributes to be monitored&lt;br /&gt;
	m_attributesMonitoredDialog[dialog] = newAttributes;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void DialogConfigurations::_setMultiColumnListAttributesMonitored(const CEGUI::String&amp;amp; multiColumnList, const CEGUI::String&amp;amp; attributesMonitored)&lt;br /&gt;
{&lt;br /&gt;
	// Validate the attributes to be monitored&lt;br /&gt;
	std::vector&amp;lt;CEGUI::String&amp;gt; newAttributes;&lt;br /&gt;
	std::vector&amp;lt;CEGUI::String&amp;gt; listAttributesMonitored;&lt;br /&gt;
	Tokenize(attributesMonitored, listAttributesMonitored); // Convert attributesMonitored into a vector&lt;br /&gt;
	std::vector&amp;lt;CEGUI::String&amp;gt;::iterator itToken;&lt;br /&gt;
	for(itToken = listAttributesMonitored.begin(); itToken != listAttributesMonitored.end(); itToken++)&lt;br /&gt;
	{&lt;br /&gt;
		if(!(*itToken).compare(monitoredAttributeAll))&lt;br /&gt;
		{&lt;br /&gt;
			newAttributes.push_back(mclColumnSequenceAttribute);&lt;br /&gt;
			newAttributes.push_back(mclSortedColumnAttribute);&lt;br /&gt;
			newAttributes.push_back(mclAscendingSortAttribute);&lt;br /&gt;
			newAttributes.push_back(mclColumnWidthAttribute);&lt;br /&gt;
		}&lt;br /&gt;
		else if(!(*itToken).compare(monitoredAttributeNone))&lt;br /&gt;
		{&lt;br /&gt;
			newAttributes.clear();&lt;br /&gt;
		}&lt;br /&gt;
		else if(!(*itToken).compare(mclColumnSequenceAttribute))&lt;br /&gt;
			newAttributes.push_back(mclColumnSequenceAttribute);&lt;br /&gt;
		else if(!(*itToken).compare(mclSortedColumnAttribute))&lt;br /&gt;
			newAttributes.push_back(mclSortedColumnAttribute);&lt;br /&gt;
		else if(!(*itToken).compare(mclAscendingSortAttribute))&lt;br /&gt;
			newAttributes.push_back(mclAscendingSortAttribute);&lt;br /&gt;
		else if(!(*itToken).compare(mclColumnWidthAttribute))&lt;br /&gt;
			newAttributes.push_back(mclColumnWidthAttribute);&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			// Attribute is not supported&lt;br /&gt;
			assert(false &amp;amp;&amp;amp; &amp;quot;Unsupported attribute specified for a MultiColumnList&amp;quot;);&lt;br /&gt;
			CEGUI::Logger::getSingleton().logEvent(&amp;quot;The attribute \&amp;quot;&amp;quot;&lt;br /&gt;
													+ (*itToken)&lt;br /&gt;
													+ &amp;quot;\&amp;quot; is unsupported for MultiColumnLists.&amp;quot;,&lt;br /&gt;
													CEGUI::Errors);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	// Store the attributes to be monitored&lt;br /&gt;
	m_attributesMonitoredMultiColumnList[multiColumnList] = newAttributes;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== DialogConfigurationsDemo.h ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
#ifndef _DialogConfigurationsDemo_h_&lt;br /&gt;
#define _DialogConfigurationsDemo_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;
#include &amp;quot;DialogConfigurations.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;
			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;DialogConfigurations.layout&amp;quot;);&lt;br /&gt;
			sheet-&amp;gt;addChildWindow(guiLayout);&lt;br /&gt;
&lt;br /&gt;
			// Configure the toolbar&lt;br /&gt;
			winMgr.getWindow(&amp;quot;DialogConfigurations/Toolbar/ShowA&amp;quot;)-&amp;gt;subscribeEvent(PushButton::EventClicked, Event::Subscriber(&amp;amp;DemoSample::showA, this));&lt;br /&gt;
			winMgr.getWindow(&amp;quot;DialogConfigurations/Toolbar/ShowC&amp;quot;)-&amp;gt;subscribeEvent(PushButton::EventClicked, Event::Subscriber(&amp;amp;DemoSample::showC, this));&lt;br /&gt;
			winMgr.getWindow(&amp;quot;DialogConfigurations/Toolbar/ShowD&amp;quot;)-&amp;gt;subscribeEvent(PushButton::EventClicked, Event::Subscriber(&amp;amp;DemoSample::showD, this));&lt;br /&gt;
&lt;br /&gt;
			// Activate the close buttons&lt;br /&gt;
			winMgr.getWindow(&amp;quot;DialogConfigurations/Window_A&amp;quot;)-&amp;gt;subscribeEvent(FrameWindow::EventCloseClicked, Event::Subscriber(&amp;amp;DemoSample::closeA, this));&lt;br /&gt;
			winMgr.getWindow(&amp;quot;DialogConfigurations/Window_B&amp;quot;)-&amp;gt;subscribeEvent(FrameWindow::EventCloseClicked, Event::Subscriber(&amp;amp;DemoSample::closeB, this));&lt;br /&gt;
			winMgr.getWindow(&amp;quot;DialogConfigurations/Window_C&amp;quot;)-&amp;gt;subscribeEvent(FrameWindow::EventCloseClicked, Event::Subscriber(&amp;amp;DemoSample::closeC, this));&lt;br /&gt;
			winMgr.getWindow(&amp;quot;DialogConfigurations/Window_D&amp;quot;)-&amp;gt;subscribeEvent(FrameWindow::EventCloseClicked, Event::Subscriber(&amp;amp;DemoSample::closeD, this));&lt;br /&gt;
&lt;br /&gt;
			// Add columns to the MultiColumnList&lt;br /&gt;
			MultiColumnList* multiColumnList = static_cast&amp;lt;MultiColumnList*&amp;gt;(winMgr.getWindow(&amp;quot;DialogConfigurations/Window_D/MultiColumnList&amp;quot;));&lt;br /&gt;
			multiColumnList-&amp;gt;addColumn(&amp;quot;Col A&amp;quot;, 0, UDim(0.32f, 0));&lt;br /&gt;
			multiColumnList-&amp;gt;addColumn(&amp;quot;Col B&amp;quot;, 1, UDim(0.32f, 0));&lt;br /&gt;
			multiColumnList-&amp;gt;addColumn(&amp;quot;Col C&amp;quot;, 2, UDim(0.32f, 0));&lt;br /&gt;
&lt;br /&gt;
			// Add rows&lt;br /&gt;
			multiColumnList-&amp;gt;addRow();&lt;br /&gt;
			multiColumnList-&amp;gt;setItem(new ListboxTextItem(&amp;quot;1&amp;quot;, 101), 0, 0); // ColumnID, RowID&lt;br /&gt;
			multiColumnList-&amp;gt;setItem(new ListboxTextItem(&amp;quot;4&amp;quot;, 102), 1, 0);&lt;br /&gt;
			multiColumnList-&amp;gt;setItem(new ListboxTextItem(&amp;quot;7&amp;quot;, 103), 2, 0);&lt;br /&gt;
			multiColumnList-&amp;gt;addRow();&lt;br /&gt;
			multiColumnList-&amp;gt;setItem(new ListboxTextItem(&amp;quot;4&amp;quot;, 201), 0, 1);&lt;br /&gt;
			multiColumnList-&amp;gt;setItem(new ListboxTextItem(&amp;quot;7&amp;quot;, 202), 1, 1);&lt;br /&gt;
			multiColumnList-&amp;gt;setItem(new ListboxTextItem(&amp;quot;1&amp;quot;, 203), 2, 1);&lt;br /&gt;
			multiColumnList-&amp;gt;addRow();&lt;br /&gt;
			multiColumnList-&amp;gt;setItem(new ListboxTextItem(&amp;quot;7&amp;quot;, 301), 0, 2);&lt;br /&gt;
			multiColumnList-&amp;gt;setItem(new ListboxTextItem(&amp;quot;1&amp;quot;, 302), 1, 2);&lt;br /&gt;
			multiColumnList-&amp;gt;setItem(new ListboxTextItem(&amp;quot;4&amp;quot;, 303), 2, 2);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
			// Activate dialog configurations&lt;br /&gt;
			m_DialogConfigurations.loadConfigurations(&amp;quot;DialogConfigurations.xml&amp;quot;);&lt;br /&gt;
			m_DialogConfigurations.addDialog(&amp;quot;DialogConfigurations/Window_A&amp;quot;, &amp;quot;Position Visible&amp;quot;);&lt;br /&gt;
			m_DialogConfigurations.addDialog(&amp;quot;DialogConfigurations/Window_B&amp;quot;, &amp;quot;Position RolledUp&amp;quot;);&lt;br /&gt;
			m_DialogConfigurations.addDialog(&amp;quot;DialogConfigurations/Window_C&amp;quot;, &amp;quot;Visible RolledUp&amp;quot;);&lt;br /&gt;
			m_DialogConfigurations.addDialog(&amp;quot;DialogConfigurations/Window_D&amp;quot;); // Saves every attribute: Position, Visible, and RolledUp&lt;br /&gt;
			m_DialogConfigurations.addMultiColumnList(&amp;quot;DialogConfigurations/Window_D/MultiColumnList&amp;quot;); // Saves every attribute: ColumnSequence, ColumnWidths, SortedColumn, and AscendingSort&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;
		m_DialogConfigurations.saveConfigurations();&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool showA(const CEGUI::EventArgs&amp;amp; e)&lt;br /&gt;
	{&lt;br /&gt;
		CEGUI::WindowManager::getSingleton().getWindow(&amp;quot;DialogConfigurations/Window_A&amp;quot;)-&amp;gt;setVisible(true);&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool showC(const CEGUI::EventArgs&amp;amp; e)&lt;br /&gt;
	{&lt;br /&gt;
		CEGUI::WindowManager::getSingleton().getWindow(&amp;quot;DialogConfigurations/Window_C&amp;quot;)-&amp;gt;setVisible(true);&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool showD(const CEGUI::EventArgs&amp;amp; e)&lt;br /&gt;
	{&lt;br /&gt;
		CEGUI::WindowManager::getSingleton().getWindow(&amp;quot;DialogConfigurations/Window_D&amp;quot;)-&amp;gt;setVisible(true);&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool closeA(const CEGUI::EventArgs&amp;amp; e)&lt;br /&gt;
	{&lt;br /&gt;
		CEGUI::WindowManager::getSingleton().getWindow(&amp;quot;DialogConfigurations/Window_A&amp;quot;)-&amp;gt;setVisible(false);&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool closeB(const CEGUI::EventArgs&amp;amp; e)&lt;br /&gt;
	{&lt;br /&gt;
		CEGUI::WindowManager::getSingleton().getWindow(&amp;quot;DialogConfigurations/Window_B&amp;quot;)-&amp;gt;setVisible(false);&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool closeC(const CEGUI::EventArgs&amp;amp; e)&lt;br /&gt;
	{&lt;br /&gt;
		CEGUI::WindowManager::getSingleton().getWindow(&amp;quot;DialogConfigurations/Window_C&amp;quot;)-&amp;gt;setVisible(false);&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	bool closeD(const CEGUI::EventArgs&amp;amp; e)&lt;br /&gt;
	{&lt;br /&gt;
		CEGUI::WindowManager::getSingleton().getWindow(&amp;quot;DialogConfigurations/Window_D&amp;quot;)-&amp;gt;setVisible(false);&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
private:&lt;br /&gt;
	DialogConfigurations m_DialogConfigurations;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#endif // _DialogConfigurationsDemo_h_&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== main.cpp ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&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;DialogConfigurationsDemo.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;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== DialogConfigurations.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;DialogConfigurations&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/StaticText&amp;quot; Name=&amp;quot;DialogConfigurations/Toolbar&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.1875,0},{0.00833335,0},{0.8025,0},{0.111667,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/Button&amp;quot; Name=&amp;quot;DialogConfigurations/Toolbar/ShowA&amp;quot; &amp;gt;&lt;br /&gt;
                &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;Show A&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.0581303,0},{0.156452,0},{0.30813,0},{0.858064,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;DialogConfigurations/Toolbar/ShowC&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;Show C&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.388618,0},{0.156452,0},{0.638618,0},{0.858064,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;DialogConfigurations/Toolbar/ShowD&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;Show D&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.704878,0},{0.156452,0},{0.954878,0},{0.858064,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 Type=&amp;quot;TaharezLook/FrameWindow&amp;quot; Name=&amp;quot;DialogConfigurations/Window_A&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;A - RolledUp not saved&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;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.035,0},{0.123333,0},{0.325,0},{0.47,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;/Window&amp;gt;&lt;br /&gt;
        &amp;lt;Window Type=&amp;quot;TaharezLook/FrameWindow&amp;quot; Name=&amp;quot;DialogConfigurations/Window_B&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;B - Visible not saved&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;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.35125,0},{0.123333,0},{0.64125,0},{0.47,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;/Window&amp;gt;&lt;br /&gt;
        &amp;lt;Window Type=&amp;quot;TaharezLook/FrameWindow&amp;quot; Name=&amp;quot;DialogConfigurations/Window_C&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;C - Position &amp;amp;amp; Size not saved&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;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.6675,0},{0.123333,0},{0.957501,0},{0.47,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;/Window&amp;gt;&lt;br /&gt;
        &amp;lt;Window Type=&amp;quot;TaharezLook/FrameWindow&amp;quot; Name=&amp;quot;DialogConfigurations/Window_D&amp;quot; &amp;gt;&lt;br /&gt;
            &amp;lt;Property Name=&amp;quot;Text&amp;quot; Value=&amp;quot;D Saves MultiColumnList column width, sequence, and sort&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;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.10625,0},{0.53375,0},{0.86625,0},{0.962083,0}}&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;Window Type=&amp;quot;TaharezLook/MultiColumnList&amp;quot; Name=&amp;quot;DialogConfigurations/Window_D/MultiColumnList&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.031235,0},{0.140467,0},{0.968886,0},{0.950778,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>Rackle</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=Property_reference_for_WindowsLook&amp;diff=2689</id>
		<title>Property reference for WindowsLook</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=Property_reference_for_WindowsLook&amp;diff=2689"/>
				<updated>2007-06-29T17:34:36Z</updated>
		
		<summary type="html">&lt;p&gt;Rackle: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is the list of properties per widget within the WindowsLook scheme.  It has been generated by [[http://www.cegui.org.uk/wiki/index.php/PropertyFinder Property Finder]], which can generate a listing for any scheme, both Cegui schemes as well as custom made schemes.  The properties for the [http://www.cegui.org.uk/wiki/index.php/SetProperty TaharezLook] are also available.&lt;br /&gt;
&lt;br /&gt;
=== WindowsLook ===&lt;br /&gt;
==== Button ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;  border=&amp;quot;1&amp;quot; &lt;br /&gt;
| [[#Alpha]]&lt;br /&gt;
| [[#AlwaysOnTop]]&lt;br /&gt;
| [[#AutoRepeatDelay]]&lt;br /&gt;
| [[#AutoRepeatRate]]&lt;br /&gt;
| [[#ClippedByParent]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CustomTooltipType]]&lt;br /&gt;
| [[#DestroyedByParent]]&lt;br /&gt;
| [[#Disabled]]&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#DisabledTextColour]]&lt;br /&gt;
| [[#DistributeCapturedInputs]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Font]]&lt;br /&gt;
| [[#HorizontalAlignment]]&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#HoverTextColour]]&lt;br /&gt;
| [[#ID]]&lt;br /&gt;
| [[#InheritsAlpha]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#InheritsTooltipText]]&lt;br /&gt;
| [[#LookNFeel]]&lt;br /&gt;
| [[#MouseButtonDownAutoRepeat]]&lt;br /&gt;
| [[#MouseCursorImage]]&lt;br /&gt;
| [[#MousePassThroughEnabled]]&lt;br /&gt;
|-&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#NormalTextColour]]&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#PushedTextColour]]&lt;br /&gt;
| [[#RestoreOldCapture]]&lt;br /&gt;
| [[#RiseOnClick]]&lt;br /&gt;
| [[#Text]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Tooltip]]&lt;br /&gt;
| [[#UnifiedAreaRect]]&lt;br /&gt;
| [[#UnifiedHeight]]&lt;br /&gt;
| [[#UnifiedMaxSize]]&lt;br /&gt;
| [[#UnifiedMinSize]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedPosition]]&lt;br /&gt;
| [[#UnifiedSize]]&lt;br /&gt;
| [[#UnifiedWidth]]&lt;br /&gt;
| [[#UnifiedXPosition]]&lt;br /&gt;
| [[#UnifiedYPosition]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#VerticalAlignment]]&lt;br /&gt;
| [[#Visible]]&lt;br /&gt;
| [[#WantsMultiClickEvents]]&lt;br /&gt;
| [[#WindowRenderer]]&lt;br /&gt;
| [[#ZOrderChangeEnabled]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Checkbox ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;  border=&amp;quot;1&amp;quot; &lt;br /&gt;
| [[#Alpha]]&lt;br /&gt;
| [[#AlwaysOnTop]]&lt;br /&gt;
| [[#AutoRepeatDelay]]&lt;br /&gt;
| [[#AutoRepeatRate]]&lt;br /&gt;
| [[#ClippedByParent]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CustomTooltipType]]&lt;br /&gt;
| [[#DestroyedByParent]]&lt;br /&gt;
| [[#Disabled]]&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#DisabledTextColour]]&lt;br /&gt;
| [[#DistributeCapturedInputs]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Font]]&lt;br /&gt;
| [[#HorizontalAlignment]]&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#HoverTextColour]]&lt;br /&gt;
| [[#ID]]&lt;br /&gt;
| [[#InheritsAlpha]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#InheritsTooltipText]]&lt;br /&gt;
| [[#LookNFeel]]&lt;br /&gt;
| [[#MouseButtonDownAutoRepeat]]&lt;br /&gt;
| [[#MouseCursorImage]]&lt;br /&gt;
| [[#MousePassThroughEnabled]]&lt;br /&gt;
|-&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#NormalTextColour]]&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#PushedTextColour]]&lt;br /&gt;
| [[#RestoreOldCapture]]&lt;br /&gt;
| [[#RiseOnClick]]&lt;br /&gt;
| [[#Selected]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Text]]&lt;br /&gt;
| [[#Tooltip]]&lt;br /&gt;
| [[#UnifiedAreaRect]]&lt;br /&gt;
| [[#UnifiedHeight]]&lt;br /&gt;
| [[#UnifiedMaxSize]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedMinSize]]&lt;br /&gt;
| [[#UnifiedPosition]]&lt;br /&gt;
| [[#UnifiedSize]]&lt;br /&gt;
| [[#UnifiedWidth]]&lt;br /&gt;
| [[#UnifiedXPosition]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedYPosition]]&lt;br /&gt;
| [[#VerticalAlignment]]&lt;br /&gt;
| [[#Visible]]&lt;br /&gt;
| [[#WantsMultiClickEvents]]&lt;br /&gt;
| [[#WindowRenderer]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#ZOrderChangeEnabled]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== ComboDropList ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;  border=&amp;quot;1&amp;quot; &lt;br /&gt;
| [[#Alpha]]&lt;br /&gt;
| [[#AlwaysOnTop]]&lt;br /&gt;
| [[#AutoRepeatDelay]]&lt;br /&gt;
| [[#AutoRepeatRate]]&lt;br /&gt;
| [[#ClippedByParent]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CustomTooltipType]]&lt;br /&gt;
| [[#DestroyedByParent]]&lt;br /&gt;
| [[#Disabled]]&lt;br /&gt;
| [[#DistributeCapturedInputs]]&lt;br /&gt;
| [[#Font]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#ForceHorzScrollbar]]&lt;br /&gt;
| [[#ForceVertScrollbar]]&lt;br /&gt;
| [[#HorizontalAlignment]]&lt;br /&gt;
| [[#ID]]&lt;br /&gt;
| [[#InheritsAlpha]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#InheritsTooltipText]]&lt;br /&gt;
| [[#ItemTooltips]]&lt;br /&gt;
| [[#LookNFeel]]&lt;br /&gt;
| [[#MouseButtonDownAutoRepeat]]&lt;br /&gt;
| [[#MouseCursorImage]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#MousePassThroughEnabled]]&lt;br /&gt;
| [[#MultiSelect]]&lt;br /&gt;
| [[#RestoreOldCapture]]&lt;br /&gt;
| [[#RiseOnClick]]&lt;br /&gt;
| [[#Sort]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Text]]&lt;br /&gt;
| [[#Tooltip]]&lt;br /&gt;
| [[#UnifiedAreaRect]]&lt;br /&gt;
| [[#UnifiedHeight]]&lt;br /&gt;
| [[#UnifiedMaxSize]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedMinSize]]&lt;br /&gt;
| [[#UnifiedPosition]]&lt;br /&gt;
| [[#UnifiedSize]]&lt;br /&gt;
| [[#UnifiedWidth]]&lt;br /&gt;
| [[#UnifiedXPosition]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedYPosition]]&lt;br /&gt;
| [[#VerticalAlignment]]&lt;br /&gt;
| [[#Visible]]&lt;br /&gt;
| [[#WantsMultiClickEvents]]&lt;br /&gt;
| [[#WindowRenderer]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#ZOrderChangeEnabled]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Combobox ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;  border=&amp;quot;1&amp;quot; &lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#ActiveEditSelectionColour]]&lt;br /&gt;
| [[#Alpha]]&lt;br /&gt;
| [[#AlwaysOnTop]]&lt;br /&gt;
| [[#AutoRepeatDelay]]&lt;br /&gt;
| [[#AutoRepeatRate]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CaratIndex]]&lt;br /&gt;
| [[#ClippedByParent]]&lt;br /&gt;
| [[#CustomTooltipType]]&lt;br /&gt;
| [[#DestroyedByParent]]&lt;br /&gt;
| [[#Disabled]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#DistributeCapturedInputs]]&lt;br /&gt;
| [[#EditSelectionLength]]&lt;br /&gt;
| [[#EditSelectionStart]]&lt;br /&gt;
| [[#Font]]&lt;br /&gt;
| [[#ForceHorzScrollbar]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#ForceVertScrollbar]]&lt;br /&gt;
| [[#HorizontalAlignment]]&lt;br /&gt;
| [[#ID]]&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#InactiveEditSelectionColour]]&lt;br /&gt;
| [[#InheritsAlpha]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#InheritsTooltipText]]&lt;br /&gt;
| [[#LookNFeel]]&lt;br /&gt;
| [[#MaxEditTextLength]]&lt;br /&gt;
| [[#MouseButtonDownAutoRepeat]]&lt;br /&gt;
| [[#MouseCursorImage]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#MousePassThroughEnabled]]&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#NormalEditTextColour]]&lt;br /&gt;
| [[#ReadOnly]]&lt;br /&gt;
| [[#RestoreOldCapture]]&lt;br /&gt;
| [[#RiseOnClick]]&lt;br /&gt;
|-&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#SelectedEditTextColour]]&lt;br /&gt;
| [[#SingleClickMode]]&lt;br /&gt;
| [[#SortList]]&lt;br /&gt;
| [[#Text]]&lt;br /&gt;
| [[#Tooltip]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedAreaRect]]&lt;br /&gt;
| [[#UnifiedHeight]]&lt;br /&gt;
| [[#UnifiedMaxSize]]&lt;br /&gt;
| [[#UnifiedMinSize]]&lt;br /&gt;
| [[#UnifiedPosition]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedSize]]&lt;br /&gt;
| [[#UnifiedWidth]]&lt;br /&gt;
| [[#UnifiedXPosition]]&lt;br /&gt;
| [[#UnifiedYPosition]]&lt;br /&gt;
| [[#ValidationString]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#VerticalAlignment]]&lt;br /&gt;
| [[#Visible]]&lt;br /&gt;
| [[#WantsMultiClickEvents]]&lt;br /&gt;
| [[#WindowRenderer]]&lt;br /&gt;
| [[#ZOrderChangeEnabled]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Editbox ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;  border=&amp;quot;1&amp;quot; &lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#ActiveSelectionColour]]&lt;br /&gt;
| [[#Alpha]]&lt;br /&gt;
| [[#AlwaysOnTop]]&lt;br /&gt;
| [[#AutoRepeatDelay]]&lt;br /&gt;
| [[#AutoRepeatRate]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CaratIndex]]&lt;br /&gt;
| [[#ClippedByParent]]&lt;br /&gt;
| [[#CustomTooltipType]]&lt;br /&gt;
| [[#DestroyedByParent]]&lt;br /&gt;
| [[#Disabled]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#DistributeCapturedInputs]]&lt;br /&gt;
| [[#Font]]&lt;br /&gt;
| [[#HorizontalAlignment]]&lt;br /&gt;
| [[#ID]]&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#InactiveSelectionColour]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#InheritsAlpha]]&lt;br /&gt;
| [[#InheritsTooltipText]]&lt;br /&gt;
| [[#LookNFeel]]&lt;br /&gt;
| [[#MaskCodepoint]]&lt;br /&gt;
| [[#MaskText]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#MaxTextLength]]&lt;br /&gt;
| [[#MouseButtonDownAutoRepeat]]&lt;br /&gt;
| [[#MouseCursorImage]]&lt;br /&gt;
| [[#MousePassThroughEnabled]]&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#NormalTextColour]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#ReadOnly]]&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#ReadOnlyBGColour]]&lt;br /&gt;
| [[#RestoreOldCapture]]&lt;br /&gt;
| [[#RiseOnClick]]&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#SelectedTextColour]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#SelectionLength]]&lt;br /&gt;
| [[#SelectionStart]]&lt;br /&gt;
| [[#Text]]&lt;br /&gt;
| [[#Tooltip]]&lt;br /&gt;
| [[#UnifiedAreaRect]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedHeight]]&lt;br /&gt;
| [[#UnifiedMaxSize]]&lt;br /&gt;
| [[#UnifiedMinSize]]&lt;br /&gt;
| [[#UnifiedPosition]]&lt;br /&gt;
| [[#UnifiedSize]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedWidth]]&lt;br /&gt;
| [[#UnifiedXPosition]]&lt;br /&gt;
| [[#UnifiedYPosition]]&lt;br /&gt;
| [[#ValidationString]]&lt;br /&gt;
| [[#VerticalAlignment]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Visible]]&lt;br /&gt;
| [[#WantsMultiClickEvents]]&lt;br /&gt;
| [[#WindowRenderer]]&lt;br /&gt;
| [[#ZOrderChangeEnabled]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== FrameWindow ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;  border=&amp;quot;1&amp;quot; &lt;br /&gt;
| [[#Alpha]]&lt;br /&gt;
| [[#AlwaysOnTop]]&lt;br /&gt;
| [[#AutoRepeatDelay]]&lt;br /&gt;
| [[#AutoRepeatRate]]&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#CaptionColour]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#ClippedByParent]]&lt;br /&gt;
| [[#CloseButtonEnabled]]&lt;br /&gt;
| [[#CustomTooltipType]]&lt;br /&gt;
| [[#DestroyedByParent]]&lt;br /&gt;
| [[#Disabled]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#DistributeCapturedInputs]]&lt;br /&gt;
| [[#DragMovingEnabled]]&lt;br /&gt;
| [[#EWSizingCursorImage]]&lt;br /&gt;
| [[#Font]]&lt;br /&gt;
| [[#FrameEnabled]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#HorizontalAlignment]]&lt;br /&gt;
| [[#ID]]&lt;br /&gt;
| [[#InheritsAlpha]]&lt;br /&gt;
| [[#InheritsTooltipText]]&lt;br /&gt;
| [[#LookNFeel]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#MouseButtonDownAutoRepeat]]&lt;br /&gt;
| [[#MouseCursorImage]]&lt;br /&gt;
| [[#MousePassThroughEnabled]]&lt;br /&gt;
| [[#NESWSizingCursorImage]]&lt;br /&gt;
| [[#NSSizingCursorImage]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#NWSESizingCursorImage]]&lt;br /&gt;
| [[#RestoreOldCapture]]&lt;br /&gt;
| [[#RiseOnClick]]&lt;br /&gt;
| [[#RollUpEnabled]]&lt;br /&gt;
| [[#RollUpState]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#SizingBorderThickness]]&lt;br /&gt;
| [[#SizingEnabled]]&lt;br /&gt;
| [[#Text]]&lt;br /&gt;
| [[#TitlebarEnabled]]&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#TitlebarFont]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Tooltip]]&lt;br /&gt;
| [[#UnifiedAreaRect]]&lt;br /&gt;
| [[#UnifiedHeight]]&lt;br /&gt;
| [[#UnifiedMaxSize]]&lt;br /&gt;
| [[#UnifiedMinSize]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedPosition]]&lt;br /&gt;
| [[#UnifiedSize]]&lt;br /&gt;
| [[#UnifiedWidth]]&lt;br /&gt;
| [[#UnifiedXPosition]]&lt;br /&gt;
| [[#UnifiedYPosition]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#VerticalAlignment]]&lt;br /&gt;
| [[#Visible]]&lt;br /&gt;
| [[#WantsMultiClickEvents]]&lt;br /&gt;
| [[#WindowRenderer]]&lt;br /&gt;
| [[#ZOrderChangeEnabled]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== HorizontalScrollbar ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;  border=&amp;quot;1&amp;quot; &lt;br /&gt;
| [[#Alpha]]&lt;br /&gt;
| [[#AlwaysOnTop]]&lt;br /&gt;
| [[#AutoRepeatDelay]]&lt;br /&gt;
| [[#AutoRepeatRate]]&lt;br /&gt;
| [[#ClippedByParent]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CustomTooltipType]]&lt;br /&gt;
| [[#DestroyedByParent]]&lt;br /&gt;
| [[#Disabled]]&lt;br /&gt;
| [[#DistributeCapturedInputs]]&lt;br /&gt;
| [[#DocumentSize]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Font]]&lt;br /&gt;
| [[#HorizontalAlignment]]&lt;br /&gt;
| [[#ID]]&lt;br /&gt;
| [[#InheritsAlpha]]&lt;br /&gt;
| [[#InheritsTooltipText]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#LookNFeel]]&lt;br /&gt;
| [[#MouseButtonDownAutoRepeat]]&lt;br /&gt;
| [[#MouseCursorImage]]&lt;br /&gt;
| [[#MousePassThroughEnabled]]&lt;br /&gt;
| [[#OverlapSize]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#PageSize]]&lt;br /&gt;
| [[#RestoreOldCapture]]&lt;br /&gt;
| [[#RiseOnClick]]&lt;br /&gt;
| [[#ScrollPosition]]&lt;br /&gt;
| [[#StepSize]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Text]]&lt;br /&gt;
| [[#Tooltip]]&lt;br /&gt;
| [[#UnifiedAreaRect]]&lt;br /&gt;
| [[#UnifiedHeight]]&lt;br /&gt;
| [[#UnifiedMaxSize]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedMinSize]]&lt;br /&gt;
| [[#UnifiedPosition]]&lt;br /&gt;
| [[#UnifiedSize]]&lt;br /&gt;
| [[#UnifiedWidth]]&lt;br /&gt;
| [[#UnifiedXPosition]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedYPosition]]&lt;br /&gt;
| [[#VerticalAlignment]]&lt;br /&gt;
| [[#VerticalScrollbar]]&lt;br /&gt;
| [[#Visible]]&lt;br /&gt;
| [[#WantsMultiClickEvents]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#WindowRenderer]]&lt;br /&gt;
| [[#ZOrderChangeEnabled]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== HorizontalScrollbarThumb ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;  border=&amp;quot;1&amp;quot; &lt;br /&gt;
| [[#Alpha]]&lt;br /&gt;
| [[#AlwaysOnTop]]&lt;br /&gt;
| [[#AutoRepeatDelay]]&lt;br /&gt;
| [[#AutoRepeatRate]]&lt;br /&gt;
| [[#ClippedByParent]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CustomTooltipType]]&lt;br /&gt;
| [[#DestroyedByParent]]&lt;br /&gt;
| [[#Disabled]]&lt;br /&gt;
| [[#DistributeCapturedInputs]]&lt;br /&gt;
| [[#Font]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#HorizontalAlignment]]&lt;br /&gt;
| [[#HorzFree]]&lt;br /&gt;
| [[#HorzRange]]&lt;br /&gt;
| [[#HotTracked]]&lt;br /&gt;
| [[#ID]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#InheritsAlpha]]&lt;br /&gt;
| [[#InheritsTooltipText]]&lt;br /&gt;
| [[#LookNFeel]]&lt;br /&gt;
| [[#MouseButtonDownAutoRepeat]]&lt;br /&gt;
| [[#MouseCursorImage]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#MousePassThroughEnabled]]&lt;br /&gt;
| [[#RestoreOldCapture]]&lt;br /&gt;
| [[#RiseOnClick]]&lt;br /&gt;
| [[#Text]]&lt;br /&gt;
| [[#Tooltip]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedAreaRect]]&lt;br /&gt;
| [[#UnifiedHeight]]&lt;br /&gt;
| [[#UnifiedMaxSize]]&lt;br /&gt;
| [[#UnifiedMinSize]]&lt;br /&gt;
| [[#UnifiedPosition]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedSize]]&lt;br /&gt;
| [[#UnifiedWidth]]&lt;br /&gt;
| [[#UnifiedXPosition]]&lt;br /&gt;
| [[#UnifiedYPosition]]&lt;br /&gt;
| [[#VertFree]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#VertRange]]&lt;br /&gt;
| [[#VerticalAlignment]]&lt;br /&gt;
| [[#Visible]]&lt;br /&gt;
| [[#WantsMultiClickEvents]]&lt;br /&gt;
| [[#WindowRenderer]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#ZOrderChangeEnabled]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== IconButton ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;  border=&amp;quot;1&amp;quot; &lt;br /&gt;
| [[#Alpha]]&lt;br /&gt;
| [[#AlwaysOnTop]]&lt;br /&gt;
| [[#AutoRepeatDelay]]&lt;br /&gt;
| [[#AutoRepeatRate]]&lt;br /&gt;
| [[#ClippedByParent]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CustomTooltipType]]&lt;br /&gt;
| [[#DestroyedByParent]]&lt;br /&gt;
| [[#Disabled]]&lt;br /&gt;
| [[#DistributeCapturedInputs]]&lt;br /&gt;
| [[#Font]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#HorizontalAlignment]]&lt;br /&gt;
| [[#ID]]&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#IconColours]]&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#IconImage]]&lt;br /&gt;
| [[#InheritsAlpha]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#InheritsTooltipText]]&lt;br /&gt;
| [[#LookNFeel]]&lt;br /&gt;
| [[#MouseButtonDownAutoRepeat]]&lt;br /&gt;
| [[#MouseCursorImage]]&lt;br /&gt;
| [[#MousePassThroughEnabled]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#RestoreOldCapture]]&lt;br /&gt;
| [[#RiseOnClick]]&lt;br /&gt;
| [[#Text]]&lt;br /&gt;
| [[#Tooltip]]&lt;br /&gt;
| [[#UnifiedAreaRect]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedHeight]]&lt;br /&gt;
| [[#UnifiedMaxSize]]&lt;br /&gt;
| [[#UnifiedMinSize]]&lt;br /&gt;
| [[#UnifiedPosition]]&lt;br /&gt;
| [[#UnifiedSize]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedWidth]]&lt;br /&gt;
| [[#UnifiedXPosition]]&lt;br /&gt;
| [[#UnifiedYPosition]]&lt;br /&gt;
| [[#VerticalAlignment]]&lt;br /&gt;
| [[#Visible]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#WantsMultiClickEvents]]&lt;br /&gt;
| [[#WindowRenderer]]&lt;br /&gt;
| [[#ZOrderChangeEnabled]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== ItemListbox ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;  border=&amp;quot;1&amp;quot; &lt;br /&gt;
| [[#Alpha]]&lt;br /&gt;
| [[#AlwaysOnTop]]&lt;br /&gt;
| [[#AutoRepeatDelay]]&lt;br /&gt;
| [[#AutoRepeatRate]]&lt;br /&gt;
| [[#AutoResizeEnabled]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#ClippedByParent]]&lt;br /&gt;
| [[#CustomTooltipType]]&lt;br /&gt;
| [[#DestroyedByParent]]&lt;br /&gt;
| [[#Disabled]]&lt;br /&gt;
| [[#DistributeCapturedInputs]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Font]]&lt;br /&gt;
| [[#ForceHorzScrollbar]]&lt;br /&gt;
| [[#ForceVertScrollbar]]&lt;br /&gt;
| [[#HorizontalAlignment]]&lt;br /&gt;
| [[#ID]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#InheritsAlpha]]&lt;br /&gt;
| [[#InheritsTooltipText]]&lt;br /&gt;
| [[#LookNFeel]]&lt;br /&gt;
| [[#MouseButtonDownAutoRepeat]]&lt;br /&gt;
| [[#MouseCursorImage]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#MousePassThroughEnabled]]&lt;br /&gt;
| [[#MultiSelect]]&lt;br /&gt;
| [[#RestoreOldCapture]]&lt;br /&gt;
| [[#RiseOnClick]]&lt;br /&gt;
| [[#SortEnabled]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#SortMode]]&lt;br /&gt;
| [[#Text]]&lt;br /&gt;
| [[#Tooltip]]&lt;br /&gt;
| [[#UnifiedAreaRect]]&lt;br /&gt;
| [[#UnifiedHeight]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedMaxSize]]&lt;br /&gt;
| [[#UnifiedMinSize]]&lt;br /&gt;
| [[#UnifiedPosition]]&lt;br /&gt;
| [[#UnifiedSize]]&lt;br /&gt;
| [[#UnifiedWidth]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedXPosition]]&lt;br /&gt;
| [[#UnifiedYPosition]]&lt;br /&gt;
| [[#VerticalAlignment]]&lt;br /&gt;
| [[#Visible]]&lt;br /&gt;
| [[#WantsMultiClickEvents]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#WindowRenderer]]&lt;br /&gt;
| [[#ZOrderChangeEnabled]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== ListHeader ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;  border=&amp;quot;1&amp;quot; &lt;br /&gt;
| [[#Alpha]]&lt;br /&gt;
| [[#AlwaysOnTop]]&lt;br /&gt;
| [[#AutoRepeatDelay]]&lt;br /&gt;
| [[#AutoRepeatRate]]&lt;br /&gt;
| [[#ClippedByParent]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#ColumnsMovable]]&lt;br /&gt;
| [[#ColumnsSizable]]&lt;br /&gt;
| [[#CustomTooltipType]]&lt;br /&gt;
| [[#DestroyedByParent]]&lt;br /&gt;
| [[#Disabled]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#DistributeCapturedInputs]]&lt;br /&gt;
| [[#Font]]&lt;br /&gt;
| [[#HorizontalAlignment]]&lt;br /&gt;
| [[#ID]]&lt;br /&gt;
| [[#InheritsAlpha]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#InheritsTooltipText]]&lt;br /&gt;
| [[#LookNFeel]]&lt;br /&gt;
| [[#MouseButtonDownAutoRepeat]]&lt;br /&gt;
| [[#MouseCursorImage]]&lt;br /&gt;
| [[#MousePassThroughEnabled]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#RestoreOldCapture]]&lt;br /&gt;
| [[#RiseOnClick]]&lt;br /&gt;
| [[#SegmentWidgetType]]&lt;br /&gt;
| [[#SortColumnID]]&lt;br /&gt;
| [[#SortDirection]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#SortSettingEnabled]]&lt;br /&gt;
| [[#Text]]&lt;br /&gt;
| [[#Tooltip]]&lt;br /&gt;
| [[#UnifiedAreaRect]]&lt;br /&gt;
| [[#UnifiedHeight]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedMaxSize]]&lt;br /&gt;
| [[#UnifiedMinSize]]&lt;br /&gt;
| [[#UnifiedPosition]]&lt;br /&gt;
| [[#UnifiedSize]]&lt;br /&gt;
| [[#UnifiedWidth]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedXPosition]]&lt;br /&gt;
| [[#UnifiedYPosition]]&lt;br /&gt;
| [[#VerticalAlignment]]&lt;br /&gt;
| [[#Visible]]&lt;br /&gt;
| [[#WantsMultiClickEvents]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#WindowRenderer]]&lt;br /&gt;
| [[#ZOrderChangeEnabled]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== ListHeaderSegment ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;  border=&amp;quot;1&amp;quot; &lt;br /&gt;
| [[#Alpha]]&lt;br /&gt;
| [[#AlwaysOnTop]]&lt;br /&gt;
| [[#AutoRepeatDelay]]&lt;br /&gt;
| [[#AutoRepeatRate]]&lt;br /&gt;
| [[#Clickable]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#ClippedByParent]]&lt;br /&gt;
| [[#CustomTooltipType]]&lt;br /&gt;
| [[#DestroyedByParent]]&lt;br /&gt;
| [[#Disabled]]&lt;br /&gt;
| [[#DistributeCapturedInputs]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Dragable]]&lt;br /&gt;
| [[#Font]]&lt;br /&gt;
| [[#HorizontalAlignment]]&lt;br /&gt;
| [[#ID]]&lt;br /&gt;
| [[#InheritsAlpha]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#InheritsTooltipText]]&lt;br /&gt;
| [[#LookNFeel]]&lt;br /&gt;
| [[#MouseButtonDownAutoRepeat]]&lt;br /&gt;
| [[#MouseCursorImage]]&lt;br /&gt;
| [[#MousePassThroughEnabled]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#MovingCursorImage]]&lt;br /&gt;
| [[#RestoreOldCapture]]&lt;br /&gt;
| [[#RiseOnClick]]&lt;br /&gt;
| [[#Sizable]]&lt;br /&gt;
| [[#SizingCursorImage]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#SortDirection]]&lt;br /&gt;
| [[#Text]]&lt;br /&gt;
| [[#Tooltip]]&lt;br /&gt;
| [[#UnifiedAreaRect]]&lt;br /&gt;
| [[#UnifiedHeight]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedMaxSize]]&lt;br /&gt;
| [[#UnifiedMinSize]]&lt;br /&gt;
| [[#UnifiedPosition]]&lt;br /&gt;
| [[#UnifiedSize]]&lt;br /&gt;
| [[#UnifiedWidth]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedXPosition]]&lt;br /&gt;
| [[#UnifiedYPosition]]&lt;br /&gt;
| [[#VerticalAlignment]]&lt;br /&gt;
| [[#Visible]]&lt;br /&gt;
| [[#WantsMultiClickEvents]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#WindowRenderer]]&lt;br /&gt;
| [[#ZOrderChangeEnabled]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Listbox ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;  border=&amp;quot;1&amp;quot; &lt;br /&gt;
| [[#Alpha]]&lt;br /&gt;
| [[#AlwaysOnTop]]&lt;br /&gt;
| [[#AutoRepeatDelay]]&lt;br /&gt;
| [[#AutoRepeatRate]]&lt;br /&gt;
| [[#ClippedByParent]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CustomTooltipType]]&lt;br /&gt;
| [[#DestroyedByParent]]&lt;br /&gt;
| [[#Disabled]]&lt;br /&gt;
| [[#DistributeCapturedInputs]]&lt;br /&gt;
| [[#Font]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#ForceHorzScrollbar]]&lt;br /&gt;
| [[#ForceVertScrollbar]]&lt;br /&gt;
| [[#HorizontalAlignment]]&lt;br /&gt;
| [[#ID]]&lt;br /&gt;
| [[#InheritsAlpha]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#InheritsTooltipText]]&lt;br /&gt;
| [[#ItemTooltips]]&lt;br /&gt;
| [[#LookNFeel]]&lt;br /&gt;
| [[#MouseButtonDownAutoRepeat]]&lt;br /&gt;
| [[#MouseCursorImage]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#MousePassThroughEnabled]]&lt;br /&gt;
| [[#MultiSelect]]&lt;br /&gt;
| [[#RestoreOldCapture]]&lt;br /&gt;
| [[#RiseOnClick]]&lt;br /&gt;
| [[#Sort]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Text]]&lt;br /&gt;
| [[#Tooltip]]&lt;br /&gt;
| [[#UnifiedAreaRect]]&lt;br /&gt;
| [[#UnifiedHeight]]&lt;br /&gt;
| [[#UnifiedMaxSize]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedMinSize]]&lt;br /&gt;
| [[#UnifiedPosition]]&lt;br /&gt;
| [[#UnifiedSize]]&lt;br /&gt;
| [[#UnifiedWidth]]&lt;br /&gt;
| [[#UnifiedXPosition]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedYPosition]]&lt;br /&gt;
| [[#VerticalAlignment]]&lt;br /&gt;
| [[#Visible]]&lt;br /&gt;
| [[#WantsMultiClickEvents]]&lt;br /&gt;
| [[#WindowRenderer]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#ZOrderChangeEnabled]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== ListboxItem ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;  border=&amp;quot;1&amp;quot; &lt;br /&gt;
| [[#Alpha]]&lt;br /&gt;
| [[#AlwaysOnTop]]&lt;br /&gt;
| [[#AutoRepeatDelay]]&lt;br /&gt;
| [[#AutoRepeatRate]]&lt;br /&gt;
| [[#ClippedByParent]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CustomTooltipType]]&lt;br /&gt;
| [[#DestroyedByParent]]&lt;br /&gt;
| [[#Disabled]]&lt;br /&gt;
| [[#DistributeCapturedInputs]]&lt;br /&gt;
| [[#Font]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#HorizontalAlignment]]&lt;br /&gt;
| [[#ID]]&lt;br /&gt;
| [[#InheritsAlpha]]&lt;br /&gt;
| [[#InheritsTooltipText]]&lt;br /&gt;
| [[#LookNFeel]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#MouseButtonDownAutoRepeat]]&lt;br /&gt;
| [[#MouseCursorImage]]&lt;br /&gt;
| [[#MousePassThroughEnabled]]&lt;br /&gt;
| [[#RestoreOldCapture]]&lt;br /&gt;
| [[#RiseOnClick]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Selectable]]&lt;br /&gt;
| [[#Selected]]&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#SelectedTextColour]]&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#SelectionBrush]]&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#SelectionColour]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Text]]&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#TextColour]]&lt;br /&gt;
| [[#Tooltip]]&lt;br /&gt;
| [[#UnifiedAreaRect]]&lt;br /&gt;
| [[#UnifiedHeight]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedMaxSize]]&lt;br /&gt;
| [[#UnifiedMinSize]]&lt;br /&gt;
| [[#UnifiedPosition]]&lt;br /&gt;
| [[#UnifiedSize]]&lt;br /&gt;
| [[#UnifiedWidth]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedXPosition]]&lt;br /&gt;
| [[#UnifiedYPosition]]&lt;br /&gt;
| [[#VerticalAlignment]]&lt;br /&gt;
| [[#Visible]]&lt;br /&gt;
| [[#WantsMultiClickEvents]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#WindowRenderer]]&lt;br /&gt;
| [[#ZOrderChangeEnabled]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== MenuItem ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;  border=&amp;quot;1&amp;quot; &lt;br /&gt;
| [[#Alpha]]&lt;br /&gt;
| [[#AlwaysOnTop]]&lt;br /&gt;
| [[#AutoRepeatDelay]]&lt;br /&gt;
| [[#AutoRepeatRate]]&lt;br /&gt;
| [[#ClippedByParent]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CustomTooltipType]]&lt;br /&gt;
| [[#DestroyedByParent]]&lt;br /&gt;
| [[#Disabled]]&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#DisabledTextColour]]&lt;br /&gt;
| [[#DistributeCapturedInputs]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Font]]&lt;br /&gt;
| [[#HorizontalAlignment]]&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#HoverColour]]&lt;br /&gt;
| [[#ID]]&lt;br /&gt;
| [[#InheritsAlpha]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#InheritsTooltipText]]&lt;br /&gt;
| [[#LookNFeel]]&lt;br /&gt;
| [[#MouseButtonDownAutoRepeat]]&lt;br /&gt;
| [[#MouseCursorImage]]&lt;br /&gt;
| [[#MousePassThroughEnabled]]&lt;br /&gt;
|-&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#NormalTextColour]]&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#OpenedColour]]&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#PushedColour]]&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#PushedOffColour]]&lt;br /&gt;
| [[#RestoreOldCapture]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#RiseOnClick]]&lt;br /&gt;
| [[#Selectable]]&lt;br /&gt;
| [[#Selected]]&lt;br /&gt;
| [[#Text]]&lt;br /&gt;
| [[#Tooltip]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedAreaRect]]&lt;br /&gt;
| [[#UnifiedHeight]]&lt;br /&gt;
| [[#UnifiedMaxSize]]&lt;br /&gt;
| [[#UnifiedMinSize]]&lt;br /&gt;
| [[#UnifiedPosition]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedSize]]&lt;br /&gt;
| [[#UnifiedWidth]]&lt;br /&gt;
| [[#UnifiedXPosition]]&lt;br /&gt;
| [[#UnifiedYPosition]]&lt;br /&gt;
| [[#VerticalAlignment]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Visible]]&lt;br /&gt;
| [[#WantsMultiClickEvents]]&lt;br /&gt;
| [[#WindowRenderer]]&lt;br /&gt;
| [[#ZOrderChangeEnabled]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Menubar ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;  border=&amp;quot;1&amp;quot; &lt;br /&gt;
| [[#AllowMultiplePopups]]&lt;br /&gt;
| [[#Alpha]]&lt;br /&gt;
| [[#AlwaysOnTop]]&lt;br /&gt;
| [[#AutoRepeatDelay]]&lt;br /&gt;
| [[#AutoRepeatRate]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#AutoResizeEnabled]]&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#BackgroundColours]]&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#BorderWidth]]&lt;br /&gt;
| [[#ClippedByParent]]&lt;br /&gt;
| [[#CustomTooltipType]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#DestroyedByParent]]&lt;br /&gt;
| [[#Disabled]]&lt;br /&gt;
| [[#DistributeCapturedInputs]]&lt;br /&gt;
| [[#Font]]&lt;br /&gt;
| [[#HorizontalAlignment]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#ID]]&lt;br /&gt;
| [[#InheritsAlpha]]&lt;br /&gt;
| [[#InheritsTooltipText]]&lt;br /&gt;
| [[#ItemSpacing]]&lt;br /&gt;
| [[#LookNFeel]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#MouseButtonDownAutoRepeat]]&lt;br /&gt;
| [[#MouseCursorImage]]&lt;br /&gt;
| [[#MousePassThroughEnabled]]&lt;br /&gt;
| [[#RestoreOldCapture]]&lt;br /&gt;
| [[#RiseOnClick]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#SortEnabled]]&lt;br /&gt;
| [[#SortMode]]&lt;br /&gt;
| [[#Text]]&lt;br /&gt;
| [[#Tooltip]]&lt;br /&gt;
| [[#UnifiedAreaRect]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedHeight]]&lt;br /&gt;
| [[#UnifiedMaxSize]]&lt;br /&gt;
| [[#UnifiedMinSize]]&lt;br /&gt;
| [[#UnifiedPosition]]&lt;br /&gt;
| [[#UnifiedSize]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedWidth]]&lt;br /&gt;
| [[#UnifiedXPosition]]&lt;br /&gt;
| [[#UnifiedYPosition]]&lt;br /&gt;
| [[#VerticalAlignment]]&lt;br /&gt;
| [[#Visible]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#WantsMultiClickEvents]]&lt;br /&gt;
| [[#WindowRenderer]]&lt;br /&gt;
| [[#ZOrderChangeEnabled]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== MultiColumnList ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;  border=&amp;quot;1&amp;quot; &lt;br /&gt;
| [[#Alpha]]&lt;br /&gt;
| [[#AlwaysOnTop]]&lt;br /&gt;
| [[#AutoRepeatDelay]]&lt;br /&gt;
| [[#AutoRepeatRate]]&lt;br /&gt;
| [[#ClippedByParent]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#ColumnHeader]]&lt;br /&gt;
| [[#ColumnsMovable]]&lt;br /&gt;
| [[#ColumnsSizable]]&lt;br /&gt;
| [[#CustomTooltipType]]&lt;br /&gt;
| [[#DestroyedByParent]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Disabled]]&lt;br /&gt;
| [[#DistributeCapturedInputs]]&lt;br /&gt;
| [[#Font]]&lt;br /&gt;
| [[#ForceHorzScrollbar]]&lt;br /&gt;
| [[#ForceVertScrollbar]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#HorizontalAlignment]]&lt;br /&gt;
| [[#ID]]&lt;br /&gt;
| [[#InheritsAlpha]]&lt;br /&gt;
| [[#InheritsTooltipText]]&lt;br /&gt;
| [[#LookNFeel]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#MouseButtonDownAutoRepeat]]&lt;br /&gt;
| [[#MouseCursorImage]]&lt;br /&gt;
| [[#MousePassThroughEnabled]]&lt;br /&gt;
| [[#NominatedSelectionColumnID]]&lt;br /&gt;
| [[#NominatedSelectionRow]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#RestoreOldCapture]]&lt;br /&gt;
| [[#RiseOnClick]]&lt;br /&gt;
| [[#RowCount]]&lt;br /&gt;
| [[#SelectionMode]]&lt;br /&gt;
| [[#SortColumnID]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#SortDirection]]&lt;br /&gt;
| [[#SortSettingEnabled]]&lt;br /&gt;
| [[#Text]]&lt;br /&gt;
| [[#Tooltip]]&lt;br /&gt;
| [[#UnifiedAreaRect]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedHeight]]&lt;br /&gt;
| [[#UnifiedMaxSize]]&lt;br /&gt;
| [[#UnifiedMinSize]]&lt;br /&gt;
| [[#UnifiedPosition]]&lt;br /&gt;
| [[#UnifiedSize]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedWidth]]&lt;br /&gt;
| [[#UnifiedXPosition]]&lt;br /&gt;
| [[#UnifiedYPosition]]&lt;br /&gt;
| [[#VerticalAlignment]]&lt;br /&gt;
| [[#Visible]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#WantsMultiClickEvents]]&lt;br /&gt;
| [[#WindowRenderer]]&lt;br /&gt;
| [[#ZOrderChangeEnabled]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== MultiLineEditbox ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;  border=&amp;quot;1&amp;quot; &lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#ActiveSelectionColour]]&lt;br /&gt;
| [[#Alpha]]&lt;br /&gt;
| [[#AlwaysOnTop]]&lt;br /&gt;
| [[#AutoRepeatDelay]]&lt;br /&gt;
| [[#AutoRepeatRate]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CaratIndex]]&lt;br /&gt;
| [[#ClippedByParent]]&lt;br /&gt;
| [[#CustomTooltipType]]&lt;br /&gt;
| [[#DestroyedByParent]]&lt;br /&gt;
| [[#Disabled]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#DistributeCapturedInputs]]&lt;br /&gt;
| [[#Font]]&lt;br /&gt;
| [[#HorizontalAlignment]]&lt;br /&gt;
| [[#ID]]&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#InactiveSelectionColour]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#InheritsAlpha]]&lt;br /&gt;
| [[#InheritsTooltipText]]&lt;br /&gt;
| [[#LookNFeel]]&lt;br /&gt;
| [[#MaxTextLength]]&lt;br /&gt;
| [[#MouseButtonDownAutoRepeat]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#MouseCursorImage]]&lt;br /&gt;
| [[#MousePassThroughEnabled]]&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#NormalTextColour]]&lt;br /&gt;
| [[#ReadOnly]]&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#ReadOnlyBGColour]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#RestoreOldCapture]]&lt;br /&gt;
| [[#RiseOnClick]]&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#SelectedTextColour]]&lt;br /&gt;
| [[#SelectionBrushImage]]&lt;br /&gt;
| [[#SelectionLength]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#SelectionStart]]&lt;br /&gt;
| [[#Text]]&lt;br /&gt;
| [[#Tooltip]]&lt;br /&gt;
| [[#UnifiedAreaRect]]&lt;br /&gt;
| [[#UnifiedHeight]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedMaxSize]]&lt;br /&gt;
| [[#UnifiedMinSize]]&lt;br /&gt;
| [[#UnifiedPosition]]&lt;br /&gt;
| [[#UnifiedSize]]&lt;br /&gt;
| [[#UnifiedWidth]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedXPosition]]&lt;br /&gt;
| [[#UnifiedYPosition]]&lt;br /&gt;
| [[#VerticalAlignment]]&lt;br /&gt;
| [[#Visible]]&lt;br /&gt;
| [[#WantsMultiClickEvents]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#WindowRenderer]]&lt;br /&gt;
| [[#WordWrap]]&lt;br /&gt;
| [[#ZOrderChangeEnabled]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== PopupMenu ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;  border=&amp;quot;1&amp;quot; &lt;br /&gt;
| [[#AllowMultiplePopups]]&lt;br /&gt;
| [[#Alpha]]&lt;br /&gt;
| [[#AlwaysOnTop]]&lt;br /&gt;
| [[#AutoRepeatDelay]]&lt;br /&gt;
| [[#AutoRepeatRate]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#AutoResizeEnabled]]&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#BackgroundColours]]&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#BorderWidth]]&lt;br /&gt;
| [[#ClippedByParent]]&lt;br /&gt;
| [[#CustomTooltipType]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#DestroyedByParent]]&lt;br /&gt;
| [[#Disabled]]&lt;br /&gt;
| [[#DistributeCapturedInputs]]&lt;br /&gt;
| [[#FadeInTime]]&lt;br /&gt;
| [[#FadeOutTime]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Font]]&lt;br /&gt;
| [[#HorizontalAlignment]]&lt;br /&gt;
| [[#ID]]&lt;br /&gt;
| [[#InheritsAlpha]]&lt;br /&gt;
| [[#InheritsTooltipText]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#ItemSpacing]]&lt;br /&gt;
| [[#LookNFeel]]&lt;br /&gt;
| [[#MouseButtonDownAutoRepeat]]&lt;br /&gt;
| [[#MouseCursorImage]]&lt;br /&gt;
| [[#MousePassThroughEnabled]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#RestoreOldCapture]]&lt;br /&gt;
| [[#RiseOnClick]]&lt;br /&gt;
| [[#SortEnabled]]&lt;br /&gt;
| [[#SortMode]]&lt;br /&gt;
| [[#Text]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Tooltip]]&lt;br /&gt;
| [[#UnifiedAreaRect]]&lt;br /&gt;
| [[#UnifiedHeight]]&lt;br /&gt;
| [[#UnifiedMaxSize]]&lt;br /&gt;
| [[#UnifiedMinSize]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedPosition]]&lt;br /&gt;
| [[#UnifiedSize]]&lt;br /&gt;
| [[#UnifiedWidth]]&lt;br /&gt;
| [[#UnifiedXPosition]]&lt;br /&gt;
| [[#UnifiedYPosition]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#VerticalAlignment]]&lt;br /&gt;
| [[#Visible]]&lt;br /&gt;
| [[#WantsMultiClickEvents]]&lt;br /&gt;
| [[#WindowRenderer]]&lt;br /&gt;
| [[#ZOrderChangeEnabled]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== ProgressBar ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;  border=&amp;quot;1&amp;quot; &lt;br /&gt;
| [[#Alpha]]&lt;br /&gt;
| [[#AlwaysOnTop]]&lt;br /&gt;
| [[#AutoRepeatDelay]]&lt;br /&gt;
| [[#AutoRepeatRate]]&lt;br /&gt;
| [[#ClippedByParent]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CurrentProgress]]&lt;br /&gt;
| [[#CustomTooltipType]]&lt;br /&gt;
| [[#DestroyedByParent]]&lt;br /&gt;
| [[#Disabled]]&lt;br /&gt;
| [[#DistributeCapturedInputs]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Font]]&lt;br /&gt;
| [[#HorizontalAlignment]]&lt;br /&gt;
| [[#ID]]&lt;br /&gt;
| [[#InheritsAlpha]]&lt;br /&gt;
| [[#InheritsTooltipText]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#LookNFeel]]&lt;br /&gt;
| [[#MouseButtonDownAutoRepeat]]&lt;br /&gt;
| [[#MouseCursorImage]]&lt;br /&gt;
| [[#MousePassThroughEnabled]]&lt;br /&gt;
| [[#RestoreOldCapture]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#ReversedProgress]]&lt;br /&gt;
| [[#RiseOnClick]]&lt;br /&gt;
| [[#StepSize]]&lt;br /&gt;
| [[#Text]]&lt;br /&gt;
| [[#Tooltip]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedAreaRect]]&lt;br /&gt;
| [[#UnifiedHeight]]&lt;br /&gt;
| [[#UnifiedMaxSize]]&lt;br /&gt;
| [[#UnifiedMinSize]]&lt;br /&gt;
| [[#UnifiedPosition]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedSize]]&lt;br /&gt;
| [[#UnifiedWidth]]&lt;br /&gt;
| [[#UnifiedXPosition]]&lt;br /&gt;
| [[#UnifiedYPosition]]&lt;br /&gt;
| [[#VerticalAlignment]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#VerticalProgress]]&lt;br /&gt;
| [[#Visible]]&lt;br /&gt;
| [[#WantsMultiClickEvents]]&lt;br /&gt;
| [[#WindowRenderer]]&lt;br /&gt;
| [[#ZOrderChangeEnabled]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== RadioButton ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;  border=&amp;quot;1&amp;quot; &lt;br /&gt;
| [[#Alpha]]&lt;br /&gt;
| [[#AlwaysOnTop]]&lt;br /&gt;
| [[#AutoRepeatDelay]]&lt;br /&gt;
| [[#AutoRepeatRate]]&lt;br /&gt;
| [[#ClippedByParent]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CustomTooltipType]]&lt;br /&gt;
| [[#DestroyedByParent]]&lt;br /&gt;
| [[#Disabled]]&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#DisabledTextColour]]&lt;br /&gt;
| [[#DistributeCapturedInputs]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Font]]&lt;br /&gt;
| [[#GroupID]]&lt;br /&gt;
| [[#HorizontalAlignment]]&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#HoverTextColour]]&lt;br /&gt;
| [[#ID]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#InheritsAlpha]]&lt;br /&gt;
| [[#InheritsTooltipText]]&lt;br /&gt;
| [[#LookNFeel]]&lt;br /&gt;
| [[#MouseButtonDownAutoRepeat]]&lt;br /&gt;
| [[#MouseCursorImage]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#MousePassThroughEnabled]]&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#NormalTextColour]]&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#PushedTextColour]]&lt;br /&gt;
| [[#RestoreOldCapture]]&lt;br /&gt;
| [[#RiseOnClick]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Selected]]&lt;br /&gt;
| [[#Text]]&lt;br /&gt;
| [[#Tooltip]]&lt;br /&gt;
| [[#UnifiedAreaRect]]&lt;br /&gt;
| [[#UnifiedHeight]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedMaxSize]]&lt;br /&gt;
| [[#UnifiedMinSize]]&lt;br /&gt;
| [[#UnifiedPosition]]&lt;br /&gt;
| [[#UnifiedSize]]&lt;br /&gt;
| [[#UnifiedWidth]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedXPosition]]&lt;br /&gt;
| [[#UnifiedYPosition]]&lt;br /&gt;
| [[#VerticalAlignment]]&lt;br /&gt;
| [[#Visible]]&lt;br /&gt;
| [[#WantsMultiClickEvents]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#WindowRenderer]]&lt;br /&gt;
| [[#ZOrderChangeEnabled]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== ScrollablePane ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;  border=&amp;quot;1&amp;quot; &lt;br /&gt;
| [[#Alpha]]&lt;br /&gt;
| [[#AlwaysOnTop]]&lt;br /&gt;
| [[#AutoRepeatDelay]]&lt;br /&gt;
| [[#AutoRepeatRate]]&lt;br /&gt;
| [[#ClippedByParent]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#ContentArea]]&lt;br /&gt;
| [[#ContentPaneAutoSized]]&lt;br /&gt;
| [[#CustomTooltipType]]&lt;br /&gt;
| [[#DestroyedByParent]]&lt;br /&gt;
| [[#Disabled]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#DistributeCapturedInputs]]&lt;br /&gt;
| [[#Font]]&lt;br /&gt;
| [[#ForceHorzScrollbar]]&lt;br /&gt;
| [[#ForceVertScrollbar]]&lt;br /&gt;
| [[#HorizontalAlignment]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#HorzOverlapSize]]&lt;br /&gt;
| [[#HorzScrollPosition]]&lt;br /&gt;
| [[#HorzStepSize]]&lt;br /&gt;
| [[#ID]]&lt;br /&gt;
| [[#InheritsAlpha]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#InheritsTooltipText]]&lt;br /&gt;
| [[#LookNFeel]]&lt;br /&gt;
| [[#MouseButtonDownAutoRepeat]]&lt;br /&gt;
| [[#MouseCursorImage]]&lt;br /&gt;
| [[#MousePassThroughEnabled]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#RestoreOldCapture]]&lt;br /&gt;
| [[#RiseOnClick]]&lt;br /&gt;
| [[#Text]]&lt;br /&gt;
| [[#Tooltip]]&lt;br /&gt;
| [[#UnifiedAreaRect]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedHeight]]&lt;br /&gt;
| [[#UnifiedMaxSize]]&lt;br /&gt;
| [[#UnifiedMinSize]]&lt;br /&gt;
| [[#UnifiedPosition]]&lt;br /&gt;
| [[#UnifiedSize]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedWidth]]&lt;br /&gt;
| [[#UnifiedXPosition]]&lt;br /&gt;
| [[#UnifiedYPosition]]&lt;br /&gt;
| [[#VertOverlapSize]]&lt;br /&gt;
| [[#VertScrollPosition]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#VertStepSize]]&lt;br /&gt;
| [[#VerticalAlignment]]&lt;br /&gt;
| [[#Visible]]&lt;br /&gt;
| [[#WantsMultiClickEvents]]&lt;br /&gt;
| [[#WindowRenderer]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#ZOrderChangeEnabled]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Slider ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;  border=&amp;quot;1&amp;quot; &lt;br /&gt;
| [[#Alpha]]&lt;br /&gt;
| [[#AlwaysOnTop]]&lt;br /&gt;
| [[#AutoRepeatDelay]]&lt;br /&gt;
| [[#AutoRepeatRate]]&lt;br /&gt;
| [[#ClickStepSize]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#ClippedByParent]]&lt;br /&gt;
| [[#CurrentValue]]&lt;br /&gt;
| [[#CustomTooltipType]]&lt;br /&gt;
| [[#DestroyedByParent]]&lt;br /&gt;
| [[#Disabled]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#DistributeCapturedInputs]]&lt;br /&gt;
| [[#Font]]&lt;br /&gt;
| [[#HorizontalAlignment]]&lt;br /&gt;
| [[#ID]]&lt;br /&gt;
| [[#InheritsAlpha]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#InheritsTooltipText]]&lt;br /&gt;
| [[#LookNFeel]]&lt;br /&gt;
| [[#MaximumValue]]&lt;br /&gt;
| [[#MouseButtonDownAutoRepeat]]&lt;br /&gt;
| [[#MouseCursorImage]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#MousePassThroughEnabled]]&lt;br /&gt;
| [[#RestoreOldCapture]]&lt;br /&gt;
| [[#ReversedDirection]]&lt;br /&gt;
| [[#RiseOnClick]]&lt;br /&gt;
| [[#Text]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Tooltip]]&lt;br /&gt;
| [[#UnifiedAreaRect]]&lt;br /&gt;
| [[#UnifiedHeight]]&lt;br /&gt;
| [[#UnifiedMaxSize]]&lt;br /&gt;
| [[#UnifiedMinSize]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedPosition]]&lt;br /&gt;
| [[#UnifiedSize]]&lt;br /&gt;
| [[#UnifiedWidth]]&lt;br /&gt;
| [[#UnifiedXPosition]]&lt;br /&gt;
| [[#UnifiedYPosition]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#VerticalAlignment]]&lt;br /&gt;
| [[#VerticalSlider]]&lt;br /&gt;
| [[#Visible]]&lt;br /&gt;
| [[#WantsMultiClickEvents]]&lt;br /&gt;
| [[#WindowRenderer]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#ZOrderChangeEnabled]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== SliderThumb ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;  border=&amp;quot;1&amp;quot; &lt;br /&gt;
| [[#Alpha]]&lt;br /&gt;
| [[#AlwaysOnTop]]&lt;br /&gt;
| [[#AutoRepeatDelay]]&lt;br /&gt;
| [[#AutoRepeatRate]]&lt;br /&gt;
| [[#ClippedByParent]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CustomTooltipType]]&lt;br /&gt;
| [[#DestroyedByParent]]&lt;br /&gt;
| [[#Disabled]]&lt;br /&gt;
| [[#DistributeCapturedInputs]]&lt;br /&gt;
| [[#Font]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#HorizontalAlignment]]&lt;br /&gt;
| [[#HorzFree]]&lt;br /&gt;
| [[#HorzRange]]&lt;br /&gt;
| [[#HotTracked]]&lt;br /&gt;
| [[#ID]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#InheritsAlpha]]&lt;br /&gt;
| [[#InheritsTooltipText]]&lt;br /&gt;
| [[#LookNFeel]]&lt;br /&gt;
| [[#MouseButtonDownAutoRepeat]]&lt;br /&gt;
| [[#MouseCursorImage]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#MousePassThroughEnabled]]&lt;br /&gt;
| [[#RestoreOldCapture]]&lt;br /&gt;
| [[#RiseOnClick]]&lt;br /&gt;
| [[#Text]]&lt;br /&gt;
| [[#Tooltip]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedAreaRect]]&lt;br /&gt;
| [[#UnifiedHeight]]&lt;br /&gt;
| [[#UnifiedMaxSize]]&lt;br /&gt;
| [[#UnifiedMinSize]]&lt;br /&gt;
| [[#UnifiedPosition]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedSize]]&lt;br /&gt;
| [[#UnifiedWidth]]&lt;br /&gt;
| [[#UnifiedXPosition]]&lt;br /&gt;
| [[#UnifiedYPosition]]&lt;br /&gt;
| [[#VertFree]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#VertRange]]&lt;br /&gt;
| [[#VerticalAlignment]]&lt;br /&gt;
| [[#Visible]]&lt;br /&gt;
| [[#WantsMultiClickEvents]]&lt;br /&gt;
| [[#WindowRenderer]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#ZOrderChangeEnabled]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Spinner ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;  border=&amp;quot;1&amp;quot; &lt;br /&gt;
| [[#Alpha]]&lt;br /&gt;
| [[#AlwaysOnTop]]&lt;br /&gt;
| [[#AutoRepeatDelay]]&lt;br /&gt;
| [[#AutoRepeatRate]]&lt;br /&gt;
| [[#ClippedByParent]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CurrentValue]]&lt;br /&gt;
| [[#CustomTooltipType]]&lt;br /&gt;
| [[#DestroyedByParent]]&lt;br /&gt;
| [[#Disabled]]&lt;br /&gt;
| [[#DistributeCapturedInputs]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Font]]&lt;br /&gt;
| [[#HorizontalAlignment]]&lt;br /&gt;
| [[#ID]]&lt;br /&gt;
| [[#InheritsAlpha]]&lt;br /&gt;
| [[#InheritsTooltipText]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#LookNFeel]]&lt;br /&gt;
| [[#MaximumValue]]&lt;br /&gt;
| [[#MinimumValue]]&lt;br /&gt;
| [[#MouseButtonDownAutoRepeat]]&lt;br /&gt;
| [[#MouseCursorImage]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#MousePassThroughEnabled]]&lt;br /&gt;
| [[#RestoreOldCapture]]&lt;br /&gt;
| [[#RiseOnClick]]&lt;br /&gt;
| [[#StepSize]]&lt;br /&gt;
| [[#Text]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#TextInputMode]]&lt;br /&gt;
| [[#Tooltip]]&lt;br /&gt;
| [[#UnifiedAreaRect]]&lt;br /&gt;
| [[#UnifiedHeight]]&lt;br /&gt;
| [[#UnifiedMaxSize]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedMinSize]]&lt;br /&gt;
| [[#UnifiedPosition]]&lt;br /&gt;
| [[#UnifiedSize]]&lt;br /&gt;
| [[#UnifiedWidth]]&lt;br /&gt;
| [[#UnifiedXPosition]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedYPosition]]&lt;br /&gt;
| [[#VerticalAlignment]]&lt;br /&gt;
| [[#Visible]]&lt;br /&gt;
| [[#WantsMultiClickEvents]]&lt;br /&gt;
| [[#WindowRenderer]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#ZOrderChangeEnabled]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Static ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;  border=&amp;quot;1&amp;quot; &lt;br /&gt;
| [[#Alpha]]&lt;br /&gt;
| [[#AlwaysOnTop]]&lt;br /&gt;
| [[#AutoRepeatDelay]]&lt;br /&gt;
| [[#AutoRepeatRate]]&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#BackgroundColours]]&lt;br /&gt;
|-&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#BackgroundEnabled]]&lt;br /&gt;
| [[#ClippedByParent]]&lt;br /&gt;
| [[#CustomTooltipType]]&lt;br /&gt;
| [[#DestroyedByParent]]&lt;br /&gt;
| [[#Disabled]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#DistributeCapturedInputs]]&lt;br /&gt;
| [[#Font]]&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#FrameColours]]&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#FrameEnabled]]&lt;br /&gt;
| [[#HorizontalAlignment]]&lt;br /&gt;
|-&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#HorzFormatting]]&lt;br /&gt;
| [[#ID]]&lt;br /&gt;
| [[#InheritsAlpha]]&lt;br /&gt;
| [[#InheritsTooltipText]]&lt;br /&gt;
| [[#LookNFeel]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#MouseButtonDownAutoRepeat]]&lt;br /&gt;
| [[#MouseCursorImage]]&lt;br /&gt;
| [[#MousePassThroughEnabled]]&lt;br /&gt;
| [[#RestoreOldCapture]]&lt;br /&gt;
| [[#RiseOnClick]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Text]]&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#TextPadding]]&lt;br /&gt;
| [[#Tooltip]]&lt;br /&gt;
| [[#UnifiedAreaRect]]&lt;br /&gt;
| [[#UnifiedHeight]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedMaxSize]]&lt;br /&gt;
| [[#UnifiedMinSize]]&lt;br /&gt;
| [[#UnifiedPosition]]&lt;br /&gt;
| [[#UnifiedSize]]&lt;br /&gt;
| [[#UnifiedWidth]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedXPosition]]&lt;br /&gt;
| [[#UnifiedYPosition]]&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#VertFormatting]]&lt;br /&gt;
| [[#VerticalAlignment]]&lt;br /&gt;
| [[#Visible]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#WantsMultiClickEvents]]&lt;br /&gt;
| [[#WindowRenderer]]&lt;br /&gt;
| [[#ZOrderChangeEnabled]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== StaticImage ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;  border=&amp;quot;1&amp;quot; &lt;br /&gt;
| [[#Alpha]]&lt;br /&gt;
| [[#AlwaysOnTop]]&lt;br /&gt;
| [[#AutoRepeatDelay]]&lt;br /&gt;
| [[#AutoRepeatRate]]&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#BackgroundColours]]&lt;br /&gt;
|-&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#BackgroundEnabled]]&lt;br /&gt;
| [[#ClippedByParent]]&lt;br /&gt;
| [[#CustomTooltipType]]&lt;br /&gt;
| [[#DestroyedByParent]]&lt;br /&gt;
| [[#Disabled]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#DistributeCapturedInputs]]&lt;br /&gt;
| [[#Font]]&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#FrameColours]]&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#FrameEnabled]]&lt;br /&gt;
| [[#HorizontalAlignment]]&lt;br /&gt;
|-&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#HorzFormatting]]&lt;br /&gt;
| [[#ID]]&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#Image]]&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#ImageColours]]&lt;br /&gt;
| [[#InheritsAlpha]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#InheritsTooltipText]]&lt;br /&gt;
| [[#LookNFeel]]&lt;br /&gt;
| [[#MouseButtonDownAutoRepeat]]&lt;br /&gt;
| [[#MouseCursorImage]]&lt;br /&gt;
| [[#MousePassThroughEnabled]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#RestoreOldCapture]]&lt;br /&gt;
| [[#RiseOnClick]]&lt;br /&gt;
| [[#Text]]&lt;br /&gt;
| [[#Tooltip]]&lt;br /&gt;
| [[#UnifiedAreaRect]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedHeight]]&lt;br /&gt;
| [[#UnifiedMaxSize]]&lt;br /&gt;
| [[#UnifiedMinSize]]&lt;br /&gt;
| [[#UnifiedPosition]]&lt;br /&gt;
| [[#UnifiedSize]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedWidth]]&lt;br /&gt;
| [[#UnifiedXPosition]]&lt;br /&gt;
| [[#UnifiedYPosition]]&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#VertFormatting]]&lt;br /&gt;
| [[#VerticalAlignment]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Visible]]&lt;br /&gt;
| [[#WantsMultiClickEvents]]&lt;br /&gt;
| [[#WindowRenderer]]&lt;br /&gt;
| [[#ZOrderChangeEnabled]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== StaticText ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;  border=&amp;quot;1&amp;quot; &lt;br /&gt;
| [[#Alpha]]&lt;br /&gt;
| [[#AlwaysOnTop]]&lt;br /&gt;
| [[#AutoRepeatDelay]]&lt;br /&gt;
| [[#AutoRepeatRate]]&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#BackgroundColours]]&lt;br /&gt;
|-&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#BackgroundEnabled]]&lt;br /&gt;
| [[#ClippedByParent]]&lt;br /&gt;
| [[#CustomTooltipType]]&lt;br /&gt;
| [[#DestroyedByParent]]&lt;br /&gt;
| [[#Disabled]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#DistributeCapturedInputs]]&lt;br /&gt;
| [[#Font]]&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#FrameColours]]&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#FrameEnabled]]&lt;br /&gt;
| [[#HorizontalAlignment]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#HorzFormatting]]&lt;br /&gt;
| [[#HorzScrollbar]]&lt;br /&gt;
| [[#ID]]&lt;br /&gt;
| [[#InheritsAlpha]]&lt;br /&gt;
| [[#InheritsTooltipText]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#LookNFeel]]&lt;br /&gt;
| [[#MouseButtonDownAutoRepeat]]&lt;br /&gt;
| [[#MouseCursorImage]]&lt;br /&gt;
| [[#MousePassThroughEnabled]]&lt;br /&gt;
| [[#RestoreOldCapture]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#RiseOnClick]]&lt;br /&gt;
| [[#Text]]&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#TextColours]]&lt;br /&gt;
| [[#Tooltip]]&lt;br /&gt;
| [[#UnifiedAreaRect]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedHeight]]&lt;br /&gt;
| [[#UnifiedMaxSize]]&lt;br /&gt;
| [[#UnifiedMinSize]]&lt;br /&gt;
| [[#UnifiedPosition]]&lt;br /&gt;
| [[#UnifiedSize]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedWidth]]&lt;br /&gt;
| [[#UnifiedXPosition]]&lt;br /&gt;
| [[#UnifiedYPosition]]&lt;br /&gt;
| [[#VertFormatting]]&lt;br /&gt;
| [[#VertScrollbar]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#VerticalAlignment]]&lt;br /&gt;
| [[#Visible]]&lt;br /&gt;
| [[#WantsMultiClickEvents]]&lt;br /&gt;
| [[#WindowRenderer]]&lt;br /&gt;
| [[#ZOrderChangeEnabled]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== SystemButton ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;  border=&amp;quot;1&amp;quot; &lt;br /&gt;
| [[#Alpha]]&lt;br /&gt;
| [[#AlwaysOnTop]]&lt;br /&gt;
| [[#AutoRepeatDelay]]&lt;br /&gt;
| [[#AutoRepeatRate]]&lt;br /&gt;
| [[#ClippedByParent]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CustomTooltipType]]&lt;br /&gt;
| [[#DestroyedByParent]]&lt;br /&gt;
| [[#Disabled]]&lt;br /&gt;
| [[#DistributeCapturedInputs]]&lt;br /&gt;
| [[#Font]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#HorizontalAlignment]]&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#HoverImage]]&lt;br /&gt;
| [[#ID]]&lt;br /&gt;
| [[#InheritsAlpha]]&lt;br /&gt;
| [[#InheritsTooltipText]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#LookNFeel]]&lt;br /&gt;
| [[#MouseButtonDownAutoRepeat]]&lt;br /&gt;
| [[#MouseCursorImage]]&lt;br /&gt;
| [[#MousePassThroughEnabled]]&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#NormalImage]]&lt;br /&gt;
|-&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#PushedImage]]&lt;br /&gt;
| [[#RestoreOldCapture]]&lt;br /&gt;
| [[#RiseOnClick]]&lt;br /&gt;
| [[#Text]]&lt;br /&gt;
| [[#Tooltip]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedAreaRect]]&lt;br /&gt;
| [[#UnifiedHeight]]&lt;br /&gt;
| [[#UnifiedMaxSize]]&lt;br /&gt;
| [[#UnifiedMinSize]]&lt;br /&gt;
| [[#UnifiedPosition]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedSize]]&lt;br /&gt;
| [[#UnifiedWidth]]&lt;br /&gt;
| [[#UnifiedXPosition]]&lt;br /&gt;
| [[#UnifiedYPosition]]&lt;br /&gt;
| [[#VerticalAlignment]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Visible]]&lt;br /&gt;
| [[#WantsMultiClickEvents]]&lt;br /&gt;
| [[#WindowRenderer]]&lt;br /&gt;
| [[#ZOrderChangeEnabled]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== TabButton ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;  border=&amp;quot;1&amp;quot; &lt;br /&gt;
| [[#Alpha]]&lt;br /&gt;
| [[#AlwaysOnTop]]&lt;br /&gt;
| [[#AutoRepeatDelay]]&lt;br /&gt;
| [[#AutoRepeatRate]]&lt;br /&gt;
| [[#ClippedByParent]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CustomTooltipType]]&lt;br /&gt;
| [[#DestroyedByParent]]&lt;br /&gt;
| [[#Disabled]]&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#DisabledTextColour]]&lt;br /&gt;
| [[#DistributeCapturedInputs]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Font]]&lt;br /&gt;
| [[#HorizontalAlignment]]&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#HoverTextColour]]&lt;br /&gt;
| [[#ID]]&lt;br /&gt;
| [[#InheritsAlpha]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#InheritsTooltipText]]&lt;br /&gt;
| [[#LookNFeel]]&lt;br /&gt;
| [[#MouseButtonDownAutoRepeat]]&lt;br /&gt;
| [[#MouseCursorImage]]&lt;br /&gt;
| [[#MousePassThroughEnabled]]&lt;br /&gt;
|-&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#NormalTextColour]]&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#PushedTextColour]]&lt;br /&gt;
| [[#RestoreOldCapture]]&lt;br /&gt;
| [[#RiseOnClick]]&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#SelectedTextColour]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Text]]&lt;br /&gt;
| [[#Tooltip]]&lt;br /&gt;
| [[#UnifiedAreaRect]]&lt;br /&gt;
| [[#UnifiedHeight]]&lt;br /&gt;
| [[#UnifiedMaxSize]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedMinSize]]&lt;br /&gt;
| [[#UnifiedPosition]]&lt;br /&gt;
| [[#UnifiedSize]]&lt;br /&gt;
| [[#UnifiedWidth]]&lt;br /&gt;
| [[#UnifiedXPosition]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedYPosition]]&lt;br /&gt;
| [[#VerticalAlignment]]&lt;br /&gt;
| [[#Visible]]&lt;br /&gt;
| [[#WantsMultiClickEvents]]&lt;br /&gt;
| [[#WindowRenderer]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#ZOrderChangeEnabled]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== TabButtonPane ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;  border=&amp;quot;1&amp;quot; &lt;br /&gt;
| [[#Alpha]]&lt;br /&gt;
| [[#AlwaysOnTop]]&lt;br /&gt;
| [[#AutoRepeatDelay]]&lt;br /&gt;
| [[#AutoRepeatRate]]&lt;br /&gt;
| [[#ClippedByParent]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CustomTooltipType]]&lt;br /&gt;
| [[#DestroyedByParent]]&lt;br /&gt;
| [[#Disabled]]&lt;br /&gt;
| [[#DistributeCapturedInputs]]&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#EnableBottom]]&lt;br /&gt;
|-&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#EnableTop]]&lt;br /&gt;
| [[#Font]]&lt;br /&gt;
| [[#HorizontalAlignment]]&lt;br /&gt;
| [[#ID]]&lt;br /&gt;
| [[#InheritsAlpha]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#InheritsTooltipText]]&lt;br /&gt;
| [[#LookNFeel]]&lt;br /&gt;
| [[#MouseButtonDownAutoRepeat]]&lt;br /&gt;
| [[#MouseCursorImage]]&lt;br /&gt;
| [[#MousePassThroughEnabled]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#RestoreOldCapture]]&lt;br /&gt;
| [[#RiseOnClick]]&lt;br /&gt;
| [[#Text]]&lt;br /&gt;
| [[#Tooltip]]&lt;br /&gt;
| [[#UnifiedAreaRect]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedHeight]]&lt;br /&gt;
| [[#UnifiedMaxSize]]&lt;br /&gt;
| [[#UnifiedMinSize]]&lt;br /&gt;
| [[#UnifiedPosition]]&lt;br /&gt;
| [[#UnifiedSize]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedWidth]]&lt;br /&gt;
| [[#UnifiedXPosition]]&lt;br /&gt;
| [[#UnifiedYPosition]]&lt;br /&gt;
| [[#VerticalAlignment]]&lt;br /&gt;
| [[#Visible]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#WantsMultiClickEvents]]&lt;br /&gt;
| [[#WindowRenderer]]&lt;br /&gt;
| [[#ZOrderChangeEnabled]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== TabContentPane ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;  border=&amp;quot;1&amp;quot; &lt;br /&gt;
| [[#Alpha]]&lt;br /&gt;
| [[#AlwaysOnTop]]&lt;br /&gt;
| [[#AutoRepeatDelay]]&lt;br /&gt;
| [[#AutoRepeatRate]]&lt;br /&gt;
| [[#ClippedByParent]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CustomTooltipType]]&lt;br /&gt;
| [[#DestroyedByParent]]&lt;br /&gt;
| [[#Disabled]]&lt;br /&gt;
| [[#DistributeCapturedInputs]]&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#EnableBottom]]&lt;br /&gt;
|-&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#EnableTop]]&lt;br /&gt;
| [[#Font]]&lt;br /&gt;
| [[#HorizontalAlignment]]&lt;br /&gt;
| [[#ID]]&lt;br /&gt;
| [[#InheritsAlpha]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#InheritsTooltipText]]&lt;br /&gt;
| [[#LookNFeel]]&lt;br /&gt;
| [[#MouseButtonDownAutoRepeat]]&lt;br /&gt;
| [[#MouseCursorImage]]&lt;br /&gt;
| [[#MousePassThroughEnabled]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#RestoreOldCapture]]&lt;br /&gt;
| [[#RiseOnClick]]&lt;br /&gt;
| [[#Text]]&lt;br /&gt;
| [[#Tooltip]]&lt;br /&gt;
| [[#UnifiedAreaRect]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedHeight]]&lt;br /&gt;
| [[#UnifiedMaxSize]]&lt;br /&gt;
| [[#UnifiedMinSize]]&lt;br /&gt;
| [[#UnifiedPosition]]&lt;br /&gt;
| [[#UnifiedSize]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedWidth]]&lt;br /&gt;
| [[#UnifiedXPosition]]&lt;br /&gt;
| [[#UnifiedYPosition]]&lt;br /&gt;
| [[#VerticalAlignment]]&lt;br /&gt;
| [[#Visible]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#WantsMultiClickEvents]]&lt;br /&gt;
| [[#WindowRenderer]]&lt;br /&gt;
| [[#ZOrderChangeEnabled]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== TabControl ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;  border=&amp;quot;1&amp;quot; &lt;br /&gt;
| [[#Alpha]]&lt;br /&gt;
| [[#AlwaysOnTop]]&lt;br /&gt;
| [[#AutoRepeatDelay]]&lt;br /&gt;
| [[#AutoRepeatRate]]&lt;br /&gt;
| [[#ClippedByParent]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CustomTooltipType]]&lt;br /&gt;
| [[#DestroyedByParent]]&lt;br /&gt;
| [[#Disabled]]&lt;br /&gt;
| [[#DistributeCapturedInputs]]&lt;br /&gt;
| [[#Font]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#HorizontalAlignment]]&lt;br /&gt;
| [[#ID]]&lt;br /&gt;
| [[#InheritsAlpha]]&lt;br /&gt;
| [[#InheritsTooltipText]]&lt;br /&gt;
| [[#LookNFeel]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#MouseButtonDownAutoRepeat]]&lt;br /&gt;
| [[#MouseCursorImage]]&lt;br /&gt;
| [[#MousePassThroughEnabled]]&lt;br /&gt;
| [[#RestoreOldCapture]]&lt;br /&gt;
| [[#RiseOnClick]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#TabButtonType]]&lt;br /&gt;
| [[#TabHeight]]&lt;br /&gt;
| [[#TabPanePosition]]&lt;br /&gt;
| [[#TabTextPadding]]&lt;br /&gt;
| [[#Text]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Tooltip]]&lt;br /&gt;
| [[#UnifiedAreaRect]]&lt;br /&gt;
| [[#UnifiedHeight]]&lt;br /&gt;
| [[#UnifiedMaxSize]]&lt;br /&gt;
| [[#UnifiedMinSize]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedPosition]]&lt;br /&gt;
| [[#UnifiedSize]]&lt;br /&gt;
| [[#UnifiedWidth]]&lt;br /&gt;
| [[#UnifiedXPosition]]&lt;br /&gt;
| [[#UnifiedYPosition]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#VerticalAlignment]]&lt;br /&gt;
| [[#Visible]]&lt;br /&gt;
| [[#WantsMultiClickEvents]]&lt;br /&gt;
| [[#WindowRenderer]]&lt;br /&gt;
| [[#ZOrderChangeEnabled]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Titlebar ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;  border=&amp;quot;1&amp;quot; &lt;br /&gt;
| [[#Alpha]]&lt;br /&gt;
| [[#AlwaysOnTop]]&lt;br /&gt;
| [[#AutoRepeatDelay]]&lt;br /&gt;
| [[#AutoRepeatRate]]&lt;br /&gt;
| bgcolor=&amp;quot;#FFBF00&amp;quot; | [[#CaptionColour]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#ClippedByParent]]&lt;br /&gt;
| [[#CustomTooltipType]]&lt;br /&gt;
| [[#DestroyedByParent]]&lt;br /&gt;
| [[#Disabled]]&lt;br /&gt;
| [[#DistributeCapturedInputs]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#DraggingEnabled]]&lt;br /&gt;
| [[#Font]]&lt;br /&gt;
| [[#HorizontalAlignment]]&lt;br /&gt;
| [[#ID]]&lt;br /&gt;
| [[#InheritsAlpha]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#InheritsTooltipText]]&lt;br /&gt;
| [[#LookNFeel]]&lt;br /&gt;
| [[#MouseButtonDownAutoRepeat]]&lt;br /&gt;
| [[#MouseCursorImage]]&lt;br /&gt;
| [[#MousePassThroughEnabled]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#RestoreOldCapture]]&lt;br /&gt;
| [[#RiseOnClick]]&lt;br /&gt;
| [[#Text]]&lt;br /&gt;
| [[#Tooltip]]&lt;br /&gt;
| [[#UnifiedAreaRect]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedHeight]]&lt;br /&gt;
| [[#UnifiedMaxSize]]&lt;br /&gt;
| [[#UnifiedMinSize]]&lt;br /&gt;
| [[#UnifiedPosition]]&lt;br /&gt;
| [[#UnifiedSize]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedWidth]]&lt;br /&gt;
| [[#UnifiedXPosition]]&lt;br /&gt;
| [[#UnifiedYPosition]]&lt;br /&gt;
| [[#VerticalAlignment]]&lt;br /&gt;
| [[#Visible]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#WantsMultiClickEvents]]&lt;br /&gt;
| [[#WindowRenderer]]&lt;br /&gt;
| [[#ZOrderChangeEnabled]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Tooltip ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;  border=&amp;quot;1&amp;quot; &lt;br /&gt;
| [[#Alpha]]&lt;br /&gt;
| [[#AlwaysOnTop]]&lt;br /&gt;
| [[#AutoRepeatDelay]]&lt;br /&gt;
| [[#AutoRepeatRate]]&lt;br /&gt;
| [[#ClippedByParent]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CustomTooltipType]]&lt;br /&gt;
| [[#DestroyedByParent]]&lt;br /&gt;
| [[#Disabled]]&lt;br /&gt;
| [[#DisplayTime]]&lt;br /&gt;
| [[#DistributeCapturedInputs]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#FadeTime]]&lt;br /&gt;
| [[#Font]]&lt;br /&gt;
| [[#HorizontalAlignment]]&lt;br /&gt;
| [[#HoverTime]]&lt;br /&gt;
| [[#ID]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#InheritsAlpha]]&lt;br /&gt;
| [[#InheritsTooltipText]]&lt;br /&gt;
| [[#LookNFeel]]&lt;br /&gt;
| [[#MouseButtonDownAutoRepeat]]&lt;br /&gt;
| [[#MouseCursorImage]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#MousePassThroughEnabled]]&lt;br /&gt;
| [[#RestoreOldCapture]]&lt;br /&gt;
| [[#RiseOnClick]]&lt;br /&gt;
| [[#Text]]&lt;br /&gt;
| [[#Tooltip]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedAreaRect]]&lt;br /&gt;
| [[#UnifiedHeight]]&lt;br /&gt;
| [[#UnifiedMaxSize]]&lt;br /&gt;
| [[#UnifiedMinSize]]&lt;br /&gt;
| [[#UnifiedPosition]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedSize]]&lt;br /&gt;
| [[#UnifiedWidth]]&lt;br /&gt;
| [[#UnifiedXPosition]]&lt;br /&gt;
| [[#UnifiedYPosition]]&lt;br /&gt;
| [[#VerticalAlignment]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Visible]]&lt;br /&gt;
| [[#WantsMultiClickEvents]]&lt;br /&gt;
| [[#WindowRenderer]]&lt;br /&gt;
| [[#ZOrderChangeEnabled]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== VerticalScrollbar ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;  border=&amp;quot;1&amp;quot; &lt;br /&gt;
| [[#Alpha]]&lt;br /&gt;
| [[#AlwaysOnTop]]&lt;br /&gt;
| [[#AutoRepeatDelay]]&lt;br /&gt;
| [[#AutoRepeatRate]]&lt;br /&gt;
| [[#ClippedByParent]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CustomTooltipType]]&lt;br /&gt;
| [[#DestroyedByParent]]&lt;br /&gt;
| [[#Disabled]]&lt;br /&gt;
| [[#DistributeCapturedInputs]]&lt;br /&gt;
| [[#DocumentSize]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Font]]&lt;br /&gt;
| [[#HorizontalAlignment]]&lt;br /&gt;
| [[#ID]]&lt;br /&gt;
| [[#InheritsAlpha]]&lt;br /&gt;
| [[#InheritsTooltipText]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#LookNFeel]]&lt;br /&gt;
| [[#MouseButtonDownAutoRepeat]]&lt;br /&gt;
| [[#MouseCursorImage]]&lt;br /&gt;
| [[#MousePassThroughEnabled]]&lt;br /&gt;
| [[#OverlapSize]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#PageSize]]&lt;br /&gt;
| [[#RestoreOldCapture]]&lt;br /&gt;
| [[#RiseOnClick]]&lt;br /&gt;
| [[#ScrollPosition]]&lt;br /&gt;
| [[#StepSize]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Text]]&lt;br /&gt;
| [[#Tooltip]]&lt;br /&gt;
| [[#UnifiedAreaRect]]&lt;br /&gt;
| [[#UnifiedHeight]]&lt;br /&gt;
| [[#UnifiedMaxSize]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedMinSize]]&lt;br /&gt;
| [[#UnifiedPosition]]&lt;br /&gt;
| [[#UnifiedSize]]&lt;br /&gt;
| [[#UnifiedWidth]]&lt;br /&gt;
| [[#UnifiedXPosition]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedYPosition]]&lt;br /&gt;
| [[#VerticalAlignment]]&lt;br /&gt;
| [[#VerticalScrollbar]]&lt;br /&gt;
| [[#Visible]]&lt;br /&gt;
| [[#WantsMultiClickEvents]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#WindowRenderer]]&lt;br /&gt;
| [[#ZOrderChangeEnabled]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== VerticalScrollbarThumb ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;  border=&amp;quot;1&amp;quot; &lt;br /&gt;
| [[#Alpha]]&lt;br /&gt;
| [[#AlwaysOnTop]]&lt;br /&gt;
| [[#AutoRepeatDelay]]&lt;br /&gt;
| [[#AutoRepeatRate]]&lt;br /&gt;
| [[#ClippedByParent]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#CustomTooltipType]]&lt;br /&gt;
| [[#DestroyedByParent]]&lt;br /&gt;
| [[#Disabled]]&lt;br /&gt;
| [[#DistributeCapturedInputs]]&lt;br /&gt;
| [[#Font]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#HorizontalAlignment]]&lt;br /&gt;
| [[#HorzFree]]&lt;br /&gt;
| [[#HorzRange]]&lt;br /&gt;
| [[#HotTracked]]&lt;br /&gt;
| [[#ID]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#InheritsAlpha]]&lt;br /&gt;
| [[#InheritsTooltipText]]&lt;br /&gt;
| [[#LookNFeel]]&lt;br /&gt;
| [[#MouseButtonDownAutoRepeat]]&lt;br /&gt;
| [[#MouseCursorImage]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#MousePassThroughEnabled]]&lt;br /&gt;
| [[#RestoreOldCapture]]&lt;br /&gt;
| [[#RiseOnClick]]&lt;br /&gt;
| [[#Text]]&lt;br /&gt;
| [[#Tooltip]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedAreaRect]]&lt;br /&gt;
| [[#UnifiedHeight]]&lt;br /&gt;
| [[#UnifiedMaxSize]]&lt;br /&gt;
| [[#UnifiedMinSize]]&lt;br /&gt;
| [[#UnifiedPosition]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#UnifiedSize]]&lt;br /&gt;
| [[#UnifiedWidth]]&lt;br /&gt;
| [[#UnifiedXPosition]]&lt;br /&gt;
| [[#UnifiedYPosition]]&lt;br /&gt;
| [[#VertFree]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#VertRange]]&lt;br /&gt;
| [[#VerticalAlignment]]&lt;br /&gt;
| [[#Visible]]&lt;br /&gt;
| [[#WantsMultiClickEvents]]&lt;br /&gt;
| [[#WindowRenderer]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#ZOrderChangeEnabled]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Properties ===&lt;br /&gt;
==== ActiveEditSelectionColour ====&lt;br /&gt;
&amp;lt;font COLOR=&amp;quot;#FFBF00&amp;quot;&amp;gt;Falagard&amp;lt;/font&amp;gt; property link definition - links a property on this window to another defined on a child window.&lt;br /&gt;
&lt;br /&gt;
==== ActiveSelectionColour ====&lt;br /&gt;
&amp;lt;font COLOR=&amp;quot;#FFBF00&amp;quot;&amp;gt;Falagard&amp;lt;/font&amp;gt; custom property definition - gets/sets a named user string.&lt;br /&gt;
&lt;br /&gt;
==== AllowMultiplePopups ====&lt;br /&gt;
Property to get/set the state of the allow multiple popups setting for the menu.  Value is either &amp;quot;True&amp;quot; or &amp;quot;False&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Alpha ====&lt;br /&gt;
Property to get/set the alpha value of the Window.  Value is floating point number.&lt;br /&gt;
&lt;br /&gt;
==== AlwaysOnTop ====&lt;br /&gt;
Property to get/set the 'always on top' setting for the Window.  Value is either &amp;quot;True&amp;quot; or &amp;quot;False&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== AutoRepeatDelay ====&lt;br /&gt;
Property to get/set the autorepeat delay.  Value is a floating point number indicating the delay required in seconds.&lt;br /&gt;
&lt;br /&gt;
==== AutoRepeatRate ====&lt;br /&gt;
Property to get/set the autorepeat rate.  Value is a floating point number indicating the rate required in seconds.&lt;br /&gt;
&lt;br /&gt;
==== AutoResizeEnabled ====&lt;br /&gt;
Property to get/set the state of the auto resizing enabled setting for the ItemListBase.  Value is either &amp;quot;True&amp;quot; or &amp;quot;False&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== BackgroundColours ====&lt;br /&gt;
&amp;lt;font COLOR=&amp;quot;#FFBF00&amp;quot;&amp;gt;Falagard&amp;lt;/font&amp;gt; custom property definition - gets/sets a named user string.&lt;br /&gt;
&lt;br /&gt;
==== BackgroundEnabled ====&lt;br /&gt;
Property to get/set the state of the frame background setting for the &amp;lt;font COLOR=&amp;quot;#FFBF00&amp;quot;&amp;gt;Falagard&amp;lt;/font&amp;gt;Static widget.  Value is either &amp;quot;True&amp;quot; or &amp;quot;False&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== BorderWidth ====&lt;br /&gt;
&amp;lt;font COLOR=&amp;quot;#FFBF00&amp;quot;&amp;gt;Falagard&amp;lt;/font&amp;gt; custom property definition - gets/sets a named user string.&lt;br /&gt;
&lt;br /&gt;
==== CaptionColour ====&lt;br /&gt;
&amp;lt;font COLOR=&amp;quot;#FFBF00&amp;quot;&amp;gt;Falagard&amp;lt;/font&amp;gt; property link definition - links a property on this window to another defined on a child window.&lt;br /&gt;
&lt;br /&gt;
==== CaratIndex ====&lt;br /&gt;
Property to get/set the current carat index.  Value is &amp;quot;[uint]&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== ClickStepSize ====&lt;br /&gt;
Property to get/set the click-step size for the slider.  Value is a float.&lt;br /&gt;
&lt;br /&gt;
==== Clickable ====&lt;br /&gt;
Property to get/set the click-able setting of the header segment.  Value is either &amp;quot;True&amp;quot; or &amp;quot;False&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== ClippedByParent ====&lt;br /&gt;
Property to get/set the 'clipped by parent' setting for the Window.  Value is either &amp;quot;True&amp;quot; or &amp;quot;False&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== CloseButtonEnabled ====&lt;br /&gt;
Property to get/set the setting for whether the window close button will be enabled (or displayed depending upon choice of final widget type).  Value is either &amp;quot;True&amp;quot; or &amp;quot;False&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== ColumnHeader ====&lt;br /&gt;
Property to set up a column (there is no getter for this property)&lt;br /&gt;
&lt;br /&gt;
==== ColumnsMovable ====&lt;br /&gt;
Property to get/set the setting for user moving of the column headers.  Value is either &amp;quot;True&amp;quot; or &amp;quot;False&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== ColumnsSizable ====&lt;br /&gt;
Property to get/set the setting for user sizing of the column headers.  Value is either &amp;quot;True&amp;quot; or &amp;quot;False&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== ContentArea ====&lt;br /&gt;
Property to get/set the current content area rectangle of the content pane.  Value is &amp;quot;l:[float] t:[float] r:[float] b:[float]&amp;quot; (where l is left, t is top, r is right, and b is bottom).&lt;br /&gt;
&lt;br /&gt;
==== ContentPaneAutoSized ====&lt;br /&gt;
Property to get/set the setting which controls whether the content pane will auto-size itself.  Value is either &amp;quot;True&amp;quot; or &amp;quot;False&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== CurrentProgress ====&lt;br /&gt;
Property to get/set the current progress of the progress bar.  Value is a float  value between 0.0 and 1.0 specifying the progress.&lt;br /&gt;
&lt;br /&gt;
==== CurrentValue ====&lt;br /&gt;
Property to get/set the current value of the slider.  Value is a float.&lt;br /&gt;
&lt;br /&gt;
==== CustomTooltipType ====&lt;br /&gt;
Property to get/set the custom tooltip for the window.  Value is the type name of the custom tooltip.&lt;br /&gt;
&lt;br /&gt;
==== DestroyedByParent ====&lt;br /&gt;
Property to get/set the 'destroyed by parent' setting for the Window.  Value is either &amp;quot;True&amp;quot; or &amp;quot;False&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Disabled ====&lt;br /&gt;
Property to get/set the 'disabled state' setting for the Window.  Value is either &amp;quot;True&amp;quot; or &amp;quot;False&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== DisabledTextColour ====&lt;br /&gt;
&amp;lt;font COLOR=&amp;quot;#FFBF00&amp;quot;&amp;gt;Falagard&amp;lt;/font&amp;gt; custom property definition - gets/sets a named user string.&lt;br /&gt;
&lt;br /&gt;
==== DisplayTime ====&lt;br /&gt;
Property to get/set the display timeout value in seconds.  Value is a float.&lt;br /&gt;
&lt;br /&gt;
==== DistributeCapturedInputs ====&lt;br /&gt;
Property to get/set whether captured inputs are passed to child windows.  Value is either &amp;quot;True&amp;quot; or &amp;quot;False&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== DocumentSize ====&lt;br /&gt;
Property to get/set the document size for the Scrollbar.  Value is a float.&lt;br /&gt;
&lt;br /&gt;
==== DragMovingEnabled ====&lt;br /&gt;
Property to get/set the setting for whether the user may drag the window around by its title bar.  Value is either &amp;quot;True&amp;quot; or &amp;quot;False&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Dragable ====&lt;br /&gt;
Property to get/set the drag-able setting of the header segment.  Value is either &amp;quot;True&amp;quot; or &amp;quot;False&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== DraggingEnabled ====&lt;br /&gt;
Property to get/set the state of the dragging enabled setting for the Titlebar.  Value is either &amp;quot;True&amp;quot; or &amp;quot;False&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== EWSizingCursorImage ====&lt;br /&gt;
Property to get/set the E-W (left-right) sizing cursor image for the FramwWindow.  Value should be &amp;quot;set:[imageset name] image:[image name]&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== EditSelectionLength ====&lt;br /&gt;
Property to get/set the length of the selection (as a count of the number of code points selected).  Value is &amp;quot;[uint]&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== EditSelectionStart ====&lt;br /&gt;
Property to get/set the zero based index of the selection start position within the text.  Value is &amp;quot;[uint]&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== EnableBottom ====&lt;br /&gt;
&amp;lt;font COLOR=&amp;quot;#FFBF00&amp;quot;&amp;gt;Falagard&amp;lt;/font&amp;gt; custom property definition - gets/sets a named user string.&lt;br /&gt;
&lt;br /&gt;
==== EnableTop ====&lt;br /&gt;
&amp;lt;font COLOR=&amp;quot;#FFBF00&amp;quot;&amp;gt;Falagard&amp;lt;/font&amp;gt; custom property definition - gets/sets a named user string.&lt;br /&gt;
&lt;br /&gt;
==== FadeInTime ====&lt;br /&gt;
Property to get/set the fade in time in seconds of the popup menu.  Value is a float.&lt;br /&gt;
&lt;br /&gt;
==== FadeOutTime ====&lt;br /&gt;
Property to get/set the fade out time in seconds of the popup menu.  Value is a float.&lt;br /&gt;
&lt;br /&gt;
==== FadeTime ====&lt;br /&gt;
Property to get/set duration of the fade effect in seconds.  Value is a float.&lt;br /&gt;
&lt;br /&gt;
==== Font ====&lt;br /&gt;
Property to get/set the font for the Window.  Value is the name of the font to use (must be loaded already).&lt;br /&gt;
&lt;br /&gt;
==== ForceHorzScrollbar ====&lt;br /&gt;
Property to get/set the 'always show' setting for the horizontal scroll bar of the list box.  Value is either &amp;quot;True&amp;quot; or &amp;quot;False&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== ForceVertScrollbar ====&lt;br /&gt;
Property to get/set the 'always show' setting for the vertical scroll bar of the list box.  Value is either &amp;quot;True&amp;quot; or &amp;quot;False&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== FrameColours ====&lt;br /&gt;
&amp;lt;font COLOR=&amp;quot;#FFBF00&amp;quot;&amp;gt;Falagard&amp;lt;/font&amp;gt; custom property definition - gets/sets a named user string.&lt;br /&gt;
&lt;br /&gt;
==== FrameEnabled ====&lt;br /&gt;
Property to get/set the setting for whether the window frame will be displayed.  Value is either &amp;quot;True&amp;quot; or &amp;quot;False&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== GroupID ====&lt;br /&gt;
Property to get/set the radio button group ID.  Value is an unsigned integer number.&lt;br /&gt;
&lt;br /&gt;
==== HorizontalAlignment ====&lt;br /&gt;
Property to get/set the windows horizontal alignment.  Value is one of &amp;quot;Left&amp;quot;, &amp;quot;Centre&amp;quot; or &amp;quot;Right&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== HorzFormatting ====&lt;br /&gt;
&amp;lt;font COLOR=&amp;quot;#FFBF00&amp;quot;&amp;gt;Falagard&amp;lt;/font&amp;gt; custom property definition - gets/sets a named user string.&lt;br /&gt;
&lt;br /&gt;
==== HorzFree ====&lt;br /&gt;
Property to get/set the state the setting to free the thumb horizontally.  Value is either &amp;quot;True&amp;quot; or &amp;quot;False&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== HorzOverlapSize ====&lt;br /&gt;
Property to get/set the overlap size for the horizontal Scrollbar.  Value is a float.&lt;br /&gt;
&lt;br /&gt;
==== HorzRange ====&lt;br /&gt;
Property to get/set the horizontal movement range for the thumb.  Value is &amp;quot;min:[float] max:[float]&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== HorzScrollPosition ====&lt;br /&gt;
Property to get/set the scroll position of the horizontal Scrollbar as a fraction.  Value is a float.&lt;br /&gt;
&lt;br /&gt;
==== HorzScrollbar ====&lt;br /&gt;
Property to get/set the setting for the horizontal scroll bar.  Value is either &amp;quot;True&amp;quot; or &amp;quot;False&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== HorzStepSize ====&lt;br /&gt;
Property to get/set the step size for the horizontal Scrollbar.  Value is a float.&lt;br /&gt;
&lt;br /&gt;
==== HotTracked ====&lt;br /&gt;
Property to get/set the state of the state of the 'hot-tracked' setting for the thumb.  Value is either &amp;quot;True&amp;quot; or &amp;quot;False&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== HoverColour ====&lt;br /&gt;
&amp;lt;font COLOR=&amp;quot;#FFBF00&amp;quot;&amp;gt;Falagard&amp;lt;/font&amp;gt; custom property definition - gets/sets a named user string.&lt;br /&gt;
&lt;br /&gt;
==== HoverImage ====&lt;br /&gt;
&amp;lt;font COLOR=&amp;quot;#FFBF00&amp;quot;&amp;gt;Falagard&amp;lt;/font&amp;gt; custom property definition - gets/sets a named user string.&lt;br /&gt;
&lt;br /&gt;
==== HoverTextColour ====&lt;br /&gt;
&amp;lt;font COLOR=&amp;quot;#FFBF00&amp;quot;&amp;gt;Falagard&amp;lt;/font&amp;gt; custom property definition - gets/sets a named user string.&lt;br /&gt;
&lt;br /&gt;
==== HoverTime ====&lt;br /&gt;
Property to get/set the hover timeout value in seconds.  Value is a float.&lt;br /&gt;
&lt;br /&gt;
==== ID ====&lt;br /&gt;
Property to get/set the ID value of the Window.  Value is an unsigned integer number.&lt;br /&gt;
&lt;br /&gt;
==== IconColours ====&lt;br /&gt;
&amp;lt;font COLOR=&amp;quot;#FFBF00&amp;quot;&amp;gt;Falagard&amp;lt;/font&amp;gt; custom property definition - gets/sets a named user string.&lt;br /&gt;
&lt;br /&gt;
==== IconImage ====&lt;br /&gt;
&amp;lt;font COLOR=&amp;quot;#FFBF00&amp;quot;&amp;gt;Falagard&amp;lt;/font&amp;gt; custom property definition - gets/sets a named user string.&lt;br /&gt;
&lt;br /&gt;
==== Image ====&lt;br /&gt;
Property to get/set the image for the &amp;lt;font COLOR=&amp;quot;#FFBF00&amp;quot;&amp;gt;Falagard&amp;lt;/font&amp;gt;StaticImage widget.  Value should be &amp;quot;set:[imageset name] image:[image name]&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== ImageColours ====&lt;br /&gt;
&amp;lt;font COLOR=&amp;quot;#FFBF00&amp;quot;&amp;gt;Falagard&amp;lt;/font&amp;gt; custom property definition - gets/sets a named user string.&lt;br /&gt;
&lt;br /&gt;
==== InactiveEditSelectionColour ====&lt;br /&gt;
&amp;lt;font COLOR=&amp;quot;#FFBF00&amp;quot;&amp;gt;Falagard&amp;lt;/font&amp;gt; property link definition - links a property on this window to another defined on a child window.&lt;br /&gt;
&lt;br /&gt;
==== InactiveSelectionColour ====&lt;br /&gt;
&amp;lt;font COLOR=&amp;quot;#FFBF00&amp;quot;&amp;gt;Falagard&amp;lt;/font&amp;gt; custom property definition - gets/sets a named user string.&lt;br /&gt;
&lt;br /&gt;
==== InheritsAlpha ====&lt;br /&gt;
Property to get/set the 'inherits alpha' setting for the Window.  Value is either &amp;quot;True&amp;quot; or &amp;quot;False&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== InheritsTooltipText ====&lt;br /&gt;
Property to get/set whether the window inherits its parents tooltip text when it has none of its own.  Value is either &amp;quot;True&amp;quot; or &amp;quot;False&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== ItemSpacing ====&lt;br /&gt;
Property to get/set the item spacing of the menu.  Value is a float.&lt;br /&gt;
&lt;br /&gt;
==== ItemTooltips ====&lt;br /&gt;
Property to access the show item tooltips setting of the list box.  Value is either &amp;quot;True&amp;quot; or &amp;quot;False&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== LookNFeel ====&lt;br /&gt;
Property to get/set the windows assigned look'n'feel.  Value is a string.&lt;br /&gt;
&lt;br /&gt;
==== MaskCodepoint ====&lt;br /&gt;
Property to get/set the utf32 codepoint value used for masking text.  Value is &amp;quot;[uint]&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== MaskText ====&lt;br /&gt;
Property to get/set the mask text setting for the Editbox.  Value is either &amp;quot;True&amp;quot; or &amp;quot;False&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== MaxEditTextLength ====&lt;br /&gt;
Property to get/set the the maximum allowed text length (as a count of code points).  Value is &amp;quot;[uint]&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== MaxTextLength ====&lt;br /&gt;
Property to get/set the the maximum allowed text length (as a count of code points).  Value is &amp;quot;[uint]&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== MaximumValue ====&lt;br /&gt;
Property to get/set the maximum value of the slider.  Value is a float.&lt;br /&gt;
&lt;br /&gt;
==== MinimumValue ====&lt;br /&gt;
Property to get/set the minimum value setting of the spinner.  Value is a float.&lt;br /&gt;
&lt;br /&gt;
==== MouseButtonDownAutoRepeat ====&lt;br /&gt;
Property to get/set whether the window will receive autorepeat mouse button down events.  Value is either &amp;quot;True&amp;quot; or &amp;quot;False&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== MouseCursorImage ====&lt;br /&gt;
Property to get/set the mouse cursor image for the Window.  Value should be &amp;quot;set:&amp;lt;imageset name&amp;gt; image:&amp;lt;image name&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== MousePassThroughEnabled ====&lt;br /&gt;
Property to get/set whether the window ignores mouse events and pass them through to any windows behind it. Value is either &amp;quot;True&amp;quot; or &amp;quot;False&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== MovingCursorImage ====&lt;br /&gt;
Property to get/set the moving cursor image for the List Header Segment.  Value should be &amp;quot;set:[imageset name] image:[image name]&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== MultiSelect ====&lt;br /&gt;
Property to get/set the multi-select setting of the list box.  Value is either &amp;quot;True&amp;quot; or &amp;quot;False&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== NESWSizingCursorImage ====&lt;br /&gt;
Property to get/set the NE-SW diagonal sizing cursor image for the FramwWindow.  Value should be &amp;quot;set:[imageset name] image:[image name]&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== NSSizingCursorImage ====&lt;br /&gt;
Property to get/set the N-S (up-down) sizing cursor image for the FramwWindow.  Value should be &amp;quot;set:[imageset name] image:[image name]&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== NWSESizingCursorImage ====&lt;br /&gt;
Property to get/set the NW-SE diagonal sizing cursor image for the FramwWindow.  Value should be &amp;quot;set:[imageset name] image:[image name]&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== NominatedSelectionColumnID ====&lt;br /&gt;
Property to get/set the nominated selection column (via ID).  Value is an unsigned integer number.&lt;br /&gt;
&lt;br /&gt;
==== NominatedSelectionRow ====&lt;br /&gt;
Property to get/set the nominated selection row.  Value is an unsigned integer number.&lt;br /&gt;
&lt;br /&gt;
==== NormalEditTextColour ====&lt;br /&gt;
&amp;lt;font COLOR=&amp;quot;#FFBF00&amp;quot;&amp;gt;Falagard&amp;lt;/font&amp;gt; property link definition - links a property on this window to another defined on a child window.&lt;br /&gt;
&lt;br /&gt;
==== NormalImage ====&lt;br /&gt;
&amp;lt;font COLOR=&amp;quot;#FFBF00&amp;quot;&amp;gt;Falagard&amp;lt;/font&amp;gt; custom property definition - gets/sets a named user string.&lt;br /&gt;
&lt;br /&gt;
==== NormalTextColour ====&lt;br /&gt;
&amp;lt;font COLOR=&amp;quot;#FFBF00&amp;quot;&amp;gt;Falagard&amp;lt;/font&amp;gt; custom property definition - gets/sets a named user string.&lt;br /&gt;
&lt;br /&gt;
==== OpenedColour ====&lt;br /&gt;
&amp;lt;font COLOR=&amp;quot;#FFBF00&amp;quot;&amp;gt;Falagard&amp;lt;/font&amp;gt; custom property definition - gets/sets a named user string.&lt;br /&gt;
&lt;br /&gt;
==== OverlapSize ====&lt;br /&gt;
Property to get/set the overlap size for the Scrollbar.  Value is a float.&lt;br /&gt;
&lt;br /&gt;
==== PageSize ====&lt;br /&gt;
Property to get/set the page size for the Scrollbar.  Value is a float.&lt;br /&gt;
&lt;br /&gt;
==== PushedColour ====&lt;br /&gt;
&amp;lt;font COLOR=&amp;quot;#FFBF00&amp;quot;&amp;gt;Falagard&amp;lt;/font&amp;gt; custom property definition - gets/sets a named user string.&lt;br /&gt;
&lt;br /&gt;
==== PushedImage ====&lt;br /&gt;
&amp;lt;font COLOR=&amp;quot;#FFBF00&amp;quot;&amp;gt;Falagard&amp;lt;/font&amp;gt; custom property definition - gets/sets a named user string.&lt;br /&gt;
&lt;br /&gt;
==== PushedOffColour ====&lt;br /&gt;
&amp;lt;font COLOR=&amp;quot;#FFBF00&amp;quot;&amp;gt;Falagard&amp;lt;/font&amp;gt; custom property definition - gets/sets a named user string.&lt;br /&gt;
&lt;br /&gt;
==== PushedTextColour ====&lt;br /&gt;
&amp;lt;font COLOR=&amp;quot;#FFBF00&amp;quot;&amp;gt;Falagard&amp;lt;/font&amp;gt; custom property definition - gets/sets a named user string.&lt;br /&gt;
&lt;br /&gt;
==== ReadOnly ====&lt;br /&gt;
Property to get/set the read-only setting for the Editbox.  Value is either &amp;quot;True&amp;quot; or &amp;quot;False&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== ReadOnlyBGColour ====&lt;br /&gt;
&amp;lt;font COLOR=&amp;quot;#FFBF00&amp;quot;&amp;gt;Falagard&amp;lt;/font&amp;gt; custom property definition - gets/sets a named user string.&lt;br /&gt;
&lt;br /&gt;
==== RestoreOldCapture ====&lt;br /&gt;
Property to get/set the 'restore old capture' setting for the Window.  Value is either &amp;quot;True&amp;quot; or &amp;quot;False&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== ReversedDirection ====&lt;br /&gt;
Property to get/set whether the Slider operates in reversed direction.  Value is either &amp;quot;True&amp;quot; or &amp;quot;False&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== ReversedProgress ====&lt;br /&gt;
Property to get/set whether the ProgressBar operates in reversed direction.  Value is either &amp;quot;True&amp;quot; or &amp;quot;False&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== RiseOnClick ====&lt;br /&gt;
Property to get/set whether the window will come tot he top of the z order hwn clicked.  Value is either &amp;quot;True&amp;quot; or &amp;quot;False&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== RollUpEnabled ====&lt;br /&gt;
Property to get/set the setting for whether the user is able to roll-up / shade the window.  Value is either &amp;quot;True&amp;quot; or &amp;quot;False&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== RollUpState ====&lt;br /&gt;
Property to get/set the roll-up / shade state of the window.  Value is either &amp;quot;True&amp;quot; or &amp;quot;False&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== RowCount ====&lt;br /&gt;
Property to access the number of rows in the list (read only)&lt;br /&gt;
&lt;br /&gt;
==== ScrollPosition ====&lt;br /&gt;
Property to get/set the scroll position of the Scrollbar.  Value is a float.&lt;br /&gt;
&lt;br /&gt;
==== SegmentWidgetType ====&lt;br /&gt;
Property to get/set the widget type used when creating header segments.  Value should be &amp;quot;[widgetTypeName]&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Selectable ====&lt;br /&gt;
Property to get/set the state of the selectable setting for the ItemEntry.  Value is either &amp;quot;True&amp;quot; or &amp;quot;False&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Selected ====&lt;br /&gt;
Property to get/set the selected state of the Checkbox.  Value is either &amp;quot;True&amp;quot; or &amp;quot;False&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== SelectedEditTextColour ====&lt;br /&gt;
&amp;lt;font COLOR=&amp;quot;#FFBF00&amp;quot;&amp;gt;Falagard&amp;lt;/font&amp;gt; property link definition - links a property on this window to another defined on a child window.&lt;br /&gt;
&lt;br /&gt;
==== SelectedTextColour ====&lt;br /&gt;
&amp;lt;font COLOR=&amp;quot;#FFBF00&amp;quot;&amp;gt;Falagard&amp;lt;/font&amp;gt; custom property definition - gets/sets a named user string.&lt;br /&gt;
&lt;br /&gt;
==== SelectionBrush ====&lt;br /&gt;
&amp;lt;font COLOR=&amp;quot;#FFBF00&amp;quot;&amp;gt;Falagard&amp;lt;/font&amp;gt; custom property definition - gets/sets a named user string.&lt;br /&gt;
&lt;br /&gt;
==== SelectionBrushImage ====&lt;br /&gt;
Property to get/set the selection brush image for the editbox.  Value should be &amp;quot;set:[imageset name] image:[image name]&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== SelectionColour ====&lt;br /&gt;
&amp;lt;font COLOR=&amp;quot;#FFBF00&amp;quot;&amp;gt;Falagard&amp;lt;/font&amp;gt; custom property definition - gets/sets a named user string.&lt;br /&gt;
&lt;br /&gt;
==== SelectionLength ====&lt;br /&gt;
Property to get/set the length of the selection (as a count of the number of code points selected).  Value is &amp;quot;[uint]&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== SelectionMode ====&lt;br /&gt;
Property to get/set the selection mode setting of the list.  Value is the text of one of the SelectionMode enumerated value names.&lt;br /&gt;
&lt;br /&gt;
==== SelectionStart ====&lt;br /&gt;
Property to get/set the zero based index of the selection start position within the text.  Value is &amp;quot;[uint]&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== SingleClickMode ====&lt;br /&gt;
Property to get/set the 'single click mode' setting for the combo box.  Value is either &amp;quot;True&amp;quot; or &amp;quot;False&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Sizable ====&lt;br /&gt;
Property to get/set the sizable setting of the header segment.  Value is either &amp;quot;True&amp;quot; or &amp;quot;False&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== SizingBorderThickness ====&lt;br /&gt;
Property to get/set the setting for the sizing border thickness.  Value is a float specifying the border thickness in pixels.&lt;br /&gt;
&lt;br /&gt;
==== SizingCursorImage ====&lt;br /&gt;
Property to get/set the sizing cursor image for the List Header Segment.  Value should be &amp;quot;set:[imageset name] image:[image name]&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== SizingEnabled ====&lt;br /&gt;
Property to get/set the state of the sizable setting for the FrameWindow.  Value is either &amp;quot;True&amp;quot; or &amp;quot;False&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Sort ====&lt;br /&gt;
Property to get/set the sort setting of the list box.  Value is either &amp;quot;True&amp;quot; or &amp;quot;False&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== SortColumnID ====&lt;br /&gt;
Property to get/set the current sort column (via ID code).  Value is an unsigned integer number.&lt;br /&gt;
&lt;br /&gt;
==== SortDirection ====&lt;br /&gt;
Property to get/set the sort direction setting of the header.  Value is the text of one of the SortDirection enumerated value names.&lt;br /&gt;
&lt;br /&gt;
==== SortEnabled ====&lt;br /&gt;
Property to get/set the state of the sorting enabled setting for the ItemListBase.  Value is either &amp;quot;True&amp;quot; or &amp;quot;False&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== SortList ====&lt;br /&gt;
Property to get/set the sort setting of the list box.  Value is either &amp;quot;True&amp;quot; or &amp;quot;False&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== SortMode ====&lt;br /&gt;
Property to get/set the sorting mode for the ItemListBase.  Value is either &amp;quot;Ascending&amp;quot;, &amp;quot;Descending&amp;quot; or &amp;quot;UserSort&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== SortSettingEnabled ====&lt;br /&gt;
Property to get/set the setting for for user modification of the sort column &amp;amp; direction.  Value is either &amp;quot;True&amp;quot; or &amp;quot;False&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== StepSize ====&lt;br /&gt;
Property to get/set the step size for the Scrollbar.  Value is a float.&lt;br /&gt;
&lt;br /&gt;
==== TabButtonType ====&lt;br /&gt;
Property to get/set the widget type used when creating tab buttons.  Value should be &amp;quot;[widgetTypeName]&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== TabHeight ====&lt;br /&gt;
Property to get/set the height of the tabs.&lt;br /&gt;
&lt;br /&gt;
==== TabPanePosition ====&lt;br /&gt;
Property to get/set the position of the buttons pane.&lt;br /&gt;
&lt;br /&gt;
==== TabTextPadding ====&lt;br /&gt;
Property to get/set the padding either side of the tab buttons.&lt;br /&gt;
&lt;br /&gt;
==== Text ====&lt;br /&gt;
Property to get/set the text / caption for the Window.  Value is the text string to use.&lt;br /&gt;
&lt;br /&gt;
==== TextColour ====&lt;br /&gt;
&amp;lt;font COLOR=&amp;quot;#FFBF00&amp;quot;&amp;gt;Falagard&amp;lt;/font&amp;gt; custom property definition - gets/sets a named user string.&lt;br /&gt;
&lt;br /&gt;
==== TextColours ====&lt;br /&gt;
Property to get/set the text colours for the &amp;lt;font COLOR=&amp;quot;#FFBF00&amp;quot;&amp;gt;Falagard&amp;lt;/font&amp;gt;StaticText widget.  Value is &amp;quot;tl:[aarrggbb] tr:[aarrggbb] bl:[aarrggbb] br:[aarrggbb]&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== TextInputMode ====&lt;br /&gt;
Property to get/set the TextInputMode setting for the spinner.  Value is &amp;quot;FloatingPoint&amp;quot;, &amp;quot;Integer&amp;quot;, &amp;quot;Hexadecimal&amp;quot;, or &amp;quot;Octal&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== TextPadding ====&lt;br /&gt;
&amp;lt;font COLOR=&amp;quot;#FFBF00&amp;quot;&amp;gt;Falagard&amp;lt;/font&amp;gt; custom property definition - gets/sets a named user string.&lt;br /&gt;
&lt;br /&gt;
==== TitlebarEnabled ====&lt;br /&gt;
Property to get/set the setting for whether the window title-bar will be enabled (or displayed depending upon choice of final widget type).  Value is either &amp;quot;True&amp;quot; or &amp;quot;False&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== TitlebarFont ====&lt;br /&gt;
&amp;lt;font COLOR=&amp;quot;#FFBF00&amp;quot;&amp;gt;Falagard&amp;lt;/font&amp;gt; property link definition - links a property on this window to another defined on a child window.&lt;br /&gt;
&lt;br /&gt;
==== Tooltip ====&lt;br /&gt;
Property to get/set the tooltip text for the window.  Value is the tooltip text for the window.&lt;br /&gt;
&lt;br /&gt;
==== UnifiedAreaRect ====&lt;br /&gt;
Property to get/set the windows unified area rectangle.  Value is a &amp;quot;URect&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== UnifiedHeight ====&lt;br /&gt;
Property to get/set the windows unified height.  Value is a &amp;quot;UDim&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== UnifiedMaxSize ====&lt;br /&gt;
Property to get/set the windows unified maximum size.  Value is a &amp;quot;UVector2&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== UnifiedMinSize ====&lt;br /&gt;
Property to get/set the windows unified minimum size.  Value is a &amp;quot;UVector2&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== UnifiedPosition ====&lt;br /&gt;
Property to get/set the windows unified position.  Value is a &amp;quot;UVector2&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== UnifiedSize ====&lt;br /&gt;
Property to get/set the windows unified size.  Value is a &amp;quot;UVector2&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== UnifiedWidth ====&lt;br /&gt;
Property to get/set the windows unified width.  Value is a &amp;quot;UDim&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== UnifiedXPosition ====&lt;br /&gt;
Property to get/set the windows unified position x-coordinate.  Value is a &amp;quot;UDim&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== UnifiedYPosition ====&lt;br /&gt;
Property to get/set the windows unified position y-coordinate.  Value is a &amp;quot;UDim&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== ValidationString ====&lt;br /&gt;
Property to get/set the validation string Editbox.  Value is a text string.&lt;br /&gt;
&lt;br /&gt;
==== VertFormatting ====&lt;br /&gt;
&amp;lt;font COLOR=&amp;quot;#FFBF00&amp;quot;&amp;gt;Falagard&amp;lt;/font&amp;gt; custom property definition - gets/sets a named user string.&lt;br /&gt;
&lt;br /&gt;
==== VertFree ====&lt;br /&gt;
Property to get/set the state the setting to free the thumb vertically.  Value is either &amp;quot;True&amp;quot; or &amp;quot;False&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== VertOverlapSize ====&lt;br /&gt;
Property to get/set the overlap size for the vertical Scrollbar.  Value is a float.&lt;br /&gt;
&lt;br /&gt;
==== VertRange ====&lt;br /&gt;
Property to get/set the vertical movement range for the thumb.  Value is &amp;quot;min:[float] max:[float]&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== VertScrollPosition ====&lt;br /&gt;
Property to get/set the scroll position of the vertical Scrollbar as a fraction.  Value is a float.&lt;br /&gt;
&lt;br /&gt;
==== VertScrollbar ====&lt;br /&gt;
Property to get/set the setting for the vertical scroll bar.  Value is either &amp;quot;True&amp;quot; or &amp;quot;False&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== VertStepSize ====&lt;br /&gt;
Property to get/set the step size for the vertical Scrollbar.  Value is a float.&lt;br /&gt;
&lt;br /&gt;
==== VerticalAlignment ====&lt;br /&gt;
Property to get/set the windows vertical alignment.  Value is one of &amp;quot;Top&amp;quot;, &amp;quot;Centre&amp;quot; or &amp;quot;Bottom&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== VerticalProgress ====&lt;br /&gt;
Property to get/set whether the ProgressBar operates in the vertical direction.  Value is either &amp;quot;True&amp;quot; or &amp;quot;False&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== VerticalScrollbar ====&lt;br /&gt;
Property to get/set whether the Scrollbar operates in the vertical direction.  Value is either &amp;quot;True&amp;quot; or &amp;quot;False&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== VerticalSlider ====&lt;br /&gt;
Property to get/set whether the Slider operates in the vertical direction.  Value is either &amp;quot;True&amp;quot; or &amp;quot;False&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Visible ====&lt;br /&gt;
Property to get/set the 'visible state' setting for the Window.  Value is either &amp;quot;True&amp;quot; or &amp;quot;False&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== WantsMultiClickEvents ====&lt;br /&gt;
Property to get/set whether the window will receive double-click and triple-click events.  Value is either &amp;quot;True&amp;quot; or &amp;quot;False&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== WindowRenderer ====&lt;br /&gt;
Property to get/set the windows assigned window renderer objects name.  Value is a string.&lt;br /&gt;
&lt;br /&gt;
==== WordWrap ====&lt;br /&gt;
Property to get/set the word-wrap setting of the edit box.  Value is either &amp;quot;True&amp;quot; or &amp;quot;False&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== ZOrderChangeEnabled ====&lt;br /&gt;
Property to get/set the 'z-order changing enabled' setting for the Window.  Value is either &amp;quot;True&amp;quot; or &amp;quot;False&amp;quot;.&lt;/div&gt;</summary>
		<author><name>Rackle</name></author>	</entry>

	</feed>