CHANGED: #1471 Implemented property querying for for CViewTextFormated.

--HG--
branch : gsoc2012-gui-editor
hg/feature/sse2
dfighter1985 12 years ago
parent 4ad9430fcf
commit 77a2924b73

@ -46,6 +46,7 @@ namespace NLGUI
CViewTextFormated (const TCtorParam &param) : CViewText(param)
{}
std::string getProperty( const std::string &name ) const;
virtual bool parse(xmlNodePtr cur, CInterfaceGroup * parentGroup);
virtual void checkCoords();
const ucstring &getFormatString() const { return _FormatString; }

@ -25,6 +25,16 @@ namespace NLGUI
CViewTextFormated::IViewTextFormatter *CViewTextFormated::textFormatter = NULL;
std::string CViewTextFormated::getProperty( const std::string &name ) const
{
if( name == "format" )
{
return getFormatString().toString();
}
else
return CViewText::getProperty( name );
}
// ****************************************************************************
bool CViewTextFormated::parse(xmlNodePtr cur,CInterfaceGroup * parentGroup)
{

@ -0,0 +1,19 @@
<widget>
<header>
<name>ViewTextFormated</name>
<guiname>CViewTextFormated</guiname>
<ancestor>ViewText</ancestor>
<description></description>
<abstract>false</abstract>
<icon></icon>
</header>
<properties>
<property>
<name>format</name>
<type>string</type>
<default></default>
</property>
</properties>
</widget>
Loading…
Cancel
Save