Difference between revisions of "Sample code for all Widgets"

From CEGUI Wiki - Crazy Eddie's GUI System (Open Source)
Jump to: navigation, search
(WidgetGalore.h)
m (Spelling fix)
 
(38 intermediate revisions by 6 users not shown)
Line 1: Line 1:
This code goes through every widget and demonstrates how to retrieve and set their data as well as some of their particularities. Note that this code requires [http://www.cegui.org.uk/wiki/index.php/WindowingSystem#WindowSystem.h WindowSystem.h] and [http://www.cegui.org.uk/wiki/index.php/WindowingSystem#WindowSystem.cpp WindowSystem.cpp] from the Windowing System.
+
{{VersionBadge|0.5}} {{VersionBadge|0.6}}
  
Please post comments or questions on the message board thread for the [http://www.cegui.org.uk/phpBB2/viewtopic.php?p=7967#7967 Widget Galore]
+
This code goes through every widget and demonstrates how to retrieve and set their data as well as some of their particularities.  Please post comments or questions on the message board thread for the [http://www.cegui.org.uk/phpBB2/viewtopic.php?p=7967#7967 Widget Galore]
  
=== Widgets===
+
=== Widgets ===
  
 
==== General ====
 
==== General ====
Line 16: Line 16:
  
 
==== StaticText ====
 
==== StaticText ====
A StaticText widget displays text; it does not receive inputs from a user.
+
There is no StaticText within CEGUI but type of widget can be obtained via the DefaultWindow class.
 
+
The currently displayed text can be specified via setText().  The color of this text can be specified via setTextColours().  The horizontal and vertical alignement can be specified via setFormatting().
+
  
 +
The currently displayed text can be specified via setText().  The colour of this text can be specified via the "TextColours" property.  The value of this property contains 4 colour definitions: top left, top right, bottom left, and bottom right.  Each colour is specified as a two-digit hexadecimal value of the format AARRGGBB (alpha, red, green, blue).  The text is aligned vertically via the "VertFormatting" property with a value of TopAligned, BottomAligned, or VertCentred.  The text is aligned horizontally via the "HorzFormatting" property with a value of LeftAligned, RightAligned, HorzCentred, HorzJustified, WordWrapLeftAligned, WordWrapRightAligned, WordWrapCentred, or WordWrapJustified.
  
 
==== StaticImage ====
 
==== StaticImage ====
A StaticImage widget displays an image; it does not receive inputs from a user.
+
There is no StaticImage within CEGUI but type of widget can be obtained via the DefaultWindow class.
 
+
The currently displayed image can be specified via setImage().
+
  
 +
The currently displayed image can be specified via the "Image" property.  This property takes two parameters, the imageset ("set") and the image name ("image").
  
 
==== ProgressBar ====
 
==== ProgressBar ====
Line 44: Line 42:
  
 
==== Checkbox ====
 
==== Checkbox ====
A Checkbox widget controls a boolean value; true when checked and false when unchecked.  This value can be obtained via isSelected() and specified via setSelected(true) to check or setSelected(true) to uncheck.
+
A Checkbox widget controls a boolean value; true when checked and false when unchecked.  This value can be obtained via isSelected() and specified via setSelected(true) to check or setSelected(false) to uncheck.
 
+
  
 
==== Spinner ====
 
==== Spinner ====
Line 98: Line 95:
 
A Listbox widget controls either a single selection or multiple selections among many choices.  Multiple selections are enabled via setMultiselectEnabled().
 
A Listbox widget controls either a single selection or multiple selections among many choices.  Multiple selections are enabled via setMultiselectEnabled().
  
The choices are listbox text items (ListboxTextItem) added to the listbox via addItem().  These do not possess a selection indicator by default; one must be specified via setSelectionBrushImage().
+
The choices are listbox text items (ListboxTextItem) added to the listbox via addItem().  These do not possess a selection indicator by default; one must be specified via setSelectionBrushImage().  The call to ensureItemIsVisible() ensures that the item is visible; the listbox will automatically scroll down if necessary.  The text of the ListboxTextItem can be changed via the setText() function.  However this new text will not be displayed until you call the Listbox's handleUpdatedItemData() function.
  
 
The selected ListboxItem can be obtained via getFirstSelectedItem() and subsequent selections through getNextSelected().  A selection can be specified via setItemSelectState().
 
The selected ListboxItem can be obtained via getFirstSelectedItem() and subsequent selections through getNextSelected().  A selection can be specified via setItemSelectState().
  
 +
It is possible for a Listbox to contain list items that are not simply composed of text.  [http://www.cegui.org.uk/wiki/index.php/Create_a_CheckListboxItem CheckListboxItem] demonstrates this advanced feature.  Another approach would be to simulate the behavior of a listbox such that each row is composed of various widgets.  [[PseudoListbox]] demonstrates this.
  
 
==== Combobox ====
 
==== Combobox ====
Line 124: Line 122:
 
A TabControl widget allows multiple windows to be displayed one at a time, via tab buttons.
 
A TabControl widget allows multiple windows to be displayed one at a time, via tab buttons.
  
Two objects must be created within the Layout Editor to generate a functional tab control.  The first is a window of type "TabControl".  This will be the parent window of the tab buttons as well as the pages.  The second is a window of type "TabPane".  This window will be placed within the TabControl (via addTab(), not through the Layout Editor) and will specify the contents of a page.  Widgets are to be placed within these TabPane via the Layout Editor.  The "TabButton" windows are not to be specified via the Layout Editor since they will be automatically created when a TabPane is added to the TabControl.
+
Two objects must be created within the Layout Editor to generate a functional tab control.  The first is a window of type "TabControl".  This will be the parent window of the tab buttons as well as the pages.  The second is a window of type "DefaultWindow".  This window will be placed within the TabControl (in code via addTab(), not through the Layout Editor) and will specify the contents of a page.  Widgets are to be placed within these TabPane via the Layout Editor.  The "TabButton" windows are not to be specified via the Layout Editor since they will be automatically created when a TabPane is added to the TabControl.
  
 
In this demo the TabControl widget was placed within a FrameWindow.  This is not a requirement.  It could have just easily been placed alongside the widgets of the other window.
 
In this demo the TabControl widget was placed within a FrameWindow.  This is not a requirement.  It could have just easily been placed alongside the widgets of the other window.
 +
 +
==== Menu & Popup Menu ====
 +
 +
See [[Menu and Popup]]
  
 
=== Files ===
 
=== Files ===
  
 
==== WidgetGalore.h ====
 
==== WidgetGalore.h ====
<pre>
+
<source lang="cpp">
 
#ifndef _WidgetGalore_h_
 
#ifndef _WidgetGalore_h_
 
#define _WidgetGalore_h_
 
#define _WidgetGalore_h_
Line 137: Line 139:
 
#include "CEGuiSample.h"
 
#include "CEGuiSample.h"
 
#include "CEGUI.h"
 
#include "CEGUI.h"
#include "WindowSystem.h"
 
  
class WindowWidgets : public WindowSystem
+
class DemoSample : public CEGuiSample
 
{
 
{
 
public:
 
public:
void initWindow()
+
    bool initialiseSample()
 
{
 
{
// Initialise the window
 
 
using namespace CEGUI;
 
using namespace CEGUI;
 +
try
 +
{
 +
// Retrieve the window manager
 +
WindowManager& winMgr = WindowManager::getSingleton();
  
// Initialise the windowing system
+
// Load the TaharezLook scheme and set up the default mouse cursor and font
WindowSystem::initialise("winWidgets", // The handle of this window
+
SchemeManager::getSingleton().loadScheme("TaharezLook.scheme");
true); // Initially visible
+
System::getSingleton().setDefaultMouseCursor("TaharezLook", "MouseArrow");
subscribeToEvents();
+
if(!FontManager::getSingleton().isFontPresent("Commonwealth-10"))
WindowManager& winMgr = WindowManager::getSingleton();
+
FontManager::getSingleton().createFont("Commonwealth-10.font");
  
/* Tooltip */
+
// Set the GUI Sheet
System::getSingleton().setTooltip("TaharezLook/Tooltip"); // Set the name of the default tooltip
+
Window* sheet = winMgr.createWindow("DefaultWindow", "root_wnd");
Tooltip* tooltip = System::getSingleton().getDefaultTooltip();
+
System::getSingleton().setGUISheet(sheet);
tooltip->setHoverTime(0.5f); // Display the tooltip after the mouse has been hovering over the widget for half a second
+
tooltip->setDisplayTime(10.0f); // Display for 15 seconds then disappear
+
tooltip->setFadeTime(1.0f); // Duration of the transition between fully visible and fully invisible
+
  
/* StaticText */
+
// Load a layout
StaticText* staticText = static_cast<StaticText*>(winMgr.getWindow((utf8*) "StaticText"));
+
Window* guiLayout = winMgr.loadWindowLayout("WidgetGalore.layout");
staticText->setText("Red StaticText");
+
sheet->addChildWindow(guiLayout);
staticText->setTextColours( colour(1.0f, 0.0f, 0.0f, 1.0f) ); // Red text
+
staticText->setFormatting(StaticText::HorzCentred, StaticText::VertCentred); // Center the text
+
staticText->setTooltipText("This is a StaticText widget");
+
  
/* StaticImage */
 
ImagesetManager::getSingleton().createImagesetFromImageFile("ImageForStaticImage", "../datafiles/imagesets/GPN-2000-001437.tga");
 
StaticImage* staticImage = static_cast<StaticImage*>(winMgr.getWindow((utf8*) "StaticImage"));
 
staticImage->setImage("ImageForStaticImage", "full_image"); // "full_image" is a default name from CEGUIImageset::Imageset()
 
  
/* ProgressBar */
 
ProgressBar* progressBar = static_cast<ProgressBar*>(winMgr.getWindow((utf8*) "ProgressBar"));
 
progressBar->setProgress(0.25f); // Initial progress of 25%
 
progressBar->setStepSize(0.10f); // Calling step() will increase the progress by 10%
 
progressBar->step(); // Advance the progress by the size specified in setStepSize()
 
progressBar->adjustProgress(-0.05f); // Adjust the progress by a delta value rather than setting a new value through setProgress
 
float valueProgressBar = progressBar->getProgress(); // initial 0.25f + step 0.10f - adjustment 0.05f = 0.30f
 
  
/* Button */
+
/* Tooltip */
PushButton* btnClose = static_cast<PushButton*>(winMgr.getWindow((utf8*) "btnClose"));
+
System::getSingleton().setDefaultTooltip("TaharezLook/Tooltip"); // Set the name of the default tooltip
btnClose->setText("Exit");
+
Tooltip* tooltip = System::getSingleton().getDefaultTooltip();
 +
tooltip->setHoverTime(0.5f); // Display the tooltip after the mouse has been hovering over the widget for half a second
 +
tooltip->setDisplayTime(10.0f); // Display for 15 seconds then disappear
 +
tooltip->setFadeTime(1.0f); // Duration of the transition between fully visible and fully invisible
 +
// To set the tooltip text for a window simply call setTooltipText()  see staticText for an example
  
/* ScrollablePane */
+
/* StaticText */
ScrollablePane* scrollablePane = static_cast<ScrollablePane*>(winMgr.getWindow((utf8*) "ScrollablePane"));
+
DefaultWindow* staticText = static_cast<DefaultWindow*>(winMgr.getWindow("StaticText"));
ImagesetManager::getSingleton().createImagesetFromImageFile("ImageForScrollablePane", "../datafiles/imagesets/GPN-2000-001437.tga");
+
staticText->setText("Red Static Text");
StaticImage* staticImageInScrollablePane = static_cast<StaticImage*>(winMgr.createWindow("TaharezLook/StaticImage", "StaticImageInScrollablePane"));
+
// Colours are specified as aarrggbb in Hexadecimal
staticImageInScrollablePane->setImage("ImageForScrollablePane", "full_image"); // "full_image" is a default name from CEGUIImageset::Imageset()
+
// Where aa is alpha, rr is red, gg is green, and bb is blue
staticImageInScrollablePane->setPosition( Point(0.0f, 0.0f) ); // Start in the upper left corner
+
// tl: top left,  tr: top right,  bl: bottom left,  br: bottom right
staticImageInScrollablePane->setWidth(2.0f); // Twice the width of the parent, the ScrollablePane
+
staticText->setProperty("TextColours", "tl:FFFF0000 tr:FFFF0000 bl:FFFF0000 br:FFFF0000");
staticImageInScrollablePane->setHeight(2.0f); // Twice the height of the parent, the ScrollablePane
+
staticText->setProperty("VertFormatting", "VertCentred"); // TopAligned, BottomAligned, VertCentred
scrollablePane->addChildWindow(staticImageInScrollablePane); // Add the image to the // Twice the width of the parent, the ScrollablePane
+
staticText->setProperty("HorzFormatting", "HorzCentred"); // LeftAligned, RightAligned, HorzCentred
Editbox* editboxInScrollablePane = static_cast<Editbox*>(winMgr.createWindow("TaharezLook/Editbox", "EditboxInScrollablePane"));
+
// HorzJustified, WordWrapLeftAligned, WordWrapRightAligned, WordWrapCentred, WordWrapJustified
editboxInScrollablePane->setPosition( Point(0.0f, 2.1f) ); // Start below the image
+
staticText->setTooltipText("This is a StaticText widget");
editboxInScrollablePane->setWidth(2.0f);
+
editboxInScrollablePane->setHeight(0.3f);
+
scrollablePane->addChildWindow(editboxInScrollablePane);
+
  
/* Check box */
+
/* StaticImage */
Checkbox* checkbox = static_cast<Checkbox*>(winMgr.getWindow("Checkbox"));
+
ImagesetManager::getSingleton().createImagesetFromImageFile("ImageForStaticImage", "GPN-2000-001437.tga");
checkbox->setSelected( true );
+
DefaultWindow* staticImage = static_cast<DefaultWindow*>(winMgr.getWindow("StaticImage"));
bool valueCheckbox = checkbox->isSelected();
+
staticImage->setProperty("Image", "set:ImageForStaticImage image:full_image"); // "full_image" is a default name from CEGUIImageset::Imageset()
  
/* Spinner */
+
/* ProgressBar */
Spinner* spinner = static_cast<Spinner*>(winMgr.getWindow("Spinner"));
+
ProgressBar* progressBar = static_cast<ProgressBar*>(winMgr.getWindow("ProgressBar"));
spinner->setTextInputMode(Spinner::FloatingPoint); // FloatingPoint, Integer, Hexadecimal, Octal
+
progressBar->setProgress(0.25f); // Initial progress of 25%
spinner->setMinimumValue(-10.0f);
+
progressBar->setStepSize(0.10f); // Calling step() will increase the progress by 10%
spinner->setMaximumValue(10.0f);
+
progressBar->step(); // Advance the progress by the size specified in setStepSize()
spinner->setStepSize(0.2f);
+
progressBar->adjustProgress(-0.05f); // Adjust the progress by a delta value rather than setting a new value through setProgress
spinner->setCurrentValue(5.2f);
+
float valueProgressBar = progressBar->getProgress(); // initial 0.25f + step 0.10f - adjustment 0.05f = 0.30f
float valueSpinner = spinner->getCurrentValue();
+
  
/* Editbox */
+
/* Button */
Editbox* editbox = static_cast<Editbox*>(winMgr.getWindow("Editbox"));
+
PushButton* btnClose = static_cast<PushButton*>(winMgr.getWindow("btnClose"));
editbox->setText("Editbox values");
+
btnClose->setText("Exit");
editbox->setMaxTextLength(13); // The trailing 's' will not be displayed
+
editbox->setReadOnly(false);
+
editbox->setTextMasked(false);
+
editbox->setMaskCodePoint(0x002A); // *
+
String valueEditbox = editbox->getText();
+
  
/* Slider */
+
/* ScrollablePane */
Slider* slider = static_cast<Slider*>(winMgr.getWindow("Slider"));
+
ScrollablePane* scrollablePane = static_cast<ScrollablePane*>(winMgr.getWindow("ScrollablePane"));
slider->setMaxValue(100.0f);
+
ImagesetManager::getSingleton().createImagesetFromImageFile("ImageForScrollablePane", "GPN-2000-001437.tga");
slider->setClickStep(10.0f);
+
DefaultWindow* staticImageInScrollablePane = static_cast<DefaultWindow*>(winMgr.createWindow("TaharezLook/StaticImage", "StaticImageInScrollablePane"));
slider->setCurrentValue(20.0f);
+
staticImageInScrollablePane->setProperty("Image", "set:ImageForScrollablePane image:full_image"); // "full_image" is a default name from CEGUIImageset::Imageset()
float valueSlider = slider->getCurrentValue();
+
staticImageInScrollablePane->setPosition(UVector2(UDim(0.0f, 0.0f), UDim(0.0f, 0.0f))); // Start in the upper left corner
 +
staticImageInScrollablePane->setWidth(UDim(2.0f, 0.0f)); // Twice the width of the parent, the ScrollablePane
 +
staticImageInScrollablePane->setHeight(UDim(2.0f, 0.0f)); // Twice the height of the parent, the ScrollablePane
 +
scrollablePane->addChildWindow(staticImageInScrollablePane); // Add the image to the // Twice the width of the parent, the ScrollablePane
 +
Editbox* editboxInScrollablePane = static_cast<Editbox*>(winMgr.createWindow("TaharezLook/Editbox", "EditboxInScrollablePane"));
 +
editboxInScrollablePane->setPosition(UVector2(UDim(0.0f, 0.0f), UDim(2.1f, 0.0f))); // Start below the image
 +
editboxInScrollablePane->setWidth(UDim(2.0f, 0.0f));
 +
editboxInScrollablePane->setHeight(UDim(0.3f, 0.0f));
 +
scrollablePane->addChildWindow(editboxInScrollablePane);
  
/* Scrollbar (Horizontal) */
+
/* Check box */
Scrollbar* scrollbarHorizontal = static_cast<Scrollbar*>(winMgr.getWindow("HorizontalScrollbar"));
+
Checkbox* checkbox = static_cast<Checkbox*>(winMgr.getWindow("Checkbox"));
scrollbarHorizontal->setDocumentSize(100.0f);
+
checkbox->setSelected( true );
scrollbarHorizontal->setPageSize(10.0f);
+
bool valueCheckbox = checkbox->isSelected(); // Retrieve whether it is checked
scrollbarHorizontal->setStepSize(1.0f);
+
scrollbarHorizontal->setScrollPosition(75.0f);
+
float valueScrollbarHorizontal = scrollbarHorizontal->getScrollPosition();
+
  
/* Scrollbar (Vertical) */
+
/* Spinner */
Scrollbar* scrollbarVertical = static_cast<Scrollbar*>(winMgr.getWindow("VerticalScrollbar"));
+
Spinner* spinner = static_cast<Spinner*>(winMgr.getWindow("Spinner"));
scrollbarVertical->setDocumentSize(100.0f);
+
spinner->setTextInputMode(Spinner::FloatingPoint); // FloatingPoint, Integer, Hexadecimal, Octal
scrollbarVertical->setPageSize(10.0f);
+
spinner->setMinimumValue(-10.0f);
scrollbarVertical->setStepSize(1.0f);
+
spinner->setMaximumValue(10.0f);
scrollbarVertical->setScrollPosition(25.0f);
+
spinner->setStepSize(0.2f);
float valueScrollbarVertical = scrollbarVertical->getScrollPosition();
+
spinner->setCurrentValue(5.2f);
 +
float valueSpinner = spinner->getCurrentValue(); // Retrieve the value
  
/* MultiLineEditbox */
+
/* Editbox */
MultiLineEditbox* multiLineEditbox = static_cast<MultiLineEditbox*>(winMgr.getWindow("MultiLineEditbox"));
+
Editbox* editbox = static_cast<Editbox*>(winMgr.getWindow("Editbox"));
multiLineEditbox->setText("MultiLineEditbox value");
+
editbox->setText("Editbox values");
multiLineEditbox->setReadOnly(false);
+
editbox->setMaxTextLength(13); // The trailing 's' will not be displayed
multiLineEditbox->setWordWrapping(true);
+
editbox->setReadOnly(false);
String valueMultiLineEditbox = multiLineEditbox->getText();
+
editbox->setTextMasked(false);
 +
editbox->setMaskCodePoint(0x002A); // *
 +
String valueEditbox = editbox->getText(); // Retrieve the text
  
/* RadioButton */
+
/* Slider */
RadioButton* radioButton = static_cast<RadioButton*>(winMgr.getWindow("RadioButton_A"));
+
Slider* slider = static_cast<Slider*>(winMgr.getWindow("Slider"));
radioButton->setGroupID(1);
+
slider->setMaxValue(100.0f);
radioButton->setID(101);
+
slider->setClickStep(10.0f);
radioButton->setSelected(true);
+
slider->setCurrentValue(20.0f);
radioButton = static_cast<RadioButton*>(winMgr.getWindow("RadioButton_B"));
+
float valueSlider = slider->getCurrentValue(); // Retrieve the value
radioButton->setGroupID(1);
+
radioButton->setID(102);
+
radioButton = static_cast<RadioButton*>(winMgr.getWindow("RadioButton_C"));
+
radioButton->setGroupID(1);
+
radioButton->setID(103);
+
radioButton = static_cast<RadioButton*>(winMgr.getWindow("RadioButton_1"));
+
radioButton->setGroupID(2);
+
radioButton->setID(201);
+
radioButton->setSelected(true);
+
radioButton = static_cast<RadioButton*>(winMgr.getWindow("RadioButton_2"));
+
radioButton->setGroupID(2);
+
radioButton->setID(202);
+
radioButton = static_cast<RadioButton*>(winMgr.getWindow("RadioButton_3"));
+
radioButton->setGroupID(2);
+
radioButton->setID(203);
+
radioButton = static_cast<RadioButton*>(winMgr.getWindow("RadioButton_A"));
+
uint valueRadioButtonLetters = radioButton->getSelectedButtonInGroup()->getID();
+
radioButton = static_cast<RadioButton*>(winMgr.getWindow("RadioButton_3"));
+
uint valueRadioButtonNumbers = radioButton->getSelectedButtonInGroup()->getID();
+
radioButton->setSelected(true);
+
  
/* Listbox */
+
/* Scrollbar (Horizontal) */
Listbox* listbox = static_cast<Listbox*>(winMgr.getWindow("Listbox"));
+
Scrollbar* scrollbarHorizontal = static_cast<Scrollbar*>(winMgr.getWindow("HorizontalScrollbar"));
listbox->setMultiselectEnabled(false);
+
scrollbarHorizontal->setDocumentSize(100.0f);
ListboxTextItem* itemListbox = new ListboxTextItem("Value A", 1);
+
scrollbarHorizontal->setPageSize(10.0f);
itemListbox->setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush");
+
scrollbarHorizontal->setStepSize(1.0f);
listbox->addItem(itemListbox);
+
scrollbarHorizontal->setScrollPosition(75.0f);
itemListbox = new ListboxTextItem("Value B", 2);
+
float valueScrollbarHorizontal = scrollbarHorizontal->getScrollPosition(); // Retrieve the scroll position
itemListbox->setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush");
+
listbox->addItem(itemListbox);
+
itemListbox = new ListboxTextItem("Value C", 3);
+
itemListbox->setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush");
+
listbox->addItem(itemListbox);
+
itemListbox = new ListboxTextItem("Value D", 4);
+
itemListbox->setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush");
+
listbox->addItem(itemListbox);
+
listbox->setItemSelectState(itemListbox, true);
+
uint valueListbox = listbox->getFirstSelectedItem()->getID();
+
  
/* Combobox */
+
/* Scrollbar (Vertical) */
Combobox* combobox = static_cast<Combobox*>(winMgr.getWindow("Combobox"));
+
Scrollbar* scrollbarVertical = static_cast<Scrollbar*>(winMgr.getWindow("VerticalScrollbar"));
combobox->setReadOnly(true);
+
scrollbarVertical->setDocumentSize(100.0f);
ListboxTextItem* itemCombobox = new ListboxTextItem("Value 1", 1);
+
scrollbarVertical->setPageSize(10.0f);
itemCombobox->setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush");
+
scrollbarVertical->setStepSize(1.0f);
combobox->addItem(itemCombobox);
+
scrollbarVertical->setScrollPosition(25.0f);
itemCombobox = new ListboxTextItem("Value 2", 2);
+
float valueScrollbarVertical = scrollbarVertical->getScrollPosition(); // Retrieve the scroll position
itemCombobox->setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush");
+
combobox->addItem(itemCombobox);
+
itemCombobox->setSelected(true); // Select this item
+
combobox->setText(itemCombobox->getText()); // Copy the item's text into the Editbox
+
itemCombobox = new ListboxTextItem("Value 3", 3);
+
itemCombobox->setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush");
+
combobox->addItem(itemCombobox);
+
itemCombobox = new ListboxTextItem("Value 4", 4);
+
itemCombobox->setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush");
+
combobox->addItem(itemCombobox);
+
String valueCombobox = combobox->getText();
+
  
/* MultiColumnList */
+
/* MultiLineEditbox */
MultiColumnList* multiColumnList = static_cast<MultiColumnList*>(winMgr.getWindow("MultiColumnList"));
+
MultiLineEditbox* multiLineEditbox = static_cast<MultiLineEditbox*>(winMgr.getWindow("MultiLineEditbox"));
multiColumnList->addColumn("Col A", 0, 0.32f);
+
multiLineEditbox->setText("MultiLineEditbox value");
multiColumnList->addColumn("Col B", 1, 0.32f);
+
multiLineEditbox->setReadOnly(false);
multiColumnList->addColumn("Col C", 2, 0.32f);
+
multiLineEditbox->setWordWrapping(true);
multiColumnList->setSelectionMode(MultiColumnList::RowSingle); // MultiColumnList::RowMultiple
+
String valueMultiLineEditbox = multiLineEditbox->getText(); // Retrieve the text
ListboxTextItem* itemMultiColumnList;
+
multiColumnList->addRow();
+
itemMultiColumnList = new ListboxTextItem("A1", 101);
+
itemMultiColumnList->setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush");
+
multiColumnList->setItem(itemMultiColumnList, 0, 0); // ColumnID, RowID
+
itemMultiColumnList = new ListboxTextItem("B1", 102);
+
//itemMultiColumnList->setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush"); // This cell does not specify a selection indicator
+
multiColumnList->setItem(itemMultiColumnList, 1, 0); // ColumnID, RowID
+
itemMultiColumnList = new ListboxTextItem("C1", 103);
+
itemMultiColumnList->setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush");
+
multiColumnList->setItem(itemMultiColumnList, 2, 0); // ColumnID, RowID
+
multiColumnList->addRow();
+
itemMultiColumnList = new ListboxTextItem("A2", 201);
+
itemMultiColumnList->setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush");
+
multiColumnList->setItem(itemMultiColumnList, 0, 1); // ColumnID, RowID
+
itemMultiColumnList = new ListboxTextItem("B2", 202);
+
itemMultiColumnList->setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush");
+
multiColumnList->setItem(itemMultiColumnList, 1, 1); // ColumnID, RowID
+
itemMultiColumnList = new ListboxTextItem("C2", 203);
+
itemMultiColumnList->setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush");
+
multiColumnList->setItem(itemMultiColumnList, 2, 1); // ColumnID, RowID
+
MCLGridRef grid_ref(1, 0); // Select according to a grid reference; second row
+
multiColumnList->setItemSelectState(grid_ref, true);
+
ListboxItem* listboxItem = multiColumnList->getFirstSelectedItem();
+
uint valueColumnA = listboxItem->getID();
+
listboxItem = multiColumnList->getNextSelected(listboxItem);
+
uint valueColumnB = listboxItem->getID();
+
listboxItem = multiColumnList->getNextSelected(listboxItem);
+
uint valueColumnC = listboxItem->getID();
+
}
+
  
private:
+
/* RadioButton */
void subscribeToEvents()
+
RadioButton* radioButton = static_cast<RadioButton*>(winMgr.getWindow("RadioButton_A"));
{
+
radioButton->setGroupID(1);
// Subscribe to events
+
radioButton->setID(101);
using namespace CEGUI;
+
radioButton->setSelected(true);
 +
radioButton = static_cast<RadioButton*>(winMgr.getWindow("RadioButton_B"));
 +
radioButton->setGroupID(1);
 +
radioButton->setID(102);
 +
radioButton = static_cast<RadioButton*>(winMgr.getWindow("RadioButton_C"));
 +
radioButton->setGroupID(1);
 +
radioButton->setID(103);
 +
radioButton = static_cast<RadioButton*>(winMgr.getWindow("RadioButton_1"));
 +
radioButton->setGroupID(2);
 +
radioButton->setID(201);
 +
radioButton->setSelected(true);
 +
radioButton = static_cast<RadioButton*>(winMgr.getWindow("RadioButton_2"));
 +
radioButton->setGroupID(2);
 +
radioButton->setID(202);
 +
radioButton = static_cast<RadioButton*>(winMgr.getWindow("RadioButton_3"));
 +
radioButton->setGroupID(2);
 +
radioButton->setID(203);
 +
radioButton = static_cast<RadioButton*>(winMgr.getWindow("RadioButton_A")); // Get handle of one radio button from the group
 +
uint valueRadioButtonLetters = radioButton->getSelectedButtonInGroup()->getID(); // Get selected ID
 +
radioButton = static_cast<RadioButton*>(winMgr.getWindow("RadioButton_3")); // Can obtain the handle of any radio button in the group
 +
uint valueRadioButtonNumbers = radioButton->getSelectedButtonInGroup()->getID();
 +
radioButton->setSelected(true); // Specify which button should appear selected by default
  
// WindowSystem events
+
/* Listbox */
WindowSystem::bindEvent("Toolbar_btnWidgets", PushButton::EventClicked, WindowSystem::open); // Open this window
+
Listbox* listbox = static_cast<Listbox*>(winMgr.getWindow("Listbox"));
WindowSystem::bindEvent("btnClose", PushButton::EventClicked, WindowSystem::ok); // Close this window
+
listbox->setMultiselectEnabled(false);
WindowSystem::bindEvent("winWidgets", FrameWindow::EventCloseClicked, WindowSystem::cancel); // The 'X' button was clicked
+
ListboxTextItem* itemListbox = new ListboxTextItem("Value A", 1);
}
+
itemListbox->setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush");
};
+
listbox->addItem(itemListbox);
 +
itemListbox = new ListboxTextItem("Value B", 2);
 +
itemListbox->setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush");
 +
listbox->addItem(itemListbox);
 +
itemListbox = new ListboxTextItem("Value C", 3);
 +
itemListbox->setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush");
 +
listbox->addItem(itemListbox);
 +
itemListbox = new ListboxTextItem("Value D", 4);
 +
itemListbox->setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush");
 +
listbox->addItem(itemListbox);
 +
listbox->setItemSelectState(itemListbox, true);
 +
listbox->ensureItemIsVisible(itemListbox);
 +
uint valueListbox = listbox->getFirstSelectedItem()->getID(); // Retrieve the ID of the selected listbox item
  
//////////////////////////////////////////////
+
/* Combobox */
 +
Combobox* combobox = static_cast<Combobox*>(winMgr.getWindow("Combobox"));
 +
combobox->setReadOnly(true);
 +
ListboxTextItem* itemCombobox = new ListboxTextItem("Value 1", 1);
 +
itemCombobox->setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush");
 +
combobox->addItem(itemCombobox);
 +
itemCombobox = new ListboxTextItem("Value 2", 2);
 +
itemCombobox->setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush");
 +
combobox->addItem(itemCombobox);
 +
itemCombobox->setSelected(true); // Select this item
 +
combobox->setText(itemCombobox->getText()); // Copy the item's text into the Editbox
 +
itemCombobox = new ListboxTextItem("Value 3", 3);
 +
itemCombobox->setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush");
 +
combobox->addItem(itemCombobox);
 +
itemCombobox = new ListboxTextItem("Value 4", 4);
 +
itemCombobox->setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush");
 +
combobox->addItem(itemCombobox);
 +
String valueCombobox = combobox->getText(); // Retrieve the displayed text
 +
uint idCombobox = combobox->getSelectedItem()->getID(); // Retrieve the ID of the selected combobox item
  
class WindowTabControl : public WindowSystem
+
/* MultiColumnList */
{
+
MultiColumnList* multiColumnList = static_cast<MultiColumnList*>(winMgr.getWindow("MultiColumnList"));\
public:
+
multiColumnList->addColumn("Col A", 0, UDim(0.32f, 0));
void initWindow()
+
multiColumnList->addColumn("Col B", 1, UDim(0.32f, 0));
{
+
multiColumnList->addColumn("Col C", 2, UDim(0.32f, 0));
// Initialise the dialog
+
multiColumnList->setSelectionMode(MultiColumnList::RowSingle); // MultiColumnList::RowMultiple
using namespace CEGUI;
+
ListboxTextItem* itemMultiColumnList;
WindowManager& winMgr = WindowManager::getSingleton();
+
multiColumnList->addRow();
 +
itemMultiColumnList = new ListboxTextItem("A1", 101);
 +
itemMultiColumnList->setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush");
 +
multiColumnList->setItem(itemMultiColumnList, 0, 0); // ColumnID, RowID
 +
itemMultiColumnList = new ListboxTextItem("B1", 102);
 +
//itemMultiColumnList->setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush");
 +
// By commenting the line above a cell does not specify a selection indicator
 +
//  selecting that line will show a "gap" in the selection.
 +
multiColumnList->setItem(itemMultiColumnList, 1, 0); // ColumnID, RowID
 +
itemMultiColumnList = new ListboxTextItem("C1", 103);
 +
itemMultiColumnList->setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush");
 +
multiColumnList->setItem(itemMultiColumnList, 2, 0); // ColumnID, RowID
 +
multiColumnList->addRow();
 +
itemMultiColumnList = new ListboxTextItem("A2", 201);
 +
itemMultiColumnList->setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush");
 +
multiColumnList->setItem(itemMultiColumnList, 0, 1); // ColumnID, RowID
 +
itemMultiColumnList = new ListboxTextItem("B2", 202);
 +
itemMultiColumnList->setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush");
 +
multiColumnList->setItem(itemMultiColumnList, 1, 1); // ColumnID, RowID
 +
itemMultiColumnList = new ListboxTextItem("C2", 203);
 +
itemMultiColumnList->setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush");
 +
multiColumnList->setItem(itemMultiColumnList, 2, 1); // ColumnID, RowID
 +
MCLGridRef grid_ref(1, 0); // Select according to a grid reference; second row
 +
multiColumnList->setItemSelectState(grid_ref, true);
 +
ListboxItem* listboxItem = multiColumnList->getFirstSelectedItem();
 +
uint valueColumnA = listboxItem->getID(); // Retrieve the value of the selected item from column A
 +
listboxItem = multiColumnList->getNextSelected(listboxItem);
 +
uint valueColumnB = listboxItem->getID(); // Retrieve the value of the selected item from column B
 +
listboxItem = multiColumnList->getNextSelected(listboxItem);
 +
uint valueColumnC = listboxItem->getID(); // Retrieve the value of the selected item from column C
  
// Initialise the windowing system
+
/* TabControl */
WindowSystem::initialise("winTabControl", // The handle of this window
+
TabControl* winTabControl = static_cast<TabControl*>(winMgr.getWindow("TabControl"));
false); // Initially invisible
+
winTabControl->setTabHeight(UDim(0.15f, 0.0f)); // Make the tab buttons a little bigger
 
+
Window* tabPage = winMgr.getWindow("TabPane1");
TabControl* winTabControl = static_cast<TabControl*>(winMgr.getWindow((utf8*) "TabControl"));
+
tabPage->setText("Page 1");
winTabControl->setTabHeight(0.15f); // Make the tab buttons a little bigger
+
tabPage->setSize(UVector2(UDim(1.0f, 0.0f), UDim(1.0f, 0.0f))); // Size to 100% of its parent, the TabControl
 
+
tabPage->setPosition(UVector2(UDim(0.0f, 0.0f), UDim(0.0f, 0.0f))); // Move to the upper left corner of its parent
Window* tabPage = winMgr.getWindow((utf8*) "TabPane1");
+
winTabControl->addTab(tabPage);
tabPage->setText("Page 1");
+
tabPage = winMgr.getWindow("TabPane2");
tabPage->setSize(CEGUI::Size(1.0f, 1.0f)); // Size to 100 of its parent, the TabControl
+
tabPage->setText("Page 2");
tabPage->setPosition(CEGUI::Point(0.00f, 0.0f)); // Move to the upper left corner of its parent
+
tabPage->setSize(UVector2(UDim(1.0f, 0.0f), UDim(1.0f, 0.0f)));  
winTabControl->addTab(tabPage);
+
tabPage->setPosition(UVector2(UDim(0.0f, 0.0f), UDim(0.0f, 0.0f)));  
 
+
winTabControl->addTab(tabPage);
tabPage = winMgr.getWindow((utf8*) "TabPane2");
+
tabPage->setText("Page 2");
+
tabPage->setSize(CEGUI::Size(1.0f, 1.0f));  
+
tabPage->setPosition(CEGUI::Point(0.00f, 0.0f));
+
winTabControl->addTab(tabPage);
+
 
+
subscribeToEvents();
+
}
+
private:
+
void subscribeToEvents()
+
{
+
// Subscribe to events
+
using namespace CEGUI;
+
 
+
// WindowSystem events
+
WindowSystem::bindEvent("Toolbar_btnTabControl", PushButton::EventClicked, WindowSystem::open); // Open this window
+
WindowSystem::bindEvent("btnOk", PushButton::EventClicked, WindowSystem::ok);
+
WindowSystem::bindEvent("btnCancel", PushButton::EventClicked, WindowSystem::cancel);
+
WindowSystem::bindEvent("btnApply", PushButton::EventClicked, WindowSystem::apply);
+
WindowSystem::bindEvent("winTabControl", FrameWindow::EventCloseClicked, WindowSystem::cancel); // The 'X' button was clicked
+
 
+
// These events trigger a 'modified' event, activating the 'apply' button
+
WindowSystem::bindEvent( "EditBoxPage1", Editbox::EventTextChanged, WindowSystem::modified);
+
WindowSystem::bindEvent( "EditBoxPage2", Editbox::EventTextChanged, WindowSystem::modified);
+
}
+
 
+
};
+
 
+
//////////////////////////////////////////
+
 
+
class DemoSample : public CEGuiSample
+
{
+
public:
+
    bool initialiseSample()
+
{
+
using namespace CEGUI;
+
try
+
{
+
// Retrieve the window manager
+
WindowManager& winMgr = WindowManager::getSingleton();
+
 
+
// Load the TaharezLook scheme and set up the default mouse cursor and font
+
SchemeManager::getSingleton().loadScheme("../datafiles/schemes/TaharezLookSkin.scheme");
+
System::getSingleton().setDefaultMouseCursor("TaharezLook", "MouseArrow");
+
FontManager::getSingleton().createFont("../datafiles/fonts/Commonwealth-10.font");
+
 
+
// Set the GUI Sheet
+
Window* sheet = winMgr.createWindow("DefaultWindow", "root_wnd");
+
System::getSingleton().setGUISheet(sheet);
+
 
+
// Load a layout
+
Window* guiLayout = winMgr.loadWindowLayout("../datafiles/layouts/WidgetGalore.layout");
+
sheet->addChildWindow(guiLayout);
+
  
// Initialise the windows
 
winWidgets.initWindow();
 
winTabControl.initWindow();
 
 
}
 
}
 
catch(Exception &e)
 
catch(Exception &e)
Line 463: Line 406:
 
{
 
{
 
}
 
}
private:
 
WindowWidgets winWidgets;
 
WindowTabControl winTabControl;
 
 
};
 
};
  
 
#endif // _WidgetGalore_h_
 
#endif // _WidgetGalore_h_
</pre>
+
</source>
  
 
==== main.cpp ====
 
==== main.cpp ====
<pre>
+
<source lang="cpp">
 
#if defined( __WIN32__ ) || defined( _WIN32 )
 
#if defined( __WIN32__ ) || defined( _WIN32 )
 
#define WIN32_LEAN_AND_MEAN
 
#define WIN32_LEAN_AND_MEAN
Line 491: Line 431:
 
     return app.run();
 
     return app.run();
 
}
 
}
</pre>
+
</source>
  
  
 
==== WidgetGalore.layout ====
 
==== WidgetGalore.layout ====
<pre>
+
<source lang="xml">
 
<?xml version="1.0" encoding="UTF-8"?>
 
<?xml version="1.0" encoding="UTF-8"?>
<GUILayout>
+
 
<Window Type="DefaultWindow" Name="Root" >
+
<GUILayout >
<Property Name="Text" Value="1" />
+
    <Window Type="DefaultWindow" Name="Root" >
<Property Name="UnifiedAreaRect" Value="{{0.000000,0.000000},{0.000000,0.000000},{1.000000,0.000000},{1.000000,0.000000}}" />
+
        <Property Name="Text" >1</Property>
<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" />
+
        <Property Name="InheritsAlpha" Value="False" />
<Window Type="TaharezLook/FrameWindow" Name="winToolbar" >
+
        <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="AlwaysOnTop" Value="True" />
+
        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
<Property Name="CaptionColour" Value="00FFFFFF" />
+
        <Window Type="DefaultWindow" Name="TabPane2" >
<Property Name="CloseButtonEnabled" Value="False" />
+
            <Property Name="Font" Value="Commonwealth-10" />
<Property Name="EWSizingCursorImage" Value="set:TaharezLook image:MouseEsWeCursor" />
+
            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="MouseCursorImage" Value="set:TaharezLook image:MouseTarget" />
+
            <Property Name="UnifiedAreaRect" Value="{{0.72875,0},{0.7185,0},{0.97875,0},{0.9685,0}}" />
<Property Name="NESWSizingCursorImage" Value="set:TaharezLook image:MouseNeSwCursor" />
+
            <Window Type="TaharezLook/StaticText" Name="StaticTextPage2" >
<Property Name="NSSizingCursorImage" Value="set:TaharezLook image:MouseNoSoCursor" />
+
                <Property Name="Font" Value="Commonwealth-10" />
<Property Name="NWSESizingCursorImage" Value="set:TaharezLook image:MouseNwSeCursor" />
+
                <Property Name="Text" >In Page 2:</Property>
<Property Name="Text" Value="Toolbar" />
+
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="TitlebarEnabled" Value="False" />
+
                <Property Name="UnifiedAreaRect" Value="{{0.06,0},{0.226667,0},{0.415,0},{0.476667,0}}" />
<Property Name="TitlebarFont" Value="Commonwealth-10" />
+
            </Window>
<Property Name="UnifiedAreaRect" Value="{{0.248750,0.000000},{0.010001,0.000000},{0.568749,0.000000},{0.081667,0.000000}}" />
+
            <Window Type="TaharezLook/Editbox" Name="EditBoxPage2" >
<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" />
+
                <Property Name="Font" Value="Commonwealth-10" />
<Window Type="TaharezLook/Button" Name="Toolbar_btnWidgets" >
+
                <Property Name="MaxTextLength" Value="1073741823" />
<Property Name="MouseCursorImage" Value="set:TaharezLook image:MouseArrow" />
+
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="Text" Value="Widgets" />
+
                <Property Name="UnifiedAreaRect" Value="{{0.420001,0},{0.22,0},{0.99,0},{0.47,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.065103,0.000000},{0.227595,0.000000},{0.475554,0.000000},{0.686899,0.000000}}" />
+
            </Window>
<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" />
+
        </Window>
</Window>
+
        <Window Type="TaharezLook/FrameWindow" Name="winTabControl" >
<Window Type="TaharezLook/Button" Name="Toolbar_btnTabControl" >
+
            <Property Name="Text" >Tab Control Window</Property>
<Property Name="MouseCursorImage" Value="set:TaharezLook image:MouseArrow" />
+
            <Property Name="TitlebarFont" Value="Commonwealth-10" />
<Property Name="Text" Value="Tab Control" />
+
            <Property Name="CaptionColour" Value="00FFFFFF" />
<Property Name="UnifiedAreaRect" Value="{{0.538253,0.000000},{0.227595,0.000000},{0.948703,0.000000},{0.686899,0.000000}}" />
+
            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" />
+
            <Property Name="TitlebarEnabled" Value="True" />
</Window>
+
            <Property Name="UnifiedAreaRect" Value="{{0.695627,0},{0.2725,0},{0.993122,0},{0.704167,0}}" />
</Window>
+
            <Property Name="MouseCursorImage" Value="set:TaharezLook image:MouseTarget" />
<Window Type="TaharezLook/TabPane" Name="TabPane2" >
+
            <Window Type="TaharezLook/TabControl" Name="TabControl" >
<Property Name="BackgroundEnabled" Value="False" />
+
                <Property Name="TabHeight" Value="{0,0}" />
<Property Name="Font" Value="Commonwealth-10" />
+
                <Property Name="TabTextPadding" Value="{0,0}" />
<Property Name="FrameEnabled" Value="False" />
+
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.728750,0.000000},{0.718500,0.000000},{0.978750,0.000000},{0.968500,0.000000}}" />
+
                <Property Name="UnifiedAreaRect" Value="{{0.088566,0},{0.174378,0},{0.931404,0},{0.804637,0}}" />
<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" />
+
            </Window>
<Window Type="TaharezLook/StaticText" Name="StaticTextPage2" >
+
            <Window Type="TaharezLook/Button" Name="btnOk" >
<Property Name="BackgroundImage" Value="set:TaharezLook image:StaticBackdrop" />
+
                <Property Name="Text" >Ok</Property>
<Property Name="BottomFrameImage" Value="set:TaharezLook image:StaticBottom" />
+
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="BottomLeftFrameImage" Value="set:TaharezLook image:StaticBottomLeft" />
+
                <Property Name="UnifiedAreaRect" Value="{{0.128412,0},{0.841464,0},{0.365583,0},{0.926003,0}}" />
<Property Name="BottomRightFrameImage" Value="set:TaharezLook image:StaticBottomRight" />
+
                <Property Name="MouseCursorImage" Value="set:TaharezLook image:MouseArrow" />
<Property Name="Font" Value="Commonwealth-10" />
+
            </Window>
<Property Name="LeftFrameImage" Value="set:TaharezLook image:StaticLeft" />
+
            <Window Type="TaharezLook/Button" Name="btnCancel" >
<Property Name="RightFrameImage" Value="set:TaharezLook image:StaticRight" />
+
                <Property Name="Text" >Cancel</Property>
<Property Name="Text" Value="In Page 2:" />
+
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="TopFrameImage" Value="set:TaharezLook image:StaticTop" />
+
                <Property Name="UnifiedAreaRect" Value="{{0.400429,0},{0.841464,0},{0.637601,0},{0.926003,0}}" />
<Property Name="TopLeftFrameImage" Value="set:TaharezLook image:StaticTopLeft" />
+
                <Property Name="MouseCursorImage" Value="set:TaharezLook image:MouseArrow" />
<Property Name="TopRightFrameImage" Value="set:TaharezLook image:StaticTopRight" />
+
            </Window>
<Property Name="UnifiedAreaRect" Value="{{0.060000,0.000000},{0.226667,0.000000},{0.415000,0.000000},{0.476667,0.000000}}" />
+
            <Window Type="TaharezLook/Button" Name="btnApply" >
<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" />
+
                <Property Name="Text" >Apply</Property>
</Window>
+
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Window Type="TaharezLook/Editbox" Name="EditBoxPage2" >
+
                <Property Name="UnifiedAreaRect" Value="{{0.668224,0},{0.843977,0},{0.905394,0},{0.928516,0}}" />
<Property Name="Font" Value="Commonwealth-10" />
+
                <Property Name="MouseCursorImage" Value="set:TaharezLook image:MouseArrow" />
<Property Name="MaxTextLength" Value="1073741823" />
+
            </Window>
<Property Name="MouseCursorImage" Value="set:TaharezLook image:MouseTextBar" />
+
        </Window>
<Property Name="UnifiedAreaRect" Value="{{0.420001,0.000000},{0.220000,0.000000},{0.990000,0.000000},{0.470000,0.000000}}" />
+
        <Window Type="DefaultWindow" Name="TabPane1" >
<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" />
+
            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
</Window>
+
            <Property Name="ClippedByParent" Value="False" />
</Window>
+
            <Property Name="UnifiedAreaRect" Value="{{0.72875,0},{0.012178,0},{0.97875,0},{0.262178,0}}" />
<Window Type="TaharezLook/FrameWindow" Name="winTabControl" >
+
            <Window Type="TaharezLook/StaticText" Name="StaticTextPage1" >
<Property Name="CaptionColour" Value="00FFFFFF" />
+
                <Property Name="Text" >In Page 1:</Property>
<Property Name="EWSizingCursorImage" Value="set:TaharezLook image:MouseEsWeCursor" />
+
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="MouseCursorImage" Value="set:TaharezLook image:MouseTarget" />
+
                <Property Name="UnifiedAreaRect" Value="{{0.06,0},{0.226667,0},{0.415,0},{0.476667,0}}" />
<Property Name="NESWSizingCursorImage" Value="set:TaharezLook image:MouseNeSwCursor" />
+
            </Window>
<Property Name="NSSizingCursorImage" Value="set:TaharezLook image:MouseNoSoCursor" />
+
            <Window Type="TaharezLook/Editbox" Name="EditBoxPage1" >
<Property Name="NWSESizingCursorImage" Value="set:TaharezLook image:MouseNwSeCursor" />
+
                <Property Name="MaxTextLength" Value="1073741823" />
<Property Name="Text" Value="Tab Control Window" />
+
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="TitlebarEnabled" Value="True" />
+
                <Property Name="UnifiedAreaRect" Value="{{0.420001,0},{0.22,0},{0.99,0},{0.47,0}}" />
<Property Name="TitlebarFont" Value="Commonwealth-10" />
+
            </Window>
<Property Name="UnifiedAreaRect" Value="{{0.695627,0.000000},{0.272500,0.000000},{0.993122,0.000000},{0.704167,0.000000}}" />
+
        </Window>
<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" />
+
        <Window Type="TaharezLook/FrameWindow" Name="winWidgets" >
<Window Type="TaharezLook/TabControl" Name="TabControl" >
+
            <Property Name="Text" >Dave, it&apos;s full of widgets!</Property>
<Property Name="UnifiedAreaRect" Value="{{0.088566,0.000000},{0.174378,0.000000},{0.931404,0.000000},{0.804637,0.000000}}" />
+
            <Property Name="TitlebarFont" Value="Commonwealth-10" />
<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" />
+
            <Property Name="CaptionColour" Value="00FFFFFF" />
</Window>
+
            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Window Type="TaharezLook/Button" Name="btnOk" >
+
            <Property Name="TitlebarEnabled" Value="True" />
<Property Name="MouseCursorImage" Value="set:TaharezLook image:MouseArrow" />
+
            <Property Name="UnifiedAreaRect" Value="{{0.00375,0},{0.143333,0},{0.751248,0},{0.806665,0}}" />
<Property Name="Text" Value="Ok" />
+
            <Property Name="MouseCursorImage" Value="set:TaharezLook image:MouseTarget" />
<Property Name="UnifiedAreaRect" Value="{{0.128412,0.000000},{0.841464,0.000000},{0.365583,0.000000},{0.926003,0.000000}}" />
+
            <Window Type="TaharezLook/Button" Name="btnClose" >
<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" />
+
                <Property Name="Text" >Close</Property>
</Window>
+
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Window Type="TaharezLook/Button" Name="btnCancel" >
+
                <Property Name="UnifiedAreaRect" Value="{{0.732397,0},{0.895137,0},{0.976465,0},{0.975697,0}}" />
<Property Name="MouseCursorImage" Value="set:TaharezLook image:MouseArrow" />
+
                <Property Name="MouseCursorImage" Value="set:TaharezLook image:MouseArrow" />
<Property Name="Text" Value="Cancel" />
+
            </Window>
<Property Name="UnifiedAreaRect" Value="{{0.400429,0.000000},{0.841464,0.000000},{0.637601,0.000000},{0.926003,0.000000}}" />
+
            <Window Type="TaharezLook/Editbox" Name="Editbox" >
<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" />
+
                <Property Name="Font" Value="Commonwealth-10" />
</Window>
+
                <Property Name="MaxTextLength" Value="1073741823" />
<Window Type="TaharezLook/Button" Name="btnApply" >
+
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="MouseCursorImage" Value="set:TaharezLook image:MouseArrow" />
+
                <Property Name="UnifiedAreaRect" Value="{{0.62442,0},{0.090471,0},{0.969776,0},{0.153443,0}}" />
<Property Name="Text" Value="Apply" />
+
            </Window>
<Property Name="UnifiedAreaRect" Value="{{0.668224,0.000000},{0.843977,0.000000},{0.905394,0.000000},{0.928516,0.000000}}" />
+
            <Window Type="TaharezLook/Checkbox" Name="Checkbox" >
<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" />
+
                <Property Name="Text" >Check</Property>
</Window>
+
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
</Window>
+
                <Property Name="UnifiedAreaRect" Value="{{0.845164,0},{0.396859,0},{0.944201,0},{0.453147,0}}" />
<Window Type="TaharezLook/TabPane" Name="TabPane1" >
+
            </Window>
<Property Name="BackgroundEnabled" Value="False" />
+
            <Window Type="TaharezLook/Combobox" Name="Combobox" >
<Property Name="ClippedByParent" Value="False" />
+
                <Property Name="Text" >Combo Box</Property>
<Property Name="FrameEnabled" Value="False" />
+
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.728750,0.000000},{0.012178,0.000000},{0.978750,0.000000},{0.262178,0.000000}}" />
+
                <Property Name="UnifiedAreaRect" Value="{{0.183835,0},{0.090471,0},{0.613522,0},{0.413287,0}}" />
