New Features?

Are there any features you would like to see in GoDiagram that it can’t do, or that it can’t do easily, or that it can do easily but you would prefer be the default or implemented by setting some property?
I notice that a number of people have asked for features that are present in drawing packages, particularly Visio, given the Microsoft-oriented nature of GoDiagram. Re-implementing Visio has never been a goal of GoDiagram of course, and I find that GoDiagram’s style (and implementation and packaging and licensing) are more suited to most applications than Visio is. However, if your users are accustomed to Visio, it does make sense that they may ask for an interactive style that is like Visio instead of like GoDiagram.
So what would you like to see in future versions of GoDiagram?

IMHO, GoDiagram is the best (and only useful) API for doing anything in the Visio “like” arena. Just the ability to connect and map programmable visual elements to complex database functions has opened up a graphic metaphor that is not easily acheivable with any other tool.
Since you are asking for input - at the top of list of my list are custom API functions for GoSubgraphs. SubGraphs are I think a stuinning feature of Go. Right now the Go documentation says essentially that the developer should “figure the rest out” about subgraphs - but I think we are all trying to do all the same very common things (drag/drop into and out of subgraphs, dynamically attach and resize to nodes/ports, relayout the subgraph etc. Enhancement of the SubGraph object with more functionality to do some of these things would be very much welcomed. I’d take a shot at suggesting a some wish list functions to the object but I’m to much into on the job training on learning Go itself plus getting to know how to ergonimically employ subgraphs and the required aesthetics, perhaps a user with a little more experience can help out here… annnnnnnnnd… while I’m on the wishlist subject - scalable vector graphics - thats it… and our diagrams become more visually detailed when scaled in manners very similar to Visio.
Thanks for asking!
Joe Licata

Well since you asked… ;)
Here are things on my wish list:

  1. Enhance GoSubGraphs (Although I wrote some it already)
    1.1. Drag In & Out, Provide scrolling with clipping, provide control of the collapsed image/layout and link angles.
    1.2 Provide a specific example for GoSubGraph with all the details.
    1.3 Shadowed property has no effect on GoSubGraph
  2. Better grid control - Have major and minor ticks, allow snap to major, minor or both
  3. Object handles
    3.1 Allow custom handles - not just the built in selecting & resizing.
    3.2 Provide new built in handles like - Rotation handles
  4. Allow free rotation on objects
  5. Enable opacity for all objects (I am not sure it is not already supported, I just saw opacity for GoSubGraphs).
  6. Links
    6.1 Intersecting links (“Jumps”) - I know that the next version will have them, but allow customization of the shape of the jump and enable jumps for all links - bezier too.
    6.2 Add support for “rigid” links. A rigid link should be non elastic (like an iron bar) and when dragging any objects connected to either side, the objects should maintain relative position and move together. The TreeApp example has a similar behavior, but it is not part of the framework. A mixture of rigid and non-rigid links is allowed and can be really cool and useful.
    6.3 Support links that have zero ports, one port or two ports attached to it. I actually implemented the one side port my self using a “virtual port”, and it is not so hard to code, but IMO it should be part of the framework.
    For now, this is all I can think of…

I really like this feedback. A few comments:
SVG–this is on our list of things to do someday, since we’ve already done that in JGo. The Java community seems to be a lot more SVG oriented than the Microsoft community, so there’s hardly been any requests for SVG support in GoDiagram.
GoSubGraph enhancements and examples–I hear everyone…
Major/minor grid lines–that’s a new one for us. I have been intending to make a lot of improvements with grids, but there hasn’t been much demand expressed (yet).
Custom object handles–you can do this today, but I guess there aren’t any examples of this in the kit. Basically you just need to override GoObject.AddResizeHandles and GoObject.DoResize. Maybe an example could combine this with a custom spot that specified where to position the custom resize handle. Also I don’t think there’s any example of custom non-resize handles, implementing IGoHandle.
Rotated objects–I can give you some old code that supports rotated text. The Shaper example does rotation of polygons and strokes.
Opacity–that has always been supported on all objects, because .NET colors support Alpha; just create a Brush or Pen using partially transparent colors. It’s a separate property on GoSubGraph just for convenience.
Link jump-overs–what kind of customization do you want? Right now there is none, and jump-overs only work for vertical or horizontal stroke segments; doing Beziers would be more difficult.
Unconnected links–this will be much better supported in the next version.

</>Would be nice to get an explorer like selection like I’ve just mentioned before.
And as also mentioned: Rotatable labeled on GoLabeledLinks especially.
Would like to see an implementation to make it easier to draw
something like a standalone-resistor, i.e. a link with an object at the middle. or it could also be combined as an object with two links, which mustn’t be connected to anything else.

Sometimes Copying is difficult.
Searched for Days for a line preventing me from copying custom-created GoObjects. Don’t know the reason until today.

Classes containing colors or menus can’t be serialized. Even preinitializing them would not help.
You have to mark them as non-serialized.
Then it works without a problem.
This is why you would have to set these properties yourself anytime you copy objects, by ctrl-c and ctrl-v and so on…

I’ve had to implement tree node-structures like the organigramm in visio. If you move the parent node all childs have also to be moved relatively considered to the parent.

If you move that node to the left as far as you can, the others will be shifted right out of the window.

There is no feature to prevent this till yet.

I’ve tried to implement it myself, but failed.</>

I’m curious as to what you would like for the “standalone-resistor” link? Is the problem that you don’t know how to override GoLink.CalculateStroke in order to plot the stroke points to get the appearance you want?
As you have already discovered, objects that have fields that are of type System.Windows.Forms.Menu (or any other Control) are not serializable. But you shouldn’t have any problems with fields of type System.Drawing.Color.
Could you explain what you want for “tree node-structures”? How is this different from what is in TreeApp?

It is just to do something like an electronical layout program.
So they should be capable of “standalone”, i.e. a link (with an object in the middle) would be a resistor for example. Than they could be connected together. And other links could be wires.
You know?

Just thought of doing such a project. Or maybe this could be done by overriding CalculateStroke, just as you are proposing.

Just to summarize, with respect to GoDiagram version 2.2:
There have been lots of improvements to GoSubGraph.
We’re working on SVG support for the following release.
You’ve always been able to define custom selection handles and specify opacity/translucency. You can copy the sample code for rotating polygons; for rotating text ask me for some sample code.
Link jump-overs are supported for Orthogonal links.
You can easily implement “rigid” links yourself in 2.1 or later (by overriding GoToolDragging.ComputeEffectiveSelection).
There’s better support for partially connected or disconnected links. See the new MovableLinkApp sample.

I would like to see the ability to add events to the image tag as described in the forum thread “OnClick Event”. While i was able to override the existing OnMouseUp event, it may be beneficial for some users to have the ability to add their own events without having to override Go generated ones… Makes for cleaner code and adds a little more flexibility.

I would like to review some code for rotation of objects.
Where can I download the Shaper example?
Thank you.

The Shaper example is a GoDiagram Pocket sample–if you have installed the GoDiagram Win kit, you will also have the GoDiagram Pocket samples (and binaries and documentation).
For text and images: