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

#include <IPanorama.h>

Inheritance diagram for IPanorama:
IPMUnknownCPanorama

Public Types

enum  { kDefaultIID = IID_IPANORAMA }
 

Public Member Functions

Panorama attributes
virtual PMRect GetBounds () const =0
 
virtual PMRect GetCentralBounds () const =0
 
virtual PMReal GetCentralBorderWhiteSpace () const =0
 
virtual void SetPrimaryPanorama (IPanorama *panorama)=0
 
virtual IPanoramaGetPrimaryPanorama () const =0
 
virtual void GetPanoramaDelta (PMPoint &delta) const =0
 
virtual void GetPanoramaDeltaMultiple (PMPoint &delta) const =0
 
Scrolling
void ScrollContentLocationToFrameCenter (const PBPMPoint &contentLocation, bool16 bForceRedraw=kTrue)
 
virtual void ScrollViewCenterTo (const PBPMPoint &newCenter, bool16 bForceRedraw=kTrue)=0
 
PBPMPoint ScrollContentLocationToFrameOrigin (const PBPMPoint &contentLocation, bool16 forceRedraw=kTrue, SysRgn InvalRgnCopy=nil)
 
virtual PBPMPoint ScrollTo_neg (const PBPMPoint &to, bool16 forceRedraw=kTrue, SysRgn InvalRgnCopy=nil)=0
 
virtual PBPMPoint ScrollBy (const PBPMPoint &by, bool16 bForceRedraw=kTrue, SysRgn InvalRgnCopy=nil)=0
 
virtual PMPoint GetAutoScrollDelta (const PBPMPoint &viewPoint)=0
 
PMPoint GetContentLocationAtFrameOrigin ()
 
virtual PMPoint GetScrollOffset_neg () const =0
 
PMPoint GetContentLocationAtFrameCenter ()
 
virtual PMPoint GetViewCenter () const =0
 
virtual void ScrollViewEdgeTo (const EdgeSpec &edgeSpec, const PBPMPoint &pt, bool16 bForceRedraw=kTrue)=0
 
Scaling
virtual void ScalePanorama (const PMReal &xFactor, const PMReal &yFactor)=0
 
virtual void ScalePanoramaBy (const PMReal &xBy, const PMReal &yBy)=0
 
virtual PMReal GetXScaleFactor (bool32 actualZoomLevelInsteadOfUIZoomWidgetValue=kTrue) const =0
 
virtual PMReal GetYScaleFactor (bool32 actualZoomLevelInsteadOfUIZoomWidgetValue=kTrue) const =0
 
virtual PMReal GetPreviousScaleFactor () const =0
 
virtual void SetPreviousScaleFactor (PMReal scaleFactor)=0
 
virtual PMPoint GetPreviousViewCenter () const =0
 
virtual PMReal GetMinScaleFactor () const =0
 
virtual PMReal GetMaxScaleFactor () const =0
 
Combinations
virtual void FitInView ()=0
 
virtual void FullView ()=0
 
Transform
virtual void UpdatePanoramaTransform (PMMatrix *transform) const =0
 
Persistence
virtual void SavePerspective () const =0
 
virtual void RestorePerspective ()=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 used to manage views that can scroll. Add an implementation of IPanorama to the view's boss object.

See Also
CPanorama

Member Function Documentation

virtual void IPanorama::FitInView ()
pure virtual

Adjust the panorama to fill the view with the active content.

Implemented in CPanorama.

virtual void IPanorama::FullView ()
pure virtual

Adjust the panorama to fill the view with the entire content desribed by GetBounds().

Implemented in CPanorama.

virtual PMPoint IPanorama::GetAutoScrollDelta (const PBPMPointviewPoint)
pure virtual

Get the delta value to use for scrolling if the point is outside of the controlview's bounding box.

Parameters
viewPointIN point
Returns
how much to scroll for each autoscroll step.

Implemented in CPanorama.

virtual PMRect IPanorama::GetBounds () const
pure virtual

Get the bounds of the intrinsic content being controlled by this panorama. Note the result is in content coordinates, not frame coordinates. Frame coordinates are the same as the content coordinates of the parent of this view except the (0,0) origin of Frame coordinates is at the top-left corner of this widget's frame. The content coordinate system is the one that is transformed away from frame coordinates by this panorama implementation. See notes at UpdatePanoramaTransform.

Returns
bounds in content coordinates.
virtual PMReal IPanorama::GetCentralBorderWhiteSpace () const
pure virtual

Get the minimum size in view coordinates of white space surrounding the central content.

Returns
thickness of white border in view coordinates

Implemented in CPanorama.

virtual PMRect IPanorama::GetCentralBounds () const
pure virtual

Get the central content contained on the panorama. For many panorama's there is no distinction between the central content and the whole. Panoramas such as pasteboards, contain a layout which is the central content.

This distinction now appears to be obsolete. All implementations return the same answer as GetBounds(). Although it is still called in ScrollBarPanoramaSync::AdjustPanorama

Returns
central bounds in content coordinates.

Implemented in CPanorama.

PMPoint IPanorama::GetContentLocationAtFrameCenter ()
inline

Get the content location currently scrolled to the center of the view–in content coordinates.

PMPoint IPanorama::GetContentLocationAtFrameOrigin ()
inline

Get the content-corrdinate location currently positioned at the top-left corner of the frame.

virtual PMReal IPanorama::GetMaxScaleFactor () const
pure virtual

Get the maximum allowable scale factor.

Implemented in CPanorama.

virtual PMReal IPanorama::GetMinScaleFactor () const
pure virtual

Get the minimum allowable scale factor.

Implemented in CPanorama.

virtual void IPanorama::GetPanoramaDelta (PMPointdelta) const
pure virtual

Get the delta values to use for incremental scrolling (clicking in the scroll bar arrows).

Implemented in CPanorama.

virtual void IPanorama::GetPanoramaDeltaMultiple (PMPointdelta) const
pure virtual

Get the delta values to use for large scale scrolling (clicking in the scroll bar background).

Implemented in CPanorama.

virtual PMReal IPanorama::GetPreviousScaleFactor () const
pure virtual

Get the previous scale factor (why is there only one?).

Implemented in CPanorama.

virtual PMPoint IPanorama::GetPreviousViewCenter () const
pure virtual

Get the previous view center

Implemented in CPanorama.

virtual IPanorama* IPanorama::GetPrimaryPanorama () const
pure virtual

Get the primary panorama.

Implemented in CPanorama.

virtual PMPoint IPanorama::GetScrollOffset_neg () const
pure virtual

An obsolete function that was named GetScrollOffset in CS6 and earler. However, the implementation had a sign error. New code should call GetContentLocationAtFrameOrigin. For now, old code can simply rename calls to GetScrollOffset to GetScrollOffset_neg but this function will go away in a future release.

Implemented in CPanorama.

virtual PMPoint IPanorama::GetViewCenter () const
pure virtual

An obsolete name for GetContentLocationAtFrameCenter. New code should call GetContentLocationAtFrameCenter. For now, old code can still call GetViewCenter but this function will go away in a future release.

Implemented in CPanorama.

virtual PMReal IPanorama::GetXScaleFactor (bool32 actualZoomLevelInsteadOfUIZoomWidgetValue = kTrue) const
pure virtual

Get the horizontal scale factor.

Parameters
actualZoomLevelInsteadOfUIZoomWidgetValue[IN] Pass kFalse to get the zoom level that should be displayed to the user By default, InDesign adjusts the layout view zoom factor to account for the resolution of the monitor that the panorma is displayed within such that when viewed at what the user believes is 100%, one inch of the ruler will take up one inch of monitor space. If you do not want this monitor scale factor included, then pass kFalse.

Implemented in CPanorama.

virtual PMReal IPanorama::GetYScaleFactor (bool32 actualZoomLevelInsteadOfUIZoomWidgetValue = kTrue) const
pure virtual

Get the vertical scale factor.

Parameters
actualZoomLevelInsteadOfUIZoomWidgetValue[IN] Pass kFalse to get the zoom level that should be displayed to the user By default, InDesign adjusts the layout view zoom factor to account for the resolution of the monitor that the panorma is displayed within such that when viewed at what the user believes is 100%, one inch of the ruler will take up one inch of monitor space. If you do not want this monitor scale factor included, then pass kFalse.

Implemented in CPanorama.

virtual void IPanorama::RestorePerspective ()
pure virtual

Restore from the previous perspective.

Implemented in CPanorama.

virtual void IPanorama::SavePerspective () const
pure virtual

Save the current perspective.

Implemented in CPanorama.

virtual void IPanorama::ScalePanorama (const PMRealxFactor,
const PMRealyFactor 
)
pure virtual

Replace the current scale factors with new values. The scale is changed relative to the content location currently positioned at the top-left corner of the view. That is, whatever content is positioned at the top-left corner of the view will remain at the top-left corner of the view and all the other content will grow away from or shrink shrink toward that point in the view.

Implemented in CPanorama.

virtual void IPanorama::ScalePanoramaBy (const PMRealxBy,
const PMRealyBy 
)
pure virtual

This function is obsolete and will be removed in a future release.

Implemented in CPanorama.

