Documentation ¶
Index ¶
- Variables
- func ScrollView(v *gocui.View, dy int) error
- type App
- func (a *App) AddToLayout(frame *AppFrame)
- func (a *App) AddToLayoutWithTabSwitcher(frame *AppFrame, tabToSwitch bool)
- func (a *App) BeforeStart(cbs ...func(app *App) error)
- func (a *App) Close()
- func (a *App) DeleteAppFrameByName(name string)
- func (a *App) GetFrameByName(name string) (*AppFrame, bool)
- func (a *App) ModalMessage(title string, in io.Reader) error
- func (a *App) ModalMessageWithEvent(title string, in io.Reader, ok, cancel func(g *gocui.Gui)) error
- func (a *App) ModalMessageWithPostionSetterOnEvent(title string, in io.Reader, pos PositionSetter, ok func(g *gocui.Gui), ...) error
- func (a *App) Run(ctx context.Context, cbs ...func()) error
- type AppFrame
- func NewAppFrame(app *App, name string, position PositionSetter) *AppFrame
- func NewAppFrameWithViewWriter(app *App, name string, position PositionSetter, initCb ...ViewHandler) (*AppFrame, io.Writer)
- func NewStatusAppFrame(app *App, name string, position PositionSetter, showValue *[]byte, ...) *AppFrame
- type LineSelectedHandler
- type PositionSetter
- type StatusText
- type ViewHandler
Constants ¶
This section is empty.
Variables ¶
View Source
var (
NoInputEditor gocui.EditorFunc = func(v *gocui.View, key gocui.Key, ch rune, mod gocui.Modifier) {
return
}
)
Functions ¶
Types ¶
type App ¶
func (*App) AddToLayout ¶
func (*App) AddToLayoutWithTabSwitcher ¶
func (*App) BeforeStart ¶
func (*App) DeleteAppFrameByName ¶
func (*App) ModalMessageWithEvent ¶
func (*App) ModalMessageWithPostionSetterOnEvent ¶
type AppFrame ¶
type AppFrame struct { Position PositionSetter // contains filtered or unexported fields }
func NewAppFrame ¶
func NewAppFrame(app *App, name string, position PositionSetter) *AppFrame
func NewAppFrameWithViewWriter ¶
func NewAppFrameWithViewWriter(app *App, name string, position PositionSetter, initCb ...ViewHandler) (*AppFrame, io.Writer)
func NewStatusAppFrame ¶
func NewStatusAppFrame(app *App, name string, position PositionSetter, showValue *[]byte, cb ...ViewHandler) *AppFrame
专门用来显示状态的 Framework
func (*AppFrame) Init ¶
func (a *AppFrame) Init(cb ...ViewHandler)
func (*AppFrame) OnLineSelected ¶
func (a *AppFrame) OnLineSelected(cb ...LineSelectedHandler)
func (*AppFrame) OnUpdated ¶
func (a *AppFrame) OnUpdated(cb ...ViewHandler)
type LineSelectedHandler ¶
type StatusText ¶
专门用来更新状态的 Frame
func NewStatusText ¶
func NewStatusText(interval time.Duration, initData []byte) *StatusText
func (*StatusText) Close ¶
func (s *StatusText) Close()
func (*StatusText) Update ¶
func (s *StatusText) Update(data []byte)
type ViewHandler ¶
func EnableNoInputEditor ¶
func EnableNoInputEditor(name string) ViewHandler
Click to show internal directories.
Click to hide internal directories.