#define DJ_DBG
#include "widgets.h"

SliderTab::SliderTab()
{
  GroupBoxWidget * intGroup = new GroupBoxWidget("Integer Slider");
  _int = new IntSliderWidget;
  GroupBoxWidget * floatGroup = new GroupBoxWidget("Float Slider");
  _float = new FloatSliderWidget;
  
  VLayout * layout = new VLayout(this);
  layout->add(intGroup);
  layout->add(floatGroup);
  layout->stretchAdd();
  
  HLayout * groupLayout = new HLayout(intGroup);
  groupLayout->add(_int);
  groupLayout = new HLayout(floatGroup);
  groupLayout->add(_float);

  _int->sig().set(this, intCallback);
  _float->sig().set(this, floatCallback);
}

void SliderTab::intCallback(int in)
  { djApp->print(Str("value = %1").arg(deflateStr(in))); }
void SliderTab::floatCallback(double in)
  { djApp->print(Str("value = %1").arg(deflateStr(in))); }
