wResizer

wResizer is the class for wResizable layout constraint solver. It is based on yglukhov's constraint solving library - kiwi.

Seealso:wResizable
Consts:The strength of the constraint.
ConstsDescription
REQUIREDcreateStrength(1000.0, 1000.0, 1000.0)
STRONGcreateStrength(1.0, 0.0, 0.0)
MEDIUMcreateStrength(0.0, 1.0, 0.0)
WEAKcreateStrength(0.0, 0.0, 1.0)
WEAKERcreateStrength(0.0, 0.0, 0.1)
WEAKESTcreateStrength(0.0, 0.0, 0.01)

Consts

WEAKER = 0.1
WEAKEST = 0.01

Procs

proc `|`(constraint: Constraint; strength: float): Constraint {...}{.inline, raises: [],
    tags: [].}
Modify a constraint by specified strength
proc `|`(strength: float; constraint: Constraint): Constraint {...}{.inline, raises: [],
    tags: [].}
Modify a constraint by specified strength
proc addConstraint(self: wResizer; constraint: Constraint) {...}{.inline, raises: [
    DuplicateConstraintException, Exception, UnsatisfiableConstraintException,
    KeyError], tags: [RootEffect].}
Add a constraint to the solver.
proc addObject(self: wResizer; obj: wResizable) {...}{.inline,
    raises: [DuplicateEditVariableException, RequiredFailureException],
    tags: [RootEffect].}
Add an associated resizable object to the solver.
proc resolve(self: wResizer) {...}{.raises: [Exception, UnknownEditVariableException,
                                    InternalSolverError, KeyError],
                            tags: [RootEffect].}
Count the layout of the associated object.
proc rearrange(self: wResizer) {...}{.raises: [Exception], tags: [RootEffect].}
Rearrange the layout of the associated window.
proc final(self: wResizer) {...}{.raises: [], tags: [].}
Default finalizer for wResizer.
proc init(self: wResizer; parent: wResizable) {...}{.inline, raises: [NilAccessError,
    DuplicateEditVariableException, RequiredFailureException], tags: [RootEffect].}
Initializer.
proc Resizer(parent: wResizable): wResizer {...}{.inline, discardable, raises: [
    NilAccessError, DuplicateEditVariableException, RequiredFailureException],
    tags: [RootEffect].}
Constructor.

Iterators

iterator items(self: wResizer): wResizable {...}{.raises: [], tags: [].}
Iterates over each associated object.