Package com.zachklipp.seqdiag

Types

Link copied to clipboard
enum ArrowHeadType : Enum<ArrowHeadType>
Link copied to clipboard
data class BasicSequenceDiagramStyle(    val participantSpacing: Dp = DefaultParticipantSpacing,     val verticalSpacing: Dp = DefaultVerticalSpacing,     val labelPadding: Dp = DefaultLabelPadding,     val labelTextStyle: TextStyle = DefaultLabelTextStyle,     val notePadding: PaddingValues = DefaultNotePadding,     val noteShape: Shape = DefaultNoteShape,     val noteBackgroundBrush: Brush = DefaultNoteBackgroundBrush,     val lineStyle: LineStyle = DefaultLineStyle,     val balanceLabelDimensions: Boolean = true) : SequenceDiagramStyle

An immutable SequenceDiagramStyle.

Link copied to clipboard
interface LineBuilder

A fluent-style builder interface for configuring optional properties of lines pointing from one Participant to another.

Link copied to clipboard
data class LineStyle(    val brush: Brush? = null,     val arrowHeadType: ArrowHeadType? = null,     val width: Dp = Dp.Unspecified,     val miter: Dp = Dp.Unspecified,     val cap: StrokeCap? = null,     val join: StrokeJoin? = null,     val dashIntervals: Pair<Dp, Dp>? = null)

Properties that control how lines and arrows are rendered.

Link copied to clipboard
interface Participant

Identifies a participant in a SequenceDiagram. Participants are created by createParticipant and used by the other functions on SequenceDiagramScope to specify the targets for lines and the anchors for notes.

Link copied to clipboard
interface SequenceDiagramScope

Defines the DSL used to specify sequence diagrams. Receiver of the content parameter of the SequenceDiagram composable.

Link copied to clipboard
interface SequenceDiagramStyle

Defines the default layout and drawing properties of a SequenceDiagram. BasicSequenceDiagramStyle is an immutable implementation of this interface.

Functions

Link copied to clipboard
fun LineBuilder.arrowHeadType(type: ArrowHeadType): LineBuilder

The style of the arrow head drawn at the end of the line. See ArrowHeadType for possible values.

Link copied to clipboard
fun LineBuilder.color(color: Color): LineBuilder

Specifies the color of the line.

Link copied to clipboard
fun SequenceDiagramScope.createParticipant(topAndBottomLabel: @Composable () -> Unit): Participant

Creates a Participant in the sequence. Each participant typically is typically labeled and has a vertical line drawn through the height of the diagram. The rest of the diagram is specified as lines between participants and notes anchored to them. Participants are placed horizontally from start to end in the order they're created.

Link copied to clipboard
fun SequenceDiagramScope.Label(text: String, modifier: Modifier = Modifier)

Standard text styled by the SequenceDiagramStyle. To draw a standard background and border around a label, use the Note composable.

Link copied to clipboard
fun SequenceDiagramScope.Note(text: String, modifier: Modifier = Modifier)

Standard note styled by the SequenceDiagramStyle. To just draw text without the border use the Label composable. To use your own composables with the standard note background and border, use NoteBox.

Link copied to clipboard
inline fun SequenceDiagramScope.NoteBox(modifier: Modifier = Modifier, content: @Composable BoxScope.() -> Unit)

A Box that is styled according to the SequenceDiagramStyle's note properties.

Link copied to clipboard
fun SequenceDiagramScope.noteOver(    firstParticipant: Participant,     vararg otherParticipants: Participant,     label: @Composable () -> Unit)

Specifies a composable that represents a note that is placed "over", or covering, one or more Participants.

Link copied to clipboard
fun SequenceDiagram(    modifier: Modifier = Modifier,     style: SequenceDiagramStyle = SequenceDiagramStyle.Default,     content: SequenceDiagramScope.() -> Unit)

A composable that draws a sequence diagram. The diagram is specified inside the content function by a DSL defined by SequenceDiagramScope.