UGDK  0.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
ugdk::text::TextBox Class Reference

#include <ugdk/text/textbox.h>

Inheritance diagram for ugdk::text::TextBox:
Collaboration diagram for ugdk::text::TextBox:

Public Types

enum  IdentStyle { LEFT, CENTER, RIGHT }
 

Public Member Functions

 TextBox (const std::string &message, double width, Font *font)
 
 ~TextBox ()
 
void ChangeMessage (const std::string &message)
 This operation is slow. More...
 
void Draw (graphic::Canvas &) const override
 
void set_ident_style (IdentStyle style)
 
double width () const
 
const ugdk::math::Vector2Dsize () const override
 
IdentStyle ident_style () const
 
- Public Member Functions inherited from ugdk::ui::Drawable
virtual ~Drawable ()
 
void set_draw_setup_function (const std::function< void(const Drawable *, graphic::Canvas &)> &func)
 
void set_hotspot (const ugdk::math::Vector2D &_hotspot)
 
void set_hotspot (const HookPoint &hook)
 
double width () const
 
double height () const
 
const math::Vector2Dhotspot () const
 

Additional Inherited Members

- Protected Member Functions inherited from ugdk::ui::Drawable
 Drawable ()
 
- Protected Attributes inherited from ugdk::ui::Drawable
math::Vector2D hotspot_
 
std::function< void(const
Drawable *, graphic::Canvas &)> 
draw_setup_function_
 

Member Enumeration Documentation

Enumerator
LEFT 
CENTER 
RIGHT 

Constructor & Destructor Documentation

ugdk::text::TextBox::TextBox ( const std::string &  message,
double  width,
Font font 
)
ugdk::text::TextBox::~TextBox ( )

Member Function Documentation

void ugdk::text::TextBox::ChangeMessage ( const std::string &  message)

This operation is slow.

void ugdk::text::TextBox::Draw ( graphic::Canvas ) const
overridevirtual

Implements ugdk::ui::Drawable.

IdentStyle ugdk::text::TextBox::ident_style ( ) const
inline
void ugdk::text::TextBox::set_ident_style ( IdentStyle  style)
inline
const ugdk::math::Vector2D& ugdk::text::TextBox::size ( ) const
inlineoverridevirtual

Implements ugdk::ui::Drawable.

double ugdk::text::TextBox::width ( ) const
inline

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