Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type App ¶
type App interface {
Components() []Component
Redraw()
RedrawComponent(int)
AddComponents(...Component)
Clear()
Run()
Quit()
OnQuit() <-chan struct{}
Window() Window
AddKeyHandler(key keyboard.Key, h func())
// Встроенное логирование.
LogInfo(message string, args ...any)
LogFatal(message string, args ...any)
}
Объект приложения
type Button ¶
type Button struct {
OnClick func()
Component
// contains filtered or unexported fields
}
Объект кнопки, нажимающейся от нажатия её клавиши
type Component ¶
type Component interface {
MaxWidth() int
DisplayMode() DisplayMode
// contains filtered or unexported methods
}
Объект компонента приложения.
type DisplayMode ¶
type DisplayMode int
const ( DisplayInline DisplayMode = iota // В одну строку DisplayBlock // На отдельной строке DisplayNewLine // Перенос строки )
type Label ¶
type Label struct {
Text string
// contains filtered or unexported fields
}
Текст. Может быть покрашен
func NewDynamicLabel ¶
Создание объекта текста с возможностью изменения. maxLength это место, зарезервированное под метку в символах
func NewStaticLabel ¶
Создание объекта текста без возможности изменения.
Click to show internal directories.
Click to hide internal directories.