<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" />
+
                <Property Name="MaxEditTextLength" Value="1073741823" />
<Window Type="TaharezLook/StaticText" Name="StaticTextPage1" >
+
            </Window>
<Property Name="BackgroundImage" Value="set:TaharezLook image:StaticBackdrop" />
+
            <Window Type="TaharezLook/RadioButton" Name="RadioButton_A" >
<Property Name="BottomFrameImage" Value="set:TaharezLook image:StaticBottom" />
+
                <Property Name="Font" Value="Commonwealth-10" />
<Property Name="BottomLeftFrameImage" Value="set:TaharezLook image:StaticBottomLeft" />
+
                <Property Name="Text" >A</Property>
<Property Name="BottomRightFrameImage" Value="set:TaharezLook image:StaticBottomRight" />
+
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="LeftFrameImage" Value="set:TaharezLook image:StaticLeft" />
+
                <Property Name="UnifiedAreaRect" Value="{{0.652856,0},{0.189876,0},{0.704964,0},{0.246164,0}}" />
<Property Name="RightFrameImage" Value="set:TaharezLook image:StaticRight" />
+
            </Window>
<Property Name="Text" Value="In Page 1:" />
+
            <Window Type="TaharezLook/RadioButton" Name="RadioButton_B" >
<Property Name="TopFrameImage" Value="set:TaharezLook image:StaticTop" />
+
                <Property Name="Font" Value="Commonwealth-10" />
<Property Name="TopLeftFrameImage" Value="set:TaharezLook image:StaticTopLeft" />
+
                <Property Name="Text" >B</Property>
<Property Name="TopRightFrameImage" Value="set:TaharezLook image:StaticTopRight" />
+
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.060000,0.000000},{0.226667,0.000000},{0.415000,0.000000},{0.476667,0.000000}}" />
+
                <Property Name="UnifiedAreaRect" Value="{{0.707569,0},{0.189876,0},{0.759678,0},{0.246164,0}}" />
<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" />
+
            </Window>
</Window>
+
            <Window Type="TaharezLook/RadioButton" Name="RadioButton_C" >
<Window Type="TaharezLook/Editbox" Name="EditBoxPage1" >
+
                <Property Name="Font" Value="Commonwealth-10" />
<Property Name="MaxTextLength" Value="1073741823" />
+
                <Property Name="Text" >C</Property>
<Property Name="MouseCursorImage" Value="set:TaharezLook image:MouseTextBar" />
+
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.420001,0.000000},{0.220000,0.000000},{0.990000,0.000000},{0.470000,0.000000}}" />
+
                <Property Name="UnifiedAreaRect" Value="{{0.761542,0},{0.189876,0},{0.813651,0},{0.246164,0}}" />
<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" />
+
            </Window>
