Table of Contents

Class RtfCtrlWordHandler

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

RtfCtrlWordBase is the base class for all control word handlers to extend from. @author Howard Shank (hgshank@yahoo.com) @since 2.0.8

public class RtfCtrlWordHandler
Inheritance
RtfCtrlWordHandler
Inherited Members

Constructors

RtfCtrlWordHandler(RtfParser, string, int, bool, int, string, string, string)

Constructor: The parser for this control word. The string value of this control word. The default value of this control word. Not all control words have values. Flag indicating if this control word should use the default value. Indicator of the type of control word this is. DESTINATION|DESTINATION_EX|VALUE|FLAG|TOGGLE|SYMBOL String to prefix the ctrl word with. "" or "*" are the 2 used values. String to add as suffix to the ctrl word. " " and "" are the 2 used values. If TOGGLE then the property name as String (propertyGroup.propertyName format ex. "character.bold") If FLAG then the property name as String (propertyGroup.propertyName format ex. "character.bold") If VALUE then the property name as String (propertyGroup.propertyName format ex. "character.bold") If SYMBOL then the character to use for substitution as String If DESTINATION|DESTINATION_EX then the RtfDestination class name as String @since 2.0.8

public RtfCtrlWordHandler(RtfParser rtfParser, string ctrlWord, int defaultParameterValue, bool passDefaultParameterValue, int ctrlWordType, string prefix, string suffix, string specialHandler)

Parameters

rtfParser RtfParser
ctrlWord string
defaultParameterValue int
passDefaultParameterValue bool
ctrlWordType int
prefix string
suffix string
specialHandler string

Fields

CtrlWord

The control word for this class. @since 2.0.8

protected string CtrlWord

Field Value

string

CtrlWordData

The control word as parsed by the parser. @since 2.0.8

protected RtfCtrlWordData CtrlWordData

Field Value

RtfCtrlWordData

CtrlWordPrefix

The prefix for all control words. @since 2.0.8

protected string CtrlWordPrefix

Field Value

string

CtrlWordSuffix

The prefix for all control words. @since 2.0.8

protected string CtrlWordSuffix

Field Value

string

CtrlWordType

Control Word type. Destination, toggle, value, etc. @since 2.0.8

protected int CtrlWordType

Field Value

int

DefaultParameterValue

The default value for this control word. Not all control words use a default parameter value. @since 2.0.8

protected int DefaultParameterValue

Field Value

int

GroupPrefix

String containing the value of "{" or "" (blank) depending on if this is the first control word in a group. @since 2.0.8

protected string GroupPrefix

Field Value

string

PassDefaultParameterValue

Does this control word use the default value? @since 2.0.8

protected bool PassDefaultParameterValue

Field Value

bool

RtfParser

Local variable referencing the parser object. @since 2.0.8

protected RtfParser RtfParser

Field Value

RtfParser

RtfVersionSupported

What version of the RTF spec the control word was introduced. @since 2.0.8

protected float RtfVersionSupported

Field Value

float

SpecialHandler

Class, property, etc. @since 2.0.8

protected string SpecialHandler

Field Value

string

Methods

AfterControlWord()

Post-processing after the control word. @since 2.0.8

protected static bool AfterControlWord()

Returns

bool

false = stop processing, true = continue processing

BeforeControlWord()

Pre-processing before the control word. If return value is true, no further processing will be performed on this control word. @since 2.0.8

protected static bool BeforeControlWord()

Returns

bool

false = stop processing, true = continue processing

HandleControlword(RtfCtrlWordData)

The primary control word handler method. Called by the parser once it has a control word and parameter if applicable. The control word and associated parameter if applicable. true or false if the control word was handled. @since 2.0.8

public bool HandleControlword(RtfCtrlWordData ctrlWordDataIn)

Parameters

ctrlWordDataIn RtfCtrlWordData

Returns

bool

OnControlWord()

Handle the control word. @since 2.0.8

protected static bool OnControlWord()

Returns

bool

true if control word was handled, false if it was not handled.