uiCommon

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2016 License: Apache-2.0 Imports: 12 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 ColumnType

type ColumnType int
const (
	ALPHANUMERIC ColumnType = iota
	NUMERIC
)

type DisplayViewInterface

type DisplayViewInterface interface {
	RefreshDisplay(g *gocui.Gui) error
	SetDisplayPaused(paused bool)
	GetDisplayPaused() bool
}

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 IData

type IData interface {
	Id() string
}

type Input

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

func NewInput

func NewInput(
	parentUI masterUIInterface.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 masterUIInterface.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 masterUIInterface.Manager)

func (*LayoutManager) Contains

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

func (*LayoutManager) GetManagerByViewName

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

func (*LayoutManager) Layout

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

func (*LayoutManager) Remove

func (*LayoutManager) RemoveByName

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

func (*LayoutManager) Top

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) *ListColumn

type ListWidget

type ListWidget struct {
	Title string

	PreRowDisplayFunc getRowDisplayFunc
	// contains filtered or unexported fields
}

func NewListWidget

func NewListWidget(masterUI masterUIInterface.MasterUIInterface, name string,
	topMargin, bottomMargin int, displayView DisplayViewInterface,
	columns []*ListColumn) *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) 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 {
	// contains filtered or unexported fields
}

func NewSortColumn

func NewSortColumn(id string, reverseSort bool) *SortColumn

Jump to

Keyboard shortcuts

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