app

package
v0.0.0-...-b4c633b Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: BSD-3-Clause Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Header struct {
	OnSelectedEnvChanged func(env *domain.Environment)
	OnThemeSwitched      func(isLight bool)
	// contains filtered or unexported fields
}

func NewHeader

func NewHeader(envState *state.Environments, theme *chapartheme.Theme) *Header

func (*Header) Layout

func (h *Header) Layout(gtx layout.Context, theme *chapartheme.Theme) layout.Dimensions

func (*Header) LoadEnvs

func (h *Header) LoadEnvs(data []*domain.Environment)

func (*Header) SetSelectedEnvironment

func (h *Header) SetSelectedEnvironment(env *domain.Environment)

func (*Header) SetTheme

func (h *Header) SetTheme(isDark bool)

type SideBarButton

type SideBarButton struct {
	Icon *widget.Icon
	Text string
}
type Sidebar struct {
	Theme *chapartheme.Theme

	Buttons []*SideBarButton
	// contains filtered or unexported fields
}

func NewSidebar

func NewSidebar(theme *chapartheme.Theme) *Sidebar

func (*Sidebar) Layout

func (s *Sidebar) Layout(gtx layout.Context, theme *chapartheme.Theme) layout.Dimensions

func (*Sidebar) SelectedIndex

func (s *Sidebar) SelectedIndex() int

type UI

type UI struct {
	Theme *chapartheme.Theme
	// contains filtered or unexported fields
}

func New

func New(w *app.Window) (*UI, error)

New creates a new UI using the Go Fonts.

func (*UI) Layout

func (u *UI) Layout(gtx layout.Context, windowWidth int) layout.Dimensions

Layout displays the main program layout.

func (*UI) Run

func (u *UI) Run() error

Jump to

Keyboard shortcuts

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