</Window>
+
            <Window Type="TaharezLook/RadioButton" Name="RadioButton_1" >
</Window>
+
                <Property Name="Font" Value="Commonwealth-10" />
<Window Type="TaharezLook/FrameWindow" Name="winWidgets" >
+
                <Property Name="Text" >1</Property>
<Property Name="CaptionColour" Value="00FFFFFF" />
+
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="EWSizingCursorImage" Value="set:TaharezLook image:MouseEsWeCursor" />
+
                <Property Name="UnifiedAreaRect" Value="{{0.845164,0},{0.189876,0},{0.897272,0},{0.246164,0}}" />
<Property Name="MouseCursorImage" Value="set:TaharezLook image:MouseTarget" />
+
            </Window>
<Property Name="NESWSizingCursorImage" Value="set:TaharezLook image:MouseNeSwCursor" />
+
            <Window Type="TaharezLook/RadioButton" Name="RadioButton_2" >
<Property Name="NSSizingCursorImage" Value="set:TaharezLook image:MouseNoSoCursor" />
+
                <Property Name="Font" Value="Commonwealth-10" />
<Property Name="NWSESizingCursorImage" Value="set:TaharezLook image:MouseNwSeCursor" />
+
                <Property Name="Text" >2</Property>
<Property Name="Text" Value="Dave, it's full of widgets!" />
+
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="TitlebarEnabled" Value="True" />
+
                <Property Name="UnifiedAreaRect" Value="{{0.845164,0},{0.245152,0},{0.897272,0},{0.30144,0}}" />
