Documentation ¶
Index ¶
- Constants
- Variables
- func CloseBuffer(v *View, commands []string) bool
- func DeleteLine(v *View, commands []string) bool
- func ExitPhi(v *View, commands []string) bool
- func GotoLine(v *View, commands []string) bool
- func NewFile(v *View, commands []string) bool
- func OpenFile(v *View, commands []string) bool
- func Paste(v *View, commands []string) bool
- func Redo(v *View, commands []string) bool
- func Save(v *View, commands []string) bool
- func ShowPalette(v *View, commands []string) bool
- func Undo(v *View, commands []string) bool
- type AutoCompleteBox
- type BaseComponent
- type Buffer
- type BufferAction
- type BufferConfig
- type BufferPane
- type CommandPalette
- type Component
- type Cursor
- type ReloadBufferEvent
- type View
Constants ¶
View Source
const (
DEFAULT_SCROLL_AMOUNT = 10
)
Variables ¶
View Source
var ( SHIFT_DOWN bool = false SUPER_DOWN = false // cmd on mac, ctrl on windows CONTROL_DOWN = false // what is this on windows? ALT_DOWN = false // option on mac CAPS_LOCK = false )
View Source
var DEBUG_MODE = false
Functions ¶
func CloseBuffer ¶
func DeleteLine ¶
func ShowPalette ¶ added in v0.1.1
Types ¶
type AutoCompleteBox ¶ added in v0.1.3
type AutoCompleteBox struct {
// contains filtered or unexported fields
}
TODO maybe have a thread that finds words in the current file and adds them to the vocabulary.
type BaseComponent ¶
type BaseComponent struct {
// contains filtered or unexported fields
}
func (*BaseComponent) HandleEvent ¶
func (b *BaseComponent) HandleEvent(evt strife.StrifeEvent)
func (*BaseComponent) HasFocus ¶ added in v0.1.1
func (b *BaseComponent) HasFocus() bool
func (*BaseComponent) Resize ¶
func (b *BaseComponent) Resize(w, h int)
func (*BaseComponent) SetFocus ¶ added in v0.1.1
func (b *BaseComponent) SetFocus(focus bool)
func (*BaseComponent) SetPosition ¶
func (b *BaseComponent) SetPosition(x, y int)
func (*BaseComponent) Translate ¶
func (b *BaseComponent) Translate(x, y int)
type Buffer ¶
type Buffer struct { BaseComponent // contains filtered or unexported fields }
func NewBuffer ¶
func NewBuffer(conf *cfg.TomlConfig, buffOpts BufferConfig, parent *View, index int) *Buffer
func (*Buffer) HandleEvent ¶
func (b *Buffer) HandleEvent(evt strife.StrifeEvent)
type BufferAction ¶
type BufferAction struct {
// contains filtered or unexported fields
}
func NewBufferAction ¶ added in v0.1.1
func NewBufferAction(name string, proc func(*View, []string) bool) BufferAction
type BufferConfig ¶ added in v0.1.1
type BufferConfig struct {
// contains filtered or unexported fields
}
type BufferPane ¶ added in v0.1.2
type BufferPane struct { BaseComponent Buff *Buffer // contains filtered or unexported fields }
func NewBufferPane ¶ added in v0.1.2
func NewBufferPane(buff *Buffer) *BufferPane
func (*BufferPane) OnRender ¶ added in v0.1.2
func (b *BufferPane) OnRender(ctx *strife.Renderer)
func (*BufferPane) OnUpdate ¶ added in v0.1.2
func (b *BufferPane) OnUpdate() bool
func (*BufferPane) Resize ¶ added in v0.1.2
func (b *BufferPane) Resize(w, h int)
func (*BufferPane) SetFocus ¶ added in v0.1.6
func (b *BufferPane) SetFocus(focus bool)
func (*BufferPane) SetPosition ¶ added in v0.1.2
func (b *BufferPane) SetPosition(x, y int)
type CommandPalette ¶
type CommandPalette struct { BaseComponent // contains filtered or unexported fields }
func NewCommandPalette ¶
func NewCommandPalette(conf cfg.TomlConfig, view *View) *CommandPalette
func (*CommandPalette) OnRender ¶
func (b *CommandPalette) OnRender(ctx *strife.Renderer)
func (*CommandPalette) OnUpdate ¶
func (b *CommandPalette) OnUpdate() bool
func (*CommandPalette) SetFocus ¶ added in v0.1.6
func (p *CommandPalette) SetFocus(focus bool)
type Cursor ¶
type Cursor struct {
// contains filtered or unexported fields
}
type ReloadBufferEvent ¶ added in v0.1.6
type ReloadBufferEvent struct {
// contains filtered or unexported fields
}
func (*ReloadBufferEvent) Process ¶ added in v0.1.6
func (r *ReloadBufferEvent) Process(view *View)
func (*ReloadBufferEvent) String ¶ added in v0.1.6
func (r *ReloadBufferEvent) String() string
type View ¶
type View struct { BaseComponent // contains filtered or unexported fields }
View is an array of buffers basically.
func (*View) UnfocusBuffers ¶ added in v0.1.1
func (n *View) UnfocusBuffers()
Click to show internal directories.
Click to hide internal directories.