DELPHI AREA
MESSAGE BOARD
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   FavoritesFavorites   Watched TopicsWatched Topics     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

SimpleGraph 2.6 released!
Goto page Previous  1, 2, 3  Next
 
Post new topic   Reply to topic   printer-friendly view    DELPHI AREA Forum Index -> DELPHI AREA's Products
View previous topic :: View next topic  
Author Message
Kambiz
Administrator


Joined: 07 Mar 2003
Posts: 1044
Location: Tehran, Iran

PostPosted: 31/03/06 19:10    Post subject: Reply with quote

kokkoras wrote:
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?)


The bounding rectangle of a group is union of bounding rectangle of its members.

By moving/resizing a group, its members move/resize relatively.

_________________
Kambiz
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kokkoras
Senior Member


Joined: 12 Mar 2005
Posts: 250
Location: Thessaloniki, Greece

PostPosted: 31/03/06 19:40    Post subject: Reply with quote

Kambiz wrote:
kokkoras wrote:
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.


Let me put it straight: If I have a group with TopLeft say, (100,100) and inside it a rectNode 10 pixels lower and 10 pixels righter. What are the coordinates of the topLeft of the rectNode? Are they (10, 10) that is relative, OR (110, 110), that is absolute?

In either way, can I somehow (by code) reposition an object inside the group? If I have more that 2 nodes inside the group then there is enough space to move one of them.

Idea: why don't you use another simplegraph canvas to provide dynamic edit of the group? When editing is required, copy the inner of the group to a new instance of simplegraph, allow editting and when exiting this group edit mode, copy back the inner stuff to the original simplegraph. OK, it's complex. It was just an idea. Rolling Eyes

edit: I think the idea above is beyond the scope of the library and should be implemented by the app developer.

_________________
Fotis
Back to top
View user's profile Send private message Visit poster's website
kokkoras
Senior Member


Joined: 12 Mar 2005
Posts: 250
Location: Thessaloniki, Greece

PostPosted: 31/03/06 20:00    Post subject: Reply with quote

This may sound biased but I think that it would be nice to be able to size the group bounding box. Use the union of the inner bounding boxes as the default bounding box for the group, but allow the programmer to resize it by code.

Thinking it again, I believe that the group should be just like a rectangleNode with the extra property of a list that holds the inner objects. The group should be paint before the inner objects and should get priority on the mouse clicks. This approach allows the group to also have a label, its own color and/or background image, margins, etc. etc. It would be also easy to drag'n'drop nodes inside the group.

I guess you agree with the functionality but I am not sure on the coding requirements to implement it.

What do you think?

EDIT: Idea What about adding groups inside a group? Maybe you should consider the current graphNode as the groupNode (that is, provide it with the ability to hold possible clild objects, even other groups). Then..... Question

Well, it's bloody complex Confused . We need well defined specs before putting the hands on it.

_________________
Fotis
Back to top
View user's profile Send private message Visit poster's website
Kambiz
Administrator


Joined: 07 Mar 2003
Posts: 1044
Location: Tehran, Iran

PostPosted: 31/03/06 20:42    Post subject: Reply with quote

It's a long time you are looking for a container node, I know. Smile

My implementation of group, is a group not a container. If you want to draw something as the background of the group, you can:

  1. Subclass TGraphGroup and override its Draw method.
  2. Use OnObjectBeforeDraw event and paint background of the group.
  3. Add a non-selectable node as the first member, and restrict bounding rectangle of other members to bouding rectangle of the node. Actually, there's no need to apply any restriction. It's because user cannot move or resize individual objects.
As I already mentioned in my previous post, user (and program) can move/ resize the group. In addition, size and position of each member can be changed by code.

_________________
Kambiz
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kokkoras
Senior Member


Joined: 12 Mar 2005
Posts: 250
Location: Thessaloniki, Greece

PostPosted: 31/03/06 20:57    Post subject: Reply with quote

U R the boss. Groups are fine and contribute to my plans. Very Happy What is the time there?

edit: I heard on the news about an earthquake there. It also shakes frequently here in Greece.
edit2: TContainerNode = TGroupNode + UI Laughing

_________________
Fotis
Back to top
View user's profile Send private message Visit poster's website
Kambiz
Administrator


Joined: 07 Mar 2003
Posts: 1044
Location: Tehran, Iran

PostPosted: 31/03/06 21:12    Post subject: Reply with quote

The new government has revoked "daylight saving" at least for this year. Rolling Eyes Therefore, relative to Greece, if you are in daylight saving, I'm half hour ahead. Otherwise, one and half hour.

Iran is on a fault and time to time a tough Earthquake happens. Sad

_________________
Kambiz
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kokkoras
Senior Member


Joined: 12 Mar 2005
Posts: 250
Location: Thessaloniki, Greece

PostPosted: 31/03/06 21:27    Post subject: Reply with quote

Kambiz wrote:
The new government has revoked "daylight saving" at least for this year. Rolling Eyes

Exclamation I thought this was out of consideration.

Kambiz wrote:
Therefore, relative to Greece, if you are in daylight saving, I'm half hour ahead. Otherwise, one and half hour.

You are 1/2 hour ahead.

_________________
Fotis
Back to top
View user's profile Send private message Visit poster's website
kokkoras
Senior Member


Joined: 12 Mar 2005
Posts: 250
Location: Thessaloniki, Greece

PostPosted: 01/04/06 18:18    Post subject: Reply with quote

Kambiz, will it be possible to have a group inside other group? Just curious, no request.
_________________
Fotis
Back to top
View user's profile Send private message Visit poster's website
Kambiz
Administrator


Joined: 07 Mar 2003
Posts: 1044
Location: Tehran, Iran

PostPosted: 01/04/06 22:16    Post subject: Reply with quote

I think I've already answered this question. Question Yes, nested groups are allowed. Each group considers as a single object.

By the way, as you suggested, I added AllObjects, NodeObjects, LinkObjects, and GroupObjects properties. Objects, SelectedObjects, and DraggingObjects properties are kept untouched.

_________________
Kambiz
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kokkoras
Senior Member


Joined: 12 Mar 2005
Posts: 250
Location: Thessaloniki, Greece

PostPosted: 01/04/06 23:47    Post subject: Reply with quote

Kambiz wrote:
I think I've already answered this question.

You are right Embarassed Sorry!

Kambiz wrote:
By the way, as you suggested, I added AllObjects, NodeObjects, LinkObjects, and GroupObjects properties. Objects, SelectedObjects, and DraggingObjects properties are kept untouched.

That's nice. Thanks.

_________________
Fotis
Back to top
View user's profile Send private message Visit poster's website
kokkoras
Senior Member


Joined: 12 Mar 2005
Posts: 250
Location: Thessaloniki, Greece

PostPosted: 03/04/06 00:07    Post subject: Reply with quote

This is something discussed in another thread a few versions Laughing ago.
It is about the ability to hide the labels of links (well, this could be apllied to all nodes as well). My position was the following:

1. Have a showLabel boolean property for each link (and node).
2. Have a showLabels boolean property at the simpleGraph level.

The first will enable us to display only specific lebels. The second one will allow us to teporarily switch on/off all the labels _without_ affecting the individual objects' showLabel state.

So a label for an object is displayed if:
a) object.showLabel=true
b) simpleGraph.showLabels=true

And a question about groups: do they have a label?

_________________
Fotis
Back to top
View user's profile Send private message Visit poster's website
Kambiz
Administrator


Joined: 07 Mar 2003
Posts: 1044
Location: Tehran, Iran

PostPosted: 03/04/06 15:47    Post subject: Reply with quote

1. goShowCaption value of TGraphObject.Options is provided for this purpose.
2. It easily can be achived by a call to ForEachObject to change Options property.
3. Each object has the Text property, but group doesn't display it.

_________________
Kambiz
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kokkoras
Senior Member


Joined: 12 Mar 2005
Posts: 250
Location: Thessaloniki, Greece

PostPosted: 03/04/06 16:05    Post subject: Reply with quote

Kambiz wrote:
1. goShowCaption value of TGraphObject.Options is provided for this purpose.
ok.
Kambiz wrote:
2. It easily can be achived by a call to ForEachObject to change Options property.
This is not the same. I am talking about temporarily hidding ALL the labels without affecting the value of the property. If I do it in the way you mentioned then there is no way back.
Kambiz wrote:
3. Each object has the Text property, but group doesn't display it.
I guess it's hard to display it.

For what you have said so far, it seems that the group object is not far from considering it as an ordinary TSimpleObject. If this is the case then why don't you provide it with a conditionaly visible boundary, color, etc. and have a code section for them in the draw/paint method of the component?

_________________
Fotis
Back to top
View user's profile Send private message Visit poster's website
kokkoras
Senior Member


Joined: 12 Mar 2005
Posts: 250
Location: Thessaloniki, Greece

PostPosted: 13/04/06 10:04    Post subject: Reply with quote

Kambiz, have you consider the #2 feature above? Is it clear why this is a kernel feature? It's only a property in the lib and an IF statement with 2 conditions before drawing the label.

Let me give you an example.

Lets say I have 100 objects and 40 of them have their label visible while the rest 60 have their label hidden. So far so good. Now suppose I want to print the graph without labels. In current lib I have to set 40 objects/labels to hidden, print the graph, then bring back those 40 labels (if ever remember which they were).

In the suggested 2 level approach, you call the canvas properties, set the global flag to hidden, print, and finaly restore the global flag to visible.

Regards

_________________
Fotis
Back to top
View user's profile Send private message Visit poster's website
Kambiz
Administrator


Joined: 07 Mar 2003
Posts: 1044
Location: Tehran, Iran

PostPosted: 13/04/06 10:34    Post subject: Reply with quote

OK, I'll add this property.
_________________
Kambiz
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    DELPHI AREA Forum Index -> DELPHI AREA's Products All times are GMT
Goto page Previous  1, 2, 3  Next
Page 2 of 3

Add to favorites

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group