Page 1 of 1

Window Properties

Posted: Thu Apr 26, 2007 19:37
by daves
I've searched a bit through the documentation and am trying to find the list of all window properties, and a description of the property value (and its viable format).

So for example our code specifies the "Image" property for some windows. My understanding is that this property has a format that looks something like the following:

"set:SETNAME image:IMAGENAME"

I found this by digging around in some of the tutorials, but have not been able to find the single location where all window properties and their values are documented.

Can you please provide a link or two to the documentation that I must be missing.

Thanks in advance.

Posted: Thu Apr 26, 2007 21:16
by Levia
For as far as I know, these are not listed somewhere. though, you can have a look at the looknfeel file. The property's are listed per widget there.

Posted: Fri Apr 27, 2007 06:01
by Dalfy
The issue with this is that we need to write a tool to dump the supported property for a window/look&feel because some property are created dynamically during the definition of the look&feel. So there is no way to list all property supported by let's say a Window in the API reference just because this is not going to be enough and can vary from one look&feel to another.

Posted: Fri Apr 27, 2007 06:38
by Levia
Dynamic as in <Child> entry's? (THat they use other entry's property's aswell?)

Posted: Fri Apr 27, 2007 09:30
by scriptkid
No, that they have new properties defined within a looknfeel file, next to the hard-codes ones. For example if you look in the Windowslook.looknfeel file, things immediately start at the Button, with the possible different colours per state. Those do not appear in the doxygen api files...

However they are registered to the system when the file gets loaded. If you loop all properties of a window, they do show up:

Code: Select all

PropertySet::Iterator propertyIt = (PropertySet*)window->getIterator();
while (!propertyIt.isAtEnd()) {
print("Property [%s: %s]\n", propertyIt.getCurrentKey()).c_str(),
window->getProperty(propertyIt.getCurrentKey()).c_str());
propertyIt++;
}


And we need something like this, but i am not sure how. A very basis script ran from the commandline?, a popup dialog from within our tools?

HTH :)

Posted: Fri Apr 27, 2007 10:02
by Levia
It really shouldnt be too hard to implement this somewhere.

Posted: Sat Apr 28, 2007 03:09
by Rackle

Posted: Sat Apr 28, 2007 03:32
by tgraupmann
I started filling out a Wiki page for quick reference:
http://www.cegui.org.uk/wiki/index.php/SetProperty

Posted: Sat Apr 28, 2007 04:33
by Rackle
It should be possible to add an export button to my little program, to export in a Wiki format. That export could then be used to update that Wiki page, as an online reference. Something like:

Layout Properties
ID
Font
Text

Static Image Properties
ID
Font
Text

Property Help
ID
Description of this property.

Font
Description of this property.

Text
Description of this property.

Posted: Sat Apr 28, 2007 08:35
by Levia
Nice one Rackle. Perhaps, like you said, something like that should be possible. Maybe ill take a look at it if you havent yet.

Posted: Sat Apr 28, 2007 09:43
by scriptkid
Very nice utility :)

I like the export idea. On a new release or a new official .skin we could add it to a reference page on the wiki indeed!

And maybe also split default- and falagard properties, as i suggested here:
http://www.cegui.org.uk/phpBB2/viewtopic.php?p=11676