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

Public Types

typedef KeyValuePair< UID,
PMString
ArticleInfo
 
typedef K2Vector< ArticleInfoArticleList
 

Public Member Functions

 SnpManipulateArticles ()
 
virtual ~SnpManipulateArticles ()
 
ErrorCode ListArticles (IDocument *doc)
 
ErrorCode ListArticlesForPageItems (IDocument *doc, ILayoutTarget *layoutTarget)
 
ErrorCode AddToExistingArticle (IDocument *doc, ILayoutTarget *layoutTarget)
 
ErrorCode AddToNewArticle (IDocument *doc, ILayoutTarget *layoutTarget, const PMString &articleName)
 
ErrorCode RemoveFromArticle (IDocument *doc, ILayoutTarget *layoutTarget)
 

Detailed Description

  • How to retrieve articles for a document,
  • How to retrieve articles to which a page item belongs,
  • How to add page items to existing articles,
  • How to create new articles and add page items to them,
  • How to remove page items from articles.

Member Typedef Documentation

Article UID and name mapping.

Constructor & Destructor Documentation

SnpManipulateArticles::SnpManipulateArticles ()
inline

Constructor.

virtual SnpManipulateArticles::~SnpManipulateArticles ()
inlinevirtual

Destructor.

Member Function Documentation

ErrorCode SnpManipulateArticles::AddToExistingArticle (IDocumentdoc,
ILayoutTargetlayoutTarget 
)

Adds selected page items to an existing article.

Parameters
docThe document to which page items belong.
layoutTargetILayoutTarget for retrieving selected page items.
Returns
kSuccess on success, other ErrorCode otherwise.
ErrorCode SnpManipulateArticles::AddToNewArticle (IDocumentdoc,
ILayoutTargetlayoutTarget,
const PMStringarticleName 
)

Creates a new article and add selected page items to it.

Parameters
docThe document to which page items belong.
layoutTargetILayoutTarget for retrieving selected page items.
articleNameName for the new article.
Returns
kSuccess on success, other ErrorCode otherwise.
ErrorCode SnpManipulateArticles::ListArticles (IDocumentdoc)

Lists articles for a document.

Parameters
docThe document.
Returns
kSuccess on success, other ErrorCode otherwise.
ErrorCode SnpManipulateArticles::ListArticlesForPageItems (IDocumentdoc,
ILayoutTargetlayoutTarget 
)

Lists articles for specified page items.

Parameters
docThe document to which page items belong.
layoutTargetILayoutTarget for retrieving selected page items.
Returns
kSuccess on success, other ErrorCode otherwise.
ErrorCode SnpManipulateArticles::RemoveFromArticle (IDocumentdoc,
ILayoutTargetlayoutTarget 
)

Removes selected page items from an article.

Parameters
docThe document to which page items belong.
layoutTargetILayoutTarget for retrieving selected page items.
Returns
kSuccess on success, other ErrorCode otherwise.