Idris2Doc : CyBy.Draw.Internal.Role

CyBy.Draw.Internal.Role

(source)

Definitions

recordRole : Type
  The role(s) an object (typically an atom or bond) in the
drawing currently has (for instance, it is selected, or
the mouse hovers over it, or it is currently being drawn).

We encode this as a bit pattern to facilitate adding new roles and
having several roles set simultaneously.

`Role` is a semigroup (using bitwise "or", `(.|.)`, for append) and
a monoid, with 0 as the neutral element.

Totality: total
Visibility: public export
Constructor: 
R : Bits8->Role

Projection: 
.role : Role->Bits8

Hints:
CastCDAtomRole
Cast (AdjkbCDAtom) Role
Cast (ContextkbCDAtom) Role
CastCDBondRole
EqRole
ModRoleRole
MonoidRole
OrdRole
SemigroupRole
ShowRole
.role : Role->Bits8
Totality: total
Visibility: public export
role : Role->Bits8
Totality: total
Visibility: public export
Selected : Role
Totality: total
Visibility: public export
Persistent : Role
Totality: total
Visibility: public export
Origin : Role
Totality: total
Visibility: public export
None : Role
Totality: total
Visibility: public export
New : Role
Totality: total
Visibility: public export
HoverNew : Role
Totality: total
Visibility: public export
Hover : Role
Totality: total
Visibility: public export
Highlight : Role
Totality: total
Visibility: public export
interfaceModRole : Type->Type
  Interface for objects with a `Role` we can modify

Parameters: a
Methods:
modRole : (Role->Role) ->a->a

Implementations:
ModRoleCDAtom
ModRoleRole
ModRoleCDBond
modRole : ModRolea=> (Role->Role) ->a->a
Totality: total
Visibility: public export
setIf : ModRolea=>Role->Bool->a->a
  Sets the given role at an object in the drawing

Totality: total
Visibility: export
set : ModRolea=>Role->a->a
  Sets the given role at an object in the drawing

Totality: total
Visibility: export
unset : ModRolea=>Role->a->a
  Sets the given role at an object in the drawing

Totality: total
Visibility: export
keep : ModRolea=>Role->a->a
  Keep only the given roles and unset all others

Totality: total
Visibility: export
clear : ModRolea=>a->a
  Completely remove all roles

Totality: total
Visibility: export
is : CastaRole=>Role->a->Bool
  Tests if the given role(s) is/are set at the given object
in the drawing

Totality: total
Visibility: export
dataSelectMode : Type
  Selection mode we are currently in.

`Ignore` means that we are currently not selecting this type of item.
`One` means "single-select" mode (SHIFT is not down)
`Many` means "multi-select" mode (SHIFT is down)

Totality: total
Visibility: public export
Constructors:
Ignore : SelectMode
One : SelectMode
Many : SelectMode
selectIfHovered : ModRolea=>SelectMode->a->a
  Selects a hovered node or edge.

The boolean flag indicates, if we want to keep already selected
node or not (as indicated by the `Shift` key being down).

Totality: total
Visibility: export