Documentation ¶
Index ¶
- type InkWell
- func (well *InkWell) AllowedTypes() Mask
- func (well *InkWell) BackgroundInk() draw.Ink
- func (well *InkWell) Click()
- func (well *InkWell) ClickAnimationTime() time.Duration
- func (well *InkWell) ContentSize() float64
- func (well *InkWell) CornerRadius() float64
- func (well *InkWell) DefaultClick()
- func (well *InkWell) DefaultDragEntered(dragInfo *ux.DragInfo) ux.DragOperation
- func (well *InkWell) DefaultDragExited()
- func (well *InkWell) DefaultDragUpdated(dragInfo *ux.DragInfo) ux.DragOperation
- func (well *InkWell) DefaultDraw(gc draw.Context, dirty geom.Rect, inLiveResize bool)
- func (well *InkWell) DefaultDrop(dragInfo *ux.DragInfo) bool
- func (well *InkWell) DefaultDropFinished(dragInfo *ux.DragInfo)
- func (well *InkWell) DefaultImageFromURL(urlStr string, scale float64) (*draw.Image, error)
- func (well *InkWell) DefaultIsDropAcceptable(dragInfo *ux.DragInfo) bool
- func (well *InkWell) DefaultKeyDown(keyCode int, ch rune, mod keys.Modifiers, repeat bool) bool
- func (well *InkWell) DefaultMouseDown(where geom.Point, button, clickCount int, mod keys.Modifiers) bool
- func (well *InkWell) DefaultMouseDrag(where geom.Point, button int, mod keys.Modifiers)
- func (well *InkWell) DefaultMouseUp(where geom.Point, button int, mod keys.Modifiers)
- func (well *InkWell) DefaultSizes(hint geom.Size) (min, pref, max geom.Size)
- func (well *InkWell) EdgeHighlightInk() draw.Ink
- func (well *InkWell) EdgeInk() draw.Ink
- func (well *InkWell) FocusedBackgroundInk() draw.Ink
- func (well *InkWell) ImageScale() float64
- func (well *InkWell) Ink() draw.Ink
- func (well *InkWell) PressedBackgroundInk() draw.Ink
- func (well *InkWell) SetAllowedTypes(mask Mask) *InkWell
- func (well *InkWell) SetBackgroundInk(value draw.Ink) *InkWell
- func (well *InkWell) SetBorder(value border.Border) *InkWell
- func (well *InkWell) SetClickAnimationTime(value time.Duration) *InkWell
- func (well *InkWell) SetContentSize(value float64) *InkWell
- func (well *InkWell) SetCornerRadius(value float64) *InkWell
- func (well *InkWell) SetEdgeHighlightInk(value draw.Ink) *InkWell
- func (well *InkWell) SetEdgeInk(value draw.Ink) *InkWell
- func (well *InkWell) SetEnabled(enabled bool) *InkWell
- func (well *InkWell) SetFocusable(focusable bool) *InkWell
- func (well *InkWell) SetFocusedBackgroundInk(value draw.Ink) *InkWell
- func (well *InkWell) SetImageScale(value float64) *InkWell
- func (well *InkWell) SetInk(ink draw.Ink) *InkWell
- func (well *InkWell) SetPressedBackgroundInk(value draw.Ink) *InkWell
- type Mask
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InkWell ¶
type InkWell struct { ux.Panel ImageFromURLCallback func(urlStr string, scale float64) (*draw.Image, error) InkChangedCallback func() ClickCallback func() ValidateImageCallback func(*draw.Image) *draw.Image Pressed bool // contains filtered or unexported fields }
InkWell represents a control that holds and lets a user choose an ink.
func (*InkWell) AllowedTypes ¶
AllowedTypes returns the types of ink allowed to be set via SetInk().
func (*InkWell) BackgroundInk ¶
BackgroundInk returns the ink that will be used for the background when enabled but not pressed or focused.
func (*InkWell) Click ¶
func (well *InkWell) Click()
Click makes the ink well behave as if a user clicked on it.
func (*InkWell) ClickAnimationTime ¶
ClickAnimationTime returns the amount of time to spend animating the click action.
func (*InkWell) ContentSize ¶
ContentSize returns the content width and height.
func (*InkWell) CornerRadius ¶
CornerRadius returns the amount of rounding to use on the corners.
func (*InkWell) DefaultClick ¶
func (well *InkWell) DefaultClick()
DefaultClick provides the default click handling, which shows a dialog for selecting an ink.
func (*InkWell) DefaultDragEntered ¶
func (well *InkWell) DefaultDragEntered(dragInfo *ux.DragInfo) ux.DragOperation
DefaultDragEntered provides the default drag entered behavior.
func (*InkWell) DefaultDragExited ¶
func (well *InkWell) DefaultDragExited()
DefaultDragExited provides the default drag exited behavior.
func (*InkWell) DefaultDragUpdated ¶
func (well *InkWell) DefaultDragUpdated(dragInfo *ux.DragInfo) ux.DragOperation
DefaultDragUpdated provides the default drag updated behavior.
func (*InkWell) DefaultDraw ¶
DefaultDraw provides the default drawing.
func (*InkWell) DefaultDrop ¶
DefaultDrop provides the default drop behavior.
func (*InkWell) DefaultDropFinished ¶
DefaultDropFinished provides the default drop finished behavior.
func (*InkWell) DefaultImageFromURL ¶
DefaultImageFromURL provides the default ImageFromURL behavior.
func (*InkWell) DefaultIsDropAcceptable ¶
DefaultIsDropAcceptable provides the default is drop acceptable behavior.
func (*InkWell) DefaultKeyDown ¶
DefaultKeyDown provides the default key down handling.
func (*InkWell) DefaultMouseDown ¶
func (well *InkWell) DefaultMouseDown(where geom.Point, button, clickCount int, mod keys.Modifiers) bool
DefaultMouseDown provides the default mouse down handling.
func (*InkWell) DefaultMouseDrag ¶
DefaultMouseDrag provides the default mouse drag handling.
func (*InkWell) DefaultMouseUp ¶
DefaultMouseUp provides the default mouse up handling.
func (*InkWell) DefaultSizes ¶
DefaultSizes provides the default sizing.
func (*InkWell) EdgeHighlightInk ¶
EdgeHighlightInk returns the ink that will be used just inside the edges.
func (*InkWell) FocusedBackgroundInk ¶
FocusedBackgroundInk returns the ink that will be used for the background when enabled and focused.
func (*InkWell) ImageScale ¶
ImageScale returns the image scale to use for images dropped onto the well. Defaults to 0.5 to support retina displays.
func (*InkWell) PressedBackgroundInk ¶
PressedBackgroundInk returns the ink that will be used for the background when enabled and pressed.
func (*InkWell) SetAllowedTypes ¶
SetAllowedTypes sets the types of ink allowed to be set via SetInk().
func (*InkWell) 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 (*InkWell) SetClickAnimationTime ¶
SetClickAnimationTime sets the amount of time to spend animating the click action.
func (*InkWell) SetContentSize ¶
SetContentSize sets the content width and height.
func (*InkWell) SetCornerRadius ¶
SetCornerRadius sets the amount of rounding to use on the corners.
func (*InkWell) SetEdgeHighlightInk ¶
SetEdgeHighlightInk sets the ink that will be used just inside the edges. Pass in nil to use the default.
func (*InkWell) SetEdgeInk ¶
SetEdgeInk sets the ink that will be used for the edges. Pass in nil to use the default.
func (*InkWell) SetEnabled ¶
SetEnabled sets enabled state.
func (*InkWell) SetFocusable ¶
SetFocusable whether it can have the keyboard focus.
func (*InkWell) SetFocusedBackgroundInk ¶
SetFocusedBackgroundInk sets the ink that will be used for the background when enabled and focused. Pass in nil to use the default.
func (*InkWell) SetImageScale ¶
SetImageScale sets the image scale to use for images dropped onto the well. Defaults to 0.5 to support retina displays.