flowui

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package flowui implements an interactive graph renderer.

Index

Constants

This section is empty.

Variables

View Source
var ErrNodeNotLinkable = errors.New("node cannot be linked by user")

Functions

This section is empty.

Types

type FlowchartView

type FlowchartView struct {
	// contains filtered or unexported fields
}

func NewFlowchartView

func NewFlowchartView(l *flow.Layout) (*FlowchartView, *gtk.DrawingArea, error)

NewFlowchartView constructs a new flowchart display widget, reading nodes and position information from the provided layout.

func (*FlowchartView) AddOrphanedNode

func (fcv *FlowchartView) AddOrphanedNode(n flow.Node)

AddOrphanedNode inserts a new node into the layout and view, unconnected to any other nodes.

func (*FlowchartView) GetSelection

func (fcv *FlowchartView) GetSelection() interface{}

type Model

type Model struct {
	// contains filtered or unexported fields
}

Model encapsulates the state of the flowchart.

func (*Model) Draw

func (m *Model) Draw(da *gtk.DrawingArea, cr *cairo.Context, animStep int64)

func (*Model) HitTest

func (m *Model) HitTest(p hit.Point) hit.TestableObj

func (*Model) MoveTarget

func (m *Model) MoveTarget(t hit.TestableObj, x, y float64)

func (*Model) OnUserLinksPads

func (m *Model) OnUserLinksPads(startPad, endPad *circPad) error

func (*Model) SetTargetActive

func (m *Model) SetTargetActive(target hit.TestableObj, a bool)

func (*Model) TargetPos

func (m *Model) TargetPos(t hit.TestableObj) (x, y float64)

type UserLinkable

type UserLinkable interface {
	flow.Node
	LinkPads(toNode flow.Node, fromPad, toPad flow.Pad) (flow.Edge, error)
}

UserLinkable describes a node which can have pads linked to another by the user performing a drag from one node to another.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL