Documentation
¶
Index ¶
- Constants
- Variables
- func NewRenderer(out io.Writer, opts ...RendererOption) core.Renderer
- func NewThrottledRenderer(out io.Writer, fps int, opts ...core.RendererOption) core.Renderer
- func RenderKeyHelp(km *core.KeyMap, width, height int) string
- func Run(m Model, opts ...Option) error
- func RunContext(ctx context.Context, m Model, opts ...Option) error
- type AlignH
- type AlignV
- type App
- type Cmd
- type Color
- type ColorProfile
- type Error
- type ErrorCode
- type KeyMsg
- type KeyType
- type Logger
- type Model
- type MouseAction
- type MouseButton
- type MouseMsg
- type Msg
- type Option
- type PasteMsg
- type QuitMsg
- type RendererOption
- type ResizeMsg
- type Style
- type TickMsg
- type ValidationCode
- type ValidationIssue
- type ValidationReport
- type ValidationSeverity
Constants ¶
View Source
const ( KeyUnknown = core.KeyUnknown KeyRune = core.KeyRune KeyEnter = core.KeyEnter KeyBackspace = core.KeyBackspace KeyEsc = core.KeyEsc KeyCtrlC = core.KeyCtrlC KeyUp = core.KeyUp KeyDown = core.KeyDown KeyLeft = core.KeyLeft KeyRight = core.KeyRight KeyTab = core.KeyTab KeySpace = core.KeySpace KeyDelete = core.KeyDelete KeyHome = core.KeyHome KeyEnd = core.KeyEnd KeyPgUp = core.KeyPgUp KeyPgDn = core.KeyPgDn KeyQ = core.KeyQ )
Key constants
View Source
const ( MouseUnknown = core.MouseUnknown MouseLeft = core.MouseLeft MouseMiddle = core.MouseMiddle MouseRight = core.MouseRight MouseWheelUp = core.MouseWheelUp MouseWheelDown = core.MouseWheelDown )
Mouse constants
View Source
const ( ErrNilModel = core.ErrNilModel ErrNilRenderer = core.ErrNilRenderer ErrRawMode = core.ErrRawMode ErrInitFailed = core.ErrInitFailed ErrViewFailed = core.ErrViewFailed ErrUpdateFailed = core.ErrUpdateFailed ErrCommandFailed = core.ErrCommandFailed ErrNilUpdateModel = core.ErrNilUpdateModel )
Runtime error codes
View Source
const ( ValidationNilModel = validate.CodeNilModel ValidationMissingView = validate.CodeMissingView ValidationEmptyView = validate.CodeEmptyView ValidationViewNotString = validate.CodeViewNotString ValidationViewHasBadRunes = validate.CodeViewHasBadRunes ValidationViewPanic = validate.CodeViewPanic ValidationMissingUpdate = validate.CodeMissingUpdate ValidationBadUpdateSignature = validate.CodeBadUpdateSignature ValidationMissingInit = validate.CodeMissingInit ValidationBadInitSignature = validate.CodeBadInitSignature ValidationUpdateNilModel = validate.CodeUpdateNilModel ValidationViewVeryLarge = validate.CodeViewVeryLarge ValidationViewSuspicious = validate.CodeViewSuspicious ValidationNonExportedType = validate.CodeNonExportedType ValidationSlowView = validate.CodeSlowView ValidationSlowInit = validate.CodeSlowInit ValidationHasNoMethods = validate.CodeHasNoMethods ValidationUpdateNotMethod = validate.CodeUpdateNotMethod ValidationViewNotMethod = validate.CodeViewNotMethod ValidationReceiverMismatch = validate.CodeReceiverMismatch ValidationViewControlCodes = validate.CodeViewControlCodes )
Validation issue codes
View Source
const ( MousePress = core.MousePress MouseRelease = core.MouseRelease MouseDrag = core.MouseDrag MouseWheel = core.MouseWheel )
View Source
const ( ColorAuto = core.ColorAuto ColorNone = core.ColorNone ColorANSI16 = core.ColorANSI16 ColorANSI256 = core.ColorANSI256 ColorTrueColor = core.ColorTrueColor )
Color profile constants
View Source
const ( AlignLeft = core.AlignLeft AlignCenter = core.AlignCenter AlignRight = core.AlignRight AlignTop = core.AlignTop AlignMiddle = core.AlignMiddle AlignBottom = core.AlignBottom )
Layout helpers.
Variables ¶
View Source
var ( ColorBlack = core.ColorBlack ColorRed = core.ColorRed ColorGreen = core.ColorGreen ColorYellow = core.ColorYellow ColorBlue = core.ColorBlue ColorMagenta = core.ColorMagenta ColorCyan = core.ColorCyan ColorWhite = core.ColorWhite ColorBrightBlack = core.ColorBrightBlack ColorBrightRed = core.ColorBrightRed ColorBrightGreen = core.ColorBrightGreen ColorBrightYellow = core.ColorBrightYellow ColorBrightBlue = core.ColorBrightBlue ColorBrightMagenta = core.ColorBrightMagenta ColorBrightCyan = core.ColorBrightCyan ColorBrightWhite = core.ColorBrightWhite )
Named colors (16-color)
View Source
var ( NewStyle = core.NewStyle ANSI256 = core.ANSI256 RGB = core.RGB Colorize = core.Colorize StripANSI = core.StripANSI InspectModel = validate.InspectModel ValidateModel = validate.ValidateModel )
Style functions.
View Source
var ( Tick = core.Tick Quit = core.Quit Nil = core.Nil WithRenderer = core.WithRenderer WithAltScreen = core.WithAltScreen WithMsgBuffer = core.WithMsgBuffer WithOut = core.WithOut WithIn = core.WithIn WithResizeInterval = core.WithResizeInterval WithNonInteractive = core.WithNonInteractive WithLogger = core.WithLogger WithMouse = core.WithMouse WithBracketedPaste = core.WithBracketedPaste )
Session options
View Source
var ( WithDiff = core.WithDiff WithColorProfile = core.WithColorProfile )
View Source
var ( Center = core.Center PlaceBlock = core.PlaceBlock )
Functions ¶
func NewRenderer ¶ added in v0.0.3
func NewRenderer(out io.Writer, opts ...RendererOption) core.Renderer
Renderer helpers.
func NewThrottledRenderer ¶ added in v0.0.9
FPS-throttled renderer.
func RenderKeyHelp ¶ added in v0.0.9
Help overlay.
Types ¶
type ColorProfile ¶ added in v0.0.3
type ColorProfile = core.ColorProfile
type MouseAction ¶ added in v0.0.5
type MouseAction = core.MouseAction
type MouseButton ¶ added in v0.0.5
type MouseButton = core.MouseButton
type ValidationCode ¶ added in v0.0.9
type ValidationIssue ¶ added in v0.0.9
type ValidationReport ¶ added in v0.0.9
type ValidationSeverity ¶ added in v0.0.9
Click to show internal directories.
Click to hide internal directories.