Help us shape the future of Go! Take the 2026 Go Developer Survey

calcui

package
v0.0.0-...-eaeccb9 Latest Latest
Warning

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

Go to latest
Published: May 1, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitialModel

func InitialModel() model

func Start

func Start() error

Types

type Button

type Button struct {
	Label string
	Value string
	Type  ButtonType
	Width int
}

type ButtonType

type ButtonType int
const (
	Number ButtonType = iota
	Operator
	Function
	Control // clear, delete
	Action  // evaluate
)

type CursorLocation

type CursorLocation int
const (
	OnGrid CursorLocation = iota
	OnScreen
	OnTopBar
)

type CursorPos

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

type InputMode

type InputMode int
const (
	Nav InputMode = iota
	Edit
	Cursor
)

func (InputMode) String

func (i InputMode) String() string

type OutputMode

type OutputMode int
const (
	Standard OutputMode = iota
	Decimal
)

func (OutputMode) String

func (o OutputMode) String() string

type Styles

type Styles struct {
	NavMode  lipgloss.Style
	EditMode lipgloss.Style

	Screen     lipgloss.Style
	ActiveScrn lipgloss.Style
	Output     lipgloss.Style

	Button        lipgloss.Style
	ActiveBtn     lipgloss.Style
	OpBtn         lipgloss.Style
	ActiveOpBtn   lipgloss.Style
	CtrlBtn       lipgloss.Style
	ActiveCtrlBtn lipgloss.Style
	ActnBtn       lipgloss.Style
	ActiveActnBtn lipgloss.Style

	// Top-bar toggle buttons (AngleMode / OutputMode S/D)
	TopBarBtn       lipgloss.Style
	ActiveTopBarBtn lipgloss.Style
	DimmedTopBarBtn lipgloss.Style // used for S/D when result is inexact

	Footer lipgloss.Style

	PrimaryGrid  lipgloss.Style
	BorderAround lipgloss.Style
}

func DefaultStyles

func DefaultStyles() Styles

Jump to

Keyboard shortcuts

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