# Path: godot/ui/api.py



import unittest
from enthought.traits.api \
    import HasTraits, ListInstance, Str, Instance, List, Button
from enthought.traits.ui.api \
    import View, Item, Group, ModelView, TreeEditor, TreeNode, HGroup
from godot.ui.api \
    import GraphEditor, GraphCanvas, GraphNode, GraphEdge
    target = Instance(DomainNode)

class DomainModel(HasTraits):
    nodes = List( Instance(DomainNode) )
    edges = List( Instance(DomainEdge) )
    other_nodes = List( Instance(OtherNode) )

tree_editor = TreeEditor(
    nodes = [
        TreeNode(node_for=[DomainModel], label="=Model"),
        TreeNode(node_for=[DomainModel], label="=Nodes", children="nodes",
            add=[DomainNode]),
        TreeNode(node_for=[DomainModel], label="=Edges", children="edges",
            add=[DomainEdge]),
        TreeNode(node_for=[DomainModel], label="=Other Nodes",
            children="other_nodes", add=[OtherNode]),
        TreeNode(node_for=[DomainNode], label="name"),
        TreeNode(node_for=[DomainEdge], label="name"),
        TreeNode(node_for=[OtherNode], label="name")
    ], editable=False
)

graph_editor = GraphEditor(
    canvas = GraphCanvas( node_children=["nodes", "other_nodes"],
                          edge_children=["edges"] ),
    nodes = [
        GraphNode( node_for = [DomainNode],
                   label    = "name",
                   dot_attr = {"shape": "circle"}
        ),

# Path: godot/ui/api.py



# Path: godot/test/editor_test_case.py
import unittest
from enthought.traits.api \
    import HasTraits, ListInstance, Str, Instance, List, Button
from enthought.traits.ui.api \
    import View, Item, Group, ModelView, TreeEditor, TreeNode, HGroup
from godot.ui.api \
    import GraphEditor, GraphCanvas, GraphNode, GraphEdge

    target = Instance(DomainNode)

class DomainModel(HasTraits):
    nodes = List( Instance(DomainNode) )
    edges = List( Instance(DomainEdge) )
    other_nodes = List( Instance(OtherNode) )

tree_editor = TreeEditor(
    nodes = [
        TreeNode(node_for=[DomainModel], label="=Model"),
        TreeNode(node_for=[DomainModel], label="=Nodes", children="nodes",
            add=[DomainNode]),
        TreeNode(node_for=[DomainModel], label="=Edges", children="edges",
            add=[DomainEdge]),
        TreeNode(node_for=[DomainModel], label="=Other Nodes",
            children="other_nodes", add=[OtherNode]),
        TreeNode(node_for=[DomainNode], label="name"),
        TreeNode(node_for=[DomainEdge], label="name"),
        TreeNode(node_for=[OtherNode], label="name")
    ], editable=False
)

graph_editor = GraphEditor(
    canvas = GraphCanvas( node_children=["nodes", "other_nodes"],
                          edge_children=["edges"] ),
    nodes = [
        GraphNode( node_for = [DomainNode],
                   label    = "name",
                   dot_attr = {"shape": "circle"}
        ),

        GraphNode( node_for = [OtherNode],