components

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2025 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Button

func Button(opts ButtonOpts) layout.Widget

func Circle

func Circle(opts CircleOpts) layout.Widget

Circle creates a circular widget.

func ContextMenu

func ContextMenu(opts ContextMenuOpts, contextualWidget layout.Widget) layout.Widget

func H1

func H1(opts TextOpts, text string) layout.Widget

func H2

func H2(opts TextOpts, text string) layout.Widget

func H3

func H3(opts TextOpts, text string) layout.Widget

func H4

func H4(opts TextOpts, text string) layout.Widget

func H5

func H5(opts TextOpts, text string) layout.Widget

func H6

func H6(opts TextOpts, text string) layout.Widget

func Input

func Input(opts InputOpts) layout.Widget

func LoadImageHelper

func LoadImageHelper(path string) (image.Image, error)

func P

func P(opts TextOpts, text string) layout.Widget

func Rect

func Rect(opts RectOpts) layout.Widget

func Text

func Text(opts TextOpts, spans ...richtext.SpanStyle) layout.Widget

func TextSpan

func TextSpan(span_style richtext.SpanStyle) richtext.SpanStyle

Helper function to create a text span with custom properties

Types

type ButtonOpts

type ButtonOpts struct {
	ButtonPtr *widget.Clickable // [!] Must live across frames
	ThemePtr  *material.Theme
	Text      string
}

type CircleOpts

type CircleOpts struct {
	R      unit.Dp
	Color  color.NRGBA
	Img    image.Image // Pre-loaded image (local)
	ImgURL string      // URL for remote image
}

CircleOpts defines the options for rendering a circle.

type ContextMenuOpts

type ContextMenuOpts struct {
	ContextArea *component.ContextArea // [!] Must live across frames
}

type InputOpts

type InputOpts struct {
	EditorPtr  *widget.Editor // [!] Must live across frames
	ThemePtr   *material.Theme
	Hint       string
	W, H       unit.Dp
	MinW, MinH unit.Dp
}

type RectOpts

type RectOpts struct {
	W, H       unit.Dp
	MinW, MinH unit.Dp
	Color      color.NRGBA
	Img        image.Image // Pre-loaded image (local)
	ImgURL     string      // URL for remote image
}

type TextOpts

type TextOpts struct {
	ThemePtr  *material.Theme
	TextState *richtext.InteractiveText
}

Jump to

Keyboard shortcuts

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