context

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CurrentFocus

type CurrentFocus struct {
	FocusIdx      int
	FocusedWidget FocusableWidget
}

type FocusableWidget

type FocusableWidget struct {
	Descriptor string
	Type       FocusedWidgetType
	Repo       models.Repo
	User       models.User
}

type FocusedWidgetType

type FocusedWidgetType int
const (
	NoWidget FocusedWidgetType = iota
	UserWidget
	RepoWidget
)

type Mode

type Mode int
const (
	InsertMode Mode = iota
	NormalMode
)

type ProgramContext

type ProgramContext struct {
	User             models.User
	CurrentView      View
	LastView         View
	Mode             Mode
	CurrentFocus     CurrentFocus
	FocusableWidgets []FocusableWidget
	Layout           struct {
		ScreenHeight  int
		ScreenWidth   int
		ContentHeight int
		ContentWidth  int
	}
}

type View

type View int
const (
	VoidView View = iota
	UserView
	ReadmeView
	MessageView
)

Jump to

Keyboard shortcuts

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