CHANGED: #1471 Widgets can now be flagged as non-serializable, in which case they won't be serialized.
This commit is contained in:
parent
40abb664c9
commit
696ae33eaa
2 changed files with 15 additions and 0 deletions
|
@ -107,6 +107,8 @@ namespace NLGUI
|
||||||
_AvoidResizeParent= false;
|
_AvoidResizeParent= false;
|
||||||
|
|
||||||
editorSelected = false;
|
editorSelected = false;
|
||||||
|
|
||||||
|
serializable = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// dtor
|
// dtor
|
||||||
|
@ -478,6 +480,9 @@ namespace NLGUI
|
||||||
void setPosParent( const std::string &id );
|
void setPosParent( const std::string &id );
|
||||||
void setSizeParent( const std::string &id );
|
void setSizeParent( const std::string &id );
|
||||||
|
|
||||||
|
void setSerializable( bool b ){ serializable = b; }
|
||||||
|
bool IsSerializable() const{ return serializable; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
bool editorSelected;
|
bool editorSelected;
|
||||||
|
@ -539,6 +544,7 @@ namespace NLGUI
|
||||||
|
|
||||||
private:
|
private:
|
||||||
//void snapSize();
|
//void snapSize();
|
||||||
|
bool serializable;
|
||||||
|
|
||||||
typedef NLMISC::CSmartPtr<CInterfaceLink> TLinkSmartPtr;
|
typedef NLMISC::CSmartPtr<CInterfaceLink> TLinkSmartPtr;
|
||||||
typedef std::vector<TLinkSmartPtr> TLinkVect;
|
typedef std::vector<TLinkSmartPtr> TLinkVect;
|
||||||
|
|
|
@ -721,6 +721,9 @@ namespace NLGUI
|
||||||
std::vector< CInterfaceGroup* >::const_iterator itr;
|
std::vector< CInterfaceGroup* >::const_iterator itr;
|
||||||
for( itr = _ChildrenGroups.begin(); itr != _ChildrenGroups.end(); ++itr )
|
for( itr = _ChildrenGroups.begin(); itr != _ChildrenGroups.end(); ++itr )
|
||||||
{
|
{
|
||||||
|
if( !(*itr)->IsSerializable() )
|
||||||
|
continue;
|
||||||
|
|
||||||
(*itr)->serialize( parentNode, "group" );
|
(*itr)->serialize( parentNode, "group" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -732,6 +735,9 @@ namespace NLGUI
|
||||||
std::vector< CCtrlBase* >::const_iterator itr;
|
std::vector< CCtrlBase* >::const_iterator itr;
|
||||||
for( itr = _Controls.begin(); itr != _Controls.end(); ++itr )
|
for( itr = _Controls.begin(); itr != _Controls.end(); ++itr )
|
||||||
{
|
{
|
||||||
|
if( !(*itr)->IsSerializable() )
|
||||||
|
continue;
|
||||||
|
|
||||||
(*itr)->serialize( parentNode, "ctrl" );
|
(*itr)->serialize( parentNode, "ctrl" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -743,6 +749,9 @@ namespace NLGUI
|
||||||
std::vector< CViewBase* >::const_iterator itr;
|
std::vector< CViewBase* >::const_iterator itr;
|
||||||
for( itr = _Views.begin(); itr != _Views.end(); ++itr )
|
for( itr = _Views.begin(); itr != _Views.end(); ++itr )
|
||||||
{
|
{
|
||||||
|
if( !(*itr)->IsSerializable() )
|
||||||
|
continue;
|
||||||
|
|
||||||
(*itr)->serialize( parentNode, "view" );
|
(*itr)->serialize( parentNode, "view" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue