bwidgets/inc/basic_widgets/w/feat/font_handler.hpp

35 lines
1.0 KiB
C++
Raw Permalink Normal View History

2021-08-06 14:22:56 +02:00
#ifndef BWIDGETS_FONT_HANDLER_HPP
#define BWIDGETS_FONT_HANDLER_HPP
#include <basic_widgets/core/font.hpp>
2021-08-06 14:22:56 +02:00
namespace bwidgets
{
class FontHandler
{
public:
2021-08-06 14:22:56 +02:00
inline static const Color default_font_color_bg {255, 255, 255,
SDL_ALPHA_OPAQUE};
inline static const Color default_font_color_fg {0, 0, 0, SDL_ALPHA_OPAQUE};
2021-08-08 14:30:56 +02:00
FontHandler(const FontHandler&) = delete;
2021-08-14 09:25:28 +02:00
FontHandler(FontHandler&&) = delete;
auto operator=(const FontHandler&) = delete;
2021-08-14 09:25:28 +02:00
auto operator=(FontHandler&&) = delete;
2021-08-08 16:00:22 +02:00
virtual ~FontHandler() noexcept = default;
2021-08-23 23:50:14 +02:00
// Set the used font.
virtual void font(std::shared_ptr<Font> f) = 0;
2021-08-27 01:21:25 +02:00
// Set background color used for shaded text rendering
// mode.
virtual void font_color_bg(Color c) = 0;
2021-08-27 01:21:25 +02:00
// Set foreground (glyphs) color.
virtual void font_color_fg(Color c) = 0;
protected:
FontHandler() noexcept = default;
};
}
#endif