virtual PBPMPoint IPanorama::ScrollBy (const PBPMPointby,
bool16 bForceRedraw = kTrue,
SysRgn InvalRgnCopy = nil 
)
pure virtual

Scroll the view the distance specified (in content coordinates). A positive 'by' means reveal the content below or to the right of the frame. That is, relative to the stationary frame, the origin of the content is moved up or to the left from where it currently sits. The 'by' vector is in content coordinates. Hence, a 'by' vector of say (100, 100) will appear to an observer sitting in frame coordinates to move the content up and left by (200, 200) if the panorama has a 2X scale factor.

To obtain a copy of the invalidation region generated by the scroll, pass in a valid SysRgn and the invalidation region will be copied into it.

Parameters
byIN A vector that specifies by how much (in content units) to move the content coordinate system up or to the left in order to reveal more content below or to the right of the frame currently. A "negative" by will have the opposite effect.
bForceRedrawIN force redraw or not
InvalRgnCopyIN/OUT nil, or region to retrieve copy of the inval region
Returns
the actual amount scrolled

Implemented in CPanorama.

void IPanorama::ScrollContentLocationToFrameCenter (const PBPMPointcontentLocation,
bool16 bForceRedraw = kTrue 
)
inline

Scroll so that a given point in content coordinates ends up at the center of the view.

Parameters
contentLocationIN the content-coordinate point to move to the center of the view
bForceRedrawIN force redraw or not
PBPMPoint IPanorama::ScrollContentLocationToFrameOrigin (const PBPMPointcontentLocation,
bool16 forceRedraw = kTrue,
SysRgn InvalRgnCopy = nil 
)
inline

Scroll so that a given content-coordinate point ends up at the top-left corner of the view. To obtain a copy of the invalidation region generated by the scroll, pass in a valid SysRgn and the invalidation region will be copied into it.

Parameters
contentLocationIN point to scroll to
InvalRgnCopyIN/OUT nil, or region to retrieve copy of the inval region
Returns
the actual amount scrolled
virtual PBPMPoint IPanorama::ScrollTo_neg (const PBPMPointto,
bool16 forceRedraw = kTrue,
SysRgn InvalRgnCopy = nil 
)
pure virtual

An obsolete function that was named ScrollTo in CS6 and earler. However, the implementation had a sign error. New code should call ScrollContentLocationToFrameOrigin with the corrected PMPoint. For now, old code can simply rename calls to ScrollTo to ScrollTo_neg but this function will go away in a future release.

Implemented in CPanorama.

virtual void IPanorama::ScrollViewCenterTo (const PBPMPointnewCenter,
bool16 bForceRedraw = kTrue 
)
pure virtual

An obsolete name for ScrollContentLocationToFrameCenter. New code should call ScrollContentLocationToFrameCenter. For now, old code can still call ScrollViewCenterTo but this function will go away in a future release.

Implemented in CPanorama.

virtual void IPanorama::ScrollViewEdgeTo (const EdgeSpecedgeSpec,
const PBPMPointpt,
bool16 bForceRedraw = kTrue 
)
pure virtual

Scroll such that the given panorama point is at the specified edge of the view.

Parameters
edgeSpecIN where should the scrolled point end up
ptIN panorama point to scroll
bForceRedrawIN force redraw or not

Implemented in CPanorama.

virtual void IPanorama::SetPreviousScaleFactor (PMReal scaleFactor)
pure virtual

Set the previous scale factor (why is there only one?).

Implemented in CPanorama.

virtual void IPanorama::SetPrimaryPanorama (IPanoramapanorama)
pure virtual

Set the primary panorama. Some panoramas need the attributes of a panorama they are synching with, called the primary panorama.

Parameters
panoramaIN the primary panorama

Implemented in CPanorama.

virtual void IPanorama::UpdatePanoramaTransform (PMMatrixtransform) const
pure virtual

Modify the passed in transformation by prepending the content to frame matrix embodied by the IPanorama. Two typical use cases are to pass a pointer to the identity matrix to simply get the content to frame transformation that represents how the content coordinate system has been tranformed away from the coordinate system of the frame containing the content. (The frame coordinate system has its (0,0) origin at the top left corner of the frame and has an orientation and scale identical to the content coordinates of the parent widget containing this widget. In other words, Frame coordinates are simply parent content coordinates translated by GetFrame().TopLeft()). The other typical use case is to pass a pointer to a matrix that already has the frame-to-parent transform (from GetFrame().TopLeft()) perhaps appended further with parent-to-grandparent matrix an on up all the way to some outer coordinate system like the window.

See further comments in CPanorama.h

Implemented in CPanorama.