![]() | InDesign SDK 20.5 |
#include <IDocumentPresentation.h>

Classes | |
| class | SamePresentationContent |
| class | SamePresentationKind |
Public Types | |
| enum | { kDefaultIID = IID_IDOCUMENTPRESENTATION } |
| enum | { kDefaultParentingPref = 0, kCreateNewFloatingDock = 1, kCreateNewFloatingDock_ObscureRelative = 2, kCreateNewFloatingDock_DontObscureRelative = 3, kAsSiblingOfRelative = 4, kInNewTabGroupFromRelative = 5, kInNewPaneFromRelative = 6, kAsSiblingToLeftOfRelative = 7, kAsRightmostChildOfParent = 8, kLastParentRelativePref = kAsRightmostChildOfParent, kParentingRelatedPrefMask = 255, kDontMakeVisible = 512, kDontBringToFront = 1024, kLastParentingFlag = kDontBringToFront } |
| enum | SchedulingBehavior { kProcessCommandBehavior = 0, kScheduleCommandBehavior = 1 } |
| typedef uint16 | CreationParentingPrefs |
Public Member Functions | |
| virtual IDocument * | GetDocument () const =0 |
| virtual UIDRef | GetDocumentUIDRef () const =0 |
| virtual bool16 | IsVisible () const =0 |
| virtual bool16 | IsFloating () const =0 |
| virtual void | Float ()=0 |
| virtual bool16 | IsMinimized () const =0 |
| virtual void | Minimize ()=0 |
| virtual bool16 | IsMaximized () const =0 |
| virtual void | Maximize ()=0 |
| virtual bool16 | IsActive () const =0 |
| virtual void | MakeActive ()=0 |
| virtual bool16 | IsFrontmostInTabGroup () const =0 |
| virtual void | MakeFrontmostInTabGroup ()=0 |
| virtual SysRect | GetPresentationBounds () const =0 |
| virtual SysRect | GetPresentationPlatformBounds () const =0 |
| virtual SysSize | GetPreferredSize () const =0 |
| virtual void | ChangePreferredSize (const SysSize &)=0 |
| virtual SysSize | GetPreferredConstrainedSize () const =0 |
| virtual void | ChangePreferredConstrainedSize (const SysSize &)=0 |
| virtual void | GetWidthRange (float *min, float *max) const =0 |
| virtual void | ChangeWidthRange (float min, float max)=0 |
| virtual void | GetHeightRange (float *min, float *max) const =0 |
| virtual void | ChangeHeightRange (float min, float max)=0 |
| virtual bool16 | GetDocumentModifiedState () const =0 |
| virtual void | ChangeDocumentModifiedState (bool16)=0 |
| virtual IDocumentPresentation * | CreateNewPresentation (IDocument *doc, IPMUnknown *targetBossContentToSelect, CreationParentingPrefs parentPref=kCreateNewFloatingDock_ObscureRelative) const =0 |
| virtual IDocumentPresentation * | ViewInNewPresentation (GSysRect withinBounds, CreationParentingPrefs parentPref=kDefaultParentingPref) const =0 |
| virtual ICommand * | CreateCloseCommand (bool16 allowCancel=kTrue)=0 |
| virtual ErrorCode | ClosePresentation (SchedulingBehavior when=kProcessCommandBehavior, bool16 allowCancel=kFalse)=0 |
| virtual bool16 | IsAutonomous ()=0 |
| virtual void | GetPresentationLabels (PMString &titleLabel, PMString &extendedTitleLabel, PMString &toolTipLabel) const =0 |
| virtual void | SetPresentationLabels (const PMString &titleLabel, const PMString &extendedTitleLabel, const PMString &toolTipLabel=kNullString)=0 |
| virtual K2Vector < IDocumentPresentation * > ::iterator | UpdatePresentationLabels (K2Vector< IDocumentPresentation * >::iterator begin, K2Vector< IDocumentPresentation * >::iterator end)=0 |
| virtual bool16 | Helper_InstallPresentationContent (IDocument *doc, IPMUnknown *commandData, IControlView *mimicView=nil)=0 |
| virtual SamePresentationKind * | GetPresentationKind ()=0 |
| virtual SamePresentationContent * | GetPresentationContent ()=0 |
| virtual ErrorCode | SelectScriptObjects (const ScriptID &action, ScriptList &objectList, const ScriptInfo::RequestContext &context)=0 |
| virtual IControlView * | QuerySelectableView (ISelectionManager *iSelectionManager)=0 |
| virtual bool16 | SetupTarget (IPMUnknown *selectedContent)=0 |
| virtual bool16 | EditTarget (PMString *menuString, IPMUnknown *selectedContent)=0 |
| virtual void | RegisterSelectableView (IControlView *)=0 |
| virtual void | UnregisterSelectableView (IControlView *)=0 |
| virtual void | GetSelectableViews (K2Vector< IControlView * > &views)=0 |
| virtual bool16 | IsPresentationActiveInTouchWorkspace ()=0 |
| virtual void | SetPresentationActiveInTouchWorkspace (bool16 bFlag)=0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
This interface represents a view onto a document, and exists on the document presentation boss, along with IActiveContext, to designate an InDesign document presentation. IDocumentPresentation replaces the IWindow and IDocumentWindow interfaces with methods more appropriate to the new world of OWL hosted document views.
Note: In CS4 the IWindow interface on the presentation boss must not be used to manipulate the document view.
The document presentation boss bridges the gap between InDesign document views, and the OWL Palette world.
| anonymous enum |
CreationParentingPrefs allow a caller to specify how and where a new presentation will be created, optionally in relation to an existing presentation
Fire the command used to close this presentation. If closing this presentation would result in closing the document, don't hold a reference to the document when calling this method.
| when | whether to process the close command immediately or schedule it. |
| allowCancel | if closing the presentation would result in closing the document, can the close be cancelled. |
| pure virtual |
Change the document's modified state as cached, and displayed, by the presentation.
| pure virtual |
Change allowable height range for this presentation
| pure virtual |
Change the preferred size, when constrained to fit within the application container, for this presentation.
| pure virtual |
Change allowable width range for this presentation
| pure virtual |
Create the command needed to close this presentation. If closing this presentation would result in closing the document, don't hold a reference to the document when processing the returned command.
| allowCancel | whether the command may be canceled |
| pure virtual |
Create a new document container like this one that views the specified document content.
| doc | The document to view |
| targetBossContentToSelect | The content to view and select. |
| parentPref | was: Either kOffsetFromCurrentWindow or kDirectlyOverCurrentWindow. |
| pure virtual |
if this presentation cannot select any of the content on any of the targeting interfaces of selectedContent then return kFalse. Otherwise, remove the content the presentation can select from the targeting boss selectedContent and return kTrue. Further if menuString is nil, bring this presentation to the front, restoring itself from a minimized state if necessary, and select the specified content. If menuString is non-nil, then simply fill in an appropriate menu string without selecting the content.
| menuString | The menu string used to invoke this action. |
| selectedContent | A boss containing the targets to be selected. |
| pure virtual |
If this presentation is not contained in a floating container, create a new floating document dock and reparent the presentation to it.
| pure virtual |
Get the document being viewed by this presentation.
| pure virtual |
Get the document's modified state as cached, and displayed, by the presentation.
| pure virtual |
Get the document being viewed by this presentation.
| pure virtual |
Get allowable height range for this presentation
| pure virtual |
Set the preferred size, when constrained to fit within the application container, for this presentation.
| pure virtual |
Set/Change the preferred size, when floating, for this presentation.
| pure virtual |
Get the semantic bounds of this presentation. The semantic bounds may not match the current physical bounds if a layout in pending or in progress.
| pure virtual |
| pure virtual |
| pure virtual |
Presentation titles/labels. There are three labels for every presentation. titleLabel - the essential unshortenable form of the title extendedTitleLabel - an extended form of the title, which may include magnification, and other document state information. toolTipLabel - the label used for the presentation's tab's tooltip
For example: titleLabel: "MyDocument.indd" extendedTitleLabel: "MyDocument.indd @ 100% [Converted]" toolTipLabel: "C:\Users\joe\Documents\MyDocument.indd"Get the labels for this presentation.
| titleLabel | the essential unshortenable form of the title |
| extendedTitleLabel | an extended form of the title, which may include magnification, and other document state information. |
| toolTipLabel | the label used for the presentation's tab's tooltip |
| pure virtual |
Get the current physical bounds of this presentation.
| pure virtual |
Internal use only
| pure virtual |
Get allowable width range for this presentation
| pure virtual |
Helper called during construction of a new presentation instance. Presentation subclasses should override this call to create and install their content view(s). For example the LayoutPresentation class creates the LayoutWidget boss, installs it into the presentation, and makes it ready to go. Any additional hookups at creation time can be performed by the creation command, or by the code that processes the creation command.
| doc | The document to view |
| pure virtual |
Is this the active/target presentation
| pure virtual |
Can this presentation be the only presentation on a document? In other words, can this presentation "stand alone" for the document, if no such presentations are open the document must close.
| pure virtual |
Is this presentation contained in a floating container (as opposed to being embedded inside the ApplicationContainer)
| pure virtual |
Is this presentation active amongst it's siblings (same tab group) ActiveInContext maps to "frontmost in it's tab group" - so the document is visible (if not obscured by something floating above it)
| pure virtual |
Is this presentation contained in a floating container that is maximized. (presentations embedded inside the ApplicationContainer can't be maximized)
| pure virtual |
Is this presentation contained in a floating container that is minimized (presentations embedded inside the ApplicationContainer can't be minimized)
| pure virtual |
Internal use only
| pure virtual |
Get the PaletteRef corresponding to this document presentation. This should return an object of type kDocumentPresentationType.
| pure virtual |
Make this the active/target presentation
| pure virtual |
Make this presentation frontmost amongst it's siblings
| pure virtual |
If this presentation is contained in a floating container, toggle it's maximized state. (presentations embedded inside the ApplicationContainer can't be maximized)
| pure virtual |
If this presentation is contained in a floating container, toggle it's minimized state. (presentations embedded inside the ApplicationContainer can't be minimized)
| pure virtual |
Return the control view that owns an ASB subsystem
| iSelectionManager | A reference to a ASB sub system |
| pure virtual |
Internal use only
| pure virtual |
Miscellaneous other methods (formerly found in IDocumentWindow Select the objects in the scriptList in the correct ASB of this window
| action | How to extend the selection (valid values: en_Replace, en_AddTo, en_RemoveFrom, en_Nothing, en_All) |
| scriptList | The scripting objects to select |
| context | The context for the scripting request |
| pure virtual |
Internal use only
| pure virtual |
Set the labels for this presentation.
| titleLabel | the essential unshortenable form of the title |
| extendedTitleLabel | an extended form of the title, which may include magnification, and other document state information. |
| toolTipLabel | the label used for the presentation's tab's tooltip |
| pure virtual |
populate the targeting boss selectedContent with whatever is currently selected in the presentation.
| selectedContent | A boss containing all the available targeting interfaces. |
| pure virtual |
Internal use only
| pure virtual |
Update process for presentation titles/labels:
Seems simple enough, but the subtlety is that some of the titles are numbered, based on how many presentations of each type are open on the document. So for instance: StoryA 1, StoryA 2, StoryB 1, DocA 1, GalleyA 2, DocA 3, etc.
Steps: 1) Update the labels (title, tooltip label, etc.) of any presentations from *begin to *end that this implementation can handle. 2) Move the presentations that were updated to the front of the list 3) Return an iterator to the first presentations yet to have its title updated.
| begin | the first presentation in the list needing its labels updated. |
| end | one past the last container in the list needing its labels updated. |
| pure virtual |
Create a new document container like this one that views the specified document content.
| withinBounds | Constrains the extent of the new container. // FIXME_OWL2: are these bounds still used/relevant? |