Flowchart Overview
This page discusses the following topics:
What
is a Sticky Point?
The
Sticky Point Marker
How are Sticky Points Created?
When are Sticky Points Unglued?
How are Sticky Points Defined for Each Shape Type?
Special Behavior for Group Shapes
The Flow Action - Turning Flow Capability On and Off
Flipper CAD Controls' flowchart functionality (or 'flow' for short) gives shapes the ability to glue to other shapes via 'sticky points'. When a glued shape is moved, it updates all of the shapes glued sticky points on that shape, giving the visual effect of 'connected shapes'. This functionality allows the developer to create solutions for applications that require orginizational charts, work flow diagrams, state transition diagrams (finite automata), pathing, network diagrams, etc..
The underlying principle behind the flow functionality is the sticky point.
A sticky point is a point that:
Has a unique number for the shape it resides on. An array of sticky point numbers for a shape can be returned with ShapeFlowGetStickyPoints.
Resides on a shape, and is visually represented by a marker type. Its position is in world coordinates and can be retrieved with ShapeFlowStickyPointGetX and ShapeFlowStickyPointGetY.
Has a sex (male or female). A male sticky point is one that can be glued to at most one female sticky point, while a female can have any number of male sticky points glued to it. ShapeFlowStickyPointGetSex returns the sex of a sticky point. ShapeFlowStickyPointSetSex can change the sex of sticky points for certain shape types.
Can be glued (connected) to other sticky points. As the location of a sticky point changes, it notifies all glued sticky points of its new location. In order for a shape to be elligible to glue, its flow action must be turned on (see below). The glued status of a sticky point is returned by ShapeFlowStickyPointIsGlued (also, the glued status for an entire shape is ShapeFlowIsGlued).
A sticky point is visually represented by a marker. At this time, female sticky markers are circles, while male sticky markers are plus symbols. In the future, more marker types will be added.
Below is a picture of the default markers.

