17#ifndef _FGE_C_OBJTEXTLIST_HPP_INCLUDED
18#define _FGE_C_OBJTEXTLIST_HPP_INCLUDED
20#include "FastEngine/fge_extern.hpp"
21#include "FastEngine/C_guiElement.hpp"
22#include "FastEngine/object/C_objRectangleShape.hpp"
23#include "FastEngine/object/C_objText.hpp"
24#include "FastEngine/object/C_object.hpp"
27#define FGE_OBJTEXTLIST_CLASSNAME "FGE:OBJ:TEXTLIST"
36 ObjTextList(ObjTextList
const& r);
37 ~ObjTextList()
override =
default;
51 void addText(tiny_utf8::
string string);
52 std::
size_t getTextCount() const;
53 fge::
ObjText* getText(std::
size_t index);
54 fge::
ObjText const* getText(std::
size_t index) const;
55 void removeAllTexts();
57 void setFont(fge::
Font font);
58 fge::
Font const& getFont() const;
61 fge::Vector2f getBoxSize() const;
63 void setTextScrollRatio(
float ratio);
64 float getTextScrollRatio() const;
66 void setMaxTextCount(std::
size_t max);
67 std::
size_t getMaxTextCount() const;
72 void onGuiResized(fge::
GuiElementHandler const& handler, fge::Vector2f const& size);
73 void refreshSize(fge::Vector2f const& targetSize);
78 float g_textScrollRatio{0.0f};
79 fge::DynamicSize g_boxSize;
83 mutable std::list<fge::ObjText> g_textList;
84 std::size_t g_maxStrings{100};
This class is a wrapper for SDL events.
Definition C_event.hpp:59
This class is a wrapper for the font manager to allow easy manipulation.
Definition C_font.hpp:34
A class to handle highest priority selection of GUI elements.
Definition C_guiElement.hpp:235
Definition C_objRectangleShape.hpp:36
Definition C_objTextList.hpp:33
fge::RectFloat getGlobalBounds() const override
Get the global bounds of the object.
fge::RectFloat getLocalBounds() const override
Get the local bounds of the object (without any transformations)
FGE_OBJ_DRAW_DECLARE char const * getClassName() const override
Get the unique class name of the object.
char const * getReadableClassName() const override
Get a readable version of the class name.
void first(fge::Scene &scene) override
Method called when the object is added to a scene for initialization purposes.
void callbackRegister(fge::Event &event, fge::GuiElementHandler *guiElementHandlerPtr) override
Ask the object to register all callbacks it needs to receive events.
Definition C_objText.hpp:90
The Object class is the base class for all objects in the engine.
Definition C_object.hpp:102
A scene contain a collection of object and handle them.
Definition C_scene.hpp:465
This class is a useful utility to "link" multiple objects around.
Definition C_subscription.hpp:150
Definition C_guiElement.hpp:56