Idris2Doc : CyBy.Draw.Internal.Label

CyBy.Draw.Internal.Label

(source)

Definitions

lineEndRadius : Double
Totality: total
Visibility: export
dataHPos : Type
  Position of implicit hydrogen label.
These are placed in such a way that they interfere as little as
possible with the bonds leading to an atom's neighbours

Totality: total
Visibility: public export
Constructors:
NoH : HPos
N : HPos
W : HPos
S : HPos
E : HPos
recordText : Type->Type
  A text label together with the text metrics we need to properly
center it around its position `pos`

Totality: total
Visibility: public export
Constructor: 
T : Nat->String->a->TextDims->Texta

Projections:
.dims : Texta->TextDims
.fsize : Texta->Nat
.pos : Texta->a
.text : Texta->String

Hint: 
Bounded (Text (PointId))
.fsize : Texta->Nat
Totality: total
Visibility: public export
fsize : Texta->Nat
Totality: total
Visibility: public export
.text : Texta->String
Totality: total
Visibility: public export
text : Texta->String
Totality: total
Visibility: public export
.pos : Texta->a
Totality: total
Visibility: public export
pos : Texta->a
Totality: total
Visibility: public export
.dims : Texta->TextDims
Totality: total
Visibility: public export
dims : Texta->TextDims
Totality: total
Visibility: public export
.h : Texta->Double
Totality: total
Visibility: export
.lh : Texta->Double
Totality: total
Visibility: export
.w : Texta->Double
Totality: total
Visibility: export
noLbl : Text ()
  The empty text label

Totality: total
Visibility: export
text : CoreDims=>Bool->String->Text ()
  Returns a `Label` for a string together with its `TextDims`

Totality: total
Visibility: export
radius : Texta->MaybeDouble
  Computes the radius of the background circle of a text label.

Totality: total
Visibility: export
adjEndPoints : PointId->PointId->MaybeDouble->MaybeDouble->Maybe (PointId, PointId)
  Adjusts the end point of an edge based on the radius of
their background labels.

Totality: total
Visibility: export
.textPos : Text (PointId) ->PointId
  Position where the text label should be placed in the canvas
to correctly center it around the point given in its `pos` field

Totality: total
Visibility: export
recordAtomLabels : Type->Type
  Text labels for an atom's symbol, charge, mass number,
implicit hydrogen, and implicit hydrogen count

Totality: total
Visibility: public export
Constructor: 
AL : Texta->Texta->Texta->Texta->Texta->AtomLabelsa

Projections:
.charge : AtomLabelsa->Texta
.hcount : AtomLabelsa->Texta
.hydrogen : AtomLabelsa->Texta
.mass : AtomLabelsa->Texta
.symbol : AtomLabelsa->Texta

Hint: 
Bounded (AtomLabels (PointId))
.symbol : AtomLabelsa->Texta
Totality: total
Visibility: public export
symbol : AtomLabelsa->Texta
Totality: total
Visibility: public export
.charge : AtomLabelsa->Texta
Totality: total
Visibility: public export
charge : AtomLabelsa->Texta
Totality: total
Visibility: public export
.mass : AtomLabelsa->Texta
Totality: total
Visibility: public export
mass : AtomLabelsa->Texta
Totality: total
Visibility: public export
.hydrogen : AtomLabelsa->Texta
Totality: total
Visibility: public export
hydrogen : AtomLabelsa->Texta
Totality: total
Visibility: public export
.hcount : AtomLabelsa->Texta
Totality: total
Visibility: public export
hcount : AtomLabelsa->Texta
Totality: total
Visibility: public export
labels : AtomLabelsa->List (Texta)
Totality: total
Visibility: export
chargeLabel : Charge->String
Totality: total
Visibility: export
massLabel : MaybeMassNr->String
Totality: total
Visibility: export
hlabel : HCount->String
Totality: total
Visibility: export
hsubscript : HCount->String
Totality: total
Visibility: export
setPositions : HPos->PointId->AtomLabels () ->AtomLabels (PointId)
  Compute the exact positions of all parts of an atom's labels based
on the determined position of the hydrogen label (`HPos`), the position
of the atom in the molecule, and the metrics of all labels we want
to display.

Totality: total
Visibility: export
dataAbbrPos : Type
Totality: total
Visibility: public export
Constructors:
AE : AbbrPos
AW : AbbrPos
abbrTextPos : CoreDims=>AbbrPos->PointId->Text () ->Text (PointId)
Totality: total
Visibility: export
updateElem : String->Elem->Elem
  Based on a string input (currently, a single character) and the current
element, selects the next element from all elements the symbol of which
starts with the input character.

This allows us to use keyboard shortcuts to change the element of the
atom over which we currently hover.

Totality: total
Visibility: export
updateIsotope : String->Isotope->Isotope
  Uses `updateElem` to change the element of an isotope.

Totality: total
Visibility: export
masses : Elem->List (MaybeMassNr)
Totality: total
Visibility: export
incIso : Isotope->Isotope
Totality: total
Visibility: export
decIso : Isotope->Isotope
Totality: total
Visibility: export
dataLabel : Type
Totality: total
Visibility: public export
Constructors:
Hidden : Label
NoLabel : PointId->Label
Abbreviation : PointId->Text (PointId) ->Label
Explicit : AtomLabels (PointId) ->Label

Hint: 
CoreDims=>BoundedLabel
0Labels : Nat->Type
Totality: total
Visibility: public export
trimToCircle : Pointt->Vector (transformt) ->Pointt->Double->Double
  Given a starting point and a vector, tries to find the
first intersection of the resulting line segment with a
circle given by its center and radius.

Totality: total
Visibility: export
endpoints : CoreDims=>PointId->PointId->Label->Label->Maybe (PointId, PointId)
  Computes the end points of a bond based on the atom positions and
atom labels so that the bonds do not overlap with the labels.

Totality: total
Visibility: export
abbrPos : CDIGraphk->Fink->AbbrPos
  Relative position, where the label of an abbreviated group will be
placed.

Totality: total
Visibility: export
bestHPos : ListAngle->HPos
  Determines the position of the "H"-label depending on the angles of
bonds leading to neighbours

Totality: total
Visibility: export
hpos : CDIGraphk->Fink->HPos
  Determines the position of the "H" label (if any)
relative to an atom's symbol. To do this, this computes the angles
of all bonds leading to an atom's neighbours and tries to find
a direction (north, west, south, or east) without any neighbouring bonds

Totality: total
Visibility: export