FlowUnglue Event            Table of Contents

Flowchart Overview


 

This page discusses the following topics:

 

Introduction

What is a Sticky Point?
The Sticky Point Marker

How are Sticky Points Created?

When are Sticky Points Glued?

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

Additional Routines

 

Introduction

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.


What is a Sticky Point?

A sticky point is a point that:

 

 

 

The Sticky Point Marker

 

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.

 

IMAGES/stickies1.gif

 

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.

 

IMAGES/stickies2.gif

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.

 

When are Sticky Points Glued?

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:

 

How are Sticky Points Defined for each Shape Type?

Shape types currently have a single template describing the location of their default sticky points.

IMAGES/shapestickypoints.gif
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,

 

 

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.

 

 

Additional Routines

When searching this help documentation for routines that apply to the flow functionality of the control, keep in mind that routines beginning with..

 

 

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

Flowchart Routines



FlowUnglue Event

 

Last modified on: Tuesday, February 04, 2003