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

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

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

	TkGridConstraints* c=(TkGridConstraints*)constraints;
	s=s+"grid "+component->getUid()+" -in "+parent->getUid()+" "+c->toString();
	interp->eval(s);
}

void TkGridLayout::removeComponent(TclInterp* interp,TkContainer* parent,TkBase* component) const
{
	string s;
	
	s=string("grid remove ")+component->getUid();

	interp->eval(s);
}

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

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