class text : public planet::ui::reflowable {
renderer &r;
sdl::font &font;
affine::extents2d space;
struct word {
std::string word;
std::optional<sdl::texture> texture;
};
using layout_type =
planet::ui::layout<std::vector<planet::ui::element<word>>>;
layout_type elements;
constrained_type do_reflow(
reflow_parameters const &,
constrained_type const &within) override;
affine::rectangle2d move_sub_elements(
reflow_parameters const &,
affine::rectangle2d const &r) override {
return r;
}
public:
text(renderer &, sdl::font &, std::string_view);