37 lines
879 B
C++
37 lines
879 B
C++
#pragma once
|
|
|
|
#include "DiscretePoint.h"
|
|
|
|
#include <memory>
|
|
#include <string>
|
|
|
|
class Color;
|
|
|
|
class TextElement
|
|
{
|
|
std::string mContent;
|
|
DiscretePoint mLocation;
|
|
std::string mFontLabel;
|
|
std::unique_ptr<Color> mFillColor;
|
|
std::unique_ptr<Color> mStrokeColor;
|
|
|
|
public:
|
|
|
|
TextElement(const std::string& content, const DiscretePoint& loc);
|
|
|
|
~TextElement();
|
|
|
|
static std::unique_ptr<TextElement> Create(const std::string& content, const DiscretePoint& loc);
|
|
|
|
Color* GetFillColor() const;
|
|
Color* GetStrokeColor() const;
|
|
|
|
DiscretePoint GetLocation() const;
|
|
std::string GetContent() const;
|
|
std::string GetFontLabel() const;
|
|
void SetContent(const std::string& content);
|
|
void SetFillColor(std::unique_ptr<Color> color);
|
|
void SetStrokeColor(std::unique_ptr<Color> color);
|
|
};
|
|
|
|
using TextElementUPtr = std::unique_ptr<TextElement>;
|