reVeno/Source/Veno/GUI/Components/LabelComponent.cpp

41 lines
699 B
C++
Raw Normal View History

//
// Created by versustune on 07.06.20.
//
#include "LabelComponent.h"
LabelComponent::LabelComponent (Component* parent, std::string name)
{
m_text = name;
m_parent = parent;
2020-06-14 21:14:28 +02:00
m_label = std::make_shared<Label>(m_parent->getName(), name);
addAndMakeVisible(*m_label);
}
LabelComponent::~LabelComponent ()
{
2020-06-14 21:14:28 +02:00
m_label.reset();
}
void LabelComponent::resized ()
{
if (m_label != nullptr)
{
2020-06-14 21:14:28 +02:00
m_label->setBounds(0, 0, getWidth(), getHeight());
}
}
void LabelComponent::paint (Graphics& g)
{
}
void LabelComponent::setPosition (LabelPosition position)
{
m_position = position;
}
LabelPosition LabelComponent::getLabelPosition ()
{
return m_position;
}