Documentation ¶
Index ¶
- type RadioButton
- func (r *RadioButton) BackgroundInk() draw.Ink
- func (r *RadioButton) Click()
- func (r *RadioButton) ClickAnimationTime() time.Duration
- func (r *RadioButton) CornerRadius() float64
- func (r *RadioButton) DefaultDraw(gc draw.Context, dirty geom.Rect, inLiveResize bool)
- func (r *RadioButton) DefaultKeyDown(keyCode int, ch rune, mod keys.Modifiers, repeat bool) bool
- func (r *RadioButton) DefaultMouseDown(where geom.Point, button, clickCount int, mod keys.Modifiers) bool
- func (r *RadioButton) DefaultMouseDrag(where geom.Point, button int, mod keys.Modifiers)
- func (r *RadioButton) DefaultMouseUp(where geom.Point, button int, mod keys.Modifiers)
- func (r *RadioButton) DefaultSizes(hint geom.Size) (min, pref, max geom.Size)
- func (r *RadioButton) EdgeInk() draw.Ink
- func (r *RadioButton) FocusedBackgroundInk() draw.Ink
- func (r *RadioButton) Font() *draw.Font
- func (r *RadioButton) Gap() float64
- func (r *RadioButton) HAlign() align.Alignment
- func (r *RadioButton) Image() *draw.Image
- func (r *RadioButton) PressedBackgroundInk() draw.Ink
- func (r *RadioButton) PressedTextInk() draw.Ink
- func (r *RadioButton) SetBackgroundInk(value draw.Ink) *RadioButton
- func (r *RadioButton) SetBorder(value border.Border) *RadioButton
- func (r *RadioButton) SetClickAnimationTime(value time.Duration) *RadioButton
- func (r *RadioButton) SetCornerRadius(value float64) *RadioButton
- func (r *RadioButton) SetEdgeInk(value draw.Ink) *RadioButton
- func (r *RadioButton) SetEnabled(enabled bool) *RadioButton
- func (r *RadioButton) SetFocusable(focusable bool) *RadioButton
- func (r *RadioButton) SetFocusedBackgroundInk(value draw.Ink) *RadioButton
- func (r *RadioButton) SetFont(value *draw.Font) *RadioButton
- func (r *RadioButton) SetGap(value float64) *RadioButton
- func (r *RadioButton) SetHAlign(value align.Alignment) *RadioButton
- func (r *RadioButton) SetImage(value *draw.Image) *RadioButton
- func (r *RadioButton) SetPressedBackgroundInk(value draw.Ink) *RadioButton
- func (r *RadioButton) SetPressedTextInk(value draw.Ink) *RadioButton
- func (r *RadioButton) SetSelected(selected bool) *RadioButton
- func (r *RadioButton) SetSide(value side.Side) *RadioButton
- func (r *RadioButton) SetText(value string) *RadioButton
- func (r *RadioButton) SetTextInk(value draw.Ink) *RadioButton
- func (r *RadioButton) SetVAlign(value align.Alignment) *RadioButton
- func (r *RadioButton) Side() side.Side
- func (r *RadioButton) Text() string
- func (r *RadioButton) TextInk() draw.Ink
- func (r *RadioButton) VAlign() align.Alignment
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RadioButton ¶
type RadioButton struct { selectable.Panel ClickCallback func() Pressed bool // contains filtered or unexported fields }
RadioButton represents a clickable radio button with an optional label.
func (*RadioButton) BackgroundInk ¶
func (r *RadioButton) BackgroundInk() draw.Ink
BackgroundInk returns the ink that will be used for the background when enabled but not pressed or focused.
func (*RadioButton) Click ¶
func (r *RadioButton) Click()
Click makes the radio button behave as if a user clicked on it.
func (*RadioButton) ClickAnimationTime ¶
func (r *RadioButton) ClickAnimationTime() time.Duration
ClickAnimationTime returns the amount of time to spend animating the click action.
func (*RadioButton) CornerRadius ¶
func (r *RadioButton) CornerRadius() float64
CornerRadius returns the amount of rounding to use on the corners.
func (*RadioButton) DefaultDraw ¶
DefaultDraw provides the default drawing.
func (*RadioButton) DefaultKeyDown ¶
DefaultKeyDown provides the default key down handling.
func (*RadioButton) DefaultMouseDown ¶
func (r *RadioButton) DefaultMouseDown(where geom.Point, button, clickCount int, mod keys.Modifiers) bool
DefaultMouseDown provides the default mouse down handling.
func (*RadioButton) DefaultMouseDrag ¶
DefaultMouseDrag provides the default mouse drag handling.
func (*RadioButton) DefaultMouseUp ¶
DefaultMouseUp provides the default mouse up handling.
func (*RadioButton) DefaultSizes ¶
func (r *RadioButton) DefaultSizes(hint geom.Size) (min, pref, max geom.Size)
DefaultSizes provides the default sizing.
func (*RadioButton) EdgeInk ¶
func (r *RadioButton) EdgeInk() draw.Ink
EdgeInk returns the ink that will be used for the edges.
func (*RadioButton) FocusedBackgroundInk ¶
func (r *RadioButton) FocusedBackgroundInk() draw.Ink
FocusedBackgroundInk returns the ink that will be used for the background when enabled and focused.
func (*RadioButton) Font ¶
func (r *RadioButton) Font() *draw.Font
Font returns the font that will be used when drawing text content.
func (*RadioButton) Gap ¶
func (r *RadioButton) Gap() float64
Gap returns the gap to put between the image and text.
func (*RadioButton) HAlign ¶
func (r *RadioButton) HAlign() align.Alignment
HAlign returns the horizontal alignment.
func (*RadioButton) Image ¶
func (r *RadioButton) Image() *draw.Image
Image returns the image. May be nil.
func (*RadioButton) PressedBackgroundInk ¶
func (r *RadioButton) PressedBackgroundInk() draw.Ink
PressedBackgroundInk returns the ink that will be used for the background when enabled and pressed.
func (*RadioButton) PressedTextInk ¶
func (r *RadioButton) PressedTextInk() draw.Ink
PressedTextInk returns the ink that will be used for the text when enabled and pressed.
func (*RadioButton) SetBackgroundInk ¶
func (r *RadioButton) SetBackgroundInk(value draw.Ink) *RadioButton
SetBackgroundInk sets the ink that will be used for the background when enabled but not pressed or focused. Pass in nil to use the default.
func (*RadioButton) SetBorder ¶
func (r *RadioButton) SetBorder(value border.Border) *RadioButton
SetBorder sets the border. May be nil.
func (*RadioButton) SetClickAnimationTime ¶
func (r *RadioButton) SetClickAnimationTime(value time.Duration) *RadioButton
SetClickAnimationTime sets the amount of time to spend animating the click action.
func (*RadioButton) SetCornerRadius ¶
func (r *RadioButton) SetCornerRadius(value float64) *RadioButton
SetCornerRadius sets the amount of rounding to use on the corners.
func (*RadioButton) SetEdgeInk ¶
func (r *RadioButton) SetEdgeInk(value draw.Ink) *RadioButton
SetEdgeInk sets the ink that will be used for the edges. Pass in nil to use the default.
func (*RadioButton) SetEnabled ¶
func (r *RadioButton) SetEnabled(enabled bool) *RadioButton
SetEnabled sets enabled state.
func (*RadioButton) SetFocusable ¶
func (r *RadioButton) SetFocusable(focusable bool) *RadioButton
SetFocusable whether it can have the keyboard focus.
func (*RadioButton) SetFocusedBackgroundInk ¶
func (r *RadioButton) SetFocusedBackgroundInk(value draw.Ink) *RadioButton
SetFocusedBackgroundInk sets the ink that will be used for the background when enabled and focused. Pass in nil to use the default.
func (*RadioButton) SetFont ¶
func (r *RadioButton) SetFont(value *draw.Font) *RadioButton
SetFont sets the font that will be used when drawing text content. Pass in nil to use the default.
func (*RadioButton) SetGap ¶
func (r *RadioButton) SetGap(value float64) *RadioButton
SetGap sets the gap to put between the image and text.
func (*RadioButton) SetHAlign ¶
func (r *RadioButton) SetHAlign(value align.Alignment) *RadioButton
SetHAlign sets the horizontal alignment.
func (*RadioButton) SetImage ¶
func (r *RadioButton) SetImage(value *draw.Image) *RadioButton
SetImage sets the image. May be nil.
func (*RadioButton) SetPressedBackgroundInk ¶
func (r *RadioButton) SetPressedBackgroundInk(value draw.Ink) *RadioButton
SetPressedBackgroundInk sets the ink that will be used for the background when enabled and pressed. Pass in nil to use the default.
func (*RadioButton) SetPressedTextInk ¶
func (r *RadioButton) SetPressedTextInk(value draw.Ink) *RadioButton
SetPressedTextInk sets the ink that will be used for the text when enabled and pressed. Pass in nil to use the default.
func (*RadioButton) SetSelected ¶
func (r *RadioButton) SetSelected(selected bool) *RadioButton
SetSelected sets the panel's selected state.
func (*RadioButton) SetSide ¶
func (r *RadioButton) SetSide(value side.Side) *RadioButton
SetSide sets the side of the text the image should be on.
func (*RadioButton) SetText ¶
func (r *RadioButton) SetText(value string) *RadioButton
SetText sets the text content.
func (*RadioButton) SetTextInk ¶
func (r *RadioButton) SetTextInk(value draw.Ink) *RadioButton
SetTextInk sets the ink that will be used for the text when disabled or not pressed. Pass in nil to use the default.
func (*RadioButton) SetVAlign ¶
func (r *RadioButton) SetVAlign(value align.Alignment) *RadioButton
SetVAlign sets the vertical alignment.
func (*RadioButton) Side ¶
func (r *RadioButton) Side() side.Side
Side returns the side of the text the image should be on.
func (*RadioButton) TextInk ¶
func (r *RadioButton) TextInk() draw.Ink
TextInk returns the ink that will be used for the text when disabled or not pressed.
func (*RadioButton) VAlign ¶
func (r *RadioButton) VAlign() align.Alignment
VAlign returns the vertical alignment.