fs

package
v0.0.0-...-bbcbdef Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 9, 2023 License: Unlicense Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Elementer

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

Elementer is used to find child elements of an element.

type FileGetter

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

type Locator struct {
	mixins.LinearLayout
	// 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

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

NewLocator initializes and returns a *Locator.

func (*Locator) GainedFocus

func (f *Locator) GainedFocus()

func (*Locator) HasFocus

func (f *Locator) HasFocus() bool

func (*Locator) Init

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

func (f *Locator) IsFocusable() bool

func (*Locator) KeyDown

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

func (*Locator) KeyPress

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

func (*Locator) KeyRepeat

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

func (*Locator) KeyStroke

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

func (*Locator) KeyUp

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

func (*Locator) LoadDir

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

func (*Locator) LostFocus

func (f *Locator) LostFocus()

func (*Locator) OnGainedFocus

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

func (*Locator) OnLostFocus

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

func (*Locator) Paint

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

func (*Locator) Path

func (f *Locator) Path() string

func (*Locator) SetPath

func (f *Locator) SetPath(filePath string)

type Mod

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.
	Dirs

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

type Projecter

type Projecter interface {
	Project() setting.Project
}

Projecter is used to get the currently open project.

TODO: replace this with hooks on opening a project.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL