InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IGalleyUtils Class Referenceabstract

#include <IGalleyUtils.h>

Inheritance diagram for IGalleyUtils:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IGALLEYUTILS }
 

Public Member Functions

virtual IControlViewGetWritingWidget (IPanelControlData *panelData, UIDRef storyRef)=0
 
virtual UIDRef GetStoryRef (IControlView *writingWidget)=0
 
virtual UIDRef GetFrameRef (IControlView *writingWidget)=0
 
virtual int32 GetStoryIndex (ITextLines *textLines, ITextModel *textModel)=0
 
virtual IControlViewFindGalleyView (IDocument *document)=0
 
virtual void MeasureText (IFontInstance *fontInstance, const PMString &data, PMReal *xWidth, PMReal *yWidth)=0
 
virtual IDocumentPresentationFindFrontmostGalleyPresentation (IDocument *document=nil)=0
 
virtual IDocumentPresentationFindFrontmostLayoutPresentation (IDocument *document=nil)=0
 
virtual UIDList GetGalleyPanels (UIDRef onDocRef=UIDRef())=0
 
virtual PMString GetFontOfStyle (PMString fontFamilyName, IFontMgr::FontStyleBits fontStyle)=0
 
virtual IPMFontQueryInterfaceFont (bool16 hilite)=0
 
virtual void DrawInterfaceString (const PMString &string, IControlView *drawInView, IGraphicsPort *gPort, const PMRect &textBounds, const PMPoint &textLoc, const RealAGMColor &textColor, const RealAGMColor &backgroundColor, bool16 hilite=kFalse)=0
 
virtual void GetXMeasureUnitList (K2Vector< ClassID > &unitList)=0
 
virtual
ITextDataValidation::RangeError 
ParseLineRange (K2Vector< int32 > &rangeList, PMString rangeText, int32 start, int32 end)=0
 
virtual void GetFontName (PMString &fontName, PMString &fontFamilyName, PMString &style)=0
 
virtual void GetFontStyleList (K2Vector< PMString > &StyleList, PMString &fontFamily)=0
 
virtual void GetFontNameList (K2Vector< PMString > &fontList, bool16 filterSymbolFonts=kTrue, K2Vector< PMString > *translatedFontList=nil)=0
 
virtual void GetFontFamilyAndStyle (PMString &fontName, PMString &fontFamily, PMString &fontStyle)=0
 
virtual bool16 InGalleyOrStory (IDocumentPresentation *pres=nil)=0
 
virtual bool16 InGalley (IDocumentPresentation *pres=nil)=0
 
virtual bool16 InStory (IDocumentPresentation *pres=nil)=0
 
virtual bool16 InLayout (IDocumentPresentation *pres=nil)=0
 
virtual
IInCopyViewPrefs::ActiveView 
GetViewMode (IDocumentPresentation *pres=nil)=0
 
virtual void SetViewMode (IDocumentPresentation *pres, IInCopyViewPrefs::ActiveView viewMode)=0
 
virtual void SetGalleyTextSelection (TextIndex nStart, TextIndex nEnd, UIDRef storyRef, IControlView *forView=nil, bool16 ownedItemAllowed=kFalse)=0
 
virtual void SetLayoutTextSelection (TextIndex nStart, TextIndex nEnd, UIDRef storyRef, bool16 ownedItemAllowed=kFalse)=0
 
virtual void GetCurrentTextSelection (TextIndex &nStart, TextIndex &nEnd, UIDRef *storyRef, IControlView *view=nil)=0
 
virtual void GetListOfUserStories (IDocument *document, UIDList &stories, bool16 stripGraphicStories=kFalse)=0
 
virtual bool16 IsStoryCollapsedInGalley (const UIDRef &storyRef)=0
 
virtual void GetNonCollapsedStoryList (IDocumentPresentation *pres, UIDList &storyList)=0
 
virtual PMString GetPageNumberString (TextIndex pageNumberCharIndex, ITextModel *model)=0
 
virtual int32 GetTrueOversetLineLength (ITextModel *model, TextIndex startModelOffset, int32 averageLineLength, int32 primarySpan, bool16 &endsInForceBreak)=0
 
virtual int32 EstimateOversetLineLengths (ITextModel *model)=0
 
virtual bool16 IsBreakCharacter (const UTF32TextChar &character, bool16 &forceBreak, IDrawingStyle *drawStyle=nil, ITextModel *model=nil, TextIndex position=0L)=0
 
virtual void RefreshAllText (IControlView *writingView, bool16 justInval, bool16 ignoreILE, bool16 backgroundCompose=kFalse)=0
 
virtual void InvalInfoColumn (IControlView *writingView)=0
 
virtual bool16 SuspendPlayPendingInvals (IDocumentPresentation *pres=nil)=0
 
virtual bool16 ResumePlayPendingInvals (IDocumentPresentation *pres=nil)=0
 
virtual bool16 SuspendPlayPendingInvals (UIDRef viewRef=UIDRef::gNull)=0
 
virtual bool16 ResumePlayPendingInvals (UIDRef viewRef=UIDRef::gNull)=0
 
virtual void CorrectFakedSpaceWidth (const UTF32TextChar &character, PMReal ptSize, IFontInstance *fontInstance, PMReal &charWidth)=0
 
virtual void ScrollToCursor (IControlView *writingView, bool16 forceScroll=kFalse)=0
 
virtual void GetInCopyStoriesForGalley (IDocument *theDoc, UIDList &filteredStories, bool16 stripGraphicStories)=0
 
virtual bool16 WriteStoryListFile (const UIDRef &docRef)=0
 
virtual bool16 ReadStoryListFile (const UIDRef &docRef)=0
 
virtual std::string GetFontOfStyleAsStdStr (PMString fontFamilyName, IFontMgr::FontStyleBits fontStyle)=0
 
virtual void GetFontNameAsStdStr (std::string &fontName, PMString &fontFamilyName, PMString &style)=0
 
virtual void AttachSpecialContainerToFrames (IDocument *doc, ITextModel *textModel)=0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

IGalleyUtils is an aggregrate of many different utility functions centered around the document window and galley sub window.

A writing widget is identified by having a ITEXTLINES and IQUICKCOMPOSER interface The user interface shows three tabs in the document window, one layout, one galley, and one story. But the widget hierarchy actually only contains a layout view and a writing widget that has two modes: Accurate line endings (Galley) and innaccurate line endings (Story). Some of the helper functions below attempt to mimic what the user sees rather than how it is implemented, i.e. there are three constants for the view, kLayout, kStory, kGalley.

All references to the writing widget really refer to the composite widget that can either be showing accurate line endings or innaccurate line endings.

A writing widget can contain multiple stories but only one story has text focus at a time. The story with text focus is the active story.

Member Function Documentation

virtual void IGalleyUtils::AttachSpecialContainerToFrames (IDocumentdoc,
ITextModeltextModel 
)
pure virtual

Internal use only: To attach the special container information to the frames

Parameters
docThe input document reference
textModelThe input text model reference
virtual void IGalleyUtils::CorrectFakedSpaceWidth (const UTF32TextCharcharacter,
PMReal ptSize,
IFontInstancefontInstance,
PMRealcharWidth 
)
pure virtual

This is a helper method that will give back widths of different types of space characters. You may pass any character to it if the character is not of a type this routine knows something about the charWidth parameter will not be adjusted if it is then the charWidth parameter may be modified to give the width of the special type space character. Faked space characters are things like emspace, enspace, thinspace etc.

