Documentation ¶
Overview ¶
Package padding provides a widget that pads an inner widget on the sides, above and below
Index ¶
- func Render(w IWidget, size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) gowid.ICanvas
- func UserInput(w IWidget, ev interface{}, size gowid.IRenderSize, focus gowid.Selector, ...) bool
- type IWidget
- type Options
- type Widget
- func (w *Widget) HAlign() gowid.IHAlignment
- func (w *Widget) Height() gowid.IWidgetDimension
- func (w *Widget) OnSetAlign(f gowid.IWidgetChangedCallback)
- func (w *Widget) OnSetHeight(f gowid.IWidgetChangedCallback)
- func (w *Widget) RemoveOnSetAlign(f gowid.IIdentity)
- func (w *Widget) RemoveOnSetHeight(f gowid.IIdentity)
- func (w *Widget) Render(size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) gowid.ICanvas
- func (w *Widget) RenderSize(size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) gowid.IRenderBox
- func (w *Widget) Selectable() bool
- func (w *Widget) SetHAlign(i gowid.IHAlignment, app gowid.IApp)
- func (w *Widget) SetHeight(i gowid.IWidgetDimension, app gowid.IApp)
- func (w *Widget) SetSubWidget(wi gowid.IWidget, app gowid.IApp)
- func (w *Widget) SetVAlign(i gowid.IVAlignment, app gowid.IApp)
- func (w *Widget) SetWidth(i gowid.IWidgetDimension, app gowid.IApp)
- func (w *Widget) String() string
- func (w *Widget) SubWidget() gowid.IWidget
- func (w *Widget) SubWidgetSize(size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) gowid.IRenderSize
- func (w *Widget) UserInput(ev interface{}, size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) bool
- func (w *Widget) VAlign() gowid.IVAlignment
- func (w *Widget) Width() gowid.IWidgetDimension
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type IWidget ¶
type IWidget interface { gowid.ICompositeWidget HAlign() gowid.IHAlignment Width() gowid.IWidgetDimension VAlign() gowid.IVAlignment Height() gowid.IWidgetDimension }
type Widget ¶
type Widget struct { Callbacks *gowid.Callbacks gowid.FocusCallbacks gowid.SubWidgetCallbacks // contains filtered or unexported fields }
Widget renders the wrapped widget with the provided width; if the wrapped widget is a box, or the wrapped widget is to be packed to a width smaller than specified, the wrapped widget can be aligned in the middle, left or right
func New ¶
func New(inner gowid.IWidget, valign gowid.IVAlignment, height gowid.IWidgetDimension, halign gowid.IHAlignment, width gowid.IWidgetDimension, opts ...Options) *Widget
func (*Widget) HAlign ¶
func (w *Widget) HAlign() gowid.IHAlignment
func (*Widget) Height ¶
func (w *Widget) Height() gowid.IWidgetDimension
func (*Widget) OnSetAlign ¶
func (w *Widget) OnSetAlign(f gowid.IWidgetChangedCallback)
func (*Widget) OnSetHeight ¶
func (w *Widget) OnSetHeight(f gowid.IWidgetChangedCallback)
func (*Widget) RemoveOnSetAlign ¶
func (*Widget) RemoveOnSetHeight ¶
func (*Widget) RenderSize ¶
func (w *Widget) RenderSize(size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) gowid.IRenderBox
func (*Widget) Selectable ¶
func (*Widget) SubWidgetSize ¶
func (w *Widget) SubWidgetSize(size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) gowid.IRenderSize
func (*Widget) VAlign ¶
func (w *Widget) VAlign() gowid.IVAlignment
func (*Widget) Width ¶
func (w *Widget) Width() gowid.IWidgetDimension
Click to show internal directories.
Click to hide internal directories.