You are on page 1of 1

CHAPTER 2: Text Text containers 73

1. Use ITextModel::QueryFrameList to get the frame list (IFrameList) on the frame list boss object
(kFrameListBoss).

2. Use IFrameList::QueryFrameContaining to get the text frame (ITextFrameColumn) for the frame boss
object (kFrameItemBoss).

3. Use IHierarchy::QueryParent to get the multi-column frame item (kMultiColumnItemBoss). Use the
equivalent call on the multi-column item to get the page item (kSplineItemBoss).

NOTE: The index need not belong to the primary story thread; it could reference text within another story
thread, like a table cell or footnote.

Sample code

SnpManipulateTextFrame::QueryTextFrameContaining

Finding the story associated with a parcel


Given a parcel (IParcel), you can determine the story with which it is associated.

Solution

The text must be fully composed. Follow these steps:

1. Use IParcel::QueryFrame on the parcel object to get the text frame interface (ITextFrameColumn) on
the text frame boss object (kFrameItemBoss) with which the parcel is associated.

2. Use ITextFrameColumn ::QueryTextModel to get the text model for the text that flows in the text
frame.

Alternatively, navigate using the text parcel list (ITextParcelList), as follows:

1. Use IParcel::QueryParcelList on the parcel object to get the parcel list (IParcelList) that maintains the
relationship for associated parcels.

2. Use ITextParcelList::GetTextModelRef to get the UIDRef for the text model (kTextModelRef ) associated
with the parcel. ITextParcelList is on the same boss object as the IParcelList interface.

Sample code

SnpEstimateTextDepth::GetParcelTextRange code snippet

Finding the range of text displayed by a parcel


You can determine the range of a particular text story displayed in a particular parcel (IParcel).

Solution

The text must be fully composed. Follow these steps:

1. Use IParcel::GetParcelKey to obtain the parcel key.

You might also like