CHANGED: #1471 Widgets can now be flagged as non-serializable, in which case they won't be serialized.

--HG--
branch : gsoc2012-gui-editor
hg/feature/sse2
dfighter1985 12 years ago
parent e684882296
commit c554c90fbe

@ -107,6 +107,8 @@ namespace NLGUI
_AvoidResizeParent= false;
editorSelected = false;
serializable = true;
}
// dtor
@ -478,6 +480,9 @@ namespace NLGUI
void setPosParent( const std::string &id );
void setSizeParent( const std::string &id );
void setSerializable( bool b ){ serializable = b; }
bool IsSerializable() const{ return serializable; }
protected:
bool editorSelected;
@ -539,6 +544,7 @@ namespace NLGUI
private:
//void snapSize();
bool serializable;
typedef NLMISC::CSmartPtr<CInterfaceLink> TLinkSmartPtr;
typedef std::vector<TLinkSmartPtr> TLinkVect;

@ -721,6 +721,9 @@ namespace NLGUI
std::vector< CInterfaceGroup* >::const_iterator itr;
for( itr = _ChildrenGroups.begin(); itr != _ChildrenGroups.end(); ++itr )
{
if( !(*itr)->IsSerializable() )
continue;
(*itr)->serialize( parentNode, "group" );
}
@ -732,6 +735,9 @@ namespace NLGUI
std::vector< CCtrlBase* >::const_iterator itr;
for( itr = _Controls.begin(); itr != _Controls.end(); ++itr )
{
if( !(*itr)->IsSerializable() )
continue;
(*itr)->serialize( parentNode, "ctrl" );
}
@ -743,6 +749,9 @@ namespace NLGUI
std::vector< CViewBase* >::const_iterator itr;
for( itr = _Views.begin(); itr != _Views.end(); ++itr )
{
if( !(*itr)->IsSerializable() )
continue;
(*itr)->serialize( parentNode, "view" );
}

Loading…
Cancel
Save