Documentation ¶
Index ¶
- Variables
- func Blue(text string) string
- func BlueDk(text string) string
- func ColorRune(color Color, r rune) string
- func ColorText(color Color, text string) string
- func Cyan(text string) string
- func CyanDk(text string) string
- func Dark(text string) string
- func Gray(text string) string
- func Green(text string) string
- func GreenDk(text string) string
- func Magenta(text string) string
- func MagentaDk(text string) string
- func NewCommandUI(version string) *ui
- func Red(text string) string
- func RedDk(text string) string
- func SetWindowTitle(text string)
- func White(text string) string
- func Yellow(text string) string
- func YellowDk(text string) string
- type BoundFunc
- type Color
- type Menu
- type MenuItem
- type MessageBox
- type Notifier
- type Progress
- type Rect
- type Runner
- type UI
- type View
- type ViewPage
- type ViewProperties
- type ViewText
- type Viewer
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func NewCommandUI ¶
func NewCommandUI(version string) *ui
func SetWindowTitle ¶
func SetWindowTitle(text string)
Types ¶
type MenuItem ¶
type MenuItem struct { Text string Title string Key string Action func() Items []MenuItem ItemsFunc func() []MenuItem ReuseBounds bool // contains filtered or unexported fields }
func MenuSeparator ¶
type MessageBox ¶
type MessageBox struct { OnOK func() OnClose func() ShowCancel bool // contains filtered or unexported fields }
func NewMessageBox ¶
func NewMessageBox(ui *ui, text, title string) *MessageBox
func (*MessageBox) Close ¶
func (t *MessageBox) Close()
func (*MessageBox) Show ¶
func (t *MessageBox) Show()
type UI ¶
type UI interface { NewView(text string) View NewViewFromPageFunc(f func(viewPort ViewPage) ViewText) View NewViewFromTextFunc(f func(viewPage ViewPage) string) View Post(f func()) ShowProgress(format string, v ...interface{}) Progress ShowMessageBox(title string, format string, v ...interface{}) ShowErrorMessageBox(format string, v ...interface{}) MessageBox(title, text string) *MessageBox ResizeAllViews() NewMenu(title string) Menu Version() string Quit() }
type View ¶
type View interface { Properties() *ViewProperties Show(BoundFunc) SetBound(BoundFunc) SyncWithView(view View) SetCurrentView() SetTop() SetTitle(title string) NotifyChanged() SetKey(key interface{}, handler func()) DeleteKey(key interface{}) ViewPage() ViewPage ReadLines() []string SetText(text string) Clear() PostOnUIThread(func()) Close() ScrollHorizontal(scroll int) ScrollVertical(scroll int) OnKeyArrowUp() OnKeyArrowDown() SetCurrentLine(line int) ShowLineAtTop(line int, forceScroll bool) ShowFrame(isShow bool) }
type ViewProperties ¶
type ViewProperties struct { Title string HasFrame bool HideCurrentLineMarker bool HideVerticalScrollbar bool HideHorizontalScrollbar bool OnLoad func() OnClose func() OnMouseLeft func(x, y int) OnMouseRight func(x, y int) OnMouseOutside func() OnMoved func() Name string IsEditable bool IsWrap bool IsMoveUpDownWrap bool OnEdit func() OnMoveCursor func() }
Properties that adjust view behavior and can be accessed via View.Properties()
Click to show internal directories.
Click to hide internal directories.