From CEGUIWiki
Introduction
This code creates a tool to list the properties associated with the widgets of a scheme. It loads the .scheme files from within the Scheme directory and displays the widgets defined within that scheme. Selecting a widget will list every property associated to that widget by default. And selecting a property will display its help.
Please discuss this snippet within the Property Finder thread. The properties for the widgets within the Taharez scheme are presented in [SetProperty] and SetProperty (WindowsLook). The Cegui API also lists the properties.
Files
PropertyFinder.h
#ifndef _PropertyFinder_h_
#define _PropertyFinder_h_
#include "CEGuiSample.h"
#include "CEGUI.h"
#include "CEGUIDefaultResourceProvider.h"
#include
#include
#include
Main.cpp
#if defined( __WIN32__ ) || defined( _WIN32 )
#define WIN32_LEAN_AND_MEAN
#define NOMINMAX
#include "windows.h"
#endif
#include "PropertyFinder.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;
int i = app.run();
return i;
}
PropertyFinder.layout
<?xml version="1.0" encoding="UTF-8"?>
<GUILayout >
<Window Type="TaharezLook/FrameWindow" Name="PropertyFinder" >
<Property Name="Text" Value="Property Finder" />
<Property Name="TitlebarFont" Value="Commonwealth-10" />
<Property Name="InheritsAlpha" Value="False" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="TitlebarEnabled" Value="True" />
<Property Name="UnifiedAreaRect" Value="{{0.0643816,0},{0.0124997,0},{0.903446,0},{0.891667,0}}" />
<Window Type="TaharezLook/StaticText" Name="PropertyFinder/SchemeLabel" >
<Property Name="Text" Value="Scheme:" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.019553,0},{0.0836117,0},{0.114991,0},{0.146434,0}}" />
</Window>
<Window Type="TaharezLook/Combobox" Name="PropertyFinder/SchemeList" >
<Property Name="ReadOnly" Value="True" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.116201,0},{0.0836117,0},{0.440692,0},{0.84974,0}}" />
<Property Name="MaxEditTextLength" Value="1073741823" />
</Window>
<Window Type="TaharezLook/StaticText" Name="PropertyFinder/WidgetLabel" >
<Property Name="Font" Value="Commonwealth-10" />
<Property Name="Text" Value="Widget:" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.473929,0},{0.0836117,0},{0.569368,0},{0.146434,0}}" />
</Window>
<Window Type="TaharezLook/Combobox" Name="PropertyFinder/WidgetList" >
<Property Name="Font" Value="Commonwealth-10" />
<Property Name="ReadOnly" Value="True" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.570578,0},{0.0836117,0},{0.969551,0},{0.823935,0}}" />
<Property Name="MaxEditTextLength" Value="1073741823" />
</Window>
<Window Type="TaharezLook/Listbox" Name="PropertyFinder/Properties" >
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.019553,0},{0.164195,0},{0.440692,0},{0.89201,0}}" />
</Window>
<Window Type="TaharezLook/MultiLineEditbox" Name="PropertyFinder/Information" >
<Property Name="Text" >
</Property>
<Property Name="ReadOnly" Value="True" />
<Property Name="MaxTextLength" Value="1073741823" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.473929,0},{0.164195,0},{0.969551,0},{0.89201,0}}" />
</Window>
<Window Type="TaharezLook/Button" Name="PropertyFinder/Export" >
<Property Name="Text" Value="Export" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.019553,0},{0.904265,0},{0.161971,0},{0.983649,0}}" />
</Window>
<Window Type="TaharezLook/RadioButton" Name="PropertyFinder/ExportWiki" >
<Property Name="Text" Value="Wiki" />
<Property Name="Selected" Value="True" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.186517,0},{0.904265,0},{0.251611,0},{0.981279,0}}" />
</Window>
<Window Type="TaharezLook/RadioButton" Name="PropertyFinder/ExportHtml" >
<Property Name="Font" Value="Commonwealth-10" />
<Property Name="Text" Value="HTML" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.271818,0},{0.904265,0},{0.336911,0},{0.98128,0}}" />
</Window>
<Window Type="TaharezLook/RadioButton" Name="PropertyFinder/ExportXml" >
<Property Name="Font" Value="Commonwealth-10" />
<Property Name="Text" Value="XML" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.357547,0},{0.904265,0},{0.42264,0},{0.98128,0}}" />
</Window>
</Window>
</GUILayout>