#ifndef BWIDGETS_CAPTION_HPP #define BWIDGETS_CAPTION_HPP #include #include #include struct SDL_Surface; namespace bwidgets { class Caption : public virtual Widget, public virtual FontHandler, public virtual TextureHandler { public: enum struct Alignment { CENTER, LEFT, RIGHT }; inline static const Color default_color_bg = {255, 255, 255, SDL_ALPHA_OPAQUE}; inline static const Color default_color_fg = {0, 0, 0, SDL_ALPHA_OPAQUE}; inline static const Size default_margins = {3, 3}; Alignment alignment {Alignment::LEFT}; Size margins {default_margins}; using Widget::Widget; virtual void render_mode(Font::RenderMode) = 0; [[nodiscard]] virtual auto text() const noexcept -> const std::string& = 0; virtual void text(const std::string&) = 0; }; } #endif