This section is empty.


This section is empty.


This section is empty.


type IView

type IView interface {
	Backing() *gocui.View
	SetBacking(gocuiView *gocui.View)
	Name() string

    IView is the view interface

    type UI

    type UI struct {
    	// contains filtered or unexported fields

      UI is the UI view struct

      func NewUI

      func NewUI() (*UI, error)

        NewUI returns a new UI instance

        func (*UI) ActiveViewName

        func (ui *UI) ActiveViewName() string

          ActiveViewName returns the name of the active view

          func (*UI) Close

          func (ui *UI) Close()

            Close ...

            func (*UI) GetGocui

            func (ui *UI) GetGocui() *gocui.Gui

              GetGocui returns the underlying gocui instance

              func (*UI) MainLoop

              func (ui *UI) MainLoop() error

                MainLoop starts the UI render loop

                func (*UI) SetBgColor

                func (ui *UI) SetBgColor(bgColor gocui.Attribute)

                  SetBgColor sets the background color

                  func (*UI) SetCursor

                  func (ui *UI) SetCursor(enabled bool)

                    SetCursor enables the input field cursor

                    func (*UI) SetFgColor

                    func (ui *UI) SetFgColor(fgColor gocui.Attribute)

                      SetFgColor sets the foreground color

                      func (*UI) SetHighlight

                      func (ui *UI) SetHighlight(enabled bool)

                        SetHighlight enables the highlight active state

                        func (*UI) SetInputEsc

                        func (ui *UI) SetInputEsc(enabled bool)

                          SetInputEsc enables the escape key

                          func (*UI) SetManagerFunc

                          func (ui *UI) SetManagerFunc(fn func() error)

                            SetManagerFunc sets the function to call for rendering UI

                            func (*UI) SetMouse

                            func (ui *UI) SetMouse(enabled bool)

                              SetMouse enables the mouse

                              func (*UI) SetView

                              func (ui *UI) SetView(view interface{}, x, y, w, h int) error

                                SetView sets the view layout

                                func (*UI) SetViewOnBottom

                                func (ui *UI) SetViewOnBottom(view interface{}) error

                                  SetViewOnBottom sets the view to the bottom layer

                                  type View

                                  type View struct {
                                  	// contains filtered or unexported fields

                                    View is a view sruct

                                    func NewView

                                    func NewView(name string) *View

                                      NewView creates a new view

                                      func (*View) Backing

                                      func (view *View) Backing() *gocui.View

                                        Backing returns the backing gocui view

                                        func (*View) Clear

                                        func (view *View) Clear() error

                                          Clear clears the view content

                                          func (*View) Cursor

                                          func (view *View) Cursor() (int, int)

                                            Cursor returns the view's cursor points

                                            func (*View) CursorX

                                            func (view *View) CursorX() int

                                              CursorX returns the view's cursor X point

                                              func (*View) CursorY

                                              func (view *View) CursorY() int

                                                CursorY returns the view's cursor Y point

                                                func (*View) HasBacking

                                                func (view *View) HasBacking() bool

                                                  HasBacking returns the true if this view has a gocui backing

                                                  func (*View) Height

                                                  func (view *View) Height() int

                                                    Height returns the view height

                                                    func (*View) Name

                                                    func (view *View) Name() string

                                                      Name returns the view's name

                                                      func (*View) Origin

                                                      func (view *View) Origin() (int, int)

                                                        Origin returns the view's origin points

                                                        func (*View) OriginX

                                                        func (view *View) OriginX() int

                                                          OriginX returns the view's origin X point

                                                          func (*View) OriginY

                                                          func (view *View) OriginY() int

                                                            OriginY returns the view's origin Y point

                                                            func (*View) Read

                                                            func (view *View) Read(b []byte) (int, error)

                                                              Read reads data in bytes buffer

                                                              func (*View) Rewind

                                                              func (view *View) Rewind() error

                                                                Rewind undos view update

                                                                func (*View) SetBacking

                                                                func (view *View) SetBacking(gocuiView *gocui.View)

                                                                  SetBacking sets the backing gocui view

                                                                  func (*View) SetBgColor

                                                                  func (view *View) SetBgColor(color gocui.Attribute)

                                                                    SetBgColor sets the background color

                                                                    func (*View) SetCursor

                                                                    func (view *View) SetCursor(x, y int) error

                                                                      SetCursor sets the view's cursor

                                                                      func (*View) SetEditable

                                                                      func (view *View) SetEditable(enabled bool) error

                                                                        SetEditable makes the view editable

                                                                        func (*View) SetFgColor

                                                                        func (view *View) SetFgColor(color gocui.Attribute)

                                                                          SetFgColor sets the foreground color

                                                                          func (*View) SetFrame

                                                                          func (view *View) SetFrame(enabled bool) error

                                                                            SetFrame enables the frame border for the view

                                                                            func (*View) SetHighlight

                                                                            func (view *View) SetHighlight(enabled bool) error

                                                                              SetHighlight enables the highlight color for the view

                                                                              func (*View) SetOrigin

                                                                              func (view *View) SetOrigin(x, y int) error

                                                                                SetOrigin sets the view's origin

                                                                                func (*View) SetSelBgColor

                                                                                func (view *View) SetSelBgColor(color gocui.Attribute)

                                                                                  SetSelBgColor sets the background color for selection

                                                                                  func (*View) SetSelFgColor

                                                                                  func (view *View) SetSelFgColor(color gocui.Attribute)

                                                                                    SetSelFgColor sets the foreground color for selection

                                                                                    func (*View) SetWrap

                                                                                    func (view *View) SetWrap(enabled bool) error

                                                                                      SetWrap enables text wrapping for the view

                                                                                      func (*View) Update

                                                                                      func (view *View) Update(content string) error

                                                                                        Update will clear and write the content to the view

                                                                                        func (*View) Width

                                                                                        func (view *View) Width() int

                                                                                          Width returns the view width

                                                                                          func (*View) Write

                                                                                          func (view *View) Write(content string) error

                                                                                            Write will write the content to the view

                                                                                            Source Files