LayerPD_Layer
ObjectPDThread

A thread corresponds to an article in Acrobat's user interface, and contains an ordered sequence of rectangles that bound the article. Each rectangle is called a bead. See Section 8.3.2, Articles, in the PDF Reference for more information on articles and beads in PDF.

Threads can be created interactively by the user or programmatically. They are internally represented by a circular linked list of PDBead objects.



Typedef Summary
 Typedef
 PDThread
An article in the Acrobat viewer's user interface. It contains an ordered sequence of rectangles that bound the article. Each rectangle is called a bead. Threads can be created either interactively, by the user, or programmatically.
Method Summary
 Method
 
Deletes an article thread from its document. You must call PDDocRemoveThread() to remove the thread from the document (if it was added to one using PDDocAddThread()) before calling PDThreadDestroy().
 
void PDThreadDidChange(PDThread thread, void* clientData)
A thread was changed.
 
Gets the thread object corresponding to the specified Cos object. This method does not copy the object, but is instead the logical equivalent of a type cast.
 
Gets the Cos object corresponding to a thread. This method does not copy the object, but is instead the logical equivalent of a type cast.
 
Gets an article thread's first bead.
 
ASInt32 PDThreadGetInfo(PDThread thread, const char* infoKey, char* buffer, ASInt32 bufSize)
Gets the specified article thread's info.
 
void PDThreadGetInfoASText(PDThread thread, const ASText infoKey, ASText value)
Gets the specified article thread's info as an ASText object.
 
ASBool PDThreadIsValid(PDThread thread)
Tests whether a thread is valid. This is intended only to ensure that the thread has not been deleted, not to ensure that all necessary information is present and valid.
 
PDThread PDThreadNew(PDDoc aDocP)
Creates a new article thread. Use PDDocAddThread() to add the thread to a document.
 
void PDThreadSetFirstBead(PDThread thread, PDBead newFirstBead)
Sets an article thread's first bead.
 
void PDThreadSetInfo(PDThread thread, const char* infoKey, const char* buffer, ASInt32 bufSize)
Sets the specified article thread's info.
 
void PDThreadSetInfoASText(PDThread thread, const ASText infoKey, const ASText value)
Sets the specified article thread's info.

Typedefs Detail
PDThread 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

typedef OPAQUE_64_BITS PDThread;

An article in the Acrobat viewer's user interface. It contains an ordered sequence of rectangles that bound the article. Each rectangle is called a bead. Threads can be created either interactively, by the user, or programmatically.

See Also


File: PDExpT.h
Line: 3141



Method Detail
PDThreadDestroy()
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDThreadDestroy(PDThread thread)

Deletes an article thread from its document. You must call PDDocRemoveThread() to remove the thread from the document (if it was added to one using PDDocAddThread()) before calling PDThreadDestroy().

Parameters

thread — 

IN/OUT The thread to destroy.

See Also

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 3993
PDThreadDidChange() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDThreadDidChange(PDThread thread, void* clientData)

A thread was changed.

Parameters

thread — 

The thread that changed.

 
clientData — 

A pointer to a block of user-supplied data that was passed when the client registered for this notification using AVAppRegisterNotification().

See Also

Notifications


File: PIPokes.h
Line: 1005
PDThreadFromCosObj() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

PDThread PDThreadFromCosObj(CosObj obj)

Gets the thread object corresponding to the specified Cos object. This method does not copy the object, but is instead the logical equivalent of a type cast.

Parameters

obj — 

The dictionary Cos object for the thread.

Returns

The PDThread object for the thread.

See Also

Exceptions

pdErrBadThread is raised if the thread is not valid as defined by PDThreadIsValid.

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 4104
PDThreadGetCosObj() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

CosObj PDThreadGetCosObj(PDThread thread)

Gets the Cos object corresponding to a thread. This method does not copy the object, but is instead the logical equivalent of a type cast.

Parameters

thread — 

IN/OUT The thread whose Cos object is to obtained.

Returns

The dictionary Cos object for the thread. The contents of the dictionary can be enumerated using CosObjEnum(). It returns a NULL Cos object if PDThreadIsValid(thread) returns false.

