Table of Contents

Class RtfDestination

Namespace
iTextSharp.text.rtf.parser.destinations
Assembly
iTextSharp.LGPLv2.Core.dll

RtfDestination is the base class for destinations according to the RTF Specification. All destinations must extend from this class. @author Howard Shank (hgshank@yahoo.com @since 2.0.8

public abstract class RtfDestination
Inheritance
RtfDestination
Derived
Inherited Members

Constructors

RtfDestination()

Constructor.

protected RtfDestination()

RtfDestination(RtfParser)

Constructor

protected RtfDestination(RtfParser parser)

Parameters

parser RtfParser

RtfParser object.

Fields

LastCtrlWord

The last control word handled by this destination

protected RtfCtrlWordData LastCtrlWord

Field Value

RtfCtrlWordData

Modified

Is data in destination modified?

protected bool Modified

Field Value

bool

RtfParser

Parser object

protected RtfParser RtfParser

Field Value

RtfParser

Methods

AddListener(IRtfDestinationListener)

Adds a RtfDestinationListener to the RtfDestinationMgr . the new RtfDestinationListener.

public static bool AddListener(IRtfDestinationListener listener)

Parameters

listener IRtfDestinationListener

Returns

bool

AfterCharacter(int)

protected static int AfterCharacter(int ch)

Parameters

ch int

Returns

int

AfterCtrlWord(RtfCtrlWordData)

protected static RtfCtrlWordData AfterCtrlWord(RtfCtrlWordData ctrlWordData)

Parameters

ctrlWordData RtfCtrlWordData

Returns

RtfCtrlWordData

BeforeCharacter(int)

protected static int BeforeCharacter(int ch)

Parameters

ch int

Returns

int

BeforeCtrlWord(RtfCtrlWordData)

protected static RtfCtrlWordData BeforeCtrlWord(RtfCtrlWordData ctrlWordData)

Parameters

ctrlWordData RtfCtrlWordData

Returns

RtfCtrlWordData

CloseDestination()

Clean up when destination is closed.

public abstract bool CloseDestination()

Returns

bool

true if handled, false if not handled

GetNewTokeniserState()

public virtual int GetNewTokeniserState()

Returns

int

HandleCharacter(int)

Handle text for this destination

public abstract bool HandleCharacter(int ch)

Parameters

ch int

Returns

bool

true if handled, false if not handled

HandleCloseGroup()

Clean up when group is closed.

public abstract bool HandleCloseGroup()

Returns

bool

true if handled, false if not handled

HandleControlWord(RtfCtrlWordData)

Handle control word for this destination

public abstract bool HandleControlWord(RtfCtrlWordData ctrlWordData)

Parameters

ctrlWordData RtfCtrlWordData

The control word and parameter information object

Returns

bool

true if handled, false if not handled

HandleOpenGroup()

Setup when group is opened.

public abstract bool HandleOpenGroup()

Returns

bool

true if handled, false if not handled

HandleOpeningSubGroup()

Handle a new subgroup contained within this group

public abstract bool HandleOpeningSubGroup()

Returns

bool

true if handled, false if not handled

IsModified()

Method to indicate if data in this destination has changed.

public bool IsModified()

Returns

bool

true if modified, false if not modified.

OnCharacter(int)

protected static int OnCharacter(int ch)

Parameters

ch int

Returns

int

OnCloseGroup()

protected static bool OnCloseGroup()

Returns

bool

OnCtrlWord(RtfCtrlWordData)

protected static RtfCtrlWordData OnCtrlWord(RtfCtrlWordData ctrlWordData)

Parameters

ctrlWordData RtfCtrlWordData

Returns

RtfCtrlWordData

OnOpenGroup()

protected static bool OnOpenGroup()

Returns

bool

RemoveListener(IRtfDestinationListener)

listener methods

public static bool RemoveListener(IRtfDestinationListener listener)

Parameters

listener IRtfDestinationListener

Returns

bool

SetParser(RtfParser)

Set the parser to use with the RtfDestination object.

public virtual void SetParser(RtfParser parser)

Parameters

parser RtfParser

The RtfParser object.

SetToDefaults()

Method to set this object to the default values. Must be implemented in child class.

public abstract void SetToDefaults()