form

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package form generates forms based on structs.

Index

Constants

View Source
const (
	InputText inputType = iota
	InputBool
	InputInt
	InputUint
)

Valid input types.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dialog

type Dialog struct {
	Form *Form
	// contains filtered or unexported fields
}

Dialog represents a form within a window.

func Popup(title string, s interface{}) (*Dialog, error)

Popup creates a dialog containing a form.

func (*Dialog) Run

func (w *Dialog) Run() gtk.ResponseType

Run blocks until the dialog is closed.

type Form

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

Form represents a generated set of UI inputs.

func Build

func Build(s interface{}) (*Form, error)

Build constructs a form using GTK elements.

func (*Form) UI

func (f *Form) UI() *gtk.Box

func (*Form) Valid added in v0.4.4

func (f *Form) Valid() bool

Jump to

Keyboard shortcuts

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