rwlogo
Rogue Wave Views 5.5.1

Rogue Wave Views
Annotated Text Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvATCursor Class Reference

Annotated text gadget class. More...

#include <ilviews/annotext/cursor.h>

Inheritance diagram for IlvATCursor:
IlvATInsertionCursor

List of all members.

Public Member Functions

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

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 ( const IlvAnnoText text  ) 

Constructor.

The constructor initializes a new instance of the IlvATCursor class for atext.

Parameters:
atext The annotated text object.

Member Function Documentation

virtual void IlvATCursor::extract (  )  [virtual]

Disconnects the cursor from the annotated text object.

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

IlvATZone* IlvATCursor::getZone (  )  const

Returns the text zone containing the cursor.

Returns:
The IlvATZone immediately containing the cursor.
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.
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 function.
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:
jumpcursor If set to IlTrue, cursors encountered will be ignored even if visible.
visible If 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.
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.

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:
visible If 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.
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.

void IlvATCursor::moveEndZone ( IlvATZone ,
IlvPosition  = 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:
zone The annotated text zone.
pos If 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.
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:
jumpcursor If set to IlTrue, cursors encountered will be ignored even if they are visible.
visible If 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.
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:
visible If 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.
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:
visible If 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.
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.

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:
visible If 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.
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.

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

Moves the cursor at the beginning of the specified zone.

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

Parameters:
pos If 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.
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:
point The point location.
t Specifies the transformer applied to the IlvAnnoText.
Returns:
This implementation always returns IlTrue.
Warning:
[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 move Xxxx 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.
virtual void IlvATCursor::moveTo ( IlvATCursor ,
IlvPosition  = IlvLeft 
) [virtual]

Moves the cursor next to a given cursor.

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

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 2012, 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.