ui

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartUI

func StartUI()

Types

type ImageInfo

type ImageInfo struct {
	Block

	Rows        *[]rt.Tag
	WrapText    bool
	TextStyle   Style
	SelectedRow int

	SelectedRowStyle Style

	// Pointer to the List shown at the bottom of the UI, with Informations
	// about the selected Tag.
	// @ImageTagInfo can also be _nil_
	ImageTagInfo *widgets.List

	// ImagePtr points back to the original Image,
	// this is needed because BaseImage contains
	// the Function to delete Signatures
	ImagePtr *rt.BaseImage
	// contains filtered or unexported fields
}

func NewImageInfo

func NewImageInfo() *ImageInfo

func (*ImageInfo) DeleteSignature

func (ii *ImageInfo) DeleteSignature()

func (*ImageInfo) Draw

func (ii *ImageInfo) Draw(buf *Buffer)

func (*ImageInfo) ScrollAmount

func (ii *ImageInfo) ScrollAmount(amount int)

ScrollAmount scrolls by amount given. If amount is < 0, then scroll up. There is no need to set ii.topRow, as this will be set automatically when drawn, since if the selected item is off screen then the topRow variable will change accordingly.

func (*ImageInfo) ScrollBottom

func (ii *ImageInfo) ScrollBottom()

func (*ImageInfo) ScrollDown

func (ii *ImageInfo) ScrollDown()

func (*ImageInfo) ScrollHalfPageDown

func (ii *ImageInfo) ScrollHalfPageDown()

func (*ImageInfo) ScrollHalfPageUp

func (ii *ImageInfo) ScrollHalfPageUp()

func (*ImageInfo) ScrollPageDown

func (ii *ImageInfo) ScrollPageDown()

func (*ImageInfo) ScrollPageUp

func (ii *ImageInfo) ScrollPageUp()

func (*ImageInfo) ScrollTop

func (ii *ImageInfo) ScrollTop()

func (*ImageInfo) ScrollUp

func (ii *ImageInfo) ScrollUp()

type Tree

type Tree struct {
	Block
	TextStyle        Style
	SelectedRowStyle Style
	WrapText         bool
	SelectedRow      int
	// contains filtered or unexported fields
}

Tree is a tree widget.

func NewTree

func NewTree() *Tree

NewTree creates a new Tree widget.

func (*Tree) Collapse

func (self *Tree) Collapse()

noinspection GoReceiverNames

func (*Tree) CollapseAll

func (self *Tree) CollapseAll()

noinspection GoReceiverNames

func (*Tree) Draw

func (self *Tree) Draw(buf *Buffer)

noinspection GoReceiverNames

func (*Tree) Expand

func (self *Tree) Expand()

noinspection GoReceiverNames

func (*Tree) ExpandAll

func (self *Tree) ExpandAll()

noinspection GoReceiverNames

func (*Tree) ScrollAmount

func (self *Tree) ScrollAmount(amount int)

ScrollAmount scrolls by amount given. If amount is < 0, then scroll up. There is no need to set self.topRow, as this will be set automatically when drawn, since if the selected item is off screen then the topRow variable will change accordingly. noinspection GoReceiverNames

func (*Tree) ScrollBottom

func (self *Tree) ScrollBottom()

noinspection GoReceiverNames

func (*Tree) ScrollDown

func (self *Tree) ScrollDown()

noinspection GoReceiverNames

func (*Tree) ScrollHalfPageDown

func (self *Tree) ScrollHalfPageDown()

noinspection GoReceiverNames

func (*Tree) ScrollHalfPageUp

func (self *Tree) ScrollHalfPageUp()

noinspection GoReceiverNames

func (*Tree) ScrollPageDown

func (self *Tree) ScrollPageDown()

noinspection GoReceiverNames

func (*Tree) ScrollPageUp

func (self *Tree) ScrollPageUp()

noinspection GoReceiverNames

func (*Tree) ScrollTop

func (self *Tree) ScrollTop()

noinspection GoReceiverNames

func (*Tree) ScrollUp

func (self *Tree) ScrollUp()

noinspection GoReceiverNames

func (*Tree) SelectedNode

func (self *Tree) SelectedNode() *TreeNode

noinspection GoReceiverNames

func (*Tree) SetNodes

func (self *Tree) SetNodes(nodes []*TreeNode)

noinspection GoReceiverNames

func (*Tree) ToggleExpand

func (self *Tree) ToggleExpand()

noinspection GoReceiverNames

func (*Tree) Walk

func (self *Tree) Walk(fn TreeWalkFn)

noinspection GoReceiverNames

type TreeNode

type TreeNode struct {
	Value    fmt.Stringer
	Expanded bool
	Nodes    []*TreeNode

	// If Node/ Entry represents an Image, this filed *must* be a Pointer back to the Image
	Image registry.Image
	// contains filtered or unexported fields
}

TreeNode is a tree node.

type TreeWalkFn

type TreeWalkFn func(*TreeNode) bool

TreeWalkFn is a function used for walking a Tree. To interrupt the walking process function should return false.

Jump to

Keyboard shortcuts

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