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

#include <ILayoutUIUtils.h>

Inheritance diagram for ILayoutUIUtils:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_ILAYOUTUIUTILS }
 
enum  IncludeOptions {
  includeVisibleOnly = 0, includeHiddenOnly, includeBoth, includeVisibleURLsOnly,
  includeVisibleEmailsOnly, includeVisibleFilesOnly
}
 
enum  SpreadVisibility { kSpreadIsNotVisible, kSpreadIsPartiallyVisible, kSpreadIsCompletelyVisble }
 
enum  DestinationSelectionType {
  kMixed, kURL, kFile, kEmail,
  kBookmark, kPage, kShared, kParagraph,
  kUnknownDestinationType
}
 

Public Member Functions

virtual IControlViewQueryFrontView ()=0
 
virtual IDocumentGetFrontDocument ()=0
 
virtual IDocumentPresentationCreateNewLayoutPresentation (IDataBase *whichDoc, IDocumentPresentation::CreationParentingPrefs parentPref=IDocumentPresentation::kDefaultParentingPref, const IDocumentPresentation *relative=NULL)=0
 
virtual ICommandCreateNewLayoutPresentationCmd (IDataBase *whichDoc=0)=0
 
virtual bool IsLayoutPresentation (IDocumentPresentation *inPresentation)=0
 
virtual ILayoutControlDataQueryLayoutData (IPMUnknown *inPresentation)=0
 
virtual ILayoutControlDataQueryFrontLayoutData ()=0
 
virtual bool16 IsApplicationInNoPubWindowState ()=0
 
virtual bool16 GetUIDocumentWindowCount ()=0
 
virtual void GetSelectedPages (UIDList &pageUIDList, bool16 bIncludeMasters=kTrue, bool16 bCurrentPageOnly=kFalse, bool16 bPagesOnly=kTrue)=0
 
virtual UID GetPageUIDFromWidget (IControlView *view, IDocument *iDocument)=0
 
virtual void SetPageUIDForWidget (IControlView *view, const UIDRef &pageRef)=0
 
virtual IWorkspaceQueryActiveWorkspace ()=0
 
virtual UID GetVisiblePageUID (IControlView *layoutView, IGeometry *spreadGeometry=nil)=0
 
virtual UID GetVisibleSpreadUID (IControlView *layoutView, ISpreadList *spreadList)=0
 
virtual UID GetVisibleMasterSpreadUID (IControlView *layoutView, IMasterSpreadList *masterList)=0
 
virtual void EnableUpdateAllDocumentViews ()=0
 
virtual void DisableUpdateAllDocumentViews ()=0
 
virtual void InvalidateViews (IDocument *iDoc)=0
 
virtual void SetPathSelectionMode (bool16 isPathSelected)=0
 
virtual bool16 GetPathSelectionMode ()=0
 
virtual ICommandMakeScrollToSpreadCmd (IControlView *controlView, IGeometry *spreadGeometry=nil, bool16 bMakeVisibleSpreadActive=kTrue)=0
 
virtual PMReal GetNextZoomFactor (IControlView *controlView, bool32 zoomIn, bool32 adjustForMonitorPPI=kTrue)=0
 
virtual PMReal GetNextZoomValue (PMReal currentZoom, bool32 zoomIn)=0
 
virtual ICommandMakeZoomInCmd (IControlView *controlView, bool16 bJustZoomToPoint=kTrue)=0
 
virtual ICommandMakeZoomOutCmd (IControlView *controlView, bool16 bJustZoomToPoint=kTrue)=0
 
virtual ICommandMakeZoomCmd (IControlView *controlView, PMReal zoomPct, ILayoutControlData::FitSetting fit=ILayoutControlData::kFitNone, bool16 bJustZoomToPoint=kTrue, PMPoint pt=kZeroPoint, bool16 bMakeVisibleSpreadActive=kTrue)=0
 
virtual ISnapToQueryAndPrepareSnapToForSpread (IControlView *controlView, ISpread *spread, const UIDList *itemList, const UIDRef &originalSpread, PBPMPoint originalPoint)=0
 
virtual IPMUnknownQueryWidgetParentFor (IPMUnknown *pUnknown, const PMIID &rIID)=0
 
virtual SnapType ConstrainPointForSnapping (PMPoint &toHere, const PMPoint &originalPoint, bool16 shiftDown, const PMReal &zoomPct)=0
 
virtual bool16 AreSelectedPageItemsVisible (IControlView *controlView)=0
 
virtual bool16 IsCurrentSpreadVisible (IControlView *controlView)=0
 
virtual IRulerDataQueryHorzRulerData (IPMUnknown *layoutView)=0
 
virtual IRulerDataQueryVertRulerData (IPMUnknown *layoutView)=0
 
virtual PMPoint ComputeRulerAdjustedPoint (const PMPoint &pbPtIn, IRulerData *iHorzRuler, IRulerData *iVertRuler, const PMMatrix &pbtoview)=0
 
virtual PMRect ComputeRulerAdjustedRect (const PMRect &pbRectIn, IRulerData *iHorzRuler, IRulerData *iVertRuler, const PMMatrix &pbtoview)=0
 
virtual PMPoint ComputePasteboardPoint (const GSysPoint &inGlobalPoint, IControlView *layoutView)=0
 
virtual PBPMPoint GlobalToPasteboard (IControlView *controlView, const GSysPoint &thePoint)=0
 
virtual PMRect GetViewedSpreadsBounds (IControlView *layoutView)=0
 
virtual UIDList GetVisibleSpreads (IControlView *layoutView)=0
 
virtual UIDList GetVisibleSpreads (IControlView *layoutView, const PMRect &viewBounds)=0
 
virtual SpreadVisibility IsSpreadVisible (ILayoutControlData *layout, ISpread *spread)=0
 
virtual UID GetVisibleMCFrames (IControlView *layoutControlView, IFrameList *frameList, UIDList &visibleMCTextFrames)=0
 
virtual void MakeVisibleSpreadActive (IControlView *controlView)=0
 
virtual void DrawFloor (IGraphicsContext *gc, IDocument *theDocument, const PMRect &viewBounds, const UIDList &visibleSpreads)=0
 
virtual bool16 CanDisplayTransformDialog ()=0
 
virtual bool16 CanDisplayMoveDialog ()=0
 
virtual void CloseDialogWindow ()=0
 
virtual void FillListWithHyperlinkDestinations (IStringListControlData *stringList, IDataBase *db, UIDList *uids, K2Vector< ClassID > *bossList, IncludeOptions includeOptions=includeVisibleOnly, bool16 bSorted=kFalse)=0
 
virtual PMReal GetNewScaleFactor (const PMRect &rect, IControlView *controlView)=0
 
virtual bool16 IsPreviewOn (IPMUnknown *layoutView)=0
 
virtual void AddNewPage ()=0
 
virtual PMPoint GetMousePasteboardPosition (const SysPoint &globalLocation, IControlView *iCurrentView)=0
 
virtual IUIDListDataQueryHitTestResultsByUIDList (IPMUnknown *owner, const PBPMPoint *pWherePt, const PMRect *pWhereRect, const ClassID handlerClass, UIDList *pTheSpreads, int16 tolerance=kHitTestTolerance, bool16 bVisibleSpreads=kFalse, bool16 bUsePt=kTrue, bool16 bUseXform=kTrue, bool16 bFinishChildren=kFalse)=0
 
virtual IPMUnknownQueryInterfaceUsingHitTest (IPMUnknown *owner, const PBPMPoint *pWherePt, const PMRect *pWhereRect, const ClassID handlerClass, const PMIID &interfaceID, int16 tolerance=kHitTestTolerance, bool16 bVisibleSpreads=kFalse, bool16 bUsePt=kTrue)=0
 
virtual ClassID GetHitTestFlagsToHandlerBoss (const int32 selectionMode)=0
 
virtual bool16 IsPresentationMode (IDocumentPresentation *documentPresentation=nil)=0
 
virtual void HandleAction (ActionID actionID)=0
 
virtual UIDRef GetHitLockedItemAdornment (IControlView *layoutView, PMPoint mouse, bool16 onlySelectedItems=kFalse)=0
 
virtual UIDRef GetHitLinkedItemAdornment (IControlView *layoutView, PMPoint mouse)=0
 
virtual UIDRef GetHitMissingFontFormItemAdornment (IControlView *layoutView, PMPoint mouse)=0
 
virtual void TogglePresentationMode (IDocumentPresentation &documentPresentation)=0
 
virtual void SetPresentationBackgroundColor (int32 stockColor, IDocumentPresentation &documentPresentation)=0
 
virtual void HandlePresentationHideCursor ()=0
 
virtual void StartCursorHideTimer ()=0
 
virtual void StopCursorHideTimer ()=0
 
virtual void InvalidateAllDocumentViews ()=0
 
virtual DestinationSelectionType GetDestinationSelectionTypeWithDest (IHyperlinkDestination *dest, bool16 isExternal)=0
 
virtual const UID GetCurrentVisiblePage ()=0
 
virtual void InvalidateShapeGraphixCache (IDocument *iDoc)=0
 
virtual void InvalidateShapeGraphixCache (IShape *iShape)=0
 
virtual void AddNewPageAfterSpecifiedPage (const UID pageUID)=0
 
virtual bool16 IsAcceleratedDrawing (IPMUnknown *layoutView) const =0
 
virtual RealAGMColor GetPasteboardBorderColor (IControlView *view) const =0
 
virtual RealAGMColor GetDocumentBorderColor (IControlView *view) const =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

UI Layout-related utilities

Member Enumeration Documentation

Options for the method FillListWithHyperlinkDestinations includeOptions parameter.
Enumerator
includeVisibleOnly 

Include only visible destinations

includeHiddenOnly 

Include only hidden destinations

includeBoth 

Include all destinations

includeVisibleURLsOnly 

Include only visible URL destinations

includeVisibleEmailsOnly 

Include only visible Email destinations

includeVisibleFilesOnly 

Include only visible File destinations

Determine whether the specified spread is visible in the specified layout vew.

Parameters
layout[IN] The layout view in question.
spread[IN] The spread in question.
Returns
kSpreadIsNotVisible if the spread is completely out of view, kSpreadIsCompletelyVisble if completely in view, kSpreadIsPartiallyVisible otherwise.

Member Function Documentation

virtual void ILayoutUIUtils::AddNewPage ()
pure virtual

Add a new page to the document. Same behavior as kAddNewPageActionID.

virtual void ILayoutUIUtils::AddNewPageAfterSpecifiedPage (const UID pageUID)
pure virtual
Add a new page to the current document after the page whose UID has been sent in the parameter.

Parameters
pageUID[IN] UID of the page on the document after which the new page should be created
virtual bool16 ILayoutUIUtils::AreSelectedPageItemsVisible (IControlViewcontrolView)
pure virtual

Test if the selected pageitems are visible.

Parameters
controlView[IN] IControlView for the layout view.
Returns
kTrue if the selected page items are at least partially visible.
virtual bool16 ILayoutUIUtils::CanDisplayMoveDialog ()
pure virtual

Tell whether the current selection would allow coordinate translations.

Returns
kTrue if the current selection would support moving pageitems.
virtual bool16 ILayoutUIUtils::CanDisplayTransformDialog ()
pure virtual

Tell whether the current selection would allow transforms.

Returns
kTrue if the current selection would support rotating, skewing, or scaling.
virtual void ILayoutUIUtils::CloseDialogWindow ()
pure virtual

If the frontmost dialog window has the key focus, close the dialog.

virtual PMPoint ILayoutUIUtils::ComputePasteboardPoint (const GSysPointinGlobalPoint,
IControlViewlayoutView 
)
pure virtual

Convert a global point to pasteboard coordinates. This function encapsulates all the hueristics we use to guarantee a given pixel value maps to a pasteboard value and then back to the same pixel value. The input is the coordinate in Global space and the result is in Pasteboard space. This function does NOT ruler adjust the point. Call ComputeRulerAdjustedPoint on the result if you want that behaviour.

Parameters
inGlobalPoint[IN] The global point to convert.
layoutView[IN] The IControlView interface for the view.
Returns
Converted point in pasteboard coordinates.
See Also
ComputeRulerAdjustedPoint
virtual PMPoint ILayoutUIUtils::ComputeRulerAdjustedPoint (const PMPointpbPtIn,
IRulerDataiHorzRuler,
IRulerDataiVertRuler,
const PMMatrixpbtoview 
)
pure virtual

Adjust a point so it snaps to exact ruler coordinates. It will return a pasteboard point that maps to a "nice" value in the current x or y unit of measure. So, instead of returning 12.14567 points, this function will return 12.1 points. The function takes the passed in pasteboard point, maps to a unit point, then rounds the units such the screen coordinate (the pixel) is still the same, but is a "nicer" value. As user zooms out, granularity is coarser, likewise as user zooms in, granularity is finer.

Parameters
pbPtIn[IN] The original point in pasteboard coordinates.
iHorzRuler[IN] The horizontal ruler data. May be nil if x coordinate doesn't need adjusting.
iVertRuler[IN] The vertical ruler data. May be nil if y coordinate doesn't need adjusting.
pbtoview[IN] The pasteboard-to-view matrix.
Returns
Adjusted point.
See Also
ComputeRulerAdjustedRect.
virtual PMRect ILayoutUIUtils::ComputeRulerAdjustedRect (const PMRectpbRectIn,
IRulerDataiHorzRuler,
IRulerDataiVertRuler,
const PMMatrixpbtoview 
)
pure virtual

Adjust the position of a rectangle so its edges coincide with ruler tick marks.

Parameters
pbRectIn[IN] The original rectangle in pasteboard coordinates.
iHorzRuler[IN] The horizontal ruler data. May be nil if x coordinate doesn't need adjusting.
iVertRuler[IN] The vertical ruler data. May be nil if y coordinate doesn't need adjusting.
pbtoview[IN] The pasteboard-to-view matrix.
Returns
The adjusted rectangle.
See Also
ComputeRulerAdjustedPoint.
virtual SnapType ILayoutUIUtils::ConstrainPointForSnapping (PMPointtoHere,
const PMPointoriginalPoint,
bool16 shiftDown,
const PMRealzoomPct 
)
pure virtual

Adjust a point in x, y direction when shift key is down during tracking.

Parameters
toHere[IN/OUT] The intended destination point, potentially modified by constraint logic.
originalPoint[IN] The starting point.
shiftDown[IN] kTrue means shift key is down; kFalse causes return with no change in toHere point.
zoomPct[IN] The current zoom percentage to use.
Returns
The appropriate snapping types (None, X, Y, XandY, etc.) to indicate direction(s) to snap
virtual IDocumentPresentation* ILayoutUIUtils::CreateNewLayoutPresentation (IDataBasewhichDoc,
IDocumentPresentation::CreationParentingPrefs parentPref = IDocumentPresentation::kDefaultParentingPref,
const IDocumentPresentationrelative = NULL 
)
pure virtual

Create and return a new layout presentation for specified the document.

Returns
IDocumentPresentation pointer to the new layout presentation. Caller not responsible for releasing this pointer
virtual ICommand* ILayoutUIUtils::CreateNewLayoutPresentationCmd (IDataBasewhichDoc = 0)
pure virtual

Create and return a command to create a new layout presentation for the specified document.

Returns
ICommand pointer to the new command. Caller responsible for releasing this pointer
virtual void ILayoutUIUtils::DisableUpdateAllDocumentViews ()
pure virtual

Disable each window of each document.

virtual void ILayoutUIUtils::DrawFloor (IGraphicsContextgc,
IDocumenttheDocument,
const PMRectviewBounds,
const UIDListvisibleSpreads 
)
pure virtual

Draws the "floor" of the document, the gray area outside of the spread pasteboards. Used by the LayoutControlView and CSprite.

Parameters
gc[IN] IGraphicsContext pointer for drawing.
thedocument[IN] IDocument poineter for the document.
viewBounds[IN] The bounds of the view.
visibleSpreads[IN] A UIDList of the visible spreads.
virtual void ILayoutUIUtils::EnableUpdateAllDocumentViews ()
pure virtual

