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

#include <IDrawDivider.h>

Inheritance diagram for IDrawDivider:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IDRAWDIVIDER }
 

Public Member Functions

virtual void Draw (const LineDescription &description, int32 lineIndex, IGraphicsPort *gPort, int32 flags)=0
 
virtual PMRect GetCollapseRect (const LineDescription &description, const PMRect &lineRect)=0
 
virtual int32 FindStoryIndexOfBar (PMPoint point)=0
 
virtual void DrawStoryBar (const PMRect &lineRect, const PMString &storyName, IGraphicsPort *gPort)=0
 
virtual PMString AssembleStoryLabel (int32 storyIndex)=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

This interface is responsible for drawing the various type of dividers in story and galley views. Currently, dividers are only drawn in the InCopy version of story/galley. There is a story bar divider at the top of each story displayed in the view and in galley view there is a divider for each frame. Note this does not handle the overset divider line that draws in story view. That is handled by an internal interface not exposed at this time.

Member Function Documentation

virtual PMString IDrawDivider::AssembleStoryLabel (int32 storyIndex)
pure virtual

For a given story index return the string to be displayed in the story bar (divider)

Parameters
storyIndex- index of story to get the label for
Returns
string that displays in the story divider bar at the top of each story in InCopy.
virtual void IDrawDivider::Draw (const LineDescriptiondescription,
int32 lineIndex,
IGraphicsPortgPort,
int32 flags 
)
pure virtual

Draw a divider line. Dividers are a line in the story galley view and have a textline associated with them

Parameters
description- a line description describing the divider
lineIndex- the index of the line where the divider will draw
gPort- port to draw the divider into
flags- standard flags (same as page item draw routines). Used to tell if printing or not.
Returns
none
virtual void IDrawDivider::DrawStoryBar (const PMRectlineRect,
const PMStringstoryName,
IGraphicsPortgPort 
)
pure virtual

Draw a story divider.

Parameters
lineRect- location and dimensions of story divider to draw
storyName- name of the story divider (can be calculated with AssembleStoryLabel()).
gPort- port to draw the divider into
Returns
none
virtual int32 IDrawDivider::FindStoryIndexOfBar (PMPoint point)
pure virtual

Return the index of a story of the related story bar if the point is in a story bar area if point is not. Used for hit testing.

Parameters
point- routine will check if this point intersects a story divider bar.
Returns
returns the story index of a divider if it intersects with the point or -1 if no intersection.
virtual PMRect IDrawDivider::GetCollapseRect (const LineDescriptiondescription,
const PMRectlineRect 
)
pure virtual

Return a rectangle of the collapse rect portion of a story bar divider.

Parameters
description- a line description describing the divider
lineRect- rectangle describing the entire divider
Returns
rectangle describing the bounding box of the close icon in the story bar divider