#include "tk_place_layout.h"
#include "tk_place_constraints.h"

#include "tk_base.h"
#include "tk_container.h"
#include "../tcl_interp.h"

const char* TkPlaceLayout::type="TkPlaceLayout";

void TkPlaceLayout::manageLayout(TclInterp* interp,TkContainer* parent,TkBase* component,TObject* constraints) const
{
	string s;

	TkPlaceConstraints* pc=(TkPlaceConstraints*)constraints;
	s=s+"place "+component->getUid()+" -in "+parent->getUid()+" "+pc->toString();
	interp->eval(s);
}

void TkPlaceLayout::removeComponent(TclInterp* interp,TkContainer* parent,TkBase* component) const
{
	string s;

	s=s+"place forget "+component->getUid();
    
	interp->eval(s);
}

void TkPlaceLayout::doSerialize(TiXmlElement& element) const
{
}

void TkPlaceLayout::doDeserialize(const TiXmlElement& element)
{
}


    