The new GraphLink class and Mouse issue (SimpleGraph)

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

The new GraphLink class and Mouse issue (SimpleGraph)

Postby Kambiz » February 12th, 2006, 11:55 pm

Hi guys,

As you already know, the new GraphLink can be without Source and/or Target linked objects, and with some optional breakpoints.

The enduser should be able to apply the following changes to a GraphLink object using mouse:-

  • Move a breakpoint/endpoint.
  • Add a new breakpoint on a line of polyline.
  • Add new breakpints while moving an endpoint.
  • Link an endpoint to another object while moving the endpoint.
  • Remove a breakpoint/endpoint.
  • Move entire polyline, or if the polyline is linked at one or two endpoints, moving all other breakpoints.
What's the problem? I stuck with how to choose mouse and key modifiers to manage listed actions.

By the way, please consider that:
  • Shift+Click is used to toggle selection of an object.
  • Ctrl+Drag is used to toggle "Snap To Grid" mode.
  • RightClick brings up the popup menu.

I'll be glad to hear your comments and suggestions regarding this issue.

Greetings,
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2405
Joined: March 7th, 2003, 7:10 pm

Postby elias » February 13th, 2006, 12:19 pm

Here's my suggestions:

-<Previous>
1)When I select one or several links, start points, end points, and existing breakpoints markers are automatically showed.
2)When I select one link, start point, end point, and existing breakpoints markers are automatically showed; when I select several links, just start points and end points markers are showed.

-Move a breakpoint/endpoint.
As always: I Drag an Drop. Case of end/start points, I need a target to link; case of breakpoints, I don't.

-Add a new breakpoint on a line of polyline.
1)Press [Ins] when MouseDown over the link > BreakPoint appears at cursor. Note: At present, the way a node appears when pressing [Ins] it's, I thing, quite rare.
2)Compatible with the previous point: In the PopUp menu that appears when I do click with right button, add the option "Add Breakpoint" when cursor is over the link; so if I choose the option, in the point where I had the cursor before moving over the PopUp menu appears the breakpoint.
3)...Another posibility, maybe a little skillful: When adding is possible, I click down over the link; if I move the mouse a determinated distance (5 pixels, for example) the breakpoint appears and mode changes to move link. Since that I can't move links like I do with nodes, I would use same action to create and move breakpoints.

-Add new breakpoints while moving an endpoint.
Sorry, I think I don't understand what you mean.
...But If you mean adding breakpoints like making a path over the graph, I guess it should depend on a extra external option... [a property, I wanted to say]

-Link an endpoint to another object while moving the endpoint.
Just when I drop the end point over a possible tarject (node or maybe link (That's a great idea, I think)) It links.

-Remove a breakpoint/endpoint.
1)Press [Del] when MouseDown over the breakpoint > BreakPoint disappears.
2)Compatible with the previous point: In the PopUp menu I add the option "Remove Breakpoint" when cursor is over a breakpoint; so if I choose the option, the breakpoint where I had the cursor disappears.
3)... I don have a corresponding Idea with the another 3) point; excepting... When I move the breakpoint and the link appears like without breakpoint... it desappears :)

-Move entire polyline, or if the polyline is linked at one or two endpoints, moving all other breakpoints.
1) :) Couldn't you use any other key (I think you could add a published property at simplegraph to make relations between keys and actions) :)
2)It could depend on a external option. [a property, I wanted to say]
Last edited by elias on February 13th, 2006, 6:16 pm, edited 1 time in total.
elias
Senior Member
Senior Member
 
Posts: 90
Joined: November 8th, 2005, 12:09 pm
Location: Galicia, Spain

Postby elias » February 13th, 2006, 6:14 pm

More comments.

There are lots of link classes that could be derived from a node with "breakpoints"; Lots of arc-links, and all kind of line-links draw using multiple functions may be wrote, I think, just having the posibility of having breakpoints, and setting a maximum (and maybe minimum) number of them. So, it's posible the term "breakpoints" could be not appropiated.
elias
Senior Member
Senior Member
 
Posts: 90
Joined: November 8th, 2005, 12:09 pm
Location: Galicia, Spain

Re: The new GraphLink class and Mouse issue (SimpleGraph)

Postby kokkoras » February 14th, 2006, 12:02 am

I suggest an "edit mode" for links which is activated
by, say, Ctrl+Shift+click on the link. As soon as this mode
is activated all breakpoints/endpoints should be visible
(without been selected). Then:

Move a breakpoint/endpoint.
= click and drag the point

Link an endpoint to another object while moving the endpoint.
=by droping it over the other object.

Add a new breakpoint on a line of polyline.
=Shift+click on the desired point of the link

Remove a breakpoint/endpoint.
=by selecting it with click and then pressing delete

Add new breakpoints while moving an endpoint.
=Ctrl+click the endpoint to get into "sticky" mode where
the endpoint is sticked on the mouse without pressing the
mouse button, add new breakpoints by clicking around.
Esc stops the "sticky" mode.

Move entire polyline, or if the polyline is linked at one or two endpoints, moving all other breakpoints.
=by selecting it from a non breakpoint/endpoint and draging


Fotis
User avatar
kokkoras
Moderator
Moderator
 
Posts: 317
Joined: March 12th, 2005, 11:19 pm
Location: Thessaloniki, Greece

Postby elias » February 14th, 2006, 8:24 am

More comments:

-Add new breakpoints while moving an endpoint.
Now that I understand what you mean, I suggest this:
*Click in source in Link Mode: Start Adding Link
*Click wherever excepting a target: New marker and continue drawing
*Click on a Target: End Adding Link.

Now I remember one of your latests posts:
Kambiz wrote:Under Construction: Having line object, or in the other hand a link without need of any linked object.

1)What do you want the right button for, at now? use it to finish the construction of link without having a tarject...Mmmh? Note that when you push the right button inserting a node or a link appears the PopUp menu, being the present node/link not inserted; It has not very much sense ¿Don't you think?
2)If you want to keep the present behavior on editing links, then:
*you click and drag: you see the making link, like always.
*you click at right button: Breakpoint appears suddenly; you can continue.
*you do mouse up: feature of link is finished; having or not a tarject
(This 2) is the solution I like...)

Truely: I think you should make a properties like these:
KeySnapToGrid: List of keys [Ctrl],[shift],[Alt]........Including [None] (Default: Ctrl)
KeyReSelect: Idem (Default: Shift)
KeyZoomSelection: Idem (Default Alt)
So I could change or Deactivate any of the keys
elias
Senior Member
Senior Member
 
Posts: 90
Joined: November 8th, 2005, 12:09 pm
Location: Galicia, Spain

Postby kokkoras » February 14th, 2006, 10:02 am

I would like to mention that most (if not all) of my suggestions follow the common practice found in drawing progs. See for example the paths in PHotoshop.

Also, the right click should be reserved for the pop-up event. If there is an "edit mode" then there is definetly a spare "right click" to use ;-)
User avatar
kokkoras
Moderator
Moderator
 
Posts: 317
Joined: March 12th, 2005, 11:19 pm
Location: Thessaloniki, Greece

Postby elias » February 14th, 2006, 11:06 am

THIS IS THE WARRR!!!
I would like to mention that most (if not all) of my suggestions follow the common practice found in drawing progs.

Common software interfaces have not to be the same. Can be changed to find easier or intuitiver ways to work.
Also, the right click should be reserved for the pop-up event.

OK. And what about using Key [Ins] again instead of right button?...And [Del] to remove the last breakpoint added in the process (until the number-of-breakpoints=0)? :)

And... what does Kambiz think about all this? :)
elias
Senior Member
Senior Member
 
Posts: 90
Joined: November 8th, 2005, 12:09 pm
Location: Galicia, Spain

Postby kokkoras » February 14th, 2006, 11:21 am

elias wrote:THIS IS THE WARRR!!!

I think the war is in your mind :lol:
elias wrote:Common software interfaces have not to be the same. Can be changed to find easier or intuitiver ways to work.

If it is not the same then it is not "common". Ever heard of CUA (Common User Access)? It's not M$, it is common. On the other hand, I will agree with you on the ability to be able to adjust the keys in the way you like.
Bottom Line: CUA as default with ability to change the settings. BUT, since Kambiz is doing it, I will accept his settings with no complains. My opinion was asked and I just replied.

elias wrote:OK. And what about using Key [Ins] again instead of right button?...And [Del] to remove the last breakpoint added in the process (until the number-of-breakpoints=0)? :)


I can not quite follow what you mean about the use of the [Ins] key. Use it instead of right click?? On the other hand, deleteting the last added breakpoint with [Del] will be great.

Fotis
User avatar
kokkoras
Moderator
Moderator
 
Posts: 317
Joined: March 12th, 2005, 11:19 pm
Location: Thessaloniki, Greece

Postby elias » February 14th, 2006, 11:24 am

WAR WAR WAARRR!!!!!
elias
Senior Member
Senior Member
 
Posts: 90
Joined: November 8th, 2005, 12:09 pm
Location: Galicia, Spain

Postby kokkoras » February 14th, 2006, 11:26 am

elias wrote:WAR WAR WAARRR!!!!!


:lol: :evil: :lol: :evil: :lol: :evil: :twisted: :lol: :twisted: :lol: :lol:
User avatar
kokkoras
Moderator
Moderator
 
Posts: 317
Joined: March 12th, 2005, 11:19 pm
Location: Thessaloniki, Greece

Postby Kambiz » February 14th, 2006, 3:03 pm

Now, it is time to coalite to war agains me, because I'm going in this way:- :D
  • RightClick and DoubleClick doesn't do their own default behaviors if an object is dragging.
  • Dragging an edge or caption moves the object entirly.
  • Alt+Click on a point, deletes the point.
  • Alt+Click on an edge, inserts a breakpoint at the clicked point. For convenience, Alt+Drag does the same.
  • Dragging a point (eighter endpoint or breakpoint) moves the point. While dragging the point, right click insteats a new breakpoint.
  • If an endpoint drops on an object, the link is established.
Providing an easy to customize mouse and keyboard handler using properties needs lot of time that I cannot afford it, sorry.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2405
Joined: March 7th, 2003, 7:10 pm

Postby kokkoras » February 14th, 2006, 3:44 pm

Kambiz wrote:RightClick and DoubleClick doesn't do their own default behaviors if an object is dragging.

How is that possible? to drag and at the same time do double click :?

Kambiz wrote:Dragging an edge or caption moves the object entirly.

Reasonable

Kambiz wrote:Alt+Click on a point, deletes the point.

you mean while the points are visible (i.e. the lisk is selected)?

Kambiz wrote:Alt+Click on an edge, inserts a breakpoint at the clicked point. For convenience, Alt+Drag does the same.

And what happens when the dragging goes on? Moves the new inserted point?

Kambiz wrote:Dragging a point (eighter endpoint or breakpoint) moves the point. While dragging the point, right click insteats a new breakpoint.

...as expected

Kambiz wrote:If an endpoint drops on an object, the link is established.

...same here

Kambiz wrote:Providing an easy to customize mouse and keyboard handler using properties needs lot of time that I cannot afford it, sorry.

...no objection. U R the boss.
User avatar
kokkoras
Moderator
Moderator
 
Posts: 317
Joined: March 12th, 2005, 11:19 pm
Location: Thessaloniki, Greece

Postby Kambiz » February 14th, 2006, 6:11 pm

kokkoras wrote:
Kambiz wrote:RightClick and DoubleClick doesn't do their own default behaviors if an object is dragging.

How is that possible? to drag and at the same time do double click :?.

The new TGraphObject class provides three public methods as:
  • function BeginDrag(const Pt: TPoint; HT: DWORD): Boolean; virtual;
  • function DragTo(const Pt: TPoint; GridSnap: Boolean): Boolean; virtual;
  • function EndDrag: Boolean; virtual;
Because of that, it is possible to have double click when an object is dragging. Only the dragging object receives the mouse and keyboard events.

By the way, you have to consider that in the new implementation of TGraphObject, each object is responsible for handling its own mouse and keyboard events.

kokkoras wrote:
Kambiz wrote:Alt+Click on a point, deletes the point.

you mean while the points are visible (i.e. the lisk is selected)?

Yes, when the object is selected.

kokkoras wrote:
Kambiz wrote:Alt+Click on an edge, inserts a breakpoint at the clicked point. For convenience, Alt+Drag does the same.

And what happens when the dragging goes on? Moves the new inserted point?

Yes, the new inserted breakpoint will be dragged.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2405
Joined: March 7th, 2003, 7:10 pm

Graphlink rotation and scaling

Postby P_G » February 15th, 2006, 9:09 am

This is probably not the right thread, so feel free to move my question to the appropriate place:
It would be very useful to implement a technique for rotating and scaling a selected polyline-link (in case it's not connected to an object). I noticed a TSimplegraph-procedure to rotate an array of TPoint. so how about this feature?

P_G
P_G
Senior Member
Senior Member
 
Posts: 51
Joined: June 14th, 2004, 11:13 am
Location: Germany

Re: Graphlink rotation and scaling

Postby Kambiz » February 15th, 2006, 9:17 am

P_G wrote:This is probably not the right thread, so feel free to move my question to the appropriate place:
It would be very useful to implement a technique for rotating and scaling a selected polyline-link (in case it's not connected to an object). I noticed a TSimplegraph-procedure to rotate an array of TPoint. so how about this feature?


OK, I'll add the appropriate methods for this purpose.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2405
Joined: March 7th, 2003, 7:10 pm

Next

Return to DELPHI AREA Products

Who is online

Users browsing this forum: No registered users and 2 guests

cron