diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 1998-10-06 18:21:25 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 1998-10-06 18:21:25 +0000 |
| commit | f9039b2ae21988783feae9b362818e7923e82d14 (patch) | |
| tree | 6d6fe3679d73448758f9794e7d4d4f6b22a4adad /src/Fl_Output.cxx | |
| parent | 67e89232f9ba067825a158734a09e0fa21aacbe3 (diff) | |
Initial revision
git-svn-id: file:///fltk/svn/fltk/trunk@2 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
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)); +} |
