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
Space Class Reference

A print space on a page. More...

#include <CRNAltoSpace.hpp>

+ Inheritance diagram for Space:
+ Collaboration diagram for Space:

Classes

class  Block
 Base class for blocks in spaces. More...
 
class  ComposedBlock
 A composed block in a space. More...
 
class  GraphicalElement
 Graphical element in a space. More...
 
class  Illustration
 Illustration in a space. More...
 

Public Types

typedef std::weak_ptr< BlockBlockPtr
 
typedef std::weak_ptr< TextBlockTextBlockPtr
 
typedef std::weak_ptr
< Illustration
IllustrationPtr
 
typedef std::weak_ptr
< GraphicalElement
GraphicalElementPtr
 
typedef std::weak_ptr
< ComposedBlock
ComposedBlockPtr
 

Public Member Functions

 Space (const Space &)=delete
 
 Space (Space &&)=default
 
virtual ~Space () override
 
Spaceoperator= (const Space &)=delete
 
Spaceoperator= (Space &&)=default
 
Option< Id > GetId () const
 Returns the id of the element. More...
 
std::vector< Id > GetStyles () const
 Returns the list of style references. More...
 
void AddStyle (const Id &styleid)
 Adds a reference to a style. More...
 
void RemoveStyle (const Id &styleid)
 Adds a reference to a style. More...
 
double GetHeight () const
 Returns the height of the element. More...
 
void SetHeight (double d)
 Sets the height of the element. More...
 
double GetWidth () const
 Returns the width of the element. More...
 
void SetWidth (double d)
 Sets the width of the element. More...
 
double GetHPos () const
 Returns the abscissa of the element. More...
 
void SetHPos (double d)
 Sets the abscissa of the element. More...
 
double GetVPos () const
 Returns the ordinate of the element. More...
 
void SetVPos (double d)
 Sets the ordinate of the element. More...
 
BlockGetBlock (const Id &bid)
 Returns a text block contained in the print space. More...
 
std::vector< BlockPtrGetBlocks () const
 Returns the list of blocks in the print space. More...
 
const std::vector
< std::weak_ptr< TextBlock > > & 
GetTextBlocks () const
 Returns the list of text blocks in the print space. More...
 
TextBlockGetTextBlock (const Id &id)
 Returns a text block contained in the print space. More...
 
TextBlockAddTextBlock (const Id &id_, int x, int y, int w, int h)
 Adds a text block in the print space. More...
 
TextBlockAddTextBlockAfter (const Id &pred, const Id &id_, int x, int y, int w, int h)
 Adds a text block in the print space. More...
 
TextBlockAddTextBlockBefore (const Id &next, const Id &id_, int x, int y, int w, int h)
 Adds a text block in the print space. More...
 
const std::vector
< IllustrationPtr > & 
GetIllustrations () const
 Returns the list of illustrations in the print space. More...
 
IllustrationAddIllustration (const Id &id_, int x, int y, int w, int h)
 Adds an illustration in the print space. More...
 
IllustrationAddIllustrationAfter (const Id &pred, const Id &id_, int x, int y, int w, int h)
 Adds an illustration in the print space. More...
 
IllustrationAddIllustrationBefore (const Id &next, const Id &id_, int x, int y, int w, int h)
 Adds an illustration in the print space. More...
 
const std::vector
< GraphicalElementPtr > & 
GetGraphicalElements () const
 Returns the list of graphical elements in the print space. More...
 
GraphicalElementAddGraphicalElement (const Id &id_, int x, int y, int w, int h)
 Adds an graphical element in the print space. More...
 
GraphicalElementAddGraphicalElementAfter (const Id &pred, const Id &id_, int x, int y, int w, int h)
 Adds an graphical element in the print space. More...
 
GraphicalElementAddGraphicalElementBefore (const Id &next, const Id &id_, int x, int y, int w, int h)
 Adds an graphical element in the print space. More...
 
const std::vector
< ComposedBlockPtr > & 
GetComposedBlocks () const
 Returns the list of composed blocks in the print space. More...
 
void RemoveBlock (const Id &bid)
 Removes a block. More...
 

Friends

class Page
 

Detailed Description

A print space on a page.

Author
Yann LEYDIER

Definition at line 30 of file CRNAltoSpace.hpp.

Member Typedef Documentation

typedef std::weak_ptr<Block> Space::BlockPtr

Definition at line 119 of file CRNAltoSpace.hpp.

typedef std::weak_ptr<ComposedBlock> Space::ComposedBlockPtr

Definition at line 248 of file CRNAltoSpace.hpp.

Definition at line 197 of file CRNAltoSpace.hpp.

typedef std::weak_ptr<Illustration> Space::IllustrationPtr

Definition at line 165 of file CRNAltoSpace.hpp.

typedef std::weak_ptr<TextBlock> Space::TextBlockPtr

Definition at line 126 of file CRNAltoSpace.hpp.

Constructor & Destructor Documentation

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

Definition at line 35 of file CRNAltoSpace.hpp.

Member Function Documentation

GraphicalElement& Space::AddGraphicalElement ( const Id &  id_,
int  x,
int  y,
int  w,
int  h 
)

Adds an graphical element in the print space.

GraphicalElement& Space::AddGraphicalElementAfter ( const Id &  pred,
const Id &  id_,
int  x,
int  y,
int  w,
int  h 
)

Adds an graphical element in the print space.

GraphicalElement& Space::AddGraphicalElementBefore ( const Id &  next,
const Id &  id_,
int  x,
int  y,
int  w,
int  h 
)

Adds an graphical element in the print space.

Illustration& Space::AddIllustration ( const Id &  id_,
int  x,
int  y,
int  w,
int  h 
)

Adds an illustration in the print space.

Illustration& Space::AddIllustrationAfter ( const Id &  pred,
const Id &  id_,
int  x,
int  y,
int  w,
int  h 
)

Adds an illustration in the print space.

Illustration& Space::AddIllustrationBefore ( const Id &  next,
const Id &  id_,
int  x,
int  y,
int  w,
int  h 
)

Adds an illustration in the print space.

void Space::AddStyle ( const Id &  styleid)

Adds a reference to a style.

TextBlock& Space::AddTextBlock ( const Id &  id_,
int  x,
int  y,
int  w,
int  h 
)

Adds a text block in the print space.

TextBlock& Space::AddTextBlockAfter ( const Id &  pred,
const Id &  id_,
int  x,
int  y,
int  w,
int  h 
)

Adds a text block in the print space.

TextBlock& Space::AddTextBlockBefore ( const Id &  next,
const Id &  id_,
int  x,
int  y,
int  w,
int  h 
)

Adds a text block in the print space.

Block& Space::GetBlock ( const Id &  bid)

Returns a text block contained in the print space.

std::vector<BlockPtr> Space::GetBlocks ( ) const

Returns the list of blocks in the print space.

const std::vector<ComposedBlockPtr>& Space::GetComposedBlocks ( ) const

Returns the list of composed blocks in the print space.

const std::vector<GraphicalElementPtr>& Space::GetGraphicalElements ( ) const

Returns the list of graphical elements in the print space.

double Space::GetHeight ( ) const

Returns the height of the element.

double Space::GetHPos ( ) const

Returns the abscissa of the element.

Option<Id> Space::GetId ( ) const

Returns the id of the element.

const std::vector<IllustrationPtr>& Space::GetIllustrations ( ) const

Returns the list of illustrations in the print space.

std::vector<Id> Space::GetStyles ( ) const

Returns the list of style references.

TextBlock& Space::GetTextBlock ( const Id &  id)

Returns a text block contained in the print space.

const std::vector<std::weak_ptr<TextBlock> >& Space::GetTextBlocks ( ) const
inline

Returns the list of text blocks in the print space.

Definition at line 129 of file CRNAltoSpace.hpp.

double Space::GetVPos ( ) const

Returns the ordinate of the element.

double Space::GetWidth ( ) const

Returns the width of the element.

Space& Space::operator= ( const Space )
delete
Space& Space::operator= ( Space &&  )
default
void Space::RemoveBlock ( const Id &  bid)

Removes a block.

void Space::RemoveStyle ( const Id &  styleid)

Adds a reference to a style.

void Space::SetHeight ( double  d)

Sets the height of the element.

void Space::SetHPos ( double  d)

Sets the abscissa of the element.

void Space::SetVPos ( double  d)

Sets the ordinate of the element.

void Space::SetWidth ( double  d)

Sets the width of the element.

Friends And Related Function Documentation

friend class Page
friend

Definition at line 272 of file CRNAltoSpace.hpp.


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