giowidgets

package module
v0.0.0-...-1de75d8 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2023 License: MIT Imports: 18 Imported by: 0

README

giowidgets

widgets for gioui

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetYearsRangeButtons

func GetYearsRangeButtons(startYear, endYear int) []yearButton

GetYearsRangeButtons returns slice of yearButton with year range between startYear and upto but not including lastYear

func SetAllYearsButtonsSlice

func SetAllYearsButtonsSlice(startTime, endTime time.Time)

Types

type Calendar

type Calendar struct {
	Theme *material.Theme

	ShowMonthsDropdown bool

	OnCalendarDateClick

	FirstDayOfWeek time.Weekday

	layout.Inset
	// contains filtered or unexported fields
}

func (*Calendar) Layout

func (c *Calendar) Layout(gtx Gtx) Dim

func (*Calendar) OnMonthButtonClick

func (c *Calendar) OnMonthButtonClick(gtx Gtx, month *monthButton)

func (*Calendar) OnYearButtonClick

func (c *Calendar) OnYearButtonClick(gtx Gtx, year *yearButton)

func (*Calendar) SetTime

func (c *Calendar) SetTime(t time.Time)

func (*Calendar) Time

func (c *Calendar) Time() time.Time

type Dim

type Dim = layout.Dimensions
type Dropdown struct {
	Parent layout.Widget
	Child  layout.Widget
}

type Flex

type Flex = layout.Flex

type FlexChild

type FlexChild = layout.FlexChild

type Gtx

type Gtx = layout.Context

type Inset

type Inset = layout.Inset

type OnCalendarDateClick

type OnCalendarDateClick func(t time.Time)

type Resizable

type Resizable struct {
	Widget         layout.Widget
	DividerHandler layout.Widget
	// contains filtered or unexported fields
}

func (*Resizable) Layout

func (r *Resizable) Layout(gtx layout.Context) []layout.FlexChild

type Resize

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

Resize provides a draggable handle in between two widgets for resizing their area.

func NewResizeWidget

func NewResizeWidget(axis layout.Axis, resizables []*Resizable) *Resize

func (*Resize) CustomResizeHandleBar

func (r *Resize) CustomResizeHandleBar(gtx Gtx) Dim

func (*Resize) Layout

func (r *Resize) Layout(gtx layout.Context) layout.Dimensions

Layout displays w1 and w2 with handle in between.

The widgets w1 and w2 must be able to gracefully resize their minimum and maximum dimensions in order for the resize to be smooth.

type View

type View interface {
	Layout(gtx Gtx) Dim
}

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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