mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-27 09:36:15 +00:00
CHANGED: #1471 Implemented property setting for CGgroupTable.
--HG-- branch : gsoc2012-gui-editor
This commit is contained in:
parent
1c7a0e4ff2
commit
8e47f9f5b8
2 changed files with 44 additions and 0 deletions
|
@ -148,6 +148,7 @@ namespace NLGUI
|
||||||
bool ContinuousUpdate;
|
bool ContinuousUpdate;
|
||||||
|
|
||||||
std::string getProperties( const std::string &name ) const;
|
std::string getProperties( const std::string &name ) const;
|
||||||
|
void setProperty( const std::string &name, const std::string &value );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
|
|
@ -1202,6 +1202,49 @@ namespace NLGUI
|
||||||
return CInterfaceGroup::getProperty( name );
|
return CInterfaceGroup::getProperty( name );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CGroupTable::setProperty( const std::string &name, const std::string &value )
|
||||||
|
{
|
||||||
|
if( name == "border" )
|
||||||
|
{
|
||||||
|
sint32 i;
|
||||||
|
if( fromString( value, i ) )
|
||||||
|
Border = i;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if( name == "cellpadding" )
|
||||||
|
{
|
||||||
|
sint32 i;
|
||||||
|
if( fromString( value, i ) )
|
||||||
|
CellPadding = i;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if( name == "cellspacing" )
|
||||||
|
{
|
||||||
|
sint32 i;
|
||||||
|
if( fromString( value, i ) )
|
||||||
|
CellSpacing = i;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if( name == "bgcolor" )
|
||||||
|
{
|
||||||
|
CRGBA c;
|
||||||
|
if( fromString( value, c ) )
|
||||||
|
BgColor = c;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if( name == "width" )
|
||||||
|
{
|
||||||
|
convertPixelsOrRatio( value.c_str(), ForceWidthMin, TableRatio );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
CInterfaceGroup::setProperty( name, value );
|
||||||
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
bool CGroupTable::parse (xmlNodePtr cur, CInterfaceGroup * parentGroup)
|
bool CGroupTable::parse (xmlNodePtr cur, CInterfaceGroup * parentGroup)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue