Documentation ¶
Index ¶
- Variables
- func AddHandler(hnd KeyHandler)
- func Bind(g *gocui.Gui) error
- func GetKeyBindingsAsStrings() map[string][]string
- type ClearPendingDeleteHandler
- type CloseCommandPanelHandler
- type Command
- type CommandPanelAzureSearchQueryHandler
- func (h *CommandPanelAzureSearchQueryHandler) CommandPanelNotification(state views.CommandPanelNotification)
- func (h *CommandPanelAzureSearchQueryHandler) DisplayText() string
- func (h *CommandPanelAzureSearchQueryHandler) Fn() func(g *gocui.Gui, v *gocui.View) error
- func (h *CommandPanelAzureSearchQueryHandler) Invoke() error
- func (h *CommandPanelAzureSearchQueryHandler) IsEnabled() bool
- type CommandPanelDownHandler
- type CommandPanelEnterHandler
- type CommandPanelFilterHandler
- func (h *CommandPanelFilterHandler) CommandPanelNotification(state views.CommandPanelNotification)
- func (h *CommandPanelFilterHandler) DisplayText() string
- func (h *CommandPanelFilterHandler) Fn() func(g *gocui.Gui, v *gocui.View) error
- func (h *CommandPanelFilterHandler) Invoke() error
- func (h *CommandPanelFilterHandler) IsEnabled() bool
- type CommandPanelHandler
- type CommandPanelUpHandler
- type ConfirmDeleteHandler
- type CopyHandler
- type FullscreenHandler
- type GlobalHandler
- type HandlerID
- type HelpHandler
- type ItemBackHandler
- type ItemHandler
- type ItemLeftHandler
- type ItemViewPageDownHandler
- type ItemViewPageUpHandler
- type KeyHandler
- type KeyHandlerBase
- type KeyMap
- type ListActionsHandler
- type ListBackHandler
- type ListBackLegacyHandler
- type ListClearFilterHandler
- type ListCopyItemIDHandler
- type ListDebugCopyItemDataHandler
- type ListDeleteHandler
- type ListDownHandler
- type ListEditHandler
- type ListEndHandler
- type ListExpandHandler
- type ListHandler
- type ListHomeHandler
- type ListOpenHandler
- type ListPageDownHandler
- type ListPageUpHandler
- type ListRefreshHandler
- type ListRightHandler
- type ListUpHandler
- type ListUpdateHandler
- type OpenCommandPanelHandler
- type QuitHandler
- type SortByDisplayText
- type ToggleDemoModeHandler
Constants ¶
This section is empty.
Variables ¶
var DefaultKeys = map[string]interface{}{ "quit": gocui.KeyCtrlC, "copy": gocui.KeyCtrlS, "listdelete": gocui.KeyDelete, "fullscreen": gocui.KeyF11, "help": gocui.KeyCtrlI, "itemback": gocui.KeyBackspace2, "itemleft": gocui.KeyArrowLeft, "listactions": gocui.KeyCtrlA, "listback": gocui.KeyBackspace2, "listbacklegacy": gocui.KeyBackspace, "listdown": gocui.KeyArrowDown, "listup": gocui.KeyArrowUp, "listright": gocui.KeyArrowRight, "listedit": gocui.KeyCtrlE, "listexpand": gocui.KeyEnter, "listopen": gocui.KeyCtrlO, "listrefresh": gocui.KeyF5, "listupdate": gocui.KeyCtrlU, "listpagedown": gocui.KeyPgdn, "listpageup": gocui.KeyPgup, "listend": gocui.KeyEnd, "listhome": gocui.KeyHome, "listclearfilter": gocui.KeyEsc, "confirmdelete": gocui.KeyCtrlY, "clearpendingdeletes": gocui.KeyCtrlN, "itempagedown": gocui.KeyPgdn, "itempageup": gocui.KeyPgup, "commandpanelopen": gocui.KeyCtrlP, "commandpaneldown": gocui.KeyArrowDown, "commandpanelup": gocui.KeyArrowUp, "commandpanelenter": gocui.KeyEnter, "filter": rune('/'), "commandpanelclose": gocui.KeyEsc, "azuresearchquery": gocui.KeyCtrlR, }
DefaultKeys are the default key bindings for each handler.
var GocuiKeyToStr = map[gocui.Key]string{ gocui.KeyArrowUp: "up", gocui.KeyArrowDown: "down", gocui.KeyArrowLeft: "left", gocui.KeyArrowRight: "right", gocui.KeyDelete: "delete", gocui.KeyHome: "home", gocui.KeyEnd: "end", gocui.KeyPgup: "pageup", gocui.KeyPgdn: "pagedown", gocui.KeyInsert: "insert", gocui.KeySpace: "space", gocui.KeyCtrl2: "ctrl+2 or ctrl+~ or ctrl+space", gocui.KeyCtrl4: "ctrl+4", gocui.KeyCtrl6: "ctrl+6", gocui.KeyCtrl8: "ctrl+8 or backspace2", gocui.KeyCtrlLsqBracket: "ctrl+[ or esc or ctrl+3", gocui.KeyCtrlRsqBracket: "ctrl+] or ctrl+5", gocui.KeyCtrlUnderscore: "ctrl+_ or ctrl+7", gocui.KeyCtrlA: "ctrl+a", gocui.KeyCtrlB: "ctrl+b", gocui.KeyCtrlC: "ctrl+c", gocui.KeyCtrlD: "ctrl+d", gocui.KeyCtrlE: "ctrl+e", gocui.KeyCtrlF: "ctrl+f", gocui.KeyCtrlG: "ctrl+g", gocui.KeyCtrlH: "ctrl+h or ctrl+backspace", gocui.KeyCtrlI: "ctrl+i or tab", gocui.KeyCtrlJ: "ctrl+j", gocui.KeyCtrlK: "ctrl+k", gocui.KeyCtrlL: "ctrl+l", gocui.KeyCtrlM: "enter or ctrl+m", gocui.KeyCtrlN: "ctrl+n", gocui.KeyCtrlO: "ctrl+o", gocui.KeyCtrlP: "ctrl+p", gocui.KeyCtrlQ: "ctrl+q", gocui.KeyCtrlR: "ctrl+r", gocui.KeyCtrlS: "ctrl+s", gocui.KeyCtrlT: "ctrl+t", gocui.KeyCtrlU: "ctrl+u", gocui.KeyCtrlV: "ctrl+v", gocui.KeyCtrlW: "ctrl+w", gocui.KeyCtrlX: "ctrl+x", gocui.KeyCtrlY: "ctrl+y", gocui.KeyCtrlZ: "ctrl+z", gocui.KeyF1: "f1", gocui.KeyF2: "f2", gocui.KeyF3: "f3", gocui.KeyF4: "f4", gocui.KeyF5: "f5", gocui.KeyF6: "f6", gocui.KeyF7: "f7", gocui.KeyF8: "f8", gocui.KeyF9: "f9", gocui.KeyF10: "f10", gocui.KeyF11: "f11", gocui.KeyF12: "f12", }
GocuiKeyToStr maps a gocui key to a string
var StrToGocuiKey = map[string]gocui.Key{ "up": gocui.KeyArrowUp, "down": gocui.KeyArrowDown, "left": gocui.KeyArrowLeft, "right": gocui.KeyArrowRight, "backspace": gocui.KeyBackspace, "backspace2": gocui.KeyBackspace2, "delete": gocui.KeyDelete, "home": gocui.KeyHome, "end": gocui.KeyEnd, "pageup": gocui.KeyPgup, "pagedown": gocui.KeyPgdn, "insert": gocui.KeyInsert, "tab": gocui.KeyTab, "space": gocui.KeySpace, "ctrl+2": gocui.KeyCtrl2, "ctrl+3": gocui.KeyCtrl3, "ctrl+4": gocui.KeyCtrl4, "ctrl+5": gocui.KeyCtrl5, "ctrl+6": gocui.KeyCtrl6, "ctrl+7": gocui.KeyCtrl7, "ctrl+8": gocui.KeyCtrl8, "ctrl+[": gocui.KeyCtrlLsqBracket, "ctrl+]": gocui.KeyCtrlRsqBracket, "ctrl+space": gocui.KeyCtrlSpace, "ctrl+_": gocui.KeyCtrlUnderscore, "ctrl+~": gocui.KeyCtrlTilde, "ctrl+a": gocui.KeyCtrlA, "ctrl+b": gocui.KeyCtrlB, "ctrl+c": gocui.KeyCtrlC, "ctrl+d": gocui.KeyCtrlD, "ctrl+e": gocui.KeyCtrlE, "ctrl+f": gocui.KeyCtrlF, "ctrl+g": gocui.KeyCtrlG, "ctrl+h": gocui.KeyCtrlH, "ctrl+i": gocui.KeyCtrlI, "ctrl+j": gocui.KeyCtrlJ, "ctrl+k": gocui.KeyCtrlK, "ctrl+l": gocui.KeyCtrlL, "ctrl+m": gocui.KeyCtrlM, "ctrl+n": gocui.KeyCtrlN, "ctrl+o": gocui.KeyCtrlO, "ctrl+p": gocui.KeyCtrlP, "ctrl+q": gocui.KeyCtrlQ, "ctrl+r": gocui.KeyCtrlR, "ctrl+s": gocui.KeyCtrlS, "ctrl+t": gocui.KeyCtrlT, "ctrl+u": gocui.KeyCtrlU, "ctrl+v": gocui.KeyCtrlV, "ctrl+w": gocui.KeyCtrlW, "ctrl+x": gocui.KeyCtrlX, "ctrl+y": gocui.KeyCtrlY, "ctrl+z": gocui.KeyCtrlZ, "esc": gocui.KeyEsc, "f1": gocui.KeyF1, "f2": gocui.KeyF2, "f3": gocui.KeyF3, "f4": gocui.KeyF4, "f5": gocui.KeyF5, "f6": gocui.KeyF6, "f7": gocui.KeyF7, "f8": gocui.KeyF8, "f9": gocui.KeyF9, "f10": gocui.KeyF10, "f11": gocui.KeyF11, "f12": gocui.KeyF12, "enter": gocui.KeyEnter, }
StrToGocuiKey maps a string representing they key to a gocui key
Functions ¶
func AddHandler ¶
func AddHandler(hnd KeyHandler)
AddHandler Adds a keybinding handler for use in Bind
func GetKeyBindingsAsStrings ¶
GetKeyBindingsAsStrings provides a map of Handler->Key in string format
Types ¶
type ClearPendingDeleteHandler ¶ added in v1.1.170
type ClearPendingDeleteHandler struct { GlobalHandler // contains filtered or unexported fields }
//////////////////////////////////////////////////////////////////
func NewClearPendingDeleteHandler ¶ added in v1.1.170
func NewClearPendingDeleteHandler(notificationWidget *views.NotificationWidget) *ClearPendingDeleteHandler
type CloseCommandPanelHandler ¶ added in v1.1.333
type CloseCommandPanelHandler struct { CommandPanelHandler // contains filtered or unexported fields }
func NewCloseCommandPanelHandler ¶ added in v1.1.333
func NewCloseCommandPanelHandler(commandPanelWidget *views.CommandPanelWidget) *CloseCommandPanelHandler
type Command ¶ added in v1.1.441
Command represents a command that can be listed in the Command Palette
type CommandPanelAzureSearchQueryHandler ¶ added in v1.1.427
type CommandPanelAzureSearchQueryHandler struct { ListHandler // contains filtered or unexported fields }
//////////////////////////////////////////////////////////////////
func NewCommandPanelAzureSearchQueryHandler ¶ added in v1.1.427
func NewCommandPanelAzureSearchQueryHandler(commandPanelWidget *views.CommandPanelWidget, content *views.ItemWidget, list *views.ListWidget) *CommandPanelAzureSearchQueryHandler
func (*CommandPanelAzureSearchQueryHandler) CommandPanelNotification ¶ added in v1.1.441
func (h *CommandPanelAzureSearchQueryHandler) CommandPanelNotification(state views.CommandPanelNotification)
func (*CommandPanelAzureSearchQueryHandler) DisplayText ¶ added in v1.1.441
func (h *CommandPanelAzureSearchQueryHandler) DisplayText() string
func (*CommandPanelAzureSearchQueryHandler) Invoke ¶ added in v1.1.441
func (h *CommandPanelAzureSearchQueryHandler) Invoke() error
func (*CommandPanelAzureSearchQueryHandler) IsEnabled ¶ added in v1.1.441
func (h *CommandPanelAzureSearchQueryHandler) IsEnabled() bool
type CommandPanelDownHandler ¶ added in v1.1.441
type CommandPanelDownHandler struct { CommandPanelHandler // contains filtered or unexported fields }
func NewCommandPanelDownHandler ¶ added in v1.1.441
func NewCommandPanelDownHandler(commandPanelWidget *views.CommandPanelWidget) *CommandPanelDownHandler
type CommandPanelEnterHandler ¶ added in v1.1.441
type CommandPanelEnterHandler struct { CommandPanelHandler // contains filtered or unexported fields }
func NewCommandPanelEnterHandler ¶ added in v1.1.441
func NewCommandPanelEnterHandler(commandPanelWidget *views.CommandPanelWidget) *CommandPanelEnterHandler
type CommandPanelFilterHandler ¶ added in v1.1.333
type CommandPanelFilterHandler struct { GlobalHandler // contains filtered or unexported fields }
//////////////////////////////////////////////////////////////////
func NewCommandPanelFilterHandler ¶ added in v1.1.333
func NewCommandPanelFilterHandler(commandPanelWidget *views.CommandPanelWidget, list *views.ListWidget) *CommandPanelFilterHandler
func (*CommandPanelFilterHandler) CommandPanelNotification ¶ added in v1.1.441
func (h *CommandPanelFilterHandler) CommandPanelNotification(state views.CommandPanelNotification)
func (*CommandPanelFilterHandler) DisplayText ¶ added in v1.1.441
func (h *CommandPanelFilterHandler) DisplayText() string
func (*CommandPanelFilterHandler) Invoke ¶ added in v1.1.441
func (h *CommandPanelFilterHandler) Invoke() error
func (*CommandPanelFilterHandler) IsEnabled ¶ added in v1.1.441
func (h *CommandPanelFilterHandler) IsEnabled() bool
type CommandPanelHandler ¶ added in v1.1.333
type CommandPanelHandler struct {
KeyHandlerBase
}
CommandPanelHandler is a parent struct for all key handlers not tied to a specific view.
func (CommandPanelHandler) Widget ¶ added in v1.1.333
func (h CommandPanelHandler) Widget() string
Widget returns the name of the widget this handler binds to
type CommandPanelUpHandler ¶ added in v1.1.441
type CommandPanelUpHandler struct { CommandPanelHandler // contains filtered or unexported fields }
func NewCommandPanelUpHandler ¶ added in v1.1.441
func NewCommandPanelUpHandler(commandPanelWidget *views.CommandPanelWidget) *CommandPanelUpHandler
type ConfirmDeleteHandler ¶ added in v1.1.170
type ConfirmDeleteHandler struct { GlobalHandler // contains filtered or unexported fields }
//////////////////////////////////////////////////////////////////
func NewConfirmDeleteHandler ¶ added in v1.1.170
func NewConfirmDeleteHandler(notificationWidget *views.NotificationWidget) *ConfirmDeleteHandler
type CopyHandler ¶
type CopyHandler struct { GlobalHandler Content *views.ItemWidget StatusBar *views.StatusbarWidget }
//////////////////////////////////////////////////////////////////
func NewCopyHandler ¶
func NewCopyHandler(content *views.ItemWidget, statusbar *views.StatusbarWidget) *CopyHandler
func (*CopyHandler) DisplayText ¶ added in v1.1.441
func (h *CopyHandler) DisplayText() string
func (*CopyHandler) Invoke ¶ added in v1.1.441
func (h *CopyHandler) Invoke() error
func (*CopyHandler) IsEnabled ¶ added in v1.1.441
func (h *CopyHandler) IsEnabled() bool
type FullscreenHandler ¶
type FullscreenHandler struct { GlobalHandler List *views.ListWidget IsFullscreen *bool Content *views.ItemWidget }
//////////////////////////////////////////////////////////////////
func NewFullscreenHandler ¶
func NewFullscreenHandler(list *views.ListWidget, content *views.ItemWidget, isFullscreen *bool) *FullscreenHandler
type GlobalHandler ¶
type GlobalHandler struct {
KeyHandlerBase
}
GlobalHandler is a parent struct for all key handlers not tied to a specific view.
func (GlobalHandler) Widget ¶
func (h GlobalHandler) Widget() string
Widget returns the name of the widget this handler binds to
type HandlerID ¶ added in v1.1.285
type HandlerID string
HandlerID is used as the ID for Key Handlers
const ( HandlerIDQuit HandlerID = "quit" //nolint:golint HandlerIDCopy HandlerID = "copy" //nolint:golint HandlerIDListDelete HandlerID = "listdelete" //nolint:golint HandlerIDFullScreen HandlerID = "fullscreen" //nolint:golint HandlerIDHelp HandlerID = "help" //nolint:golint HandlerIDItemBack HandlerID = "itemback" //nolint:golint HandlerIDItemLeft HandlerID = "itemleft" //nolint:golint HandlerIDListActions HandlerID = "listactions" //nolint:golint HandlerIDListBack HandlerID = "listback" //nolint:golint HandlerIDListBackLegacy HandlerID = "listbacklegacy" //nolint:golint HandlerIDListDown HandlerID = "listdown" //nolint:golint HandlerIDListUp HandlerID = "listup" //nolint:golint HandlerIDListRight HandlerID = "listright" //nolint:golint HandlerIDListEdit HandlerID = "listedit" //nolint:golint HandlerIDListExpand HandlerID = "listexpand" //nolint:golint HandlerIDListOpen HandlerID = "listopen" //nolint:golint HandlerIDListRefresh HandlerID = "listrefresh" //nolint:golint HandlerIDListUpdate HandlerID = "listupdate" //nolint:golint HandlerIDListPageDown HandlerID = "listpagedown" //nolint:golint HandlerIDListPageUp HandlerID = "listpageup" //nolint:golint HandlerIDListEnd HandlerID = "listend" //nolint:golint HandlerIDListHome HandlerID = "listhome" //nolint:golint HandlerIDListClearFilter HandlerID = "listclearfilter" //nolint:golint HandlerIDListCopyItemID HandlerID = "listcopyitemid" //nolint:golint HandlerIDListDebugCopyItemData HandlerID = "listdebugcopyitemdata" //nolint:golint HandlerIDConfirmDelete HandlerID = "confirmdelete" //nolint:golint HandlerIDClearPendingDeletes HandlerID = "clearpendingdeletes" //nolint:golint HandlerIDItemPageDown HandlerID = "itempagedown" //nolint:golint HandlerIDItemPageUp HandlerID = "itempageup" //nolint:golint HandlerIDToggleOpenCommandPanel HandlerID = "commandpanelopen" //nolint:golint HandlerIDToggleCloseCommandPanel HandlerID = "commandpanelclose" //nolint:golint HandlerIDCommandPanelDown HandlerID = "commandpaneldown" //nolint:golint HandlerIDCommandPanelUp HandlerID = "commandpanelup" //nolint:golint HandlerIDCommandPanelEnter HandlerID = "commandpanelenter" //nolint:golint HandlerIDFilter HandlerID = "filter" //nolint:golint HandlerIDAzureSearchQuery HandlerID = "azuresearchquery" //nolist:golint HandlerIDToggleDemoMode HandlerID = "toggledemomode" //nolist:golint )
type HelpHandler ¶
type HelpHandler struct { GlobalHandler ShowHelp *bool }
//////////////////////////////////////////////////////////////////
func NewHelpHandler ¶
func NewHelpHandler(showHelp *bool) *HelpHandler
type ItemBackHandler ¶
type ItemBackHandler struct { ItemHandler List *views.ListWidget }
//////////////////////////////////////////////////////////////////
func NewItemBackHandler ¶
func NewItemBackHandler(list *views.ListWidget) *ItemBackHandler
type ItemHandler ¶
type ItemHandler struct {
KeyHandlerBase
}
ItemHandler is a parent struct for all key handlers tied to the item widget view
func (ItemHandler) Widget ¶
func (h ItemHandler) Widget() string
Widget returns the name of the widget this handler binds to
type ItemLeftHandler ¶
type ItemLeftHandler struct { ItemHandler EditModeEnabled *bool }
//////////////////////////////////////////////////////////////////
func NewItemLeftHandler ¶
func NewItemLeftHandler(editModeEnabled *bool) *ItemLeftHandler
type ItemViewPageDownHandler ¶ added in v1.1.251
type ItemViewPageDownHandler struct { ItemHandler ItemView *views.ItemWidget }
//////////////////////////////////////////////////////////////////
func NewItemViewPageDownHandler ¶ added in v1.1.251
func NewItemViewPageDownHandler(itemView *views.ItemWidget) *ItemViewPageDownHandler
type ItemViewPageUpHandler ¶ added in v1.1.251
type ItemViewPageUpHandler struct { ItemHandler ItemView *views.ItemWidget }
//////////////////////////////////////////////////////////////////
func NewItemViewPageUpHandler ¶ added in v1.1.251
func NewItemViewPageUpHandler(itemView *views.ItemWidget) *ItemViewPageUpHandler
type KeyHandler ¶
type KeyHandler interface { ID() string Fn() func(g *gocui.Gui, v *gocui.View) error Widget() string DefaultKey() interface{} }
KeyHandler is an interface that all key handlers must implement
type KeyHandlerBase ¶
type KeyHandlerBase struct {
// contains filtered or unexported fields
}
KeyHandlerBase A base structure that will return the associated handler id from the HandlersId array and a default key for the handler.
func (KeyHandlerBase) DefaultKey ¶
func (h KeyHandlerBase) DefaultKey() interface{}
DefaultKey returns the default key mapped to the handler
func (KeyHandlerBase) ID ¶ added in v1.1.50
func (h KeyHandlerBase) ID() string
ID returns the name of this item for example "listup"
type KeyMap ¶
type KeyMap map[string][]interface{}
KeyMap reprsents the current mappings from Handler -> Key
type ListActionsHandler ¶
type ListActionsHandler struct { ListHandler List *views.ListWidget Context context.Context }
//////////////////////////////////////////////////////////////////
func NewListActionsHandler ¶
func NewListActionsHandler(list *views.ListWidget, context context.Context) *ListActionsHandler
func (*ListActionsHandler) DisplayText ¶ added in v1.1.441
func (h *ListActionsHandler) DisplayText() string
func (*ListActionsHandler) Invoke ¶ added in v1.1.441
func (h *ListActionsHandler) Invoke() error
func (*ListActionsHandler) IsEnabled ¶ added in v1.1.441
func (h *ListActionsHandler) IsEnabled() bool
type ListBackHandler ¶
type ListBackHandler struct { ListHandler List *views.ListWidget }
//////////////////////////////////////////////////////////////////
func NewListBackHandler ¶
func NewListBackHandler(list *views.ListWidget) *ListBackHandler
type ListBackLegacyHandler ¶
type ListBackLegacyHandler struct { ListHandler List *views.ListWidget }
//////////////////////////////////////////////////////////////////
func NewListBackLegacyHandler ¶
func NewListBackLegacyHandler(list *views.ListWidget) *ListBackLegacyHandler
type ListClearFilterHandler ¶ added in v1.1.333
type ListClearFilterHandler struct { ListHandler List *views.ListWidget }
//////////////////////////////////////////////////////////////////
func NewListClearFilterHandler ¶ added in v1.1.333
func NewListClearFilterHandler(list *views.ListWidget) *ListClearFilterHandler
type ListCopyItemIDHandler ¶ added in v1.1.467
type ListCopyItemIDHandler struct { ListHandler List *views.ListWidget StatusBar *views.StatusbarWidget }
//////////////////////////////////////////////////////////////////
func NewListCopyItemIDHandler ¶ added in v1.1.467
func NewListCopyItemIDHandler(list *views.ListWidget, statusBar *views.StatusbarWidget) *ListCopyItemIDHandler
func (*ListCopyItemIDHandler) DisplayText ¶ added in v1.1.467
func (h *ListCopyItemIDHandler) DisplayText() string
func (*ListCopyItemIDHandler) Invoke ¶ added in v1.1.467
func (h *ListCopyItemIDHandler) Invoke() error
func (*ListCopyItemIDHandler) IsEnabled ¶ added in v1.1.467
func (h *ListCopyItemIDHandler) IsEnabled() bool
type ListDebugCopyItemDataHandler ¶ added in v1.1.485
type ListDebugCopyItemDataHandler struct { ListHandler List *views.ListWidget StatusBar *views.StatusbarWidget }
//////////////////////////////////////////////////////////////////
func NewListDebugCopyItemDataHandler ¶ added in v1.1.485
func NewListDebugCopyItemDataHandler(list *views.ListWidget, statusBar *views.StatusbarWidget) *ListDebugCopyItemDataHandler
func (*ListDebugCopyItemDataHandler) DisplayText ¶ added in v1.1.485
func (h *ListDebugCopyItemDataHandler) DisplayText() string
func (*ListDebugCopyItemDataHandler) Invoke ¶ added in v1.1.485
func (h *ListDebugCopyItemDataHandler) Invoke() error
func (*ListDebugCopyItemDataHandler) IsEnabled ¶ added in v1.1.485
func (h *ListDebugCopyItemDataHandler) IsEnabled() bool
type ListDeleteHandler ¶
type ListDeleteHandler struct { ListHandler List *views.ListWidget NotificationWidget *views.NotificationWidget }
//////////////////////////////////////////////////////////////////
func NewListDeleteHandler ¶
func NewListDeleteHandler(list *views.ListWidget, notificationWidget *views.NotificationWidget) *ListDeleteHandler
type ListDownHandler ¶
type ListDownHandler struct { ListHandler List *views.ListWidget }
//////////////////////////////////////////////////////////////////
func NewListDownHandler ¶
func NewListDownHandler(list *views.ListWidget) *ListDownHandler
type ListEditHandler ¶
type ListEditHandler struct { ListHandler List *views.ListWidget EditModeEnabled *bool }
//////////////////////////////////////////////////////////////////
func NewListEditHandler ¶
func NewListEditHandler(list *views.ListWidget, editModeEnabled *bool) *ListEditHandler
type ListEndHandler ¶ added in v1.1.104
type ListEndHandler struct { ListHandler List *views.ListWidget }
/////////////////////////////////////////////////////////////////
func NewListEndHandler ¶ added in v1.1.104
func NewListEndHandler(list *views.ListWidget) *ListEndHandler
type ListExpandHandler ¶
type ListExpandHandler struct { ListHandler List *views.ListWidget }
//////////////////////////////////////////////////////////////////
func NewListExpandHandler ¶
func NewListExpandHandler(list *views.ListWidget) *ListExpandHandler
type ListHandler ¶
type ListHandler struct {
KeyHandlerBase
}
ListHandler is a parent struct for all key handlers tied to the list widget view
func (ListHandler) Widget ¶
func (h ListHandler) Widget() string
Widget returns the name of the widget this handler binds to
type ListHomeHandler ¶ added in v1.1.104
type ListHomeHandler struct { ListHandler List *views.ListWidget }
/////////////////////////////////////////////////////////////////
func NewListHomeHandler ¶ added in v1.1.104
func NewListHomeHandler(list *views.ListWidget) *ListHomeHandler
type ListOpenHandler ¶
type ListOpenHandler struct { ListHandler List *views.ListWidget Context context.Context }
//////////////////////////////////////////////////////////////////
func NewListOpenHandler ¶
func NewListOpenHandler(list *views.ListWidget, context context.Context) *ListOpenHandler
func (*ListOpenHandler) DisplayText ¶ added in v1.1.441
func (h *ListOpenHandler) DisplayText() string
func (*ListOpenHandler) Invoke ¶ added in v1.1.441
func (h *ListOpenHandler) Invoke() error
func (*ListOpenHandler) IsEnabled ¶ added in v1.1.441
func (h *ListOpenHandler) IsEnabled() bool
type ListPageDownHandler ¶ added in v1.1.104
type ListPageDownHandler struct { ListHandler List *views.ListWidget }
/////////////////////////////////////////////////////////////////
func NewListPageDownHandler ¶ added in v1.1.104
func NewListPageDownHandler(list *views.ListWidget) *ListPageDownHandler
type ListPageUpHandler ¶ added in v1.1.104
type ListPageUpHandler struct { ListHandler List *views.ListWidget }
/////////////////////////////////////////////////////////////////
func NewListPageUpHandler ¶ added in v1.1.104
func NewListPageUpHandler(list *views.ListWidget) *ListPageUpHandler
type ListRefreshHandler ¶
type ListRefreshHandler struct { ListHandler List *views.ListWidget }
//////////////////////////////////////////////////////////////////
func NewListRefreshHandler ¶
func NewListRefreshHandler(list *views.ListWidget) *ListRefreshHandler
type ListRightHandler ¶
type ListRightHandler struct { ListHandler List *views.ListWidget EditModeEnabled *bool }
//////////////////////////////////////////////////////////////////
func NewListRightHandler ¶
func NewListRightHandler(list *views.ListWidget, editModeEnabled *bool) *ListRightHandler
type ListUpHandler ¶
type ListUpHandler struct { ListHandler List *views.ListWidget }
//////////////////////////////////////////////////////////////////
func NewListUpHandler ¶
func NewListUpHandler(list *views.ListWidget) *ListUpHandler
type ListUpdateHandler ¶
type ListUpdateHandler struct { ListHandler List *views.ListWidget Context context.Context Content *views.ItemWidget Gui *gocui.Gui // contains filtered or unexported fields }
//////////////////////////////////////////////////////////////////
func NewListUpdateHandler ¶
func NewListUpdateHandler(list *views.ListWidget, statusbar *views.StatusbarWidget, ctx context.Context, content *views.ItemWidget, gui *gocui.Gui) *ListUpdateHandler
func (*ListUpdateHandler) DisplayText ¶ added in v1.1.441
func (h *ListUpdateHandler) DisplayText() string
func (*ListUpdateHandler) Invoke ¶ added in v1.1.441
func (h *ListUpdateHandler) Invoke() error
func (*ListUpdateHandler) IsEnabled ¶ added in v1.1.441
func (h *ListUpdateHandler) IsEnabled() bool
type OpenCommandPanelHandler ¶ added in v1.1.333
type OpenCommandPanelHandler struct { GlobalHandler // contains filtered or unexported fields }
//////////////////////////////////////////////////////////////////
func NewOpenCommandPanelHandler ¶ added in v1.1.333
func NewOpenCommandPanelHandler(gui *gocui.Gui, commandPanelWidget *views.CommandPanelWidget, commands []Command) *OpenCommandPanelHandler
func (*OpenCommandPanelHandler) CommandPanelNotification ¶ added in v1.1.441
func (h *OpenCommandPanelHandler) CommandPanelNotification(state views.CommandPanelNotification)
type QuitHandler ¶
type QuitHandler struct {
GlobalHandler
}
//////////////////////////////////////////////////////////////////
func NewQuitHandler ¶
func NewQuitHandler() *QuitHandler
type SortByDisplayText ¶ added in v1.1.441
type SortByDisplayText []Command
SortByDisplayText allows sorting an array of Commands by DisplayText
func (SortByDisplayText) Len ¶ added in v1.1.441
func (s SortByDisplayText) Len() int
func (SortByDisplayText) Less ¶ added in v1.1.441
func (s SortByDisplayText) Less(i, j int) bool
func (SortByDisplayText) Swap ¶ added in v1.1.441
func (s SortByDisplayText) Swap(i, j int)
type ToggleDemoModeHandler ¶ added in v1.1.485
type ToggleDemoModeHandler struct { GlobalHandler Settings *config.Settings List *views.ListWidget Status *views.StatusbarWidget Content *views.ItemWidget }
//////////////////////////////////////////////////////////////////
func NewToggleDemoModeHandler ¶ added in v1.1.485
func NewToggleDemoModeHandler(settings *config.Settings, list *views.ListWidget, status *views.StatusbarWidget, content *views.ItemWidget) *ToggleDemoModeHandler
func (*ToggleDemoModeHandler) DisplayText ¶ added in v1.1.485
func (h *ToggleDemoModeHandler) DisplayText() string
func (*ToggleDemoModeHandler) Invoke ¶ added in v1.1.485
func (h *ToggleDemoModeHandler) Invoke() error
func (*ToggleDemoModeHandler) IsEnabled ¶ added in v1.1.485
func (h *ToggleDemoModeHandler) IsEnabled() bool