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

#include <INoteSuiteUtils.h>

Inheritance diagram for INoteSuiteUtils:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_INOTESUITEUTILS }
 

Public Member Functions

virtual void NavigateNote (ISelectionManager *selMgr, IControlView *docView, TextIndex fromThisTextIndex, UIDRef storyRef, INoteSuite::NavigateType type)=0
 
virtual bool16 IsLayerEditable (IControlView *layoutView)=0
 
virtual bool16 IsNoteHidden ()=0
 
virtual bool16 CheckNotesState (UIDRef storyRef, bool16 collapsed)=0
 
virtual bool16 CanRemoveAllNotes (IDocument *document, UIDRef &storyRef, IControlView *galleyView=nil)=0
 
virtual bool16 UnlockLayers (UIDList &layerList)=0
 
virtual bool16 CheckStoryCollapsed (IControlView *view, ITextModel *textModel=nil)=0
 
virtual bool16 CheckExpandedNoteAnchor (IControlView *view, IDocument *doc)=0
 
virtual IControlViewGetDocControlView ()=0
 
virtual bool16 CheckRemoveXML (UIDRef &storyRef, TextIndex start, TextIndex end)=0
 
virtual bool16 RemoveAllNotesOnCollapsedStory (IControlView *galleyView, IDocument *doc)=0
 
virtual bool16 CheckRemoveRuby (UIDRef &storyRef, TextIndex start, TextIndex end=kInvalidTextIndex)=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

This utility interface for INoteSuit

Member Function Documentation

virtual bool16 INoteSuiteUtils::CanRemoveAllNotes (IDocumentdocument,
UIDRefstoryRef,
IControlViewgalleyView = nil 
)
pure virtual

Check if there are other Notes in any editable story excepted param storyRef

Parameters
documentThe document
storyRefThe story
galleyViewThe galley control view, default to nil,(this param was not used, can always be nil)
Returns
bool16 kTrue means there are other Notes in other editable story can be removed
virtual bool16 INoteSuiteUtils::CheckExpandedNoteAnchor (IControlViewview,
IDocumentdoc 
)
pure virtual

Check if at least one story has notes and is expanded

Parameters
viewThe galley control view
docThe document
Returns
bool16 kTrue at least one story has notes and is expanded
virtual bool16 INoteSuiteUtils::CheckNotesState (UIDRef storyRef,
bool16 collapsed 
)
pure virtual

Check if there is at least one Note with the desired state

Parameters
storyRefThe story
collapsedkTrue means to check the collapsed state kFalse means to check the expanded state
Returns
bool16 kTrue if at least one note is collapsed when param collapsed is kTrue, kTrue if at least one note is expand when param collapsed is kFalse
virtual bool16 INoteSuiteUtils::CheckRemoveRuby (UIDRefstoryRef,
TextIndex start,
TextIndex end = kInvalidTextIndex 
)
pure virtual

Utility used for "Convert To Note" and "Create Note" action, check if there is Ruby in the range (start, end), then display message to ask if it is ok to remove the Ruby

Parameters
storyRefThe story
startThe start text index
endThe end text idnex
Returns
bool16 return kTrue if there is no Ruby Attributes within the start and end, return kTrue if there is Ruby Attributes, and user click yes to remove the Ruby Attributes return kFalse if there is Ruby Attributes, and user click cancel to remove Ruby Attributes
virtual bool16 INoteSuiteUtils::CheckRemoveXML (UIDRefstoryRef,
TextIndex start,
TextIndex end 
)
pure virtual

Utility used for "Convert To Note" action, check if there is XML structure in the range(start,end), then display message to ask if it is ok to remove the XML

Parameters
storyRefThe current story
startThe start text index
endThe end text idnex
Returns
bool16 kTrue means there is no xml tag within the start and end, kTrue means there is xml tag, and user click yes to remove the xml tag kFalse means there is xml tag, and user click cancel to remove xml tag
virtual bool16 INoteSuiteUtils::CheckStoryCollapsed (IControlViewview,
ITextModeltextModel = nil 
)
pure virtual

Check if story(param textModel) is collapsed

Parameters
viewGalley control view
textModelThe story's ITextModel interface pointer
Returns
bool16 kTrue means the story (textModel is valid) is collapsed in galley view; kTrue means all stories (textModel = nil) are collapsed in galley view;
virtual IControlView* INoteSuiteUtils::GetDocControlView ()
pure virtual

Get the active document's current control view (galley control view or layout control view)

Parameters
none
Returns
IControlView The current control view of the active document
virtual bool16 INoteSuiteUtils::IsLayerEditable (IControlViewlayoutView)
pure virtual

Check if layer is editable

Parameters
layoutViewThe layout control view
Returns
bool16 kTrue means layer is editable
virtual bool16 INoteSuiteUtils::IsNoteHidden ()
pure virtual

Check if Notes are hidden

Parameters
none
Returns
bool16 kTrue means the Notes are in hidden state
virtual void INoteSuiteUtils::NavigateNote (ISelectionManagerselMgr,
IControlViewdocView,
TextIndex fromThisTextIndex,
UIDRef storyRef,
INoteSuite::NavigateType type 
)
pure virtual

Navigate to next Note (when type = kNextNote) or previous Note (when type = kPreviousNote) from fromThisTextIndex, display Note content into Note palette

Parameters
selMgrCurrect active selection manager
docViewCurrent document view
fromThisTextIndexCurrent text index
storyRefCurrent story ref
typeINoteSuite::kNextNote or INoteSuite::kPreviousNote
virtual bool16 INoteSuiteUtils::RemoveAllNotesOnCollapsedStory (IControlViewgalleyView,
IDocumentdoc 
)
pure virtual

Warming message when remove all Notes and there is Note in collapsed story (in galley view)

Parameters
galleyViewGalley control view
docThe document
Returns
bool16 kTrue user click "YES" or no notes in collapsed story, kFalse user click "No"
virtual bool16 INoteSuiteUtils::UnlockLayers (UIDListlayerList)
pure virtual

Process UnlockLayerCmd and ShowLayerCmd based on layerList

Parameters
layerListThe layer list
Returns
bool16 kTrue means the action is successed