OpenPolygon  1.0.0
OpenPolygon is a Rendering Engine
overlay.h
1 /*
2  Copyright (C) 2014 - 2016 Mutzii
3 
4  This program is free software: you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation, either version 3 of the License, or
7  (at your option) any later version.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program. If not, see <http://www.gnu.org/licenses/>.
16 
17 */
18 #ifndef OVERLAY_H
19 #define OVERLAY_H
20 
21 #include "index.h"
22 #include "rendercomponent.h"
23 #include "rendersystem.h"
24 
25 namespace Engine
26 {
27  /* List of Element Renderobjects */
28  using Elements = std::list< RenderElement *>;
29 
33  class Overlay
34  {
35  public:
36 
42  explicit Overlay( const std::string & overlay_name );
43  ~Overlay() = default;
44 
45  void finish(void);
46 
52  const std::string & getName(void) const;
53 
59  void addElement( RenderElement * element );
60 
66  void remove( RenderElement * element );
67 
73  Elements getElements(void);
74 
79  void render( const DrawEvent & event );
80 
81  bool isVisible(void);
82  void setVisible( bool status );
83 
84  private:
85 
86  std::string mName;
88  bool m_visible;
89 
90  Elements mElements;
92  };
93 }
94 
95 #endif // OVERLAY_H
The Overlay - container class - list of RenderElements.
Definition: overlay.h:33
Definition: element.h:23
const std::string & getName(void) const
getName
Definition: Overlay.cpp:47
void addElement(RenderElement *element)
addElement
Definition: Overlay.cpp:52
Elements getElements(void)
getElements
Definition: Overlay.cpp:64
The DrawEvent - event class.
Definition: drawevent.h:31
void render(const DrawEvent &event)
render
Definition: Overlay.cpp:69
The RenderElement - contained component Element - abstract class.
Definition: rendercomponent.h:103
Overlay(const std::string &overlay_name)
Overlay.
Definition: Overlay.cpp:22