Documentation ¶
Overview ¶
Package keypress provides a widget which responds to keyboard input.
Index ¶
- func Render(w IWidget, size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) gowid.ICanvas
- func RenderSize(w IWidget, size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) gowid.IRenderBox
- func SubWidgetSize(w gowid.ICompositeWidget, size gowid.IRenderSize, focus gowid.Selector, ...) gowid.IRenderSize
- func UserInput(w IKeyPresser, ev interface{}, size gowid.IRenderSize, focus gowid.Selector, ...) bool
- type ICustomKeys
- type IKeyPresser
- type IWidget
- type KeyPressFunction
- type Options
- type Widget
- func (w *Widget) CustomSelectKeys() bool
- func (w *Widget) KeyPress(key gowid.IKey, app gowid.IApp)
- 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) SelectKeys() []gowid.IKey
- func (w *Widget) SetSubWidget(wi gowid.IWidget, 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
- type WidgetCallback
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RenderSize ¶
func RenderSize(w IWidget, size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) gowid.IRenderBox
func SubWidgetSize ¶
func SubWidgetSize(w gowid.ICompositeWidget, size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) gowid.IRenderSize
func UserInput ¶
func UserInput(w IKeyPresser, ev interface{}, size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) bool
Types ¶
type ICustomKeys ¶
type IKeyPresser ¶
type IKeyPresser interface { gowid.IKeyPress ICustomKeys gowid.IComposite }
type IWidget ¶
type IWidget interface { gowid.ICompositeWidget }
IWidget is implemented by any widget that contains exactly one exposed subwidget (ICompositeWidget) and that is decorated on its left and right (IDecoratedAround).
type KeyPressFunction ¶
type Widget ¶
type Widget struct { *gowid.Callbacks gowid.SubWidgetCallbacks gowid.KeyPressCallbacks gowid.IsSelectable // contains filtered or unexported fields }
func (*Widget) CustomSelectKeys ¶
func (*Widget) RenderSize ¶
func (w *Widget) RenderSize(size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) gowid.IRenderBox
func (*Widget) SelectKeys ¶
func (*Widget) SubWidgetSize ¶
func (w *Widget) SubWidgetSize(size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) gowid.IRenderSize
type WidgetCallback ¶
type WidgetCallback struct { Name interface{} KeyPressFunction }
WidgetCallback is a simple struct with a name field for IIdentity and that embeds a WidgetChangedFunction to be issued as a callback when a widget property changes.
func MakeCallback ¶
func MakeCallback(name interface{}, fn KeyPressFunction) WidgetCallback
func (WidgetCallback) ID ¶
func (f WidgetCallback) ID() interface{}
Click to show internal directories.
Click to hide internal directories.