#pragma once

#include "AlterableObject.hpp"
#include "Label.hpp"
#include "Shader.hpp"
#include "ShaderCodes.hpp"
#include "DataEntry.hpp"

/*
   Class: DataElement

     *Abstract* class that implements the skeleton of a data element.

     *Inherits* from <AlterableObject>.
*/
class DataElement: public AlterableObject {
  public:
    /*
       Constructor: DataElement

         Unused constructor of abstract class.
    */
    DataElement();

    /*
       Destructor: ~DataElement

         *Virtual*. Releases all allocated resources.
    */
    virtual ~DataElement();


    /*
       Function: GetDataEntry

         Returns the data entry connected to the data element.

       Returns:

         The data entry connected to the data element.
    */
    DataEntry* GetDataEntry();

    /*
       Function: GetLabel

         Returns the label connected to the data element.

       Returns:

         The Label connected to the data element.
    */
    Label* GetLabel();

    /*
       Function: GetLeft

         Returns the left value of the data element.

       Returns:

         The left value of the data element.
    */
    float GetLeft();

    /*
       Function: GetTop

         Returns the top value of the data element.

       Returns:

         The top value of the data element.
    */
    float GetTop();

    /*
       Function: GetBottom

         Returns the bottom value of the data element.

       Returns:

         The bottom value of the data element.
    */
    float GetBottom();

    /*
       Function: GetWidth

         Returns the width of the data element.

       Returns:

         The width of the data element.
    */
    float GetWidth();

    /*
       Function: GetHeight

         Returns the height of the data element.

       Returns:

         The height of the data element.
    */
    float GetHeight();

    /*
       Function: GetAlpha

         Returns the alpha color value of the data element.

       Returns:

         The alpha color value of the data element.
    */
    float GetAlpha();


    /*
       Function: Scale

         *Virtual*. Scales the object.

       Parameters:

         fDeltaWidth - Total horizontal scaling value.
         fDeltaHeight - Total vertical scaling value.
    */
    virtual void Scale(float fDeltaWidth, float fDeltaHeight) = 0;

  protected:
    DataEntry* pDataEntry;
    float fLeft;
    float fTop;
    float fBottom;
    float fWidth;
    float fHeight;
    QString sText;
    glm::vec4* vVertices;
    glm::vec4* vColors;
    int* vIndices;
    Label* pLabel;
    Shader* pShader;
};