Class diagram

This class diagram describes the basic layout of Gaphas.

_images/gaphas-canvas.png

One-oh-one:

api/canvas

The main canvas class (container for Items)

api/items

Objects placed on a Canvas. Items can draw themselves, but not act on user events

api/solver

A constraint solver. Nice to have when you want to connect items together in a generic way.

api/view

Base class that renders content (paint()). The view is responsible for the calculation of bounding boxes. This information is stored in a quadtree data structure for fast access.

api/gtkview

A view to be used in GTK+ applications. This view class is interactive. Interaction with users is handled by Tools.

api/painters

Painters are the workers when it comes to painting items.

api/tools

Tools are used to handle user events (such as mouse movement and button presses).

api/aspects

Tools do not modify the items directly. They use aspects (not the AOP kind) as intermediate step. Since aspects are defined as generic functions, the behaviour for each diagram item type can be slightly different.

Tools

Several tools are used to make the overall user experience complete.

_images/tools.png