Rogue Wave Views
Annotated Text Package API Reference Guide
Product Documentation:

Rogue Wave Views
Documentation Home
List of all members | Public Member Functions
IlvATCursor Class Reference

Annotated text gadget class. More...

#include <ilviews/annotext/cursor.h>

Inheritance diagram for IlvATCursor:
IlvATInsertionCursor

Public Member Functions

 IlvATCursor (const IlvAnnoText *atext)
 Initializes a new IlvATCursor instance for the given IlvAnnoText object. More...
 
virtual void extract ()
 Disconnects the cursor from the annotated text object. More...
 
IlvATZonegetZone () const
 Returns the text zone containing the cursor. More...
 
virtual IlBoolean isAtWordBoundary () const
 Indicates whether the cursor is located between two words. More...
 
IlBoolean isConnected () const
 Indicates whether the cursor is connected to an annotated text object. More...
 
void moveBackward (IlBoolean jumpcursor=IlTrue, IlBoolean visible=IlTrue)
 Move the cursor one step backward. More...
 
void moveEndLine ()
 Moves the cursor at the end of the current line. More...
 
void moveEndParagraph (IlBoolean visible=IlTrue)
 Moves the cursor at the end of the current paragraph. More...
 
void moveEndText ()
 Moves the cursor at the beginning of the text. More...
 
void moveEndZone (IlvATZone *zone, IlvPosition pos=IlvLeft)
 Moves the cursor at the end of the specified text zone. More...
 
void moveForward (IlBoolean jumpcursor=IlTrue, IlBoolean visible=IlTrue)
 Move the cursor one step forward. More...
 
void moveNextWord (IlBoolean visible=IlTrue)
 Moves the cursor to the next word boundary. More...
 
void movePreviousWord (IlBoolean visible=IlTrue)
 Moves the cursor to the previous word boundary. More...
 
void moveStartLine ()
 Moves the cursor at the beginning of the current line. More...
 
void moveStartParagraph (IlBoolean visible=IlTrue)
 Moves the cursor at the beginning of the current paragraph. More...
 
void moveStartText ()
 Moves the cursor at the beginning of the text. More...
 
void moveStartZone (IlvATZone *zone, IlvPosition pos=IlvRight)
 Moves the cursor at the beginning of the specified zone. More...
 
virtual void moveTo (IlvATCursor *cursor, IlvPosition side=IlvLeft)
 Moves the cursor next to a given cursor. More...
 
virtual IlBoolean moveTo (const IlvPoint &point, const IlvTransformer *t=0)
 Moves the cursor to a given location. More...
 
IlBoolean startsParagraph () const
 Indicates whether the cursor is located at the beginning of a paragraph. More...
 

Detailed Description

Annotated text gadget class.

Library: ilvatext
An instance of the IlvATCursor class represents a position in the text flow of the IlvAnnoText gadget. Its functional interface offers various ways to position it at the appropriate place in the text.

See also
IlvAnnoText, IlvATInsertionCursor, IlvATInteractor, IlvATPalette, IlvATZone.

Constructor & Destructor Documentation

§ IlvATCursor()

IlvATCursor::IlvATCursor ( const IlvAnnoText atext)

Initializes a new IlvATCursor instance for the given IlvAnnoText object.

Parameters
atextThe annotated text object that this IlvATCursor is associated to.

Member Function Documentation

§ extract()

virtual void IlvATCursor::extract ( )
virtual

Disconnects the cursor from the annotated text object.

Disconnects the cursor from the flow of the annotated text object.

§ getZone()

IlvATZone* IlvATCursor::getZone ( ) const

Returns the text zone containing the cursor.

Returns
The IlvATZone immediately containing the cursor.

§ isAtWordBoundary()

virtual IlBoolean IlvATCursor::isAtWordBoundary ( ) const
virtual

Indicates whether the cursor is located between two words.

Returns
IlTrue if the cursor is between two words, otherwise it returns IlFalse.

§ isConnected()

IlBoolean IlvATCursor::isConnected ( ) const

Indicates whether the cursor is connected to an annotated text object.

Returns
IlTrue if the cursor has been set into the flow of the text, using one of the move functions, IlFalse if it has not been connected since its creation or if it has been disconnected using the extract() method.

§ moveBackward()

void IlvATCursor::moveBackward ( IlBoolean  jumpcursor = IlTrue,
IlBoolean  visible = IlTrue 
)

Move the cursor one step backward.

Sets the position of the text cursor to the previous character or graphic component of the text.

Parameters
jumpcursorIf set to IlTrue, cursors encountered will be ignored even if visible.
visibleIf set to IlTrue, only visible text is taken into account; otherwise, the text cursor is moved to the previous position, be it visible or not.

§ moveEndLine()

void IlvATCursor::moveEndLine ( )

Moves the cursor at the end of the current line.

Sets the position of the text cursor to the end of the line.

§ moveEndParagraph()

