## SimpleGraph 2.6 released!

Please post bug reports, feature requests, or any question regarding the DELPHI AREA projects here.

### SimpleGraph 2.6 released!

http://www.delphiarea.com/products/simplegraph/

v2.6 is the last release for 2.x update serries.

Probably there will be some fundamental changes in the next release of SimpleGraph.

Please post here whatever you wish for the next release of SimpleGraph, and of course bugs you may find in the current release.

Cheers
Kambiz

Kambiz

Posts: 2428
Joined: March 7th, 2003, 7:10 pm

Kambiz,

Thanks again for the usefull additions.

It is difficult to keep in touch with your pace!

Time to port.
Hans-Peter
HPW
Moderator

Posts: 236
Joined: February 25th, 2006, 10:19 am
Location: Germany

After compiled with 2.6 I set explicit to cmViewOnly,
but now I can still click on Nodes and edit.
This was not the case on <2.6.
Anything changed there?
Hans-Peter
HPW
Moderator

Posts: 236
Joined: February 25th, 2006, 10:19 am
Location: Germany

Some more obeservations to this:

Mouse access is on on cmViewOnly, so I can
select, drag size and edit the nodes.
But keyboard action is disabled.

??
Hans-Peter
HPW
Moderator

Posts: 236
Joined: February 25th, 2006, 10:19 am
Location: Germany

Always there's at least one more bug!
Kambiz

Kambiz

Posts: 2428
Joined: March 7th, 2003, 7:10 pm

I fixed the bug, and uploaded the update.

Thank you!
Kambiz

Kambiz

Posts: 2428
Joined: March 7th, 2003, 7:10 pm

Thanks for the quick fix!
Will try now.

Edit: works fine again!
Hans-Peter
HPW
Moderator

Posts: 236
Joined: February 25th, 2006, 10:19 am
Location: Germany

### ObjectAtCursor

> Specifies the last object found under the mouse cursor.

Could you please clarify what do you mean by "last object"?
Is it the one on the top of the pile or the one at the bottom?

Thanks
Fotis

kokkoras
Moderator

Posts: 317
Joined: March 12th, 2005, 11:19 pm
Location: Thessaloniki, Greece

### Re: ObjectAtCursor

> Specifies the last object found under the mouse cursor.

Could you please clarify what do you mean by "last object"?
Is it the one on the top of the pile or the one at the bottom?

Thanks

The value of property sets inside the mouse events. And, of course, it's the top most object.
Kambiz

Kambiz

Posts: 2428
Joined: March 7th, 2003, 7:10 pm

### Re: SimpleGraph 2.6 released!

Kambiz wrote:Probably there will be some fundamental changes in the next release of SimpleGraph.

Anything particular in mind?

Kambiz wrote:Please post here whatever you wish for the next release of SimpleGraph, and of course bugs you may find in the current release.

1. Grouping support.
2. Undo/Redo support
Fotis

kokkoras
Moderator

Posts: 317
Joined: March 12th, 2005, 11:19 pm
Location: Thessaloniki, Greece

What do you think about merging:

Code: Select all
TGraphLinkOptions = set of (gloFixedStartPoint, gloFixedEndPoint, gloFixedBreakPoints);TGraphNodeOptions = set of (gnoMovable, gnoResizable, gnoShowBackground);TGraphGroupOptions = set of (ggoMovable, ggoResizable);

in to a single set of options as:

Code: Select all
TGraphObjectOptions = set of (goLinkable, goSelectable, goMovable, goResizable, goShowCaption, goShowBackground);

In this case, for Links we have:

Code: Select all
goReszable <=> not (gloFixedStartPoint, gloFixedEndPoint, gloFixedBreakPoints)
Kambiz

Kambiz

Posts: 2428
Joined: March 7th, 2003, 7:10 pm

It seems more compact that way.

>> TGraphGroupOptions = set of (ggoMovable, ggoResizable);

So, you started!!

Are GraphGroups virtual objects (that is, with no other visualization apart from their member objects)? It would be nice (well, at least for me ) to be able to visualize it. For example, have a GraphNode associated with it.

In a second thought I think it serves the group idea well, because you can use it to establish move, resize, background coloring, ect. The only requirement is to give the group object mouse priority. Objects belonging to a group should not be selectable (although modern apps - OfficeXP - allows direct selection inside the group). I am not sure though if Groups should be handled in a special way from the core lib. Have you make up your mind?

EDIT: One question that puzzles me regarding groups is the relationship with its member objects. Where to put the associations? Store the member IDs in the group OR store the groupID in each member object?
Fotis

kokkoras
Moderator

Posts: 317
Joined: March 12th, 2005, 11:19 pm
Location: Thessaloniki, Greece

Althought a Group is a TGraphObject, but it doesn't draw its client.

Each group has a Members property as type TGraphObjectList. Also, each object has a Group property as type TGraphGroup.

Each group treats as a single object, and its members does not appear in Objects property of SimpleGraph. The members are accessible only by Members property of the group.

The objects within a group are selectable but they will be treated as locked. Therefore, the group members cannot be moved or resized individually.

As well as other object types, a new group class can be derived from TGraphGroup and be registered in the control.
Kambiz

Kambiz

Posts: 2428
Joined: March 7th, 2003, 7:10 pm

Kambiz wrote:Althought a Group is a TGraphObject, but it doesn't draw its client.

So, client objects of a group are absolutely positioned on the SimpleGraph canvas (NOT relative to the Group position). Also I understand that client objects of a group are painted like before. Correct?

Kambiz wrote:Each group has a Members property as type TGraphObjectList. Also, each object has a Group property as type TGraphGroup.

That's cross refference. No problem. It's flexible.

Kambiz wrote:Each group treats as a single object, and its members does not appear in Objects property of SimpleGraph. The members are accessible only by Members property of the group.

How about having an All list as member of the TSimpleGrph that has pointers to any object, apart from the groupNodes? I have seen this approach in DOM handling of TWebBrowser.

Kambiz wrote:The objects within a group are selectable but they will be treated as locked. Therefore, the group members cannot be moved or resized individually.

That's nice. That way we can pop-up a properties dialog and alter some properties (except X, Y, W and H - maybe).
Regarding positioning and resizing, is it hard to allow then and constrain them to the group object's bounding rect? (Are the old/current move and resize commands constrained?)

Kambiz wrote:As well as other object types, a new group class can be derived from TGraphGroup and be registered in the control.

Thats true!
Fotis

kokkoras
Moderator

Posts: 317
Joined: March 12th, 2005, 11:19 pm
Location: Thessaloniki, Greece

kokkoras wrote:
Kambiz wrote:Althought a Group is a TGraphObject, but it doesn't draw its client.

So, client objects of a group are absolutely positioned on the SimpleGraph canvas (NOT relative to the Group position). Also I understand that client objects of a group are painted like before. Correct?

"NOT relative to the Group position" is wrong. Seems you wrote this phrase before reading my entire post.

P.S. I mean ZOrder is relative. X and Y Positions are absolute.
Last edited by Kambiz on March 31st, 2006, 7:14 pm, edited 1 time in total.
Kambiz

Kambiz