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

#include <ICJKGridSuite.h>

Inheritance diagram for ICJKGridSuite:
IPMUnknown

Classes

struct  ApplyData
 

Public Types

enum  { kDefaultIID = IID_ICJKGRIDSUITE }
 

Public Member Functions

virtual void FreezeSelectionForModalDialog ()=0
 
virtual void ThawSelectionForModalDialog ()=0
 
virtual bool16 CanApplyCJKGrid () const =0
 
virtual ErrorCode ApplyCJKGrid ()=0
 
virtual void GetFrameGridView (K2Vector< ICJKFrameGridDefaults::View > &frameGridViewVector, bool16 sortedAndUnique=kFalse) const =0
 
virtual ErrorCode SetFrameGridView (ICJKFrameGridDefaults::View view)=0
 
virtual
ICJKCharCountOptions::Location 
GetCharCountLocation () const =0
 
virtual PMReal GetCharacterCountSize () const =0
 
virtual ErrorCode SetCharacterCountOptions (ICJKCharCountOptions::Location location, const PMReal &size)=0
 
virtual bool16 ShouldEnablePasteWithoutCJKGrid () const =0
 
virtual UID GetActiveNamedGrid () const =0
 
virtual ErrorCode ApplyNamedGrid (UID namedGrid)=0
 
virtual bool16 ShouldEnableFrameGrid () const =0
 
virtual bool16 IsFrameGridDefaults () const =0
 
virtual void GetFilteredGridData (IFilteredCJKGridCmdData *filteredGridData) const =0
 
virtual void GetLinesAndCharsPerLine (K2Vector< int32 > &numberOfLinesVector, K2Vector< int32 > &charsPerLineVector, bool16 sortedAndUnique=kFalse) const =0
 
virtual ErrorCode ApplyFrameGrid (IFilteredCJKGridCmdData *filteredGridData, ApplyData applyData, bool16 applyGridView, ICJKFrameGridDefaults::View gridView, ICJKCharCountOptions::Location charCountLocation, const PMReal &charCountSize)=0
 
virtual void GetFrameSizeInfo (PMString &outString, IFilteredCJKGridCmdData *filteredGridData, ApplyData applyData)=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

Member Function Documentation

virtual ErrorCode ICJKGridSuite::ApplyCJKGrid ()
pure virtual

ApplyCJKGrid applies the story's ICJKGrid to the selected text.

Precondition
DESCRIPTION
Returns
kSuccess on success or applicable ErrorCode on failure.
virtual ErrorCode ICJKGridSuite::ApplyFrameGrid (IFilteredCJKGridCmdDatafilteredGridData,
ApplyData applyData,
bool16 applyGridView,
ICJKFrameGridDefaults::View gridView,
ICJKCharCountOptions::Location charCountLocation,
const PMRealcharCountSize 
)
pure virtual

ApplyFrameGrid is used to apply settings to currently selected frame grids.

Parameters
filteredGridDataIN The IFilteredCJKGridCmdData to apply to frame grids.
applyDataIN Structure containing flags and values for the different areas you can apply.
applyGridViewIN kTrue if you want to apply gridView.
gridViewIN The ICJKFrameGridDefaults::View to apply to the selection.
charCountLocationIN The ICJKCharCountOptions::Location to apply to the selection. Pass in ICJKCharCountOptions::kMixed to leave the item unchanged.
charCountSizeIN The new size of the character count. Pass in a number <= 0 leaves the item unchanged.
Returns
ErrorCode from resulting commands. kSuccess on success.
virtual ErrorCode ICJKGridSuite::ApplyNamedGrid (UID namedGrid)
pure virtual

ApplyNamedGrid applies the designated namedGrid to the current selection.

Parameters
namedGridIN The new named grid.
Returns
kSuccess on success or applicable ErrorCode on failure.
virtual bool16 ICJKGridSuite::CanApplyCJKGrid () const
pure virtual

CanApplyCJKGrid is used to determine if an ICJKGrid can be applied in current context.

Returns
kTrue if an ICJKGrid can be applied.
virtual void ICJKGridSuite::FreezeSelectionForModalDialog ()
pure virtual
 FreezeSelectionForModalDialog is used to freeze the selection when a modal dialog is about to be invoked.

This allows the modal dialog to operate on the same items regardless of how the changes affect the selection over time. (For example, if you have a caret and increase the columns, such that the caret moves to the next frame, the dialog will still operate on the original text frame). THIS CALL MUST BE PAIRED WITH A CALL TO ThawSelectionForModalDialog()

virtual UID ICJKGridSuite::GetActiveNamedGrid () const
pure virtual

GetActiveNamedGrid is used to determine the current named grid.

Returns
A valid UID if and only if there is exactly one named grid selected.
virtual PMReal ICJKGridSuite::GetCharacterCountSize () const
pure virtual

Returns the size of the selected character counts or defaults if no selection.

Returns
Will return a negative value in mixed mode
virtual ICJKCharCountOptions::Location ICJKGridSuite::GetCharCountLocation () const
pure virtual

Returns the location of the selected character counts or defaults if no selection.

Returns
Will return ICJKCharCountOptions::kMixed in mixed mode
virtual void ICJKGridSuite::GetFilteredGridData (IFilteredCJKGridCmdDatafilteredGridData) const
pure virtual

GetFilteredGridData is used to gather the ICJKGridData for the current selection. Mixed fields are set invalid.

Parameters
filteredGridDataOUT The resulting grid data.
virtual void ICJKGridSuite::GetFrameGridView (K2Vector< ICJKFrameGridDefaults::View > & frameGridViewVector,
bool16 sortedAndUnique = kFalse 
) const
pure virtual

GetFrameGridView is used to determine the ICJKFrameGridDefaults::View for the current frame grids.

Parameters
frameGridViewVectorOUT The vector for adding view values to.
sortedAndUniqueIN If kTrue the vectors will be sorted and duplicates will be removed.
virtual void ICJKGridSuite::GetFrameSizeInfo (PMStringoutString,
IFilteredCJKGridCmdDatafilteredGridData,
ApplyData applyData 
)
pure virtual

GetFrameSizeInfo is used to get the frame grid size info for the current selection when the if the modifications in filteredGridData and applyData are made.

Parameters
outStringOUT The resulting size info is saved here.
filteredGridDataIN The IFilteredCJKGridCmdData to apply to frame grids.
applyDataIN Structure containing flags and values for the different areas you can apply.
virtual void ICJKGridSuite::GetLinesAndCharsPerLine (K2Vector< int32 > & numberOfLinesVector,
K2Vector< int32 > & charsPerLineVector,
bool16 sortedAndUnique = kFalse 
) const
pure virtual

GetLinesAndCharsPerLine is used to get ICJKGrid line and character counts for current selection.

Parameters
numberOfLinesVectorOUT The vector to add the number of lines for each selected item.
charsPerLineVectorINOUT The vector to add the chars per line for each selected item.
sortedAndUniqueIN If kTrue the vectors will be sorted and duplicates will be removed.
virtual bool16 ICJKGridSuite::IsFrameGridDefaults () const
pure virtual

IsFrameGridDefaults is used to determine if we are operating in defaults mode.

Returns
kTrue if this is defaults mode.
virtual ErrorCode ICJKGridSuite::SetCharacterCountOptions (ICJKCharCountOptions::Location location,
const PMRealsize 
)
pure virtual

Sets the character count location and size for the current selection.

Parameters
locationIN The new location of the character counts. Pass kMixed to leave items unchanged (as in mixed mode).
sizeIN The new size of the character count for the current selection. Pass a negative value to leave it unchanged.
virtual ErrorCode ICJKGridSuite::SetFrameGridView (ICJKFrameGridDefaults::View view)
pure virtual

SetFrameGridView sets the frame grid view for the selected frame grids.

Parameters
frameGridViewVectorIN The new ICJKFrameGridDefaults::View.
virtual bool16 ICJKGridSuite::ShouldEnableFrameGrid () const
pure virtual

ShouldEnableFrameGrid is used to determine if frame grid settings can be modified in the current context

Returns
kTrue if applicable
virtual bool16 ICJKGridSuite::ShouldEnablePasteWithoutCJKGrid () const
pure virtual

ShouldEnablePasteWithoutCJKGrid is used to determine if it is applicable to paste without a CJKGrid applied to the text.

Returns
kTrue if the context is correct for pasting without a CJKGrid
virtual void ICJKGridSuite::ThawSelectionForModalDialog ()
pure virtual
 ThawSelectionForModalDialog is used to thaw the selection when a modal dialog has been closed.

see FreezeSelectionForModalDialog for mor details. THIS CALL MUST BE PAIRED WITH A CALL TO FreezeSelectionForModalDialog()