1.10
Public Types | Public Member Functions | List of all members
TextRect Class Reference

#include <text.h>

Public Types

enum class  TextRectFlag : uint32_t { selected = detail::bit(0) , eonel = detail::bit(1) , bol = detail::bit(2) }
 TextRect flags. More...
 
using TextRectFlags = egt::Flags< TextRectFlag >
 TextRect flags.
 

Public Member Functions

 TextRect (uint32_t behave, const Rect &rect, std::string text, const cairo_text_extents_t &te, const TextRectFlags &flags={}) noexcept
 
bool beginning_of_line (void) const
 
uint32_t behave (void) const
 
bool can_consolidate (const TextRect &r) const noexcept
 
TextRectconsolidate (const TextRect &r, cairo_t *cr) noexcept
 
void deselect (void)
 
bool end_of_non_empty_line (void) const
 
const TextRectFlagsflags (void) const
 
bool is_selected (void) const
 
size_t length (void) const noexcept
 
void mark_beginning_of_line (void)
 
void point (const Point &p)
 
void rect (const Rect &r)
 
const Rectrect (void) const
 
void select (void)
 
TextRect split (size_t pos, cairo_t *cr) noexcept
 
const std::string & text (void) const
 
const cairo_text_extents_t & text_extents (void) const
 

Member Typedef Documentation

◆ TextRectFlags

TextRect flags.

Member Enumeration Documentation

◆ TextRectFlag

enum class TextRectFlag : uint32_t
strong

TextRect flags.

Enumerator
selected 

Text is selected.

eonel 

End of non-empty line.

bol 

Beginning of line.

Constructor & Destructor Documentation

◆ TextRect()

TextRect ( uint32_t  behave,
const Rect rect,
std::string  text,
const cairo_text_extents_t &  te,
const TextRectFlags flags = {} 
)
inlinenoexcept

Member Function Documentation

◆ beginning_of_line()

bool beginning_of_line ( void  ) const
inline

◆ behave()

uint32_t behave ( void  ) const
inline

◆ can_consolidate()

bool can_consolidate ( const TextRect r) const
inlinenoexcept

◆ consolidate()

TextRect & consolidate ( const TextRect r,
cairo_t *  cr 
)
noexcept

◆ deselect()

void deselect ( void  )
inline

◆ end_of_non_empty_line()

bool end_of_non_empty_line ( void  ) const
inline

◆ flags()

const TextRectFlags & flags ( void  ) const
inline

◆ is_selected()

bool is_selected ( void  ) const
inline

◆ length()

size_t length ( void  ) const
noexcept

◆ mark_beginning_of_line()

void mark_beginning_of_line ( void  )
inline

◆ point()

void point ( const Point p)
inline

◆ rect() [1/2]

void rect ( const Rect r)
inline

◆ rect() [2/2]

const Rect & rect ( void  ) const
inline

◆ select()

void select ( void  )
inline

◆ split()

TextRect split ( size_t  pos,
cairo_t *  cr 
)
noexcept

◆ text()

const std::string & text ( void  ) const
inline

◆ text_extents()

const cairo_text_extents_t & text_extents ( void  ) const
inline