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

#include <IDocumentUIUtils.h>

Inheritance diagram for IDocumentUIUtils:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IDOCUMENTUIUTILS }
 

Public Member Functions

virtual IDocumentPresentationGetActiveDocumentPresentation ()=0
 
virtual IDocumentPresentationGetOSActivatedDocumentPresentation ()=0
 
virtual IDocumentPresentationFindPresentationForDocument (IDataBase *db, const FindPresentation_Criteria &acceptCriteria, const FindPresentation_PreferCriteria &preferCriteria)=0
 
virtual uint32 FindPresentationsForDocument (IDataBase *db, PresentationSequence &, const FindPresentation_Criteria &acceptCriteria, const FindPresentation_PreferCriteria &preferCriteria)=0
 
virtual IDocumentPresentationGetFrontmostPresentationForDocument (IDataBase *db)=0
 
virtual uint32 FindRelatedPresentations (IDataBase *db, IDocumentPresentation *me, PresentationSequence &myRelatives, const FindRelatedPresentation_Criteria &acceptCriteria, const FindRelatedPresentation_PreferCriteria &preferCriteria, bool16 includeMe=kTrue)=0
 
virtual void CascadeFloatingDocumentWindows (bool16 currentDocOnly)=0
 
virtual void TileDocumentWindows ()=0
 
virtual void CycleNextPresentationToFront ()=0
 
virtual void CycleNextPresentationWindowToFront ()=0
 
virtual void CycleLastPresentationToFront ()=0
 
virtual void CycleLastPresentationWindowToFront ()=0
 
virtual void AdjustDocumentPresentationsBounds (ClassID theTriggeringChange=kInvalidClass)=0
 
virtual void AdjustDocumentPresentationBounds (IDocumentPresentation *presentation, ClassID theTriggeringChange=kInvalidClass)=0
 
virtual bool16 CloseActivePresentation (bool16 allowCancel=kTrue)=0
 
virtual bool16 CloseActiveDocument (bool16 allowCancel=kTrue, UIFlags uiFlags=kFullUI)=0
 
virtual bool16 CloseDocumentPresentation (IDocumentPresentation *presentation, bool16 allowCancel=kTrue)=0
 
virtual bool16 RevertActiveDocument (bool16 allowCancel=kTrue)=0
 
virtual void UpdatePresentationLabels (IDocument *doc)=0
 
virtual void UpdateDocumentIsModifiedIndicators (IDocument *doc=NULL)=0
 
virtual void SuspendActivePresentationConsistencyCheck (bool16 suspend=kTrue)=0
 
virtual ErrorCode DispatchPresentationSignalToAllResponders (IDocument *document, IDocumentPresentation *presentation, ServiceID serviceID) const =0
 
virtual IDocumentPresentationGetLayoutPresentationNextToActive ()=0
 
virtual IDocumentPresentationGetLayoutPresentationForStoryEditorPresentation (IDocumentPresentation *inStoryPresentation)=0
 
virtual void ShowHideDocumentWindows (bool16 show)=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

Interface containing various utility methods for document presentations.

Member Function Documentation

virtual void IDocumentUIUtils::AdjustDocumentPresentationBounds (IDocumentPresentationpresentation,
ClassID theTriggeringChange = kInvalidClass 
)
pure virtual

Reposition/resize a document window so it is accessible to the user Optionally you can pass in the type of change that triggered this request, which indicates the extent to which the document window will be modified. Supported changes are (in decreasing order of severity): kDisplayChangeMsg, kAppFrameRestoreMsg, kAppFrameResizeMsg, kPaletteWorkspaceLoadedMsg, kDockedPaletteAreaChangedMsg, kDockedPaletteAreaChangedByUserMsg, kApplicationResumeMsg

virtual void IDocumentUIUtils::AdjustDocumentPresentationsBounds (ClassID theTriggeringChange = kInvalidClass)
pure virtual

Reposition/resize open document windows so they are accessible to the user. Optionally you can pass in the type of change that triggered this request.

See Also
AdjustDocumentWindowBounds
virtual void IDocumentUIUtils::CascadeFloatingDocumentWindows (bool16 currentDocOnly)
pure virtual

Cascade currently open document windows

Parameters
currentDocOnlyIf true, only do windows of current document, else do all document windows.
virtual bool16 IDocumentUIUtils::CloseActiveDocument (bool16 allowCancel = kTrue,
UIFlags uiFlags = kFullUI 
)
pure virtual

Close active document

Parameters
allowCancelAllow user to cancel close.
uiFlagsA flag indicating whether or not ui is permitted
Returns
If front document closed without error.
virtual bool16 IDocumentUIUtils::CloseActivePresentation (bool16 allowCancel = kTrue)
pure virtual

Close active document presentation. If the document is only open in this one presentation, also close the document.

Parameters
allowCancelAllow user to cancel close.
Returns
If front window closed without error.
virtual bool16 IDocumentUIUtils::CloseDocumentPresentation (IDocumentPresentationpresentation,
bool16 allowCancel = kTrue 
)
pure virtual

Close specified document presentation

Parameters
allowCancelAllow user to cancel close.
Returns
If document closed without error.
virtual void IDocumentUIUtils::CycleLastPresentationToFront ()
pure virtual

Reorders document windows by bringing the currently backmost document window to the front.

virtual void IDocumentUIUtils::CycleNextPresentationToFront ()
pure virtual

Sends the current frontmost document window to the back, thus revealing a new frontmost document window

virtual ErrorCode IDocumentUIUtils::DispatchPresentationSignalToAllResponders (IDocumentdocument,
IDocumentPresentationpresentation,
ServiceID serviceID 
) const
pure virtual

Dispatch a presentation-related service signal to all registered responders.

