5#ifndef INCLUDE_FIFECHAN_WIDGETS_LABEL_HPP_
6#define INCLUDE_FIFECHAN_WIDGETS_LABEL_HPP_
10#include "fifechan/graphics.hpp"
11#include "fifechan/platform.hpp"
12#include "fifechan/widget.hpp"
21 class FIFEGUI_API Label :
public Widget
32 explicit Label(std::string caption);
Abstract interface providing primitive drawing functions (lines, rectangles, etc.).
Alignment
Alignments for text drawing.
void resizeToContent(bool recursion) override
Resize this widget to fit its content.
void draw(Graphics *graphics) override
Draws the widget.
void setAlignment(Graphics::Alignment alignment)
Sets the alignment of the caption.
void adjustSize() override
Resizes the widget's size to fit the content exactly.
std::string const & getCaption() const
Gets the caption of the label.
Graphics::Alignment getAlignment() const
Gets the alignment of the caption.
void setCaption(std::string const &caption)
Sets the caption of the label.
Graphics::Alignment mAlignment
Holds the alignment of the caption.
std::string mCaption
Holds the caption of the label.
void adjustSizeImpl()
Adjusts the size of the label to fit the caption.