<Property Name="TitlebarFont" Value="Commonwealth-10" />
+
            </Window>
<Property Name="UnifiedAreaRect" Value="{{0.003750,0.000000},{0.143333,0.000000},{0.751248,0.000000},{0.806665,0.000000}}" />
+
            <Window Type="TaharezLook/RadioButton" Name="RadioButton_3" >
<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" />
+
                <Property Name="Font" Value="Commonwealth-10" />
<Window Type="TaharezLook/Button" Name="btnClose" >
+
                <Property Name="Text" >3</Property>
<Property Name="MouseCursorImage" Value="set:TaharezLook image:MouseArrow" />
+
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="Text" Value="Close" />
+
                <Property Name="UnifiedAreaRect" Value="{{0.845164,0},{0.300429,0},{0.897272,0},{0.356717,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.732397,0.000000},{0.895137,0.000000},{0.976465,0.000000},{0.975697,0.000000}}" />
+
            </Window>
<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" />
+
            <Window Type="TaharezLook/HorizontalScrollbar" Name="HorizontalScrollbar" >
</Window>
+
                <Property Name="PageSize" Value="0" />
<Window Type="TaharezLook/Editbox" Name="Editbox" >
+
                <Property Name="StepSize" Value="1" />
<Property Name="Font" Value="Commonwealth-10" />
+
                <Property Name="OverlapSize" Value="0" />
<Property Name="MaxTextLength" Value="1073741823" />
+
                <Property Name="DocumentSize" Value="1" />
<Property Name="MouseCursorImage" Value="set:TaharezLook image:MouseTextBar" />
+
                <Property Name="ScrollPosition" Value="0" />
<Property Name="UnifiedAreaRect" Value="{{0.624420,0.000000},{0.090471,0.000000},{0.969776,0.000000},{0.153443,0.000000}}" />
+
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" />
+
                <Property Name="UnifiedAreaRect" Value="{{0.183835,0},{0.185427,0},{0.613522,0},{0.26206,0}}" />
</Window>
+
            </Window>
<Window Type="TaharezLook/Checkbox" Name="Checkbox" >
+
            <Window Type="TaharezLook/VerticalScrollbar" Name="VerticalScrollbar" >
<Property Name="Text" Value="Check" />
+
                <Property Name="PageSize" Value="0" />
<Property Name="UnifiedAreaRect" Value="{{0.845164,0.000000},{0.396859,0.000000},{0.944201,0.000000},{0.453147,0.000000}}" />
+
                <Property Name="StepSize" Value="1" />
<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" />
+
                <Property Name="OverlapSize" Value="0" />
</Window>
+
                <Property Name="DocumentSize" Value="1" />
<Window Type="TaharezLook/Combobox" Name="Combobox" >
+
                <Property Name="ScrollPosition" Value="0" />
<Property Name="ActiveEditSelectionColour" Value="FF6060FF" />
+
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="InactiveEditSelectionColour" Value="FF808080" />
+
                <Property Name="UnifiedAreaRect" Value="{{0.026087,0},{0.090471,0},{0.082106,0},{0.606802,0}}" />
<Property Name="MaxEditTextLength" Value="1073741823" />
+
            </Window>
<Property Name="NormalEditTextColour" Value="FFFFFFFF" />
+
            <Window Type="TaharezLook/Listbox" Name="Listbox" >
<Property Name="SelectedEditTextColour" Value="FF000000" />
+
                <Property Name="Text" >List Box</Property>
<Property Name="Text" Value="Combo Box" />
+
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.183835,0.000000},{0.090471,0.000000},{0.613522,0.000000},{0.413287,0.000000}}" />
+
                <Property Name="UnifiedAreaRect" Value="{{0.183835,0},{0.626634,0},{0.427903,0},{0.876634,0}}" />
<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" />
+
                <Property Name="MouseCursorImage" Value="set:TaharezLook image:MouseTarget" />
</Window>
+
            </Window>
<Window Type="TaharezLook/RadioButton" Name="RadioButton_A" >
+
            <Window Type="TaharezLook/MultiColumnList" Name="MultiColumnList" >
<Property Name="Font" Value="Commonwealth-10" />
+
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="Text" Value="A" />
+
                <Property Name="UnifiedAreaRect" Value="{{0.183835,0},{0.271357,0},{0.816779,0},{0.551507,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.652856,0.000000},{0.189876,0.000000},{0.704964,0.000000},{0.246164,0.000000}}" />
+
                <Property Name="MouseCursorImage" Value="set:TaharezLook image:MouseTarget" />
<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" />
+
            </Window>
</Window>
+
            <Window Type="TaharezLook/MultiLineEditbox" Name="MultiLineEditbox" >
<Window Type="TaharezLook/RadioButton" Name="RadioButton_B" >
+
                <Property Name="Text" >           
<Property Name="Font" Value="Commonwealth-10" />
+
</Property>
<Property Name="Text" Value="B" />
+
                <Property Name="MaxTextLength" Value="1073741823" />
<Property Name="UnifiedAreaRect" Value="{{0.707569,0.000000},{0.189876,0.000000},{0.759678,0.000000},{0.246164,0.000000}}" />
+
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" />
+
                <Property Name="UnifiedAreaRect" Value="{{0.462498,0},{0.626634,0},{0.706566,0},{0.876634,0}}" />
</Window>
+
            </Window>
<Window Type="TaharezLook/RadioButton" Name="RadioButton_C" >
+
            <Window Type="TaharezLook/ProgressBar" Name="ProgressBar" >
<Property Name="Font" Value="Commonwealth-10" />
+
                <Property Name="StepSize" Value="0.01" />
<Property Name="Text" Value="C" />
+
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.761542,0.000000},{0.189876,0.000000},{0.813651,0.000000},{0.246164,0.000000}}" />
+
                <Property Name="CurrentProgress" Value="0" />
<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" />
+
                <Property Name="UnifiedAreaRect" Value="{{0.183835,0},{0.559296,0},{0.816779,0},{0.608291,0}}" />
</Window>
+
            </Window>
<Window Type="TaharezLook/RadioButton" Name="RadioButton_1" >
+
            <Window Type="TaharezLook/Slider" Name="Slider" >
<Property Name="Font" Value="Commonwealth-10" />
+
                <Property Name="CurrentValue" Value="0" />
<Property Name="Text" Value="1" />
+
                <Property Name="MaximumValue" Value="1" />
<Property Name="UnifiedAreaRect" Value="{{0.845164,0.000000},{0.189876,0.000000},{0.897272,0.000000},{0.246164,0.000000}}" />
+
                <Property Name="ClickStepSize" Value="0.01" />
<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" />
+
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
</Window>
+
                <Property Name="UnifiedAreaRect" Value="{{0.099415,0},{0.090471,0},{0.155434,0},{0.606802,0}}" />
<Window Type="TaharezLook/RadioButton" Name="RadioButton_2" >
+
            </Window>
<Property Name="Font" Value="Commonwealth-10" />
+
            <Window Type="TaharezLook/Spinner" Name="Spinner" >
<Property Name="Text" Value="2" />
+
                <Property Name="StepSize" Value="1" />
<Property Name="UnifiedAreaRect" Value="{{0.845164,0.000000},{0.245152,0.000000},{0.897272,0.000000},{0.301440,0.000000}}" />
+
                <Property Name="CurrentValue" Value="0" />
<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" />
+
                <Property Name="MaximumValue" Value="32767" />
</Window>
+
                <Property Name="MinimumValue" Value="-32768" />
<Window Type="TaharezLook/RadioButton" Name="RadioButton_3" >
+
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="Font" Value="Commonwealth-10" />
+
                <Property Name="UnifiedAreaRect" Value="{{0.845164,0},{0.48995,0},{0.944201,0},{0.551507,0}}" />
<Property Name="Text" Value="3" />
+
            </Window>
<Property Name="UnifiedAreaRect" Value="{{0.845164,0.000000},{0.300429,0.000000},{0.897272,0.000000},{0.356717,0.000000}}" />
+
            <Window Type="TaharezLook/StaticImage" Name="StaticImage" >
<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" />
+
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
</Window>
+
                <Property Name="UnifiedAreaRect" Value="{{0.732397,0},{0.626634,0},{0.976465,0},{0.876634,0}}" />
<Window Type="TaharezLook/HorizontalScrollbar" Name="HorizontalScrollbar" >
+
            </Window>
<Property Name="UnifiedAreaRect" Value="{{0.183835,0.000000},{0.185427,0.000000},{0.613522,0.000000},{0.262060,0.000000}}" />
+
            <Window Type="TaharezLook/StaticText" Name="StaticText" >
<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" />
+
                <Property Name="Text" >Static Text</Property>
</Window>
+
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Window Type="TaharezLook/VerticalScrollbar" Name="VerticalScrollbar" >
+
                <Property Name="UnifiedAreaRect" Value="{{0.462498,0},{0.895137,0},{0.706566,0},{0.975697,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.026087,0.000000},{0.090471,0.000000},{0.082106,0.000000},{0.606802,0.000000}}" />
+
            </Window>
<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" />
+
            <Window Type="TaharezLook/ScrollablePane" Name="ScrollablePane" >
</Window>
+
                <Property Name="ContentArea" Value="l:0 t:0 r:0 b:0" />
<Window Type="TaharezLook/Listbox" Name="Listbox" >
+
                <Property Name="HorzStepSize" Value="0.1" />
<Property Name="MouseCursorImage" Value="set:TaharezLook image:MouseTarget" />
+
                <Property Name="VertStepSize" Value="0.1" />
<Property Name="Text" Value="List Box" />
+
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.183835,0.000000},{0.626634,0.000000},{0.427903,0.000000},{0.876634,0.000000}}" />
+
                <Property Name="HorzOverlapSize" Value="0.01" />
<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" />
+
                <Property Name="UnifiedAreaRect" Value="{{0.019063,0},{0.629399,0},{0.157023,0},{0.879399,0}}" />
</Window>
+
                <Property Name="VertOverlapSize" Value="0.01" />
<Window Type="TaharezLook/MultiColumnList" Name="MultiColumnList" >
+
                <Property Name="HorzScrollPosition" Value="0" />
<Property Name="MouseCursorImage" Value="set:TaharezLook image:MouseTarget" />
+
                <Property Name="VertScrollPosition" Value="0" />
<Property Name="UnifiedAreaRect" Value="{{0.183835,0.000000},{0.271357,0.000000},{0.816779,0.000000},{0.551507,0.000000}}" />
+
            </Window>
<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" />
+
        </Window>
</Window>
+
    </Window>
