mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-30 04:40:53 +00:00
CHANGED: #1471 Implemented property querying for for CViewTextID.
--HG-- branch : gsoc2012-gui-editor
This commit is contained in:
parent
77a2924b73
commit
0436e018aa
3 changed files with 53 additions and 0 deletions
|
@ -91,6 +91,7 @@ namespace NLGUI
|
|||
|
||||
~CViewTextID();
|
||||
|
||||
std::string getProperty( const std::string &name ) const;
|
||||
virtual bool parse(xmlNodePtr cur, CInterfaceGroup * parentGroup);
|
||||
virtual void checkCoords();
|
||||
|
||||
|
|
|
@ -46,6 +46,29 @@ namespace NLGUI
|
|||
{
|
||||
}
|
||||
|
||||
std::string CViewTextID::getProperty( const std::string &name ) const
|
||||
{
|
||||
if( name == "textid" )
|
||||
{
|
||||
if( _DBTextId.getNodePtr() != NULL )
|
||||
return _DBTextId.getNodePtr()->getFullName();
|
||||
else
|
||||
return NLMISC::toString( _TextId );
|
||||
}
|
||||
else
|
||||
if( name == "dynamic_string" )
|
||||
{
|
||||
return NLMISC::toString( _DynamicString );
|
||||
}
|
||||
else
|
||||
if( name == "format_taged" )
|
||||
{
|
||||
return NLMISC::toString( _IsTextFormatTaged );
|
||||
}
|
||||
else
|
||||
return CViewText::getProperty( name );
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
bool CViewTextID::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup)
|
||||
{
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
<widget>
|
||||
<header>
|
||||
<name>ViewTextID</name>
|
||||
<guiname>CViewTextID</guiname>
|
||||
<ancestor>ViewText</ancestor>
|
||||
<description></description>
|
||||
<abstract>false</abstract>
|
||||
<icon></icon>
|
||||
</header>
|
||||
<properties>
|
||||
<property>
|
||||
<name>text_id</name>
|
||||
<type>string</type>
|
||||
<default></default>
|
||||
</property>
|
||||
<property>
|
||||
<name>dynamic_string</name>
|
||||
<type>bool</type>
|
||||
<default>true</default>
|
||||
</property>
|
||||
<property>
|
||||
<name>format_taged</name>
|
||||
<type>bool</type>
|
||||
<default>false</default>
|
||||
</property>
|
||||
|
||||
|
||||
</properties>
|
||||
</widget>
|
Loading…
Reference in a new issue