Skip to main content

Crate egui_graphs

Crate egui_graphs 

Source

Structs§

CenterGravity
CenterGravityParams
DefaultEdgeShape
DefaultNodeShape
This is the default node shape which is used to display nodes in the graph.
DrawContext
Contains all the data about current widget state which is needed for custom drawing functions.
Edge
Stores properties of an edge that can be changed. Used to apply changes to the graph.
EdgeProps
Stores properties of an Edge
EdgeShape
Shapes produced for one edge, including its body and optional arrow tip.
EdgeShapeBuilder
Extra
A configured instance of an extra force (on/off + parameters).
FruchtermanReingold
FruchtermanReingoldState
FruchtermanReingoldWithExtras
FruchtermanReingoldWithExtrasState
Graph
Wrapper around petgraph::stable_graph::StableGraph compatible with super::GraphView. It is used to store graph data and provide access to it.
GraphView
Configures and renders an interactive graph.
GraphViewResponse
The result of rendering a crate::GraphView for one frame.
LayoutForceDirected
LayoutHierarchical
LayoutRandom
Randomly places nodes on the canvas. Does not override existing locations. Applies once.
LayoutStateHierarchical
LayoutStateRandom
MetadataFrame
Node
NodeProps
Stores properties of a Node
SettingsInteraction
Represents graph interaction settings.
SettingsNavigation
Represents graph navigation settings.
SettingsStyle
SettingsStyle stores settings for the style of the graph.
TipProps
Arrow-tip geometry for a directed edge.

Enums§

EdgeShapeProps
Geometry used by EdgeShapeBuilder to construct an edge body.
GraphChange
A graph-specific change produced while rendering one crate::GraphView frame.
LayoutHierarchicalOrientation
Orientation of the hierarchical layout.

Traits§

AnimatedState
Optional hooks for animated/simulated layout states. Implement on your layout state to allow GraphView helpers to force-run steps even when paused and to read/write the last average displacement metric.
DisplayEdge
DisplayNode
ExtraForce
An additional force to be applied after the base forces. Implementors are zero-sized marker types with the behavior in apply.
ExtrasTuple
Trait to apply a heterogeneous tuple of extras.
ForceAlgorithm
A pluggable force-directed algorithm interface decoupled from the UI boilerplate.
Layout
LayoutState

Functions§

default_edge_transform
Default edge transform function. Keeps original data and creates a new edge.
default_node_transform
Default node transform function. Keeps original data and creates a new node with a random location and label equal to the index of the node in the graph.
generate_random_graph
Generates a random graph with the specified number of nodes and edges.
generate_simple_digraph
Simple digraph for usage in examples and tests.
generate_simple_ungraph
Simple ungraph for usage in examples and tests.
get_layout_state
Loads current persisted layout state (or default if none). Useful for external UI panels.
get_metrics
Returns the latest per-frame performance metrics stored in metadata.
node_size
Calculates the size of the node in the direction of the given vector
reset
Helper to reset both MetadataFrame and Layout cache. Can be useful when you want to change layout in runtime
reset_layout
Resets Layout state
reset_metadata
Resets MetadataFrame state
set_layout_state
Persists a new layout state so that on the next frame it will be applied.
to_graph
Helper function which transforms petgraph::stable_graph::StableGraph into the super::Graph required by the super::GraphView widget.
to_graph_custom
The same as to_graph, but allows to define custom transformation procedures for nodes and edges.

Type Aliases§

DefaultGraphView
FruchtermanReingoldWithCenterGravity
Convenience aliases when only center gravity is desired.
FruchtermanReingoldWithCenterGravityState