boxadapter

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package boxadapter provides a widget that will allow a box widget to be used in a flow context. Based on urwid's BoxAdapter - http://urwid.org/reference/widget.html#boxadapter.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Render

func RenderSize

func RenderSize(w IBoxAdapter, size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) gowid.IRenderBox

func SubWidgetSize

func SubWidgetSize(w IBoxAdapter, size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) gowid.IRenderSize

SubWidgetSize is the same as RenderSize for this widget - the inner widget will be rendered as a box with the specified number of columns and the widget's set number of rows.

func UserInput

func UserInput(w IBoxAdapterWidget, ev interface{}, size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) bool

Ensure that a valid mouse interaction with a flow widget will result in a mouse interaction with the subwidget

Types

type IBoxAdapter

type IBoxAdapter interface {
	Rows() int
}

type IBoxAdapterWidget

type IBoxAdapterWidget interface {
	gowid.ICompositeWidget
	IBoxAdapter
}

type Widget

type Widget struct {
	gowid.IWidget

	*gowid.Callbacks
	gowid.SubWidgetCallbacks
	// contains filtered or unexported fields
}

func New

func New(inner gowid.IWidget, rows int) *Widget

func (*Widget) Render

func (w *Widget) Render(size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) gowid.ICanvas

func (*Widget) RenderSize

func (w *Widget) RenderSize(size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) gowid.IRenderBox

func (*Widget) Rows

func (w *Widget) Rows() int

func (*Widget) SetRows

func (w *Widget) SetRows(rows int, app gowid.IApp)

func (*Widget) SetSubWidget

func (w *Widget) SetSubWidget(wi gowid.IWidget, app gowid.IApp)

func (*Widget) String

func (w *Widget) String() string

func (*Widget) SubWidget

func (w *Widget) SubWidget() gowid.IWidget

func (*Widget) SubWidgetSize

func (w *Widget) SubWidgetSize(size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) gowid.IRenderSize

func (*Widget) UserInput

func (w *Widget) UserInput(ev interface{}, size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) bool

Jump to

Keyboard shortcuts

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