Documentation
¶
Overview ¶
Package radio provides radio button widgets where one can be selected among many.
Index ¶
- func Select(w IWidget, app gowid.IApp)
- type IWidget
- type RadioButtonTester
- type Widget
- func (w *Widget) Click(app gowid.IApp)
- func (w *Widget) Group() *[]IWidget
- func (w *Widget) IsChecked() bool
- 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) Select(app gowid.IApp)
- func (w *Widget) SetStateInternal(selected bool)
- func (w *Widget) String() string
- func (w *Widget) UserInput(ev interface{}, size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type RadioButtonTester ¶
type RadioButtonTester struct {
State bool
}
This is here to avoid import cycles
func (*RadioButtonTester) Changed ¶
func (f *RadioButtonTester) Changed(app gowid.IApp, w gowid.IWidget, data ...interface{})
func (*RadioButtonTester) ID ¶
func (f *RadioButtonTester) ID() interface{}
type Widget ¶
type Widget struct { Selected bool *gowid.Callbacks gowid.ClickCallbacks checkbox.Decoration gowid.AddressProvidesID gowid.IsSelectable // contains filtered or unexported fields }
func New ¶
If the group supplied is empty, this radio button will be marked as selected, regardless of the isChecked parameter.
func NewDecorated ¶
func NewDecorated(group *[]IWidget, decoration checkbox.Decoration) *Widget
func (*Widget) RenderSize ¶
func (w *Widget) RenderSize(size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) gowid.IRenderBox
func (*Widget) SetStateInternal ¶
Don't ensure consistency of other widgets, but do issue callbacks for state change. TODO - need to do callbacks here to capture losing selection
Click to show internal directories.
Click to hide internal directories.