<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://cegui.org.uk/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Pompei2</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.uk/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Pompei2"/>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/Special:Contributions/Pompei2"/>
		<updated>2026-04-05T08:51:41Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.24.1</generator>

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

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=FAQ&amp;diff=2700</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=FAQ&amp;diff=2700"/>
				<updated>2007-08-02T12:24:30Z</updated>
		
		<summary type="html">&lt;p&gt;Pompei2: &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;
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>Pompei2</name></author>	</entry>

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

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

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

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

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

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

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Using_CEGUI_with_SDL_and_OpenGL&amp;diff=2667</id>
		<title>Using CEGUI with SDL and OpenGL</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=Using_CEGUI_with_SDL_and_OpenGL&amp;diff=2667"/>
				<updated>2007-05-30T10:40:17Z</updated>
		
		<summary type="html">&lt;p&gt;Pompei2: /* Injecting Input */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://www.libsdl.org SDL (Simple DirectMedia Layer)] is an excellent library for writing portable games and other multimedia applications, but as it is a low-level library, it has no native support for GUI interfaces.&lt;br /&gt;
&lt;br /&gt;
When using [http://www.opengl.org OpenGL] for rendering, using CEGUI with SDL is not hard.&lt;br /&gt;
&lt;br /&gt;
I'll assume that you've read the imbiciles tutorials, and have used SDL with OpenGL.&lt;br /&gt;
And know C / C++ ...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Initialisation ===&lt;br /&gt;
Before we can do anything, we need to initialise our libraries.&lt;br /&gt;
First SDL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
if (SDL_Init(SDL_INIT_VIDEO)&amp;lt;0)&lt;br /&gt;
{&lt;br /&gt;
  fprintf(stderr, &amp;quot;Unable to initialise SDL: %s&amp;quot;, SDL_GetError());&lt;br /&gt;
  exit(0);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we initialise SDL with video support. We need this for CEGUI.&lt;br /&gt;
O.K. now SDL is ready to go. So let's fire up OpenGL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
if (SDL_SetVideoMode(800,600,0,SDL_OPENGL)==NULL)&lt;br /&gt;
{&lt;br /&gt;
  fprintf(stderr, &amp;quot;Unable to set OpenGL videomode: %s&amp;quot;, SDL_GetError());&lt;br /&gt;
  SDL_Quit();&lt;br /&gt;
  exit(0);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now OpenGL is ready. But we still need to set a decent configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
glEnable(GL_CULL_FACE);&lt;br /&gt;
glDisable(GL_FOG);&lt;br /&gt;
glClearColor(0.0f,0.0f,0.0f,1.0f);&lt;br /&gt;
glViewport(0,0, 800,600);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The OpenGL renderer that comes with CEGUI sets the matrices itself, so if you're using CEGUI for all your rendering needs this would be fine. Normally you would want the normal perspective projection setup though:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
glMatrixMode(GL_PROJECTION);&lt;br /&gt;
glLoadIdentity();&lt;br /&gt;
gluPerspective(45.0, 800.0/600.0, 0.1,100.0);&lt;br /&gt;
glMatrixMode(GL_MODELVIEW);&lt;br /&gt;
glLoadIdentity();&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SDL and OpenGL are now both ready for action. So it's time to initialise CEGUI.&lt;br /&gt;
First we need the renderer.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
#include &amp;quot;renderers/OpenGLGUIRenderer/openglrenderer.h&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It must be created before starting CEGUI.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
CEGUI::OpenGLRenderer* renderer = new CEGUI::OpenGLRenderer(0,800,600);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then the CEGUI::System must be initialised:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
new CEGUI::System(renderer);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Remember that you have to load a widget set, set the mouse cursor and a default font before CEGUI is completely ready. This is described in the other tutorials.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
By default the SDL cursor is displayed, so we'll remove that:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
SDL_ShowCursor(SDL_DISABLE);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As keypress characters needs to be injected into CEGUI, we activate unicode translation for SDL key events:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
SDL_EnableUNICODE(1);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This makes it alot easier as we don't have to worry about modifier keys and keyboard layouts ourselves. More about this later on...&lt;br /&gt;
&lt;br /&gt;
Key repeat is a nice feature for the text input widgets in CEGUI, so we use SDL to generate them:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Everything is ready now, and we can start the main loop :)&lt;br /&gt;
&lt;br /&gt;
=== The Main Loop ===&lt;br /&gt;
To make it all happen, we use a simple main loop that just keeps pushing on those frames:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
void main_loop()&lt;br /&gt;
{&lt;br /&gt;
  bool must_quit = false;&lt;br /&gt;
  &lt;br /&gt;
  // get &amp;quot;run-time&amp;quot; in seconds&lt;br /&gt;
  double last_time_pulse = 0.001*static_cast&amp;lt;double&amp;gt;(SDL_GetTicks());&lt;br /&gt;
  &lt;br /&gt;
  while (!must_quit)&lt;br /&gt;
  {&lt;br /&gt;
    inject_input(must_quit);&lt;br /&gt;
    inject_time_pulse(last_time_pulse);&lt;br /&gt;
    render_gui();&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function will run the main loop until the ''bool'' value ''must_quit'' becomes ''true''. In this tutorial this will happen when the user clicks the close button provided by the window manager.&lt;br /&gt;
&lt;br /&gt;
The ''double'' value ''last_time_pulse'' holds the time of the latest time pulse injection. More about this later.&lt;br /&gt;
&lt;br /&gt;
Each function in the ''while'' loop will be described below.&lt;br /&gt;
&lt;br /&gt;
There are endless ways of making your main loop. I took a simple approach to ease writing this tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Injecting Input ===&lt;br /&gt;
When the user press or release keyboard or mouse buttons, we need to tell CEGUI about it, for this we use the injection functions of ''CEGUI::System''.&lt;br /&gt;
&lt;br /&gt;
Here is what our inject_input function looks like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
void inject_input(bool&amp;amp; must_quit)&lt;br /&gt;
{&lt;br /&gt;
  SDL_Event e;&lt;br /&gt;
  &lt;br /&gt;
  // go through all available events&lt;br /&gt;
  while (SDL_PollEvent(&amp;amp;e))&lt;br /&gt;
  {&lt;br /&gt;
    // we use a switch to determine the event type&lt;br /&gt;
    switch (e.type)&lt;br /&gt;
    {&lt;br /&gt;
      // mouse motion handler&lt;br /&gt;
      case SDL_MOUSEMOTION:&lt;br /&gt;
        // we inject the mouse position directly.&lt;br /&gt;
        CEGUI::System::getSingleton().injectMousePosition(&lt;br /&gt;
          static_cast&amp;lt;float&amp;gt;(e.motion.x),&lt;br /&gt;
          static_cast&amp;lt;float&amp;gt;(e.motion.y)&lt;br /&gt;
        );&lt;br /&gt;
        break;&lt;br /&gt;
    &lt;br /&gt;
      // mouse down handler&lt;br /&gt;
      case SDL_MOUSEBUTTONDOWN:&lt;br /&gt;
        // let a special function handle the mouse button down event&lt;br /&gt;
        handle_mouse_down(e.button.button);&lt;br /&gt;
        break;&lt;br /&gt;
    &lt;br /&gt;
      // mouse up handler&lt;br /&gt;
      case SDL_MOUSEBUTTONUP:&lt;br /&gt;
        // let a special function handle the mouse button up event&lt;br /&gt;
        handle_mouse_up(e.button.button);&lt;br /&gt;
        break;&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
      // key down&lt;br /&gt;
      case SDL_KEYDOWN:&lt;br /&gt;
        // to tell CEGUI that a key was pressed, we inject the scancode.&lt;br /&gt;
        CEGUI::System::getSingleton().injectKeyDown(e.key.keysym.scancode);&lt;br /&gt;
        &lt;br /&gt;
        // as for the character it's a litte more complicated. we'll use for translated unicode value.&lt;br /&gt;
        // this is described in more detail below.&lt;br /&gt;
        if ((e.key.keysym.unicode != 0)&lt;br /&gt;
        {&lt;br /&gt;
          CEGUI::System::getSingleton().injectChar(e.key.keysym.unicode);&lt;br /&gt;
        }&lt;br /&gt;
        break;&lt;br /&gt;
    &lt;br /&gt;
      // key up&lt;br /&gt;
      case SDL_KEYUP:&lt;br /&gt;
        // like before we inject the scancode directly.&lt;br /&gt;
        CEGUI::System::getSingleton().injectKeyUp(e.key.keysym.scancode);&lt;br /&gt;
        break;&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
      // WM quit event occured&lt;br /&gt;
      case SDL_QUIT:&lt;br /&gt;
        must_quit = true;&lt;br /&gt;
        break;&lt;br /&gt;
    &lt;br /&gt;
    }&lt;br /&gt;
  &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First I'll explain the events that get handled directly in the ''inject_input'' function.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Mouse Motion''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
// we inject the mouse position directly.&lt;br /&gt;
CEGUI::System::getSingleton().injectMousePosition(&lt;br /&gt;
  static_cast&amp;lt;float&amp;gt;(e.motion.x),&lt;br /&gt;
  static_cast&amp;lt;float&amp;gt;(e.motion.y)&lt;br /&gt;
);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is nothing special here. Like stated in the comment the mouse position is just injected directly.&lt;br /&gt;
&lt;br /&gt;
There are two ways of injecting mouse motion. One where you inject how much the cursor moved, and one where you inject the mouse cursor position. The last one is failsafe.&lt;br /&gt;
Then first one only works correctly in fullscreen mode, or with input grabbed. The reason for this is that in regular windowed mode, the mouse can be moved outside the application window, and during this time no mouse motion event are generated. So if we enter the window at another position, the real mousecursor and CEGUI's mouse cursor will be offset, which will break mouse usage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Key Down'''&amp;lt;br /&amp;gt;&lt;br /&gt;
This event takes a little more work. CEGUI requires that key characters (the printable character the key represents) are injected alongside key codes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
// to tell CEGUI that a key was pressed, we inject the scancode.&lt;br /&gt;
CEGUI::System::getSingleton().injectKeyDown(e.key.keysym.scancode);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Luckily the key code is just the SDL scancode, so we inject that directly. (This only seems to be true on windows. On other platforms you will need to use a translation function. One can be found here [[SDL to CEGUI keytable]])&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
// as for the character it's a litte more complicated. we'll use for translated unicode value.&lt;br /&gt;
// this is described in more detail below.&lt;br /&gt;
if (e.key.keysym.unicode != 0)&lt;br /&gt;
{&lt;br /&gt;
  CEGUI::System::getSingleton().injectChar(e.key.keysym.unicode);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Instead of formatting the keypress ourselves, we let SDL do it for us. We could check if we actually got a valid ASCII code, but we want support for local characters as well, so we won't do that. For more information, take a look at the SDL documentation for this feature. [http://www.libsdl.org/cgi/docwiki.cgi/SDL_5fkeysym SDL_keysym].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Key Up'''&amp;lt;br /&amp;gt;&lt;br /&gt;
This one is simple. Only the keycode need to injected. So we just use the scancode directly (As with KeyDown you will need to use a translation function for non Windows platforms. Check KeyDown above for more info):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
// like before we inject the scancode directly.&lt;br /&gt;
CEGUI::System::getSingleton().injectKeyUp(e.key.keysym.scancode);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Mouse Button Down and Mouse Wheel'''&amp;lt;br /&amp;gt;&lt;br /&gt;
CEGUI and SDL are a little different when it comes to mouse button and mouse wheel events. So a little conversion is necessary. Here's the ''handle_mouse_down'' function that gets called when a mouse button down event occurs in SDL. It takes one parameter, a ''Uint8'' describing the mouse button that was pressed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
void handle_mouse_down(Uint8 button)&lt;br /&gt;
	{&lt;br /&gt;
	switch ( button )&lt;br /&gt;
		{&lt;br /&gt;
		// handle real mouse buttons&lt;br /&gt;
		case SDL_BUTTON_LEFT:&lt;br /&gt;
			CEGUI::System::getSingleton().injectMouseButtonDown(CEGUI::LeftButton);&lt;br /&gt;
			break;&lt;br /&gt;
		case SDL_BUTTON_MIDDLE:&lt;br /&gt;
			CEGUI::System::getSingleton().injectMouseButtonDown(CEGUI::MiddleButton);&lt;br /&gt;
			break;&lt;br /&gt;
		case SDL_BUTTON_RIGHT:&lt;br /&gt;
			CEGUI::System::getSingleton().injectMouseButtonDown(CEGUI::RightButton);&lt;br /&gt;
			break;&lt;br /&gt;
		&lt;br /&gt;
		// handle the mouse wheel&lt;br /&gt;
		case SDL_BUTTON_WHEELDOWN:&lt;br /&gt;
			CEGUI::System::getSingleton().injectMouseWheelChange( -1 );&lt;br /&gt;
			break;&lt;br /&gt;
		case SDL_BUTTON_WHEELUP:&lt;br /&gt;
			CEGUI::System::getSingleton().injectMouseWheelChange( +1 );&lt;br /&gt;
			break;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I chose a very &amp;quot;manual&amp;quot; conversion, but it works fine. Everything should be pretty self-explainatory.&lt;br /&gt;
As you can see mouse wheel events are emitted as mouse button down events in SDL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Mouse Button Up'''&amp;lt;br /&amp;gt;&lt;br /&gt;
The mouse button up event is handled very much like the mouse button down event, except there are no mousewheel release events.&lt;br /&gt;
Like ''handle_mouse_down'' it takes one parameter, a ''Uint8'' describing the mouse button that was released:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
void handle_mouse_up(Uint8 button)&lt;br /&gt;
	{&lt;br /&gt;
	switch ( button )&lt;br /&gt;
		{&lt;br /&gt;
		case SDL_BUTTON_LEFT:&lt;br /&gt;
			CEGUI::System::getSingleton().injectMouseButtonUp(CEGUI::LeftButton);&lt;br /&gt;
			break;&lt;br /&gt;
		case SDL_BUTTON_MIDDLE:&lt;br /&gt;
			CEGUI::System::getSingleton().injectMouseButtonUp(CEGUI::MiddleButton);&lt;br /&gt;
			break;&lt;br /&gt;
		case SDL_BUTTON_RIGHT:&lt;br /&gt;
			CEGUI::System::getSingleton().injectMouseButtonUp(CEGUI::RightButton);&lt;br /&gt;
			break;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Time Pulses ===&lt;br /&gt;
SDL has a built-in millisecond counter which we will use for this example. There are other ways to use timers with SDL, but I chose this approach as it is simple to use, and provides decent precision.&lt;br /&gt;
&lt;br /&gt;
Remember in the main loop where we stored the current &amp;quot;run-time&amp;quot; in seconds ? This value will be passed as a reference to ''inject_time_pulse'' function which in turn will set a new value to it.&lt;br /&gt;
&lt;br /&gt;
CEGUI's interface for injecting time pulses requires that you pass the time in seconds that has passed since the last time pulse injection. Let's take a look at the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
void inject_time_pulse(double&amp;amp; last_time_pulse)&lt;br /&gt;
{&lt;br /&gt;
	// get current &amp;quot;run-time&amp;quot; in seconds&lt;br /&gt;
	double t = 0.001*SDL_GetTicks();&lt;br /&gt;
&lt;br /&gt;
	// inject the time that passed since the last call &lt;br /&gt;
	CEGUI::System::getSingleton().injectTimePulse( float(t-last_time_pulse) );&lt;br /&gt;
&lt;br /&gt;
	// store the new time as the last time&lt;br /&gt;
	last_time_pulse = t;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The first line gets the actual &amp;quot;run-time&amp;quot; when called.&lt;br /&gt;
* The second line injects the time pulse as the difference between the current time and the last time.&lt;br /&gt;
* The third line stores the current time as the last time a time pulse was injected.&lt;br /&gt;
&lt;br /&gt;
This will work for about 47 days... After that the counter wraps to zero and it breaks (a single insanely invalid timepulse will be injected).&lt;br /&gt;
I'll leave it up to you to fix that if it's a problem.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Rendering ===&lt;br /&gt;
Now all that's left is renderingthe GUI.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
void render_gui()&lt;br /&gt;
{&lt;br /&gt;
	// clear the colour buffer&lt;br /&gt;
	glClear( GL_COLOR_BUFFER_BIT );&lt;br /&gt;
&lt;br /&gt;
	// render the GUI :)&lt;br /&gt;
	CEGUI::System::getSingleton().renderGUI();&lt;br /&gt;
&lt;br /&gt;
	// Update the screen&lt;br /&gt;
	SDL_GL_SwapBuffers();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
CEGUI::System::getSingleton().renderGUI();&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
does all the CEGUI magic and sets OpenGL state itself. As long as the viewport is setup, it will render the GUI.&lt;br /&gt;
&lt;br /&gt;
=== Error Handling ===&lt;br /&gt;
The neat C++ architecture of CEGUI suggests that C++ exceptions are used for error handling. This is completely true.&lt;br /&gt;
Whenever an error occurs, a sub-class of ''CEGUI::Exception'' is thrown.&lt;br /&gt;
&lt;br /&gt;
There are many scenarios where an exception can be thrown. And whether or not these should be considered fatal depends on the application. To make sure you catch the CEGUI exceptions a regular ''try'' block is used. Like so:&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;
	// do some cegui code&lt;br /&gt;
}&lt;br /&gt;
catch (CEGUI::Exception&amp;amp; e)&lt;br /&gt;
{&lt;br /&gt;
	fprintf(stderr,&amp;quot;CEGUI Exception occured: %s&amp;quot;, e.getMessage().c_str());&lt;br /&gt;
	// you could quit here&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This should provide you with the basic steps needed to get interactive with CEGUI in your SDL application.&lt;br /&gt;
Have fun.&lt;br /&gt;
&lt;br /&gt;
=== The Code ===&lt;br /&gt;
To compile under linux:&lt;br /&gt;
&amp;lt;code&amp;gt;gcc teste.cpp -I/usr/include/CEGUI/ -lSDL -lGL -lGLU -lCEGUIBase -lCEGUIOpenGLRenderer&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This code uses release 0.5.0 of CEGUI.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;cpp/&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * Adapted by: Johnny Souza - johnnysouza.js@gmail.com&lt;br /&gt;
 * Date: 19/01/07 17:00&lt;br /&gt;
 * Description: Using CEGUI with SDL and OpenGL&lt;br /&gt;
 */&lt;br /&gt;
  &lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
#include &amp;lt;SDL/SDL.h&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
#include &amp;lt;CEGUI.h&amp;gt;&lt;br /&gt;
/* for release 0.4.X use:&lt;br /&gt;
 * #include &amp;lt;renderers/OpenGLGUIRenderer/openglrenderer.h&amp;gt;&lt;br /&gt;
 */&lt;br /&gt;
#include &amp;lt;RendererModules/OpenGLGUIRenderer/openglrenderer.h&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
#include &amp;lt;GL/gl.h&amp;gt;&lt;br /&gt;
#include &amp;lt;GL/glu.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
void handle_mouse_down(Uint8 button)&lt;br /&gt;
{&lt;br /&gt;
	switch ( button ) {&lt;br /&gt;
		case SDL_BUTTON_LEFT:&lt;br /&gt;
			CEGUI::System::getSingleton().injectMouseButtonDown(CEGUI::LeftButton);&lt;br /&gt;
			break;&lt;br /&gt;
		case SDL_BUTTON_MIDDLE:&lt;br /&gt;
			CEGUI::System::getSingleton().injectMouseButtonDown(CEGUI::MiddleButton);&lt;br /&gt;
			break;&lt;br /&gt;
		case SDL_BUTTON_RIGHT:&lt;br /&gt;
			CEGUI::System::getSingleton().injectMouseButtonDown(CEGUI::RightButton);&lt;br /&gt;
			break;&lt;br /&gt;
&lt;br /&gt;
		case SDL_BUTTON_WHEELDOWN:&lt;br /&gt;
			CEGUI::System::getSingleton().injectMouseWheelChange( -1 );&lt;br /&gt;
			break;&lt;br /&gt;
		case SDL_BUTTON_WHEELUP:&lt;br /&gt;
			CEGUI::System::getSingleton().injectMouseWheelChange( +1 );&lt;br /&gt;
			break;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
void handle_mouse_up(Uint8 button)&lt;br /&gt;
{&lt;br /&gt;
	switch ( button )&lt;br /&gt;
	{&lt;br /&gt;
		case SDL_BUTTON_LEFT:&lt;br /&gt;
			CEGUI::System::getSingleton().injectMouseButtonUp(CEGUI::LeftButton);&lt;br /&gt;
			break;&lt;br /&gt;
		case SDL_BUTTON_MIDDLE:&lt;br /&gt;
			CEGUI::System::getSingleton().injectMouseButtonUp(CEGUI::MiddleButton);&lt;br /&gt;
			break;&lt;br /&gt;
		case SDL_BUTTON_RIGHT:&lt;br /&gt;
			CEGUI::System::getSingleton().injectMouseButtonUp(CEGUI::RightButton);&lt;br /&gt;
			break;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
void inject_input (bool &amp;amp; must_quit) &lt;br /&gt;
{&lt;br /&gt;
	SDL_Event e;&lt;br /&gt;
	/* go through all available events */&lt;br /&gt;
	while (SDL_PollEvent(&amp;amp;e)) {&lt;br /&gt;
		/* we use a switch to determine the event type */&lt;br /&gt;
		switch (e.type) {&lt;br /&gt;
			/* mouse motion handler */&lt;br /&gt;
			case SDL_MOUSEMOTION:&lt;br /&gt;
				/* we inject the mouse position directly. */&lt;br /&gt;
				CEGUI::System::getSingleton().injectMousePosition(static_cast&amp;lt;float&amp;gt;(e.motion.x),static_cast&amp;lt;float&amp;gt;(e.motion.y));&lt;br /&gt;
				break;&lt;br /&gt;
	  &lt;br /&gt;
			/* mouse down handler */&lt;br /&gt;
			case SDL_MOUSEBUTTONDOWN:&lt;br /&gt;
				/* let a special function handle the mouse button down event */&lt;br /&gt;
				handle_mouse_down (e.button.button);&lt;br /&gt;
				break;&lt;br /&gt;
&lt;br /&gt;
			/* mouse up handler */&lt;br /&gt;
			case SDL_MOUSEBUTTONUP:&lt;br /&gt;
				/* let a special function handle the mouse button up event */&lt;br /&gt;
				handle_mouse_up (e.button.button);&lt;br /&gt;
				break;&lt;br /&gt;
&lt;br /&gt;
			/* key down */&lt;br /&gt;
			case SDL_KEYDOWN:&lt;br /&gt;
				/* to tell CEGUI that a key was pressed, we inject the scancode. */&lt;br /&gt;
				CEGUI::System::getSingleton().injectKeyDown(e.key.keysym.scancode);&lt;br /&gt;
				/* as for the character it's a litte more complicated.&lt;br /&gt;
				 * we'll use for translated unicode value.&lt;br /&gt;
				 * this is described in more detail below.&lt;br /&gt;
				 */&lt;br /&gt;
				if ((e.key.keysym.unicode &amp;amp; 0xFF80) == 0) {&lt;br /&gt;
					CEGUI::System::getSingleton().injectChar(e.key.keysym.unicode &amp;amp; 0x7F);&lt;br /&gt;
				}&lt;br /&gt;
				break;&lt;br /&gt;
	  &lt;br /&gt;
			/* key up */&lt;br /&gt;
			case SDL_KEYUP:&lt;br /&gt;
				/* like before we inject the scancode directly. */&lt;br /&gt;
				CEGUI::System::getSingleton().injectKeyUp(e.key.keysym.scancode);&lt;br /&gt;
				break;&lt;br /&gt;
	  &lt;br /&gt;
			/* WM quit event occured */&lt;br /&gt;
			case SDL_QUIT:&lt;br /&gt;
				must_quit = true;&lt;br /&gt;
				break;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
void inject_time_pulse(double&amp;amp; last_time_pulse)&lt;br /&gt;
{&lt;br /&gt;
	/* get current &amp;quot;run-time&amp;quot; in seconds */&lt;br /&gt;
	double t = 0.001*SDL_GetTicks();&lt;br /&gt;
	/* inject the time that passed since the last call */&lt;br /&gt;
	CEGUI::System::getSingleton().injectTimePulse( float(t-last_time_pulse) );&lt;br /&gt;
	/* store the new time as the last time */&lt;br /&gt;
	last_time_pulse = t;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void render_gui()&lt;br /&gt;
{&lt;br /&gt;
	/* clear the colour buffer */&lt;br /&gt;
	glClear( GL_COLOR_BUFFER_BIT );&lt;br /&gt;
	/* render the GUI :) */&lt;br /&gt;
	CEGUI::System::getSingleton().renderGUI();&lt;br /&gt;
	/* Update the screen */&lt;br /&gt;
	SDL_GL_SwapBuffers();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
void main_loop () &lt;br /&gt;
{&lt;br /&gt;
	bool must_quit = false;&lt;br /&gt;
	/* get &amp;quot;run-time&amp;quot; in seconds */&lt;br /&gt;
	double last_time_pulse = 0.001*static_cast&amp;lt;double&amp;gt;(SDL_GetTicks());&lt;br /&gt;
	while (!must_quit) {&lt;br /&gt;
		inject_input (must_quit);&lt;br /&gt;
		inject_time_pulse (last_time_pulse);&lt;br /&gt;
		render_gui ();&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
int main (int argc, char **argv) &lt;br /&gt;
{&lt;br /&gt;
	SDL_Surface * screen;&lt;br /&gt;
	atexit (SDL_Quit);&lt;br /&gt;
	SDL_Init (SDL_INIT_VIDEO);&lt;br /&gt;
	screen = SDL_SetVideoMode (600, 480, 0, SDL_OPENGL);&lt;br /&gt;
	if (screen == NULL) {&lt;br /&gt;
		/* Se ainda não der, desiste! */ &lt;br /&gt;
		fprintf (stderr, &amp;quot;Impossível ajustar ao vídeo: %s\n&amp;quot;, SDL_GetError ());&lt;br /&gt;
		exit (1);&lt;br /&gt;
	}&lt;br /&gt;
	CEGUI::OpenGLRenderer * renderer = new CEGUI::OpenGLRenderer (0, 600, 480);&lt;br /&gt;
	new CEGUI::System (renderer);&lt;br /&gt;
	SDL_ShowCursor (SDL_DISABLE);&lt;br /&gt;
	SDL_EnableUNICODE (1);&lt;br /&gt;
	SDL_EnableKeyRepeat (SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL);&lt;br /&gt;
	main_loop();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[User:Lindquist|Lindquist]] 16:21, 8 May 2005 (BST)&lt;/div&gt;</summary>
		<author><name>Pompei2</name></author>	</entry>

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

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

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=News_Archive&amp;diff=2617</id>
		<title>News Archive</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=News_Archive&amp;diff=2617"/>
				<updated>2007-05-04T19:52:45Z</updated>
		
		<summary type="html">&lt;p&gt;Pompei2: /* Site Moved (again) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Release of 0.5.0b source packages by [[User:CrazyEddie|CrazyEddie]] 28th November 2006 ===&lt;br /&gt;
We have issued new versions of the 0.5.0 source packages - the previous ones were missing the files for the Microsoft Direct3D based renderer modules, the packages contain no other changes  Thanks go to dmail for raising this issue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Release of 0.5.0b binary packages for Win32 by [[User:CrazyEddie|CrazyEddie]] 14th November 2006 ===&lt;br /&gt;
The Win32 binary dependency and SDK packages released on the 6th contained an inconsistency related to the SILLY library.  Today I have issued a new set of binary packages which have been fixed - the new version is known as 0.5.0b, and contains no other changes.  Many thanks to forum member vasmann for alerting me to the issue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Release of 0.5.0 stable by [[User:CrazyEddie|CrazyEddie]] 6th November 2006 ===&lt;br /&gt;
It has been almost a year in the making, but it is finally here!  The CEGUI development team is immensely proud to announce the release of Crazy Eddie's GUI System 0.5.0 - the first stable release of code in the 0.5.x series.&lt;br /&gt;
&lt;br /&gt;
There are pretty vast changes in this release from the previous stable (0.4.1) - many of these changes are breaking, so please agian review [[Release Notes 0.5.X]] to see details of most of these changes.&lt;br /&gt;
&lt;br /&gt;
This release consists of various files that you may need, depending on your usage of the system.  We are providing source packages, documentation packages, dependency packages, and binary SDK packages (for VC7.1 and VC8).&lt;br /&gt;
&lt;br /&gt;
To coincide with this release, we are also happy to announce a stable 0.1.0 release of Simple Image Loading LibrarY (SILLY), and the 0.5.0 release of the CELayoutEditor.  Please see the [[Downloads|downloads page]] for full details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== CEGUI 0.5.0 Release Candidate 2 by [[User:Dalfy|Dalfy]] 13 august 2006 ===&lt;br /&gt;
We are pleased to announce the second release candidate of the 0.5 branches of CEGUI. There has been a lot of changes between 0.4.1 and 0.5.0. They are listed in [[Release Notes 0.5.X]]. Please have a try at it and help us get a final release soon. Check the download page. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== CEGUI 0.5.0 Release Candidate 1 by [[User:Dalfy|Dalfy]] 20 June 2006=== &lt;br /&gt;
We are pleased to announce the first release candidate of the 0.5 branches of CEGUI. There has been a lot of changes between 0.4.1 and 0.5.0. They are listed in [[Release Notes 0.5.X]]. Please have a try at it and help us get a final release soon by sending a lot of bug report in Mantis bug tracker. The download page for CEGUI-0.5.0-RC1 contains some typos but most link are already valid and mirrored on sourceforge. The link on the download page are going to be fixed during the day. &lt;br /&gt;
&lt;br /&gt;
For any question regarding this release you can use either the forum either irc. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Migration to Subversion  by [[User:CrazyEddie|CrazyEddie]] 11:13, 3 April 2006 (PDT) ===&lt;br /&gt;
We have taken the decision to migrate the code for main CEGUI Mk-2 library and the CELayoutEditor tool from using the CVS revision control system, over to Subversion (SVN).  If you're using the stable releases, this will not affect you at all.  If you're using code out of some branch of CVS, then you will need to switch to SVN instead - we will not be maintaining both repositories.  You will find that for general usage, CVS and SVN are similar, and have similar commands.  For Windows users, we heartily recommend the use of [http://tortoisesvn.tigris.org/ TortoiseSVN].&lt;br /&gt;
&lt;br /&gt;
For full details of how to obtain the source code from the subversion repository, please see the page [[HOWTO: Obtain the library source from subversion]]&lt;br /&gt;
&lt;br /&gt;
All 'ceguiaddons' projects will continue to use CVS for revision control.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Site Moved (again) ===&lt;br /&gt;
We have now moved the site back to the sourceforge servers, and made a few changes as to the way the site is handled in general - as you have probably noticed!&lt;br /&gt;
&lt;br /&gt;
Basically the main 'content' areas of the site are now entirely wiki based, and we also have a few other bits installed to handle certain requirements where the wiki is less suited to the task.&lt;br /&gt;
&lt;br /&gt;
The features of the new site are:&lt;br /&gt;
* Wiki based system for all main site content&lt;br /&gt;
* phpBB2 being used for community forums&lt;br /&gt;
* Coppermine based gallery&lt;br /&gt;
* Mantis for all bug and feature tracking&lt;br /&gt;
* Single, unified, log-in for all site areas&lt;/div&gt;</summary>
		<author><name>Pompei2</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=News_Archive&amp;diff=2616</id>
		<title>News Archive</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=News_Archive&amp;diff=2616"/>
				<updated>2007-05-04T19:52:34Z</updated>
		
		<summary type="html">&lt;p&gt;Pompei2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Release of 0.5.0b source packages by [[User:CrazyEddie|CrazyEddie]] 28th November 2006 ===&lt;br /&gt;
We have issued new versions of the 0.5.0 source packages - the previous ones were missing the files for the Microsoft Direct3D based renderer modules, the packages contain no other changes  Thanks go to dmail for raising this issue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Release of 0.5.0b binary packages for Win32 by [[User:CrazyEddie|CrazyEddie]] 14th November 2006 ===&lt;br /&gt;
The Win32 binary dependency and SDK packages released on the 6th contained an inconsistency related to the SILLY library.  Today I have issued a new set of binary packages which have been fixed - the new version is known as 0.5.0b, and contains no other changes.  Many thanks to forum member vasmann for alerting me to the issue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Release of 0.5.0 stable by [[User:CrazyEddie|CrazyEddie]] 6th November 2006 ===&lt;br /&gt;
It has been almost a year in the making, but it is finally here!  The CEGUI development team is immensely proud to announce the release of Crazy Eddie's GUI System 0.5.0 - the first stable release of code in the 0.5.x series.&lt;br /&gt;
&lt;br /&gt;
There are pretty vast changes in this release from the previous stable (0.4.1) - many of these changes are breaking, so please agian review [[Release Notes 0.5.X]] to see details of most of these changes.&lt;br /&gt;
&lt;br /&gt;
This release consists of various files that you may need, depending on your usage of the system.  We are providing source packages, documentation packages, dependency packages, and binary SDK packages (for VC7.1 and VC8).&lt;br /&gt;
&lt;br /&gt;
To coincide with this release, we are also happy to announce a stable 0.1.0 release of Simple Image Loading LibrarY (SILLY), and the 0.5.0 release of the CELayoutEditor.  Please see the [[Downloads|downloads page]] for full details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== CEGUI 0.5.0 Release Candidate 2 by [[User:Dalfy|Dalfy]] 13 august 2006 ===&lt;br /&gt;
We are pleased to announce the second release candidate of the 0.5 branches of CEGUI. There has been a lot of changes between 0.4.1 and 0.5.0. They are listed in [[Release Notes 0.5.X]]. Please have a try at it and help us get a final release soon. Check the download page. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== CEGUI 0.5.0 Release Candidate 1 by [[User:Dalfy|Dalfy]] 20 June 2006=== &lt;br /&gt;
We are pleased to announce the first release candidate of the 0.5 branches of CEGUI. There has been a lot of changes between 0.4.1 and 0.5.0. They are listed in [[Release Notes 0.5.X]]. Please have a try at it and help us get a final release soon by sending a lot of bug report in Mantis bug tracker. The download page for CEGUI-0.5.0-RC1 contains some typos but most link are already valid and mirrored on sourceforge. The link on the download page are going to be fixed during the day. &lt;br /&gt;
&lt;br /&gt;
For any question regarding this release you can use either the forum either irc. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Migration to Subversion  by [[User:CrazyEddie|CrazyEddie]] 11:13, 3 April 2006 (PDT) ===&lt;br /&gt;
We have taken the decision to migrate the code for main CEGUI Mk-2 library and the CELayoutEditor tool from using the CVS revision control system, over to Subversion (SVN).  If you're using the stable releases, this will not affect you at all.  If you're using code out of some branch of CVS, then you will need to switch to SVN instead - we will not be maintaining both repositories.  You will find that for general usage, CVS and SVN are similar, and have similar commands.  For Windows users, we heartily recommend the use of [http://tortoisesvn.tigris.org/ TortoiseSVN].&lt;br /&gt;
&lt;br /&gt;
For full details of how to obtain the source code from the subversion repository, please see the page [[HOWTO: Obtain the library source from subversion]]&lt;br /&gt;
&lt;br /&gt;
All 'ceguiaddons' projects will continue to use CVS for revision control.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Site Moved (again) ===&lt;br /&gt;
We have now moved the site back to the sourceforge servers, and made a few changes as to the way the site is handled in general - as you have probably noticed!&lt;br /&gt;
&lt;br /&gt;
Basically the main 'content' areas of the site are now entirely wiki based, and we also have a few other bits installed to handle certain requirements where the wiki is less suited to the task.&lt;br /&gt;
&lt;br /&gt;
The features of the new site are:&lt;br /&gt;
* Wiki based system for all main site content&lt;br /&gt;
* phpBB2 being used for community forums&lt;br /&gt;
* Coppermine based gallery&lt;br /&gt;
* Mantis for all bug and feature tracking&lt;br /&gt;
* Single, unified, log-in for all site areas&lt;br /&gt;
bla&lt;/div&gt;</summary>
		<author><name>Pompei2</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Tutorials&amp;diff=2615</id>
		<title>Tutorials</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=Tutorials&amp;diff=2615"/>
				<updated>2007-05-04T19:47:56Z</updated>
		
		<summary type="html">&lt;p&gt;Pompei2: spaced all parts with the same amount.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== CrazyEddie's Beginner Guides ===&lt;br /&gt;
* [[The Beginner Guide to Getting CEGUI Rendering]] - How to initialise CEGUI to render properly.&lt;br /&gt;
* [[The Beginner Guide to Loading Data Files and Initialisation]] - How to load some data files and perform basic system initialisation.&lt;br /&gt;
* [[The Beginner Guide to Creating a CEGUI Window]] - How to create a simple window and get it on screen.&lt;br /&gt;
* [[The Beginner Guide to Injecting Inputs]] - How to inject inputs into CEGUI and get interactive.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Scripting with CEGUI ===&lt;br /&gt;
* [[Getting Started with Lua and CEGUI]] - How to initialise CEGUI with a Lua script module and configuration file.&lt;br /&gt;
* [[Handling Events from Lua]] - How to load Lua script files and bind CEGUI events to Lua functions.&lt;br /&gt;
* [[Writing CEGUI scripts]] - Code snippets&lt;br /&gt;
* [[Adding LuaScriptModule to Sample_FirstWindow]] - Experience adding scripting to an existing sample.&lt;br /&gt;
* [http://www.gpwiki.org/index.php/Crazy_Eddies_GUI_System:Tutorials:Creating_a_scriptable_interface_using_CEGUI Creating a scriptable interface using CEGUI]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Window System Examples ===&lt;br /&gt;
* [[Using CEGUI with SDL and OpenGL]] - Guidelines on how to get SDL, OpenGL and CEGUI running together.&lt;br /&gt;
* [[Using CEGUI with Producer and OpenGL]] - Guidelines on how to render and inject input to CEGUI from the Producer API.&lt;br /&gt;
* [http://artis.imag.fr/Membres/Xavier.Decoret/resources/CEGUI/ Using CEGUI with Qt/QGLViewer]&lt;br /&gt;
* [[Using CEGUI with GLUT]] - Some tips on using OpenGL's GLUT with CEGUI.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Extending CEGUI ===&lt;br /&gt;
&lt;br /&gt;
* [[Using Expat XML parser within CEGUI]] - How to add support for another XML parser.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Skins - Tutorial For Artists ===&lt;br /&gt;
* [[Creating Skins]] - Extra notes for artists on how to create skins.&lt;br /&gt;
* [[The Beginners Guide to Falagard skinning - Part I]] - Learn by doing a Button.&lt;br /&gt;
* [[The Beginners Guide to Falagard skinning - Part II]] - More Falagard fun, this time with the Editbox.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Overviews ===&lt;br /&gt;
* [[Overview of GUI files]] - A quick introduction to all the XML files used by CEGUI.&lt;br /&gt;
* [[Overview of resource system enhancements in 0.5.0]] - Introduction to enhancements made for the 0.5.0 release.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Miscellaneous HOW-TOs ===&lt;br /&gt;
* [[Create ImageButtons]] - A few different ways to create image buttons.&lt;br /&gt;
* [[Create a CheckListboxItem]] - Create a CheckListBoxItem that you can use with ItemListbox.&lt;br /&gt;
* [[Identifying Multiple Event Sources From A Single Callback]]&lt;br /&gt;
* [[Cool window effects]] - A collection of cool &amp;quot;special&amp;quot; effects on (frame)windows.&lt;/div&gt;</summary>
		<author><name>Pompei2</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Tutorials&amp;diff=2614</id>
		<title>Tutorials</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=Tutorials&amp;diff=2614"/>
				<updated>2007-05-04T19:45:44Z</updated>
		
		<summary type="html">&lt;p&gt;Pompei2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== CrazyEddie's Beginner Guides ===&lt;br /&gt;
* [[The Beginner Guide to Getting CEGUI Rendering]] - How to initialise CEGUI to render properly.&lt;br /&gt;
* [[The Beginner Guide to Loading Data Files and Initialisation]] - How to load some data files and perform basic system initialisation.&lt;br /&gt;
* [[The Beginner Guide to Creating a CEGUI Window]] - How to create a simple window and get it on screen.&lt;br /&gt;
* [[The Beginner Guide to Injecting Inputs]] - How to inject inputs into CEGUI and get interactive.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Scripting with CEGUI ===&lt;br /&gt;
* [[Getting Started with Lua and CEGUI]] - How to initialise CEGUI with a Lua script module and configuration file.&lt;br /&gt;
* [[Handling Events from Lua]] - How to load Lua script files and bind CEGUI events to Lua functions.&lt;br /&gt;
* [[Writing CEGUI scripts]] - Code snippets&lt;br /&gt;
* [[Adding LuaScriptModule to Sample_FirstWindow]] - Experience adding scripting to an existing sample.&lt;br /&gt;
* [http://www.gpwiki.org/index.php/Crazy_Eddies_GUI_System:Tutorials:Creating_a_scriptable_interface_using_CEGUI Creating a scriptable interface using CEGUI]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Window System Examples ===&lt;br /&gt;
* [[Using CEGUI with SDL and OpenGL]] - Guidelines on how to get SDL, OpenGL and CEGUI running together.&lt;br /&gt;
* [[Using CEGUI with Producer and OpenGL]] - Guidelines on how to render and inject input to CEGUI from the Producer API.&lt;br /&gt;
* [http://artis.imag.fr/Membres/Xavier.Decoret/resources/CEGUI/ Using CEGUI with Qt/QGLViewer]&lt;br /&gt;
* [[Using CEGUI with GLUT]] - Some tips on using OpenGL's GLUT with CEGUI.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Extending CEGUI ===&lt;br /&gt;
&lt;br /&gt;
* [[Using Expat XML parser within CEGUI]] - How to add support for another XML parser.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Skins - Tutorial For Artists ===&lt;br /&gt;
* [[Creating Skins]] - Extra notes for artists on how to create skins.&lt;br /&gt;
* [[The Beginners Guide to Falagard skinning - Part I]] - Learn by doing a Button.&lt;br /&gt;
* [[The Beginners Guide to Falagard skinning - Part II]] - More Falagard fun, this time with the Editbox.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Overviews ===&lt;br /&gt;
* [[Overview of GUI files]] - A quick introduction to all the XML files used by CEGUI.&lt;br /&gt;
* [[Overview of resource system enhancements in 0.5.0]] - Introduction to enhancements made for the 0.5.0 release.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Miscellaneous HOW-TOs ===&lt;br /&gt;
* [[Create ImageButtons]] - A few different ways to create image buttons.&lt;br /&gt;
* [[Create a CheckListboxItem]] - Create a CheckListBoxItem that you can use with ItemListbox.&lt;br /&gt;
* [[Identifying Multiple Event Sources From A Single Callback]]&lt;/div&gt;</summary>
		<author><name>Pompei2</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=FAQ&amp;diff=2609</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=FAQ&amp;diff=2609"/>
				<updated>2007-05-03T21:57:10Z</updated>
		
		<summary type="html">&lt;p&gt;Pompei2: /* 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''' licenced 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 fulfil the other requirements of the LGPL.&lt;br /&gt;
&lt;br /&gt;
However, as from 0.5, the library will be released under the [http://www.opensource.org/licenses/mit-license.php MIT] licence, 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 seperately?  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 seperate work from the code / library itself, and so it licensed seperately.&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 didn'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;
=== I can't find many of the things you talk about in my crayzedsgui code, what's wrong? ===&lt;br /&gt;
You probably have one of the older Mk-1 alpha releases. Get the newer Mk-2 releases instead, the archive files for these generally have names with cegui_mk2 in them.&lt;br /&gt;
&lt;br /&gt;
=== Why are there two versions of the system? ===&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, so it was never anywhere near finished.&lt;br /&gt;
&lt;br /&gt;
=== Are the Mk-1 and Mk-2 systems interface compatible? ===&lt;br /&gt;
No. The interfaces of the two systems are totally different, although many of the general concepts have remained the same.&lt;br /&gt;
&lt;br /&gt;
=== The Mk-1 system is so much more lightweight than the Mk-2 system. Can I still use the Mk-1 code? Is the Mk-1 code still being developed and supported? ===&lt;br /&gt;
Short Answer: Not really.&lt;br /&gt;
&lt;br /&gt;
Long Answer: There were too many weak areas within the Mk-1 system and development on this version has ceased completely. There is no longer any support for the Mk-1 version; in general it would be better for everyone if they migrated to the Mk-2 version of the system.&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. Follow 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. And some patches are a huge pro!&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;/div&gt;</summary>
		<author><name>Pompei2</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=The_Beginners_Guide_to_Falagard_skinning_-_Part_II&amp;diff=2528</id>
		<title>The Beginners Guide to Falagard skinning - Part II</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=The_Beginners_Guide_to_Falagard_skinning_-_Part_II&amp;diff=2528"/>
				<updated>2007-03-30T20:10:44Z</updated>
		
		<summary type="html">&lt;p&gt;Pompei2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Last time we looked at the essential basics to get something running with Falagard. This is great, but a simplistic look'n'feel for a button is a bit boring. So lets step forward and learn something new.&lt;br /&gt;
&lt;br /&gt;
In this tutorial we will create a look'n'feel for the ''Editbox'' window type. This widget is interactive and uses new parts of the Falagard system, making it an excellent target for another tutorial.&lt;br /&gt;
&lt;br /&gt;
So let's get started...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
We'll start out by looking at the requirements for the ''Editbox'' window type. Like always, the information we're looking for can be found in the [[Falagard System base widgets reference]].&lt;br /&gt;
&lt;br /&gt;
In there we'll see that the ''Editbox'' is a bit more complex than the ''Button''. But fear not - we'll get through every part of it ;-)&lt;br /&gt;
&lt;br /&gt;
Let's start out with the ''StateImagery'' needed for this widget:&lt;br /&gt;
* Enabled&lt;br /&gt;
* Disabled&lt;br /&gt;
* ReadOnly&lt;br /&gt;
* ActiveSelection&lt;br /&gt;
* InactiveSelection&lt;br /&gt;
&lt;br /&gt;
Unlike the ''Button'' we don't have any optional states. ''Enabled'' and ''Disabled'' should speak for themselves. ''ReadOnly'' is used when the ''Editbox'' is in read-only mode (easy huh?).&lt;br /&gt;
&lt;br /&gt;
The ''ActiveSelection'' state is somewhat special. It should define what imagery to render for the selection graphics itself when the window is in an activated state (has focus).&lt;br /&gt;
''InactiveSelection'' is the same, except it is used when the window is '''not''' active (does'nt have focus).&lt;br /&gt;
&lt;br /&gt;
Besides the ''StateImagery'' needed, a ''Editbox'' also requires a ''NamedArea'' called '''TextArea''' and a ''ImagerySection'' named '''Carat''' (yes, car'''a'''t).&lt;br /&gt;
We'll have a much closer look at these later on.&lt;br /&gt;
&lt;br /&gt;
The initial XML (with the parts we know about) looks like this:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt; &lt;br /&gt;
 &amp;lt;Falagard&amp;gt;&lt;br /&gt;
 	&amp;lt;ImagerySection name=&amp;quot;Carat&amp;quot;&amp;gt;&lt;br /&gt;
 	&amp;lt;/ImagerySection&amp;gt;&lt;br /&gt;
 	&amp;lt;StateImagery name=&amp;quot;Enabled&amp;quot;&amp;gt;&lt;br /&gt;
 	&amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
 	&amp;lt;StateImagery name=&amp;quot;Disabled&amp;quot;&amp;gt;&lt;br /&gt;
 	&amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
 	&amp;lt;StateImagery name=&amp;quot;ReadOnly&amp;quot;&amp;gt;&lt;br /&gt;
 	&amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
 	&amp;lt;StateImagery name=&amp;quot;ActiveSelection&amp;quot;&amp;gt;&lt;br /&gt;
 	&amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
 	&amp;lt;StateImagery name=&amp;quot;InactiveSelection&amp;quot;&amp;gt;&lt;br /&gt;
 	&amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
 &amp;lt;/Falagard&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We'll fill it out as we go...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Imagery ==&lt;br /&gt;
This look'n'feel will use a frame consisting of 8 different images from our favorite imageset ''MyImages''. Furthermore we'll have a single image stretched to fill the hole in this frame. The images will have names that are easy to interpret:&lt;br /&gt;
{| cellpadding=&amp;quot;15&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ Frame setup&lt;br /&gt;
| TL || align=&amp;quot;center&amp;quot; | T || TR&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | L || Bg|| align=&amp;quot;center&amp;quot; |R&lt;br /&gt;
|-&lt;br /&gt;
| BL || align=&amp;quot;center&amp;quot; | B || BR&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Each prefixed with '''Editbox'''. Forming imagenames like '''EditboxTL''' etc.&lt;br /&gt;
&lt;br /&gt;
The ''FrameComponent'' tag may only occur inside an ''ImagerySection''. Just like the ''ImageryComponent'' and ''TextComponent'' that we used in part I.&lt;br /&gt;
&lt;br /&gt;
Using the ''FrameComponent'' is very much like using the ''ImageryComponent'' all the tags allowed are the same, but a ''FrameComponent'' allows up to nine images to be specified. It's purpose is to make making frames easy :-)&lt;br /&gt;
A ''FrameComponent'' is special in the way it handles formatting compared to ''ImageryComponent'' though. Any formatting options are only applied to the background image - if it's specified. Yes. We don't have to set all nine of them. We can just choose the image &amp;quot;positions&amp;quot; we need. In our case we'll use all of them tough...&lt;br /&gt;
&lt;br /&gt;
Let's look at the XML for this ''FrameComponent'':&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;FrameComponent&amp;gt;&lt;br /&gt;
        &amp;lt;Area&amp;gt;&lt;br /&gt;
            &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Dim&amp;gt;&lt;br /&gt;
            &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Dim&amp;gt;&lt;br /&gt;
            &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;RightEdge&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Dim&amp;gt;&lt;br /&gt;
            &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Dim&amp;gt;&lt;br /&gt;
        &amp;lt;/Area&amp;gt;&lt;br /&gt;
        &amp;lt;Image type=&amp;quot;TopLeftCorner&amp;quot;     imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxTL&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;Image type=&amp;quot;TopEdge&amp;quot;           imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxT&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;Image type=&amp;quot;TopRightCorner&amp;quot;    imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxTR&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;Image type=&amp;quot;RightEdge&amp;quot;         imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxR&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;Image type=&amp;quot;BottomRightCorner&amp;quot; imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxBR&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;Image type=&amp;quot;BottomEdge&amp;quot;        imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxB&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;Image type=&amp;quot;BottomLeftCorner&amp;quot;  imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxBL&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;Image type=&amp;quot;LeftEdge&amp;quot;          imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxL&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;Image type=&amp;quot;Background&amp;quot;        imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxBg&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;VertFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;HorzFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;/FrameComponent&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should recognise the area. It's the full area of the window, exactly like the areas we used in part I.&lt;br /&gt;
Reason: We want the frame and background to cover the entire window. Simple :-)&lt;br /&gt;
&lt;br /&gt;
Nine images are specifed. The order does not matter.&lt;br /&gt;
But note that compared to the ''ImageryComponent'' used last time, we must specify a type attribute for the images.&lt;br /&gt;
This is so Falagard knows where to place this image in the frame.&lt;br /&gt;
These are of course listed in the [[Falagard System XML Enumerations reference]].&lt;br /&gt;
&lt;br /&gt;
The format both horizontally and vertically is ''Stretched''. This ensures that the background image is stretched to fill as much as possible of the &amp;quot;hole&amp;quot; created by the border images (TL,T,TR etc.).&lt;br /&gt;
&lt;br /&gt;
We'll use this frame for all the 3 states (''Enabled'', ''Disabled'', ''ReadOnly''), but we want the colours to be a little different in each state. In part I we created a new property to hold the colour of the Text. To show a different approach, we'll &amp;quot;hard-code&amp;quot; the frame colours into this look'n'feel.&lt;br /&gt;
&lt;br /&gt;
CEGUI supports using a colour rectangle to modulate the colours of anything it renders. This makes it possible to &amp;quot;apply&amp;quot; nice colour gradients to our frame imagery.&lt;br /&gt;
&lt;br /&gt;
The ''Normal'' state will use the colours, unmodified from the image file.&lt;br /&gt;
&lt;br /&gt;
The ''Disabled'' state will use gray to darken the frame imagery &lt;br /&gt;
&lt;br /&gt;
In the ''ReadOnly'' state we'll create a gradient that is white in the top-left corner, and slightly grayish for the three other corners. When applied to the imagery this will result in the top-left corner using exactly the same colours as in the image file, and the three other corners being slightly darkened.&lt;br /&gt;
&lt;br /&gt;
To use this frame component we must - like stated earlier - fit it in a ''ImagerySection''. We'll call this new imagery section &amp;quot;frame&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This is all the we need to write up the xml for this frame, and use it in our states, so now the XML looks like this:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt; &lt;br /&gt;
 &amp;lt;Falagard&amp;gt;&lt;br /&gt;
     &amp;lt;b&amp;gt;&amp;lt;ImagerySection name=&amp;quot;frame&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;FrameComponent&amp;gt;&lt;br /&gt;
             &amp;lt;Area&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;RightEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;/Area&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;TopLeftCorner&amp;quot;     imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxTL&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;TopEdge&amp;quot;           imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxT&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;TopRightCorner&amp;quot;    imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxTR&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;RightEdge&amp;quot;         imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxR&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;BottomRightCorner&amp;quot; imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxBR&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;BottomEdge&amp;quot;        imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxB&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;BottomLeftCorner&amp;quot;  imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxBL&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;LeftEdge&amp;quot;          imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxL&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;Background&amp;quot;        imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxBg&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;VertFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;HorzFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;/FrameComponent&amp;gt;&lt;br /&gt;
     &amp;lt;/ImagerySection&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
     &amp;lt;ImagerySection name=&amp;quot;Carat&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;/ImagerySection&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;Enabled&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;b&amp;gt;&amp;lt;Layer&amp;gt;&lt;br /&gt;
             &amp;lt;Section section=&amp;quot;frame&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;/Layer&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;Disabled&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;b&amp;gt;&amp;lt;Layer&amp;gt;&lt;br /&gt;
             &amp;lt;Section section=&amp;quot;frame&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;Colours topLeft=&amp;quot;FF7F7F7F&amp;quot; topRight=&amp;quot;FF7F7F7F&amp;quot; bottomLeft=&amp;quot;FF7F7F7F&amp;quot; bottomRight=&amp;quot;FF7F7F7F&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Section&amp;gt;&lt;br /&gt;
         &amp;lt;/Layer&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;ReadOnly&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;b&amp;gt;&amp;lt;Layer&amp;gt;&lt;br /&gt;
             &amp;lt;Section section=&amp;quot;frame&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;Colours topLeft=&amp;quot;FFFFFFFF&amp;quot; topRight=&amp;quot;FFDFDFDF&amp;quot; bottomLeft=&amp;quot;FFDFDFDF&amp;quot; bottomRight=&amp;quot;FFDFDFDF&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Section&amp;gt;&lt;br /&gt;
         &amp;lt;/Layer&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;ActiveSelection&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;InactiveSelection&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
 &amp;lt;/Falagard&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The frame component has been added, and the ''Enabled'', ''Disabled'' and ''ReadOnly'' states have been set up to use them. The only new thing is really the ''Colours'' tag inside the ''Section'' tags for &amp;quot;frame&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
It behaves just like the ''ColourProperty'' tag we used in part I, except you can specify a colour to use for each corner.&lt;br /&gt;
It's attributes&lt;br /&gt;
* topLeft&lt;br /&gt;
* topRight&lt;br /&gt;
* bottomLeft&lt;br /&gt;
* bottomRight&lt;br /&gt;
Each specify a single colour of the same format we used for ''ColourProperty'' (AARRGGBB in hex).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Text ==&lt;br /&gt;
Remeber something about a ''NamedArea''? Either way we're going to look at it now. The ''Editbox'' widget requires us to define a named area so it knows where to render, the text we type in, the caret (the marker that shows us where the characters we type will be inserted) and our selection.&lt;br /&gt;
&lt;br /&gt;
In this look'n'feel, we want the text to be rendered inside our frame. That is we dont want the text to cover the frame imagery itself, only the background of it. Falagard provides a ''ImageDim'' tag that we can use to extract the width and height from the images we used for the frame. Falagard also provides a ''DimOperator'' tag that we can use to do a little math on our dimensions. These features will be the core of our ''NamedArea'' which will be named '''TextArea''' (Stated in the requirements... Remember?)&lt;br /&gt;
&lt;br /&gt;
The only thing we must (and may) specify in a ''NamedArea'' is a ''Area''.&lt;br /&gt;
&lt;br /&gt;
If we take a look back at the ''Area'' tag, we know that it must specify four dimensions. ''LeftEdge'', ''TopEdge'', ''RightEdge'' and ''BottomEdge''. You might remember that we can specify ''Width'' instead of ''RightEdge'', and ''Height'' instead of ''BottomEdge''. But we're not going to do that. Just so you know (and don't forget) ;-)&lt;br /&gt;
&lt;br /&gt;
We start out with a &amp;quot;empty&amp;quot; XML and fill it out as we go. For now it looks like this:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;NamedArea name=&amp;quot;TextArea&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;Area&amp;gt;&lt;br /&gt;
         &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;/Dim&amp;gt;&lt;br /&gt;
         &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;/Dim&amp;gt;&lt;br /&gt;
         &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;/Dim&amp;gt;&lt;br /&gt;
         &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;/Dim&amp;gt;&lt;br /&gt;
     &amp;lt;/Area&amp;gt;&lt;br /&gt;
 &amp;lt;/NamedArea&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We start out with the left edge. In the frame we used the image named '''EditboxL''' for the left edge. And as the area we want to define is to lie inside the frame, we'll use the width of this specific image as the left edge of our area.&lt;br /&gt;
The XML for this ''ImageDim'' is like so:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxL&amp;quot; dimension=&amp;quot;Width&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The top edge is very similar except we'll use the height of the image named '''EditboxT''' instead.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxT&amp;quot; dimension=&amp;quot;Height&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The right edge is a bit more tricky. To start out we'll use a ''UnifiedDim'' that gives us the right edge of our widget.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;/Unified&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We use a seperate tag to close it, as by itself this ''UnifiedDim'' is not good enough. We still need the take the frame into accout. The image dimension we're after is the width of the image '''EditboxR'''. We must subtract this width from the right edge to ensure that the frame imagery is not overwritten by a long text string in the ''Editbox''.&lt;br /&gt;
&lt;br /&gt;
The ''DimOperator'' can do this for us with XML like this:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;b&amp;gt;&amp;lt;DimOperator op=&amp;quot;Subtract&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxR&amp;quot; dimension=&amp;quot;Width&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;lt;/DimOperator&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
 &amp;lt;/Unified&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The ''DimOperator'' tag requires us to specify the attribute ''op'' with the name of the operation we want to perform as the value. The operations supported by Falagard are:&lt;br /&gt;
* Add&lt;br /&gt;
* Subtract&lt;br /&gt;
* Multiply&lt;br /&gt;
* Divide&lt;br /&gt;
We used ''Subtract'' to &amp;quot;move back&amp;quot; a little from our right edge to make sure we leave the frame imagery for the right edge alone.&lt;br /&gt;
&lt;br /&gt;
The bottom edge of the area is very similar to the right. There are two differences. First we want the ''UnifiedDim'' to take the bottom edge of our window and not the right edge. Second we want to subtract the height of the image named '''EditboxB''' instead too.&lt;br /&gt;
&lt;br /&gt;
This gives us this XML:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;DimOperator op=&amp;quot;Subtract&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxB&amp;quot; dimension=&amp;quot;Height&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;lt;/DimOperator&amp;gt;&lt;br /&gt;
 &amp;lt;/Unified&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If we put these four dimensions into our ''NamedArea'' it looks like this:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;NamedArea name=&amp;quot;TextArea&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;Area&amp;gt;&lt;br /&gt;
         &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
             &amp;lt;b&amp;gt;&amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxL&amp;quot; dimension=&amp;quot;Width&amp;quot; /&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
         &amp;lt;/Dim&amp;gt;&lt;br /&gt;
         &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
             &amp;lt;b&amp;gt;&amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxT&amp;quot; dimension=&amp;quot;Height&amp;quot; /&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
         &amp;lt;/Dim&amp;gt;&lt;br /&gt;
         &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
             &amp;lt;b&amp;gt;&amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;DimOperator op=&amp;quot;Subtract&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxR&amp;quot; dimension=&amp;quot;Width&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/DimOperator&amp;gt;&lt;br /&gt;
             &amp;lt;/Unified&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
         &amp;lt;/Dim&amp;gt;&lt;br /&gt;
         &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
             &amp;lt;b&amp;gt;&amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;DimOperator op=&amp;quot;Subtract&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxB&amp;quot; dimension=&amp;quot;Height&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/DimOperator&amp;gt;&lt;br /&gt;
             &amp;lt;/Unified&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
         &amp;lt;/Dim&amp;gt;&lt;br /&gt;
     &amp;lt;/Area&amp;gt;&lt;br /&gt;
 &amp;lt;/NamedArea&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the complete ''NamedArea'' for our ''Editbox'' look'n'feel. If we fit it inside our full look'n'feel it will look like the XML below. Notice that the ''NamedArea'' is specifed before the ''ImagerySection''. This is required by Falagard.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt; &lt;br /&gt;
 &amp;lt;Falagard&amp;gt;&lt;br /&gt;
     &amp;lt;b&amp;gt;&amp;lt;NamedArea name=&amp;quot;TextArea&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;Area&amp;gt;&lt;br /&gt;
             &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxL&amp;quot; dimension=&amp;quot;Width&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxT&amp;quot; dimension=&amp;quot;Height&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;DimOperator op=&amp;quot;Subtract&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxR&amp;quot; dimension=&amp;quot;Width&amp;quot; /&amp;gt;&lt;br /&gt;
                     &amp;lt;/DimOperator&amp;gt;&lt;br /&gt;
                 &amp;lt;/Unified&amp;gt;&lt;br /&gt;
             &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;DimOperator op=&amp;quot;Subtract&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxB&amp;quot; dimension=&amp;quot;Height&amp;quot; /&amp;gt;&lt;br /&gt;
                     &amp;lt;/DimOperator&amp;gt;&lt;br /&gt;
                 &amp;lt;/Unified&amp;gt;&lt;br /&gt;
             &amp;lt;/Dim&amp;gt;&lt;br /&gt;
         &amp;lt;/Area&amp;gt;&lt;br /&gt;
     &amp;lt;/NamedArea&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
     &amp;lt;ImagerySection name=&amp;quot;frame&amp;quot;&amp;gt;&lt;br /&gt;
         ...&lt;br /&gt;
         ... saving space ...&lt;br /&gt;
         ...&lt;br /&gt;
     &amp;lt;/ImagerySection&amp;gt;&lt;br /&gt;
     &amp;lt;ImagerySection name=&amp;quot;Carat&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;/ImagerySection&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;Enabled&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;Layer&amp;gt;&lt;br /&gt;
             &amp;lt;Section section=&amp;quot;frame&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;/Layer&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;Disabled&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;Layer&amp;gt;&lt;br /&gt;
             &amp;lt;Section section=&amp;quot;frame&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;Colours topLeft=&amp;quot;FF7F7F7F&amp;quot; topRight=&amp;quot;FF7F7F7F&amp;quot; bottomLeft=&amp;quot;FF7F7F7F&amp;quot; bottomRight=&amp;quot;FF7F7F7F&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Section&amp;gt;&lt;br /&gt;
         &amp;lt;/Layer&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;ReadOnly&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;Layer&amp;gt;&lt;br /&gt;
             &amp;lt;Section section=&amp;quot;frame&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;Colours topLeft=&amp;quot;FFFFFFFF&amp;quot; topRight=&amp;quot;FFDFDFDF&amp;quot; bottomLeft=&amp;quot;FFDFDFDF&amp;quot; bottomRight=&amp;quot;FFDFDFDF&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Section&amp;gt;&lt;br /&gt;
         &amp;lt;/Layer&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;ActiveSelection&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;InactiveSelection&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
 &amp;lt;/Falagard&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We don't reference '''TextArea''' anywhere. Just specifying it is all that is required according to the [[Falagard System base widgets reference]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Caret ==&lt;br /&gt;
The ''Editbox'' has a caret. This is a marker that shows us where we are typing and allows us to tell if we are inserting in the middle of the text or at the end etc. The text is split around it by CEGUI so we don't draw over the text rendering the point we're editing unreadable. All this is currently handled internally and all you need to do is create a ''ImagerySection'' name '''Carat'''.&lt;br /&gt;
&lt;br /&gt;
note by Pompei2: You're reading right, the ''ImagerySection'' is named '''Carat''' although the right word is a caret.&lt;br /&gt;
&lt;br /&gt;
When CEGUI needs render the caret (and the text) it will fetch this ''ImagerySection'' and render it at the appropriate position in the text.&lt;br /&gt;
We do not need to make a ''TextComponent'' in a ''Editbox'' to get the text to render. Because of the pecularities of the caret (and selection which we will handle later) it's all done automatically, by using the ''NamedArea'' '''TextArea''' we just specified along with the real pixel area of the window, to confine rendering to right rectangle on the screen.&lt;br /&gt;
&lt;br /&gt;
Enough details. We just want to render a single image named '''EditboxCaret''' stretched vertically inside the '''TextArea'''.&lt;br /&gt;
&lt;br /&gt;
Creating the ''ImagerySection'' is very much like creating the background for the ''Button'' in part I, the only real difference being the ''Area'' used. We'll look at the XML for this area, it's all made up by stuff we've already seen.&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;Area&amp;gt;&lt;br /&gt;
        &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;/Dim&amp;gt;&lt;br /&gt;
        &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;/Dim&amp;gt;&lt;br /&gt;
        &amp;lt;Dim type=&amp;quot;Width&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxCaret&amp;quot; dimension=&amp;quot;Width&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;/Dim&amp;gt;&lt;br /&gt;
        &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;/Dim&amp;gt;&lt;br /&gt;
    &amp;lt;/Area&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first and second (left/top edges) ''Dim''s have the familiar ''AbsoluteDim'' with a value of zero. Nothing new here.&lt;br /&gt;
&lt;br /&gt;
The third ''Dim'' on the other hand is new. It's now specified as &amp;quot;Width&amp;quot; and not &amp;quot;RightEdge&amp;quot; like we have done so far. Inside we have a ''ImageDim'' for the width of the caret image we're using. If we had used the regular ''UnifiedDim'', the caret itself would have the width our textarea (because the caret resides in the text area) and would have been very ugly...&lt;br /&gt;
&lt;br /&gt;
The fourth dimension is the familiar ''UnifiedDim'' we have used in all the earlier areas.&lt;br /&gt;
&lt;br /&gt;
We know from part I how to make a ''ImagerySection'' with a ''ImageryComponent''. This is all we need to render this single-image caret. The XML for our look'n'feel is nearing completion.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt; &lt;br /&gt;
 &amp;lt;Falagard&amp;gt;&lt;br /&gt;
     &amp;lt;NamedArea name=&amp;quot;TextArea&amp;quot;&amp;gt;&lt;br /&gt;
         ...&lt;br /&gt;
         ... saving space ...&lt;br /&gt;
         ...&lt;br /&gt;
     &amp;lt;/NamedArea&amp;gt;&lt;br /&gt;
     &amp;lt;ImagerySection name=&amp;quot;frame&amp;quot;&amp;gt;&lt;br /&gt;
         ...&lt;br /&gt;
         ... saving space ...&lt;br /&gt;
         ...&lt;br /&gt;
     &amp;lt;/ImagerySection&amp;gt;&lt;br /&gt;
     &amp;lt;ImagerySection name=&amp;quot;Carat&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;b&amp;gt;&amp;lt;ImageryComponent&amp;gt;&lt;br /&gt;
             &amp;lt;Area&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;Width&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxCaret&amp;quot; dimension=&amp;quot;Width&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;/Area&amp;gt;&lt;br /&gt;
             &amp;lt;Image imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxCaret&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;VertFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;/ImageryComponent&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
     &amp;lt;/ImagerySection&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;Enabled&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;Layer&amp;gt;&lt;br /&gt;
             &amp;lt;Section section=&amp;quot;frame&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;/Layer&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;Disabled&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;Layer&amp;gt;&lt;br /&gt;
             &amp;lt;Section section=&amp;quot;frame&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;Colours topLeft=&amp;quot;FF7F7F7F&amp;quot; topRight=&amp;quot;FF7F7F7F&amp;quot; bottomLeft=&amp;quot;FF7F7F7F&amp;quot; bottomRight=&amp;quot;FF7F7F7F&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Section&amp;gt;&lt;br /&gt;
         &amp;lt;/Layer&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;ReadOnly&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;Layer&amp;gt;&lt;br /&gt;
             &amp;lt;Section section=&amp;quot;frame&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;Colours topLeft=&amp;quot;FFFFFFFF&amp;quot; topRight=&amp;quot;FFDFDFDF&amp;quot; bottomLeft=&amp;quot;FFDFDFDF&amp;quot; bottomRight=&amp;quot;FFDFDFDF&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Section&amp;gt;&lt;br /&gt;
         &amp;lt;/Layer&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;ActiveSelection&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;InactiveSelection&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
 &amp;lt;/Falagard&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We only specify the vertical formatting for the new ''ImageryComponent'' because we are specifying the area to exactly match the width of the image, and thus any formatting would have no effect. ''LeftAligned'' (the default) is just fine.&lt;br /&gt;
&lt;br /&gt;
Now we just need to do something in the ''ActiveSelection'' and ''InactiveSelection'' states...&lt;br /&gt;
&lt;br /&gt;
== Selection ==&lt;br /&gt;
When the user has selected text in the ''Editbox'', either with the mouse or the keyboard, CEGUI render the selection using the two additional states '''ActiveSelection''' and '''InactiveSelection'''.&lt;br /&gt;
&lt;br /&gt;
The the window is active (has focus) it will use the state '''ActiveSelection''', if if does not have focus (inactive) yet still has a selection '''InactiveSelection''' will be used.&lt;br /&gt;
&lt;br /&gt;
For the selection in this look'n'feel, we'll use a single image stretched over the selection area. This image will contain plain white in the image file so we can apply any colour(s) we choose to the selection imagery.&lt;br /&gt;
Let's call it '''White'''.&lt;br /&gt;
&lt;br /&gt;
For '''ActiveSelection''' we'll use a classic blue colour, for inactive the same, except we'll make it 50% transparent.&lt;br /&gt;
We can avoid a colour tag in the '''ActiveSelection''' state if we specify the colours to use directly in the ''ImageryComponent''. We'll do that to show how it works.&lt;br /&gt;
&lt;br /&gt;
We'll create a new ''ImagerySection'' for this &amp;quot;selection brush&amp;quot; named '''selection'''. XML follows:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;ImagerySection name=&amp;quot;selection&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;ImageryComponent&amp;gt;&lt;br /&gt;
         &amp;lt;Area&amp;gt;&lt;br /&gt;
             &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;RightEdge&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Dim&amp;gt;&lt;br /&gt;
         &amp;lt;/Area&amp;gt;&lt;br /&gt;
         &amp;lt;Image imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;White&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;Colours topLeft=&amp;quot;FF26458A&amp;quot; topRight=&amp;quot;FF26458A&amp;quot; bottomLeft=&amp;quot;FF26458A&amp;quot; bottomRight=&amp;quot;FF26458A&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;VertFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;HorzFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;lt;/ImageryComponent&amp;gt;&lt;br /&gt;
 &amp;lt;/ImagerySection&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We use a default area that you should recognise by now. CEGUI will automatically use the right size for the selection.&lt;br /&gt;
The image we use is the one called '''White''' from our favorite imageset '''MyImages'''. Like always ;-)&lt;br /&gt;
A colour tag has been added as well to make our selection some kind of blue...&lt;br /&gt;
The vertical and horizontal formatting is ''Stretched'' which is generally what you would want to do in a situation like this.&lt;br /&gt;
&lt;br /&gt;
We'll &amp;quot;call&amp;quot; this ''ImagerySection'' from the '''ActiveSelection''' and '''InactiveSelection''' states. In the '''InactiveSelection''' state we'll further modulate the colours used by passing a 50% transparent white. This will have the effect of using the same colour as in the active state, but make that colour 50% transparent. We could have just specified the full colour to use in each state and remove the ''Colours'' tag from the ''ImageryComponent'', but I wanted to show that multiple modulations are possible with Falagard.&lt;br /&gt;
&lt;br /&gt;
The states are the last thing missing from the look'n'feel, so let's take a look at the final XML (yay :-P ).&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt; &lt;br /&gt;
 &amp;lt;Falagard&amp;gt;&lt;br /&gt;
     &amp;lt;NamedArea name=&amp;quot;TextArea&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;Area&amp;gt;&lt;br /&gt;
             &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxL&amp;quot; dimension=&amp;quot;Width&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxT&amp;quot; dimension=&amp;quot;Height&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;DimOperator op=&amp;quot;Subtract&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxR&amp;quot; dimension=&amp;quot;Width&amp;quot; /&amp;gt;&lt;br /&gt;
                     &amp;lt;/DimOperator&amp;gt;&lt;br /&gt;
                 &amp;lt;/Unified&amp;gt;&lt;br /&gt;
             &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;DimOperator op=&amp;quot;Subtract&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxB&amp;quot; dimension=&amp;quot;Height&amp;quot; /&amp;gt;&lt;br /&gt;
                     &amp;lt;/DimOperator&amp;gt;&lt;br /&gt;
                 &amp;lt;/Unified&amp;gt;&lt;br /&gt;
             &amp;lt;/Dim&amp;gt;&lt;br /&gt;
         &amp;lt;/Area&amp;gt;&lt;br /&gt;
     &amp;lt;/NamedArea&amp;gt;&lt;br /&gt;
     &amp;lt;ImagerySection name=&amp;quot;frame&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;FrameComponent&amp;gt;&lt;br /&gt;
             &amp;lt;Area&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;RightEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;/Area&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;TopLeftCorner&amp;quot;     imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxTL&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;TopEdge&amp;quot;           imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxT&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;TopRightCorner&amp;quot;    imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxTR&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;RightEdge&amp;quot;         imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxR&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;BottomRightCorner&amp;quot; imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxBR&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;BottomEdge&amp;quot;        imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxB&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;BottomLeftCorner&amp;quot;  imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxBL&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;LeftEdge&amp;quot;          imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxL&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;Background&amp;quot;        imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxBg&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;VertFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;HorzFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;/FrameComponent&amp;gt;&lt;br /&gt;
     &amp;lt;/ImagerySection&amp;gt;&lt;br /&gt;
     &amp;lt;ImagerySection name=&amp;quot;Carat&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;ImageryComponent&amp;gt;&lt;br /&gt;
             &amp;lt;Area&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;Width&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxCaret&amp;quot; dimension=&amp;quot;Width&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;/Area&amp;gt;&lt;br /&gt;
             &amp;lt;Image imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxCaret&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;VertFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;/ImageryComponent&amp;gt;&lt;br /&gt;
     &amp;lt;/ImagerySection&amp;gt;&lt;br /&gt;
     &amp;lt;b&amp;gt;&amp;lt;ImagerySection name=&amp;quot;selection&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;ImageryComponent&amp;gt;&lt;br /&gt;
             &amp;lt;Area&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;RightEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;/Area&amp;gt;&lt;br /&gt;
             &amp;lt;Image imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;White&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Colours topLeft=&amp;quot;FF26458A&amp;quot; topRight=&amp;quot;FF26458A&amp;quot; bottomLeft=&amp;quot;FF26458A&amp;quot; bottomRight=&amp;quot;FF26458A&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;VertFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;HorzFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;/ImageryComponent&amp;gt;&lt;br /&gt;
     &amp;lt;/ImagerySection&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;Enabled&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;Layer&amp;gt;&lt;br /&gt;
             &amp;lt;Section section=&amp;quot;frame&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;/Layer&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;Disabled&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;Layer&amp;gt;&lt;br /&gt;
             &amp;lt;Section section=&amp;quot;frame&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;Colours topLeft=&amp;quot;FF7F7F7F&amp;quot; topRight=&amp;quot;FF7F7F7F&amp;quot; bottomLeft=&amp;quot;FF7F7F7F&amp;quot; bottomRight=&amp;quot;FF7F7F7F&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Section&amp;gt;&lt;br /&gt;
         &amp;lt;/Layer&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;ReadOnly&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;Layer&amp;gt;&lt;br /&gt;
             &amp;lt;Section section=&amp;quot;frame&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;Colours topLeft=&amp;quot;FFFFFFFF&amp;quot; topRight=&amp;quot;FFDFDFDF&amp;quot; bottomLeft=&amp;quot;FFDFDFDF&amp;quot; bottomRight=&amp;quot;FFDFDFDF&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Section&amp;gt;&lt;br /&gt;
         &amp;lt;/Layer&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;ActiveSelection&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;b&amp;gt;&amp;lt;Layer&amp;gt;&lt;br /&gt;
             &amp;lt;Section section=&amp;quot;selection&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;/Layer&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;InactiveSelection&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;b&amp;gt;&amp;lt;Layer&amp;gt;&lt;br /&gt;
             &amp;lt;Section section=&amp;quot;selection&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;Colours topLeft=&amp;quot;7FFFFFFF&amp;quot; topRight=&amp;quot;7FFFFFFF&amp;quot; bottomLeft=&amp;quot;7FFFFFFF&amp;quot; bottomRight=&amp;quot;7FFFFFFF&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Section&amp;gt;&lt;br /&gt;
         &amp;lt;/Layer&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
 &amp;lt;/Falagard&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That's it folks. The look'n'feel is done. Hopefully you're starting to play around with the XML and making the look'n'feel suit you (or your artist ;-) ).&lt;br /&gt;
Again, feel free to add comments in the discussion page.&lt;br /&gt;
&lt;br /&gt;
Stay tuned for part III...&lt;br /&gt;
&lt;br /&gt;
--[[User:lindquist|lindquist]] 00:41, 14 Dec 2005 (CET)&lt;/div&gt;</summary>
		<author><name>Pompei2</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Talk:The_Beginners_Guide_to_Falagard_skinning_-_Part_II&amp;diff=2527</id>
		<title>Talk:The Beginners Guide to Falagard skinning - Part II</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=Talk:The_Beginners_Guide_to_Falagard_skinning_-_Part_II&amp;diff=2527"/>
				<updated>2007-03-30T20:06:55Z</updated>
		
		<summary type="html">&lt;p&gt;Pompei2: /* Carat, not Caret (yes, strange) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Unified Area of the caret ? ==&lt;br /&gt;
&lt;br /&gt;
I'm writing this just while reading (this great article :)).&lt;br /&gt;
&lt;br /&gt;
In the part about the caret, when specifying the area it should use, you say this:&lt;br /&gt;
 The third Dim on the other hand is new. It's now specified as &amp;quot;Width&amp;quot; and not &amp;quot;RightEdge&amp;quot; like we have done so far.&lt;br /&gt;
 Inside we have a ImageDim for the width of the caret image we're using. If we had used the regular UnifiedDim,&lt;br /&gt;
 the caret itself would have the width of the window and would have been very ugly...&lt;br /&gt;
This sounds strange to my intuition, as my intuition tells me that using the UnifiedDim the caret would have the width of THE AREA and not the window. Is my intuition bad, or did you make a mistake ?&lt;br /&gt;
&lt;br /&gt;
Edit: Ok, while creating my editbox, I checked this, and now it is not only an intuition anymore, but a truth :-p I corrected this in your article.&lt;br /&gt;
&lt;br /&gt;
--[[User:Pompei2|Pompei2]] 13:10, 29 March 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
== Very good ==&lt;br /&gt;
&lt;br /&gt;
yes, very good article, again :)&lt;br /&gt;
&lt;br /&gt;
And I stay tuned for part III :-p&lt;br /&gt;
&lt;br /&gt;
--[[User:Pompei2|Pompei2]] 13:10, 29 March 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
== Carat, not Caret (yes, strange) ==&lt;br /&gt;
&lt;br /&gt;
one other thing I noticed is that although this thing is called a &amp;quot;Caret&amp;quot;, in CEGUI the sections and so one have to be called &amp;quot;Carat&amp;quot;, else you get an exception.&lt;br /&gt;
&lt;br /&gt;
I changed this too in your article.&lt;br /&gt;
&lt;br /&gt;
--[[User:Pompei2|Pompei2]] 13:06, 30 March 2007 (PDT)&lt;/div&gt;</summary>
		<author><name>Pompei2</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Talk:The_Beginners_Guide_to_Falagard_skinning_-_Part_II&amp;diff=2526</id>
		<title>Talk:The Beginners Guide to Falagard skinning - Part II</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=Talk:The_Beginners_Guide_to_Falagard_skinning_-_Part_II&amp;diff=2526"/>
				<updated>2007-03-30T20:06:42Z</updated>
		
		<summary type="html">&lt;p&gt;Pompei2: Carat, not Caret (yes, strange)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Unified Area of the caret ? ==&lt;br /&gt;
&lt;br /&gt;
I'm writing this just while reading (this great article :)).&lt;br /&gt;
&lt;br /&gt;
In the part about the caret, when specifying the area it should use, you say this:&lt;br /&gt;
 The third Dim on the other hand is new. It's now specified as &amp;quot;Width&amp;quot; and not &amp;quot;RightEdge&amp;quot; like we have done so far.&lt;br /&gt;
 Inside we have a ImageDim for the width of the caret image we're using. If we had used the regular UnifiedDim,&lt;br /&gt;
 the caret itself would have the width of the window and would have been very ugly...&lt;br /&gt;
This sounds strange to my intuition, as my intuition tells me that using the UnifiedDim the caret would have the width of THE AREA and not the window. Is my intuition bad, or did you make a mistake ?&lt;br /&gt;
&lt;br /&gt;
Edit: Ok, while creating my editbox, I checked this, and now it is not only an intuition anymore, but a truth :-p I corrected this in your article.&lt;br /&gt;
&lt;br /&gt;
--[[User:Pompei2|Pompei2]] 13:10, 29 March 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
== Very good ==&lt;br /&gt;
&lt;br /&gt;
yes, very good article, again :)&lt;br /&gt;
&lt;br /&gt;
And I stay tuned for part III :-p&lt;br /&gt;
&lt;br /&gt;
--[[User:Pompei2|Pompei2]] 13:10, 29 March 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
== Carat, not Caret (yes, strange) ==&lt;br /&gt;
&lt;br /&gt;
one other thing I noticed is that although this thing is called a &amp;quot;Caret&amp;quot;, in CEGUI the sections and so one have to be called &amp;quot;Carat&amp;quot;, else you get an exception.&lt;br /&gt;
&lt;br /&gt;
I changed this too in your article.&lt;/div&gt;</summary>
		<author><name>Pompei2</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=The_Beginners_Guide_to_Falagard_skinning_-_Part_II&amp;diff=2525</id>
		<title>The Beginners Guide to Falagard skinning - Part II</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=The_Beginners_Guide_to_Falagard_skinning_-_Part_II&amp;diff=2525"/>
				<updated>2007-03-30T20:04:05Z</updated>
		
		<summary type="html">&lt;p&gt;Pompei2: /* Caret */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Last time we looked at the essential basics to get something running with Falagard. This is great, but a simplistic look'n'feel for a button is a bit boring. So lets step forward and learn something new.&lt;br /&gt;
&lt;br /&gt;
In this tutorial we will create a look'n'feel for the ''Editbox'' window type. This widget is interactive and uses new parts of the Falagard system, making it an excellent target for another tutorial.&lt;br /&gt;
&lt;br /&gt;
So let's get started...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
We'll start out by looking at the requirements for the ''Editbox'' window type. Like always, the information we're looking for can be found in the [[Falagard System base widgets reference]].&lt;br /&gt;
&lt;br /&gt;
In there we'll see that the ''Editbox'' is a bit more complex than the ''Button''. But fear not - we'll get through every part of it ;-)&lt;br /&gt;
&lt;br /&gt;
Let's start out with the ''StateImagery'' needed for this widget:&lt;br /&gt;
* Enabled&lt;br /&gt;
* Disabled&lt;br /&gt;
* ReadOnly&lt;br /&gt;
* ActiveSelection&lt;br /&gt;
* InactiveSelection&lt;br /&gt;
&lt;br /&gt;
Unlike the ''Button'' we don't have any optional states. ''Enabled'' and ''Disabled'' should speak for themselves. ''ReadOnly'' is used when the ''Editbox'' is in read-only mode (easy huh?).&lt;br /&gt;
&lt;br /&gt;
The ''ActiveSelection'' state is somewhat special. It should define what imagery to render for the selection graphics itself when the window is in an activated state (has focus).&lt;br /&gt;
''InactiveSelection'' is the same, except it is used when the window is '''not''' active (does'nt have focus).&lt;br /&gt;
&lt;br /&gt;
Besides the ''StateImagery'' needed, a ''Editbox'' also requires a ''NamedArea'' called '''TextArea''' and a ''ImagerySection'' named '''Caret'''.&lt;br /&gt;
We'll have a much closer look at these later on.&lt;br /&gt;
&lt;br /&gt;
The initial XML (with the parts we know about) looks like this:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt; &lt;br /&gt;
 &amp;lt;Falagard&amp;gt;&lt;br /&gt;
 	&amp;lt;ImagerySection name=&amp;quot;Caret&amp;quot;&amp;gt;&lt;br /&gt;
 	&amp;lt;/ImagerySection&amp;gt;&lt;br /&gt;
 	&amp;lt;StateImagery name=&amp;quot;Enabled&amp;quot;&amp;gt;&lt;br /&gt;
 	&amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
 	&amp;lt;StateImagery name=&amp;quot;Disabled&amp;quot;&amp;gt;&lt;br /&gt;
 	&amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
 	&amp;lt;StateImagery name=&amp;quot;ReadOnly&amp;quot;&amp;gt;&lt;br /&gt;
 	&amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
 	&amp;lt;StateImagery name=&amp;quot;ActiveSelection&amp;quot;&amp;gt;&lt;br /&gt;
 	&amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
 	&amp;lt;StateImagery name=&amp;quot;InactiveSelection&amp;quot;&amp;gt;&lt;br /&gt;
 	&amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
 &amp;lt;/Falagard&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We'll fill it out as we go...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Imagery ==&lt;br /&gt;
This look'n'feel will use a frame consisting of 8 different images from our favorite imageset ''MyImages''. Furthermore we'll have a single image stretched to fill the hole in this frame. The images will have names that are easy to interpret:&lt;br /&gt;
{| cellpadding=&amp;quot;15&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ Frame setup&lt;br /&gt;
| TL || align=&amp;quot;center&amp;quot; | T || TR&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | L || Bg|| align=&amp;quot;center&amp;quot; |R&lt;br /&gt;
|-&lt;br /&gt;
| BL || align=&amp;quot;center&amp;quot; | B || BR&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Each prefixed with '''Editbox'''. Forming imagenames like '''EditboxTL''' etc.&lt;br /&gt;
&lt;br /&gt;
The ''FrameComponent'' tag may only occur inside an ''ImagerySection''. Just like the ''ImageryComponent'' and ''TextComponent'' that we used in part I.&lt;br /&gt;
&lt;br /&gt;
Using the ''FrameComponent'' is very much like using the ''ImageryComponent'' all the tags allowed are the same, but a ''FrameComponent'' allows up to nine images to be specified. It's purpose is to make making frames easy :-)&lt;br /&gt;
A ''FrameComponent'' is special in the way it handles formatting compared to ''ImageryComponent'' though. Any formatting options are only applied to the background image - if it's specified. Yes. We don't have to set all nine of them. We can just choose the image &amp;quot;positions&amp;quot; we need. In our case we'll use all of them tough...&lt;br /&gt;
&lt;br /&gt;
Let's look at the XML for this ''FrameComponent'':&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;FrameComponent&amp;gt;&lt;br /&gt;
        &amp;lt;Area&amp;gt;&lt;br /&gt;
            &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Dim&amp;gt;&lt;br /&gt;
            &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Dim&amp;gt;&lt;br /&gt;
            &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;RightEdge&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Dim&amp;gt;&lt;br /&gt;
            &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Dim&amp;gt;&lt;br /&gt;
        &amp;lt;/Area&amp;gt;&lt;br /&gt;
        &amp;lt;Image type=&amp;quot;TopLeftCorner&amp;quot;     imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxTL&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;Image type=&amp;quot;TopEdge&amp;quot;           imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxT&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;Image type=&amp;quot;TopRightCorner&amp;quot;    imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxTR&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;Image type=&amp;quot;RightEdge&amp;quot;         imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxR&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;Image type=&amp;quot;BottomRightCorner&amp;quot; imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxBR&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;Image type=&amp;quot;BottomEdge&amp;quot;        imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxB&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;Image type=&amp;quot;BottomLeftCorner&amp;quot;  imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxBL&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;Image type=&amp;quot;LeftEdge&amp;quot;          imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxL&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;Image type=&amp;quot;Background&amp;quot;        imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxBg&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;VertFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;HorzFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;/FrameComponent&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should recognise the area. It's the full area of the window, exactly like the areas we used in part I.&lt;br /&gt;
Reason: We want the frame and background to cover the entire window. Simple :-)&lt;br /&gt;
&lt;br /&gt;
Nine images are specifed. The order does not matter.&lt;br /&gt;
But note that compared to the ''ImageryComponent'' used last time, we must specify a type attribute for the images.&lt;br /&gt;
This is so Falagard knows where to place this image in the frame.&lt;br /&gt;
These are of course listed in the [[Falagard System XML Enumerations reference]].&lt;br /&gt;
&lt;br /&gt;
The format both horizontally and vertically is ''Stretched''. This ensures that the background image is stretched to fill as much as possible of the &amp;quot;hole&amp;quot; created by the border images (TL,T,TR etc.).&lt;br /&gt;
&lt;br /&gt;
We'll use this frame for all the 3 states (''Enabled'', ''Disabled'', ''ReadOnly''), but we want the colours to be a little different in each state. In part I we created a new property to hold the colour of the Text. To show a different approach, we'll &amp;quot;hard-code&amp;quot; the frame colours into this look'n'feel.&lt;br /&gt;
&lt;br /&gt;
CEGUI supports using a colour rectangle to modulate the colours of anything it renders. This makes it possible to &amp;quot;apply&amp;quot; nice colour gradients to our frame imagery.&lt;br /&gt;
&lt;br /&gt;
The ''Normal'' state will use the colours, unmodified from the image file.&lt;br /&gt;
&lt;br /&gt;
The ''Disabled'' state will use gray to darken the frame imagery &lt;br /&gt;
&lt;br /&gt;
In the ''ReadOnly'' state we'll create a gradient that is white in the top-left corner, and slightly grayish for the three other corners. When applied to the imagery this will result in the top-left corner using exactly the same colours as in the image file, and the three other corners being slightly darkened.&lt;br /&gt;
&lt;br /&gt;
To use this frame component we must - like stated earlier - fit it in a ''ImagerySection''. We'll call this new imagery section &amp;quot;frame&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This is all the we need to write up the xml for this frame, and use it in our states, so now the XML looks like this:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt; &lt;br /&gt;
 &amp;lt;Falagard&amp;gt;&lt;br /&gt;
     &amp;lt;b&amp;gt;&amp;lt;ImagerySection name=&amp;quot;frame&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;FrameComponent&amp;gt;&lt;br /&gt;
             &amp;lt;Area&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;RightEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;/Area&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;TopLeftCorner&amp;quot;     imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxTL&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;TopEdge&amp;quot;           imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxT&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;TopRightCorner&amp;quot;    imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxTR&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;RightEdge&amp;quot;         imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxR&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;BottomRightCorner&amp;quot; imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxBR&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;BottomEdge&amp;quot;        imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxB&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;BottomLeftCorner&amp;quot;  imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxBL&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;LeftEdge&amp;quot;          imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxL&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;Background&amp;quot;        imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxBg&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;VertFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;HorzFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;/FrameComponent&amp;gt;&lt;br /&gt;
     &amp;lt;/ImagerySection&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
     &amp;lt;ImagerySection name=&amp;quot;Caret&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;/ImagerySection&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;Enabled&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;b&amp;gt;&amp;lt;Layer&amp;gt;&lt;br /&gt;
             &amp;lt;Section section=&amp;quot;frame&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;/Layer&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;Disabled&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;b&amp;gt;&amp;lt;Layer&amp;gt;&lt;br /&gt;
             &amp;lt;Section section=&amp;quot;frame&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;Colours topLeft=&amp;quot;FF7F7F7F&amp;quot; topRight=&amp;quot;FF7F7F7F&amp;quot; bottomLeft=&amp;quot;FF7F7F7F&amp;quot; bottomRight=&amp;quot;FF7F7F7F&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Section&amp;gt;&lt;br /&gt;
         &amp;lt;/Layer&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;ReadOnly&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;b&amp;gt;&amp;lt;Layer&amp;gt;&lt;br /&gt;
             &amp;lt;Section section=&amp;quot;frame&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;Colours topLeft=&amp;quot;FFFFFFFF&amp;quot; topRight=&amp;quot;FFDFDFDF&amp;quot; bottomLeft=&amp;quot;FFDFDFDF&amp;quot; bottomRight=&amp;quot;FFDFDFDF&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Section&amp;gt;&lt;br /&gt;
         &amp;lt;/Layer&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;ActiveSelection&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;InactiveSelection&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
 &amp;lt;/Falagard&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The frame component has been added, and the ''Enabled'', ''Disabled'' and ''ReadOnly'' states have been set up to use them. The only new thing is really the ''Colours'' tag inside the ''Section'' tags for &amp;quot;frame&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
It behaves just like the ''ColourProperty'' tag we used in part I, except you can specify a colour to use for each corner.&lt;br /&gt;
It's attributes&lt;br /&gt;
* topLeft&lt;br /&gt;
* topRight&lt;br /&gt;
* bottomLeft&lt;br /&gt;
* bottomRight&lt;br /&gt;
Each specify a single colour of the same format we used for ''ColourProperty'' (AARRGGBB in hex).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Text ==&lt;br /&gt;
Remeber something about a ''NamedArea''? Either way we're going to look at it now. The ''Editbox'' widget requires us to define a named area so it knows where to render, the text we type in, the caret (the marker that shows us where the characters we type will be inserted) and our selection.&lt;br /&gt;
&lt;br /&gt;
In this look'n'feel, we want the text to be rendered inside our frame. That is we dont want the text to cover the frame imagery itself, only the background of it. Falagard provides a ''ImageDim'' tag that we can use to extract the width and height from the images we used for the frame. Falagard also provides a ''DimOperator'' tag that we can use to do a little math on our dimensions. These features will be the core of our ''NamedArea'' which will be named '''TextArea''' (Stated in the requirements... Remember?)&lt;br /&gt;
&lt;br /&gt;
The only thing we must (and may) specify in a ''NamedArea'' is a ''Area''.&lt;br /&gt;
&lt;br /&gt;
If we take a look back at the ''Area'' tag, we know that it must specify four dimensions. ''LeftEdge'', ''TopEdge'', ''RightEdge'' and ''BottomEdge''. You might remember that we can specify ''Width'' instead of ''RightEdge'', and ''Height'' instead of ''BottomEdge''. But we're not going to do that. Just so you know (and don't forget) ;-)&lt;br /&gt;
&lt;br /&gt;
We start out with a &amp;quot;empty&amp;quot; XML and fill it out as we go. For now it looks like this:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;NamedArea name=&amp;quot;TextArea&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;Area&amp;gt;&lt;br /&gt;
         &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;/Dim&amp;gt;&lt;br /&gt;
         &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;/Dim&amp;gt;&lt;br /&gt;
         &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;/Dim&amp;gt;&lt;br /&gt;
         &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;/Dim&amp;gt;&lt;br /&gt;
     &amp;lt;/Area&amp;gt;&lt;br /&gt;
 &amp;lt;/NamedArea&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We start out with the left edge. In the frame we used the image named '''EditboxL''' for the left edge. And as the area we want to define is to lie inside the frame, we'll use the width of this specific image as the left edge of our area.&lt;br /&gt;
The XML for this ''ImageDim'' is like so:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxL&amp;quot; dimension=&amp;quot;Width&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The top edge is very similar except we'll use the height of the image named '''EditboxT''' instead.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxT&amp;quot; dimension=&amp;quot;Height&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The right edge is a bit more tricky. To start out we'll use a ''UnifiedDim'' that gives us the right edge of our widget.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;/Unified&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We use a seperate tag to close it, as by itself this ''UnifiedDim'' is not good enough. We still need the take the frame into accout. The image dimension we're after is the width of the image '''EditboxR'''. We must subtract this width from the right edge to ensure that the frame imagery is not overwritten by a long text string in the ''Editbox''.&lt;br /&gt;
&lt;br /&gt;
The ''DimOperator'' can do this for us with XML like this:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;b&amp;gt;&amp;lt;DimOperator op=&amp;quot;Subtract&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxR&amp;quot; dimension=&amp;quot;Width&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;lt;/DimOperator&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
 &amp;lt;/Unified&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The ''DimOperator'' tag requires us to specify the attribute ''op'' with the name of the operation we want to perform as the value. The operations supported by Falagard are:&lt;br /&gt;
* Add&lt;br /&gt;
* Subtract&lt;br /&gt;
* Multiply&lt;br /&gt;
* Divide&lt;br /&gt;
We used ''Subtract'' to &amp;quot;move back&amp;quot; a little from our right edge to make sure we leave the frame imagery for the right edge alone.&lt;br /&gt;
&lt;br /&gt;
The bottom edge of the area is very similar to the right. There are two differences. First we want the ''UnifiedDim'' to take the bottom edge of our window and not the right edge. Second we want to subtract the height of the image named '''EditboxB''' instead too.&lt;br /&gt;
&lt;br /&gt;
This gives us this XML:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;DimOperator op=&amp;quot;Subtract&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxB&amp;quot; dimension=&amp;quot;Height&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;lt;/DimOperator&amp;gt;&lt;br /&gt;
 &amp;lt;/Unified&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If we put these four dimensions into our ''NamedArea'' it looks like this:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;NamedArea name=&amp;quot;TextArea&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;Area&amp;gt;&lt;br /&gt;
         &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
             &amp;lt;b&amp;gt;&amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxL&amp;quot; dimension=&amp;quot;Width&amp;quot; /&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
         &amp;lt;/Dim&amp;gt;&lt;br /&gt;
         &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
             &amp;lt;b&amp;gt;&amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxT&amp;quot; dimension=&amp;quot;Height&amp;quot; /&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
         &amp;lt;/Dim&amp;gt;&lt;br /&gt;
         &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
             &amp;lt;b&amp;gt;&amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;DimOperator op=&amp;quot;Subtract&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxR&amp;quot; dimension=&amp;quot;Width&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/DimOperator&amp;gt;&lt;br /&gt;
             &amp;lt;/Unified&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
         &amp;lt;/Dim&amp;gt;&lt;br /&gt;
         &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
             &amp;lt;b&amp;gt;&amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;DimOperator op=&amp;quot;Subtract&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxB&amp;quot; dimension=&amp;quot;Height&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/DimOperator&amp;gt;&lt;br /&gt;
             &amp;lt;/Unified&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
         &amp;lt;/Dim&amp;gt;&lt;br /&gt;
     &amp;lt;/Area&amp;gt;&lt;br /&gt;
 &amp;lt;/NamedArea&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the complete ''NamedArea'' for our ''Editbox'' look'n'feel. If we fit it inside our full look'n'feel it will look like the XML below. Notice that the ''NamedArea'' is specifed before the ''ImagerySection''. This is required by Falagard.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt; &lt;br /&gt;
 &amp;lt;Falagard&amp;gt;&lt;br /&gt;
     &amp;lt;b&amp;gt;&amp;lt;NamedArea name=&amp;quot;TextArea&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;Area&amp;gt;&lt;br /&gt;
             &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxL&amp;quot; dimension=&amp;quot;Width&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxT&amp;quot; dimension=&amp;quot;Height&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;DimOperator op=&amp;quot;Subtract&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxR&amp;quot; dimension=&amp;quot;Width&amp;quot; /&amp;gt;&lt;br /&gt;
                     &amp;lt;/DimOperator&amp;gt;&lt;br /&gt;
                 &amp;lt;/Unified&amp;gt;&lt;br /&gt;
             &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;DimOperator op=&amp;quot;Subtract&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxB&amp;quot; dimension=&amp;quot;Height&amp;quot; /&amp;gt;&lt;br /&gt;
                     &amp;lt;/DimOperator&amp;gt;&lt;br /&gt;
                 &amp;lt;/Unified&amp;gt;&lt;br /&gt;
             &amp;lt;/Dim&amp;gt;&lt;br /&gt;
         &amp;lt;/Area&amp;gt;&lt;br /&gt;
     &amp;lt;/NamedArea&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
     &amp;lt;ImagerySection name=&amp;quot;frame&amp;quot;&amp;gt;&lt;br /&gt;
         ...&lt;br /&gt;
         ... saving space ...&lt;br /&gt;
         ...&lt;br /&gt;
     &amp;lt;/ImagerySection&amp;gt;&lt;br /&gt;
     &amp;lt;ImagerySection name=&amp;quot;Caret&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;/ImagerySection&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;Enabled&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;Layer&amp;gt;&lt;br /&gt;
             &amp;lt;Section section=&amp;quot;frame&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;/Layer&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;Disabled&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;Layer&amp;gt;&lt;br /&gt;
             &amp;lt;Section section=&amp;quot;frame&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;Colours topLeft=&amp;quot;FF7F7F7F&amp;quot; topRight=&amp;quot;FF7F7F7F&amp;quot; bottomLeft=&amp;quot;FF7F7F7F&amp;quot; bottomRight=&amp;quot;FF7F7F7F&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Section&amp;gt;&lt;br /&gt;
         &amp;lt;/Layer&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;ReadOnly&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;Layer&amp;gt;&lt;br /&gt;
             &amp;lt;Section section=&amp;quot;frame&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;Colours topLeft=&amp;quot;FFFFFFFF&amp;quot; topRight=&amp;quot;FFDFDFDF&amp;quot; bottomLeft=&amp;quot;FFDFDFDF&amp;quot; bottomRight=&amp;quot;FFDFDFDF&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Section&amp;gt;&lt;br /&gt;
         &amp;lt;/Layer&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;ActiveSelection&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;InactiveSelection&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
 &amp;lt;/Falagard&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We don't reference '''TextArea''' anywhere. Just specifying it is all that is required according to the [[Falagard System base widgets reference]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Caret ==&lt;br /&gt;
The ''Editbox'' has a caret. This is a marker that shows us where we are typing and allows us to tell if we are inserting in the middle of the text or at the end etc. The text is split around it by CEGUI so we don't draw over the text rendering the point we're editing unreadable. All this is currently handled internally and all you need to do is create a ''ImagerySection'' name '''Caret'''.&lt;br /&gt;
&lt;br /&gt;
When CEGUI needs render the caret (and the text) it will fetch this ''ImagerySection'' and render it at the appropriate position in the text.&lt;br /&gt;
We do not need to make a ''TextComponent'' in a ''Editbox'' to get the text to render. Because of the pecularities of the caret (and selection which we will handle later) it's all done automatically, by using the ''NamedArea'' '''TextArea''' we just specified along with the real pixel area of the window, to confine rendering to right rectangle on the screen.&lt;br /&gt;
&lt;br /&gt;
Enough details. We just want to render a single image named '''EditboxCaret''' stretched vertically inside the '''TextArea'''.&lt;br /&gt;
&lt;br /&gt;
Creating the ''ImagerySection'' is very much like creating the background for the ''Button'' in part I, the only real difference being the ''Area'' used. We'll look at the XML for this area, it's all made up by stuff we've already seen.&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;Area&amp;gt;&lt;br /&gt;
        &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;/Dim&amp;gt;&lt;br /&gt;
        &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;/Dim&amp;gt;&lt;br /&gt;
        &amp;lt;Dim type=&amp;quot;Width&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxCaret&amp;quot; dimension=&amp;quot;Width&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;/Dim&amp;gt;&lt;br /&gt;
        &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;/Dim&amp;gt;&lt;br /&gt;
    &amp;lt;/Area&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first and second (left/top edges) ''Dim''s have the familiar ''AbsoluteDim'' with a value of zero. Nothing new here.&lt;br /&gt;
&lt;br /&gt;
The third ''Dim'' on the other hand is new. It's now specified as &amp;quot;Width&amp;quot; and not &amp;quot;RightEdge&amp;quot; like we have done so far. Inside we have a ''ImageDim'' for the width of the caret image we're using. If we had used the regular ''UnifiedDim'', the caret itself would have the width our textarea (because the caret resides in the text area) and would have been very ugly...&lt;br /&gt;
&lt;br /&gt;
The fourth dimension is the familiar ''UnifiedDim'' we have used in all the earlier areas.&lt;br /&gt;
&lt;br /&gt;
We know from part I how to make a ''ImagerySection'' with a ''ImageryComponent''. This is all we need to render this single-image caret. The XML for our look'n'feel is nearing completion.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt; &lt;br /&gt;
 &amp;lt;Falagard&amp;gt;&lt;br /&gt;
     &amp;lt;NamedArea name=&amp;quot;TextArea&amp;quot;&amp;gt;&lt;br /&gt;
         ...&lt;br /&gt;
         ... saving space ...&lt;br /&gt;
         ...&lt;br /&gt;
     &amp;lt;/NamedArea&amp;gt;&lt;br /&gt;
     &amp;lt;ImagerySection name=&amp;quot;frame&amp;quot;&amp;gt;&lt;br /&gt;
         ...&lt;br /&gt;
         ... saving space ...&lt;br /&gt;
         ...&lt;br /&gt;
     &amp;lt;/ImagerySection&amp;gt;&lt;br /&gt;
     &amp;lt;ImagerySection name=&amp;quot;Caret&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;b&amp;gt;&amp;lt;ImageryComponent&amp;gt;&lt;br /&gt;
             &amp;lt;Area&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;Width&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxCaret&amp;quot; dimension=&amp;quot;Width&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;/Area&amp;gt;&lt;br /&gt;
             &amp;lt;Image imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxCaret&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;VertFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;/ImageryComponent&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
     &amp;lt;/ImagerySection&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;Enabled&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;Layer&amp;gt;&lt;br /&gt;
             &amp;lt;Section section=&amp;quot;frame&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;/Layer&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;Disabled&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;Layer&amp;gt;&lt;br /&gt;
             &amp;lt;Section section=&amp;quot;frame&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;Colours topLeft=&amp;quot;FF7F7F7F&amp;quot; topRight=&amp;quot;FF7F7F7F&amp;quot; bottomLeft=&amp;quot;FF7F7F7F&amp;quot; bottomRight=&amp;quot;FF7F7F7F&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Section&amp;gt;&lt;br /&gt;
         &amp;lt;/Layer&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;ReadOnly&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;Layer&amp;gt;&lt;br /&gt;
             &amp;lt;Section section=&amp;quot;frame&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;Colours topLeft=&amp;quot;FFFFFFFF&amp;quot; topRight=&amp;quot;FFDFDFDF&amp;quot; bottomLeft=&amp;quot;FFDFDFDF&amp;quot; bottomRight=&amp;quot;FFDFDFDF&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Section&amp;gt;&lt;br /&gt;
         &amp;lt;/Layer&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;ActiveSelection&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;InactiveSelection&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
 &amp;lt;/Falagard&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We only specify the vertical formatting for the new ''ImageryComponent'' because we are specifying the area to exactly match the width of the image, and thus any formatting would have no effect. ''LeftAligned'' (the default) is just fine.&lt;br /&gt;
&lt;br /&gt;
Now we just need to do something in the ''ActiveSelection'' and ''InactiveSelection'' states...&lt;br /&gt;
&lt;br /&gt;
== Selection ==&lt;br /&gt;
When the user has selected text in the ''Editbox'', either with the mouse or the keyboard, CEGUI render the selection using the two additional states '''ActiveSelection''' and '''InactiveSelection'''.&lt;br /&gt;
&lt;br /&gt;
The the window is active (has focus) it will use the state '''ActiveSelection''', if if does not have focus (inactive) yet still has a selection '''InactiveSelection''' will be used.&lt;br /&gt;
&lt;br /&gt;
For the selection in this look'n'feel, we'll use a single image stretched over the selection area. This image will contain plain white in the image file so we can apply any colour(s) we choose to the selection imagery.&lt;br /&gt;
Let's call it '''White'''.&lt;br /&gt;
&lt;br /&gt;
For '''ActiveSelection''' we'll use a classic blue colour, for inactive the same, except we'll make it 50% transparent.&lt;br /&gt;
We can avoid a colour tag in the '''ActiveSelection''' state if we specify the colours to use directly in the ''ImageryComponent''. We'll do that to show how it works.&lt;br /&gt;
&lt;br /&gt;
We'll create a new ''ImagerySection'' for this &amp;quot;selection brush&amp;quot; named '''selection'''. XML follows:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;ImagerySection name=&amp;quot;selection&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;ImageryComponent&amp;gt;&lt;br /&gt;
         &amp;lt;Area&amp;gt;&lt;br /&gt;
             &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;RightEdge&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Dim&amp;gt;&lt;br /&gt;
         &amp;lt;/Area&amp;gt;&lt;br /&gt;
         &amp;lt;Image imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;White&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;Colours topLeft=&amp;quot;FF26458A&amp;quot; topRight=&amp;quot;FF26458A&amp;quot; bottomLeft=&amp;quot;FF26458A&amp;quot; bottomRight=&amp;quot;FF26458A&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;VertFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;HorzFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;lt;/ImageryComponent&amp;gt;&lt;br /&gt;
 &amp;lt;/ImagerySection&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We use a default area that you should recognise by now. CEGUI will automatically use the right size for the selection.&lt;br /&gt;
The image we use is the one called '''White''' from our favorite imageset '''MyImages'''. Like always ;-)&lt;br /&gt;
A colour tag has been added as well to make our selection some kind of blue...&lt;br /&gt;
The vertical and horizontal formatting is ''Stretched'' which is generally what you would want to do in a situation like this.&lt;br /&gt;
&lt;br /&gt;
We'll &amp;quot;call&amp;quot; this ''ImagerySection'' from the '''ActiveSelection''' and '''InactiveSelection''' states. In the '''InactiveSelection''' state we'll further modulate the colours used by passing a 50% transparent white. This will have the effect of using the same colour as in the active state, but make that colour 50% transparent. We could have just specified the full colour to use in each state and remove the ''Colours'' tag from the ''ImageryComponent'', but I wanted to show that multiple modulations are possible with Falagard.&lt;br /&gt;
&lt;br /&gt;
The states are the last thing missing from the look'n'feel, so let's take a look at the final XML (yay :-P ).&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt; &lt;br /&gt;
 &amp;lt;Falagard&amp;gt;&lt;br /&gt;
     &amp;lt;NamedArea name=&amp;quot;TextArea&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;Area&amp;gt;&lt;br /&gt;
             &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxL&amp;quot; dimension=&amp;quot;Width&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxT&amp;quot; dimension=&amp;quot;Height&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;DimOperator op=&amp;quot;Subtract&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxR&amp;quot; dimension=&amp;quot;Width&amp;quot; /&amp;gt;&lt;br /&gt;
                     &amp;lt;/DimOperator&amp;gt;&lt;br /&gt;
                 &amp;lt;/Unified&amp;gt;&lt;br /&gt;
             &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;DimOperator op=&amp;quot;Subtract&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxB&amp;quot; dimension=&amp;quot;Height&amp;quot; /&amp;gt;&lt;br /&gt;
                     &amp;lt;/DimOperator&amp;gt;&lt;br /&gt;
                 &amp;lt;/Unified&amp;gt;&lt;br /&gt;
             &amp;lt;/Dim&amp;gt;&lt;br /&gt;
         &amp;lt;/Area&amp;gt;&lt;br /&gt;
     &amp;lt;/NamedArea&amp;gt;&lt;br /&gt;
     &amp;lt;ImagerySection name=&amp;quot;frame&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;FrameComponent&amp;gt;&lt;br /&gt;
             &amp;lt;Area&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;RightEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;/Area&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;TopLeftCorner&amp;quot;     imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxTL&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;TopEdge&amp;quot;           imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxT&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;TopRightCorner&amp;quot;    imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxTR&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;RightEdge&amp;quot;         imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxR&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;BottomRightCorner&amp;quot; imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxBR&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;BottomEdge&amp;quot;        imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxB&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;BottomLeftCorner&amp;quot;  imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxBL&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;LeftEdge&amp;quot;          imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxL&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;Background&amp;quot;        imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxBg&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;VertFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;HorzFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;/FrameComponent&amp;gt;&lt;br /&gt;
     &amp;lt;/ImagerySection&amp;gt;&lt;br /&gt;
     &amp;lt;ImagerySection name=&amp;quot;Caret&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;ImageryComponent&amp;gt;&lt;br /&gt;
             &amp;lt;Area&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;Width&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxCaret&amp;quot; dimension=&amp;quot;Width&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;/Area&amp;gt;&lt;br /&gt;
             &amp;lt;Image imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxCaret&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;VertFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;/ImageryComponent&amp;gt;&lt;br /&gt;
     &amp;lt;/ImagerySection&amp;gt;&lt;br /&gt;
     &amp;lt;b&amp;gt;&amp;lt;ImagerySection name=&amp;quot;selection&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;ImageryComponent&amp;gt;&lt;br /&gt;
             &amp;lt;Area&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;RightEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;/Area&amp;gt;&lt;br /&gt;
             &amp;lt;Image imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;White&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Colours topLeft=&amp;quot;FF26458A&amp;quot; topRight=&amp;quot;FF26458A&amp;quot; bottomLeft=&amp;quot;FF26458A&amp;quot; bottomRight=&amp;quot;FF26458A&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;VertFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;HorzFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;/ImageryComponent&amp;gt;&lt;br /&gt;
     &amp;lt;/ImagerySection&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;Enabled&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;Layer&amp;gt;&lt;br /&gt;
             &amp;lt;Section section=&amp;quot;frame&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;/Layer&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;Disabled&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;Layer&amp;gt;&lt;br /&gt;
             &amp;lt;Section section=&amp;quot;frame&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;Colours topLeft=&amp;quot;FF7F7F7F&amp;quot; topRight=&amp;quot;FF7F7F7F&amp;quot; bottomLeft=&amp;quot;FF7F7F7F&amp;quot; bottomRight=&amp;quot;FF7F7F7F&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Section&amp;gt;&lt;br /&gt;
         &amp;lt;/Layer&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;ReadOnly&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;Layer&amp;gt;&lt;br /&gt;
             &amp;lt;Section section=&amp;quot;frame&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;Colours topLeft=&amp;quot;FFFFFFFF&amp;quot; topRight=&amp;quot;FFDFDFDF&amp;quot; bottomLeft=&amp;quot;FFDFDFDF&amp;quot; bottomRight=&amp;quot;FFDFDFDF&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Section&amp;gt;&lt;br /&gt;
         &amp;lt;/Layer&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;ActiveSelection&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;b&amp;gt;&amp;lt;Layer&amp;gt;&lt;br /&gt;
             &amp;lt;Section section=&amp;quot;selection&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;/Layer&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;InactiveSelection&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;b&amp;gt;&amp;lt;Layer&amp;gt;&lt;br /&gt;
             &amp;lt;Section section=&amp;quot;selection&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;Colours topLeft=&amp;quot;7FFFFFFF&amp;quot; topRight=&amp;quot;7FFFFFFF&amp;quot; bottomLeft=&amp;quot;7FFFFFFF&amp;quot; bottomRight=&amp;quot;7FFFFFFF&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Section&amp;gt;&lt;br /&gt;
         &amp;lt;/Layer&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
 &amp;lt;/Falagard&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That's it folks. The look'n'feel is done. Hopefully you're starting to play around with the XML and making the look'n'feel suit you (or your artist ;-) ).&lt;br /&gt;
Again, feel free to add comments in the discussion page.&lt;br /&gt;
&lt;br /&gt;
Stay tuned for part III...&lt;br /&gt;
&lt;br /&gt;
--[[User:lindquist|lindquist]] 00:41, 14 Dec 2005 (CET)&lt;/div&gt;</summary>
		<author><name>Pompei2</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Talk:The_Beginners_Guide_to_Falagard_skinning_-_Part_II&amp;diff=2524</id>
		<title>Talk:The Beginners Guide to Falagard skinning - Part II</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=Talk:The_Beginners_Guide_to_Falagard_skinning_-_Part_II&amp;diff=2524"/>
				<updated>2007-03-30T20:00:43Z</updated>
		
		<summary type="html">&lt;p&gt;Pompei2: /* Unified Area of the caret ? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Unified Area of the caret ? ==&lt;br /&gt;
&lt;br /&gt;
I'm writing this just while reading (this great article :)).&lt;br /&gt;
&lt;br /&gt;
In the part about the caret, when specifying the area it should use, you say this:&lt;br /&gt;
 The third Dim on the other hand is new. It's now specified as &amp;quot;Width&amp;quot; and not &amp;quot;RightEdge&amp;quot; like we have done so far.&lt;br /&gt;
 Inside we have a ImageDim for the width of the caret image we're using. If we had used the regular UnifiedDim,&lt;br /&gt;
 the caret itself would have the width of the window and would have been very ugly...&lt;br /&gt;
This sounds strange to my intuition, as my intuition tells me that using the UnifiedDim the caret would have the width of THE AREA and not the window. Is my intuition bad, or did you make a mistake ?&lt;br /&gt;
&lt;br /&gt;
Edit: Ok, while creating my editbox, I checked this, and now it is not only an intuition anymore, but a truth :-p I corrected this in your article.&lt;br /&gt;
&lt;br /&gt;
--[[User:Pompei2|Pompei2]] 13:10, 29 March 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
== Very good ==&lt;br /&gt;
&lt;br /&gt;
yes, very good article, again :)&lt;br /&gt;
&lt;br /&gt;
And I stay tuned for part III :-p&lt;br /&gt;
&lt;br /&gt;
--[[User:Pompei2|Pompei2]] 13:10, 29 March 2007 (PDT)&lt;/div&gt;</summary>
		<author><name>Pompei2</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Talk:The_Beginners_Guide_to_Falagard_skinning_-_Part_I&amp;diff=2523</id>
		<title>Talk:The Beginners Guide to Falagard skinning - Part I</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=Talk:The_Beginners_Guide_to_Falagard_skinning_-_Part_I&amp;diff=2523"/>
				<updated>2007-03-29T20:10:55Z</updated>
		
		<summary type="html">&lt;p&gt;Pompei2: /* Great ! */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Please add you feedback comments. What is good? What is bad? What is missing? etc.&lt;br /&gt;
&lt;br /&gt;
--[[User:lindquist|lindquist]] 11:55, 6 Dec 2005 (CET)&lt;br /&gt;
&lt;br /&gt;
== Great ! ==&lt;br /&gt;
&lt;br /&gt;
Thank you very much for this, I just read it and now that i know the very basics of skinning, I can go on :)&lt;br /&gt;
&lt;br /&gt;
Just one thing I noticed is a typo you made:&lt;br /&gt;
In the last chapter: &amp;quot;Colours&amp;quot;, the little code part that states:&lt;br /&gt;
   &amp;lt;Section name=&amp;quot;label&amp;quot;&amp;gt;&lt;br /&gt;
       &amp;lt;ColourProperty name=&amp;quot;NormalTextColour&amp;quot; /&amp;gt;&lt;br /&gt;
   &amp;lt;/Section&amp;gt;&lt;br /&gt;
Shouldn't it be like this ?&lt;br /&gt;
   &amp;lt;Section section=&amp;quot;label&amp;quot;&amp;gt;&lt;br /&gt;
       &amp;lt;ColourProperty name=&amp;quot;NormalTextColour&amp;quot; /&amp;gt;&lt;br /&gt;
   &amp;lt;/Section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--[[User:Pompei2|Pompei2]] 13:10, 29 March 2007 (PDT)&lt;/div&gt;</summary>
		<author><name>Pompei2</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Talk:The_Beginners_Guide_to_Falagard_skinning_-_Part_II&amp;diff=2522</id>
		<title>Talk:The Beginners Guide to Falagard skinning - Part II</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=Talk:The_Beginners_Guide_to_Falagard_skinning_-_Part_II&amp;diff=2522"/>
				<updated>2007-03-29T20:10:29Z</updated>
		
		<summary type="html">&lt;p&gt;Pompei2: /* Very good */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Unified Area of the caret ? ==&lt;br /&gt;
&lt;br /&gt;
I'm writing this just while reading (this great article :)).&lt;br /&gt;
&lt;br /&gt;
In the part about the caret, when specifying the area it should use, you say this:&lt;br /&gt;
 The third Dim on the other hand is new. It's now specified as &amp;quot;Width&amp;quot; and not &amp;quot;RightEdge&amp;quot; like we have done so far.&lt;br /&gt;
 Inside we have a ImageDim for the width of the caret image we're using. If we had used the regular UnifiedDim,&lt;br /&gt;
 the caret itself would have the width of the window and would have been very ugly...&lt;br /&gt;
This sounds strange to my intuition, as my intuition tells me that using the UnifiedDim the caret would have the width of THE AREA and not the window. Is my intuition bad, or did you make a mistake ?&lt;br /&gt;
&lt;br /&gt;
--[[User:Pompei2|Pompei2]] 13:10, 29 March 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
== Very good ==&lt;br /&gt;
&lt;br /&gt;
yes, very good article, again :)&lt;br /&gt;
&lt;br /&gt;
And I stay tuned for part III :-p&lt;br /&gt;
&lt;br /&gt;
--[[User:Pompei2|Pompei2]] 13:10, 29 March 2007 (PDT)&lt;/div&gt;</summary>
		<author><name>Pompei2</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Talk:The_Beginners_Guide_to_Falagard_skinning_-_Part_II&amp;diff=2521</id>
		<title>Talk:The Beginners Guide to Falagard skinning - Part II</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=Talk:The_Beginners_Guide_to_Falagard_skinning_-_Part_II&amp;diff=2521"/>
				<updated>2007-03-29T20:10:17Z</updated>
		
		<summary type="html">&lt;p&gt;Pompei2: /* Unified Area of the caret ? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Unified Area of the caret ? ==&lt;br /&gt;
&lt;br /&gt;
I'm writing this just while reading (this great article :)).&lt;br /&gt;
&lt;br /&gt;
In the part about the caret, when specifying the area it should use, you say this:&lt;br /&gt;
 The third Dim on the other hand is new. It's now specified as &amp;quot;Width&amp;quot; and not &amp;quot;RightEdge&amp;quot; like we have done so far.&lt;br /&gt;
 Inside we have a ImageDim for the width of the caret image we're using. If we had used the regular UnifiedDim,&lt;br /&gt;
 the caret itself would have the width of the window and would have been very ugly...&lt;br /&gt;
This sounds strange to my intuition, as my intuition tells me that using the UnifiedDim the caret would have the width of THE AREA and not the window. Is my intuition bad, or did you make a mistake ?&lt;br /&gt;
&lt;br /&gt;
--[[User:Pompei2|Pompei2]] 13:10, 29 March 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
== Very good ==&lt;br /&gt;
&lt;br /&gt;
yes, very good article, again :)&lt;br /&gt;
&lt;br /&gt;
And I stay tuned for part III :-p&lt;/div&gt;</summary>
		<author><name>Pompei2</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Talk:The_Beginners_Guide_to_Falagard_skinning_-_Part_II&amp;diff=2520</id>
		<title>Talk:The Beginners Guide to Falagard skinning - Part II</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=Talk:The_Beginners_Guide_to_Falagard_skinning_-_Part_II&amp;diff=2520"/>
				<updated>2007-03-29T20:09:40Z</updated>
		
		<summary type="html">&lt;p&gt;Pompei2: Very good&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Unified Area of the caret ? ==&lt;br /&gt;
&lt;br /&gt;
I'm writing this just while reading (this great article :)).&lt;br /&gt;
&lt;br /&gt;
In the part about the caret, when specifying the area it should use, you say this:&lt;br /&gt;
 The third Dim on the other hand is new. It's now specified as &amp;quot;Width&amp;quot; and not &amp;quot;RightEdge&amp;quot; like we have done so far.&lt;br /&gt;
 Inside we have a ImageDim for the width of the caret image we're using. If we had used the regular UnifiedDim,&lt;br /&gt;
 the caret itself would have the width of the window and would have been very ugly...&lt;br /&gt;
This sounds strange to my intuition, as my intuition tells me that using the UnifiedDim the caret would have the width of THE AREA and not the window. Is my intuition bad, or did you make a mistake ?&lt;br /&gt;
&lt;br /&gt;
== Very good ==&lt;br /&gt;
&lt;br /&gt;
yes, very good article, again :)&lt;br /&gt;
&lt;br /&gt;
And I stay tuned for part III :-p&lt;/div&gt;</summary>
		<author><name>Pompei2</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Talk:The_Beginners_Guide_to_Falagard_skinning_-_Part_II&amp;diff=2519</id>
		<title>Talk:The Beginners Guide to Falagard skinning - Part II</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=Talk:The_Beginners_Guide_to_Falagard_skinning_-_Part_II&amp;diff=2519"/>
				<updated>2007-03-29T20:02:19Z</updated>
		
		<summary type="html">&lt;p&gt;Pompei2: Unified Area of the caret ?&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Unified Area of the caret ? ==&lt;br /&gt;
&lt;br /&gt;
I'm writing this just while reading (this great article :)).&lt;br /&gt;
&lt;br /&gt;
In the part about the caret, when specifying the area it should use, you say this:&lt;br /&gt;
 The third Dim on the other hand is new. It's now specified as &amp;quot;Width&amp;quot; and not &amp;quot;RightEdge&amp;quot; like we have done so far.&lt;br /&gt;
 Inside we have a ImageDim for the width of the caret image we're using. If we had used the regular UnifiedDim,&lt;br /&gt;
 the caret itself would have the width of the window and would have been very ugly...&lt;br /&gt;
This sounds strange to my intuition, as my intuition tells me that using the UnifiedDim the caret would have the width of THE AREA and not the window. Is my intuition bad, or did you make a mistake ?&lt;/div&gt;</summary>
		<author><name>Pompei2</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Talk:The_Beginners_Guide_to_Falagard_skinning_-_Part_I&amp;diff=2518</id>
		<title>Talk:The Beginners Guide to Falagard skinning - Part I</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=Talk:The_Beginners_Guide_to_Falagard_skinning_-_Part_I&amp;diff=2518"/>
				<updated>2007-03-29T19:27:12Z</updated>
		
		<summary type="html">&lt;p&gt;Pompei2: Great !&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Please add you feedback comments. What is good? What is bad? What is missing? etc.&lt;br /&gt;
&lt;br /&gt;
--[[User:lindquist|lindquist]] 11:55, 6 Dec 2005 (CET)&lt;br /&gt;
&lt;br /&gt;
== Great ! ==&lt;br /&gt;
&lt;br /&gt;
Thank you very much for this, I just read it and now that i know the very basics of skinning, I can go on :)&lt;br /&gt;
&lt;br /&gt;
Just one thing I noticed is a typo you made:&lt;br /&gt;
In the last chapter: &amp;quot;Colours&amp;quot;, the little code part that states:&lt;br /&gt;
   &amp;lt;Section name=&amp;quot;label&amp;quot;&amp;gt;&lt;br /&gt;
       &amp;lt;ColourProperty name=&amp;quot;NormalTextColour&amp;quot; /&amp;gt;&lt;br /&gt;
   &amp;lt;/Section&amp;gt;&lt;br /&gt;
Shouldn't it be like this ?&lt;br /&gt;
   &amp;lt;Section section=&amp;quot;label&amp;quot;&amp;gt;&lt;br /&gt;
       &amp;lt;ColourProperty name=&amp;quot;NormalTextColour&amp;quot; /&amp;gt;&lt;br /&gt;
   &amp;lt;/Section&amp;gt;&lt;/div&gt;</summary>
		<author><name>Pompei2</name></author>	</entry>

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

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Tutorials&amp;diff=2494</id>
		<title>Tutorials</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=Tutorials&amp;diff=2494"/>
				<updated>2007-01-11T16:18:38Z</updated>
		
		<summary type="html">&lt;p&gt;Pompei2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== CrazyEddie's Beginner Guides ===&lt;br /&gt;
* [[The Beginner Guide to Getting CEGUI Rendering]] - How to initialise CEGUI to render properly.&lt;br /&gt;
* [[The Beginner Guide to Loading Data Files and Initialisation]] - How to load some data files and perform basic system initialisation.&lt;br /&gt;
* [[The Beginner Guide to Creating a CEGUI Window]] - How to create a simple window and get it on screen.&lt;br /&gt;
* [[The Beginner Guide to Injecting Inputs]] - How to inject inputs into CEGUI and get interactive.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Scripting with CEGUI ===&lt;br /&gt;
* [[Getting Started with Lua and CEGUI]] - How to initialise CEGUI with a Lua script module and configuration file.&lt;br /&gt;
* [[Handling Events from Lua]] - How to load Lua script files and bind CEGUI events to Lua functions.&lt;br /&gt;
* [[Writing CEGUI scripts]] - Code snippets&lt;br /&gt;
* [[Adding LuaScriptModule to Sample_FirstWindow]] - Experience adding scripting to an existing sample.&lt;br /&gt;
* [http://www.gpwiki.org/index.php/Crazy_Eddies_GUI_System:Tutorials:Creating_a_scriptable_interface_using_CEGUI Creating a scriptable interface using CEGUI]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Window System Examples ===&lt;br /&gt;
* [[Using CEGUI with SDL and OpenGL]] - Guidelines on how to get SDL, OpenGL and CEGUI running together.&lt;br /&gt;
* [[Using CEGUI with Producer and OpenGL]] - Guidelines on how to render and inject input to CEGUI from the Producer API.&lt;br /&gt;
* [http://artis.imag.fr/Membres/Xavier.Decoret/resources/CEGUI/ Using CEGUI with Qt/QGLViewer]&lt;br /&gt;
* [[Using CEGUI with GLUT]] - Some tips on using OpenGL's GLUT with CEGUI.&lt;br /&gt;
&lt;br /&gt;
=== Extending CEGUI ===&lt;br /&gt;
* [[Using Expat XML parser within CEGUI]] - How to add support for another XML parser.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Skins - Tutorial For Artists ===&lt;br /&gt;
* [[Creating Skins]] - Extra notes for artists on how to create skins.&lt;br /&gt;
* [[The Beginners Guide to Falagard skinning - Part I]] - Learn by doing a Button.&lt;br /&gt;
* [[The Beginners Guide to Falagard skinning - Part II]] - More Falagard fun, this time with the Editbox.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Overviews ===&lt;br /&gt;
* [[Overview of GUI files]] - A quick introduction to all the XML files used by CEGUI.&lt;br /&gt;
* [[Overview of resource system enhancements in 0.5.0]] - Introduction to enhancements made for the 0.5.0 release.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Miscellaneous HOW-TOs ===&lt;br /&gt;
* [[Create ImageButtons]] - A few different ways to create image buttons.&lt;/div&gt;</summary>
		<author><name>Pompei2</name></author>	</entry>

	</feed>