widgets

package
v0.5.0-preview Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dialog

type Dialog struct {
	appkit.Panel
	// contains filtered or unexported fields
}

Dialog is appkit.Panel with optional OK|CANCEL buttons

func NewDialog

func NewDialog(width, height float64) *Dialog

NewDialog create new Dialog

func NewDialogWithEdgeInsets

func NewDialogWithEdgeInsets(width, height float64, edgeInsets foundation.EdgeInsets) *Dialog

NewDialogWithEdgeInsets create new Dialog width edgeInsets

func (*Dialog) SetView

func (d *Dialog) SetView(view appkit.IView)

SetView set inner content view for Dialog

func (*Dialog) Show

func (d *Dialog) Show(handle func())

Show display dialog in non-modal mode

type FormView

type FormView struct {
	appkit.GridView
	// contains filtered or unexported fields
}

FormView ia an appkit.View that arrange form field name and controls.

func NewFormView

func NewFormView() *FormView

NewFormView create new form view

func (*FormView) AddExpandRow

func (f *FormView) AddExpandRow()

AddExpandRow add a row, expand to fill parent view height.

func (*FormView) AddRow

func (f *FormView) AddRow(name string, control appkit.IControl)

AddRow add a new form row

func (*FormView) InsertRow

func (f *FormView) InsertRow(index int, name string, control appkit.IControl)

InsertRow insert a new form row at specific location

func (*FormView) SetLabelAlignment

func (f *FormView) SetLabelAlignment(alignment LabelAlignment)

SetLabelAlignment set label text alignment

func (*FormView) SetLabelControlSpacing

func (f *FormView) SetLabelControlSpacing(spacing float64)

SetLabelControlSpacing set spacing between label and control

func (*FormView) SetLabelFont

func (f *FormView) SetLabelFont(font appkit.IFont)

SetLabelFont set label font

func (*FormView) SetLabelWidth

func (f *FormView) SetLabelWidth(width float64)

SetLabelWidth set width for labels

func (*FormView) SetRowSpacing

func (f *FormView) SetRowSpacing(spacing float64)

SetRowSpacing set spacing between rows.

type LabelAlignment

type LabelAlignment int
const (
	LabelAlignmentLeading  LabelAlignment = 0
	LabelAlignmentTrailing LabelAlignment = 1
	LabelAlignmentCenter   LabelAlignment = 2
)

Jump to

Keyboard shortcuts

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