modals

package
v0.4.7 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2026 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type C

type C = layout.Context

type CreateItem

type CreateItem struct {
	Clickable widget.Clickable
	Icon      widgets.Icon
	Title     string
	Key       string
}

func NewCreateItem

func NewCreateItem(key string, icon widgets.Icon, title string) *CreateItem

func (*CreateItem) Layout added in v0.4.6

type CreateModal

type CreateModal struct {
	CreateBtn widget.Clickable
	CloseBtn  widget.Clickable

	Items []*CreateItem
	// contains filtered or unexported fields
}

func NewCreateModal

func NewCreateModal(items []*CreateItem) *CreateModal

func (*CreateModal) Layout

type D

type D = layout.Dimensions

type ImportItem added in v0.4.3

type ImportItem struct {
	*widgets.ImageButton
	Key string
}

func NewImportItem added in v0.4.3

func NewImportItem(key string, image paint.ImageOp, title string) *ImportItem

type ImportModal added in v0.4.3

type ImportModal struct {
	CloseBtn widget.Clickable

	Items []*ImportItem
	// contains filtered or unexported fields
}

func NewImportModal added in v0.4.3

func NewImportModal() *ImportModal

func (*ImportModal) ItemsLayout added in v0.4.3

func (n *ImportModal) ItemsLayout(gtx layout.Context, th *chapartheme.Theme) layout.Dimensions

func (*ImportModal) Layout added in v0.4.3

type InputText

type InputText struct {
	TextField *widgets.TextField
	AddBtn    widget.Clickable
	CloseBtn  widget.Clickable

	Title string
}

func NewInputText

func NewInputText(title, placeholder string) *InputText

func (*InputText) Layout

type Message

type Message struct {
	Title string
	Body  string
	Type  MessageType

	OKBtn widget.Clickable
}

func NewError

func NewError(err error) *Message

func NewInfo

func NewInfo(title, body string) *Message

func (*Message) Layout

func (m *Message) Layout(gtx layout.Context, th *chapartheme.Theme) layout.Dimensions

type MessageType

type MessageType string
const (
	MessageTypeInfo MessageType = "info"
	MessageTypeWarn MessageType = "warn"
	MessageTypeErr  MessageType = "err"
)

Jump to

Keyboard shortcuts

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