This is the composite text class.
It's basically a Dtk_Text Container.
This class represents a group of several base_texts.
It contains an inner Dtk_Oriented2dBBox and a outer Dtk_Oriented2dBBox.
The Dtk_CompositeText uses a lot of informations. The most important ones are shown in the picture below:
.
More...
Public Member Functions | |
void | AddText (Dtk_Text inText) |
Adds a Dtk_Text to the Dtk_CompositeText. More... | |
void | Clear () |
Dtk_string | ConvertToDtk_string () const |
Merges the Dtk_CompositeText to Dtk_string. More... | |
Dtk_ErrorStatus | CreateFrameAsGeometry (Dtk_tab< Dtk_CurvePtr > &outGeoms) const |
Dtk_CompositeText () | |
Base constructor. More... | |
Dtk_CompositeText (const Dtk_CompositeText &t) | |
Copy constructor. More... | |
Dtk_CompositeText (const Dtk_Size_t &inNumTexts) | |
Pre allocator constructor. More... | |
Dtk_CompositeText (Dtk_CompositeText &&t) DTK_NOEXCEPT | |
\MoveConstructor{t} More... | |
Dtk_CompositeText (Dtk_tab< Dtk_Text > inTexts) | |
Constructor from several Dtk_Text. More... | |
Dtk_CompositeText (Dtk_Text inText) | |
Constructor from one Dtk_Text. More... | |
Dtk_InfoPtr & | GetInfo () |
Retrieves the infos. More... | |
const Dtk_InfoPtr & | GetInfo () const |
Retrieves the infos. More... | |
const Dtk_Oriented2dBBox | GetInnerBoundingBox () const |
Processes the inner bounding box. More... | |
const Dtk_Oriented2dBBox | GetInnerBoundingBox (Dtk_ErrorStatus &outError) const |
Processes the inner bounding box. More... | |
Dtk_Size_t | GetNumTexts () const |
Retrieves the texts number. More... | |
const Dtk_Oriented2dBBox | GetOuterBoundingBox (Dtk_bool inIncludeInvisible=DTK_TRUE) const |
Processes the outer bounding box. More... | |
const Dtk_Oriented2dBBox | GetOuterBoundingBox (Dtk_ErrorStatus &outError, Dtk_bool inIncludeInvisible=DTK_TRUE) const |
Processes the outer bounding box. More... | |
const Dtk_Double64 & | GetWrappingWidth () const |
Retrieves the wrapping width. More... | |
Dtk_CompositeText & | operator+= (Dtk_CompositeText s2) |
Merges the Dtk_CompositeText to another one. More... | |
Dtk_CompositeText & | operator= (const Dtk_CompositeText &inToBeAssigned) |
Assignment Operator. More... | |
Dtk_CompositeText & | operator= (Dtk_CompositeText &&inToBeAssigned) DTK_NOEXCEPT |
\MoveOp{inToBeAssigned} More... | |
Dtk_Text & | operator[] (Dtk_Size_t inPos) |
Access operator - get/set -. More... | |
const Dtk_Text & | operator[] (Dtk_Size_t inPos) const |
Access operator - read only -. More... | |
void | ReplaceTexts (const Dtk_tab< Dtk_Text > &inTexts) |
Replaces all the included Dtk_Texts by the given ones. More... | |
Dtk_ErrorStatus | Reverse () |
Reverses the Dtk_CompositeText and included Dtk_Texts. More... | |
SetAsDeprecated ("2020.2", "Use CreateFrameAsGeometry(Dtk_tab<Dtk_CurvePtr> &outGeoms) instead") Dtk_ErrorStatus CreateFrameAsGeometry(Dtk_tab< Geometric_set_select_entity * > &outGeoms) const | |
Processes geometrical elements from Dtk_CompositeText frame type - and included Dtk_Texts -. More... | |
SetAsDeprecated ("Undefined", "Use GetOuterBoundingBox") Dtk_ErrorStatus GetOuterAnchorPoints(Dtk_pnt(&outTabPnts)[DTK_NB_ANCHOR_TYPES]) const | |
Processes all the Dtk_CompositeText outer anchor points. More... | |
Dtk_ErrorStatus | SetInnerAnchorPoint (const Dtk_pnt &inNewLocationPnt, const Dtk_anchor_type &inNewAnchorType=DTK_ANCHOR_BOTTOM_LEFT, const Dtk_Int32 &inStartingGetText=-1, const Dtk_Int32 &inNumGetTexts=-1, const Dtk_Int32 &inStartingSetText=-1, const Dtk_Int32 &inNumSetTexts=-1) |
Set the Dtk_CompositeText inner anchor point. More... | |
Dtk_ErrorStatus | SetInnerXAxis (const Dtk_dir &inXAxis) |
Sets the inner bounding box X Axis for the Dtk_CompositeText and included Dtk_Texts. More... | |
Dtk_ErrorStatus | SetInnerXYAxis (const Dtk_dir &inXaxis, const Dtk_dir &inYaxis) |
Sets the inner bounding box X and Y axes for the Dtk_CompositeText and included Dtk_Texts. More... | |
Dtk_ErrorStatus | SetInnerYAxis (const Dtk_dir &axis_dir) |
Sets the inner bounding box Y Axis for the Dtk_CompositeText and included Dtk_Texts. More... | |
Dtk_ErrorStatus | SetOuterAnchorPoint (const Dtk_pnt &inNewLocationPnt, const Dtk_anchor_type &inNewAnchorType=DTK_ANCHOR_BOTTOM_LEFT, const Dtk_Int32 &inStartingGetText=-1, const Dtk_Int32 &inNumGetTexts=-1, const Dtk_Int32 &inStartingSetText=-1, const Dtk_Int32 &inNumSetTexts=-1) |
Set the Dtk_CompositeText outer anchor point. More... | |
Dtk_ErrorStatus | SetOuterXAxis (const Dtk_dir &inXAxis) |
Sets the outer bounding box X Axis for the Dtk_CompositeText and included Dtk_Texts. More... | |
Dtk_ErrorStatus | SetOuterXYAxis (const Dtk_dir &inXaxis, const Dtk_dir &inYaxis) |
Sets the outer bounding box X and Y axes for the Dtk_CompositeText and included Dtk_Texts. More... | |
Dtk_ErrorStatus | SetOuterYAxis (const Dtk_dir &axis_dir) |
Sets the outer bounding box Y Axis for the Dtk_CompositeText and included Dtk_Texts. More... | |
void | SetWrappingWidth (const Dtk_Double64 &inWrappingWidth) |
Sets the wrapping width. More... | |
Dtk_ErrorStatus | Transform (const Dtk_transfo &inTransfo) |
Applies a transformation matrix to the Dtk_CompositeText and included Dtk_Texts. More... | |
Dtk_ErrorStatus | Translate (const Dtk_dir &inTranslateDir) |
Translates the Dtk_CompositeText giving a translation vector. More... | |
~Dtk_CompositeText () | |
Destructor. More... | |
Friends | |
Dtk_CompositeText | operator+ (Dtk_CompositeText s1, Dtk_CompositeText s2) |
Add all the Dtk_Text from the two Dtk_CompositeText. More... | |
std::ostream & | operator<< (std::ostream &o, const Dtk_CompositeText &d) |
This is the composite text class.
It's basically a Dtk_Text Container.
This class represents a group of several base_texts.
It contains an inner Dtk_Oriented2dBBox and a outer Dtk_Oriented2dBBox.
The Dtk_CompositeText uses a lot of informations. The most important ones are shown in the picture below:
.
Dtk_CompositeText::~Dtk_CompositeText | ( | ) |
Destructor.
Dtk_CompositeText::Dtk_CompositeText | ( | ) |
Base constructor.
Dtk_CompositeText::Dtk_CompositeText | ( | const Dtk_CompositeText & | t | ) |
Copy constructor.
t | Object to copy. |
Dtk_CompositeText::Dtk_CompositeText | ( | Dtk_CompositeText && | t | ) |
\MoveConstructor{t}
Dtk_CompositeText::Dtk_CompositeText | ( | const Dtk_Size_t & | inNumTexts | ) |
Pre allocator constructor.
inNumTexts | Number of text to be reserved |
Dtk_CompositeText::Dtk_CompositeText | ( | Dtk_Text | inText | ) |
void Dtk_CompositeText::AddText | ( | Dtk_Text | inText | ) |
Adds a Dtk_Text to the Dtk_CompositeText.
inText | The Dtk_Text to be added |
void Dtk_CompositeText::Clear | ( | ) |
Dtk_string Dtk_CompositeText::ConvertToDtk_string | ( | ) | const |
Merges the Dtk_CompositeText to Dtk_string.
Dtk_ErrorStatus Dtk_CompositeText::CreateFrameAsGeometry | ( | Dtk_tab< Dtk_CurvePtr > & | outGeoms | ) | const |
Dtk_InfoPtr& Dtk_CompositeText::GetInfo | ( | ) |
Retrieves the infos.
const Dtk_InfoPtr& Dtk_CompositeText::GetInfo | ( | ) | const |
Retrieves the infos.
const Dtk_Oriented2dBBox Dtk_CompositeText::GetInnerBoundingBox | ( | ) | const |
Processes the inner bounding box.
const Dtk_Oriented2dBBox Dtk_CompositeText::GetInnerBoundingBox | ( | Dtk_ErrorStatus & | outError | ) | const |
Processes the inner bounding box.
outError | Return dtkNoError if OK |
Dtk_Size_t Dtk_CompositeText::GetNumTexts | ( | ) | const |
Retrieves the texts number.
const Dtk_Oriented2dBBox Dtk_CompositeText::GetOuterBoundingBox | ( | Dtk_bool | inIncludeInvisible = DTK_TRUE | ) | const |
Processes the outer bounding box.
inIncludeInvisible | : If DTK_TRUE - default value - invisible texts are processed . Else They are not. |
const Dtk_Oriented2dBBox Dtk_CompositeText::GetOuterBoundingBox | ( | Dtk_ErrorStatus & | outError, |
Dtk_bool | inIncludeInvisible = DTK_TRUE |
||
) | const |
Processes the outer bounding box.
outError | Return dtkNoError if OK |
inIncludeInvisible | : If DTK_TRUE - default value - invisible texts are processed . Else They are not. |
const Dtk_Double64& Dtk_CompositeText::GetWrappingWidth | ( | ) | const |
Retrieves the wrapping width.
Dtk_CompositeText& Dtk_CompositeText::operator+= | ( | Dtk_CompositeText | s2 | ) |
Merges the Dtk_CompositeText to another one.
s2 | The first Dtk_CompositeText to merge to this |
Dtk_CompositeText& Dtk_CompositeText::operator= | ( | const Dtk_CompositeText & | inToBeAssigned | ) |
Assignment Operator.
inToBeAssigned | Object to copy. |
Dtk_CompositeText& Dtk_CompositeText::operator= | ( | Dtk_CompositeText && | inToBeAssigned | ) |
\MoveOp{inToBeAssigned}
Dtk_Text& Dtk_CompositeText::operator[] | ( | Dtk_Size_t | inPos | ) |
Access operator - get/set -.
inPos | The position of the element to be retrieved |
const Dtk_Text& Dtk_CompositeText::operator[] | ( | Dtk_Size_t | inPos | ) | const |
Access operator - read only -.
inPos | The position of the element to be retrieved |
Replaces all the included Dtk_Texts by the given ones.
inTexts | The Dtk_Texts to add |
Dtk_ErrorStatus Dtk_CompositeText::Reverse | ( | ) |
Reverses the Dtk_CompositeText and included Dtk_Texts.
Dtk_CompositeText::SetAsDeprecated | ( | "2020.2" | , |
"Use CreateFrameAsGeometry(Dtk_tab<Dtk_CurvePtr> &outGeoms) instead" | |||
) | const & |
Processes geometrical elements from Dtk_CompositeText frame type - and included Dtk_Texts -.
outGeoms | The resulting geometries |
Dtk_CompositeText::SetAsDeprecated | ( | "Undefined" | , |
"Use GetOuterBoundingBox" | |||
) | )[DTK_NB_ANCHOR_TYPES] const & |
Processes all the Dtk_CompositeText outer anchor points.
outTabPnts | the resulting anchor point array |
Dtk_ErrorStatus Dtk_CompositeText::SetInnerAnchorPoint | ( | const Dtk_pnt & | inNewLocationPnt, |
const Dtk_anchor_type & | inNewAnchorType = DTK_ANCHOR_BOTTOM_LEFT , |
||
const Dtk_Int32 & | inStartingGetText = -1 , |
||
const Dtk_Int32 & | inNumGetTexts = -1 , |
||
const Dtk_Int32 & | inStartingSetText = -1 , |
||
const Dtk_Int32 & | inNumSetTexts = -1 |
||
) |
Set the Dtk_CompositeText inner anchor point.
inNewLocationPnt | The new anchor point |
inNewAnchorType | The new anchor type |
inStartingGetText | The starting text - -1 to process from the 1st text - for the old anchor points process |
inNumGetTexts | The number of processed texts - -1 to process all texts from starting text - for the old anchor points process |
inStartingSetText | The starting text - -1 to process from the 1st text - for the new anchor points process |
inNumSetTexts | The number of processed texts - -1 to process all texts from starting text - for the new anchor points process |
Dtk_ErrorStatus Dtk_CompositeText::SetInnerXAxis | ( | const Dtk_dir & | inXAxis | ) |
Sets the inner bounding box X Axis for the Dtk_CompositeText and included Dtk_Texts.
inXAxis | The new inner bounding box X Axis |
Dtk_ErrorStatus Dtk_CompositeText::SetInnerXYAxis | ( | const Dtk_dir & | inXaxis, |
const Dtk_dir & | inYaxis | ||
) |
Sets the inner bounding box X and Y axes for the Dtk_CompositeText and included Dtk_Texts.
inXAxis | The new inner bounding box X Axis |
inYAxis | The new inner bounding box Y Axis |
Dtk_ErrorStatus Dtk_CompositeText::SetInnerYAxis | ( | const Dtk_dir & | axis_dir | ) |
Sets the inner bounding box Y Axis for the Dtk_CompositeText and included Dtk_Texts.
inYAxis | The new inner bounding box Y Axis |
Dtk_ErrorStatus Dtk_CompositeText::SetOuterAnchorPoint | ( | const Dtk_pnt & | inNewLocationPnt, |
const Dtk_anchor_type & | inNewAnchorType = DTK_ANCHOR_BOTTOM_LEFT , |
||
const Dtk_Int32 & | inStartingGetText = -1 , |
||
const Dtk_Int32 & | inNumGetTexts = -1 , |
||
const Dtk_Int32 & | inStartingSetText = -1 , |
||
const Dtk_Int32 & | inNumSetTexts = -1 |
||
) |
Set the Dtk_CompositeText outer anchor point.
inNewLocationPnt | The new anchor point |
inNewAnchorType | The new anchor type |
inStartingGetText | The starting text - -1 to process from the 1st text - for the old anchor points process |
inNumGetTexts | The number of processed texts - -1 to process all texts from starting text - for the old anchor points process |
inStartingSetText | The starting text - -1 to process from the 1st text - for the new anchor points process |
inNumSetTexts | The number of processed texts - -1 to process all texts from starting text - for the new anchor points process |
inOffSet | For internal use only |
inBoundingType | The bounding type |
Dtk_ErrorStatus Dtk_CompositeText::SetOuterXAxis | ( | const Dtk_dir & | inXAxis | ) |
Sets the outer bounding box X Axis for the Dtk_CompositeText and included Dtk_Texts.
inXAxis | The new outer bounding box X Axis |
Dtk_ErrorStatus Dtk_CompositeText::SetOuterXYAxis | ( | const Dtk_dir & | inXaxis, |
const Dtk_dir & | inYaxis | ||
) |
Sets the outer bounding box X and Y axes for the Dtk_CompositeText and included Dtk_Texts.
inXAxis | The new outer bounding box X Axis |
inYAxis | The new outer bounding box Y Axis |
Dtk_ErrorStatus Dtk_CompositeText::SetOuterYAxis | ( | const Dtk_dir & | axis_dir | ) |
Sets the outer bounding box Y Axis for the Dtk_CompositeText and included Dtk_Texts.
inYAxis | The new outer bounding box Y Axis |
void Dtk_CompositeText::SetWrappingWidth | ( | const Dtk_Double64 & | inWrappingWidth | ) |
Sets the wrapping width.
inWrappingWidth | The new wrapping width |
Dtk_ErrorStatus Dtk_CompositeText::Transform | ( | const Dtk_transfo & | inTransfo | ) |
Applies a transformation matrix to the Dtk_CompositeText and included Dtk_Texts.
inTransfo | The transformation matrix to apply |
Dtk_ErrorStatus Dtk_CompositeText::Translate | ( | const Dtk_dir & | inTranslateDir | ) |
Translates the Dtk_CompositeText giving a translation vector.
inTranslateDir | the translation vector |
|
friend |
Add all the Dtk_Text from the two Dtk_CompositeText.
s1 | the first composite text |
s2 | the second composite text |
|
friend |