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

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

Annotated text gadget class. More...

#include <ilviews/annotext/zone.h>

Classes

class  Data
 Holds user data for a text zone. More...
 

Public Member Functions

 IlvATZone (IlvATCursor *start, IlvATCursor *end)
 Initializes a new IlvATZone instance. More...
 
IlvAnnoTextgetAnnoText () const
 Returns the annotated text object associated with this text zone. More...
 
DatagetData () const
 Returns the zone data of this text zone. More...
 
IlvATInteractorgetInteractor () const
 Returns the interactor for this text zone. More...
 
IlvATZonegetParent () const
 Returns the text zone immediately containing this text zone. More...
 
IlvATPalettegetTextPalette () const
 Returns the IlvATPalette of this text zone. More...
 
IlAny getUserData () const
 Returns the user data of the text zone. More...
 
void setData (Data *userData)
 Sets the user data. More...
 
void setInteractor (IlvATInteractor *inter)
 Sets the interactor for this text zone. More...
 
void setUserData (IlAny userData)
 Sets a pointer user data. More...
 

Detailed Description

Annotated text gadget class.

Library: ilvatext
An instance of this class represents a contiguous zone of the text flow.

IlvATZone instances can be nested but always in a hierarchical way, which may be ensured by checking whether the two boundaries of an IlvATZone belong to the same upper IlvATZone (or to no IlvATZone at all). The IlvAnnoText::insertZone() member function checks this.

An IlvATZone is linked to an IlvATPalette which carries graphical information such as margins, font, foreground and background colors. It may have a specific IlvATInteractor or use the one assigned to its IlvATPalette.

A user data field enables the storage of additional information specific to an instance of the IlvATZone class. This is useful, for example, when writing an IlvATInteractor assigned to an IlvATPalette instance. In this case, when an IlvATPalette instance is applied to any IlvATZone belonging to this IlvATPalette, it uses the user data information of the particular instance that triggers it (such as a hypertext interactor using information stored in the user data field of the IlvATZone to know what new file must be loaded).

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

Constructor & Destructor Documentation

§ IlvATZone()

IlvATZone::IlvATZone ( IlvATCursor start,
IlvATCursor end 
)

Initializes a new IlvATZone instance.

The text zone begins just after the start cursor and ends just before the end cursor.

Parameters
startSpecifies the beginning of the text zone.
endSpecifies the end of the text zone.

Member Function Documentation

§ getAnnoText()

IlvAnnoText* IlvATZone::getAnnoText ( ) const

Returns the annotated text object associated with this text zone.

Returns
The IlvAnnoText holding the IlvATZone.

§ getData()

Data* IlvATZone::getData ( ) const

Returns the zone data of this text zone.

Returns
A pointer to the zone data associated with the IlvATZone.
See also
setData().

§ getInteractor()

IlvATInteractor* IlvATZone::getInteractor ( ) const

Returns the interactor for this text zone.

Returns
The IlvATInteractor associated with the text zone, or, if no IlvATInteractor has been associated to it, a pointer to the IlvATInteractor associated with the IlvATPalette to which the current IlvATZone belongs; if the current IlvATZone doesn't belong to any IlvATPalette, or if its IlvATPalette doesn't have an IlvATInteractor attached, the function returns 0.

§ getParent()

IlvATZone* IlvATZone::getParent ( ) const

Returns the text zone immediately containing this text zone.

Returns
The IlvATZone immediately containing the current IlvATZone or 0 is there are none.

§ getTextPalette()

IlvATPalette* IlvATZone::getTextPalette ( ) const

Returns the IlvATPalette of this text zone.

Returns
The IlvATPalette associated with this text zone, or 0 if it has not yet been affected to an IlvATPalette.

§ getUserData()

IlAny IlvATZone::getUserData ( ) const

Returns the user data of the text zone.

Returns
The user data associated with the IlvATZone, or 0 if no user data has been set.
Note
If setData() has been called with a non-null value before, the returned value is undefined.

§ setData()

void IlvATZone::setData ( Data userData)

Sets the user data.

Parameters
userDataThe new user data to store in this zone.
See also
getData().
Note
If setData() has been called with a non-null value before, this data object is deleted.
To remove the zone data, you can call setData(0). Then the previously associated data is deleted.

§ setInteractor()

void IlvATZone::setInteractor ( IlvATInteractor inter)

Sets the interactor for this text zone.

If there was another interator in place, it is not modified or deleted.

Parameters
interThe interactor to install.

§ setUserData()

void IlvATZone::setUserData ( IlAny  userData)

Sets a pointer user data.

To retrieve the user data, you must call getUserData().

Parameters
userDataThe new user data.
Note
If setData() has been called with a non-null value before, this data object is deleted.

© 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.