diagram toolbar

## Step 1

At first it is neccessary to define icons for new elements. This icons will be used in treeview.
To do this the following line has to be added into the .config file:

resource.element.{element_unique_name}.icon.small = "{path_to_icon}"

Where:

element_unique_name | Any word which will be used to refere to this new element type

This line has to be added for all new elements that will be used in this diagram.

For example:
resource.element.sdEntity.icon.small = "Treeviews/tv-sdEntity.gif"
resource.element.sdAttribute.icon.small = "Treeviews/tv-attrib.gif"

## Step 2

Toolbar consructs through the defining of it's button. Each button presents one new element. Definition of each button looks at least like:

diagram.toolbar.button.{diagram_unique_name}.{element_toolbar_name} =
\ node = createNode("{element_unique_name}")
diagram.toolbar.button.{diagram_unique_name}.{element_toolbar_name}.icon = "{path_to_icon}"

Where:

element_toolbar_name | Unique name of toolbar button
path_to_icon | Path to the icon of button
node | Variable that keeps new element
createNode | Internal function that creates new node (entity). To create new association (link) use "createLink" function.
diagram.toolbar.button | Predefined construction to define new button on toolbar.

For example:
diagram.toolbar.button.SampleDiagram.Entity =
\ node = createNode("sdEntity")
diagram.toolbar.button.SampleDiagram.Entity.icon = "SampleDiagram/"

See the complete sample config file.