Similar to shapes, the color state, size and style of the sticky point markers can be changed. Below is a picture of the markers with altered color states and sizes.
Visit the Colors
Overview to learn more about color states of the control. A listing of the properties for sticky marker
color states is provided at the end of this topic (i.e. FlowMaleStickyBrushBg..).
The FlowShowMaleStickyPoints and FlowShowFemaleStickyPoints properties control the visibility of the sticky point markers.
How are Sticky Points Created?
The FlowInitMode property allows shapes to have sticky points automatically created at the time shapes are added to the control (either programmatically or with the mouse).
Sticky points can be explicitly created (either at the shape level with ShapeFlowCreateStickyPoints,
for all shapes on a layer with LayerFlowCreatestickyPoints,
or for all shapes on the control with CadFlowCreateStickyPoints).
When a shape is created with the mouse, the sticky points are create after the ShapeNumberAdded
event is fired (see Order
of Events).
Special Behavior for Group Shapes
When a regular shape with glued stickies is moved, the males glued to that's shapes female cause the attached
shape to resize (for instance, a rectange with a line glued to it will resize the line).
Group shapes with glued males have a different behavior in order to preserve the size of the shapes
within a group. Group shapes move a delta rather than sizing when any of its males are pulled
by the females they are glued to.
Sticky points can be glued interactively (via the mouse).
Whenever moving a single shape with sticky points, if any sticky point on that shape falls within the FlowAperture of an elligible glue point, the shape will snap to that point (firing the FlowSnap event). The actual glue occurs when the left mouse button is released (firing the FlowGlue event).
A shape will also snap to an elligible glue point if the sticky point being sized falls within the flow aperture of an elligible glue point. Note that this is different from the behavior of moving a shape, because when sizing, only that point being sized will snap to sticky points, while when moving a shape, all sticky points of the shape are elligible to snap to sticky points.
Note that snapping to elligible glue points with the mouse only occurs when a single shape is in the selection buffer. When multiple shapes are selected and being moved, they are temporarily inelligible for gluing.
Sticky points can also be glued programmatically using the following methods:
FlowConnectShapes Connects two shapes with a newly created shape.
FlowConnectStickyPoints Connects two sticky points with a newly created shape.
ShapeFlowGlueWithinAperture Glues a shape to any elligible sticky points that are within the flowchart aperture.
ShapeFlowStickyPointGlue.Glues the sticky point from one shape to another.
When are Sticky Points Unglued?
Sticky points are unglued when:
Deleting a glued shape (ShapeDelete).
Deleting a sticky point (ShapeFlowStickyPointDelete).
When moving (dragging) a glued shape, the males of that shape unglue.
When sizing a glued shape, if point being sized is a sticky male point, it unglues.
Programmatically, via the ShapeFlowUnglue and ShapeFlowStickyPointUnglue methods.
When a shape looses visibility via the CadAction, LayerAction or ShapeAction properties it unglues.
How are Sticky Points Defined for each Shape Type?
Shape types currently have a single template describing the location of their default sticky points.
Note: female sticky point marks are circles and male sticky point marks are crosses. Line and
polyline shapes have a female sticky point placed at the midway point for, based on the perimeter of the
shape. A point shape is a female point. A text shape has a single male at its alignment and justification
point (see the point
table). Group shapes will inherit the sticky of the shapes it contains.
The following shapes do not have sticky points at this time: arcs, chords and pie slices.
The Flow Action - Turning Flow Capability On and Off
The ability for the sticky points to snap/glue to other sticky points depends on the flow action. There are three different levels of flow action, the cad level (CadActionFlow), the layer level (LayerActionFlow), and the shape level (ShapeActionFlow). By default, the flow action properties are true.
When false, a shape can no longer snap/glue to sticky points, however it will keep its current glued sticky points (if any).
The precedence for flow action is CadActionFlow, LayerActionFlow, then ShapeActionFlow. For example,
If CadActionFlow is false, then all shapes on the control have flow disabled.
If LayerActionFlow is false for layer number 1, then all shapes on that layer will have flow disabled.
If ShapeActionFlow is false for shape number 7, then that shape will have flow disabled.
Note that the sticky point markers are still visible even if flow is disabled. The FlowShowMaleStickyPoints and FlowShowFemaleStickyPoints properties control the visibility of the sticky point markers.
When searching this help documentation for routines that apply to the flow functionality of the control, keep in mind that routines beginning with..
'Flow..' affect the control in general
'CadFlow..' affect all shapes on the control
'LayerFlow..' affect all shapes on a speicified layer
'ShapeFlow..' affect a single specified shape.
The following is a list of routines not yet mentioned in this topic.
CadFlowClearStickyPoints, LayerFlowClearStickyPoints, ShapeFlowClearStickyPoints For clearing the sticky points of shapes.
CadFlowStickyPointGetNearest
Returns the shape and sticky point number of the one closest to the passed X, Y coordinate that satisfies
a criteria.
FlowAperture
Sets or returns the aperture distance for how close a sticky point needs to be before it will snap to
an elligible mate.
FlowAreShapesOnSamePath
Returns whether or not two shapes are on the same flow path.
FlowFemaleStickyBrushBg,
FlowFemaleStickyBrushFg,
FlowFemaleStickyBrushStyle,
FlowFemaleStickyBrushMode,
FlowFemaleStickyPenFg,
FlowFemaleStickyPenStyle,
FlowFemaleStickyMarkerSize,
FlowMaleStickyBrushBg,
FlowMaleStickyBrushFg,
FlowMaleStickyBrushStyle,
FlowMaleStickyBrushMode,
FlowMaleStickyPenFg,
FlowMaleStickyPenStyle,
FlowMaleStickyMarkerSize
affect the color state and size of the sticky point markers.
ShapeFlowGetGluedShapes
Returns an array of shapes glued to a specified shape.
ShapeFlowIsGlued
Returns the glue status of a specified shape
ShapeFlowStickyPointCount
Returns the number of sticky points a specified shape has based on a criteria.
ShapeFlowStickyPointGetGlued
Returns an array of sticky points that are glued to the specified sticky point.
ShapeFlowStickyPointGetNearest
Returns the number of the shapes' sticky point closest to the passed X, Y coordinate that satisfies a
criteria.
ShapeFlowStickyPointIsValid
Returns whether or not a sticky point exists for a given shape.
See Also
![]() |
Last modified on: Tuesday, February 04, 2003