mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-27 09:36:15 +00:00
CHANGED: #1471 Widgets can now be flagged as non-serializable, in which case they won't be serialized.
--HG-- branch : gsoc2012-gui-editor
This commit is contained in:
parent
e684882296
commit
c554c90fbe
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
|
||||||
|
@ -477,6 +479,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:
|
||||||
|
|
||||||
|
@ -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