Documentation ¶
Overview ¶
Package pile provides a widget for organizing other widgets in a vertical stack.
Index ¶
- func Render(w IWidget, size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) gowid.ICanvas
- func RenderBoxMaker(w IWidget, size gowid.IRenderSize, focus gowid.Selector, focusIdx int, ...) ([]gowid.IRenderBox, []gowid.IRenderSize)
- func RenderSize(w gowid.ICompositeMultipleWidget, size gowid.IRenderSize, focus gowid.Selector, ...) gowid.IRenderBox
- func RenderSubwidgets(w IWidget, size gowid.IRenderSize, focus gowid.Selector, focusIdx int, ...) []gowid.ICanvas
- func RenderedChildrenSizes(w IWidget, size gowid.IRenderSize, focus gowid.Selector, focusIdx int, ...) ([]gowid.IRenderBox, []gowid.IRenderSize)
- func UserInput(w IWidget, ev interface{}, size gowid.IRenderSize, focus gowid.Selector, ...) bool
- type BoxMakerFunc
- type IFocusSelectable
- type IPileBoxMaker
- type IWidget
- type Options
- type Widget
- func (w *Widget) Dimensions() []gowid.IWidgetDimension
- func (w *Widget) FindNextSelectable(dir gowid.Direction, wrap bool) (int, bool)
- func (w *Widget) Focus() int
- func (w *Widget) GetPreferedPosition() gwutil.IntOption
- func (w *Widget) Render(size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) gowid.ICanvas
- func (w *Widget) RenderBoxMaker(size gowid.IRenderSize, focus gowid.Selector, focusIdx int, app gowid.IApp, ...) ([]gowid.IRenderBox, []gowid.IRenderSize)
- func (w *Widget) RenderSize(size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) gowid.IRenderBox
- func (w *Widget) RenderSubWidgets(size gowid.IRenderSize, focus gowid.Selector, focusIdx int, app gowid.IApp) []gowid.ICanvas
- func (w *Widget) RenderedSubWidgetsSizes(size gowid.IRenderSize, focus gowid.Selector, focusIdx int, app gowid.IApp) []gowid.IRenderBox
- func (w *Widget) SelectChild(f gowid.Selector) bool
- func (w *Widget) Selectable() bool
- func (w *Widget) SetDimensions(dimensions []gowid.IWidgetDimension, app gowid.IApp)
- func (w *Widget) SetFocus(app gowid.IApp, i int)
- func (w *Widget) SetPreferedPosition(rows int, app gowid.IApp)
- func (w *Widget) SetSubWidgets(widgets []gowid.IWidget, app gowid.IApp)
- func (w *Widget) String() string
- func (w *Widget) SubWidgetSize(size gowid.IRenderSize, newY int, sub gowid.IWidget, ...) gowid.IRenderSize
- func (w *Widget) SubWidgets() []gowid.IWidget
- func (w *Widget) UserInput(ev interface{}, size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) bool
- func (w *Widget) Wrap() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RenderBoxMaker ¶
func RenderBoxMaker(w IWidget, size gowid.IRenderSize, focus gowid.Selector, focusIdx int, app gowid.IApp, fn IPileBoxMaker) ([]gowid.IRenderBox, []gowid.IRenderSize)
func RenderSize ¶
func RenderSize(w gowid.ICompositeMultipleWidget, size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) gowid.IRenderBox
func RenderSubwidgets ¶
func RenderedChildrenSizes ¶
func RenderedChildrenSizes(w IWidget, size gowid.IRenderSize, focus gowid.Selector, focusIdx int, app gowid.IApp) ([]gowid.IRenderBox, []gowid.IRenderSize)
Types ¶
type BoxMakerFunc ¶
type BoxMakerFunc func(gowid.IWidget, gowid.IRenderSize, gowid.Selector, gowid.IApp) gowid.IRenderBox
func (BoxMakerFunc) MakeBox ¶
func (f BoxMakerFunc) MakeBox(w gowid.IWidget, s gowid.IRenderSize, b gowid.Selector, c gowid.IApp) gowid.IRenderBox
type IFocusSelectable ¶
type IFocusSelectable interface { gowid.IFocus gowid.IFindNextSelectable }
type IPileBoxMaker ¶
type IPileBoxMaker interface {
MakeBox(gowid.IWidget, gowid.IRenderSize, gowid.Selector, gowid.IApp) gowid.IRenderBox
}
TODO - make this an interface
type IWidget ¶
type IWidget interface { gowid.ICompositeMultipleWidget gowid.ISettableDimensions gowid.ISettableSubWidgets gowid.IFindNextSelectable gowid.IPreferedPosition gowid.ISelectChild RenderBoxMaker(size gowid.IRenderSize, focus gowid.Selector, focusIdx int, app gowid.IApp, fn IPileBoxMaker) ([]gowid.IRenderBox, []gowid.IRenderSize) Wrap() bool }
type Widget ¶
type Widget struct { Callbacks *gowid.Callbacks gowid.FocusCallbacks gowid.SubWidgetsCallbacks // contains filtered or unexported fields }
func NewWithDim ¶
func NewWithDim(method gowid.IWidgetDimension, ws ...interface{}) *Widget
func (*Widget) Dimensions ¶
func (w *Widget) Dimensions() []gowid.IWidgetDimension
func (*Widget) FindNextSelectable ¶
func (*Widget) GetPreferedPosition ¶
func (*Widget) RenderBoxMaker ¶
func (w *Widget) RenderBoxMaker(size gowid.IRenderSize, focus gowid.Selector, focusIdx int, app gowid.IApp, fn IPileBoxMaker) ([]gowid.IRenderBox, []gowid.IRenderSize)
TODO - widen each line to same width gcdoc - the fn argument is used to return either canvases or sizes, depending on whether the caller is rendering, or rendering subsizes
func (*Widget) RenderSize ¶
func (w *Widget) RenderSize(size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) gowid.IRenderBox
func (*Widget) RenderSubWidgets ¶
func (*Widget) RenderedSubWidgetsSizes ¶
func (w *Widget) RenderedSubWidgetsSizes(size gowid.IRenderSize, focus gowid.Selector, focusIdx int, app gowid.IApp) []gowid.IRenderBox
func (*Widget) Selectable ¶
func (*Widget) SetDimensions ¶
func (w *Widget) SetDimensions(dimensions []gowid.IWidgetDimension, app gowid.IApp)
func (*Widget) SetSubWidgets ¶
func (*Widget) SubWidgetSize ¶
func (w *Widget) SubWidgetSize(size gowid.IRenderSize, newY int, sub gowid.IWidget, dim gowid.IWidgetDimension) gowid.IRenderSize
SubWidgetSize is the size that should be used to render a child widget, based on the size used to render the parent.
func (*Widget) SubWidgets ¶
Click to show internal directories.
Click to hide internal directories.