BoxTextRep.cxx

Go to the documentation of this file.
00001 
00012 #ifdef _MSC_VER
00013 // include max() and min() missing from MicroSoft Visual C++
00014 #include "msdevstudio/MSconfig.h"
00015 #endif //_MSC_VER
00016 
00017 #include "BoxTextRep.h"
00018 
00019 #include "pattern/string_convert.h"
00020 #include "graphics/ViewBase.h"
00021 #include "projectors/NTupleProjector.h"
00022 
00023 using std::string;
00024 
00025 using namespace hippodraw;
00026 
00027 BoxTextRep::BoxTextRep ( )
00028   : TextRepBase ( "Text From Box" )
00029 {
00030 }
00031 
00032 BoxTextRep::BoxTextRep ( const BoxTextRep & rep )
00033   : TextRepBase( rep )
00034 {
00035 }
00036 
00037 RepBase * BoxTextRep::clone ()
00038 {
00039   return new BoxTextRep ( *this );
00040 }
00041 
00044 void
00045 BoxTextRep::
00046 drawProjectedValues ( ProjectorBase &,
00047                       ViewBase & view )
00048 
00049 {
00050   if (String::ci_find(m_text, "tex:")==0) {
00051     string tex_snippet = m_text.substr(4);
00052     view.drawLatex ( tex_snippet );
00053   }
00054     
00055   else {
00056     view.drawText ( m_text, 5, 10, m_size, 0, 'l', 't', true, 0, & m_color );
00057   }
00058 }

Generated for HippoDraw Class Library by doxygen