Table of Contents

Class RtfList

Namespace
iTextSharp.text.rtf.list
Assembly
iTextSharp.LGPLv2.Core.dll

The RtfList stores one List. It also provides the methods to write the list declaration and the list data. @version $Id: RtfList.cs,v 1.18 2008/05/16 19:31:01 psoares33 Exp $ @author Mark Hall (Mark.Hall@mail.room3b.eu) @author Thomas Bickel (tmb99@inode.at) @author Felix Satyaputra (f_satyaputra@yahoo.co.uk)

public class RtfList : RtfElement, IRtfExtendedElement, IRtfBasicElement, IRtfElementInterface
Inheritance
RtfList
Implements
Inherited Members

Constructors

RtfList()

Constructs an empty RtfList object. @since 2.1.3

public RtfList()

RtfList(RtfDocument)

Constructs an empty RtfList object. @since 2.1.3

public RtfList(RtfDocument doc)

Parameters

doc RtfDocument

The RtfDocument this RtfList belongs to

RtfList(RtfDocument, List)

Constructs a new RtfList for the specified List. @since 2.1.3

public RtfList(RtfDocument doc, List list)

Parameters

doc RtfDocument

The RtfDocument this RtfList belongs to

list List

The List this RtfList is based on

Fields

LIST_TYPE_HYBRID

List type of listhybrid @since 2.1.3

public const int LIST_TYPE_HYBRID = 2

Field Value

int

LIST_TYPE_NORMAL

List type of NORMAL - no control word @since 2.1.3

public const int LIST_TYPE_NORMAL = 0

Field Value

int

LIST_TYPE_SIMPLE

List type of listsimple @since 2.1.3

public const int LIST_TYPE_SIMPLE = 1

Field Value

int

ListId

Constant for the list id @since 2.1.3

public static readonly byte[] ListId

Field Value

byte[]

ListLevelNumber

character properties

public static readonly byte[] ListLevelNumber

Field Value

byte[]

ListNumber

Constant for the list number @since 2.1.3

public static readonly byte[] ListNumber

Field Value

byte[]

ListNumberEnd

Constant for the old list number end @since 2.1.3

public static readonly byte[] ListNumberEnd

Field Value

byte[]

ListText

Constant for the old list text @since 2.1.3

public static readonly byte[] ListText

Field Value

byte[]

Tab

Constant for a tab character @since 2.1.3

public static readonly byte[] Tab

Field Value

byte[]

Methods

CorrectIndentation()

Correct the indentation of this RtfList by adding left/first line indentation from the parent RtfList. Also calls correctIndentation on all child RtfLists. @since 2.1.3

protected void CorrectIndentation()

CreateDefaultLevels()

Create a default set of listlevels @since 2.1.3

protected void CreateDefaultLevels()

GetId()

Get the list ID number @since 2.1.3

public int GetId()

Returns

int

this list id

GetListLevel(int)

@since 2.1.3

public RtfListLevel GetListLevel(int index)

Parameters

index int

Returns

RtfListLevel

the list at the index

GetListNumber()

Gets the id of this list @since 2.1.3

public int GetListNumber()

Returns

int

Returns the list number.

GetListType()

@see RtfList#LIST_TYPE_NORMAL @see RtfList#LIST_TYPE_SIMPLE @see RtfList#LIST_TYPE_HYBRID @since 2.1.3

public int GetListType()

Returns

int

the listType

GetName()

@since 2.1.3

public string GetName()

Returns

string

the name

GetParentList()

@since 2.1.3

public RtfList GetParentList()

Returns

RtfList

the parentList

SetDocument(RtfDocument)

Set the document. @since 2.1.3

public void SetDocument(RtfDocument doc)

Parameters

doc RtfDocument

The RtfDocument

SetId(int)

Set the list ID number @since 2.1.3

public void SetId(int id)

Parameters

id int

SetInHeader(bool)

Sets whether this RtfList is in a header. Sets the correct inTable setting for all child elements. @since 2.1.3

public override void SetInHeader(bool inHeader)

Parameters

inHeader bool

True if this RtfList is in a header, false otherwise

SetInTable(bool)

Sets whether this RtfList is in a table. Sets the correct inTable setting for all child elements. @since 2.1.3

public override void SetInTable(bool inTable)

Parameters

inTable bool

True if this RtfList is in a table, false otherwise

SetListNumber(int)

Sets the id of this list @since 2.1.3

public void SetListNumber(int listNumber)

Parameters

listNumber int

The list number to set.

SetListType(int)

@see RtfList#LIST_TYPE_NORMAL @see RtfList#LIST_TYPE_SIMPLE @see RtfList#LIST_TYPE_HYBRID @since 2.1.3

public void SetListType(int listType)

Parameters

listType int

the listType to set

SetName(string)

@since 2.1.3

public void SetName(string name)

Parameters

name string

the name to set

SetParentList(RtfList)

@since 2.1.3

public void SetParentList(RtfList parentList)

Parameters

parentList RtfList

the parentList to set

WriteContent(Stream)

Writes the content of the RtfList @since 2.1.3

public override void WriteContent(Stream outp)

Parameters

outp Stream

WriteDefinition(Stream)

Writes the definition part of this list level @throws IOException @since 2.1.3

public void WriteDefinition(Stream outp)

Parameters

outp Stream

WriteListNumbers(Stream)

Writes only the list number and list level number. @throws IOException On i/o errors. @since 2.1.3

protected void WriteListNumbers(Stream result)

Parameters

result Stream

The Stream to write to

WriteListTextBlock(Stream, int, RtfListLevel)

@throws IOException @since 2.1.3

protected void WriteListTextBlock(Stream result, int itemNr, RtfListLevel listLevel)

Parameters

result Stream
itemNr int
listLevel RtfListLevel