Parameters
characterCharacter code of the character to check
ptSizedisplay font point size (used to determine m space widths and other spaces based on m spaces)
fontInstanceinstance of font that we are displaying text with.
charWidththe width of the space character is returned in this parameter. This value is not changed if the character is not recognized by this routine.
Returns
Returns kTrue if resume was successful.
virtual void IGalleyUtils::DrawInterfaceString (const PMStringstring,
IControlViewdrawInView,
IGraphicsPortgPort,
const PMRecttextBounds,
const PMPointtextLoc,
const RealAGMColortextColor,
const RealAGMColorbackgroundColor,
bool16 hilite = kFalse 
)
pure virtual

Draws a string in the interface font appropriate for the platform. This is necessary because agm doesn't render the interface font properly. textBounds is the area the string draws into in gPorts coordinates. textLoc specifies the baseline in relation to text bounds. 0,0 would put the baseline at the top left of textBounds.

Parameters
stringThe text string to render.
drawInViewThe view we are drawing the string in. All coordinates are local to this view.
gPortThe graphics port to render into.
textBoundsThe area the string draws in the port.
textLocThe baseline in relation to textBounds. 0,0 would be at the top left of textBounds.
textColorThe color to render the string in.
backgroundColorThe color to fill behind the text.
hiliteIndicates whether to use the normal (kFalse) or bold (kTrue) interface font.
virtual int32 IGalleyUtils::EstimateOversetLineLengths (ITextModelmodel)
pure virtual

Estimates the average line length the normal composer used when composing this text model.

Parameters
modelThe text model to use.
Returns
The average line length.
virtual IDocumentPresentation* IGalleyUtils::FindFrontmostGalleyPresentation (IDocumentdocument = nil)
pure virtual

Returns the front most document window associated with the document. If document is nil then it finds the window associated with the front most document. If the front most window of the document is in kLayout mode then this function will return nil. In other words, this method is a combination InGalleyOrStory and FindGalleyView.

Parameters
documentThe document to find the front most document window. If document is nil then it uses the front most document window
Returns
The front most document window of document. Nil if the front most document window is in kLayout mode.
virtual IDocumentPresentation* IGalleyUtils::FindFrontmostLayoutPresentation (IDocumentdocument = nil)
pure virtual

Returns the front most layout window associated with the document. If document is nil then it finds the frontmost layout window associated with the active context document. If there are no layout windows open this function will return nil.

Parameters
documentThe document to find the front most layout window.
Returns
The front most layout window of document. Nil if there are no layout windows.
virtual IControlView* IGalleyUtils::FindGalleyView (IDocumentdocument)
pure virtual

Finds the writing widget in the front most document window of the passed in document. This method does not AddRef the writing widget.

Parameters
documentThe document to find the widget from.
Returns
The writing widget. Caller does not need to release the writing widget.
virtual void IGalleyUtils::GetCurrentTextSelection (TextIndex & nStart,
TextIndex & nEnd,
UIDRefstoryRef,
IControlViewview = nil 
)
pure virtual

Get the current selection regardless of which mode the document window is in.

Parameters
nStartOUT The start index of the selection.
nEndOUT The end index of the selection.
storyRefOUT The story the selection is in.
virtual void IGalleyUtils::GetFontFamilyAndStyle (PMStringfontName,
PMStringfontFamily,
PMStringfontStyle 
)
pure virtual

Given a full font name return the family and style.

Parameters
fontNameThe font name to look up the family and style for.
fontFamilyOUT The family of the specified font.
fontStyleOUT The style of the specified font.
virtual void IGalleyUtils::GetFontName (PMStringfontName,
PMStringfontFamilyName,
PMStringstyle 
)
pure virtual
Deprecated:
This API is deprecated. Please use GetFontNameStdStr() instead A more generic way to find a font and style. Some fonts have non-standard styles that can only be specified by a string. This method finds the font fontFamilyName of style style and returns it.
Parameters
fontNameOUT The returned postscript font name if a font is found.
fontFamilyNameThe font family name such as Times.
styleThe font style such as Bold.
virtual void IGalleyUtils::GetFontNameAsStdStr (std::string & fontName,
PMStringfontFamilyName,
PMStringstyle 
)
pure virtual

A more generic way to find a font and style. Some fonts have non-standard styles that can only be specified by a string. This method finds the font fontFamilyName of style style and returns it.

Parameters
fontNameOUT The returned postscript font name if a font is found.
fontFamilyNameThe font family name such as Times.
styleThe font style such as Bold.
virtual void IGalleyUtils::GetFontNameList (K2Vector< PMString > & fontList,
bool16 filterSymbolFonts = kTrue,
K2Vector< PMString > * translatedFontList = nil 
)
pure virtual

Returns a list of all the fonts installed in the font manager.

Parameters
ListOUT The list of all the fonts.
filterSymbolFontsif True it will filter out some known symbol fonts otherwise it will return a full list
translatedFontListwill return a list of the fonts with translated names for ui display
virtual PMString IGalleyUtils::GetFontOfStyle (PMString fontFamilyName,
IFontMgr::FontStyleBits fontStyle 
)
pure virtual
Deprecated:
This API is deprecated. Please use GetFontOfStyleStdStr() instead. Returns the name of the font given the family name and style. Fonts often have font variants for the bold, italic, bolditalic, all caps, and small caps. For example, Times and Times Bold are two different fonts but you may only want to refer to Times and ask for the variant by ID (fontStyle). This method will attempt to find the variant that contains the style asked for.
Parameters
fontFamilyNameThe font family name.
fontStyleThe style of the font such as kBold.
Returns
The postscript name of the font having the style.
virtual std::string IGalleyUtils::GetFontOfStyleAsStdStr (PMString fontFamilyName,
IFontMgr::FontStyleBits fontStyle 
)
pure virtual

Returns the name of the font given the family name and style. Fonts often have font variants for the bold, italic, bolditalic, all caps, and small caps. For example, Times and Times Bold are two different fonts but you may only want to refer to Times and ask for the variant by ID (fontStyle). This method will attempt to find the variant that contains the style asked for.

Parameters
fontFamilyNameThe font family name.
fontStyleThe style of the font such as kBold.
Returns
The postscript name of the font having the style.
virtual void IGalleyUtils::GetFontStyleList (K2Vector< PMString > & StyleList,
PMStringfontFamily 
)
pure virtual

Returns the entire font family given a family name.

Parameters
StyleListOUT The list of fonts that are in the family.
fontFamilyThe font family such as Times.
virtual UIDRef IGalleyUtils::GetFrameRef (IControlViewwritingWidget)
pure virtual

Returns the frame corresponding to the given writing widget. If the text is threaded through several frames then this is the first frame in the thread.

Parameters
writingWidgetThe writing widget used to get the active story and then frame.
Returns
The frame that corresponds to the active story.
virtual UIDList IGalleyUtils::GetGalleyPanels (UIDRef onDocRef = UIDRef())
pure virtual

Returns a list of writing widgets for the dococument. This is a list because there can be more than one document window open and therefore more than one writing widget. If there are N document windows open then there will be N writing widgets in the return value.

Parameters
onDocRefThe document to find the writing widgets. If empty then the method gets the front most document.
Returns
A UIDList of the writing widgets.
virtual void IGalleyUtils::GetInCopyStoriesForGalley (IDocumenttheDoc,
UIDListfilteredStories,
bool16 stripGraphicStories 
)
pure virtual

Get the stories to display in the galley and story views while running in InCopy.

Parameters
theDocdocument to retrieve stories for
filteredStorieslist of stories to display in story and galley is returned in this variable
stripGraphicStorieswant to pass true for this parameter story and galley don't support graphic stories.
Returns
none
virtual void IGalleyUtils::GetListOfUserStories (IDocumentdocument,
UIDListstories,
bool16 stripGraphicStories = kFalse 
)
pure virtual

