tooltip

package
v0.0.0-...-af996ba Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 24, 2019 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetText

func SetText(target ui.Widget, text string)

SetText sets a text tooltip on the target.

Types

type Event

type Event struct {
	// contains filtered or unexported fields
}

Event is generated when a tooltip is being requested for the widget.

func NewEvent

func NewEvent(target ui.Widget, where geom.Point, avoid geom.Rect) *Event

NewEvent creates a new ToolTip event. 'target' is the widget the mouse is over. 'where' is the location in the window where the mouse is. 'avoid' is the area to avoid placing the tooltip within, using window coordinates. Typically, 'avoid' is set to the boundaries of the widget within the window.

func (*Event) Avoid

func (e *Event) Avoid() geom.Rect

Avoid returns the area to avoid placing the tooltip within.

func (*Event) Cascade

func (e *Event) Cascade() bool

Cascade returns true if this event should be passed to its target's parent if not marked done.

func (*Event) Finish

func (e *Event) Finish()

Finish marks this event as handled and no longer eligible for processing.

func (*Event) Finished

func (e *Event) Finished() bool

Finished returns true if this event has been handled and should no longer be processed.

func (*Event) SetAvoid

func (e *Event) SetAvoid(avoid geom.Rect)

SetAvoid sets the area to avoid placing the tooltip within.

func (*Event) SetToolTip

func (e *Event) SetToolTip(tooltip ui.Widget)

SetToolTip sets the widget to be used for the tooltip.

func (*Event) String

func (e *Event) String() string

String implements the fmt.Stringer interface.

func (*Event) Target

func (e *Event) Target() event.Target

Target the original target of the event.

func (*Event) ToolTip

func (e *Event) ToolTip() ui.Widget

ToolTip returns a widget to be used as the tooltip.

func (*Event) Type

func (e *Event) Type() event.Type

Type returns the event type ID.

func (*Event) Where

func (e *Event) Where() geom.Point

Where returns the location in the window the mouse is.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL