InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
XDocBkImageSizerCmd Class Reference
Inheritance diagram for XDocBkImageSizerCmd:
CommandICommandIPMUnknown

Public Member Functions

 XDocBkImageSizerCmd (IPMUnknown *boss)
 
- Public Member Functions inherited from Command
 Command (IPMUnknown *boss)
 
virtual void GetName (PMString *name) const
 
virtual void SetName (const PMString &newName)
 
virtual bool16 IsNameRequired () const
 
virtual const UIDListGetItemList () const
 
virtual const UIDListGetItemListReference () const
 
virtual void SetItemList (const UIDList &newItemList)
 
virtual void DoImmediate (bool16 isDynamic=kFalse)
 
virtual void LWDoImmediate ()
 
virtual void DoDynamic ()
 
virtual CommandState GetCommandState () const
 
virtual bool16 IsDone () const
 
virtual bool16 CanJoin (const ICommand *pNewCmd) const
 
virtual void SetCreatorID (int32 creatorID)
 
virtual int32 GetCreatorID () const
 
virtual bool16 LowMemIsOK () const
 
virtual const TargetGetTarget () const
 
virtual Undoability GetUndoability () const
 
virtual void SetUndoability (Undoability newUndoability)
 
virtual void SetActive (bool16 isActive)
 
virtual bool16 IsActive () const
 
virtual bool8 IsLWProcessed () const
 

Protected Member Functions

virtual void Do ()
 
virtual PMStringCreateName ()
 
void CollectInlinesInStory (const UIDRef &textModelUIDRef, K2Vector< UIDRef > &outList)
 
void ResizeInlineGraphicToFit (const UIDRef &textModelUIDRef, const UIDRef &inlineBossUIDRef)
 
PMReal CalcColumnParcelWidth (const UIDRef &textModelUIDRef, const UIDRef &uidRef) const
 
PMReal CalcInlineGraphicWidth (const UIDRef &uidRef) const
 
- Protected Member Functions inherited from Command
virtual void DoNotify ()
 
virtual void SetCommandState (CommandState state)
 
virtual void SetUpTarget ()
 
virtual void PreVerify (CommandState state)
 
virtual void PostVerify (CommandState state)
 
void SetTarget (const Target &newTarget)
 
void SetTarget (PredefinedTarget newTarget)
 
void SetTarget (IDataBase *db)
 

Additional Inherited Members

- Public Types inherited from Command
enum  CommandDummyArg { kItemList = 1 }
 
- Protected Types inherited from Command
enum  PredefinedTarget { kSessionWorkspaceTarget, kSessionTarget }
 
- Protected Attributes inherited from Command
UIDList fItemList
 

Detailed Description

Implementation of command to resize inlines to fit within the column that contains them. It leaves ones that are smaller than this width unaffected.

Constructor & Destructor Documentation

Binds the C implementation class onto its ImplementationID making the C code callable by the application * XDocBkImageSizerCmd::XDocBkImageSizerCmd (IPMUnknownboss)

Constructor.

Parameters
bossIN interface ptr from boss object on which this interface is aggregated.

Member Function Documentation

PMReal XDocBkImageSizerCmd::CalcColumnParcelWidth (const UIDReftextModelUIDRef,
const UIDRefuidRef 
) const
protected

Get the width of the column into which this inline is being placed

Parameters
textModelUIDRefIN text model of interest
uidRefIN inline thing, we're going to query for IInlineData on this to find out where in the story the inline is
Returns
PMReal composed width of column
PMReal XDocBkImageSizerCmd::CalcInlineGraphicWidth (const UIDRefuidRef) const
protected

Method to calculate width to scale inline to if required

Parameters
uidRefIN the image whose width we'll get from its IGeometry
Returns
PMReal the current width before scaling this image
void XDocBkImageSizerCmd::CollectInlinesInStory (const UIDReftextModelUIDRef,
K2Vector< UIDRef > & outList 
)
protected

Find all the in-lines in given story

Parameters
textModelUIDRefIN text model containing the inlines of interest
outListOUT parameter holding the inline boss objects
PMString * XDocBkImageSizerCmd::CreateName (void )
protectedvirtual
See Also
Command::CreateName

Reimplemented from Command.

void XDocBkImageSizerCmd::Do (void )
protectedvirtual
See Also
Command::Do

Implements Command.

void XDocBkImageSizerCmd::ResizeInlineGraphicToFit (const UIDReftextModelUIDRef,
const UIDRefinlineBossUIDRef 
)
protected

Resize an inline in given text model (maybe, if it needs to be scaled to fit in column)

Parameters
textModelUIDRefIN text model in which inline is to be scaled to fit
inlineBossUIDRefIN boss object of type kInlineBoss