# eric3.Graphics.GraphicsUtilities

Module implementing some graphical utility functions.

### Classes

RecursionError | Unable to calculate result because of recursive structure.

### Functions

_buildChildrenLists | Function to build up parent - child relationships.
sort | Function to sort widgets topographically.

## RecursionError

Unable to calculate result because of recursive structure.

### Derived from

OverflowError, ValueError

### Methods

None

Up

## _buildChildrenLists

_buildChildrenLists(routes)

Function to build up parent - child relationships.

Taken from Boa Constructor.

routes
  list of routes between nodes

Returns:
  dictionary of child and dictionary of parent relationships

Up

## sort

sort(nodes, routes, noRecursion = 0)

Function to sort widgets topographically.

Passed a list of nodes and a list of source, dest routes, it attempts to create a list of stages, where each sub list is one stage in a process.

The algorithm was taken from Boa Constructor.

nodes
  list of nodes to be sorted
routes
  list of routes between the nodes
noRecursion
  flag indicating, if recursion errors should be raised

Returns:
  list of stages

Raises RecursionError:
  a recursion error was detected

Up