<Window Type="TaharezLook/MultiLineEditbox" Name="MultiLineEditbox" >
+
<Property Name="MaxTextLength" Value="1073741823" />
+
<Property Name="MouseCursorImage" Value="set:TaharezLook image:MouseTextBar" />
+
<Property Name="Text" Value="        
+
" />
+
<Property Name="UnifiedAreaRect" Value="{{0.462498,0.000000},{0.626634,0.000000},{0.706566,0.000000},{0.876634,0.000000}}" />
+
<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" />
+
</Window>
+
<Window Type="TaharezLook/ProgressBar" Name="ProgressBar" >
+
<Property Name="UnifiedAreaRect" Value="{{0.183835,0.000000},{0.559296,0.000000},{0.816779,0.000000},{0.608291,0.000000}}" />
+
<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" />
+
</Window>
+
<Window Type="TaharezLook/Slider" Name="Slider" >
+
<Property Name="UnifiedAreaRect" Value="{{0.099415,0.000000},{0.090471,0.000000},{0.155434,0.000000},{0.606802,0.000000}}" />
+
<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" />
+
</Window>
+
<Window Type="TaharezLook/Spinner" Name="Spinner" >
+
<Property Name="UnifiedAreaRect" Value="{{0.845164,0.000000},{0.489950,0.000000},{0.944201,0.000000},{0.551507,0.000000}}" />
+
<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" />
+
</Window>
+
<Window Type="TaharezLook/StaticImage" Name="StaticImage" >
+
<Property Name="BackgroundImage" Value="set:TaharezLook image:StaticBackdrop" />
+
<Property Name="BottomFrameImage" Value="set:TaharezLook image:StaticBottom" />
+
<Property Name="BottomLeftFrameImage" Value="set:TaharezLook image:StaticBottomLeft" />
+
<Property Name="BottomRightFrameImage" Value="set:TaharezLook image:StaticBottomRight" />
+
<Property Name="LeftFrameImage" Value="set:TaharezLook image:StaticLeft" />
+
<Property Name="RightFrameImage" Value="set:TaharezLook image:StaticRight" />
+
<Property Name="TopFrameImage" Value="set:TaharezLook image:StaticTop" />
+
<Property Name="TopLeftFrameImage" Value="set:TaharezLook image:StaticTopLeft" />
+
<Property Name="TopRightFrameImage" Value="set:TaharezLook image:StaticTopRight" />
+
<Property Name="UnifiedAreaRect" Value="{{0.732397,0.000000},{0.626634,0.000000},{0.976465,0.000000},{0.876634,0.000000}}" />
+
<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" />
+
</Window>
+
<Window Type="TaharezLook/StaticText" Name="StaticText" >
+
<Property Name="BackgroundImage" Value="set:TaharezLook image:StaticBackdrop" />
+
<Property Name="BottomFrameImage" Value="set:TaharezLook image:StaticBottom" />
+
<Property Name="BottomLeftFrameImage" Value="set:TaharezLook image:StaticBottomLeft" />
+
<Property Name="BottomRightFrameImage" Value="set:TaharezLook image:StaticBottomRight" />
+
<Property Name="LeftFrameImage" Value="set:TaharezLook image:StaticLeft" />
+
<Property Name="RightFrameImage" Value="set:TaharezLook image:StaticRight" />
+
<Property Name="Text" Value="Static Text" />
+
<Property Name="TopFrameImage" Value="set:TaharezLook image:StaticTop" />
+
<Property Name="TopLeftFrameImage" Value="set:TaharezLook image:StaticTopLeft" />
+
<Property Name="TopRightFrameImage" Value="set:TaharezLook image:StaticTopRight" />
+
<Property Name="UnifiedAreaRect" Value="{{0.462498,0.000000},{0.895137,0.000000},{0.706566,0.000000},{0.975697,0.000000}}" />
+
<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" />
+
</Window>
+
<Window Type="TaharezLook/ScrollablePane" Name="ScrollablePane" >
+
<Property Name="UnifiedAreaRect" Value="{{0.019063,0.000000},{0.629399,0.000000},{0.157023,0.000000},{0.879399,0.000000}}" />
+
<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" />
+
</Window>
+
</Window>
+
</Window>
+
 
</GUILayout>
 
</GUILayout>
</pre>
+
</source>
 +
 
 +
[[Category:Manuals]]
 +
[[Category:Update requested]]

Latest revision as of 23:57, 3 March 2011

Written for CEGUI 0.5


Works with versions 0.5.x (obsolete)

Written for CEGUI 0.6


Works with versions 0.6.x (obsolete)

This code goes through every widget and demonstrates how to retrieve and set their data as well as some of their particularities. Please post comments or questions on the message board thread for the Widget Galore

Widgets

General

A widget can be enabled/disabled via setEnabled(). Disabling a widget prevents the user from activating it and manipulating its contents. A widget can be hidden/shown via setVisible().


Tooltip

A Tooltip widget displays text when the mouse has been hovering over a widget for a certain amount of time. This widget requires that time be injected within CEGUI via injectTimePulse().

The graphical aspect (the scheme) of the tooltip can be specified via setTooltip(). The amount of hovering time required to activate the tooltip can be specified via setHoverTime(). The amount of time the tooltip is displayed can be specified via setDisplayTime(). And the fade transition time can be specified via setFadeTime(); this affects both the fade in and the fade out times. The tooltip text of a widget can be specified via setTooltipText(). Please note that some complex widgets are composed of several widgets. In order to have a tooltip text displayed while hovering over any region of the complex widget then every component widget needs to have a tooltip text specified. For example a Spinner widget is composed of an Editbox widget and two Button widgets.


StaticText

There is no StaticText within CEGUI but type of widget can be obtained via the DefaultWindow class.

The currently displayed text can be specified via setText(). The colour of this text can be specified via the "TextColours" property. The value of this property contains 4 colour definitions: top left, top right, bottom left, and bottom right. Each colour is specified as a two-digit hexadecimal value of the format AARRGGBB (alpha, red, green, blue). The text is aligned vertically via the "VertFormatting" property with a value of TopAligned, BottomAligned, or VertCentred. The text is aligned horizontally via the "HorzFormatting" property with a value of LeftAligned, RightAligned, HorzCentred, HorzJustified, WordWrapLeftAligned, WordWrapRightAligned, WordWrapCentred, or WordWrapJustified.

StaticImage

There is no StaticImage within CEGUI but type of widget can be obtained via the DefaultWindow class.

The currently displayed image can be specified via the "Image" property. This property takes two parameters, the imageset ("set") and the image name ("image").

ProgressBar

A ProgressBar widget displays a progression; it does not receive inputs from a user.

The current progress can be specified via setProgress(). Progress can be advanced through steps. The step size can be specified via setStepSize() and a step performed via step(). Progress can be adjusted by a delta value via adjustProgress(). The current progress value can be obtained via getProgress().


Button

A Button widget displays a text and receives an activation instruction from the user.

The text can be specified via setText().


ScrollablePane

A ScrollablePane widget displays contents that can be scrolled. Contents can be added via addChildWindow(). When that content exceeds the dimensions of the ScrollablePane then scrollbars appear to allow the use to view and interact with that hidden content.


Checkbox

A Checkbox widget controls a boolean value; true when checked and false when unchecked. This value can be obtained via isSelected() and specified via setSelected(true) to check or setSelected(false) to uncheck.

Spinner

A Spinner widget controls a numerical values (float) through an editbox or the use of the increment or decrement buttons.

This value is bounded within a minimum and a maximum by calling setMinimumValue() and setMaximumValue(). The arrow buttons increment or decrement the value by the amount specified with setStepSize(). The numerical value can be displayed in four formats: FloatingPoint, Integer, Hexadecimal, Octal.

The current value is obtained via getCurrentValue() and specified via setCurrentValue().


Editbox

An Editbox widget controls printable character values; letters, numbers, punctuations, and symbols.

The maximal number of characters that can be specified is bound by setMaxTextLength(). The value can be set to readable only (modifications by users are not allowed) via setReadOnly(true). The value can be masked via setTextMasked() and the default value of * can be modified via setMaskCodePoint().

The current value can be obtained via getText() and specified via setText().


Slider

A Slider widget controls a numerical value (float) through the position of a "thumb".

This value is bounded within a maximum by setMaxValue(); the minimum value is set to 0.0f. The thumb can be dragged to the desired position or moved by clicking on either side of the thumb. The increment or decrement value is set by setClickStep().

The current value can be obtained via getCurrentValue() and specified via setCurrentValue().


Scrollbar

A Scrollbar widget controls a numerical value (float) through the position of a "thumb".

This value is bounded within a maximum by setDocumentSize(); the minimum value is set to 0.0f. The thumb can be dragged to the desired position or moved by clicking on either side of the thumb. The increment or decrement value is set by setPageSize(). The arrow buttons increment or decrement the value by the amount specified with setStepSize().

The current value can be obtained via getScrollPosition() and specified via setScrollPosition(). Note that the actual maximum value that the scrollbar will return is set by the following formula: document_size - page_size. Thus, a document of size 100 and a page size of 10 will have a value from 0 to 90.


MultiLineEditbox

A MultiLineEditbox widget controls printable character values; letters, numbers, punctuations, and symbols.

Unlike the Editbox widget there is no maximal number of characters that can be specified. The value can be set to readable only (modifications by users are not allowed) via setReadOnly(true). Text can be automatically wrapped via a call to setWordWrapping(true).

The current value can be obtained via getText() and specified via setText().


RadioButton

A RadioButton widget controls a single selection among many choices.

The choices are grouped by calling setGroupID(). Only one RadioButton per group ID can be selected; this widget does not support multiple selection. However it is possible for a choice to possess no decision; initially every RadioButton of a group is unselected.

The currently selected RadioButton can be obtained via getSelectedButtonInGroup(). This RadioButton pointer can then be used to query the ID via getID(), the text (visible label of the RadioButton) via getText(), or user data via getUserData(). A RadioButton can be selected via setSelected(true). Passing false will deselect the RadioButton, potentially making every RadioButton of the group unselected.


Listbox

A Listbox widget controls either a single selection or multiple selections among many choices. Multiple selections are enabled via setMultiselectEnabled().

The choices are listbox text items (ListboxTextItem) added to the listbox via addItem(). These do not possess a selection indicator by default; one must be specified via setSelectionBrushImage(). The call to ensureItemIsVisible() ensures that the item is visible; the listbox will automatically scroll down if necessary. The text of the ListboxTextItem can be changed via the setText() function. However this new text will not be displayed until you call the Listbox's handleUpdatedItemData() function.

The selected ListboxItem can be obtained via getFirstSelectedItem() and subsequent selections through getNextSelected(). A selection can be specified via setItemSelectState().

It is possible for a Listbox to contain list items that are not simply composed of text. CheckListboxItem demonstrates this advanced feature. Another approach would be to simulate the behavior of a listbox such that each row is composed of various widgets. PseudoListbox demonstrates this.

Combobox

A Combobox widget controls a single selection among many choices.

The choices are listbox text items (ListboxTextItem) added to the combobox via addItem(). These do not possess a selection indicator by default; one must be specified via setSelectionBrushImage().

The value of the text within the Editbox can be obtained via getText() and the last selected ListboxItem can be obtained via getSelectedItem(). However there is no guarantee that both are synchronized; typing text within the Editbox will not automatically select the corresponding ListboxItem. Fortunately the reverse is not true; selecting a ListboxItem will place that text within the Editbox. Placing the Editbox in read-only mode with setReadOnly(true) can avoid problems. The current value can be specified via listboxTextItem->setSelected(true) and a setText(itemCombobox->getText()).


MultiColumnList

A MultiColumnList widget controls controls either a single selection or multiple selections among many choices. Multiple selections are enabled via setSelectionMode(MultiColumnList::RowMultiple).

A MultiColumnList widget may contain a single column or multiple columns. Columns are added via addColumn(), specifying a label, a column ID, and a column width.

Three steps are required to add a row. The first step is to add a new row with addRow(). The second step is to create a ListboxTextItem for each cell of the row and specify the selection indicator via setSelectionBrushImage(). The third step is to add the newly created ListboxTextItem to the MultiColumnList via setItem(), specifying the ListboxTextItem, the column ID, and the row ID.

The selected row can be obtained via getFirstSelectedItem() and subsequent selections through getNextSelected(). This will iterate through every selected cell, returning each selected ListboxTextItem . A selection can be specified via setItemSelectState(); by setting the selection mode to rows (either RowSingle or RowMultiple) you actually only need to select the ListboxTextItem of the first column.


TabControl

A TabControl widget allows multiple windows to be displayed one at a time, via tab buttons.

Two objects must be created within the Layout Editor to generate a functional tab control. The first is a window of type "TabControl". This will be the parent window of the tab buttons as well as the pages. The second is a window of type "DefaultWindow". This window will be placed within the TabControl (in code via addTab(), not through the Layout Editor) and will specify the contents of a page. Widgets are to be placed within these TabPane via the Layout Editor. The "TabButton" windows are not to be specified via the Layout Editor since they will be automatically created when a TabPane is added to the TabControl.

In this demo the TabControl widget was placed within a FrameWindow. This is not a requirement. It could have just easily been placed alongside the widgets of the other window.

Menu & Popup Menu

See Menu and Popup

Files

WidgetGalore.h

#ifndef _WidgetGalore_h_
#define _WidgetGalore_h_
 
#include "CEGuiSample.h"
#include "CEGUI.h"
 