Returns the list of InCopy stories in the document. This method uses the InCopy story list but filters out any InCopy stories which are inline stories of other InCopy stories.

Parameters
documentThe document to get the stories for.
storiesOUT The return list of stories.
stripGraphicStorisIN A flag to indicate if graphic stories should be stripped.
virtual void IGalleyUtils::GetNonCollapsedStoryList (IDocumentPresentationpres,
UIDListstoryList 
)
pure virtual

For the given document window return the list of expanded stories.

Parameters
windowThe window from which to find the writing widget. Can be the document window or the galley window.
storyListOUT Returns the list of expanded stories.
virtual PMString IGalleyUtils::GetPageNumberString (TextIndex pageNumberCharIndex,
ITextModelmodel 
)
pure virtual

Returns the page number string for the given index. Essentially maps the index to a frame and computes the page that frame is on. Assumes that we have the position of a page number character. If this is true then it will return the string representation of the page number this character is on. Only will work in galley or layout. Story does not have the information available to calculate page numbers. Routine IS NOT fast don't call it unnecessarily.

Parameters
pageNumberCharIndexThe text index to check.
modelThe text model to check in.
Returns
The page number string.
virtual int32 IGalleyUtils::GetStoryIndex (ITextLinestextLines,
ITextModeltextModel 
)
pure virtual
Get the story index for a galley/story editor story.

Parameters
textLinesIN the ITextLines interface.
textModelIN the text model.
Returns
story index for this story. -1 if not found.
virtual UIDRef IGalleyUtils::GetStoryRef (IControlViewwritingWidget)
pure virtual

Returns the active story for the given writing widget.

Parameters
writingWidgetThe writing widget used to get the active story.
Returns
The active story.
virtual int32 IGalleyUtils::GetTrueOversetLineLength (ITextModelmodel,
TextIndex startModelOffset,
int32 averageLineLength,
int32 primarySpan,
bool16 & endsInForceBreak 
)
pure virtual

Calculates the overset line lengths.

Parameters
modelThe text model to compute from.
startModelOffsetThe text index to start from.
averageLineLengthThe average line length to use computing the line lengths.
primarySpanThe length of the primary span.
endsInForceBreakReturns whether the line ends because of a break character or not.
Returns
Returns the index of where the line broke.
virtual IInCopyViewPrefs::ActiveView IGalleyUtils::GetViewMode (IDocumentPresentationpres = nil)
pure virtual

Returns the ViewMode (kStory, kGalley, or kLayout) of the window.

Parameters
windowThe window to check. If nil this method uses the front most document window.
virtual IControlView* IGalleyUtils::GetWritingWidget (IPanelControlDatapanelData,
UIDRef storyRef 
)
pure virtual

Type definitions for some of the methods below is in IInCopyViewPrefs. The document window is either in kGalley, kStory, or kLayout. kGalley is the accurate line endings mode with copyfit. kStory is the innaccurate line endings mode without copyfit. kLayout is the InDesign layou preview mode.Returns the writing widget that has the passed in story ref. If a writing widget is not found it returns nil.

Parameters
panelDataThe panel control data of the document window
storyRefThe story reference the caller wants to find the writing widget for
Returns
The writing widget
virtual void IGalleyUtils::GetXMeasureUnitList (K2Vector< ClassID > & unitList)
pure virtual

Returns the ClassID list of x measure unit, with kRulerCustomMSBoss in the last item.

Parameters
unitListOUT the x measure unit list.
virtual bool16 IGalleyUtils::InGalley (IDocumentPresentationpres = nil)
pure virtual

Returns kTrue if the window is in kGalley mode.

Parameters
windowThe window to check. If nil this method uses the front most document window.
virtual bool16 IGalleyUtils::InGalleyOrStory (IDocumentPresentationpres = nil)
pure virtual

Returns kTrue if the window has the writing widget active, i.e. in kGalley or kStory mode.

