vidar: Index | Files

package fs

import ""


Package Files

dirlabel.go filebox.go locator.go path_separator.go root_default.go user_home.go

type Elementer Uses

type Elementer interface {
    Elements() []interface{}

Elementer is used to find child elements of an element.

type FileGetter Uses

type FileGetter interface {
    CurrentFile() string

FileGetter is used to get the currently open file.

TODO: replace this with hooks on opening a file.

type Locator Uses

type Locator struct {
    // contains filtered or unexported fields

Locator is a type of UI element which prompts the user for a file path. It has completion features to help with locating existing files and folders.

func NewLocator Uses

func NewLocator(driver gxui.Driver, theme *basic.Theme, mod Mod) *Locator

NewLocator initializes and returns a *Locator.

func (*Locator) GainedFocus Uses

func (f *Locator) GainedFocus()

func (*Locator) HasFocus Uses

func (f *Locator) HasFocus() bool

func (*Locator) Init Uses

func (f *Locator) Init(driver gxui.Driver, theme *basic.Theme, mod Mod)

Init is provided for legacy reasons, as a way to initialize an uninitialized *Locator value. NewLocator should be used instead.

func (*Locator) IsFocusable Uses

func (f *Locator) IsFocusable() bool

func (*Locator) KeyDown Uses

func (f *Locator) KeyDown(event gxui.KeyboardEvent)

func (*Locator) KeyPress Uses

func (f *Locator) KeyPress(event gxui.KeyboardEvent) bool

func (*Locator) KeyRepeat Uses

func (f *Locator) KeyRepeat(event gxui.KeyboardEvent)

func (*Locator) KeyStroke Uses

func (f *Locator) KeyStroke(event gxui.KeyStrokeEvent) bool

func (*Locator) KeyUp Uses

func (f *Locator) KeyUp(event gxui.KeyboardEvent)

func (*Locator) LoadDir Uses

func (f *Locator) LoadDir(control gxui.Control)

func (*Locator) LostFocus Uses

func (f *Locator) LostFocus()

func (*Locator) OnGainedFocus Uses

func (f *Locator) OnGainedFocus(callback func()) gxui.EventSubscription

func (*Locator) OnLostFocus Uses

func (f *Locator) OnLostFocus(callback func()) gxui.EventSubscription

func (*Locator) Paint Uses

func (f *Locator) Paint(c gxui.Canvas)

func (*Locator) Path Uses

func (f *Locator) Path() string

func (*Locator) SetPath Uses

func (f *Locator) SetPath(filePath string)

type Mod Uses

type Mod int

Mod is a type to tell a Locator which types of files to locate.

const (
    // Files tells a Locator to only locate regular files.
    Files Mod = 1 << iota

    // Dirs tells a Locator to only locate directories.

    // All tells a Locator to locate all file types.
    All = Files | Dirs

type Projecter Uses

type Projecter interface {
    Project() setting.Project

Projecter is used to get the currently open project.

TODO: replace this with hooks on opening a project.

Package fs imports 12 packages (graph) and is imported by 2 packages. Updated 2019-12-19. Refresh now. Tools for package owners.