diff options
Diffstat (limited to 'src/Fl_Output.cxx')
| -rw-r--r-- | src/Fl_Output.cxx | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/Fl_Output.cxx b/src/Fl_Output.cxx new file mode 100644 index 000000000..a6dba007e --- /dev/null +++ b/src/Fl_Output.cxx @@ -0,0 +1,23 @@ +// Fl_Output.C + +// This subclass of Fl_Input_ does not allow user to edit the output. +// Used to display output. + +#include <FL/Fl.H> +#include <FL/Fl_Output.H> +#include <FL/fl_draw.H> + +void Fl_Output::draw() { + Fl_Boxtype b = box() ? box() : default_box(); + if (damage() & 128) draw_box(b, color()); + Fl_Input_::drawtext(x()+Fl::box_dx(b)+3, y()+Fl::box_dy(b), + w()-Fl::box_dw(b)-6, h()-Fl::box_dh(b)); +} + +int Fl_Output::handle(int event) { + if (event == FL_FOCUS) return 0; + Fl_Boxtype b = box() ? box() : default_box(); + return Fl_Input_::handletext(event, + x()+Fl::box_dx(b)+3, y()+Fl::box_dy(b), + w()-Fl::box_dw(b)-6, h()-Fl::box_dh(b)); +} |
