Aspose::Words::TabStopCollection Class Reference

A collection of Aspose::Words::TabStop objects that represent custom tabs for a paragraph or a style. More...

#include "Aspose.Words.Cpp/Model/Text/TabStopCollection.h"

Inherits Aspose::Words::InternableComplexAttr, and IExpandableAttr.

Public Member Functions

int32_t get_Count ()
 Gets the number of tab stops in the collection. More...
 
bool get_IsInheritedComplexAttr ()
 
bool Equals (System::SharedPtr< Aspose::Words::TabStopCollection > rhs)
 Determines whether the specified TabStopCollection is equal in value to the current TabStopCollection. More...
 
virtual bool Equals (System::SharedPtr< System::Object > obj)
 Determines whether the specified object is equal in value to the current object. More...
 
virtual int32_t GetHashCode () const
 Serves as a hash function for this type. More...
 
System::SharedPtr< Aspose::Words::TabStopidx_get (int32_t index)
 Gets a tab stop at the given index. More...
 
System::SharedPtr< Aspose::Words::TabStopidx_get (double position)
 Gets a tab stop at the specified position. More...
 
void Clear ()
 Deletes all tab stop positions. More...
 
double GetPositionByIndex (int32_t index)
 Gets the position (in points) of the tab stop at the specified index. More...
 
int32_t GetIndexByPosition (double position)
 Gets the index of a tab stop with the specified position in points. More...
 
void Add (System::SharedPtr< Aspose::Words::TabStop > tabStop)
 Adds or replaces a tab stop in the collection. More...
 
void Add (double position, Aspose::Words::TabAlignment alignment, Aspose::Words::TabLeader leader)
 Adds or replaces a tab stop in the collection. More...
 
void RemoveByPosition (double position)
 Removes a tab stop at the specified position from the collection. More...
 
void RemoveByIndex (int32_t index)
 Removes a tab stop at the specified index from the collection. More...
 
System::SharedPtr< Aspose::Words::TabStopAfter (double position)
 Gets a first tab stop to the right of the specified position. More...
 
System::SharedPtr< Aspose::Words::TabStopBefore (double position)
 Gets a first tab stop to the left of the specified position. More...
 
System::SharedPtr< Aspose::Words::IComplexAttr > DeepCloneComplexAttr ()
 
System::SharedPtr< Aspose::Words::IExpandableAttr > Expand (System::SharedPtr< Aspose::Words::IExpandableAttr > parentAttr)
 
void Collapse (System::SharedPtr< Aspose::Words::IExpandableAttr > parentAttr)
 
- Public Member Functions inherited from System::Object
 Object ()
 Creates object. Initializes all internal data structures. More...
 
virtual ~Object ()
 Destroys object. Frees all internal data structures. More...
 
 Object (Object const &x)
 Copy constructor. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
Objectoperator= (Object const &x)
 Assignment operator. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
ObjectSharedRefAdded ()
 Increments shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int SharedRefRemovedSafe ()
 Decrements and returns shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int RemovedSharedRefs (int count)
 Decreases shared reference count by specified value. More...
 
Detail::SmartPtrCounter * WeakRefAdded ()
 Increments weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
void WeakRefRemoved ()
 Decrements weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
Detail::SmartPtrCounter * GetCounter ()
 Gets reference counter data structure associated with the object. More...
 
int SharedCount () const
 Gets current value of shared refernce counter. More...
 
void Lock ()
 Implements C# lock() statement locking. Call directly or use LockContext sentry object. More...
 
void Unlock ()
 Implements C# lock() statement unlocking. Call directly or use LockContext sentry object. More...
 
virtual bool Equals (ptr obj)
 Compares objects using C# Object.Equals semantics. More...
 
virtual String ToString () ASPOSE_CONST
 Analog of C# Object.ToString() method. Enables converting custom objects to string. More...
 
virtual ptr MemberwiseClone () const
 Analog of C# Object.MemberwiseClone() method. Enables cloning custom types. More...
 
virtual const TypeInfoGetType () const
 Gets actual type of object. Analog of C# System.Object.GetType() call. More...
 
virtual bool Is (const TypeInfo &targetType) const
 Check if object represents an instance of type described by targetType. Analog of C# 'is' operator. More...
 
virtual void SetTemplateWeakPtr (unsigned int argument)
 Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containers to weak mode. More...
 

Additional Inherited Members

- Public Types inherited from System::Object
typedef SmartPtr< Objectptr
 Alias for smart pointer type. More...
 
typedef System::Details::SharedMembersType shared_members_type
 structure to keep list of shared pointers contained in object. More...
 
- Static Public Member Functions inherited from System::Object
static bool ReferenceEquals (ptr const &objA, ptr const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, T const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, std::nullptr_t)
 Reference-compares value type object with nullptr. More...
 
template<typename T1 , typename T2 >
static std::enable_if< IsSmartPtr< T1 >::value &&IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares reference type objects in C# style. More...
 
template<typename T1 , typename T2 >
static std::enable_if<!IsSmartPtr< T1 >::value &&!IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares value type objects in C# style. More...
 
static const TypeInfoType ()
 Impleemnts C# typeof(System.Object) construct. More...
 
template<>
bool Equals (float const &objA, float const &objB)
 
template<>
bool Equals (double const &objA, double const &objB)
 
template<>
bool ReferenceEquals (String const &str, std::nullptr_t)
 
