Documentation ¶
Index ¶
- type FileTree
- func (vm *FileTree) ConstrainLayout()
- func (vm *FileTree) CursorDown() bool
- func (vm *FileTree) CursorLeft(filterRegex *regexp.Regexp) error
- func (vm *FileTree) CursorRight(filterRegex *regexp.Regexp) error
- func (vm *FileTree) CursorUp() bool
- func (vm *FileTree) ExpandLayout()
- func (vm *FileTree) IsVisible() bool
- func (vm *FileTree) PageDown() error
- func (vm *FileTree) PageUp() error
- func (vm *FileTree) Render() error
- func (vm *FileTree) ResetCursor()
- func (vm *FileTree) SetTreeByLayer(bottomTreeStart, bottomTreeStop, topTreeStart, topTreeStop int) error
- func (vm *FileTree) Setup(lowerBound, height int)
- func (vm *FileTree) ToggleAttributes() error
- func (vm *FileTree) ToggleCollapse(filterRegex *regexp.Regexp) error
- func (vm *FileTree) ToggleCollapseAll() error
- func (vm *FileTree) ToggleShowDiffType(diffType filetree.DiffType)
- func (vm *FileTree) Update(filterRegex *regexp.Regexp, width, height int) error
- type LayerCompareMode
- type LayerSelection
- type LayerSetState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileTree ¶
type FileTree struct { ModelTree *filetree.FileTree ViewTree *filetree.FileTree RefTrees []*filetree.FileTree CollapseAll bool ShowAttributes bool HiddenDiffTypes []bool TreeIndex int Buffer bytes.Buffer // contains filtered or unexported fields }
FileTreeViewModel holds the UI objects and data models for populating the right pane. Specifically the pane that shows selected layer or aggregate file ASCII tree.
func NewFileTreeViewModel ¶
func NewFileTreeViewModel(tree *filetree.FileTree, refTrees []*filetree.FileTree, cache filetree.Comparer) (treeViewModel *FileTree, err error)
NewFileTreeViewModel creates a new view object attached the the global [gocui] screen object.
func (*FileTree) ConstrainLayout ¶
func (vm *FileTree) ConstrainLayout()
func (*FileTree) CursorDown ¶
doCursorDown performs the internal view's buffer adjustments on cursor down. Note: this is independent of the gocui buffer.
func (*FileTree) CursorLeft ¶
CursorLeft moves the cursor up until we reach the Parent Node or top of the tree
func (*FileTree) CursorRight ¶
CursorRight descends into directory expanding it if needed
func (*FileTree) CursorUp ¶
doCursorUp performs the internal view's buffer adjustments on cursor up. Note: this is independent of the gocui buffer.
func (*FileTree) ExpandLayout ¶
func (vm *FileTree) ExpandLayout()
func (*FileTree) IsVisible ¶
IsVisible indicates if the file tree view pane is currently initialized
func (*FileTree) ResetCursor ¶
func (vm *FileTree) ResetCursor()
ResetCursor moves the cursor back to the top of the buffer and translates to the top of the buffer.
func (*FileTree) SetTreeByLayer ¶
func (vm *FileTree) SetTreeByLayer(bottomTreeStart, bottomTreeStop, topTreeStart, topTreeStop int) error
SetTreeByLayer populates the view model by stacking the indicated image layer file trees.
func (*FileTree) Setup ¶
Setup initializes the UI concerns within the context of a global [gocui] view object.
func (*FileTree) ToggleAttributes ¶
ToggleCollapse will collapse/expand the selected FileNode.
func (*FileTree) ToggleCollapse ¶
ToggleCollapse will collapse/expand the selected FileNode.
func (*FileTree) ToggleCollapseAll ¶
ToggleCollapseAll will collapse/expand the all directories.
func (*FileTree) ToggleShowDiffType ¶
ToggleShowDiffType will show/hide the selected DiffType in the filetree pane.
type LayerCompareMode ¶
type LayerCompareMode int
const ( CompareSingleLayer LayerCompareMode = iota CompareAllLayers )
type LayerSelection ¶
type LayerSetState ¶
type LayerSetState struct { LayerIndex int Layers []*image.Layer CompareMode LayerCompareMode CompareStartIndex int }
func NewLayerSetState ¶
func NewLayerSetState(layers []*image.Layer, compareMode LayerCompareMode) *LayerSetState
func (*LayerSetState) GetCompareIndexes ¶
func (state *LayerSetState) GetCompareIndexes() (bottomTreeStart, bottomTreeStop, topTreeStart, topTreeStop int)
getCompareIndexes determines the layer boundaries to use for comparison (based on the current compare mode)