class DemoSample : public CEGuiSample
{
public:
    bool initialiseSample()
	{
		using namespace CEGUI;
		try
		{
			// Retrieve the window manager
			WindowManager& winMgr = WindowManager::getSingleton();
 
			// Load the TaharezLook scheme and set up the default mouse cursor and font
			SchemeManager::getSingleton().loadScheme("TaharezLook.scheme");
			System::getSingleton().setDefaultMouseCursor("TaharezLook", "MouseArrow");
			if(!FontManager::getSingleton().isFontPresent("Commonwealth-10"))
				FontManager::getSingleton().createFont("Commonwealth-10.font");
 
			// Set the GUI Sheet
			Window* sheet = winMgr.createWindow("DefaultWindow", "root_wnd");
			System::getSingleton().setGUISheet(sheet);
 
			// Load a layout
			Window* guiLayout = winMgr.loadWindowLayout("WidgetGalore.layout");
			sheet->addChildWindow(guiLayout);
 
 
 
			/* Tooltip */
			System::getSingleton().setDefaultTooltip("TaharezLook/Tooltip"); // Set the name of the default tooltip
			Tooltip* tooltip = System::getSingleton().getDefaultTooltip();
			tooltip->setHoverTime(0.5f); // Display the tooltip after the mouse has been hovering over the widget for half a second
			tooltip->setDisplayTime(10.0f); // Display for 15 seconds then disappear
			tooltip->setFadeTime(1.0f); // Duration of the transition between fully visible and fully invisible
			// To set the tooltip text for a window simply call setTooltipText()   see staticText for an example
 
			/* StaticText */
			DefaultWindow* staticText = static_cast<DefaultWindow*>(winMgr.getWindow("StaticText"));
			staticText->setText("Red Static Text");
			// Colours are specified as aarrggbb in Hexadecimal
			// Where aa is alpha, rr is red, gg is green, and bb is blue 
			// tl: top left,  tr: top right,  bl: bottom left,  br: bottom right
			staticText->setProperty("TextColours", "tl:FFFF0000 tr:FFFF0000 bl:FFFF0000 br:FFFF0000");
			staticText->setProperty("VertFormatting", "VertCentred"); // TopAligned, BottomAligned, VertCentred
			staticText->setProperty("HorzFormatting", "HorzCentred"); // LeftAligned, RightAligned, HorzCentred
				// HorzJustified, WordWrapLeftAligned, WordWrapRightAligned, WordWrapCentred, WordWrapJustified
			staticText->setTooltipText("This is a StaticText widget");
 
			/* StaticImage */
			ImagesetManager::getSingleton().createImagesetFromImageFile("ImageForStaticImage", "GPN-2000-001437.tga");
			DefaultWindow* staticImage = static_cast<DefaultWindow*>(winMgr.getWindow("StaticImage"));
			staticImage->setProperty("Image", "set:ImageForStaticImage image:full_image"); // "full_image" is a default name from CEGUIImageset::Imageset()
 
			/* ProgressBar */
			ProgressBar* progressBar = static_cast<ProgressBar*>(winMgr.getWindow("ProgressBar"));
			progressBar->setProgress(0.25f); // Initial progress of 25%
			progressBar->setStepSize(0.10f); // Calling step() will increase the progress by 10%
			progressBar->step(); // Advance the progress by the size specified in setStepSize()
			progressBar->adjustProgress(-0.05f); // Adjust the progress by a delta value rather than setting a new value through setProgress
			float valueProgressBar = progressBar->getProgress(); // initial 0.25f + step 0.10f - adjustment 0.05f = 0.30f
 
			/* Button */
			PushButton* btnClose = static_cast<PushButton*>(winMgr.getWindow("btnClose"));
			btnClose->setText("Exit");
 
			/* ScrollablePane */
			ScrollablePane* scrollablePane = static_cast<ScrollablePane*>(winMgr.getWindow("ScrollablePane"));
			ImagesetManager::getSingleton().createImagesetFromImageFile("ImageForScrollablePane", "GPN-2000-001437.tga");
			DefaultWindow* staticImageInScrollablePane = static_cast<DefaultWindow*>(winMgr.createWindow("TaharezLook/StaticImage", "StaticImageInScrollablePane"));
				staticImageInScrollablePane->setProperty("Image", "set:ImageForScrollablePane image:full_image"); // "full_image" is a default name from CEGUIImageset::Imageset()
				staticImageInScrollablePane->setPosition(UVector2(UDim(0.0f, 0.0f), UDim(0.0f, 0.0f))); // Start in the upper left corner
				staticImageInScrollablePane->setWidth(UDim(2.0f, 0.0f)); // Twice the width of the parent, the ScrollablePane
				staticImageInScrollablePane->setHeight(UDim(2.0f, 0.0f)); // Twice the height of the parent, the ScrollablePane
				scrollablePane->addChildWindow(staticImageInScrollablePane); // Add the image to the // Twice the width of the parent, the ScrollablePane
			Editbox* editboxInScrollablePane = static_cast<Editbox*>(winMgr.createWindow("TaharezLook/Editbox", "EditboxInScrollablePane"));
				editboxInScrollablePane->setPosition(UVector2(UDim(0.0f, 0.0f), UDim(2.1f, 0.0f))); // Start below the image
				editboxInScrollablePane->setWidth(UDim(2.0f, 0.0f)); 
				editboxInScrollablePane->setHeight(UDim(0.3f, 0.0f));
				scrollablePane->addChildWindow(editboxInScrollablePane);
 
			/* Check box */
			Checkbox* checkbox = static_cast<Checkbox*>(winMgr.getWindow("Checkbox"));
			checkbox->setSelected( true );
			bool valueCheckbox = checkbox->isSelected(); // Retrieve whether it is checked
 
			/* Spinner */
			Spinner* spinner = static_cast<Spinner*>(winMgr.getWindow("Spinner"));
			spinner->setTextInputMode(Spinner::FloatingPoint); // FloatingPoint, Integer, Hexadecimal, Octal
			spinner->setMinimumValue(-10.0f);
			spinner->setMaximumValue(10.0f);
			spinner->setStepSize(0.2f);
			spinner->setCurrentValue(5.2f);
			float valueSpinner = spinner->getCurrentValue(); // Retrieve the value
 
			/* Editbox */
			Editbox* editbox = static_cast<Editbox*>(winMgr.getWindow("Editbox"));
			editbox->setText("Editbox values");
			editbox->setMaxTextLength(13); // The trailing 's' will not be displayed
			editbox->setReadOnly(false);
			editbox->setTextMasked(false);
			editbox->setMaskCodePoint(0x002A); // *
			String valueEditbox = editbox->getText(); // Retrieve the text
 
			/* Slider */
			Slider* slider = static_cast<Slider*>(winMgr.getWindow("Slider"));
			slider->setMaxValue(100.0f);
			slider->setClickStep(10.0f);
			slider->setCurrentValue(20.0f);
			float valueSlider = slider->getCurrentValue(); // Retrieve the value
 
			/* Scrollbar (Horizontal) */
			Scrollbar* scrollbarHorizontal = static_cast<Scrollbar*>(winMgr.getWindow("HorizontalScrollbar"));
			scrollbarHorizontal->setDocumentSize(100.0f);
			scrollbarHorizontal->setPageSize(10.0f);
			scrollbarHorizontal->setStepSize(1.0f);
			scrollbarHorizontal->setScrollPosition(75.0f);
			float valueScrollbarHorizontal = scrollbarHorizontal->getScrollPosition(); // Retrieve the scroll position
 
			/* Scrollbar (Vertical) */
			Scrollbar* scrollbarVertical = static_cast<Scrollbar*>(winMgr.getWindow("VerticalScrollbar"));
			scrollbarVertical->setDocumentSize(100.0f);
			scrollbarVertical->setPageSize(10.0f);
			scrollbarVertical->setStepSize(1.0f);
			scrollbarVertical->setScrollPosition(25.0f);
			float valueScrollbarVertical = scrollbarVertical->getScrollPosition(); // Retrieve the scroll position
 
			/* MultiLineEditbox */
			MultiLineEditbox* multiLineEditbox = static_cast<MultiLineEditbox*>(winMgr.getWindow("MultiLineEditbox"));
			multiLineEditbox->setText("MultiLineEditbox value");
			multiLineEditbox->setReadOnly(false);
			multiLineEditbox->setWordWrapping(true);
			String valueMultiLineEditbox = multiLineEditbox->getText(); // Retrieve the text
 
			/* RadioButton */
			RadioButton* radioButton = static_cast<RadioButton*>(winMgr.getWindow("RadioButton_A"));
				radioButton->setGroupID(1);
				radioButton->setID(101);
				radioButton->setSelected(true);
			radioButton = static_cast<RadioButton*>(winMgr.getWindow("RadioButton_B"));
				radioButton->setGroupID(1);
				radioButton->setID(102);
			radioButton = static_cast<RadioButton*>(winMgr.getWindow("RadioButton_C"));
				radioButton->setGroupID(1);
				radioButton->setID(103);
			radioButton = static_cast<RadioButton*>(winMgr.getWindow("RadioButton_1"));
				radioButton->setGroupID(2);
				radioButton->setID(201);
				radioButton->setSelected(true);
			radioButton = static_cast<RadioButton*>(winMgr.getWindow("RadioButton_2"));
				radioButton->setGroupID(2);
				radioButton->setID(202);
			radioButton = static_cast<RadioButton*>(winMgr.getWindow("RadioButton_3"));
				radioButton->setGroupID(2);
				radioButton->setID(203);
			radioButton = static_cast<RadioButton*>(winMgr.getWindow("RadioButton_A")); // Get handle of one radio button from the group
			uint valueRadioButtonLetters = radioButton->getSelectedButtonInGroup()->getID(); // Get selected ID
			radioButton = static_cast<RadioButton*>(winMgr.getWindow("RadioButton_3")); // Can obtain the handle of any radio button in the group
			uint valueRadioButtonNumbers = radioButton->getSelectedButtonInGroup()->getID();
			radioButton->setSelected(true); // Specify which button should appear selected by default
 
			/* Listbox */
			Listbox* listbox = static_cast<Listbox*>(winMgr.getWindow("Listbox"));
			listbox->setMultiselectEnabled(false);
			ListboxTextItem* itemListbox = new ListboxTextItem("Value A", 1);
				itemListbox->setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush");
				listbox->addItem(itemListbox);
			itemListbox = new ListboxTextItem("Value B", 2);
				itemListbox->setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush");
				listbox->addItem(itemListbox);
			itemListbox = new ListboxTextItem("Value C", 3);
				itemListbox->setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush");
				listbox->addItem(itemListbox);
			itemListbox = new ListboxTextItem("Value D", 4);
				itemListbox->setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush");
				listbox->addItem(itemListbox);
			listbox->setItemSelectState(itemListbox, true);
			listbox->ensureItemIsVisible(itemListbox);
			uint valueListbox = listbox->getFirstSelectedItem()->getID(); // Retrieve the ID of the selected listbox item
 
			/* Combobox */
			Combobox* combobox = static_cast<Combobox*>(winMgr.getWindow("Combobox"));
			combobox->setReadOnly(true);
			ListboxTextItem* itemCombobox = new ListboxTextItem("Value 1", 1);
				itemCombobox->setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush");
				combobox->addItem(itemCombobox);
			itemCombobox = new ListboxTextItem("Value 2", 2);
				itemCombobox->setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush");
				combobox->addItem(itemCombobox);
				itemCombobox->setSelected(true); // Select this item
				combobox->setText(itemCombobox->getText()); // Copy the item's text into the Editbox
			itemCombobox = new ListboxTextItem("Value 3", 3);
				itemCombobox->setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush");
				combobox->addItem(itemCombobox);
			itemCombobox = new ListboxTextItem("Value 4", 4);
				itemCombobox->setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush");
				combobox->addItem(itemCombobox);
			String valueCombobox = combobox->getText(); // Retrieve the displayed text
			uint idCombobox = combobox->getSelectedItem()->getID(); // Retrieve the ID of the selected combobox item
 
			/* MultiColumnList */
			MultiColumnList* multiColumnList = static_cast<MultiColumnList*>(winMgr.getWindow("MultiColumnList"));\
			multiColumnList->addColumn("Col A", 0, UDim(0.32f, 0));
			multiColumnList->addColumn("Col B", 1, UDim(0.32f, 0));
			multiColumnList->addColumn("Col C", 2, UDim(0.32f, 0));
			multiColumnList->setSelectionMode(MultiColumnList::RowSingle); // MultiColumnList::RowMultiple
			ListboxTextItem* itemMultiColumnList;
			multiColumnList->addRow();
			itemMultiColumnList = new ListboxTextItem("A1", 101);
				itemMultiColumnList->setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush");
				multiColumnList->setItem(itemMultiColumnList, 0, 0); // ColumnID, RowID
			itemMultiColumnList = new ListboxTextItem("B1", 102);
				//itemMultiColumnList->setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush");
				// By commenting the line above a cell does not specify a selection indicator
				//  selecting that line will show a "gap" in the selection.
				multiColumnList->setItem(itemMultiColumnList, 1, 0); // ColumnID, RowID
			itemMultiColumnList = new ListboxTextItem("C1", 103);
				itemMultiColumnList->setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush");
				multiColumnList->setItem(itemMultiColumnList, 2, 0); // ColumnID, RowID
			multiColumnList->addRow();
			itemMultiColumnList = new ListboxTextItem("A2", 201);
				itemMultiColumnList->setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush");
				multiColumnList->setItem(itemMultiColumnList, 0, 1); // ColumnID, RowID
			itemMultiColumnList = new ListboxTextItem("B2", 202);
				itemMultiColumnList->setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush");
				multiColumnList->setItem(itemMultiColumnList, 1, 1); // ColumnID, RowID
			itemMultiColumnList = new ListboxTextItem("C2", 203);
				itemMultiColumnList->setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush");
				multiColumnList->setItem(itemMultiColumnList, 2, 1); // ColumnID, RowID
			MCLGridRef grid_ref(1, 0); // Select according to a grid reference; second row
			multiColumnList->setItemSelectState(grid_ref, true);
			ListboxItem* listboxItem = multiColumnList->getFirstSelectedItem();
			uint valueColumnA = listboxItem->getID(); // Retrieve the value of the selected item from column A
			listboxItem = multiColumnList->getNextSelected(listboxItem);
			uint valueColumnB = listboxItem->getID(); // Retrieve the value of the selected item from column B
			listboxItem = multiColumnList->getNextSelected(listboxItem);
			uint valueColumnC = listboxItem->getID(); // Retrieve the value of the selected item from column C
 
			/* TabControl */
			TabControl* winTabControl = static_cast<TabControl*>(winMgr.getWindow("TabControl"));
			winTabControl->setTabHeight(UDim(0.15f, 0.0f)); // Make the tab buttons a little bigger
			Window* tabPage = winMgr.getWindow("TabPane1");
				tabPage->setText("Page 1");
				tabPage->setSize(UVector2(UDim(1.0f, 0.0f), UDim(1.0f, 0.0f))); // Size to 100% of its parent, the TabControl
				tabPage->setPosition(UVector2(UDim(0.0f, 0.0f), UDim(0.0f, 0.0f))); // Move to the upper left corner of its parent
				winTabControl->addTab(tabPage);
			tabPage = winMgr.getWindow("TabPane2");
				tabPage->setText("Page 2");
				tabPage->setSize(UVector2(UDim(1.0f, 0.0f), UDim(1.0f, 0.0f))); 
				tabPage->setPosition(UVector2(UDim(0.0f, 0.0f), UDim(0.0f, 0.0f))); 
				winTabControl->addTab(tabPage);
 
		}
		catch(Exception &e)
		{
			#if defined( __WIN32__ ) || defined( _WIN32 )
				MessageBox(NULL, e.getMessage().c_str(), "Error initializing the demo", MB_OK | MB_ICONERROR | MB_TASKMODAL);
			#else
				std::cerr << "Error initializing the demo:" << e.getMessage().c_str() << "\n";
			#endif
		}
 
		return true;
	}
 
