Textbox

widgets. Textbox

Class to handle the display of the output text box that shows what the user has typed.

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: