JNGL
TextLine.hpp
Go to the documentation of this file.
1 // Copyright 2020 Jan Niklas Hasse <[email protected]>
2 // For conditions of distribution and use, see copyright notice in LICENSE.txt
5 #pragma once
6 
7 #include "Drawable.hpp"
8 
9 #include <memory>
10 
11 namespace jngl {
12 
13 class Font;
14 class FontImpl;
15 
17 class TextLine : public Drawable {
18 public:
19  TextLine(Font&, std::string text);
20  void step() override;
21  void draw() const override;
22 
23 private:
24  std::string text;
26 };
27 
28 } // namespace jngl
Contains jngl::Drawable class.
Base class for drawable objects with a position and a rectangle size.
Definition: Drawable.hpp:12
Font loaded from a TTF or OTF file.
Definition: font.hpp:18
Rectangle shaped text (in contrast to jngl::Text this only represents one line)
Definition: TextLine.hpp:17
void draw() const override
Called when drawing a frame.
void step() override
Advance object's state.
JNGL's main namespace.
Definition: App.hpp:10