Module nodenet.wxnodenetctrl

Module Summary

class NodeNetCtrl:
    def __init__(self, parent, id, pos=(-1, -1), size=(-1, -1), style=0, name='NodeNetCtrl')
Displays and allows editing of a NodeNet.
class NodeNetDragWindow:
    def __init__(self, parent, id, nodes=[], pos=(-1, -1), size=(-1, -1), style=0, name='NodeNetDragWindow')
A wxWindows window which will display a collection of Node objects.

Classes

The NodeNetCtrl Class

NodeNetCtrl(parent, id, pos=(-1, -1), size=(-1, -1), style=0, name='NodeNetCtrl')

Displays and allows editing of a NodeNet. An application which is interested in changes to the NodeNet managed by the NodeNetCtrl should use the EventHook objects found in the NodeNet to add callbacks for the events it is interested in.

Method Summary

get_node_net()
Gets the node net being managed by this control.
set_node_net(node_net)
Sets the node net being managed by this control.

get_node_net

get_node_net()

Gets the node net being managed by this control.

set_node_net

set_node_net(node_net)

Sets the node net being managed by this control.

The NodeNetDragWindow Class

NodeNetDragWindow(parent, id, nodes=[], pos=(-1, -1), size=(-1, -1), style=0, name='NodeNetDragWindow')

A wxWindows window which will display a collection of Node objects. Each Node can be dragged from the NodeNetDragWindow and dropped on a NodeNetCtrl window. When this happens, the node will be added to the network in the NodeNetCtrl at the location it was dropped. NodeNetDragWindow uses the XML methods in the Node object to transfer the Node to the NodeNetCtrl.

Parameters:

parent -- parent wxWindow

id -- wxWindow id

nodes -- list of nodes to display

Method Summary

add_node(node)
Adds a node to the drag window.
get_nodes()
Returns a list of all nodes in the drag window.
remove_node(node)
Removes a node from the drag window.

add_node

add_node(node)

Adds a node to the drag window.

get_nodes

get_nodes()

Returns a list of all nodes in the drag window.

remove_node

remove_node(node)

Removes a node from the drag window.