- Fixed bug in the
ForEachObject
method of the TSimpleGraph control. The method was always returning zero. - Renamed the
ContainsRect
method of the TGraphObject class toIntersectsWith
for sake of clarity. - Renamed the
TGraphNodeResizeEvent
event type toTGraphNodeNotifyEvent
. - Refactored the code.
- Improved the documentation.
- Fixed a bug in wrapping text (Thanks to Oleg).
- Fixed the bug causing some random characters appear on the caption of links.
- Improved positioning of the links' caption.
- Fixed the compatibility issues with Delphi XE2 and XE3.
- Added the
gloFixedAnchorStartPoint
andgloFixedAnchorEndPoint
options to theLinkOptions
property of the TGraphLink class. These options determine whether the hooked links should be anchored to a fixed point on the target object or not.
- Fixed code malfunction in changing the
Left
,Top
,Width
, andHeight
properties of the TGraphNode class inside aBeginUpdate
/EndUpdate
block.
- Re-entrance problem in repositioning of hooked objects is fixed (Thanks to cml0816).
- Problem in selecting horizontal and vertical links with one pixel width is fixed (Thanks to cml0816).
- Added the
Push
andPop
methods to the TGraphObjectList class.
- Fixed compatibility issue with Delphi 2009.
- Fixed bug in the
NormalizeBreakPoints
method of the TGraphLink class (Thanks to liu8670). - Fixed bug in the
ZoomRect
method of the TSimpleGraph control (Thanks to Choe, Cheng-Dae).
- Fixed the compatibility issue with Delphi 5.
- Fixed a bug in managing mouse, which was occurred when the
CommandMode
property was set tocmViewOnly
.
- Added the
OnObjectMouseEnter
andOnObjectMouseLeave
events to the TSimpleGraph control. - Added the
DragSource
andObjectAtCursor
properties to the TSimpleGraph control. - Added the
ResizeSelection
method to the TSimpleGraph control.
- Introduced the
OverlappedRect
global procedure. - Added the
Transparent
property to the TSimpleGraph control. - Added the
ChangeZoom
,ChangeZoomBy
, andAlignSelection
methods to the TSimpleGraph control. - Fixed a bug in drawing child controls.
- Fixed a bug in calculating range of scroll bars when the control had some aligned child controls.
- Fixed a bug in scrolling the graph by keyboard.
- Fixed a bug in the
Assign
method of the TGraphObjectList class.
- Introduced the TCompatibleCanvas class.
- Introduced
cmPan
as a new option for theCommandMode
property of the TSimpleGraph control. - Added the
OnMoveResizeNode
event to the TSimpleGraph control. - Fixed a bug in the
FindObjectAt
method of the TSimpleGraph control. - Fixed a bug in triggering some events while loading or clearing a graph.
- Added the
SourceRect
property to the TGraphConstraints class. - Fixed a bug in merging graphs.
- Introduced the TCanvasRecall class.
- Added the
UnionRect
andIntersectRect
global procedures. - Added the
ClipboardFormats
,DraggingObjects
, andDraggingBounds
properties to the TSimpleGraph control. - Added the
ScrollCenter
,ScreenToGraph
,GraphToScreen
,SnapPoint
,SnapOffset
,FindObjectByID
,ForEachObject
,SaveAsBitmap
,CopyToGraphic
,MergeFromStream
,MergeFromFile
, andInvalidateRect
methods to the TSimpleGraph control. - Added
OnObjectInitInstance
,OnObjectChange
,OnCanRemoveObject
,OnObjectRead
andOnObjectWrite
events to the TSimpleGraph control. - Added the
ID
,Data
,States
,HasCustomData
,VisualRect
,SelectedVisualRect
,Dependents
,DependentCount
,LinkInputs
,LinkInputCount
,LinkOutputs
, andLinkOutputCount
properties to the TGraphObject class. - Added the
CanDelete
,DragBy
, andInvalidate
methods to the TGraphObject class. - Added the missing
AssignTo
method to the TGraphObject class. - Added the
IsNode
class method to the TGraphObject class. - Added the
Create
constructor to the TGraphObject class. - Added the
CreateNew
constructor to the TGraphLink class. - Added the
CreateNew
constructor to the TGraphNode class. - Changed signature of the
BeginDrag
andDragTo
methods of the TGraphObject class. - Changed the return value of the
ConvertTo
method of the TGraphObject class. - Changed the TGraphObjectList class. The new implementation provides safe enumeration of the graph objects even when the list is changed during the enumeration.
- Changed the
OnObjectBeginDrag
andOnObjectEndDrag
events of the TSimpleGraph control, so that more information about the dragging object be available. - Changed zooming properties of the TSimpleGraph control. The current zoom range is between 5% and 36863%. Because of the new
OnMouseWheelDown
andOnMouseWheelUp
events of the control, the control does not change the zoom factor internally. Due to these changes,ZoomMin
,ZoomMax
, andZoomStep
properties of the control are removed. - Changed signature of the
FindObjectAt
method of the TSimpleGraph control. - Improved painting algorithm to increase speed and reduce CPU usage.
- Fixed a bug in moving a group of selected link objects.
- Fixed a bug in inserting links, which were occurring in Delphi 4 and 5.
- Fixed the bug about not triggering the
OnObjectUnhook
event of the TSimpleGraph control when unhooking was the result of an object deletion. - Fixed a bug in saving the
BackgroundMargins
property of the TGraphObject class. - Fixed a bug in the
MinimizeText
global procedure. In addition, three periods as ellipsis (...) is changed to a single character ellipses (…) if the font supports it. - Fixed a bug regarding positioning of the links.
- Fixed some minor other bugs.
- And, many other improvements in the stability and performance of the code.
To improve performance and functionality of the control, most part of the code is rewritten. This may lead to some breaking changes in your code.
Changes in the TSimpleGraph class:
- Added the
LockLinks
property. - Added the
OnObjectBeginDrag
andOnObjectEndDrag
events. - Added the
OnObjectHook
andOnObjectUnhook
events. - Added the
OnCanHookLink
event. - Replaced the
OnCanLinkNodes
event with theOnCanLinkObjects
event. - Replaced the
ToggleNodesAt
method with theToggleSelection
method. The new method is more flexible and detects objects that are either inside or intersecting with the selection rectangle. - Added an overload for the
FindObjectAt
method. - Changed
Bounds
parameter of theInsertNode
method fromPRect
toTRect
. - Replaced the
LinkNodes
method with theInsertLink
method. The new method has four overloads. - Added the
ClearSelection
method. - Renamed the
cmLinkNodes
value of theCommandMode
property tocmInsertLink
. - Removed the
IsValidLink
method. Use theCanLink
method of the TGraphLink class as substitute. - Changed some keyboard and mouse actions. As of now, each object has its own keyboard and mouse events.
- Added the missing constraints check while moving/resizing objects by keyboard.
Changes in the [TGraphObject] class:
- Added the
Options
property. - Added the
Dragging
property as read-only. - Added the
BeginDrag
,DragTo
, andEndDrag
methods. - Added the
HitTest
method. - Added the
ContainsRect
method. - Added the
Delete
method. - Added the
IsLocked
method. - Changed the
IsLink
property to class method.
Changes in the TGraphLink class:
- Improved functionality. Each endpoint of a link can be hooked to a graph object (node or link), and style of each endpoint is customizable. The new links can have breakpoints.
- Added the
Points
,PointCount
, andPolyline
properties. - Added the
TextPosition
andTextSpacing
properties. - Added the
LinkOptions
property. - Replaced the
Kind
property with theBeginStyle
andEndStyle
properties. - Replaced the
ArrowSize
property with theBeginSize
andEndSize
properties. - Replace the
FromNode
andToNode
properties with theSource
andTarget
properties. - Added the
CanMove
method. - Added the
AddPoint
,InsertPoint
,RemovePoint
,IndexOfPoint
,AddBreakPoint
, andNormalizeBreakpoints
methods for manipulating thePolyline
property. - Added the
IsFixedPoint
,IsHookedPoint
,HookedObjectOf
,HookedIndexOf
, andHookedPointCount
methods. - Added the
CanHook
,Hook
,Unhook
,CanLink
, andLink
methods for managing the hooking and linking actions. - Added the
Rotate
andScale
methods.
Changes in the TGraphNode class:
- Added the
NodeOptions
property. - Added the
BackgroundMargins
property. - Added the
CanMoveResize
method. - Removed the
QueryLinkTo
method. - Fixed clipped text problem that was occurring when graph was zoomed in.
- Introduced the Hexagonal node shape.
Changes in the TPolygonalNode class:
- Added the
Vertices
property as read-only.
Changes in the TRectangularNode
class:
- Changed the base class from the TGraphNode class to the TPolygonalNode class.
Changes in the TGraphConstraints class:
- Added the
WithinBounds
method. - Added the
ConfineOffset
method. - Changed signature of
ConfinePt
andConfineRect
methods. - Fixed malfunction of the
ConfineRect
method.
Changes in global procedures:
- Added the
NormalizeAngle
,EqualPoint
,ScalePoints
,ShiftPoints
,MakeSquare
,LineLength
,NearestPointOnLine
, andIntersectLinePolyline
functions. - Changed signature of the
IntersectLineRect
,IntersectLineEllipse
,IntersectLineRoundRect
, andIntersectLinePolygon
functions. - Changed the return type of the
DistanceToLine
function from integer to double. - Changed type of
DistanceFromThisPt
parameter of theNextPointOfLine
function from integer to double.
- Added the
OnZoomChange
event the TSimpleGraph control. - Fixed bug on calling the
OnResize
andOnCanResize
events of the TSimpleGraph control.
- Added the
FixedScrollBars
property to the TSimpleGraph control. - Applied constrains check on the new nodes inserted by mouse actions.
- Added the
ConfinePt
andConfineRect
methods to the TGraphConstraints class.
- Introduced the TGraphConstraints class.
- Replaced the
FreezeTopLeft
property of the TSimpleGraph control with theGraphConstraints
property. - Added missing
OnClick
andOnObjectClick
to the TSimpleGraph control. - Improved paint handler to remove memory limit on graph's bounds and speed up drawing.
- The TSimpleGraph control accepts child controls now.
- Added the
OnInfoTip
event to the TSimpleGraph control. - Introduced the
NearestPoint
global procedure. - Changed all
Extended
data types toDouble
to prevent "Invalid Floating Point Operation" exception. - Fixed the bug in calculating the end points of the links.
- Dropped the limit on the number of allowed polygon's vertices in the TPolygonalNode class.
- Added the
Layout
property to the TGraphNode class. - Added the
DrawOrder
property to the TSimpleGraph control. - Added
OnBeforeDraw
,OnAfterDraw
,OnObjectBeforeDraw
, andOnObjectAfterDraw
to the TSimpleGraph control. - Introduced the
WrapText
andMinimizeText
global procedures. - Displayed caption of objects as hint if the caption does not fit on the screen.
- Fixed issue with drawing caption of nodes for zoom factors other than 100%.
- Some minor tweaks.
- Added the
Hint
property to the TGraphObject class.
- Workaround a Windows API bug. If the view size of a metafile image is larger than the screen size, Windows API cannot clip it.
- Fixed bug in copy/paste functions.
- Fixed memory leak issue.
- Fixed the black border artifact, which was appearing during scroll.
- Fixed bug in calculating range of the scroll bars.
- Added the
MinNodeSize
property the TSimpleGraph control. - Added the
ArrowSize
to the TGraphLink class. - Some minor tweaks.
- Fixed bug related to the
FreezeTopLeft
property of the TSimpleGraph control.
- Fixed bug in moving/resizing overlapped objects.
- Added the
FreezeTopLeft
property to the TSimpleGraph control.
- Fixed the scrolling malfunction when the zoom was greater than 100%.
- Fixed a minor bug.
- Added the
VisibleBounds
property to the TSimpleGraph control. - Introduced the abstract TPolygonalNode class.
- Introduced the Triangular, Rhomboidal, and Pentagonal node shapes.
- Added some new global functions.
- Improved performance.
- Fixed the compiler error on Delphi 4.
- Added the
SelectionBounds
property to the TSimpleGraph control. - Added the
ZoomRect
,ZoomObject
,ZoomSelection
, andZoomGraph
to the TSimpleGraph control. - Added the missing
GraphToClient
method to the TSimpleGraph control. - Some minor tweaks.
- Introduced the zooming capabilities. As the result, the
Zoom
,ZoomMin
,ZoomMax
andZoomStep
properties are added to the TSimpleGraph control. - Added the
ClientToGraph
method to the TSimpleGraph control.
- Added the
Kind
property to the TGraphLink class. - Renamed the
LinkTypeTo
method of TGraphNode class toQueryLinkTo
. Also, improved its functionality.
- Smashed some bugs.
- Fixed the division by zero exception in calculating the distance of a point from a line.
- Added the
Background
property to the TGraphNode class.
- Added the
Print
andSaveAsMetafile
methods to the TSimpleGraph control. - Removed the
PaintTo
method of the TSimpleGraph control. - Add the
HideSelection
property to the TSimpleGraph control.
- Added the
Alignment
andMargin
properties to the TGraphNode class.
- Polished the code for the initial public domain release.
- Fixed issue in finding the intersection of a line and a round rectangle.
- Fixed bug in movement of links.
- Fixed the wrong behavior of the control when nodes were locked.
- Initial release.