#define DJ_DBG
#include "widgets.h"

VecTab::VecTab()
{
  GroupBoxWidget * vec2iGroup = new GroupBoxWidget("Vec2i");
  _vec2i = new Vec2iWidget;
  GroupBoxWidget * vec2fGroup = new GroupBoxWidget("Vec2f");
  _vec2f = new Vec2fWidget;
  
  VLayout * layout = new VLayout(this);
  layout->add(vec2iGroup);
  layout->add(vec2fGroup);
  layout->stretchAdd();
  
  HLayout * groupLayout = new HLayout(vec2iGroup);
  groupLayout->add(_vec2i);
  groupLayout = new HLayout(vec2fGroup);
  groupLayout->add(_vec2f);

  _vec2i->sig().set(this, vec2iCallback);
  _vec2f->sig().set(this, vec2fCallback);
}

void VecTab::vec2iCallback(const Vec2i & in)
  { djApp->print(Str("value = %1").arg(deflateStr(in))); }
void VecTab::vec2fCallback(const Vec2f & in)
  { djApp->print(Str("value = %1").arg(deflateStr(in))); }