void IlvATCursor::moveEndParagraph ( IlBoolean  visible = IlTrue)

Moves the cursor at the end of the current paragraph.

Sets the position of the text cursor to just before the next carriage return (end of a paragraph or line break) of the text.

Parameters
visibleIf set to IlTrue, only visible text is taken into account; otherwise, the text cursor is moved to the next carriage return, be it visible or not.

§ moveEndText()

void IlvATCursor::moveEndText ( )

Moves the cursor at the beginning of the text.

Sets the position of the text cursor to just after the last character or graphic component of the text.

§ moveEndZone()

void IlvATCursor::moveEndZone ( IlvATZone zone,
IlvPosition  pos = IlvLeft 
)

Moves the cursor at the end of the specified text zone.

Sets the position of the text cursor to the end of zone

Parameters
zoneThe annotated text zone.
posIf set to IlvRight, the cursor is set after (to right of) the zone delimiter. The default value IlvLeft indicates that the cursor is set before (to the left of) the zone delimiter; the cursor is then inside the zone.

§ moveForward()

void IlvATCursor::moveForward ( IlBoolean  jumpcursor = IlTrue,
IlBoolean  visible = IlTrue 
)

Move the cursor one step forward.

Sets the position of the text cursor to the next character or graphic component of the text.

Parameters
jumpcursorIf set to IlTrue, cursors encountered will be ignored even if they are visible.
visibleIf set to IlTrue, only visible text is taken into account; otherwise, the text cursor is moved to the next position, be it visible or not.

§ moveNextWord()

void IlvATCursor::moveNextWord ( IlBoolean  visible = IlTrue)

Moves the cursor to the next word boundary.

Sets the position of the text cursor to the next word boundary of the text.

Parameters
visibleIf set to IlTrue, only visible text is taken into account; otherwise, the text cursor is moved to the next word boundary without taking visibility into account.

§ movePreviousWord()

void IlvATCursor::movePreviousWord ( IlBoolean  visible = IlTrue)

Moves the cursor to the previous word boundary.

Sets the position of the text cursor to the previous word boundary of the text.

Parameters
visibleIf set to IlTrue, only visible text is taken into account; otherwise, the text cursor is moved to the previous word boundary without taking visibility into account.

§ moveStartLine()

void IlvATCursor::moveStartLine ( )

Moves the cursor at the beginning of the current line.

Sets the position of the text cursor to the beginning of the line.

§ moveStartParagraph()

void IlvATCursor::moveStartParagraph ( IlBoolean  visible = IlTrue)

Moves the cursor at the beginning of the current paragraph.

Sets the position of the text cursor to just after the previous carriage return (end of a paragraph or line break) of the text.

Parameters
visibleIf set to IlTrue, only visible text is taken into account; otherwise, the text cursor is moved to the next carriage return, be it visible or not.

§ moveStartText()

void IlvATCursor::moveStartText ( )

Moves the cursor at the beginning of the text.

Sets the position of the text cursor to just before the first character or graphic component of the text.

§ moveStartZone()

void IlvATCursor::moveStartZone ( IlvATZone zone,
IlvPosition  pos = IlvRight 
)

Moves the cursor at the beginning of the specified zone.

Sets the position of the text cursor to the beginning of zone.

Parameters
zoneThe annotated text zone.
posIf set to IlvLeft, the cursor is set before (to left of) the zone delimiter. The default value IlvRight indicates that the cursor is set after (to the right of) the zone delimiter; the cursor is then inside the zone.

§ moveTo() [1/2]

virtual void IlvATCursor::moveTo ( IlvATCursor cursor,
IlvPosition  side = IlvLeft 
)
virtual

Moves the cursor next to a given cursor.

Moves the text cursor immediately to the left of cursor if side is IlvLeft, immediately to the right if side is IlvRight.

Parameters
cursorThe reference cursor.
sideWhich side of cursor this cursor is moved to.

§ moveTo() [2/2]

virtual IlBoolean IlvATCursor::moveTo ( const IlvPoint point,
const IlvTransformer t = 0 
)
virtual

Moves the cursor to a given location.

Moves the text cursor to the position displayed nearest to point.

Parameters
pointThe point location.
tSpecifies the transformer applied to the IlvAnnoText.
Returns
This implementation always returns IlTrue.
Note
Both moveTo() functions set the current cursor instance into the flow of the text. The cursor is now said to be connected. Generally speaking, most of the moveXX() member functions are designed to be used with the insertion cursor instance. However, if you create a cursor and use it as an insertion cursor you must start by connecting it. Otherwise, this cursor will not carry out any further text insertions.

§ startsParagraph()

IlBoolean IlvATCursor::startsParagraph ( ) const

Indicates whether the cursor is located at the beginning of a paragraph.

Returns
IlTrue if there is no text or graphic component between the the cursor and the previous end of paragraph or line break.

© Copyright 2018, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.