Parameters
windowThe window to check. If nil this method uses the front most document window.
virtual bool16 IGalleyUtils::InLayout (IDocumentPresentationpres = nil)
pure virtual

Returns kTrue if the window is in kLayout mode.

Parameters
windowThe window to check. If nil this method uses the front most document window.
virtual bool16 IGalleyUtils::InStory (IDocumentPresentationpres = nil)
pure virtual

Returns kTrue if the window is in kStory mode.

Parameters
windowThe window to check. If nil this method uses the front most document window.
virtual void IGalleyUtils::InvalInfoColumn (IControlViewwritingView)
pure virtual

Redraw the info column.

virtual bool16 IGalleyUtils::IsBreakCharacter (const UTF32TextCharcharacter,
bool16 & forceBreak,
IDrawingStyledrawStyle = nil,
ITextModelmodel = nil,
TextIndex position = 0L 
)
pure virtual

Returns if the given character is a break character or no. e.g. a carraige return.

Parameters
characterThe text character to check in UTF32 format. Note, unless it's a J paragraph this is all that is really is needed to get a break point
forceBreakOUT Whether this is a force break character or not.
drawStyleused to determine whether this is a J paragraph which needs additional break rules applied
modelif this is a J paragraph then the routine needs to look at surrounding characters to determine legal breaks
positiontext index within the story to look for legal break points
Returns
Returns kTrue if this is a bream character, kFalse if not.
virtual bool16 IGalleyUtils::IsStoryCollapsedInGalley (const UIDRefstoryRef)
pure virtual

This checks the front most documet window to see if the given story is collapsed. Each writing widget can have a different list of collapsed and not collapsed stories. Returns kFalse if the front most window is in kLayout mode.

Parameters
storyRefThe Story to check if it is collapsed.
virtual void IGalleyUtils::MeasureText (IFontInstancefontInstance,
const PMStringdata,
PMRealxWidth,
PMRealyWidth 
)
pure virtual

A mechanism to measure interface text that does not rely on an AGMGraphicsContext.

Parameters
fontInstanceThe font used to measure with.
dataThe string of text to measure.
xWidthOUT The returned width in pixels.
yWidthOUT The returned height in pixels.
virtual ITextDataValidation::RangeError IGalleyUtils::ParseLineRange (K2Vector< int32 > & rangeList,
PMString rangeText,
int32 start,
int32 end 
)
pure virtual

Returns the indices of the text lines specified in rangeText that is between start and end.

Parameters
rangeListOUT The list of lines.
rangeTextThe text the user entered in the print or PDF dialog to specify a range
startThe starting index within which to search
endThe ending index within which to search
Returns
Returns whether the passed in arguments are valid or not. See ITextDataValidation.
virtual IPMFont* IGalleyUtils::QueryInterfaceFont (bool16 hilite)
pure virtual

Platform neutral way to get the interface font. Windows, Mac OS 9, and Mac OS X all have different interface fonts. This method allows client code to remain platform agnostic.

Parameters
hiliteIndicates whether to get the normal (kFalse) or bold (kTrue) interface font.
Returns
The corresponding interface font.
virtual bool16 IGalleyUtils::ReadStoryListFile (const UIDRefdocRef)
pure virtual

Read an existing story list file and apply the results to all galley and story views. This routine is only relevant for INCOPY and will not work for InDesign. Because only InCopy supports multiple stories in a view. Assumes the story list file exists next to the InDesign document as would be created by the WriteStoryListFile() routine.

Parameters
documentassociated with the story list file from (parent document).
Returns
- kTrue if successful
virtual void IGalleyUtils::RefreshAllText (IControlViewwritingView,
bool16 justInval,
bool16 ignoreILE,
bool16 backgroundCompose = kFalse 
)
pure virtual

Recreate textlines or simply redraw the text dependent on flags.

