Constructor
new Textbox(output_canvas)
- Source:
Parameters:
Name | Type | Description |
---|---|---|
output_canvas |
OutputCanvas | The OutputCanvas instance used to draw the histogram and text box. |
Methods
calculate_size()
- Description:
calculates the size of the text box from the available canvas space.
- Source:
draw_text(text)
- Description:
Draws the text that the user has written in the textbox.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
text |
string | The text that the user has currently written. |
toggle_cursor()
- Description:
Animates the flashing cursor in the text box.
- Source: