Documentation ¶
Index ¶
- Constants
- func ActionBarLabel(str string) string
- func ClampInt(v, min, max int) int
- func Color(c string) tcell.Color
- func Confirm(app *App, message string) bool
- func CurrentScreenName() string
- func DefaultStyle() tcell.Style
- func DrawBox(screen tcell.Screen, x1, y1, x2, y2 int, style tcell.Style)
- func DrawText(screen tcell.Screen, x, y int, style tcell.Style, text string)
- func DrawTextLimited(s tcell.Screen, x1, y1, x2, y2 int, style tcell.Style, text string) int
- func Error(message string)
- func GoBack()
- func GoTo(name string, args ...interface{})
- func MaxInt(x, y int) int
- func MinInt(x, y int) int
- func MustLoadColorScheme() map[string]interface{}
- func OpenLink(url string)
- func PreviousScreenName() string
- func RegisterGoto(name string, f func(args ...interface{}))
- func Success(message string)
- type ActionBar
- func (b *ActionBar) AddItem(item *ActionBarItem)
- func (b *ActionBar) AddItemWithStyles(text1 string, text2 string, text1Style tcell.Style, text2Style tcell.Style)
- func (b *ActionBar) AddTextItem(id string, text string)
- func (b *ActionBar) Clear()
- func (b *ActionBar) Destroy()
- func (b *ActionBar) Draw(screen tcell.Screen)
- func (b *ActionBar) GetItem(index int) *ActionBarItem
- func (b *ActionBar) HandleKeyEvent(ev *tcell.EventKey)
- func (b *ActionBar) RemoveItem(id int)
- func (b *ActionBar) RemoveItemAtIndex(index int)
- func (b *ActionBar) Resize(screenX, screenY int)
- func (b *ActionBar) TrimItemsTo(index int)
- func (b *ActionBar) Update()
- type ActionBarAction
- type ActionBarItem
- type App
- func (a *App) AddDrawable(drawable Drawable)
- func (a *App) AddFlash(flash Drawable, duration time.Duration)
- func (a *App) AddSystem(system System)
- func (a *App) ClearNow()
- func (a *App) Close()
- func (a *App) CurrentView() interface{}
- func (a *App) IsLoading() bool
- func (a *App) IsQuit() bool
- func (a *App) KeepAlive(component interface{})
- func (a *App) LastDrawable() Drawable
- func (a *App) Loading(flag bool)
- func (a *App) LoadingWithText(flag bool, text string)
- func (a *App) PanicRecover()
- func (a *App) Quit()
- func (a *App) RemoveDrawable(drawable Drawable)
- func (a *App) RemoveSystem(system System)
- func (a *App) Render()
- func (a *App) RunOnAppRoutine(f func())
- func (a *App) SetDirty()
- func (a *App) SetView(view View)
- func (a *App) Start()
- func (a *App) UnKeepAlive(component interface{})
- type Confirmation
- type Drawable
- type FuzzyFind
- func (f *FuzzyFind) AlwaysShowAllResults()
- func (f *FuzzyFind) Draw(screen tcell.Screen)
- func (f *FuzzyFind) ForceUpdate()
- func (f *FuzzyFind) GetQuery() string
- func (f *FuzzyFind) GetSelectedItem() string
- func (f *FuzzyFind) HandleKeyEvent(ev *tcell.EventKey)
- func (f *FuzzyFind) Resize(screenX, screenY int)
- func (f *FuzzyFind) SetDebounceDisabled(b bool)
- func (f *FuzzyFind) SetDebounceMs(d time.Duration)
- func (f *FuzzyFind) SetQuery(q string)
- func (f *FuzzyFind) Update()
- type FuzzyFindResult
- type KeyListener
- type Resizable
- type SpinnerTCell
- type System
- type Text
- type TextBox
- type View
Constants ¶
View Source
const ( Bottom = -1 Top = 1 Left = 1 Right = -1 ActionBarMaxItems = 10 ActionBarItemPadding = 1 MessageLabelNone = "-" )
View Source
const ( FPS = 30 FPSMilliseconds = time.Second / FPS )
View Source
const ( Yes = 'y' No = 'n' QuestionMark = "? " )
View Source
const ( ResultsMarginBottom = 3 WriteIndicator = "> " MaxResults = 4096 DefaultSupplierDebounce = 50 * time.Millisecond SearchResultsPivot = 6 )
View Source
const (
EmptyLine = ""
)
Variables ¶
This section is empty.
Functions ¶
func ActionBarLabel ¶
func CurrentScreenName ¶
func CurrentScreenName() string
func DefaultStyle ¶
func DefaultStyle() tcell.Style
func DrawTextLimited ¶
func GoTo ¶
func GoTo(name string, args ...interface{})
GoTo it's not a perfect solution ... but it's the only one that works, and not lead into cycled-import errors. For example, you can go from projects view into issues view, and from issues view into projects view. Both views are in different packages therefor it leas to cyclic-import
func MustLoadColorScheme ¶
func MustLoadColorScheme() map[string]interface{}
func PreviousScreenName ¶
func PreviousScreenName() string
func RegisterGoto ¶
func RegisterGoto(name string, f func(args ...interface{}))
Types ¶
type ActionBar ¶
type ActionBar struct { Action chan ActionBarAction Y int X int // contains filtered or unexported fields }
func NewActionBar ¶
func (*ActionBar) AddItem ¶
func (b *ActionBar) AddItem(item *ActionBarItem)
func (*ActionBar) AddItemWithStyles ¶
func (*ActionBar) AddTextItem ¶
func (*ActionBar) GetItem ¶
func (b *ActionBar) GetItem(index int) *ActionBarItem
func (*ActionBar) HandleKeyEvent ¶
func (b *ActionBar) HandleKeyEvent(ev *tcell.EventKey)
func (*ActionBar) RemoveItem ¶
func (*ActionBar) RemoveItemAtIndex ¶
func (*ActionBar) TrimItemsTo ¶
type ActionBarAction ¶
type ActionBarAction int
type ActionBarItem ¶
type ActionBarItem struct { Id int Text1 string Text2 string Text1Style tcell.Style Text2Style tcell.Style TriggerRune rune TriggerKey tcell.Key // contains filtered or unexported fields }
func NewActionBarItem ¶
func NewActionBarItem(id int, text string, triggerRune rune, triggerKey tcell.Key) *ActionBarItem
func (*ActionBarItem) ChangeText ¶
func (b *ActionBarItem) ChangeText(text1 string, text2 string)
func (*ActionBarItem) ChangeText2 ¶
func (b *ActionBarItem) ChangeText2(text2 string)
type App ¶
func CreateNewApp ¶
func CreateNewApp() *App
func CreateNewAppWithScreen ¶
func CreateNewAppWithScreen(screen tcell.Screen) *App
CreateNewAppWithScreen accessible for testing
func InitTestApp ¶
func InitTestApp(s tcell.SimulationScreen) *App
func (*App) AddDrawable ¶
func (*App) CurrentView ¶
func (a *App) CurrentView() interface{}
func (*App) LastDrawable ¶
func (*App) LoadingWithText ¶
func (*App) PanicRecover ¶
func (a *App) PanicRecover()
func (*App) RemoveDrawable ¶
func (*App) RemoveSystem ¶
func (*App) RunOnAppRoutine ¶
func (a *App) RunOnAppRoutine(f func())
func (*App) UnKeepAlive ¶
func (a *App) UnKeepAlive(component interface{})
type Confirmation ¶
type Confirmation struct { Complete chan bool // contains filtered or unexported fields }
func (*Confirmation) Draw ¶
func (c *Confirmation) Draw(screen tcell.Screen)
func (*Confirmation) HandleKeyEvent ¶
func (c *Confirmation) HandleKeyEvent(ev *tcell.EventKey)
func (*Confirmation) Resize ¶
func (c *Confirmation) Resize(screenX, screenY int)
func (*Confirmation) Update ¶
func (c *Confirmation) Update()
type FuzzyFind ¶
type FuzzyFind struct { MarginTop int MarginBottom int Complete chan FuzzyFindResult // contains filtered or unexported fields }
func NewFuzzyFind ¶
func (*FuzzyFind) AlwaysShowAllResults ¶
func (f *FuzzyFind) AlwaysShowAllResults()
func (*FuzzyFind) ForceUpdate ¶
func (f *FuzzyFind) ForceUpdate()
func (*FuzzyFind) GetSelectedItem ¶
func (*FuzzyFind) HandleKeyEvent ¶
func (f *FuzzyFind) HandleKeyEvent(ev *tcell.EventKey)
func (*FuzzyFind) SetDebounceDisabled ¶
func (*FuzzyFind) SetDebounceMs ¶
type FuzzyFindResult ¶
type KeyListener ¶
type KeyListener interface {
HandleKeyEvent(keyEvent *tcell.EventKey)
}
type SpinnerTCell ¶
type SpinnerTCell struct {
// contains filtered or unexported fields
}
func NewSimpleSpinner ¶
func NewSimpleSpinner() *SpinnerTCell
func (*SpinnerTCell) Draw ¶
func (t *SpinnerTCell) Draw(screen tcell.Screen)
type Text ¶
type Text struct {
// contains filtered or unexported fields
}
func (*Text) ChangeText ¶
Click to show internal directories.
Click to hide internal directories.