Parameters
writingViewThe writing control view.
justInvalkFalse means to recompose the text.
ignoreILEkTrue measn to ignore the text when the mode is ILE
backgroundComposewhen justInval is kFalse, backgroundCompose is kTure means to compose starting first line.
virtual bool16 IGalleyUtils::ResumePlayPendingInvals (IDocumentPresentationpres = nil)
pure virtual

This is a helper method that wraps the command to resume play pending invals (drawing) for the text lines associated with the specified window.

Parameters
windowThe window to resume. If nil this method uses the front most document window.
Returns
Returns kTrue if resume was successful.
virtual bool16 IGalleyUtils::ResumePlayPendingInvals (UIDRef viewRef = UIDRef::gNull)
pure virtual

This is a helper method that wraps the command to resume play pending invals (drawing) for the text lines associated with the specified window.

Parameters
viewRefThe control view UIDRef to resume. If nil this method uses the front most document window.
Returns
Returns kTrue if resume was successful.
virtual void IGalleyUtils::ScrollToCursor (IControlViewwritingView,
bool16 forceScroll = kFalse 
)
pure virtual

This routine will scroll the view to the current cursor location. It will be scrolled so that the cursor is visible not centered.

Parameters
writingViewthe gallay or story view to scroll to the cursor on.
forceScrollforce the view to scroll to so that cursor is at the view top even if the cursor is already visible
Returns
none
virtual void IGalleyUtils::SetGalleyTextSelection (TextIndex nStart,
TextIndex nEnd,
UIDRef storyRef,
IControlViewforView = nil,
bool16 ownedItemAllowed = kFalse 
)
pure virtual

Set the selection in the Galley or Story mode.

Parameters
nStartThe start index of the selection to set.
nEndThe end index of the selection to set.
storyRefThe story to make active and to set the selection in.
ownedItemAllowedkTrue to set selection in the owned item story thread, kFalse to convert selection in owned item story thread into its anchor position and set it as the current selection.
virtual void IGalleyUtils::SetLayoutTextSelection (TextIndex nStart,
TextIndex nEnd,
UIDRef storyRef,
bool16 ownedItemAllowed = kFalse 
)
pure virtual

Set the selection in the Layout mode.

Parameters
nStartThe start index of the selection to set.
nEndThe end index of the selection to set.
storyRefThe story to set the selection in.
ownedItemAllowedkTrue to set selection in the owned item story thread, kFalse to convert selection in owned item story thread into its anchor position and set it as the current selection.
virtual void IGalleyUtils::SetViewMode (IDocumentPresentationpres,
IInCopyViewPrefs::ActiveView viewMode 
)
pure virtual

Sets the current view of the given document window. If there are no InCopy stories in the InCopy story list this method will force the window into kLayout mode only.

Parameters
windowThe window to set the view mode on.
viewModeThe view mode to use (kStory, kGalley, kLayout).
virtual bool16 IGalleyUtils::SuspendPlayPendingInvals (IDocumentPresentationpres = nil)
pure virtual

This is a helper method that wraps the command to suspend play pending invals (drawing) for the text lines associated with the specified window.

Parameters
windowThe window to suspend. If nil this method uses the front most document window.
Returns
Returns kTrue if suspend was successful.
virtual bool16 IGalleyUtils::SuspendPlayPendingInvals (UIDRef viewRef = UIDRef::gNull)
pure virtual

This is a helper method that wraps the command to suspend play pending invals (drawing) for the text lines associated with the specified window.

Parameters
viewRefThe control view UIDRef to suspend. If nil this method uses the front most document window.
Returns
Returns kTrue if suspend was successful.
virtual bool16 IGalleyUtils::WriteStoryListFile (const UIDRefdocRef)
pure virtual

Create if necessary and write out a story list file. Document will be created in the same directory as the parent document. Parent document must have been previously been saved to disk for this to work. This routine is currently only relevant for INCOPY. Because only InCopy supports multiple stories in a view.

Parameters
documentto create the story list file from (parent document).
Returns
- kTrue if successful