Sequence Chart Studio  svn HEAD revision
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Static Public Member Functions | List of all members
CShapeUtils Class Reference

#include <shapeutils.h>

Collaboration diagram for CShapeUtils:
Collaboration graph

Static Public Member Functions

static double GetShapeBeginX (Visio::IVShapePtr shape)
 
static double GetShapeEndX (Visio::IVShapePtr shape)
 
static double GetShapeBeginY (Visio::IVShapePtr shape)
 
static double GetShapeEndY (Visio::IVShapePtr shape)
 
static double getShapeCell (Visio::IVShapePtr shape, const _bstr_t &propertyName, VisUnitCodes units=visPageUnits)
 
static void GlueBeginToPos (Visio::IVShapePtr what, Visio::IVShapePtr where, const MscPoint &pos)
 
static void GlueBeginToShape (Visio::IVShapePtr what, Visio::IVShapePtr where)
 
static void GlueEndToPos (Visio::IVShapePtr what, Visio::IVShapePtr where, const MscPoint &pos)
 
static void GlueBeginConector (Visio::IVShapePtr connector, Visio::IVShapePtr coreg, const MscPoint &point)
 
static void GlueEndConector (Visio::IVShapePtr connector, Visio::IVShapePtr coreg, const MscPoint &point)
 
static void MarkShape (Visio::IVShapePtr shape, ShapeColor color=SC_RED)
 
static void UnmarkShape (Visio::IVShapePtr shape)
 
static void ChangeShapeColor (Visio::IVShapePtr shape, MscElementPtr element)
 
static void ChangeShapeColor (Visio::IVShapePtr shape, MscColor color)
 
static MscColor ExtractShapeColor (Visio::IVShapePtr shape)
 
static Visio::IVShapePtr GetCoregionAt (Visio::IVShapePtr shape, double yPos)
 
static void swapShape (Visio::IVShapePtr &shape1, Visio::IVShapePtr &shape2)
 
static MsgConnectedEndpoints getConnectedEndpoints (Visio::IVShapePtr shape)
 
static Visio::IVShapePtr duplicateShape (Visio::IVShapePtr shape, TShapeType newShapeType)
 
static double getCoregionHeight (Visio::IVShapePtr coregion, VisUnitCodes units=visPageUnits)
 
static void setCoregionWidth (Visio::IVShapePtr coregion, double newWidth, VisUnitCodes units=visPageUnits)
 
static bool isPointInCoregionArea (const MscPoint &point, Visio::IVShapePtr instShape)
 
static bool isPointOnCoregionSide (const MscPoint &point, Visio::IVShapePtr coregShape)
 
static bool isPointOnInstancesLine (const MscPoint &point, Visio::IVShapePtr instShape, VisUnitCodes units=visPageUnits)
 
static bool isPointOnCoregion (const MscPoint &point, Visio::IVShapePtr instShape)
 
static bool isPointBehindShape (const MscPoint &point, Visio::IVShapePtr instShape)
 
static CoregionSides wherePointOnCoregion (const MscPoint &point, Visio::IVShapePtr instShape, Visio::IVShapePtr &coregShape)
 
static std::vector
< Visio::IVShapePtr > 
getConnectedShapes (Visio::IVShapePtr shape, TShapeType connectedShapeType)
 
static bool isMessageOnGivenPoistion (double posY, Visio::IVShapePtr instShape)
 
static MsgDirection getMsgDirection (Visio::IVShapePtr msgShape)
 
static bool unglueShape (Visio::IVShapePtr fromShape, const _bstr_t &fromCell, Visio::IVShapePtr toShape)
 
static bool replaceConnectionPoints (Visio::IVShapePtr vsoShape)
 

Detailed Description

A utility class for functionality on a Visio Shape.

Definition at line 29 of file shapeutils.h.

Member Function Documentation

void CShapeUtils::ChangeShapeColor ( Visio::IVShapePtr  shape,
MscElementPtr  element 
)
static
void CShapeUtils::ChangeShapeColor ( Visio::IVShapePtr  shape,
MscColor  color 
)
static
Visio::IVShapePtr CShapeUtils::duplicateShape ( Visio::IVShapePtr  shape,
TShapeType  newShapeType 
)
static
MscColor CShapeUtils::ExtractShapeColor ( Visio::IVShapePtr  shape)
static
MsgConnectedEndpoints CShapeUtils::getConnectedEndpoints ( Visio::IVShapePtr  shape)
static
std::vector< Visio::IVShapePtr > CShapeUtils::getConnectedShapes ( Visio::IVShapePtr  shape,
TShapeType  connectedShapeType 
)
static

Get shapes connected to another shape

Parameters
shapeshape the other shapes are connected to
connectedShapeTypefilter for connected shapes (e.g. coregions, messages, etc.)

Definition at line 302 of file shapeutils.cpp.

References get_shape_type().

Referenced by CMessageSnapping::coregionTreatment(), CMessageSnapping::getIntersectionWithInstance(), isPointBehindShape(), isPointInCoregionArea(), isPointOnCoregion(), CMessageSnapping::jumpShape(), and wherePointOnCoregion().

