versustunez
d735c1d076
- added LICENSE.txt - added LabelComponent.cpp - renamed some variables - moved instance id to processor
35 lines
678 B
C++
35 lines
678 B
C++
//
|
|
// Created by versustune on 07.06.20.
|
|
//
|
|
|
|
#ifndef VENO_LABELCOMPONENT_H
|
|
#define VENO_LABELCOMPONENT_H
|
|
|
|
#include "JuceHeader.h"
|
|
|
|
enum LabelPosition {
|
|
NO_LABEL,
|
|
TOP,
|
|
BOTTOM
|
|
};
|
|
class LabelComponent : public Component {
|
|
public:
|
|
LabelComponent(Component *parent, std::string name);
|
|
~LabelComponent() override;
|
|
|
|
void resized() override;
|
|
|
|
void paint(Graphics &g) override;
|
|
void setPosition(LabelPosition position);
|
|
LabelPosition getLabelPosition();
|
|
protected:
|
|
private:
|
|
std::string m_text;
|
|
Component *m_parent;
|
|
LabelPosition m_position = LabelPosition::NO_LABEL;
|
|
std::shared_ptr<Label> m_label;
|
|
};
|
|
|
|
|
|
#endif //VENO_LABELCOMPONENT_H
|