Enable each window of each document.

virtual void ILayoutUIUtils::FillListWithHyperlinkDestinations (IStringListControlDatastringList,
IDataBasedb,
UIDListuids,
K2Vector< ClassID > * bossList,
IncludeOptions includeOptions = includeVisibleOnly,
bool16 bSorted = kFalse 
)
pure virtual

Utility to fill out a StringListControlData with a list of Hyperlink Destinations.

Parameters
stringList[OUT] Will be filled with destination names (will not be cleared in this method)
db[IN] A database to get destinations from.
uids[IN] Will be filled with the destination uids to match the strings added to StringListControlData.
bossList[IN] A list of bosses for which to add destinations.
includeOptions[IN] Include visible dests, invisible dests, or both.
bSorted[IN] kTrue to sort the list alphabetically on return.
virtual const UID ILayoutUIUtils::GetCurrentVisiblePage ()
pure virtual

Finds the current visible page in the document.

Returns
the currently visible page UID or kInvalidUID if none is found
virtual DestinationSelectionType ILayoutUIUtils::GetDestinationSelectionTypeWithDest (IHyperlinkDestinationdest,
bool16 isExternal 
)
pure virtual

Returns what type of hyperlink it is. Email and File destinations are distinguised unlike IHyperlinkDestination::GetType.

Parameters
desthyperlink destination
isExternalis hyperlink an external destination (will return kShared for external URLs)
Returns
type of destination
virtual RealAGMColor ILayoutUIUtils::GetDocumentBorderColor (IControlViewview) const
pure virtual
Provides the color to be used on the border of the Document

Parameters
view[IN] is the IControlView of the Layout.
Returns
RealAGMColor to be used as the border color
virtual IDocument* ILayoutUIUtils::GetFrontDocument ()
pure virtual

Return the document associated with the frontmost layout presentation.

Returns
IDocument pointer associated with the frontmost layout presentation.
virtual UIDRef ILayoutUIUtils::GetHitLinkedItemAdornment (IControlViewlayoutView,
PMPoint mouse 
)
pure virtual

Walks all the visible spreads and checks to see if the mouse is over an adornment of a linked item. It returns the first one it finds.

Parameters
viewIControlView of the layout
mouseCoordinates of the mouse location in view coordinates
virtual UIDRef ILayoutUIUtils::GetHitLockedItemAdornment (IControlViewlayoutView,
PMPoint mouse,
bool16 onlySelectedItems = kFalse 
)
pure virtual

Walks all the visible spreads and checks to see if the mouse is over an adornment of a locked item. It returns the first one it finds.

Parameters
viewIControlView of the layout
mouseCoordinates of the mouse location in view coordinates
onlySelectedItemsif true, only locks on items that are selected are considered.
virtual UIDRef ILayoutUIUtils::GetHitMissingFontFormItemAdornment (IControlViewlayoutView,
PMPoint mouse 
)
pure virtual

Walks all the visible spreads and checks to see if the mouse is over an adornment of a form field's missing font adornment. It returns the first one it finds.

Parameters
viewIControlView of the layout
mouseCoordinates of the mouse location in view coordinates
virtual ClassID ILayoutUIUtils::GetHitTestFlagsToHandlerBoss (const int32 selectionMode)
pure virtual

Return the class of the hit test handler to use given the set of hittesting flags.

Parameters
selectionModea set of hittest flags from IShape.h. e.g. kSelect, kOverrideMasterPageItemNoSelect, etc.
Returns
ClassID of the hittesting boss corresponding to the flags. See hittest handler bosses in LayoutUIID.h
See Also
IShape.h
LayoutUIID.h
virtual PMPoint ILayoutUIUtils::GetMousePasteboardPosition (const SysPointglobalLocation,
IControlViewiCurrentView 
)
pure virtual

Force redraw the control view passed in.

Parameters
controlView[IN] IControlView pointer for the view.

OBSOLETE in CC: use IControlView::ForceRedraw instead virtual void ForceRedrawControlView(IControlView* iControlView, bool16 flushBackBuffer = kFalse) = 0;Adjust a point position based the ruler preference for ruler location, etc.

Parameters
pointPos[IN/OUT] The point to adjust.
currentSpread[IN] An ISpread pointer to the current spread.Get mouse position from a global point based on pasteboard coordinate system.
globalLocation[IN] The global coordinate to convert.
iCurrentViewAn IControlView pointer for the current view.
Returns
Pasteboard coordinates for the globalLocation.
virtual PMReal ILayoutUIUtils::GetNewScaleFactor (const PMRectrect,
IControlViewcontrolView 
)
pure virtual

Utility to calculate the scale factor when zooming to rect within the controlView. Used for zooming to page items.

Parameters
rect[IN] Intended final zoom rectangle.
controlView[IN] IControlView pointer for the view.
Returns
Scale factor needed to zoom to rect.
virtual PMReal ILayoutUIUtils::GetNextZoomFactor (IControlViewcontrolView,
bool32 zoomIn,
bool32 adjustForMonitorPPI = kTrue 
)
pure virtual

Helper function to cycle through the zoom percentages for a particular view.

Parameters
controlView[IN] IControlView pointer for the zoom operation.
zoomIn[IN] kTrue increases the zoom percentage, kFalse decreases the zoom percentage.
adjustForMonitorPPI[IN] Factor in an additional scale to adjust for the resolution of the monitor that is displaying this view? For example, if the monitor is 96ppi, then factor in an additional scale of 96/72 = 1.33
Returns
the next zoom percentage.
virtual PMReal ILayoutUIUtils::GetNextZoomValue (PMReal currentZoom,
bool32 zoomIn 
)
pure virtual

Helper function to get the next zoom percentage. Used by GetNextZoomFactor.

Parameters
currentZoom[IN] Current zoom value from which to fetch the 'next' zoom level.
zoomIn[IN] kTrue increases the zoom percentage, kFalse decreases the zoom percentage.
Returns
the next zoom percentage.
virtual UID ILayoutUIUtils::GetPageUIDFromWidget (IControlViewview,
IDocumentiDocument 
)
pure virtual

Given a control view for a kPageNumComboBoxWidgetBoss or kPageNavigateComboBoxWidgetBoss, return the UID for it.

virtual RealAGMColor ILayoutUIUtils::GetPasteboardBorderColor (IControlViewview) const
pure virtual
Provides the color to be used on the border of the Pasteboard

Parameters
view[IN] is the IControlView of the Layout.
Returns
RealAGMColor to be used as the border color
virtual bool16 ILayoutUIUtils::GetPathSelectionMode ()
pure virtual

Tells which of pointer tool or direct select tool was most recently selected

Returns
kTrue if the direct select tool was most recently selected.
virtual void ILayoutUIUtils::GetSelectedPages (UIDListpageUIDList,
bool16 bIncludeMasters = kTrue,
bool16 bCurrentPageOnly = kFalse,
bool16 bPagesOnly = kTrue 
)
pure virtual

Return the margins of the spread associated with the frontmost layout window, or the indicated spread if the optional argument is used.

Parameters
whichpage[IN] Optional zero-based page index for the desired page of the spread (zero is the left page in left-to-right binding documents, the right page in right-to-left documents).
currentSpread[IN] Optional ISpread pointer for the desired spread.
Returns
IMargins pointer for the margins. The reference count is incremented; the caller is responsible for calling Release();Return the columns of the spread associated with the frontmost layout window, or the indicated spread if the optional argument is used.
Parameters
whichpage[IN] Optional zero-based page index for the desired page of the spread (zero is the left page in left-to-right binding documents, the right page in right-to-left documents).
currentSpread[IN] Optional ISpread pointer for the desired spread.
Returns
IColumns pointer for the columns. The reference count is incremented; the caller is responsible for calling Release();Populates pageUIDList with UIDs for the selected pages (or spreads) in the Pages Panel. Will return the "current page" when Pages Panel is not visible.
Parameters
UIDList[IN/OUT] UIDs of pages selected in the pages panel. Note that depending on bPagesOnly parameter, this list could also contain spread UIDs. UIDList must be set up with proper database.
bIncludeMasters[IN] kTrue to include master pages.
bCurrentPageOnly[IN] kTrue to only include "current" page if pages panel is not shown; kFalse to use all pages from the current spread.
bPagesOnly[IN] kTrue to return only page uids in list (appends each page UID from selected spread(s)), kFalse to return a mixture of page UIDs and/or spread UIDs
virtual bool16 ILayoutUIUtils::GetUIDocumentWindowCount ()
pure virtual

Returns a count of the number of UI document windows opened by the user.

Returns
the count of the number of UI document windows opened by the user. Headless documents are not counted.
virtual PMRect ILayoutUIUtils::GetViewedSpreadsBounds (IControlViewlayoutView)
pure virtual

Get the bounds (in pasteboard coordinates) of the spreads being viewed. If the current spread is a master spread then the bounds of that single master spread is returned. Otherwise the union of the bounds of all the spreads in the viewed document is returned including those that are scrolled/scaled out of view by the panorama. In either case, an additional IPasteboardPrefs::kPasteboardSeperatorAmount (in parent units, though) is included at the top and bottom of the returned bounds.

Parameters
layoutView[IN] An IControlView pointer for the view.
Returns
A rect in pasteboard coordinates for the bounds of the spreads.
virtual UID ILayoutUIUtils::GetVisibleMasterSpreadUID (IControlViewlayoutView,
IMasterSpreadListmasterList 
)
pure virtual

Find the master spread that is currently being viewed in a layout view

Parameters
layoutView[IN] IControlView pointer for the view.
masterList[IN] IMasterSpreadList pointer for the document.
Returns
UID of the master spread being viewed.
virtual UID ILayoutUIUtils::GetVisibleMCFrames (IControlViewlayoutControlView,
IFrameListframeList,
UIDListvisibleMCTextFrames 
)
pure virtual

Fill a UIDList with the multi column text frames that are currently visible in a layout view.

Parameters
layoutControlView[IN] An IControlView pointer for the view. If layoutControlView is nil and frameList is non-nil, then all open views for the document containing frameList are considered.
frameList[IN] If non-nil, then multi column text frames with text frame columns not in frameList are removed from visibleMCTextFrames.
visibleMCTextFrames[IN/OUT] The list to fill. This list must be set up with the database first.
Returns
If frameList in nil or no multi column text frames with text frame columns in frameList are visible, kInvalidUID is returned. Otherwise the UID of the visible multi column text frame with text frame columns in frameList with the largest index are returned.
virtual UID ILayoutUIUtils::GetVisiblePageUID (IControlViewlayoutView,
IGeometryspreadGeometry = nil 
)
pure virtual

Find the page that is currently being viewed in the referred to IControlView.

Parameters
layoutView[IN] IControlView pointer for the view.
spreadGeometry[IN] If provided, constrains the search to this spread. Otherwise, the routine will look for visible page whose center is nearest the view's center (what the page navigation widget shows).
Returns
UID of the page being viewed.
virtual UIDList ILayoutUIUtils::GetVisibleSpreads (IControlViewlayoutView)
pure virtual

Get a list of the spreads currently visible in the layout view.

Parameters
layoutView[IN] An IControlView pointer for the view.
Returns
A UIDList of the visible spreads.
virtual UIDList ILayoutUIUtils::GetVisibleSpreads (IControlViewlayoutView,
const PMRectviewBounds 
)
pure virtual

Get a list of the spreads currently visible in a bounded portion of the layout view.

Parameters
layoutView[IN] An IControlView pointer for the view.
viewBounds[IN] Only look within this portion of the view.
Returns
A UIDList of the visible spreads.
virtual UID ILayoutUIUtils::GetVisibleSpreadUID (IControlViewlayoutView,
ISpreadListspreadList 
)
pure virtual

Find the spread that is currently being viewed in a layout view

Parameters
layoutView[IN] IControlView pointer for the view.
spreadList[IN] ISpreadList pointer for the document.
Returns
UID of the spread being viewed.
virtual PBPMPoint ILayoutUIUtils::GlobalToPasteboard (IControlViewcontrolView,
const GSysPointthePoint 
)
pure virtual

Transform a global point to pasteboard coordinates, using AGM rasterport. NOTE: This method has side-effects: it sets up the transform in the views rasterport. Beware.

Parameters
controlView[IN] The IControlView interface for the view.
thePoint[IN] The global point to transform.
Returns
Transformed point in pasteboard coordinates.
virtual void ILayoutUIUtils::HandleAction (ActionID actionID)
pure virtual

runs an action

Parameters
actionIDthe id of the action to run
virtual void ILayoutUIUtils::HandlePresentationHideCursor ()
pure virtual

handle the hide cursor timer. Do not call this directly, it's called by the hide cursor timer

virtual void ILayoutUIUtils::InvalidateAllDocumentViews ()
pure virtual

Show swf preview panel if it is not originally shown and generate swf file to preview

Parameters
previewMode[IN]: different preview mode (preview document, preview spread, preview selection)Invalidate the views of all the documents opened.
virtual void ILayoutUIUtils::InvalidateShapeGraphixCache (IDocumentiDoc)
pure virtual

Invalidate the Shape Graphix Cache of all spreads of a document.

Parameters
iDoc[IN] IDocument pointer for the document.
virtual void ILayoutUIUtils::InvalidateShapeGraphixCache (IShapeiShape)
pure virtual

Invalidate the Shape Graphix Cache for shape.

Parameters
iShape[IN] IShape pointer for the shape.
virtual void ILayoutUIUtils::InvalidateViews (IDocumentiDoc)
pure virtual

Invalidate the views of a document.

Parameters
iDoc[IN] IDocument pointer for the document.
virtual bool16 ILayoutUIUtils::IsAcceleratedDrawing (IPMUnknownlayoutView) const
pure virtual

Tests to see if layout view is being rendered using hardware acceleration in full screen mode

Parameters
layoutView[IN] Interface pointer for the view.
Returns
true if layout view is hardware accelerated
virtual bool16 ILayoutUIUtils::IsApplicationInNoPubWindowState ()
pure virtual

Tells whether the application has no document windows visible to the user.

Returns
kTrue if there are no document windows visible to the user. Headless documents are not counted for these purposes.
virtual bool16 ILayoutUIUtils::IsCurrentSpreadVisible (IControlViewcontrolView)
pure virtual

Test if the current spread is completely visible.

Parameters
controlView[IN] IControlView for the layout view.
Returns
kTrue if the current spread is completely visible.
virtual bool ILayoutUIUtils::IsLayoutPresentation (IDocumentPresentationinPresentation)
pure virtual

Test to see if the given presentation contains ILayoutControlData.

Returns
true if inPresentation contains a layout data part.
virtual bool16 ILayoutUIUtils::IsPresentationMode (IDocumentPresentationdocumentPresentation = nil)
pure virtual

Tests to see if active window in full screen mode

Returns
true if we are full screen
virtual bool16 ILayoutUIUtils::IsPreviewOn (IPMUnknownlayoutView)
pure virtual

Returns kTrue if this layout view has the preview mode set for it.

Parameters
layoutView[IN] Interface pointer for the view.
Returns
kTrue if the preview mode for the view is not IPreviewPrefs::kPreviewOff.
See Also
IPreviewPrefs.h for preview modes.
virtual ICommand* ILayoutUIUtils::MakeScrollToSpreadCmd (IControlViewcontrolView,
IGeometryspreadGeometry = nil,
bool16 bMakeVisibleSpreadActive = kTrue 
)
pure virtual

Helper function to create a scroll to point command for indicated spread. If the view percentage is one of the "fit" settings, it will scroll to the center of the spread. Otherwise it will scroll to the same offset from center as was in the view before the scroll. Useful after a SetSpreadCmd since it no longer scrolls to a spread.

Parameters
controlView[IN] IControlView pointer for the scrolling operation.
spreadGeometry[IN] IGeometry pointer for the spread. If spread is nil, scroll to center of current spread.
bMakeVisibleSpreadActive[IN] kTrue to make the visible spread active.
Returns
an ICommand pointer for the command.
See Also
ILayoutControlData, GetFit
virtual void ILayoutUIUtils::MakeVisibleSpreadActive (IControlViewcontrolView)
pure virtual

