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:
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -15,6 +15,7 @@ type Wtfable interface {
|
||||
SetFocusChar(string)
|
||||
TextView() *tview.TextView
|
||||
HelpText() string
|
||||
ConfigText() string
|
||||
|
||||
Height() int
|
||||
Left() int
|
||||
|
||||
Reference in New Issue
Block a user