Move windows to uptr. Add simple text editing.

This commit is contained in:
jmsgrogan 2020-06-20 16:34:10 +01:00
parent 2bcc7b3d83
commit b99708e7d3
55 changed files with 1257 additions and 994 deletions

View file

@ -1,9 +1,9 @@
#include "TextElement.h"
TextElement::TextElement(const std::string& content, const DiscretePoint& loc)
: mContent(content),
mLocation(loc),
mFontLabel("fixed")
: mContent(content),
mLocation(loc),
mFontLabel("fixed")
{
}
@ -13,27 +13,27 @@ TextElement::~TextElement()
}
std::shared_ptr<TextElement> TextElement::Create(const std::string& content, const DiscretePoint& loc)
std::unique_ptr<TextElement> TextElement::Create(const std::string& content, const DiscretePoint& loc)
{
return std::make_shared<TextElement>(content, loc);
return std::make_unique<TextElement>(content, loc);
}
DiscretePoint TextElement::GetLocation()
DiscretePoint TextElement::GetLocation() const
{
return mLocation;
return mLocation;
}
std::string TextElement::GetFontLabel() const
{
return mFontLabel;
}
std::string TextElement::GetContent() const
{
return mContent;
}
void TextElement::SetContent(const std::string& content)
{
mContent = content;
}
std::string TextElement::GetFontLabel()
{
return mFontLabel;
}
std::string TextElement::GetContent()
{
return mContent;
mContent = content;
}