Crate pn_editor_core
source · [−]Expand description
This contains the logic for editing petri nets.
In order to use it, you need to implement the Renderer
trait for your renderer.
Then you can create a new Editor
.
Then you need to call the main events input
, render
and update
repeatedly as specified.
In order to call input
, you need to create an InputEvent
.
Structs
This represents the editor you want to use to edit and display petri nets.
Settings for the sizes of the nodes.
Enums
Represents from which type of element to which type of element an arrow should be drawn.
The view mode indicates how the petri net is displayed.
Traits
The renderer trait is used to display the elements of the petri net in a specific way.
Every drawing method starts with draw_
and takes the context
as t he first argument.
The positions are always given relative to the center without zoom applied.
Zoom has to be applied by the renderer.