WOLFRAM

GUIKit Example: GraphEditor

The functionality provided by GUIKit has been superseded by the interface construction and controls functions native to the built-in Wolfram Language.

Code

Examples

This example demonstrates the benefit of supplementing Wolfram Language functionality with GUIKit user interface elements leveraging existing third-party graph model and editing libraries. GraphEdit widgets take advantage of the Graph expression supported by Combinatorica` and also SparseArray ArrayRules.

The user interface of the graph editing canvas allows you to do the following.

  • Create a new node (Ctrl+click or Right (alternate) click).
  • Create a new edge (Ctrl+click or Right (alternate) click inside a node).
  • Move selection (Drag selected nodes and edges).
  • Change selection (Drag, click, or Shift+click).
  • Delete currently selected nodes and edges (Del or Backspace key).
Matrix
Out[21]=21
Out[23]=23
SparseArray
Out[29]=29
Out[31]=31
Create
Out[33]=33
Out[34]=34

Here is another version run in a modeless session where you can interact with and change the displayed graph.

Out[35]=35
Out[37]=37