Go to the documentation of this file.00001
00012 #include "OverflowTextRep.h"
00013
00014 #include "graphics/ViewBase.h"
00015 #include "pattern/string_convert.h"
00016 #include "projectors/NTupleProjector.h"
00017
00018 using std::string;
00019
00020 using namespace hippodraw;
00021
00022 OverflowTextRep::OverflowTextRep ( )
00023 : TextRepBase ( "Overflow" )
00024 {
00025 }
00026
00027 OverflowTextRep::OverflowTextRep ( const OverflowTextRep & rep )
00028 : TextRepBase( rep )
00029 {
00030 }
00031
00032 RepBase * OverflowTextRep::clone ()
00033 {
00034 return new OverflowTextRep ( *this );
00035 }
00036
00037 void
00038 OverflowTextRep::
00039 drawProjectedValues ( ProjectorBase & proj,
00040 ViewBase & view )
00041 {
00042 int overflow = proj.getOverflow ();
00043 string text ( "Overflow_entries = " );
00044 if ( overflow < 0 ) {
00045 text += "meaningless";
00046 }
00047 else {
00048 text += String::convert ( overflow );
00049 }
00050
00051 view.drawText ( text, 5, 10, m_size, 0, 'l', 't', true, 0, & m_color );
00052 }