improved GoShape.Brush, when set to a simple LinearGradientBrush or PathGradientBrush, to automatically rescale and translate the brush as the shape is moved or resized; when set to a TextureBrush, it is automatically translated as the shape is moved
added GoShape.PenColor and GoStroke.HighlightPenColor and GoStroke.HighlightPenWidth properties
promoted GoStroke.PenWidth property to GoShape.PenWidth [but wide pens are only supported on GoStroke in GoDiagram Pocket]
added GoTextNode.Shape property, returning the Background as a GoShape, for convenience in modifying the shape
added GoComment.Shape property, returning the Background as a GoShape, for convenience in modifying the shape
GoDrawing and GoFigure: [but not in GoDiagram Pocket]
added GoDrawing class and GoFigure enum
added GoBasicNode(GoFigure) constructor and GoBasicNode.Figure property
added GoTextNode(GoFigure) constructor and GoTextNode.Figure property
improved GoIconicNode/GoSimpleNode/GoGeneralNode to create a GoDrawing instead of a GoImage as the Icon when the call to Initialize(ResourceManager, String, ...) has a null value for the "iconname" parameter
added GoIconicNode/GoSimpleNode/GoGeneralNode.Shape property, referring to the Icon as a GoShape when it is a GoDrawing
added GoIconicNode/GoSimpleNode/GoGeneralNode.Figure property, referring to the GoDrawing.Figure of the Icon when it is a GoDrawing
GoGeneralNode:
added GoGeneralNode.LeftPortLabelsInside and RightPortLabelsInside properties, to determine whether GoGeneralNodePortLabels should be inside the node, over the Icon
added GoGeneralNode.LeftPortsLabelSpacing and RightPortsLabelSpacing properties, to specify the spacing between GoGeneralNodePorts and their GoGeneralNodePortLabels
added GoGeneralNode.LeftPortsAlignment and RightPortsAlignment properties, to specify the positioning of ports outside/straddled/inside the Icon edge
Miscellaneous:
added GoRoundedRectangle.RoundedCornerSpots property, to specify which corners should be rounded
added GoText.EditableWhenSelected property to have GoText.OnSingleClick only start in-place editing when part of a selected object
added caching of Images by GoImage: from ImageList, from ResourceManager, from disk files, and from the web
added GoObject.GetContextMenuStrip method, for .NET 2.0 or later [but not in GoDiagram Pocket]
added GoDocument.TestSerialization method, to help debug serialization errors, e.g. during a copy-and-paste [not in GoDiagram Pocket]
XML binding:
added GoXmlBindingTransformer class, for declarative binding of XML attributes with object properties
GoLayoutForceDirected:
improved performance when starting with overlapping nodes, particularly for somewhat tree-like structured graphs
improved GoLayoutForceDirected to support laying out GoBalloon comments associated with nodes
GoLayoutLayeredDigraph
improved routing of Bezier-style or Orthogonal links
You can look at an old User's Guide to see the amount of effort required previously for a Rounded Rectangle with a gradient fill. You basically derive a class from GoRoundedRectangle, override the Brush getter to create the gradient brush, etc.
In 3.0:
GoBasicNode node = new GoBasicNode(); node.Shape = new GoRoundedRectangle(); node.Shape.FillHalfGradient(Color.Blue);
GoXmlBindingTransformer makes the reading and writing XML a lot easier. You create a GoXmlBindingTransformer for each class you want to store in XML, then add a binding for each element attribute you want to save.
Here’s some sample code from DoubleTree:
[code] // load the tree, as nodes and links, from an XML file
using (Stream stream = typeof(Form1).Assembly.GetManifestResourceStream(“DoubleTree.data.xml”)) {
// construct a prototype node
GoBasicNode protonode = new GoBasicNode();
protonode.Shape = new GoRoundedRectangle();
protonode.LabelSpot = GoObject.Middle;
protonode.Text = “”;
protonode.Label.Multiline = true;
GoXmlBindingTransformer tr = new GoXmlBindingTransformer("node", protonode);
tr.AddBinding("text", "Text");
tr.AddBinding("dir", "UserFlags");
tr.AddBinding("color", "Shape.BrushColor");
// construct a prototype link
tr.TreeStructured = true; // XML will consist of nested <node>s
GoLink protolink = new GoLink();
protolink.ToArrow = true;
tr.TreeLinkPrototype = protolink;
GoXmlReader xr = new GoXmlReader();
xr.AddTransformer(tr);
xr.RootObject = doc; // add nodes and links to the view's document
xr.Consume(stream);
}[/code]
Many of the sample applications have been updated to use GoXmlBindingTransformer. For example, note how StateCharter has been extended with all of the Pen/Brush/Font info from GoDrawing as well.
added GoText.EditableWhenSelected property to have GoText.OnSingleClick only start in-place editing when part of a selected object
Allows you to click on the label part of a node to select the node without the @%#&$^ thing going into edit mode. A second click on the label will start editing.
Jake will answer your release date question – it should be soon, since we’re just improving the documentation and waiting for any bugs to be reported on the public beta release.
I just wanted to post a screenshot of another neat new feature: controlling the relative positions of the ports and of their labels on a GoGeneralNode.
Of course the appearance of each port is controlled by the GoPort.Style property, as well as its Brush… and Pen… properties, since GoPort inherits from GoShape.
The first node was created by:
GoGeneralNode gn = new GoGeneralNode();
gn.Initialize(null, null, "PortsAlignment", "outside", 5, 5);
gn.Shape.Width = 50;
gn.Shape.BrushColor = Color.Gray;
goView1.Document.Add(gn);
The rest of the nodes just had their …PortsAlignment and …PortLabelsInside properties set appropriately, for both the Left side and the Right side.
We have also added the GoRoundedRectangle.RoundedCornerSpots property, so that you can specify which of the four corners should be rounded. Use any combination of the flags: GoObject.TopLeft, GoObject.TopRight, GoObject.BottomRight, GoObject.BottomLeft.
Here’s all sixteen possible combinations of values for RoundedCornerSpots:
Another useful feature is the GoPort.IsValidSingleLink property. When set, the user may draw at most one link connected to that port. It does not matter whether the link is going into or coming out of the port. If you want to limit the direction for which users can draw links, you can continue to set the GoPort.IsValidFrom or GoPort.IsValidTo properties.
This is the same as if one set the value of LimitedNodePort.MaxLinks = 1 or MultiPortNodePort.MaxLinks = 1, for those two example classes in Demo1.
Of course if you need the flexibility to allow a maximum number of links to be something greater than 1, you will still need to override GoPort.CanLinkFrom and GoPort.CanLinkTo, just as LimitedNodePort and MultiPortNodePort do.
Often people ask about how to animate motion along links. This sample demonstrates using a Timer, custom Painting by a GoLink, and changing the GoBasicNode.Shape.PenWidth.
Sometimes we do a little thing we don’t think much about, but it can be a huge help to people getting started with GoDiagram. One thing we did in 3.0 was to define Visual Studio Solution files for ALL of the demos in one solution.
Samples/Samples2.sln - VS 2005
Samples/Samples3.sln - VS 2008
SamplesVB/SamplesVB2.sln - VS2005
SamplesVB/SamplesVB3.sln - VS2008
Each of these opens all the samples in one easy operation. This makes it easy to search all the samples, and find (for example) that GoXmlBindingTransformer is used in Demo1, FlowCharter, OrgCharter, Planogrammer, ProtoApp and StateCharter.