mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-30 12:50:53 +00:00
CHANGED: #1471 CGroupHeaderEntry fields can now we serialized.
This commit is contained in:
parent
620dee1540
commit
6567a626e4
3 changed files with 22 additions and 5 deletions
|
@ -67,6 +67,7 @@ namespace NLGUI
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CGroupHeaderEntry(const TCtorParam ¶m);
|
CGroupHeaderEntry(const TCtorParam ¶m);
|
||||||
|
xmlNodePtr serialize( xmlNodePtr parentNode, const char *type ) const;
|
||||||
// from CInterfaceGroup
|
// from CInterfaceGroup
|
||||||
virtual bool parse(xmlNodePtr cur, CInterfaceGroup * parentGroup);
|
virtual bool parse(xmlNodePtr cur, CInterfaceGroup * parentGroup);
|
||||||
sint32 getMinSize() const { return _MinSize; }
|
sint32 getMinSize() const { return _MinSize; }
|
||||||
|
@ -78,6 +79,7 @@ namespace NLGUI
|
||||||
|
|
||||||
private:
|
private:
|
||||||
sint32 _MinSize;
|
sint32 _MinSize;
|
||||||
|
sint32 _ResizerSize;
|
||||||
std::string _TargetColumnId;
|
std::string _TargetColumnId;
|
||||||
std::string _AHOnResize;
|
std::string _AHOnResize;
|
||||||
std::string _AHOnResizeParams;
|
std::string _AHOnResizeParams;
|
||||||
|
|
|
@ -396,6 +396,23 @@ namespace NLGUI
|
||||||
CGroupHeaderEntry::CGroupHeaderEntry(const TCtorParam ¶m) : CInterfaceGroup(param)
|
CGroupHeaderEntry::CGroupHeaderEntry(const TCtorParam ¶m) : CInterfaceGroup(param)
|
||||||
{
|
{
|
||||||
_MinSize = 4;
|
_MinSize = 4;
|
||||||
|
_ResizerSize = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
xmlNodePtr CGroupHeaderEntry::serialize( xmlNodePtr parentNode, const char *type ) const
|
||||||
|
{
|
||||||
|
xmlNodePtr node = CInterfaceGroup::serialize( parentNode, type );
|
||||||
|
if( node == NULL )
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
xmlSetProp( node, BAD_CAST "wmin", BAD_CAST toString( _MinSize ).c_str() );
|
||||||
|
xmlSetProp( node, BAD_CAST "resizer_size", BAD_CAST toString( _ResizerSize ).c_str() );
|
||||||
|
xmlSetProp( node, BAD_CAST "target", BAD_CAST toString( _TargetColumnId ).c_str() );
|
||||||
|
xmlSetProp( node, BAD_CAST "on_resize", BAD_CAST _AHOnResize.c_str() );
|
||||||
|
xmlSetProp( node, BAD_CAST "on_resize_params", BAD_CAST _AHOnResizeParams.c_str() );
|
||||||
|
|
||||||
|
|
||||||
|
return node;
|
||||||
}
|
}
|
||||||
|
|
||||||
// *****************************************************************************************************************
|
// *****************************************************************************************************************
|
||||||
|
@ -405,9 +422,8 @@ namespace NLGUI
|
||||||
// left mover
|
// left mover
|
||||||
CXMLAutoPtr prop((const char*) xmlGetProp( cur, (xmlChar*)"wmin" ));
|
CXMLAutoPtr prop((const char*) xmlGetProp( cur, (xmlChar*)"wmin" ));
|
||||||
if (prop) fromString((const char*)prop, _MinSize);
|
if (prop) fromString((const char*)prop, _MinSize);
|
||||||
sint32 resizerSize = 4;
|
|
||||||
prop = (char*) xmlGetProp( cur, (xmlChar*)"resizer_size" );
|
prop = (char*) xmlGetProp( cur, (xmlChar*)"resizer_size" );
|
||||||
if (prop) fromString((const char*)prop, resizerSize);
|
if (prop) fromString((const char*)prop, _ResizerSize);
|
||||||
prop = (char*) xmlGetProp(cur, (xmlChar*) "target");
|
prop = (char*) xmlGetProp(cur, (xmlChar*) "target");
|
||||||
if (prop) _TargetColumnId = (const char *) prop;
|
if (prop) _TargetColumnId = (const char *) prop;
|
||||||
|
|
||||||
|
@ -418,7 +434,7 @@ namespace NLGUI
|
||||||
|
|
||||||
CHeaderEntryResizer *hm = new CHeaderEntryResizer(false, _MinSize);
|
CHeaderEntryResizer *hm = new CHeaderEntryResizer(false, _MinSize);
|
||||||
addCtrl(hm);
|
addCtrl(hm);
|
||||||
hm->setW(resizerSize);
|
hm->setW(_ResizerSize);
|
||||||
hm->setSizeRef(2);
|
hm->setSizeRef(2);
|
||||||
hm->setParent(this);
|
hm->setParent(this);
|
||||||
hm->setParentPosRef(Hotspot_TL);
|
hm->setParentPosRef(Hotspot_TL);
|
||||||
|
@ -426,7 +442,7 @@ namespace NLGUI
|
||||||
// right mover
|
// right mover
|
||||||
hm = new CHeaderEntryResizer(true, _MinSize);
|
hm = new CHeaderEntryResizer(true, _MinSize);
|
||||||
addCtrl(hm);
|
addCtrl(hm);
|
||||||
hm->setW(resizerSize);
|
hm->setW(_ResizerSize);
|
||||||
hm->setSizeRef(2);
|
hm->setSizeRef(2);
|
||||||
hm->setParent(this);
|
hm->setParent(this);
|
||||||
hm->setParentPosRef(Hotspot_TR);
|
hm->setParentPosRef(Hotspot_TR);
|
||||||
|
|
|
@ -650,7 +650,6 @@ namespace NLGUI
|
||||||
xmlSetProp( node, BAD_CAST "col_over", BAD_CAST toString( _OverColor ).c_str() );
|
xmlSetProp( node, BAD_CAST "col_over", BAD_CAST toString( _OverColor ).c_str() );
|
||||||
xmlSetProp( node, BAD_CAST "col_select", BAD_CAST toString( _SelectedColor ).c_str() );
|
xmlSetProp( node, BAD_CAST "col_select", BAD_CAST toString( _SelectedColor ).c_str() );
|
||||||
xmlSetProp( node, BAD_CAST "col_over_back", BAD_CAST toString( _OverColorBack ).c_str() );
|
xmlSetProp( node, BAD_CAST "col_over_back", BAD_CAST toString( _OverColorBack ).c_str() );
|
||||||
xmlSetProp( node, BAD_CAST "", BAD_CAST "" );
|
|
||||||
xmlSetProp( node, BAD_CAST "fontsize", BAD_CAST toString( _FontSize ).c_str() );
|
xmlSetProp( node, BAD_CAST "fontsize", BAD_CAST toString( _FontSize ).c_str() );
|
||||||
xmlSetProp( node, BAD_CAST "select_ancestor_on_close", BAD_CAST toString( _SelectAncestorOnClose ).c_str() );
|
xmlSetProp( node, BAD_CAST "select_ancestor_on_close", BAD_CAST toString( _SelectAncestorOnClose ).c_str() );
|
||||||
xmlSetProp( node, BAD_CAST "navigate_one_branch", BAD_CAST toString( _NavigateOneBranch ).c_str() );
|
xmlSetProp( node, BAD_CAST "navigate_one_branch", BAD_CAST toString( _NavigateOneBranch ).c_str() );
|
||||||
|
|
Loading…
Reference in a new issue