template<>
bool ReferenceEquals (String const &str1, String const &str2)
 

Detailed Description

A collection of Aspose::Words::TabStop objects that represent custom tabs for a paragraph or a style.

In Microsoft Word documents, a tab stop can be defined in the properties of a paragraph style or directly in the properties of a paragraph. A style can be based on another style. Therefore, the complete set of tab stops for a given object is a combination of tab stops defined directly on this object and tab stops inherited from the parent styles.

In Aspose.Words, when you obtain a TabStops collection for a paragraph or a style, it contains only the custom tab stops defined directly for this paragraph or style. The collection does not include tab stops defined in the parent styles or default tab stops.

See also
Aspose::Words::ParagraphFormat, Aspose::Words::TabStop, Aspose::Words::Document::get_DefaultTabStop

Member Function Documentation

◆ Add() [1/2]

void Aspose::Words::TabStopCollection::Add ( double  position,
Aspose::Words::TabAlignment  alignment,
Aspose::Words::TabLeader  leader 
)

Adds or replaces a tab stop in the collection.

If a tab stop already exists at the specified position, it is replaced.

Parameters
positionA position (in points) where to add the tab stop.
alignmentA Aspose::Words::TabAlignment value that specifies the alignment of text at the tab stop.
leaderA Aspose::Words::TabLeader value that specifies the type of the leader line displayed under the tab character.

◆ Add() [2/2]

void Aspose::Words::TabStopCollection::Add ( System::SharedPtr< Aspose::Words::TabStop tabStop)

Adds or replaces a tab stop in the collection.

If a tab stop already exists at the specified position, it is replaced.

Parameters
tabStopA tab stop object to add.

◆ After()

System::SharedPtr<Aspose::Words::TabStop> Aspose::Words::TabStopCollection::After ( double  position)

Gets a first tab stop to the right of the specified position.

Skips tab stops with Alignment set to TabAlignment.Bar.

Parameters
positionThe reference position (in points).
Returns
A tab stop object or null if a suitable tab stop was not found.

◆ Before()

System::SharedPtr<Aspose::Words::TabStop> Aspose::Words::TabStopCollection::Before ( double  position)

Gets a first tab stop to the left of the specified position.

Skips tab stops with Alignment set to TabAlignment.Bar.

Parameters
positionThe reference position (in points).
Returns
A tab stop object or null if a suitable tab stop was not found.

◆ Clear()

void Aspose::Words::TabStopCollection::Clear ( )

Deletes all tab stop positions.

◆ Collapse()

void Aspose::Words::TabStopCollection::Collapse ( System::SharedPtr< Aspose::Words::IExpandableAttr >  parentAttr)

◆ DeepCloneComplexAttr()

System::SharedPtr<Aspose::Words::IComplexAttr> Aspose::Words::TabStopCollection::DeepCloneComplexAttr ( )

◆ Equals() [1/2]

bool Aspose::Words::TabStopCollection::Equals ( System::SharedPtr< Aspose::Words::TabStopCollection rhs)

Determines whether the specified TabStopCollection is equal in value to the current TabStopCollection.

◆ Equals() [2/2]

virtual bool Aspose::Words::TabStopCollection::Equals ( System::SharedPtr< System::Object obj)
virtual

Determines whether the specified object is equal in value to the current object.

◆ Expand()

System::SharedPtr<Aspose::Words::IExpandableAttr> Aspose::Words::TabStopCollection::Expand ( System::SharedPtr< Aspose::Words::IExpandableAttr >  parentAttr)

◆ get_Count()

int32_t Aspose::Words::TabStopCollection::get_Count ( )

Gets the number of tab stops in the collection.

◆ get_IsInheritedComplexAttr()

bool Aspose::Words::TabStopCollection::get_IsInheritedComplexAttr ( )

◆ GetHashCode()

virtual int32_t Aspose::Words::TabStopCollection::GetHashCode ( ) const
virtual

Serves as a hash function for this type.

Reimplemented from System::Object.

◆ GetIndexByPosition()

int32_t Aspose::Words::TabStopCollection::GetIndexByPosition ( double  position)

Gets the index of a tab stop with the specified position in points.

◆ GetPositionByIndex()

double Aspose::Words::TabStopCollection::GetPositionByIndex ( int32_t  index)

Gets the position (in points) of the tab stop at the specified index.

Parameters
indexAn index into the collection of tab stops.
Returns
The position of the tab stop.

◆ idx_get() [1/2]

System::SharedPtr<Aspose::Words::TabStop> Aspose::Words::TabStopCollection::idx_get ( double  position)

Gets a tab stop at the specified position.

Returns null if no tab stop is found at the specified position.

Parameters
positionThe position (in points) of the tab stop.

◆ idx_get() [2/2]

System::SharedPtr<Aspose::Words::TabStop> Aspose::Words::TabStopCollection::idx_get ( int32_t  index)

Gets a tab stop at the given index.

Parameters
indexAn index into the collection of tab stops.

◆ RemoveByIndex()

void Aspose::Words::TabStopCollection::RemoveByIndex ( int32_t  index)

Removes a tab stop at the specified index from the collection.

Parameters
indexAn index into the collection of tab stops.

◆ RemoveByPosition()

void Aspose::Words::TabStopCollection::RemoveByPosition ( double  position)

Removes a tab stop at the specified position from the collection.

Parameters
positionThe position (in points) of the tab stop to remove.