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
RtfParserctrlWord
stringdefaultParameterValue
intpassDefaultParameterValue
boolctrlWordType
intprefix
stringsuffix
stringspecialHandler
string
Fields
CtrlWord
The control word for this class. @since 2.0.8
protected string CtrlWord
Field Value
CtrlWordData
The control word as parsed by the parser. @since 2.0.8
protected RtfCtrlWordData CtrlWordData
Field Value
CtrlWordPrefix
The prefix for all control words. @since 2.0.8
protected string CtrlWordPrefix
Field Value
CtrlWordSuffix
The prefix for all control words. @since 2.0.8
protected string CtrlWordSuffix
Field Value
CtrlWordType
Control Word type. Destination, toggle, value, etc. @since 2.0.8
protected int CtrlWordType
Field Value
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
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
PassDefaultParameterValue
Does this control word use the default value? @since 2.0.8
protected bool PassDefaultParameterValue
Field Value
RtfParser
Local variable referencing the parser object. @since 2.0.8
protected RtfParser RtfParser
Field Value
RtfVersionSupported
What version of the RTF spec the control word was introduced. @since 2.0.8
protected float RtfVersionSupported
Field Value
SpecialHandler
Class, property, etc. @since 2.0.8
protected string SpecialHandler
Field Value
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
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.