uiCommon

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2017 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MAX_SORT_COLUMNS = 5
	AscendingText    = "( " + UpArrow + " ascending )"
	DescendingText   = "( " + DownArrow + " descending )"
)
View Source
const (
	// Unicode characters: http://graphemica.com/unicode/characters/page/34
	DownArrow       = string('\U00002193')
	UpArrow         = string('\U00002191')
	DownArrowTiny   = string('\U0000A71C')
	UpArrowTiny     = string('\U0000A71B')
	TriangleUp      = string('\U000025B4')
	TriangleDown    = string('\U000025BE')
	RightArrow      = string('\U00002192')
	LeftArrow       = string('\U00002190')
	InfoIcon        = string('\U00002139')
	Ellipsis        = string('\U00002026')
	TwoDot          = string('\U00002025')
	OneDot          = string('\U00002024')
	CircleBackslash = string('\U000020E0')
)
View Source
const LOCK_COLUMNS = 1

Variables

This section is empty.

Functions

This section is empty.

Types

type AttentionType added in v0.7.8

type AttentionType int

Used to determine the attention level of each table's cell (specific field in a display table)

const (
	ATTENTION_NORMAL AttentionType = iota
	ATTENTION_HOT
	ATTENTION_WARM
	ATTENTION_NOT_DESIRED_STATE
	ATTENTION_ACTIVITY
)

type ColumnType

type ColumnType int
const (
	ALPHANUMERIC ColumnType = iota
	NUMERIC
	TIMESTAMP
)

type DisplayViewInterface

type DisplayViewInterface interface {
	RefreshDisplay(g *gocui.Gui) error
	GetTopOffset() int
}

type EditColumnViewAbs

type EditColumnViewAbs struct {
	// contains filtered or unexported fields
}

func NewEditColumnViewAbs

func NewEditColumnViewAbs(masterUI masterUIInterface.MasterUIInterface, name string, listWidget *ListWidget) *EditColumnViewAbs

func (*EditColumnViewAbs) Layout

func (w *EditColumnViewAbs) Layout(g *gocui.Gui) error

func (*EditColumnViewAbs) Name

func (w *EditColumnViewAbs) Name() string

func (*EditColumnViewAbs) RefreshDisplay

func (w *EditColumnViewAbs) RefreshDisplay(g *gocui.Gui) error

type EditFilterView

type EditFilterView struct {
	*EditColumnViewAbs
	// contains filtered or unexported fields
}

func NewEditFilterView

func NewEditFilterView(masterUI masterUIInterface.MasterUIInterface, name string, listWidget *ListWidget) *EditFilterView

type EditSortView

type EditSortView struct {
	*EditColumnViewAbs
	// contains filtered or unexported fields
}

func NewEditSortView

func NewEditSortView(masterUI masterUIInterface.MasterUIInterface, name string, listWidget *ListWidget) *EditSortView

type FilterColumn

type FilterColumn struct {
	// contains filtered or unexported fields
}

type IColumnOwner added in v0.7.8

type IColumnOwner interface{}

type IData

type IData interface {
	Id() string
}

type Input

type Input struct {
	// contains filtered or unexported fields
}

func NewInput

func NewInput(
	parentUI managerUI.Manager,
	name string,
	offsetX, offsetY,
	width,
	maxLength int,
	inputValue string,
	applyCallbackFunc applyCallbackFunc,
	cancelCallbackFunc cancelCallbackFunc,
) *Input

func (*Input) Edit

func (w *Input) Edit(v *gocui.View, key gocui.Key, ch rune, mod gocui.Modifier)

func (*Input) Layout

func (i *Input) Layout(g *gocui.Gui) error

func (*Input) Name

func (i *Input) Name() string

type InputDialogWidget

type InputDialogWidget struct {
	// contains filtered or unexported fields
}

InputDialogWidget used for displaying a label and input field

func NewInputDialogWidget

func NewInputDialogWidget(
	masterUI masterUIInterface.MasterUIInterface,
	name string,
	width, height int,
	labelText string, maxLength int,
	titleText string, helpText string,
	valueText string,
	applyValueCallback applyCallbackFunc) *InputDialogWidget

func (*InputDialogWidget) CloseWidget

func (w *InputDialogWidget) CloseWidget(g *gocui.Gui, v *gocui.View) error

func (*InputDialogWidget) Init

func (w *InputDialogWidget) Init(g *gocui.Gui) error

func (*InputDialogWidget) Layout

func (w *InputDialogWidget) Layout(g *gocui.Gui) error

func (*InputDialogWidget) Name

func (w *InputDialogWidget) Name() string

type Label

type Label struct {
	// contains filtered or unexported fields
}

func NewLabel

func NewLabel(parentUI managerUI.Manager, name string, offsetX, offsetY int, labelText string) *Label

func (*Label) Layout

func (l *Label) Layout(g *gocui.Gui) error

func (*Label) Name

func (l *Label) Name() string

type LayoutManager

type LayoutManager struct {
	// contains filtered or unexported fields
}

func NewLayoutManager

func NewLayoutManager() *LayoutManager

func (*LayoutManager) Add

func (w *LayoutManager) Add(addMgr managerUI.Manager)

func (*LayoutManager) AddToBack added in v0.7.3

func (w *LayoutManager) AddToBack(addMgr managerUI.Manager)

func (*LayoutManager) Contains

func (w *LayoutManager) Contains(managerToFind managerUI.Manager) bool

func (*LayoutManager) ContainsViewName added in v0.7.3

func (w *LayoutManager) ContainsViewName(viewName string) bool

func (*LayoutManager) GetManagerByViewName

func (w *LayoutManager) GetManagerByViewName(managerViewNameToRemove string) managerUI.Manager

func (*LayoutManager) Layout

func (w *LayoutManager) Layout(g *gocui.Gui) error

func (*LayoutManager) Remove

func (w *LayoutManager) Remove(managerToRemove managerUI.Manager) managerUI.Manager

func (*LayoutManager) RemoveByName

func (w *LayoutManager) RemoveByName(managerViewNameToRemove string) managerUI.Manager

func (*LayoutManager) SetCurrentView added in v0.7.3

func (w *LayoutManager) SetCurrentView(viewName string) bool

func (*LayoutManager) Top

func (w *LayoutManager) Top() managerUI.Manager

type ListColumn

type ListColumn struct {
	// contains filtered or unexported fields
}

func NewListColumn

func NewListColumn(
	id, label string,
	size int,
	columnType ColumnType,
	leftJustifyLabel bool,
	sortFunc util.LessFunc,
	defaultReverseSort bool,
	displayFunc getRowDisplayFunc,
	rawValueFunc getRowRawValueFunc,
	attentionFunc getRowAttentionFunc) *ListColumn

type ListWidget

type ListWidget struct {
	Title string

	PreRowDisplayFunc preRowDisplayFunc
	// contains filtered or unexported fields
}

func NewListWidget

func NewListWidget(masterUI masterUIInterface.MasterUIInterface, name string,
	bottomMargin int, displayView DisplayViewInterface,
	columns []*ListColumn, columnOwner IColumnOwner) *ListWidget

func (*ListWidget) FilterAndSortData

func (asUI *ListWidget) FilterAndSortData()

func (*ListWidget) FilterRow

func (asUI *ListWidget) FilterRow(data IData) bool

func (*ListWidget) GetColumns

func (asUI *ListWidget) GetColumns() []*ListColumn

func (*ListWidget) GetFilterColumnMap

func (asUI *ListWidget) GetFilterColumnMap() map[string]*FilterColumn

func (*ListWidget) GetListData added in v0.7.6

func (asUI *ListWidget) GetListData() []IData

func (*ListWidget) GetSortColumns added in v0.7.9

func (asUI *ListWidget) GetSortColumns() []*SortColumn

func (*ListWidget) GetSortFunctions

func (asUI *ListWidget) GetSortFunctions() []util.LessFunc

func (*ListWidget) HighlightKey

func (asUI *ListWidget) HighlightKey() string

func (*ListWidget) Layout

func (w *ListWidget) Layout(g *gocui.Gui) error

func (*ListWidget) Name

func (w *ListWidget) Name() string

func (*ListWidget) RefreshDisplay

func (asUI *ListWidget) RefreshDisplay(g *gocui.Gui) error

func (*ListWidget) SetListData

func (asUI *ListWidget) SetListData(listData []IData)

func (*ListWidget) SetSortColumns

func (asUI *ListWidget) SetSortColumns(sortColumns []*SortColumn)
type MenuItem struct {
	// contains filtered or unexported fields
}

func NewMenuItem

func NewMenuItem(id, label string) *MenuItem

type SelectMenuWidget

type SelectMenuWidget struct {
	// contains filtered or unexported fields
}

func NewSelectMenuWidget

func NewSelectMenuWidget(
	masterUI masterUIInterface.MasterUIInterface,
	name string,
	title string,
	menuItems []*MenuItem,
	menuItemSelectedCallback menuItemSelectedCallbackFunc) *SelectMenuWidget

func (*SelectMenuWidget) GetMenuSelection

func (w *SelectMenuWidget) GetMenuSelection() *MenuItem

func (*SelectMenuWidget) Layout

func (w *SelectMenuWidget) Layout(g *gocui.Gui) error

func (*SelectMenuWidget) Name

func (w *SelectMenuWidget) Name() string

func (*SelectMenuWidget) RefreshDisplay

func (w *SelectMenuWidget) RefreshDisplay(g *gocui.Gui) error

func (*SelectMenuWidget) SetMenuId

func (w *SelectMenuWidget) SetMenuId(menuId string)

type SortColumn

type SortColumn struct {
	Id          string
	ReverseSort bool
}

func NewSortColumn

func NewSortColumn(id string, reverseSort bool) *SortColumn

Directories

Path Synopsis
views

Jump to

Keyboard shortcuts

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