Set the spread occupying the center of the view to be active. If the active spread is already visible, nothing will happen.

Parameters
controlView[IN] An IControlView pointer for the view.
virtual ICommand* ILayoutUIUtils::MakeZoomCmd (IControlViewcontrolView,
PMReal zoomPct,
ILayoutControlData::FitSetting fit = ILayoutControlData::kFitNone,
bool16 bJustZoomToPoint = kTrue,
PMPoint pt = kZeroPoint,
bool16 bMakeVisibleSpreadActive = kTrue 
)
pure virtual

Make one of several zoom commands. Makes kFitInViewCmdBoss if fit == ILayoutControlData::kFitSpread, kFitPageInViewCmdBoss if fit == ILayoutControlData::kFitPage, kFullViewCmdBoss if fit == ILayoutControlData::kFitPasteBoard, and kZoomToCmdBoss if fit == ILayoutControlData::kFitNone.

Parameters
controlView[IN] IControlView pointer for zoom operation.
zoomPct[IN] Zoom percentage (fit must be set to ILayoutControlData::kFitNone).
fit[IN] Use a fit-to setting instead of a zoom percentage. Using value other than ILayoutControlData::kFitNone ignores the bJustZoomToPoint and pt parameters.
bJustZoomToPoint[IN] kTrue to use pt parameter; kFalse to zoom to selection.
pt[IN] Center of zoom, if bJustZoomToPoint is kTrue. Using kZeroPoint chooses center of view.
bMakeVisibleSpreadActive[IN] If fit is not ILayoutControlData::kFitNone, tells whether to make the visible spread active before zooming.
Returns
ICommand pointer for zooming.
virtual ICommand* ILayoutUIUtils::MakeZoomInCmd (IControlViewcontrolView,
bool16 bJustZoomToPoint = kTrue 
)
pure virtual

Make a command to zoom in.

Parameters
controlView[IN] IControlView pointer for zoom operation.
bJustZoomToPoint[IN] kTrue to zoom to center of view; kFalse to zoom to selection (as long as it is visible).
Returns
ICommand pointer for zooming.
virtual ICommand* ILayoutUIUtils::MakeZoomOutCmd (IControlViewcontrolView,
bool16 bJustZoomToPoint = kTrue 
)
pure virtual

Make a command to zoom out.

Parameters
controlView[IN] IControlView pointer for zoom operation.
bJustZoomToPoint[IN] kTrue to zoom to center of view; kFalse to zoom to selection (as long as it is visible).
Returns
ICommand pointer for zooming.
virtual IWorkspace* ILayoutUIUtils::QueryActiveWorkspace ()
pure virtual

Return the 'active' workspace. This belongs either to the frontmost view, or, if there isn't any, to the session (i.e., app-wide).

Returns
IWorkspace pointer for the active workspace. The reference count is incremented; the caller is responsible for calling Release();
virtual ISnapTo* ILayoutUIUtils::QueryAndPrepareSnapToForSpread (IControlViewcontrolView,
ISpreadspread,
const UIDListitemList,
const UIDReforiginalSpread,
PBPMPoint originalPoint 
)
pure virtual

Find the ISnapTo interface appropriate to do snapping over a particular spread, and set it up for a drag operation.

Parameters
controlView[IN] IControlView pointer for the view.
spread[IN] The spread for the snapping operation.
itemList[IN] UIDList of items to snap.
originalSpread[IN] UIDRef or originating spread.
originalPoint[IN] Starting point for the drag, in pasteboard coordinates.
Returns
ISnapTo interface for the operation. The reference count is incremented; the caller is responsible for calling Release().
virtual ILayoutControlData* ILayoutUIUtils::QueryFrontLayoutData ()
pure virtual

Return the layout widget data associated with the front most presentation.

Returns
The first occurrence of a layout data part (ILayoutControlData*) of the front presentation. If you have more than one layout widget in the presentation, it won't return the others. Reference count is incremented; the caller is responsible for calling Release();
virtual IControlView* ILayoutUIUtils::QueryFrontView ()
pure virtual

Return the view associated with the frontmost layout presentation.

Returns
IControlView pointer for frontmost layout presentation. Reference count is incremented; caller is responsible for calling Release();
virtual IUIDListData* ILayoutUIUtils::QueryHitTestResultsByUIDList (IPMUnknownowner,
const PBPMPointpWherePt,
const PMRectpWhereRect,
const ClassID handlerClass,
UIDListpTheSpreads,
int16 tolerance = kHitTestTolerance,
bool16 bVisibleSpreads = kFalse,
bool16 bUsePt = kTrue,
bool16 bUseXform = kTrue,
bool16 bFinishChildren = kFalse 
)
pure virtual

Hit-test a point or a rectangle against a list of spreads in a view. Intended for internal use only. Routines ILayoutControlViewHelper::QueryHitTestPageItemOnVisibleSpreadsNew and ILayoutControlViewHelper::QueryHitTestPageItemNew are higher level and more suitable for general use.

