Text

FLTK provides several text widgets for displaying and receiving text:

The Fl_Output and Fl_Multiline_Output widgets allow the user to copy text from the output field but not change it.

The value() method is used to get or set the string that is displayed:

Fl_Input *input = new Fl_Input(x, y, width, height, "label");
input->value("Now is the time for all good men...");
      

The string is copied to the widget's own storage when you set the value() of the widget.