2020-06-08 21:27:17 +02:00
|
|
|
//
|
|
|
|
// Created by versustune on 07.06.20.
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef VENO_LABELCOMPONENT_H
|
|
|
|
#define VENO_LABELCOMPONENT_H
|
|
|
|
|
|
|
|
#include "JuceHeader.h"
|
|
|
|
|
2020-06-13 16:52:16 +02:00
|
|
|
enum LabelPosition
|
|
|
|
{
|
2020-06-08 21:27:17 +02:00
|
|
|
NO_LABEL,
|
|
|
|
TOP,
|
|
|
|
BOTTOM
|
|
|
|
};
|
2020-06-13 16:52:16 +02:00
|
|
|
class LabelComponent : public Component
|
|
|
|
{
|
2020-06-08 21:27:17 +02:00
|
|
|
public:
|
2020-06-13 16:52:16 +02:00
|
|
|
LabelComponent (Component* parent, std::string name);
|
|
|
|
~LabelComponent () override;
|
|
|
|
void resized () override;
|
|
|
|
void paint (Graphics& g) override;
|
|
|
|
void setPosition (LabelPosition position);
|
|
|
|
LabelPosition getLabelPosition ();
|
2020-06-08 21:27:17 +02:00
|
|
|
protected:
|
|
|
|
private:
|
|
|
|
std::string m_text;
|
2020-06-13 16:52:16 +02:00
|
|
|
Component* m_parent;
|
2020-06-08 21:27:17 +02:00
|
|
|
LabelPosition m_position = LabelPosition::NO_LABEL;
|
|
|
|
std::shared_ptr<Label> m_label;
|
|
|
|
};
|
|
|
|
#endif //VENO_LABELCOMPONENT_H
|