Falcon
Public Member Functions | Protected Attributes | List of all members
UI::Label Class Reference

#include <Label.h>

Inheritance diagram for UI::Label:
UI::CanvasItem

Public Member Functions

 Label ()
 
virtual ~Label ()
 
void Commands (nk_context *ctx) override
 
void SetWrap (bool wrap)
 
void SetText (std::string txt)
 
void SetAlignment (nk_flags alignment)
 
void SetVerticalAlignment (nk_flags alignment)
 
void SetTextColor (glm::vec4 color)
 
- Public Member Functions inherited from UI::CanvasItem
 CanvasItem ()
 
virtual ~CanvasItem ()
 
void AddChild (CanvasItem *child)
 
void SetBounds (glm::vec4 bounds)
 
void UpdateBounds ()
 
virtual void Draw (nk_context *ctx)
 
void SetColor (glm::vec4 color)
 
void SetFlags (int32_t flags)
 
void SetActive (bool active)
 
void SetStatus (ItemStatus status)
 

Protected Attributes

bool m_wrap
 
std::string m_text
 
nk_color m_textColor
 
nk_flags m_hAlignment
 
nk_flags m_vAlignment
 
Fontm_font
 
- Protected Attributes inherited from UI::CanvasItem
struct nk_rect m_bounds
 
nk_color m_color
 
i32 m_flags
 
boost::container::vector< CanvasItem * > m_children
 
CanvasItemparent = nullptr
 
bool m_active = true
 
ItemStatus m_status
 
std::string m_title
 

Detailed Description

A basic label

Constructor & Destructor Documentation

◆ Label()

UI::Label::Label ( )

Constructor for a label

◆ ~Label()

UI::Label::~Label ( )
virtual

Label destructor

Member Function Documentation

◆ Commands()

void UI::Label::Commands ( nk_context *  ctx)
overridevirtual

The draw commands for the label

Parameters
ctx- The nuklear context to draw to

Implements UI::CanvasItem.

◆ SetAlignment()

void UI::Label::SetAlignment ( nk_flags  alignment)
inline

◆ SetText()

void UI::Label::SetText ( std::string  txt)
inline

◆ SetTextColor()

void UI::Label::SetTextColor ( glm::vec4  color)
inline

◆ SetVerticalAlignment()

void UI::Label::SetVerticalAlignment ( nk_flags  alignment)
inline

◆ SetWrap()

void UI::Label::SetWrap ( bool  wrap)
inline

Member Data Documentation

◆ m_font

Font* UI::Label::m_font
protected

◆ m_hAlignment

nk_flags UI::Label::m_hAlignment
protected

◆ m_text

std::string UI::Label::m_text
protected

◆ m_textColor

nk_color UI::Label::m_textColor
protected

◆ m_vAlignment

nk_flags UI::Label::m_vAlignment
protected

◆ m_wrap

bool UI::Label::m_wrap
protected

The documentation for this class was generated from the following files: