mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-23 15:46:18 +00:00
CHANGED: #1471 Implemented property querying for CGroupTable.
--HG-- branch : gsoc2012-gui-editor
This commit is contained in:
parent
8ddbbcb6fa
commit
f0b11577a0
3 changed files with 78 additions and 0 deletions
|
@ -146,6 +146,8 @@ namespace NLGUI
|
|||
|
||||
bool ContinuousUpdate;
|
||||
|
||||
std::string getProperties( const std::string &name ) const;
|
||||
|
||||
protected:
|
||||
|
||||
/// \from CInterfaceElement
|
||||
|
|
|
@ -1074,6 +1074,39 @@ namespace NLGUI
|
|||
CInterfaceGroup::draw ();
|
||||
}
|
||||
|
||||
std::string CGroupTable::getProperties( const std::string &name ) const
|
||||
{
|
||||
if( name == "border" )
|
||||
{
|
||||
return toString( Border );
|
||||
}
|
||||
else
|
||||
if( name == "cellpadding" )
|
||||
{
|
||||
return toString( CellPadding );
|
||||
}
|
||||
else
|
||||
if( name == "cellspacing" )
|
||||
{
|
||||
return toString( CellSpacing );
|
||||
}
|
||||
else
|
||||
if( name == "bgcolor" )
|
||||
{
|
||||
return toString( BgColor );
|
||||
}
|
||||
else
|
||||
if( name == "width" )
|
||||
{
|
||||
if( ForceWidthMin != 0 )
|
||||
return toString( ForceWidthMin );
|
||||
else
|
||||
return toString( TableRatio * 100.0f );
|
||||
}
|
||||
else
|
||||
return CInterfaceGroup::getProperty( name );
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
bool CGroupTable::parse (xmlNodePtr cur, CInterfaceGroup * parentGroup)
|
||||
{
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
<widget>
|
||||
<header>
|
||||
<name>GroupTable</name>
|
||||
<guiname>CGroupTable</guiname>
|
||||
<ancestor>InterfaceGroup</ancestor>
|
||||
<description></description>
|
||||
<abstract>false</abstract>
|
||||
<icon></icon>
|
||||
</header>
|
||||
<properties>
|
||||
<property>
|
||||
<name>border</name>
|
||||
<type>int</type>
|
||||
<default>0</default>
|
||||
</property>
|
||||
<property>
|
||||
<name>cellpadding</name>
|
||||
<type>int</type>
|
||||
<default>0</default>
|
||||
</property>
|
||||
<property>
|
||||
<name>cellspacing</name>
|
||||
<type>int</type>
|
||||
<default>0</default>
|
||||
</property>
|
||||
<property>
|
||||
<name>bgcolor</name>
|
||||
<type>string</type>
|
||||
<default>0 0 0 255</default>
|
||||
</property>
|
||||
<property>
|
||||
<name>width</name>
|
||||
<type>string</type>
|
||||
<default>0</default>
|
||||
</property>
|
||||
<property>
|
||||
<name>continuous_update</name>
|
||||
<type>bool</type>
|
||||
<default>false</default>
|
||||
</property>
|
||||
|
||||
</properties>
|
||||
</widget>
|
Loading…
Reference in a new issue