mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-10 09:19:01 +00:00
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;
|
||||
|
||||
editorSelected = false;
|
||||
|
||||
serializable = true;
|
||||
}
|
||||
|
||||
// dtor
|
||||
|
@ -477,6 +479,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:
|
||||
|
||||
|
@ -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…
Reference in a new issue