5#ifndef INCLUDE_FIFECHAN_WIDGETS_LABEL_HPP_
6#define INCLUDE_FIFECHAN_WIDGETS_LABEL_HPP_
12#include "fifechan/platform.hpp"
15#include "fifechan/graphics.hpp"
16#include "fifechan/widget.hpp"
25 class FIFEGUI_API Label :
public Widget
37 explicit Label(std::string caption);
Abstract interface providing primitive drawing functions (lines, rectangles, etc.).
VerticalAlignment
Vertical alignments for text drawing.
Alignment
Horizontal alignments for text drawing.
void draw(Graphics *graphics) override
Draws the widget.
void setVerticalAlignment(Graphics::VerticalAlignment alignment)
Sets the vertical alignment of the caption.
void setAlignment(Graphics::Alignment alignment)
Sets the alignment of the caption.
void adjustSize() override
Resizes the widget's size to fit the content exactly.
void resizeToContent(bool recursion=true) override
Resizes the widget's size to fit the content exactly, calls recursively all childs.
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 horizontal alignment of the caption.
std::string mCaption
Holds the caption of the label.
Graphics::VerticalAlignment mVerticalAlignment
Holds the vertical alignment of the caption.
Graphics::VerticalAlignment getVerticalAlignment() const
Gets the vertical alignment of the caption.
void adjustSizeImpl()
Adjusts the size of the label to fit the caption.
Used replacement tokens by configure_file():