Parameters
document- is the document containing the presentation
presentation- is the presentation
serviceID- is the signal
Returns
is kSuccess or an error
virtual IDocumentPresentation* IDocumentUIUtils::FindPresentationForDocument (IDataBasedb,
const FindPresentation_Criteria & acceptCriteria,
const FindPresentation_PreferCriteria & preferCriteria 
)
pure virtual

Find a particular presentation for the specified document.

Parameters
dbrestricts the presentations to a partucular open document. Cannot be NIL.
acceptCriteriaa comparison or unary criteria applied to all candidates, candidate will be considered if the criteria evaluates to true.
preferCriteriaset of comparison or unary criteria applied to all candidates. successful candidates will be ordered if all criteria evaluates to true.
virtual uint32 IDocumentUIUtils::FindPresentationsForDocument (IDataBasedb,
PresentationSequence,
const FindPresentation_Criteria & acceptCriteria,
const FindPresentation_PreferCriteria & preferCriteria 
)
pure virtual

Find a set of presentation for a specified document, or all documents, that match an acceptance criteria, and which are ordered by a set of preference criteria.

Parameters
dbrestricts the presentations to a partucular open document. Can be NIL to consider presentations on all open documents.
acceptCriteriaa comparison or unary criteria applied to all candidates, candidate will be considered if the criteria evaluates to true.
preferCriteriaset of comparison or unary criteria applied to all candidates. successful candidates will be ordered if all criteria evaluates to true.
virtual uint32 IDocumentUIUtils::FindRelatedPresentations (IDataBasedb,
IDocumentPresentationme,
PresentationSequencemyRelatives,
const FindRelatedPresentation_Criteria & acceptCriteria,
const FindRelatedPresentation_PreferCriteria & preferCriteria,
bool16 includeMe = kTrue 
)
pure virtual

Given a particular presentation, find the set of document presentations that satisfy a set of requirements and are ordered by a set of preferences. By default, if the supplied presentation passes the requirements, it will appear in the list.

Parameters
dbrestricts the presentations to a partucular open document. Can be NIL. Could also be expressed as a requirement (is_samedocument or isnot_samedocument)
methe presentation all other candidates are compared to.
myRelativesprovided to hold the resulting ordered set of successful candidates on return.
acceptCriteriaa comparison or unary criteria applied to all candidates, candidate will be included if the criteria evaluates to true.
preferCriteriaset of comparison or unary criteria applied to all candidates. successful candidates will be ordered if all criteria evaluates to true.
Returns
includeMe include provided presentation as a potential candidate (default is to include it)
count of presentations satisfying the requirement
virtual IDocumentPresentation* IDocumentUIUtils::GetActiveDocumentPresentation ()
pure virtual

Get the active Document Presentation. Note: there is only one active document presentation in InDesign - based on GetExecutionContextSession()->GetActiveContext(). But there are times when the active context's view is pointing at a panel, so ONLY in that case do we rely on the OS activation.

Returns
active presentation or nil if none are open
virtual IDocumentPresentation* IDocumentUIUtils::GetFrontmostPresentationForDocument (IDataBasedb)
pure virtual

Find the "frontmost" presentation for the specified document. If the Active presentation is viewing the specified document, then it will be returned, otherwise if any of the documents presentations are visible (i.e. frontmost in their tabgroup) one of them will be returned (no attempt is made to return the frontmost one if several visible but non-active presentations are available)

virtual IDocumentPresentation* IDocumentUIUtils::GetLayoutPresentationForStoryEditorPresentation (IDocumentPresentationinStoryPresentation)
pure virtual

INTERNAL USE ONLY - Obtain the next presentation containing the layout for this sroty presentation

virtual IDocumentPresentation* IDocumentUIUtils::GetLayoutPresentationNextToActive ()
pure virtual
INTERNAL USE ONLY - Obtain the next presentation containing the layout, 

this should ignore the other presentations such as StoryPresentation etc.

virtual IDocumentPresentation* IDocumentUIUtils::GetOSActivatedDocumentPresentation ()
pure virtual

Get the OS activated Document Presentation. Note: this is based on OS activation and event targeting. So why do we have both methods? In "steady state" both methods will return the same value, but at certain times during an activation transition they may temporarily disagree. We believe there are only a few rare instances where low level code may need to distinguish between the two. Clients should not call this method without thinking hard about why they cannot use GetDocumentPresentationFromActiveContext instead (One situation where it will matter is keyboard focus handling)

Returns
active presentation or nil if none are open
virtual bool16 IDocumentUIUtils::RevertActiveDocument (bool16 allowCancel = kTrue)
pure virtual

Discard all changes and reopen the originally saved docunent

Parameters
allowCancelAllow user to cancel revert.
Returns
if rever without error
virtual void IDocumentUIUtils::ShowHideDocumentWindows (bool16 show)
pure virtual

Show Hide Document windows

virtual void IDocumentUIUtils::SuspendActivePresentationConsistencyCheck (bool16 suspend = kTrue)
pure virtual

INTERNAL USE ONLY - suspends consistency check between our view of the active document presentation and what OWL thinks is active

Parameters
suspend- true to suspend check.
virtual void IDocumentUIUtils::TileDocumentWindows ()
pure virtual

Tile currently open document windows

virtual void IDocumentUIUtils::UpdateDocumentIsModifiedIndicators (IDocumentdoc = NULL)
pure virtual

UpdateDocumentIsModifiedIndicators

Parameters
docThe document to update the is modified indicators for, or NULL for all documents.
virtual void IDocumentUIUtils::UpdatePresentationLabels (IDocumentdoc)
pure virtual

Update titles used for all presentations of a document

Parameters
docThe document to update titles for.