tmpl

package
v3.0.0-...-86ecd83 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: MIT Imports: 7 Imported by: 0

README

Шаблоны приложений

Documentation

Index

Constants

View Source
const (
	LoggerId = "logger:id"
	HelperId = "helper:id"
)

Variables

This section is empty.

Functions

func MakeTableGroup

func MakeTableGroup(cw []int, align []Alignment, wts ...*WidgetTheme) (*w.ATable, *DataProviderTable)

Types

type AppTmpl

type AppTmpl struct {
	Mx        sync.RWMutex
	ModeEdit  bool // true is edit, false read
	Size      image.Rectangle
	Theme     *WidgetTheme
	Grid      *Grid
	ChanLog   chan *w.LogRecord
	ChanDraw  chan Drawable
	ChanEvent chan *Event
	// contains filtered or unexported fields
}

func NewAppTmpl

func NewAppTmpl(isRealBuf bool, chanSizes ...uint8) *AppTmpl

NewAppTmpl - создает шаблон приложения @chanSizes: 0 - log, 1 - draw, 2 - events

func (*AppTmpl) AddToStorage

func (app *AppTmpl) AddToStorage(id string, param interface{})

func (*AppTmpl) ClearFocus

func (app *AppTmpl) ClearFocus()

func (*AppTmpl) Close

func (app *AppTmpl) Close()

func (*AppTmpl) Err

func (app *AppTmpl) Err(msg string)

func (*AppTmpl) Focus

func (app *AppTmpl) Focus() string

func (*AppTmpl) GetParam

func (app *AppTmpl) GetParam(id string) interface{}

func (*AppTmpl) Info

func (app *AppTmpl) Info(msg string)

func (*AppTmpl) Render

func (app *AppTmpl) Render()

func (*AppTmpl) SetFocus

func (app *AppTmpl) SetFocus(id string)

func (*AppTmpl) Warn

func (app *AppTmpl) Warn(msg string)

type CellDetail

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

func MakeCellDetailWithSchema

func MakeCellDetailWithSchema(row, col uint8, w AdaptiveSize, schema *GridSchema) *CellDetail

func MakeCellDetailWithWidget

func MakeCellDetailWithWidget(row, col uint8, w AdaptiveSize, widget interface{}) *CellDetail

func NewCellDetail

func NewCellDetail(row, col uint8, size AdaptiveSize) *CellDetail

func (*CellDetail) GetName

func (cd *CellDetail) GetName() string

func (*CellDetail) GetRowIdx

func (cd *CellDetail) GetRowIdx() uint8

func (*CellDetail) GetSchema

func (cd *CellDetail) GetSchema() (*GridSchema, error)

func (*CellDetail) GetWidget

func (cd *CellDetail) GetWidget() (Drawable, error)

func (*CellDetail) IsSchema

func (cd *CellDetail) IsSchema() bool

func (*CellDetail) SetName

func (cd *CellDetail) SetName(name string)

func (*CellDetail) SetSchema

func (cd *CellDetail) SetSchema(schema *GridSchema)

func (*CellDetail) SetWidget

func (cd *CellDetail) SetWidget(widget interface{})

type GridSchema

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

func NewGridSchema

func NewGridSchema(sizes ...AdaptiveSize) *GridSchema

func (*GridSchema) AddCell

func (gs *GridSchema) AddCell(rowInSchema uint8, cd *CellDetail)

func (*GridSchema) AddSchema

func (gs *GridSchema) AddSchema(rowInSchema uint8, schema *GridSchema)

func (*GridSchema) Build

func (gs *GridSchema) Build() []interface{}

Build - по количеству строк в схеме

func (*GridSchema) BuildGrid

func (gs *GridSchema) BuildGrid(maxX, maxY int) *Grid

func (*GridSchema) GetWidgets

func (gs *GridSchema) GetWidgets() map[string]Drawable

type GridSchemaBuilder

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

type TUIAppTmpl

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

func New

func New(isRealBuf bool, theme *WidgetTheme) *TUIAppTmpl

New - создать новый шаблон приложения

func (*TUIAppTmpl) ClearFocus

func (app *TUIAppTmpl) ClearFocus()

func (*TUIAppTmpl) Close

func (app *TUIAppTmpl) Close()

func (*TUIAppTmpl) Draw

func (app *TUIAppTmpl) Draw(wgd Drawable)

func (*TUIAppTmpl) GetSize

func (app *TUIAppTmpl) GetSize() image.Rectangle

func (*TUIAppTmpl) Listen

func (app *TUIAppTmpl) Listen()

func (*TUIAppTmpl) Render

func (app *TUIAppTmpl) Render()

func (*TUIAppTmpl) SetFocus

func (app *TUIAppTmpl) SetFocus(id string)

func (*TUIAppTmpl) SetGrid

func (app *TUIAppTmpl) SetGrid(grid *Grid)

SetGrid - если сетка была сформирована во вне

Jump to

Keyboard shortcuts

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