libcrn  3.9.5
A document image processing library
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Types | Public Member Functions | Friends | List of all members
TextBlock Class Reference

Alto text block. More...

#include <CRNAltoTextBlock.hpp>

+ Inheritance diagram for TextBlock:
+ Collaboration diagram for TextBlock:

Classes

class  TextLine
 Alto text line. More...
 

Public Types

typedef std::weak_ptr< TextLineTextLinePtr
 

Public Member Functions

 TextBlock (const TextBlock &)=delete
 
 TextBlock (TextBlock &&)=default
 
virtual ~TextBlock () override
 
TextBlockoperator= (const TextBlock &)=delete
 
TextBlockoperator= (TextBlock &&)=default
 
Option< StringUTF8 > GetLanguage () const
 Returns the language of the text inside the block. More...
 
std::vector< TextLinePtrGetTextLines () const
 Returns the list of text lines in the block. More...
 
size_t GetNbTextLines () const
 Returns the number of text lines in the block. More...
 
TextLineGetTextLine (const Id &id_)
 Returns a text line contained in the block. More...
 
TextLineAddTextLine (const Id &id_, double x, double y, double w, double h)
 Adds a text line in the block. More...
 
TextLineAddTextLineAfter (const Id &pred, const Id &id_, double x, double y, double w, double h)
 Adds a text line in the block. More...
 
TextLineAddTextLineBefore (const Id &next, const Id &id_, double x, double y, double w, double h)
 Adds a text line in the block. More...
 
void RemoveTextLine (const Id &tid)
 Removes a text line. More...
 

Friends

class Space
 

Detailed Description

Alto text block.

Author
Yann LEYDIER

Definition at line 30 of file CRNAltoTextBlock.hpp.

Member Typedef Documentation

typedef std::weak_ptr<TextLine> TextBlock::TextLinePtr

Definition at line 281 of file CRNAltoTextBlock.hpp.

Constructor & Destructor Documentation

TextBlock::TextBlock ( const TextBlock )
delete
TextBlock::TextBlock ( TextBlock &&  )
default
virtual TextBlock::~TextBlock ( )
inlineoverridevirtual

Definition at line 35 of file CRNAltoTextBlock.hpp.

Member Function Documentation

TextLine& TextBlock::AddTextLine ( const Id &  id_,
double  x,
double  y,
double  w,
double  h 
)

Adds a text line in the block.

TextLine& TextBlock::AddTextLineAfter ( const Id &  pred,
const Id &  id_,
double  x,
double  y,
double  w,
double  h 
)

Adds a text line in the block.

TextLine& TextBlock::AddTextLineBefore ( const Id &  next,
const Id &  id_,
double  x,
double  y,
double  w,
double  h 
)

Adds a text line in the block.

Option<StringUTF8> TextBlock::GetLanguage ( ) const

Returns the language of the text inside the block.

size_t TextBlock::GetNbTextLines ( ) const
inline

Returns the number of text lines in the block.

Definition at line 286 of file CRNAltoTextBlock.hpp.

TextLine& TextBlock::GetTextLine ( const Id &  id_)

Returns a text line contained in the block.

std::vector<TextLinePtr> TextBlock::GetTextLines ( ) const

Returns the list of text lines in the block.

TextBlock& TextBlock::operator= ( const TextBlock )
delete
TextBlock& TextBlock::operator= ( TextBlock &&  )
default
void TextBlock::RemoveTextLine ( const Id &  tid)

Removes a text line.

Friends And Related Function Documentation

friend class Space
friend

Definition at line 310 of file CRNAltoTextBlock.hpp.


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