    void cleanupSample(void)
	{
	}
};
 
#endif // _WidgetGalore_h_

main.cpp

#if defined( __WIN32__ ) || defined( _WIN32 )
	#define WIN32_LEAN_AND_MEAN
	#define NOMINMAX
	#include "windows.h"
#endif
 
#include "WidgetGalore.h"
 
 
#if defined( __WIN32__ ) || defined( _WIN32 )
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine,int nCmdShow)
#else
int main(int argc, char *argv[])
#endif
{
    DemoSample app;
    return app.run();
}


WidgetGalore.layout

<?xml version="1.0" encoding="UTF-8"?>
 
<GUILayout >
    <Window Type="DefaultWindow" Name="Root" >
        <Property Name="Text" >1</Property>
        <Property Name="InheritsAlpha" Value="False" />
        <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
        <Window Type="DefaultWindow" Name="TabPane2" >
            <Property Name="Font" Value="Commonwealth-10" />
            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
            <Property Name="UnifiedAreaRect" Value="{{0.72875,0},{0.7185,0},{0.97875,0},{0.9685,0}}" />
            <Window Type="TaharezLook/StaticText" Name="StaticTextPage2" >
                <Property Name="Font" Value="Commonwealth-10" />
                <Property Name="Text" >In Page 2:</Property>
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
                <Property Name="UnifiedAreaRect" Value="{{0.06,0},{0.226667,0},{0.415,0},{0.476667,0}}" />
            </Window>
            <Window Type="TaharezLook/Editbox" Name="EditBoxPage2" >
                <Property Name="Font" Value="Commonwealth-10" />
                <Property Name="MaxTextLength" Value="1073741823" />
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
                <Property Name="UnifiedAreaRect" Value="{{0.420001,0},{0.22,0},{0.99,0},{0.47,0}}" />
            </Window>
        </Window>
        <Window Type="TaharezLook/FrameWindow" Name="winTabControl" >
            <Property Name="Text" >Tab Control Window</Property>
            <Property Name="TitlebarFont" Value="Commonwealth-10" />
            <Property Name="CaptionColour" Value="00FFFFFF" />
            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
            <Property Name="TitlebarEnabled" Value="True" />
            <Property Name="UnifiedAreaRect" Value="{{0.695627,0},{0.2725,0},{0.993122,0},{0.704167,0}}" />
            <Property Name="MouseCursorImage" Value="set:TaharezLook image:MouseTarget" />
            <Window Type="TaharezLook/TabControl" Name="TabControl" >
                <Property Name="TabHeight" Value="{0,0}" />
                <Property Name="TabTextPadding" Value="{0,0}" />
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
                <Property Name="UnifiedAreaRect" Value="{{0.088566,0},{0.174378,0},{0.931404,0},{0.804637,0}}" />
            </Window>
            <Window Type="TaharezLook/Button" Name="btnOk" >
                <Property Name="Text" >Ok</Property>
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
                <Property Name="UnifiedAreaRect" Value="{{0.128412,0},{0.841464,0},{0.365583,0},{0.926003,0}}" />
                <Property Name="MouseCursorImage" Value="set:TaharezLook image:MouseArrow" />
            </Window>
            <Window Type="TaharezLook/Button" Name="btnCancel" >
                <Property Name="Text" >Cancel</Property>
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
                <Property Name="UnifiedAreaRect" Value="{{0.400429,0},{0.841464,0},{0.637601,0},{0.926003,0}}" />
                <Property Name="MouseCursorImage" Value="set:TaharezLook image:MouseArrow" />
            </Window>
            <Window Type="TaharezLook/Button" Name="btnApply" >
                <Property Name="Text" >Apply</Property>
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
                <Property Name="UnifiedAreaRect" Value="{{0.668224,0},{0.843977,0},{0.905394,0},{0.928516,0}}" />
                <Property Name="MouseCursorImage" Value="set:TaharezLook image:MouseArrow" />
            </Window>
        </Window>
        <Window Type="DefaultWindow" Name="TabPane1" >
            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
            <Property Name="ClippedByParent" Value="False" />
            <Property Name="UnifiedAreaRect" Value="{{0.72875,0},{0.012178,0},{0.97875,0},{0.262178,0}}" />
            <Window Type="TaharezLook/StaticText" Name="StaticTextPage1" >
                <Property Name="Text" >In Page 1:</Property>
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
                <Property Name="UnifiedAreaRect" Value="{{0.06,0},{0.226667,0},{0.415,0},{0.476667,0}}" />
            </Window>
            <Window Type="TaharezLook/Editbox" Name="EditBoxPage1" >
                <Property Name="MaxTextLength" Value="1073741823" />
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
                <Property Name="UnifiedAreaRect" Value="{{0.420001,0},{0.22,0},{0.99,0},{0.47,0}}" />
            </Window>
        </Window>
        <Window Type="TaharezLook/FrameWindow" Name="winWidgets" >
            <Property Name="Text" >Dave, it&apos;s full of widgets!</Property>
            <Property Name="TitlebarFont" Value="Commonwealth-10" />
            <Property Name="CaptionColour" Value="00FFFFFF" />
            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
            <Property Name="TitlebarEnabled" Value="True" />
            <Property Name="UnifiedAreaRect" Value="{{0.00375,0},{0.143333,0},{0.751248,0},{0.806665,0}}" />
            <Property Name="MouseCursorImage" Value="set:TaharezLook image:MouseTarget" />
            <Window Type="TaharezLook/Button" Name="btnClose" >
                <Property Name="Text" >Close</Property>
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
                <Property Name="UnifiedAreaRect" Value="{{0.732397,0},{0.895137,0},{0.976465,0},{0.975697,0}}" />
                <Property Name="MouseCursorImage" Value="set:TaharezLook image:MouseArrow" />
            </Window>
            <Window Type="TaharezLook/Editbox" Name="Editbox" >
                <Property Name="Font" Value="Commonwealth-10" />
                <Property Name="MaxTextLength" Value="1073741823" />
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
                <Property Name="UnifiedAreaRect" Value="{{0.62442,0},{0.090471,0},{0.969776,0},{0.153443,0}}" />
            </Window>
            <Window Type="TaharezLook/Checkbox" Name="Checkbox" >
                <Property Name="Text" >Check</Property>
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
                <Property Name="UnifiedAreaRect" Value="{{0.845164,0},{0.396859,0},{0.944201,0},{0.453147,0}}" />
            </Window>
            <Window Type="TaharezLook/Combobox" Name="Combobox" >
                <Property Name="Text" >Combo Box</Property>
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
                <Property Name="UnifiedAreaRect" Value="{{0.183835,0},{0.090471,0},{0.613522,0},{0.413287,0}}" />
                <Property Name="MaxEditTextLength" Value="1073741823" />
            </Window>
            <Window Type="TaharezLook/RadioButton" Name="RadioButton_A" >
                <Property Name="Font" Value="Commonwealth-10" />
                <Property Name="Text" >A</Property>
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
                <Property Name="UnifiedAreaRect" Value="{{0.652856,0},{0.189876,0},{0.704964,0},{0.246164,0}}" />
            </Window>
            <Window Type="TaharezLook/RadioButton" Name="RadioButton_B" >
                <Property Name="Font" Value="Commonwealth-10" />
                <Property Name="Text" >B</Property>
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
                <Property Name="UnifiedAreaRect" Value="{{0.707569,0},{0.189876,0},{0.759678,0},{0.246164,0}}" />
            </Window>
            <Window Type="TaharezLook/RadioButton" Name="RadioButton_C" >
                <Property Name="Font" Value="Commonwealth-10" />
                <Property Name="Text" >C</Property>
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
                <Property Name="UnifiedAreaRect" Value="{{0.761542,0},{0.189876,0},{0.813651,0},{0.246164,0}}" />
            </Window>
            <Window Type="TaharezLook/RadioButton" Name="RadioButton_1" >
                <Property Name="Font" Value="Commonwealth-10" />
                <Property Name="Text" >1</Property>
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
                <Property Name="UnifiedAreaRect" Value="{{0.845164,0},{0.189876,0},{0.897272,0},{0.246164,0}}" />
            </Window>
            <Window Type="TaharezLook/RadioButton" Name="RadioButton_2" >
                <Property Name="Font" Value="Commonwealth-10" />
                <Property Name="Text" >2</Property>
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
                <Property Name="UnifiedAreaRect" Value="{{0.845164,0},{0.245152,0},{0.897272,0},{0.30144,0}}" />
            </Window>
            <Window Type="TaharezLook/RadioButton" Name="RadioButton_3" >
                <Property Name="Font" Value="Commonwealth-10" />
                <Property Name="Text" >3</Property>
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
                <Property Name="UnifiedAreaRect" Value="{{0.845164,0},{0.300429,0},{0.897272,0},{0.356717,0}}" />
            </Window>
            <Window Type="TaharezLook/HorizontalScrollbar" Name="HorizontalScrollbar" >
                <Property Name="PageSize" Value="0" />
                <Property Name="StepSize" Value="1" />
                <Property Name="OverlapSize" Value="0" />
                <Property Name="DocumentSize" Value="1" />
                <Property Name="ScrollPosition" Value="0" />
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
                <Property Name="UnifiedAreaRect" Value="{{0.183835,0},{0.185427,0},{0.613522,0},{0.26206,0}}" />
            </Window>
            <Window Type="TaharezLook/VerticalScrollbar" Name="VerticalScrollbar" >
                <Property Name="PageSize" Value="0" />
                <Property Name="StepSize" Value="1" />
                <Property Name="OverlapSize" Value="0" />
                <Property Name="DocumentSize" Value="1" />
                <Property Name="ScrollPosition" Value="0" />
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
                <Property Name="UnifiedAreaRect" Value="{{0.026087,0},{0.090471,0},{0.082106,0},{0.606802,0}}" />
            </Window>
            <Window Type="TaharezLook/Listbox" Name="Listbox" >
                <Property Name="Text" >List Box</Property>
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
                <Property Name="UnifiedAreaRect" Value="{{0.183835,0},{0.626634,0},{0.427903,0},{0.876634,0}}" />
                <Property Name="MouseCursorImage" Value="set:TaharezLook image:MouseTarget" />
            </Window>
            <Window Type="TaharezLook/MultiColumnList" Name="MultiColumnList" >
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
                <Property Name="UnifiedAreaRect" Value="{{0.183835,0},{0.271357,0},{0.816779,0},{0.551507,0}}" />
                <Property Name="MouseCursorImage" Value="set:TaharezLook image:MouseTarget" />
            </Window>
            <Window Type="TaharezLook/MultiLineEditbox" Name="MultiLineEditbox" >
                <Property Name="Text" >            
</Property>
                <Property Name="MaxTextLength" Value="1073741823" />
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
                <Property Name="UnifiedAreaRect" Value="{{0.462498,0},{0.626634,0},{0.706566,0},{0.876634,0}}" />
            </Window>
            <Window Type="TaharezLook/ProgressBar" Name="ProgressBar" >
                <Property Name="StepSize" Value="0.01" />
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
                <Property Name="CurrentProgress" Value="0" />
                <Property Name="UnifiedAreaRect" Value="{{0.183835,0},{0.559296,0},{0.816779,0},{0.608291,0}}" />
            </Window>
            <Window Type="TaharezLook/Slider" Name="Slider" >
                <Property Name="CurrentValue" Value="0" />
                <Property Name="MaximumValue" Value="1" />
                <Property Name="ClickStepSize" Value="0.01" />
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
                <Property Name="UnifiedAreaRect" Value="{{0.099415,0},{0.090471,0},{0.155434,0},{0.606802,0}}" />
            </Window>
            <Window Type="TaharezLook/Spinner" Name="Spinner" >
                <Property Name="StepSize" Value="1" />
                <Property Name="CurrentValue" Value="0" />
                <Property Name="MaximumValue" Value="32767" />
                <Property Name="MinimumValue" Value="-32768" />
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
                <Property Name="UnifiedAreaRect" Value="{{0.845164,0},{0.48995,0},{0.944201,0},{0.551507,0}}" />
            </Window>
            <Window Type="TaharezLook/StaticImage" Name="StaticImage" >
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
                <Property Name="UnifiedAreaRect" Value="{{0.732397,0},{0.626634,0},{0.976465,0},{0.876634,0}}" />
            </Window>
            <Window Type="TaharezLook/StaticText" Name="StaticText" >
                <Property Name="Text" >Static Text</Property>
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
                <Property Name="UnifiedAreaRect" Value="{{0.462498,0},{0.895137,0},{0.706566,0},{0.975697,0}}" />
            </Window>
            <Window Type="TaharezLook/ScrollablePane" Name="ScrollablePane" >
                <Property Name="ContentArea" Value="l:0 t:0 r:0 b:0" />
                <Property Name="HorzStepSize" Value="0.1" />
                <Property Name="VertStepSize" Value="0.1" />
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
                <Property Name="HorzOverlapSize" Value="0.01" />
                <Property Name="UnifiedAreaRect" Value="{{0.019063,0},{0.629399,0},{0.157023,0},{0.879399,0}}" />
                <Property Name="VertOverlapSize" Value="0.01" />
                <Property Name="HorzScrollPosition" Value="0" />
                <Property Name="VertScrollPosition" Value="0" />
            </Window>
        </Window>
    </Window>
</GUILayout>