See Also

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 4091
PDThreadGetFirstBead() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

PDBead PDThreadGetFirstBead(PDThread thread)

Gets an article thread's first bead.

Parameters

thread — 

IN/OUT The thread whose first bead is obtained.

Returns

The thread's first bead, or a NULL Cos object if the thread has no beads.

See Also

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 4007
PDThreadGetInfo() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

ASInt32 PDThreadGetInfo(PDThread thread, const char* infoKey, char* buffer, ASInt32 bufSize)

Gets the specified article thread's info.

Parameters

thread — 

IN/OUT The thread whose thread info is obtained.

 
infoKey — 

IN/OUT The key whose value is obtained.

 
buffer — 

IN/OUT (Filled by the method) The value associated with infoKey.

 
bufSize — 

IN/OUT The maximum number of characters that buffer can hold.

Returns

The number of characters written into buffer.

See Also

Since

PI_PDMODEL_VERSION >= 0x00020000

Note

For Roman viewers, this text is always stored in the PDFDocEncoding. For non-Roman character set viewers, this text is stored as PDFDocEncoding or Unicode, depending on the file's creator. Files created in a non-Roman environment contain Unicode versions of these strings; in a Roman environment, files contain PDFDocEncoding versions of these strings.

File: PDProcs.h
Line: 4043
PDThreadGetInfoASText() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDThreadGetInfoASText(PDThread thread, const ASText infoKey, ASText value)

Gets the specified article thread's info as an ASText object.

Parameters

thread — 

The thread whose thread info is being obtained.

 
infoKey — 

The key whose value is being obtained.

 
value — 

(Filled by the method) The text object containing the value associated with infoKey is set. The client must pass a valid ASText object value. The routine does not allocate it.

See Also

Since

PI_PDMODEL_VERSION >= 0x00080000

File: PDProcs.h
Line: 11559
PDThreadIsValid() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool PDThreadIsValid(PDThread thread)

Tests whether a thread is valid. This is intended only to ensure that the thread has not been deleted, not to ensure that all necessary information is present and valid.

Parameters

thread — 

The thread whose validity is tested.

Returns

true if the thread is valid, false otherwise.

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 4074
PDThreadNew() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

PDThread PDThreadNew(PDDoc aDocP)

Creates a new article thread. Use PDDocAddThread() to add the thread to a document.

Parameters

aDocP — 

The document in which the thread is created.

Returns

The newly created thread.

See Also

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 3979
PDThreadSetFirstBead() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDThreadSetFirstBead(PDThread thread, PDBead newFirstBead)

Sets an article thread's first bead.

Parameters

thread — 

IN/OUT The thread whose first bead is set.

 
newFirstBead — 

IN/OUT The bead to use as the first in thread.

See Also

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 4019
PDThreadSetInfo() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDThreadSetInfo(PDThread thread, const char* infoKey, const char* buffer, ASInt32 bufSize)

Sets the specified article thread's info.

Parameters

thread — 

IN/OUT The thread whose thread info is set.

 
infoKey — 

IN/OUT The key whose value is set.

 
buffer — 

IN/OUT The value to set.

 
bufSize — 

IN/OUT The number of characters in buffer.

See Also

Notifications

Since

PI_PDMODEL_VERSION >= 0x00020000

Note

For Roman viewers, this text is always stored in the PDFDocEncoding. For non-Roman character set viewers, this text is stored as PDFDocEncoding or Unicode, depending on the file's creator. Files created in a non-Roman environment contain Unicode versions of these strings; in a Roman environment, files contain PDFDocEncoding versions of these strings.

File: PDProcs.h
Line: 4064
PDThreadSetInfoASText() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDThreadSetInfoASText(PDThread thread, const ASText infoKey, const ASText value)

Sets the specified article thread's info.

Parameters

thread — 

The thread whose thread info is being set.

 
infoKey — 

The key whose value is being set.

 
value — 

The text object containing the value to set.

See Also

Since

PI_PDMODEL_VERSION >= 0x00080000

File: PDProcs.h
Line: 11574