overlays

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: May 13, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Tool

type Tool struct {
	Icon     *gdk.Pixbuf
	Drop     func(x, y float64)
	Selected func()
}

type ToolOverlay

type ToolOverlay struct {
	Tools []Tool
	// contains filtered or unexported fields
}

ToolOverlay implements a tool selection overlay.

func Toolbar

func Toolbar(selectable bool, tools []Tool) *ToolOverlay

Toolbar contructs a tool overlay from the given tools.

func ToolbarAtAnchor added in v0.4.11

func ToolbarAtAnchor(selectable bool, tools []Tool, xAnchor, yAnchor float64) *ToolOverlay

ToolbarAtAnchor contructs a tool overlay from the given tools, anchored at the specified X and Y ratios. If yAnchor is zero, the toolbar will be pinned to the top of the flowchart.

func (*ToolOverlay) Configure

func (o *ToolOverlay) Configure(w, h int)

Configure implements flowui.Overlay.

func (*ToolOverlay) Draw

func (o *ToolOverlay) Draw(da *gtk.DrawingArea, cr *cairo.Context)

Draw implements flowui.Overlay.

func (*ToolOverlay) GetBounds added in v0.4.11

func (o *ToolOverlay) GetBounds() (x1, y1, x2, y2 float64)

GetBounds returns the bounding box of the toolbar.

func (*ToolOverlay) HandleKeypress

func (o *ToolOverlay) HandleKeypress(keyEvent *gdk.EventKey) bool

HandleKeypress implements tab & numbering shortcuts for keypress events. The caller should invoke this function for key presses.

func (*ToolOverlay) HandleMotionEvent

func (o *ToolOverlay) HandleMotionEvent(evt *gdk.EventMotion) bool

HandleMotionEvent implements flowui.Overlay.

func (*ToolOverlay) HandlePressEvent

func (o *ToolOverlay) HandlePressEvent(event *gdk.Event, press bool) bool

HandlePressEvent implements flowui.Overlay.

Jump to

Keyboard shortcuts

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