Visio::IVShapePtr CShapeUtils::GetCoregionAt ( Visio::IVShapePtr  shape,
double  yPos 
)
static

Get a coregion connected to shape, crossing yPos.

Parameters
shapethe shape on which to find a coregion
yPosthe Y-position relative to the page in internal units
Returns
pointer to the coregion found or NULL if there is no such coregion

Definition at line 205 of file shapeutils.cpp.

References EPSILON, get_shape_type(), and ST_BMSC_COREGION.

Referenced by CDocumentMonitor::DrawMessage().

double CShapeUtils::getCoregionHeight ( Visio::IVShapePtr  coregion,
VisUnitCodes  units = visPageUnits 
)
static
MsgDirection CShapeUtils::getMsgDirection ( Visio::IVShapePtr  msgShape)
static
static double CShapeUtils::GetShapeBeginX ( Visio::IVShapePtr  shape)
inlinestatic
static double CShapeUtils::GetShapeBeginY ( Visio::IVShapePtr  shape)
inlinestatic
static double CShapeUtils::getShapeCell ( Visio::IVShapePtr  shape,
const _bstr_t &  propertyName,
VisUnitCodes  units = visPageUnits 
)
inlinestatic
static double CShapeUtils::GetShapeEndX ( Visio::IVShapePtr  shape)
inlinestatic

Definition at line 34 of file shapeutils.h.

Referenced by CDocumentMonitor::getInstancesInBetween().

static double CShapeUtils::GetShapeEndY ( Visio::IVShapePtr  shape)
inlinestatic
void CShapeUtils::GlueBeginConector ( Visio::IVShapePtr  connector,
Visio::IVShapePtr  coreg,
const MscPoint point 
)
static
void CShapeUtils::GlueBeginToPos ( Visio::IVShapePtr  what,
Visio::IVShapePtr  where,
const MscPoint pos 
)
static
void CShapeUtils::GlueBeginToShape ( Visio::IVShapePtr  what,
Visio::IVShapePtr  where 
)
static

Definition at line 94 of file shapeutils.cpp.

Referenced by CDrawingVisualizer::visualize_hmsc().

void CShapeUtils::GlueEndConector ( Visio::IVShapePtr  connector,
Visio::IVShapePtr  coreg,
const MscPoint point 
)
static
void CShapeUtils::GlueEndToPos ( Visio::IVShapePtr  what,
Visio::IVShapePtr  where,
const MscPoint pos 
)
static
bool CShapeUtils::isMessageOnGivenPoistion ( double  posY,
Visio::IVShapePtr  instShape 
)
static
bool CShapeUtils::isPointBehindShape ( const MscPoint point,
Visio::IVShapePtr  instShape 
)
static
bool CShapeUtils::isPointInCoregionArea ( const MscPoint point,
Visio::IVShapePtr  instShape 
)
static
bool CShapeUtils::isPointOnCoregion ( const MscPoint point,
Visio::IVShapePtr  instShape 
)
static
bool CShapeUtils::isPointOnCoregionSide ( const MscPoint point,
Visio::IVShapePtr  coregShape 
)
static

Check if point lies on some side of given coregion

Definition at line 428 of file shapeutils.cpp.

References MscPoint::get_x(), MscPoint::get_y(), getCoregionHeight(), and getShapeCell().

Referenced by CDrawingExtractor::create_coregion_area().

bool CShapeUtils::isPointOnInstancesLine ( const MscPoint point,
Visio::IVShapePtr  instShape,
VisUnitCodes  units = visPageUnits 
)
static
void CShapeUtils::MarkShape ( Visio::IVShapePtr  shape,
ShapeColor  color = SC_RED 
)
static
bool CShapeUtils::replaceConnectionPoints ( Visio::IVShapePtr  vsoShape)
static
void CShapeUtils::setCoregionWidth ( Visio::IVShapePtr  coregion,
double  newWidth,
VisUnitCodes  units = visPageUnits 
)
static

Definition at line 296 of file shapeutils.cpp.

References CPageUtils::ConvertUnits().

Referenced by CDrawingVisualizer::visualize_bmsc().

void CShapeUtils::swapShape ( Visio::IVShapePtr &  shape1,
Visio::IVShapePtr &  shape2 
)
static

Definition at line 223 of file shapeutils.cpp.

Referenced by CMessageJump::jump(), and CMessageSnapping::snap().

bool CShapeUtils::unglueShape ( Visio::IVShapePtr  fromShape,
const _bstr_t &  fromCell,
Visio::IVShapePtr  toShape 
)
static
void CShapeUtils::UnmarkShape ( Visio::IVShapePtr  shape)
static

Definition at line 200 of file shapeutils.cpp.

References MarkShape(), and SC_BLACK.

Referenced by CDocumentMonitor::OnMenuMessageSequence().

CoregionSides CShapeUtils::wherePointOnCoregion ( const MscPoint point,
Visio::IVShapePtr  instShape,
Visio::IVShapePtr &  coregShape 
)
static

The documentation for this class was generated from the following files:

SourceForge.net Logo
Generated on Fri Jan 15 2016 16:26:58 for Sequence Chart Studio by  doxygen