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