From a390b90ee06b975541b395549c3cd55a0b5e1aa3 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Tue, 14 Aug 2012 01:22:49 +0200 Subject: [PATCH] CHANGED: #1471 CGroupHeader fields can now we serialized. --HG-- branch : gsoc2012-gui-editor --- code/nel/include/nel/gui/group_header.h | 1 + code/nel/src/gui/group_header.cpp | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/code/nel/include/nel/gui/group_header.h b/code/nel/include/nel/gui/group_header.h index 124b040db..06f211f9b 100644 --- a/code/nel/include/nel/gui/group_header.h +++ b/code/nel/include/nel/gui/group_header.h @@ -44,6 +44,7 @@ namespace NLGUI std::string getProperty( const std::string &name ) const; void setProperty( const std::string &name, const std::string &value ); + xmlNodePtr serialize( xmlNodePtr parentNode, const char *type ) const; // from CInterfaceGroup virtual bool parse(xmlNodePtr cur, CInterfaceGroup * parentGroup); diff --git a/code/nel/src/gui/group_header.cpp b/code/nel/src/gui/group_header.cpp index 125d9150c..017c5cf1b 100644 --- a/code/nel/src/gui/group_header.cpp +++ b/code/nel/src/gui/group_header.cpp @@ -238,6 +238,19 @@ namespace NLGUI return CGroupList::setProperty( name, value ); } + + xmlNodePtr CGroupHeader::serialize( xmlNodePtr parentNode, const char *type ) const + { + xmlNodePtr node = CGroupList::serialize( parentNode, type ); + if( node == NULL ) + return NULL; + + xmlSetProp( node, BAD_CAST "type", BAD_CAST "header" ); + xmlSetProp( node, BAD_CAST "header_max_size", BAD_CAST toString( _HeaderMaxSize ).c_str() ); + + return node; + } + // ***************************************************************************************************************** bool CGroupHeader::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup) {