neoGFX
C++ GPU-oriented GUI library and app/game creation framework.
neogfx::text Class Reference

#include <text.hpp>

Inheritance diagram for neogfx::text:
neogfx::shape neogfx::i_shape neogfx::i_game_object neogfx::i_mesh

Public Member Functions

 text (i_shape_container &aContainer, const vec3 &aPosition, const std::string &aText, const neogfx::font &aFont, const neogfx::text_appearance &aAppearance, neogfx::alignment aAlignment=alignment::Left)
 
const std::string & value () const
 
void set_value (const std::string &aText)
 
const neogfx::fontfont () const
 
void set_font (const neogfx::font &aFont)
 
const neogfx::text_appearanceappearance () const
 
void set_appearance (const neogfx::text_appearance &aAppearance)
 
neogfx::alignment alignment () const
 
void set_alignment (neogfx::alignment aAlignment)
 
const optional_dimensionborder () const
 
void set_border (const optional_dimension &aBorder)
 
const optional_marginsmargins () const
 
void set_margins (const optional_margins &aMargins)
 
vec3 extents () const override
 
rect bounding_box_2d (bool aWithPosition=true) const override
 
void paint (graphics_context &aGraphicsContext) const override
 
- Public Member Functions inherited from neogfx::shape
 shape ()
 
 shape (const colour &aColour)
 
 shape (const i_texture &aTexture, const optional_animation_info &aAnimationInfo=optional_animation_info())
 
 shape (const i_image &aImage, const optional_animation_info &aAnimationInfo=optional_animation_info())
 
 shape (const i_texture &aTexture, const rect &aTextureRect, const optional_animation_info &aAnimationInfo=optional_animation_info())
 
 shape (const i_image &aImage, const rect &aTextureRect, const optional_animation_info &aAnimationInfo=optional_animation_info())
 
 shape (i_shape_container &aContainer)
 
 shape (i_shape_container &aContainer, const colour &aColour)
 
 shape (i_shape_container &aContainer, const i_texture &aTexture, const optional_animation_info &aAnimationInfo=optional_animation_info())
 
 shape (i_shape_container &aContainer, const i_image &aImage, const optional_animation_info &aAnimationInfo=optional_animation_info())
 
 shape (i_shape_container &aContainer, const i_texture &aTexture, const rect &aTextureRect, const optional_animation_info &aAnimationInfo=optional_animation_info())
 
 shape (i_shape_container &aContainer, const i_image &aImage, const rect &aTextureRect, const optional_animation_info &aAnimationInfo=optional_animation_info())
 
 shape (const shape &aOther)
 
object_category category () const override
 
const i_shapeas_shape () const override
 
i_shapeas_shape () override
 
const i_collidable_objectas_collidable_object () const override
 
i_collidable_objectas_collidable_object () override
 
const i_physical_objectas_physical_object () const override
 
i_physical_objectas_physical_object () override
 
bool killed () const override
 
void kill () override
 
vertex_list_pointer vertices () const override
 
texture_list_pointer textures () const override
 
face_list faces () const override
 
face_list active_faces () const override
 
void activate_faces (face_list aActiveFaces) const override
 
mat44 transformation_matrix () const override
 
const vertex_listtransformed_vertices () const override
 
void set_vertices (vertex_list_pointer aVertices) override
 
void set_textures (texture_list_pointer aTextures) override
 
void set_faces (face_list aFaces) override
 
const i_shape_containercontainer () const override
 
i_shape_containercontainer () override
 
bool is_tag () const override
 
i_shapetag_of () const override
 
void set_tag_of (i_shape &aTagOf, const vec3 &aOffset=vec3{}) override
 
const vec3tag_offset () const override
 
void set_tag_offset (const vec3 &aOffset) override
 
void unset_tag_of () override
 
frame_index frame_count () const override
 
const i_shape_frameshape_frame (frame_index aFrameIndex) const override
 
i_shape_frameshape_frame (frame_index aFrameIndex) override
 
void add_frame (i_shape_frame &aFrame) override
 
void add_frame (std::shared_ptr< i_shape_frame > aFrame) override
 
void replace_frame (frame_index aFrameIndex, i_shape_frame &aFrame) override
 
void replace_frame (frame_index aFrameIndex, std::shared_ptr< i_shape_frame > aFrame) override
 
void remove_frame (frame_index aFrameIndex) override
 
const animation_framesanimation () const override
 
bool repeat_animation () const override
 
const animation_framecurrent_animation_frame () const override
 
bool has_animation_finished () const override
 
void animation_finished () override
 
frame_index current_frame_index () const override
 
const i_shape_framecurrent_frame () const override
 
i_shape_framecurrent_frame ()
 
vec3 origin () const override
 
vec3 position () const override
 
void set_animation (const animation_frames &aAnimation) override
 
void set_current_frame (frame_index aFrameIndex) override
 
void set_origin (const vec3 &aOrigin) override
 
void set_position (const vec3 &aPosition) override
 
void clear_extents () override
 
void set_extents (const vec3 &aExtents) override
 
bool has_transformation_matrix () const override
 
void clear_transformation_matrix () override
 
void set_transformation_matrix (const mat33 &aTransformationMatrix) override
 
void set_transformation_matrix (const mat44 &aTransformationMatrix) override
 
bool update (time_interval aNow) override
 
virtual void clear_vertices_cache ()
 
- Public Member Functions inherited from neogfx::i_shape
virtual ~i_shape ()
 
void set_origin (const vec2 &aOrigin)
 
void set_origin (const point &aOrigin)
 
void set_position (const vec2 &aPosition)
 
void set_position (const point &aPosition)
 
void set_extents (const vec2 &aExtents)
 
void set_extents (const size &aExtents)
 
- Public Member Functions inherited from neogfx::i_game_object
virtual ~i_game_object ()
 
virtual const object_typetype () const
 

Additional Inherited Members

- Public Types inherited from neogfx::shape
typedef i_shape::frame_index frame_index
 
typedef i_shape::time_interval time_interval
 
typedef i_shape::animation_frame animation_frame
 
typedef i_shape::animation_frames animation_frames
 
typedef i_shape::time_interval time_interval
 
typedef i_shape::optional_time_interval optional_time_interval
 
typedef boost::optional< animation_infooptional_animation_info
 
- Public Types inherited from neogfx::i_shape
typedef std::size_t frame_index
 
typedef scalar time_interval
 
typedef std::pair< frame_index, time_intervalanimation_frame
 
typedef std::vector< animation_frameanimation_frames
 
typedef boost::optional< time_intervaloptional_time_interval
 

Detailed Description

Definition at line 28 of file text.hpp.

Constructor & Destructor Documentation

◆ text()

neogfx::text::text ( i_shape_container aContainer,
const vec3 aPosition,
const std::string &  aText,
const neogfx::font aFont,
const neogfx::text_appearance aAppearance,
neogfx::alignment  aAlignment = alignment::Left 
)

Member Function Documentation

◆ alignment()

neogfx::alignment neogfx::text::alignment ( ) const

◆ appearance()

const neogfx::text_appearance& neogfx::text::appearance ( ) const

◆ border()

const optional_dimension& neogfx::text::border ( ) const

◆ bounding_box_2d()

rect neogfx::text::bounding_box_2d ( bool  aWithPosition = true) const
overridevirtual

Reimplemented from neogfx::shape.

◆ extents()

vec3 neogfx::text::extents ( ) const
overridevirtual

Reimplemented from neogfx::shape.

◆ font()

const neogfx::font& neogfx::text::font ( ) const

◆ margins()

const optional_margins& neogfx::text::margins ( ) const

◆ paint()

void neogfx::text::paint ( graphics_context aGraphicsContext) const
overridevirtual

Reimplemented from neogfx::shape.

◆ set_alignment()

void neogfx::text::set_alignment ( neogfx::alignment  aAlignment)

◆ set_appearance()

void neogfx::text::set_appearance ( const neogfx::text_appearance aAppearance)

◆ set_border()

void neogfx::text::set_border ( const optional_dimension aBorder)

◆ set_font()

void neogfx::text::set_font ( const neogfx::font aFont)

◆ set_margins()

void neogfx::text::set_margins ( const optional_margins aMargins)

◆ set_value()

void neogfx::text::set_value ( const std::string &  aText)

◆ value()

const std::string& neogfx::text::value ( ) const

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