InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
SnpManipulateInCopyCJKGridAttributes Class Reference

Classes

struct  GridAttributes
 

Public Types

typedef K2Pair< UIDRef, PMStringRefNamePair
 
typedef K2Vector< RefNamePairRefNamePairs
 

Public Member Functions

ErrorCode InspectGridAttributes (const IGridAttributesPrefs *gridAttributesPrefs, GridAttributes &prefsData)
 
ErrorCode ModifyGridAttributes (IGridAttributesPrefs *gridAttributesPrefs, const GridAttributes &prefsData)
 
void SetAttributes (GridAttributes &prefsData)
 
void ReportAttributes (const GridAttributes &prefsData)
 
RefNamePairs GetCJKGridAttributeRefNamePairs (IDocument *doc=nil)
 

Detailed Description

  • Inspects and modifies the InCopy CJK grid settings in the text area of an InCopy story document.

CJK grid settings in an InCopy story document are encapsulated in the IGridAttributesPrefs interface. This interface is aggregated on one of the 4 following bosses:

Note that this code snippet only loads in the Japanese feature set of InCopy (kInCopyProductFS | kJapaneseLanguageFS), or kInCopyJapaneseFS.

, ,

Member Typedef Documentation

Type definition for keeping a UIDRef of the boss that agregates IGridAttributesPres and its description.

Member Function Documentation

SnpManipulateInCopyCJKGridAttributes::RefNamePairs SnpManipulateInCopyCJKGridAttributes::GetCJKGridAttributeRefNamePairs (IDocumentdoc = nil)

Gathers the UIDRefs of instances of bosses that aggregate IGridAttributesPrefs and associates each item with a description. The descriptions can be passed on to ISnipRunParameterUtils::GetChoice to help the user pick a specific instance.

Parameters
docIN IDocument from a specific document, if available. If doc is non-nil, then the IGridAttributesPrefs from kDocWorkspaceBoss will be included in the returned vector.
Returns
RefNamePairs containing the UIDRef for the boss instance that aggregates IGridAttributesPrefs and a description of that instance.
ErrorCode SnpManipulateInCopyCJKGridAttributes::InspectGridAttributes (const IGridAttributesPrefsgridAttributesPrefs,
GridAttributesprefsData 
)

Inspects settings in IGridAttributesPrefs.

Parameters
gridAttributesPrefsIN A specific instance of a IGridAttributesPrefs interface.
prefsDataOUT The inspected preference settings.
Returns
kSuccess on success, other ErrorCode otherwise.
ErrorCode SnpManipulateInCopyCJKGridAttributes::ModifyGridAttributes (IGridAttributesPrefsgridAttributesPrefs,
const GridAttributesprefsData 
)

Modifies settings in a specific instance of IGridAttributesPrefs.

Parameters
gridAttributesPrefsIN A specific instance of a IGridAttributesPrefs interface.
prefsDataIN The preference settings to set.
Returns
kSuccess on success, other ErrorCode otherwise.
void SnpManipulateInCopyCJKGridAttributes::ReportAttributes (const GridAttributesprefsData)

Reports the values in GridAttributes to SNIPLOG. You can pass the GridAttributes gathered with InspectGridAttributes.

Parameters
prefsDataIN GridAttributes filled in.
void SnpManipulateInCopyCJKGridAttributes::SetAttributes (GridAttributesprefsData)

Arbitrarily sets the grid attributes data structure so that it could be passed to ModifyGridAttributes.

Modify the contents of this implementation as desired.