1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

Add more 'man page' like functionality

This commit is contained in:
Sean Smith
2019-05-24 00:06:10 -04:00
parent 9a877b5e04
commit d8f337884f
8 changed files with 109 additions and 14 deletions

View File

@@ -116,6 +116,10 @@ func (widget *BarGraph) HelpText() string {
return "No help available for this widget"
}
func (widget *BarGraph) ConfigText() string {
return ""
}
/* -------------------- Unexported Functions -------------------- */
func (widget *BarGraph) addView() *tview.TextView {

View File

@@ -5,6 +5,7 @@ import (
"github.com/rivo/tview"
"github.com/wtfutil/wtf/cfg"
"github.com/wtfutil/wtf/utils"
)
type TextWidget struct {
@@ -123,6 +124,10 @@ func (widget *TextWidget) HelpText() string {
return fmt.Sprintf("\n There is no help available for widget %s", widget.CommonSettings.Module.Type)
}
func (widget *TextWidget) ConfigText() string {
return utils.HelpFromInterface(cfg.Common{})
}
/* -------------------- Unexported Functions -------------------- */
func (widget *TextWidget) addView() *tview.TextView {

View File

@@ -15,6 +15,7 @@ type Wtfable interface {
SetFocusChar(string)
TextView() *tview.TextView
HelpText() string
ConfigText() string
Height() int
Left() int