window

package
v0.0.0-...-72f9927 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2022 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DarkGray  = color.NRGBA{R: 0x2B, G: 0x2B, B: 0x2B, A: 0xFF}
	Gray      = color.NRGBA{R: 0x75, G: 0x75, B: 0x75, A: 0xFF}
	LightGray = color.NRGBA{R: 0xCF, G: 0xCF, B: 0xCF, A: 0xFF}
)

Colors

Functions

func DrawFrame

func DrawFrame(w *app.Window, images []imageW.TranslatorImage, cfg config.File) error

DrawFrame squares with labels, buttons control labels.

Types

type C

type C = layout.Context

type D

type D = layout.Dimensions

func Clickable

func Clickable(gtx C, button *widget.Clickable, hover bool, w layout.Widget) D

Clickable lays out a rectangular clickable widget without further decoration.

type HSplit

type HSplit struct{}

HSplit is a custom layout with two widgets of equal size separated by a vertical bar.

func (*HSplit) Layout

func (s *HSplit) Layout(gtx C, left, right layout.Widget) D

type VSplit

type VSplit struct {
	// Ratio keeps the current layout.
	// 0 is center, -1 completely to the left, 1 completely to the right.
	Ratio float32
	// Bar is the width for resizing the layout
	Bar unit.Value
	// contains filtered or unexported fields
}

VSplit is a custom layout with two widgets of adjustable size separated by a draggable horizontal bar.

func (*VSplit) Layout

func (s *VSplit) Layout(gtx C, top, bottom layout.Widget) D

Jump to

Keyboard shortcuts

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