Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: txtfrmat.h
Link against: etext.lib

Class TTabStop

TTabStop

Support

Supported from 5.0

Description

A tab stop is a position on a page used to align columns of text. It has a twips position and an alignment. The twips position is the width in twips (1/1440th of an inch) of the tab stop, i.e. the number of twips from the start of the line at which text can be inserted. It uniquely identifies the tab stop. The alignment (left, right, or centre) indicates how text inserted at the tab stop should be aligned. The twips position and alignment are public data members.

Tab stops are paragraph format attributes. They are owned by the CParaFormat class, through which tab stops can be added and removed.

Defined in TTabStop:
ECenteredTab, ELeftTab, ENullTab, ERightTab, TTabStop(), TTabType, iTwipsPosition, iType, operator!=(), operator=(), operator==()


Construction


TTabStop()

TTabStop();

Description

The default C++ constructor constructs a TTabStop. The twips position is initialised to zero and the alignment to ELeftTab.


TTabStop()

TTabStop(const TTabStop& aTabStop);

Description

The C++ copy constructor constructs a new TTabStop from an existing one.

[Top]


Overloaded operators


operator=()

TTabStop& operator=(const TTabStop& aTabStop);

Description

Assigns the twips position and alignment of aTabStop to the current TTabStop.

Parameters

const TTabStop& aTabStop

The tab stop to assign to the current tab stop.

Return value

TTabStop&

The current tab stop.


operator==()

TBool operator==(const TTabStop& aTabStop)const;

Description

Compares two tab stops for equality. To be equal, they must have the same twips position and alignment.

Parameters

const TTabStop& aTabStop

The tab stop to compare with the current tab stop.

Return value

TBool

ETrue if both tab stops have the same twips position and alignment. EFalse if not.


operator!=()

TBool operator!=(const TTabStop& aTabStop)const;

Description

Compares two tab stops for inequality. They are different if the twips position or alignment is different.

Parameters

const TTabStop& aTabStop

The tab stop to compare with the current tab stop

Return value

TBool

ETrue if the objects' twips position or alignment differs. EFalse if equal.

[Top]


Data members


iTwipsPosition

TUint32 iTwipsPosition

Description

The twips position. This is the width in twips of the tab stop, i.e. the number of twips from the start of the line at which text can be inserted.


iType

TTabType iType

Description

Text alignment at the tab stop.

[Top]


Enumerations


Enum TTabType

TTabType

Description

Text alignment at tab stop.

ENullTab

No tab.

ELeftTab

Text is left aligned at the tab stop.

ECenteredTab

Text is centre aligned at the tab stop.

ERightTab

Text is right aligned at the tab stop.