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

#include <ISelectionDataSuite.h>

Inheritance diagram for ISelectionDataSuite:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_ISELECTIONDATASUITE }
 

Public Member Functions

virtual PBPMRect CalculatePBSelectionBounds (IControlView *iLayoutControlView) const =0
 
virtual PMRect CalculateViewSelectionBounds (IControlView *iLayoutControlView) const =0
 
virtual SysRgn GetSelectionRgn (IControlView *iLayoutControlView) const =0
 
virtual PBPMPoint CalculatePBCenterPoint (IControlView *iLayoutControlView) const =0
 
virtual PMPoint CalculateViewCenterPoint (IControlView *iLayoutControlView) const =0
 
virtual bool16 IsItemSelected (IPMUnknown *theItem) const =0
 
virtual bool16 HasItemSelected () const =0
 
virtual int32 GetSelectionCount () 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

Provides interface to return information about any type of selection.

Member Function Documentation

virtual PBPMPoint ISelectionDataSuite::CalculatePBCenterPoint (IControlViewiLayoutControlView) const
pure virtual

Calculate the center point of the selection in Pasteboard coordinates. Note: This returns the actual center of the selection, not necessarily the center of the PMRect returned above

Parameters
iLayoutControlViewIControlView to calculate.
Returns
Center Point of selection.
virtual PBPMRect ISelectionDataSuite::CalculatePBSelectionBounds (IControlViewiLayoutControlView) const
pure virtual

Calculate the bounds of the selection in Pasteboard coordinates

Parameters
iLayoutControlViewThe IControlView to calculate.
Returns
Rect of selection. May return an empty rect (kEmptyRect).
virtual PMPoint ISelectionDataSuite::CalculateViewCenterPoint (IControlViewiLayoutControlView) const
pure virtual

Calculate the center point of the selection in View coordinates

Parameters
iLayoutControlViewThe IControlView to calculate.
Returns
Center Point of selection.
virtual PMRect ISelectionDataSuite::CalculateViewSelectionBounds (IControlViewiLayoutControlView) const
pure virtual

Calculate the bounds of the selection in View coordinates

Parameters
iLayoutControlViewThe IControlView to calculate.
Returns
Rect of selection. May return an empty rect (kEmptyRect).
virtual int32 ISelectionDataSuite::GetSelectionCount () const
pure virtual

Return a count for the selection.

Returns
  • For layoutCSB, this is a number of selected page items (with kStripStandoffs).
  • For textCSB, length of range of selection.
  • If unknown, or doesn't apply, returns -1.
virtual SysRgn ISelectionDataSuite::GetSelectionRgn (IControlViewiLayoutControlView) const
pure virtual

Calculate the SysRgn of the selection (view coordinates)

Parameters
iLayoutControlViewThe IControlView to calculate.
Returns
SysRgn of the selection.
virtual bool16 ISelectionDataSuite::HasItemSelected () const
pure virtual

Determine whether there's a selection associated with it.

Returns
kTrue if there is a selection; kFalse if there is not.
virtual bool16 ISelectionDataSuite::IsItemSelected (IPMUnknowntheItem) const
pure virtual

For the pageitem passed in, determine whether there's a selection associated with it. This routine is used more or less privately by the hit-test code, which needs (in SelectionHitTestHandler) to know whether an item hit is also selected. NOT MEANT TO REPLACE A PROPERLY- WRITTEN SUITE for handling selection tasks or queries.

Parameters
theItem
Returns
kTrue if item is selected, kFalse otherwise.