Parameters
owner[IN] Interface pointer from the owning view.
pWherePt[IN] Pointer to a point to hit-test, if bUsePt == kTrue.
pWhereRect[IN] Pointer to a rect to hit-test, if bUsePt == kFalse.
handlerClass[IN] ClassID of handler boss for particular hit-test behavior desired.
pTheSpreads[IN] UIDList of spreads to hit-test.
tolerance[IN] The tolerance for how close 'where' must be to be considered a hit. Defaults to kHitTestTolerance.
bVisibleSpreadsUNUSED
bUsePt[IN] kTrue to use pWherePt, kFalse to use pWhereRect.
bUseXform[IN] kTrue to transform the hit-test location to the view's transform before hit-testing.
bFinishChildren[IN] kTrue to continue searching for sibling hits once a hit is found, kFalse to stop after one hit.
Returns
IUIDListData pointer containing found items.
See Also
GenericID.h and GenericClass.fr for various hit-test handler boss definitions.
virtual IRulerData* ILayoutUIUtils::QueryHorzRulerData (IPMUnknownlayoutView)
pure virtual

Return the horizontal ruler data of the layout widget passed in.

Parameters
layoutView[IN] An interface pointer for the layout view.
Returns
IRulerData pointer for the horizontal ruler data interface. The reference count is incremented; the caller is responsible for calling Release();
virtual IPMUnknown* ILayoutUIUtils::QueryInterfaceUsingHitTest (IPMUnknownowner,
const PBPMPointpWherePt,
const PMRectpWhereRect,
const ClassID handlerClass,
const PMIIDinterfaceID,
int16 tolerance = kHitTestTolerance,
bool16 bVisibleSpreads = kFalse,
bool16 bUsePt = kTrue 
)
pure virtual

Hit-test a point or a rectangle against the current spread or all visible spreads in a view. Intended for internal use only. Routines ILayoutControlViewHelper::QueryHitTestPageItemOnVisibleSpreadsNew and ILayoutControlViewHelper::QueryHitTestPageItemNew are higher level and more suitable for general use.

Parameters
owner[IN] Interface pointer from the owning view.
pWherePt[IN] Pointer to a point to hit-test, if bUsePt == kTrue.
pWhereRect[IN] Pointer to a rect to hit-test, if bUsePt == kFalse.
handlerClass[IN] ClassID of handler boss for particular hit-test behavior desired.
interfaceID[IN] Interface ID to query on hit item before returning.
tolerance[IN] The tolerance for how close 'where' must be to be considered a hit. Defaults to kHitTestTolerance.
bVisibleSpreads[IN] kTrue to only search the visible spreads, kFalse to search the current spread.
bUsePt[IN] kTrue to use pWherePt, kFalse to use pWhereRect.
Returns
Interface pointer of type interfaceID on the first hit item.
See Also
GenericID.h and GenericClass.fr for various hit-test handler boss definitions.
virtual ILayoutControlData* ILayoutUIUtils::QueryLayoutData (IPMUnknowninPresentation)
pure virtual

Return the layout widget data associated with the supplied presentation.

Parameters
inWindow[IN] Window to retrieve layout widget data from. Note: it doesn't have to be a window - if it isn't, it'll just query for a layoutdata anyway; this way you can pass a viewMaster).
Returns
The first occurrence of a layout data part (ILayoutControlData*) of a widget. If you have more than one layout widget in the presentation, it won't return the others. The reference count is incremented; the caller is responsible for calling Release().
virtual IRulerData* ILayoutUIUtils::QueryVertRulerData (IPMUnknownlayoutView)
pure virtual

Return the vertical ruler data of the layout widget passed in.

Parameters
layoutView[IN] An interface pointer for the layout view.
Returns
IRulerData pointer for the vertical ruler data interface. The reference count is incremented; the caller is responsible for calling Release();
virtual IPMUnknown* ILayoutUIUtils::QueryWidgetParentFor (IPMUnknownpUnknown,
const PMIIDrIID 
)
pure virtual

Traverse up the widget hierarchy looking for the specified interface. Queries starting at given level.

Parameters
pUnknown[IN] An interface from an object with an IWidgetParent (such as a IControlView.
rIID[IN] The interface IID that you are looking for.
Returns
IPMUnknown pointer. You must cast to your desired type. The reference count is incremented; the caller is responsible for calling Release().
virtual void ILayoutUIUtils::SetPageUIDForWidget (IControlViewview,
const UIDRefpageRef 
)
pure virtual

Given a control view for a kPageNumComboBoxWidgetBoss or kPageNavigateComboBoxWidgetBoss, set the initially selected page UID for it.

virtual void ILayoutUIUtils::SetPathSelectionMode (bool16 isPathSelected)
pure virtual
Sets the global path selection mode. For internal use only. Use IPathSelectionSuite->ActivatePathSelection instead.

Parameters
isPathSelected[IN] kTrue means that of the pointer tool and direct select tool, that the direct select tool was most recently selected.
virtual void ILayoutUIUtils::SetPresentationBackgroundColor (int32 stockColor,
IDocumentPresentationdocumentPresentation 
)
pure virtual

set the color of the background for Presentation Mode

Parameters
stockColorIUIColorUtils color. For example: IUIColorUtils::kStockUIWhite
documentPresentationthe document view to change the background color on
virtual void ILayoutUIUtils::StartCursorHideTimer ()
pure virtual

starts the timer that hides the presentation mode cursor after a period of inactivity

virtual void ILayoutUIUtils::StopCursorHideTimer ()
pure virtual

stops the timer that hides the presentation mode cursor after a period of inactivity

virtual void ILayoutUIUtils::TogglePresentationMode (IDocumentPresentationdocumentPresentation)
pure virtual

Toggles the Presentation Mode

Parameters
documentPresentationthe document view that should be switched.