Avogadro  1.1.0
/home/kitware/dashboards/avogadro/libavogadro/src/textrenderer_p.h
00001 /**********************************************************************
00002   TextRenderer - a temporary replacement for QGLWidget::renderText until it
00003   matures a bit more ;)
00004 
00005   Copyright (C) 2007 Benoit Jacob
00006 
00007   This file is part of the Avogadro molecular editor project.
00008   For more information, see <http://avogadro.openmolecules.net/>
00009 
00010   Avogadro is free software; you can redistribute it and/or modify
00011   it under the terms of the GNU General Public License as published by
00012   the Free Software Foundation; either version 2 of the License, or
00013   (at your option) any later version.
00014 
00015   Avogadro is distributed in the hope that it will be useful,
00016   but WITHOUT ANY WARRANTY; without even the implied warranty of
00017   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018   GNU General Public License for more details.
00019 
00020   You should have received a copy of the GNU General Public License
00021   along with this program; if not, write to the Free Software
00022   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00023   02110-1301, USA.
00024  **********************************************************************/
00025 
00026 #ifndef TEXTRENDERER_H
00027 #define TEXTRENDERER_H
00028 
00029 #include <avogadro/global.h>
00030 #include <Eigen/Core>
00031 
00032 namespace Avogadro
00033 {
00093   class CharRenderer;
00094   class GLWidget;
00095 
00096   class TextRendererPrivate;
00097   class TextRenderer
00098   {
00099     public:
00100       TextRenderer();
00101       ~TextRenderer();
00102 
00108       void begin(GLWidget *widget);
00109 
00114       void end();
00115 
00123       int draw( const Eigen::Vector3d & pos, const QString &string);
00124 
00134       int draw( int x, int y, const QString &string);
00135 
00136       bool isActive();
00137 
00138     private:
00139 
00140       TextRendererPrivate * const d;
00141   };
00142 
00143 } // namespace Avogadro
00144 
00145 #endif // __TEXTRENDERER_H