libcrn
3.9.5
A document image processing library
|
A print space on a page. More...
#include <CRNAltoSpace.hpp>
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< Block > | BlockPtr |
typedef std::weak_ptr< TextBlock > | TextBlockPtr |
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 |
Space & | operator= (const Space &)=delete |
Space & | operator= (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... | |
Block & | GetBlock (const Id &bid) |
Returns a text block contained in the print space. More... | |
std::vector< BlockPtr > | GetBlocks () 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... | |
TextBlock & | GetTextBlock (const Id &id) |
Returns a text block contained in the print space. More... | |
TextBlock & | AddTextBlock (const Id &id_, int x, int y, int w, int h) |
Adds a text block in the print space. More... | |
TextBlock & | AddTextBlockAfter (const Id &pred, const Id &id_, int x, int y, int w, int h) |
Adds a text block in the print space. More... | |
TextBlock & | AddTextBlockBefore (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... | |
Illustration & | AddIllustration (const Id &id_, int x, int y, int w, int h) |
Adds an illustration in the print space. More... | |
Illustration & | AddIllustrationAfter (const Id &pred, const Id &id_, int x, int y, int w, int h) |
Adds an illustration in the print space. More... | |
Illustration & | AddIllustrationBefore (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... | |
GraphicalElement & | AddGraphicalElement (const Id &id_, int x, int y, int w, int h) |
Adds an graphical element in the print space. More... | |
GraphicalElement & | AddGraphicalElementAfter (const Id &pred, const Id &id_, int x, int y, int w, int h) |
Adds an graphical element in the print space. More... | |
GraphicalElement & | AddGraphicalElementBefore (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 |
A print space on a page.
Definition at line 30 of file CRNAltoSpace.hpp.
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.
typedef std::weak_ptr<GraphicalElement> Space::GraphicalElementPtr |
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.
|
delete |
|
default |
|
inlineoverridevirtual |
Definition at line 35 of file CRNAltoSpace.hpp.
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.
|
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.
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.
|
friend |
Definition at line 272 of file CRNAltoSpace.hpp.