#include "FormattedText.h"

FormattedText :: FormattedText ()
{
  s = "";
  helpIndexIfClicked = "NULL_INDEX";
  colorIndex = 0;
  newlineAfter = false;
}

FormattedText :: ~FormattedText ()
{

}

void FormattedText :: setText (const string & a)
{
  s.assign(a);
}

const string & FormattedText :: getText ()
{
  return s;
}

void FormattedText :: setColorIndex (uint8_t a)
{
  colorIndex = a;
}

uint8_t FormattedText :: getColorIndex ()
{
  return colorIndex;
}

void FormattedText :: setHelpIndex (const string & a)
{
  helpIndexIfClicked = a;
}

const string & FormattedText :: getHelpIndex ()
{
  return helpIndexIfClicked;
}

void FormattedText :: setNewline (bool a)
{
  newlineAfter = a;
}

bool FormattedText :: getNewline ()
{
  return newlineAfter;
}

void FormattedText :: setPosition (uint16_t a, uint16_t b)
{
  x=a;
  y=b;
}

uint16_t FormattedText :: getX()
{
  return x;
}

uint16_t FormattedText :: getY()
{
  return y;
}

void FormattedText::setDimensions (int a, int b)
{
  w=a;
  h=b;
}

int FormattedText::getWidth()
{
  return w;
}

int FormattedText::getHeight()
{
  return h;
}

void FormattedText::clear ()
{
  s = "";
  helpIndexIfClicked = "NULL_INDEX";
  colorIndex = 0;
  newlineAfter = false;
}
