MathFunction.Input Class
Input field
Constructor
MathFunction.Input
()
Item Index
Methods
evaluate
(
-
var_list
Parameters:
-
var_listObjectmap of variable names to values or MathFunctions
Returns:
the value of the function
handleKeyPress
(
-
canvas -
code -
c
Parameters:
-
canvasMathCanvas -
codeIntcharacter code
-
cStringcharacter
Returns:
true if function changed
isEmpty
()
Returns:
true if function is empty
isEmpty
()
Returns:
true if function is empty
layout
(
Int
-
context -
top_left -
font_size -
rect_list
Parameters:
-
contextObjectthe drawing context
-
top_leftPointx,y coordinates of the top left of the bounding box
-
font_sizeFloatpercentage of the base font size
-
rect_listRectListlayout information
Returns:
Int:
index of this items info in rect_list
parenthesizeForPrint
(
Boolean
protected
-
f
Parameters:
Returns:
Boolean:
true if f needs to parenthesize us
parenthesizeForRender
(
Boolean
protected
-
f
Parameters:
Returns:
Boolean:
true if f needs to parenthesize us
render
(
-
context -
rect_list
Parameters:
-
contextObjectthe drawing context
-
rect_listRectListlayout information
toString
()
Returns:
text representation of the function
