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

#include <INoteDataUtils.h>

Inheritance diagram for INoteDataUtils:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_INOTEDATAUTILS }
 
enum  Note_Type { kBookEnd, kNoteContent, kHitTestStoryText, kHitDeletedText }
 

Public Member Functions

virtual int32 GetPageNumberOfTextIndex (TextIndex anchorPos, ITextModel *textModel, PMString *pageString=nil)=0
 
virtual void GetNoteNumber (UIDRef storyRef, UID noteDataUID, int32 &currentNoteNumber) const =0
 
virtual int32 GetStoryNoteCount (UIDRef storyRef, int32 &totalStoryNoteCount) const =0
 
virtual int32 CountWords (ITextModel *textModel, TextIndex begin, TextIndex end, int32 *charCount=nil)=0
 
virtual bool16 IsWordBreak (const UTF32TextChar &currChar)=0
 
virtual bool16 IsPunctuation (const UTF32TextChar &currChar)=0
 
virtual UIDRef NewNote (TextIndex createAt, UIDRef storyRef, UIDRef docRef)=0
 
virtual int32 GetNoteColorIndex (UIDRef docRef, const WideString &userName) const =0
 
virtual int32 GetNoteColorIndex (IDataBase *docDataBase, const WideString &userName) const =0
 
virtual int32 GetNoteBGColorIndex (UIDRef docRef, const WideString &userName) const =0
 
virtual int32 GetNoteBGColorIndex (IDataBase *docDataBase, const WideString &userName) const =0
 
virtual bool16 DetectInlineNoteData (IControlView *writingView, const SysPoint globalPoint, bool16 *bIsCollapsed, int16 *typeFound, int32 *originalStoryIndex, int32 *activeStoryIndex, int32 *pLineIndex=0, int32 *pOffsetIntoLine=0) const =0
 
virtual bool16 IsNoteOwnedItem (ClassID id)=0
 
virtual void SetupOwnedItemInfo (UIDRef textModelRef, TextIndex textIndex, ClassID ownedItemClass, UID ownedItemUID)=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

Notes related utility interface.

Member Enumeration Documentation

The type of Note found

Member Function Documentation

virtual int32 INoteDataUtils::CountWords (ITextModeltextModel,
TextIndex begin,
TextIndex end,
int32 * charCount = nil 
)
pure virtual

Count the words in a note

Parameters
textModelreference to the text model the note is contained by
begintext index of start of note
endtext index of end of note
charCountoptional may get the number of characters if you pass a pointer to charCount (it's a filtered char count)
Returns
the number of word in the range specified for the note
virtual bool16 INoteDataUtils::DetectInlineNoteData (IControlViewwritingView,
const SysPoint globalPoint,
bool16 * bIsCollapsed,
int16 * typeFound,
int32 * originalStoryIndex,
int32 * activeStoryIndex,
int32 * pLineIndex = 0,
int32 * pOffsetIntoLine = 0 
) const
pure virtual

Can be used by any UI element to detect if inline note exists over the SysPoint globalPoint with the given writing view. This method returns the note collapsed state in bIsCollapsed, the Note_Type in typeFound, the line index where the note data is in pLineIndex, and finally, the character offset in that line in pOffsetIntoLine.

Parameters
writingViewGalley control view
globalPoint
bIsCollapsed
typeFound
originalStoryIndex
activeStoryIndex
pLineIndex
pOffsetIntoLine
Returns
bool16
virtual int32 INoteDataUtils::GetNoteBGColorIndex (UIDRef docRef,
const WideStringuserName 
) const
pure virtual

Return the inline note background color index with the given user name;

Parameters
docRef
userName
Returns
int32
virtual int32 INoteDataUtils::GetNoteBGColorIndex (IDataBasedocDataBase,
const WideStringuserName 
) const
pure virtual

Return the inline note background color index with the given user name; It uses IInCopyDocUserList to do the conversion.

Parameters
docDataBase
userName
Returns
int32
virtual int32 INoteDataUtils::GetNoteColorIndex (UIDRef docRef,
const WideStringuserName 
) const
pure virtual

Given the Note's author, find out the color index from user color list It uses IInCopyDocUserList to do the conversion.

Parameters
docRef
userName
Returns
int32
virtual int32 INoteDataUtils::GetNoteColorIndex (IDataBasedocDataBase,
const WideStringuserName 
) const
pure virtual

Return the note color index with the given user name; It uses IInCopyDocUserList to do the conversion.

Parameters
docDataBase
userName
Returns
int32
virtual void INoteDataUtils::GetNoteNumber (UIDRef storyRef,
UID noteDataUID,
int32 & currentNoteNumber 
) const
pure virtual

With a given Note (param noteDataUID), get the nth number Notes in the param storyRef

Parameters
storyRef
noteDataUID
currentNoteNumberReturn nth number Notes
virtual int32 INoteDataUtils::GetPageNumberOfTextIndex (TextIndex anchorPos,
ITextModeltextModel,
PMStringpageString = nil 
)
pure virtual

Get page number and page string based on the param anchorPos

Parameters
anchorPosThe main storythread text index where the Note is at
textModelThe story
pageStringreturn the page number string with a given text index in the story.
Returns
int32 The physical page number with a given text index in the story.
virtual int32 INoteDataUtils::GetStoryNoteCount (UIDRef storyRef,
int32 & totalStoryNoteCount 
) const
pure virtual

Get the total Notes count in param storyRef

Parameters
storyRef
totalStoryNoteCount
Returns
int32
virtual bool16 INoteDataUtils::IsNoteOwnedItem (ClassID id)
pure virtual

Check if this is a Note by given the object's ClassID

Parameters
id
Returns
bool16
virtual bool16 INoteDataUtils::IsPunctuation (const UTF32TextCharcurrChar)
pure virtual

Returns kTrue if the character we're looking at is a punctuation that can be in the middle of a word Used by CountWords.

Parameters
currChar
Returns
virtual bool16 INoteDataUtils::IsWordBreak (const UTF32TextCharcurrChar)
pure virtual

Returns kTrue if the character we're looking at is a word break character. Used by CountWords.

Parameters
currChar
Returns
bool16
virtual UIDRef INoteDataUtils::NewNote (TextIndex createAt,
UIDRef storyRef,
UIDRef docRef 
)
pure virtual

Create a new note at createAt location in a given story and document. No note will be created if createAt is outside the main story thread.

Parameters
createAtThe text index the Note to be added to
storyRef
docRef
Returns
UIDRef Return the newly added Note UIDRef
virtual void INoteDataUtils::SetupOwnedItemInfo (UIDRef textModelRef,
TextIndex textIndex,
ClassID ownedItemClass,
UID ownedItemUID 
)
pure virtual

Setup Note owned item information

Parameters
textModelRef
textIndex
ownedItemClass
ownedItemUID