Chemical Data Processing Library C++ API - Version 1.2.0
View2D.hpp
Go to the documentation of this file.
1 /*
2  * View2D.hpp
3  *
4  * This file is part of the Chemical Data Processing Toolkit
5  *
6  * Copyright (C) 2003 Thomas Seidel <thomas.seidel@univie.ac.at>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public License
19  * along with this library; see the file COPYING. If not, write to
20  * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21  * Boston, MA 02111-1307, USA.
22  */
23 
29 #ifndef CDPL_VIS_VIEW2D_HPP
30 #define CDPL_VIS_VIEW2D_HPP
31 
32 #include "CDPL/Vis/APIPrefix.hpp"
34 
35 
36 namespace CDPL
37 {
38 
39  namespace Vis
40  {
41 
42  class Renderer2D;
43  class FontMetrics;
44  class Rectangle2D;
45 
59  {
60 
61  public:
65  virtual ~View2D() {}
66 
71  virtual void render(Renderer2D& renderer) = 0;
72 
77  virtual void setFontMetrics(FontMetrics* font_metrics) = 0;
78 
83  virtual void getModelBounds(Rectangle2D& bounds) = 0;
84  };
85  } // namespace Vis
86 } // namespace CDPL
87 
88 #endif // CDPL_VIS_VIEW2D_HPP
Definition of the class CDPL::Base::ControlParameterContainer.
Definition of the preprocessor macro CDPL_VIS_API.
#define CDPL_VIS_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
A class providing methods for the storage and lookup of control-parameter values.
Definition: ControlParameterContainer.hpp:93
An interface class with methods that provide information about the metrics of a font.
Definition: FontMetrics.hpp:71
Specifies an axis aligned rectangular area in 2D space.
Definition: Rectangle2D.hpp:51
An interface that provides methods for low level 2D drawing operations.
Definition: Renderer2D.hpp:86
The abstract base of classes implementing the 2D visualization of data objects.
Definition: View2D.hpp:59
virtual void setFontMetrics(FontMetrics *font_metrics)=0
Specifies a font metrics object that will be used to measure the dimension of text labels.
virtual void render(Renderer2D &renderer)=0
Renders the visual representation of the model using the specified Vis::Renderer2D instance.
virtual void getModelBounds(Rectangle2D &bounds)=0
Calculates the bounding rectangle of the visualized model.
virtual ~View2D()
Virtual destructor.
Definition: View2D.hpp:65
The namespace of the Chemical Data Processing Library.