TouchCPLib  1.0.0
A touch-enabled GUI interface based on SDL and libTS. It provides a simple desktop-free UI for your embedded Raspberry projects.
GraphicsObject.h
Go to the documentation of this file.
1 #pragma once
2 
12 #include <stdint.h>
13 
18 {
19 public:
20  virtual ~GraphicsObject() = default;
25  virtual void draw(uint32_t time) = 0;
26  bool isVisible() const
27  {
28  return visibility;
29  }
30  void setVisibility(bool visible)
31  {
32  visibility = visible;
33  }
34 
35 private:
36  bool visibility = true;
37 };
A simple interface for all the graphic objects that are supposed to be drawn.
Definition: GraphicsObject.h:17
virtual void draw(uint32_t time)=0
The draw method. It will be called once per frame for each object in a scene.
bool isVisible() const
Definition: GraphicsObject.h:26
void setVisibility(bool visible)
Definition: GraphicsObject.h:30
virtual ~GraphicsObject()=default