gui

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BannerWidget added in v0.15.0

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

BannerWidget struct used to build the banner where we show the name of the app.

func NewBannerWidget added in v0.15.0

func NewBannerWidget(name string, x0, y0, x1, y1 float32, label string, color gocui.Attribute) *BannerWidget

NewBannerWidget returns a pointer to a BannerWidget instance.

func (*BannerWidget) Layout added in v0.15.0

func (w *BannerWidget) Layout(g *gocui.Gui) error

Layout implements the gocui.Manager interface.

type ButtonWidget added in v0.15.0

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

ButtonWidget struct used to build buttons. y work as factor to determine the widget's height, since the terminal's size is retrieved in the Layout method.

func NewButtonWidget added in v0.15.0

func NewButtonWidget(name string, x int, y float32, label string, color gocui.Attribute) *ButtonWidget

NewButtonWidget returns a pointer to a ButtonWidget instance.

func (*ButtonWidget) Layout added in v0.15.0

func (w *ButtonWidget) Layout(g *gocui.Gui) error

Layout implements the gocui.Manager interface.

type EditorWidget added in v0.15.0

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

EditorWidget struct used as an editor to perform queries to the databases.

func NewEditorWidget added in v0.15.0

func NewEditorWidget(name string, x0, y0, x1, y1 float32, label string) *EditorWidget

NewEditorWidget returns a pointer to a EditorWidget instance.

func (*EditorWidget) Layout added in v0.15.0

func (w *EditorWidget) Layout(g *gocui.Gui) error

Layout implements the gocui.Manager interface.

type Gui

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

Gui wraps the gocui Gui object which handles rendering and events.

func New

func New(g *gocui.Gui, c *client.Client) (*Gui, error)

New builds a new gui handler.

func (*Gui) Gui added in v0.11.1

func (gui *Gui) Gui() *gocui.Gui

Gui returns a pointer of a gocui.Gui instance.

func (*Gui) Run

func (gui *Gui) Run() error

Run setup the gui with keybindings and start the mainloop.

type LabelWidget added in v0.15.0

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

LabelWidget struct used to display data to dynamic data to the user. y work as factor to determine the widget's height, since the terminal's size is retrieved in the Layout method.

func NewLabelWidget added in v0.15.0

func NewLabelWidget(name string, x int, y float32, label string, color gocui.Attribute) *LabelWidget

NewLabelWidget returns a pointer to a LabelWidget instance.

func (*LabelWidget) Layout added in v0.15.0

func (w *LabelWidget) Layout(g *gocui.Gui) error

Layout implements the gocui.Manager interface.

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

NavigationWidget struct used to show the navigation panel.

func NewNavigationWidget added in v0.15.0

func NewNavigationWidget(name string, x0, y0, x1, y1 float32, label string, options []string) *NavigationWidget

NewNavigationWidget returns a pointer to a NavigationWidget instance.

func (w *NavigationWidget) Layout(g *gocui.Gui) error

Layout implements the gocui.Manager interface.

type OutputWidget added in v0.15.0

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

OutputWidget struct used to show important data to the user based off the context.

func NewOutputWidget added in v0.15.0

func NewOutputWidget(name string, x0, y0, x1, y1 float32, label string, initMsg string) *OutputWidget

NewOutputWidget returns a pointer to a OutputWidget instance.

func (*OutputWidget) Layout added in v0.15.0

func (w *OutputWidget) Layout(g *gocui.Gui) error

Layout implements the gocui.Manager interface.

type TableWidget added in v0.15.0

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

TableWidget struct used to build the section for the sql tables content.

func NewTableWidget added in v0.15.0

func NewTableWidget(name string, x0, y0, x1, y1 float32, label string, bgcolor, fgcolor gocui.Attribute, gui *Gui) *TableWidget

NewTableWidget returns a pointer to a TableWidget instance.

func (*TableWidget) Layout added in v0.15.0

func (w *TableWidget) Layout(g *gocui.Gui) error

Layout implements the gocui.Manager interface.

Jump to

Keyboard shortcuts

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