#include <gui/containers/CustomContainer1.hpp>
#include <gui/screen1_screen/Screen1View.hpp>

CustomContainer1::CustomContainer1() :
	BoxClickedCallback(this, &CustomContainer1::HiddenBoxClickHandler)
{
	box1.setClickAction(BoxClickedCallback);
}

void CustomContainer1::initialize()
{
    CustomContainer1Base::initialize();
}

void CustomContainer1::HiddenBoxClickHandler(const Box& b, const ClickEvent& evt)
{
  if(evt.getType() != ClickEvent::PRESSED) return;

  if (&b == &box1)
  {
    viewPtr->calledFromCC();
  }
}

void CustomContainer1::setPtr(Screen1View* ptr)
{
	viewPtr = ptr;
}