mamba

package module
v0.0.0-...-f8bbf8a Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2024 License: MIT Imports: 2 Imported by: 0

README

mamba

TUI framework (WIP)

nothing is set in stone, expect braking changes

outline

  • every component is a frame component
  • frame controls everything related to design
    • paddings
    • margins
    • colors
    • borders
    • border color
  • main window is still a frame
  • no keybinds by default
  • assignable actions
  • programmed navigation

components

  • tabs
  • splits
  • loading bar
  • input
  • text

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Frame

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

func NewFrame

func NewFrame(s tcell.Screen, startX, startY, width, height int) (*Frame, error)

func (*Frame) AddChild

func (f *Frame) AddChild(c Shower)

func (*Frame) Resize

func (f *Frame) Resize(w, h int)

func (*Frame) Show

func (f *Frame) Show()

type Screen

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

func NewScreen

func NewScreen() (*Screen, error)

func (*Screen) Frame

func (s *Screen) Frame() *Frame

func (*Screen) Run

func (s *Screen) Run()

Run is a blocking operation.

type Shower

type Shower interface {
	Show()
}

type TextView

type TextView struct {
	Frame
	// contains filtered or unexported fields
}

func NewTextView

func NewTextView(f Frame, text string) *TextView

func (*TextView) Show

func (t *TextView) Show()

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