Placement

com.alecdorrington.annotatedtextformat.dom.Placement
object Placement

Where a tooltip goes, as the line it is for is placed in the window.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Placement.type

Members list

Value members

Concrete methods

def around(line: Box, tip: Box): List[(Double, Double)]

The corners of the smallest convex shape holding both line and tip, in order around it, over which the pointer crosses from one to the other; or the one point that both are, if they are empty there.

The corners of the smallest convex shape holding both line and tip, in order around it, over which the pointer crosses from one to the other; or the one point that both are, if they are empty there.

Attributes

def between(line: Box, tip: Box): Option[Box]

The gap between line and tip, placed for it, which the pointer crosses from one to the other: from the edge of one to the edge of the other, and as wide as both together; or none if they touch or overlap, as a tip too tall for the window may.

The gap between line and tip, placed for it, which the pointer crosses from one to the other: from the edge of one to the edge of the other, and as wide as both together; or none if they touch or overlap, as a tip too tall for the window may.

Attributes

def crossing(line: Box, tip: Box): Option[(Box, String)]

What covers the way from line to tip, placed for it, so that nothing beneath catches the pointer crossing from one to the other: the box holding both, and within it, as an SVG path to fill by the even-odd rule, the smallest convex shape holding both, but each of them, measured from the box's corner; or none if they touch or overlap, as a tip too tall for the window may. Neither is covered, so that each takes the pointer itself, as a link that the line is in must, and the tip's own buttons.

What covers the way from line to tip, placed for it, so that nothing beneath catches the pointer crossing from one to the other: the box holding both, and within it, as an SVG path to fill by the even-odd rule, the smallest convex shape holding both, but each of them, measured from the box's corner; or none if they touch or overlap, as a tip too tall for the window may. Neither is covered, so that each takes the pointer itself, as a link that the line is in must, and the tip's own buttons.

Attributes

def lineAt(lines: List[Box], x: Double, y: Double): Option[Box]

The line of lines that (x, y) lies within, or else the nearest.

The line of lines that (x, y) lies within, or else the nearest.

Attributes

def place(line: Box, tip: Box, viewport: Box, side: Option[Side] = ..., reserve: Double = ...): (Box, Side)

Where tip goes for line within viewport: centred over the line, kept within the viewport's sides; on side of it, if given; or else above it if there is room there for it, and for reserve if that is taller, as for content to come, or else below it if there is room there; or else on the side with more room, kept within the viewport, over which a tip too tall for both scrolls.

Where tip goes for line within viewport: centred over the line, kept within the viewport's sides; on side of it, if given; or else above it if there is room there for it, and for reserve if that is taller, as for content to come, or else below it if there is room there; or else on the side with more room, kept within the viewport, over which a tip too tall for both scrolls.

Attributes

def room(line: Box, side: Side, viewport: Box): Double

How tall a tip may be on side of line within viewport, standing off the line and keeping from the viewport's edge.

How tall a tip may be on side of line within viewport, standing off the line and keeping from the viewport's edge.

Attributes

def within(corners: List[(Double, Double)], x: Double, y: Double): Boolean

Whether (x, y) lies within the convex shape whose corners are corners, in order around it, or on its edge; or, if it has no area, as the hull of two empty boxes, within the box holding its corners, if any.

Whether (x, y) lies within the convex shape whose corners are corners, in order around it, or on its edge; or, if it has no area, as the hull of two empty boxes, within the box holding its corners, if any.

Attributes

Concrete fields

val gap: Double

How far a tooltip stands off the line it is for, in pixels.

How far a tooltip stands off the line it is for, in pixels.

Attributes

val margin: Double

How far a tooltip keeps from the window's edges, in pixels.

How far a tooltip keeps from the window's edges, in pixels.

Attributes