LaTeXInputController class
A controller to simplify adding common mathematical inputs to a MathTree.
This class provides an intuitive, "button-press" like interface for building
expressions, abstracting away the underlying LEType and content details.
It is ideal for creating UIs like on-screen calculators.
It also includes a listener pattern to notify consumers of changes to the expression tree.
Constructors
- LaTeXInputController(LaTeXTree _laTeXTree)
-
Creates a controller that modifies the given
laTeXTree.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addListener(
void listener()) → void -
Adds a
listenerthat will be called whenever the expression changes. -
moveDown(
) → void - Moves the cursor down in the expression tree.
-
moveLeft(
) → void - Moves the cursor left in the expression tree.
-
moveRight(
) → void - Moves the cursor right in the expression tree.
-
moveUp(
) → void - Moves the cursor up in the expression tree.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pressClear(
) → void - Clears the entire expression tree.
-
pressCosine(
) → void - Adds the cosine function to the expression.
-
pressCubeRoot(
) → void - Adds a cube root node to the expression.
-
pressDelete(
) → void - Deletes the element at the current cursor position.
-
pressDivide(
) → void - Adds the division operator (÷) to the expression.
-
pressEight(
) → void - Adds the number 8 to the expression.
-
pressEuler(
) → void - Adds the symbol for Euler's number (e) to the expression.
-
pressFive(
) → void - Adds the number 5 to the expression.
-
pressFour(
) → void - Adds the number 4 to the expression.
-
pressFraction(
) → void - Adds a fraction node to the expression.
-
pressFunction(
String functionName) → void -
Adds a function node (e.g.,
sin,cos) to the expression. -
pressIntegral(
) → void - Adds an integral node to the expression.
-
pressInversedCosine(
) → void - Adds the inverse cosine function to the expression.
-
pressInversedSine(
) → void - Adds the inverse sine function to the expression.
-
pressInversedTangent(
) → void - Adds the inverse tangent function to the expression.
-
pressInverseFunction(
String functionName) → void - Adds an inverse function node to the expression.
-
pressLeftBrace(
) → void - Adds a left brace to the expression.
-
pressLeftBracket(
) → void - Adds a left bracket to the expression.
-
pressLeftParenthesis(
) → void - Adds a left parenthesis to the expression.
-
pressLog(
) → void - Adds the base-10 logarithm (log) function to the expression.
-
pressMinus(
) → void - Adds the subtraction operator (-) to the expression.
-
pressMultiply(
) → void - Adds the multiplication operator (×) to the expression.
-
pressNaturalLog(
) → void - Adds the natural logarithm (ln) function to the expression.
-
pressNine(
) → void - Adds the number 9 to the expression.
-
pressNthRoot(
) → void - Adds an nth root node to the expression.
-
pressNumber(
String number) → void - Adds a custom number string to the expression.
-
pressOne(
) → void - Adds the number 1 to the expression.
-
pressOperator(
String operator) → void - Adds a custom operator string to the expression.
-
pressPi(
) → void - Adds the symbol for Pi (π) to the expression.
-
pressPlus(
) → void - Adds the addition operator (+) to the expression.
-
pressPower(
) → void - Adds a power node (superscript) to the expression.
-
pressRightBrace(
) → void - Adds a right brace to the expression.
-
pressRightBracket(
) → void - Adds a right bracket to the expression.
-
pressRightParenthesis(
) → void - Adds a right parenthesis to the expression.
-
pressSeven(
) → void - Adds the number 7 to the expression.
-
pressSine(
) → void - Adds the sine function to the expression.
-
pressSix(
) → void - Adds the number 6 to the expression.
-
pressSpecialSymbol(
String symbol) → void - Adds a special symbol leaf (a LaTeX command) to the expression.
-
pressSquareRoot(
) → void - Adds a square root node to the expression.
-
pressSummation(
) → void - Adds a summation node to the expression.
-
pressSymbol(
String symbol) → void - Adds a symbol leaf to the expression.
-
pressTangent(
) → void - Adds the tangent function to the expression.
-
pressText(
String text) → void - Adds a text leaf to the expression.
-
pressThree(
) → void - Adds the number 3 to the expression.
-
pressTwo(
) → void - Adds the number 2 to the expression.
-
pressVariable(
String variable) → void - Adds a variable leaf to the expression.
-
pressZero(
) → void - Adds the number 0 to the expression.
-
removeListener(
void listener()) → void -
Removes a previously added
listener. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited