diff options
Diffstat (limited to 'engine/include/component.hpp')
-rw-r--r-- | engine/include/component.hpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/engine/include/component.hpp b/engine/include/component.hpp new file mode 100644 index 0000000..4ad99c8 --- /dev/null +++ b/engine/include/component.hpp @@ -0,0 +1,32 @@ +#ifndef __FLAT_COMPONENT_H__ +#define __FLAT_COMPONENT_H__ + +#include "core/object.hpp" +#include "core/labelled.hpp" +#include <string> + +namespace flat { + +class component : virtual public core::object, virtual public core::labelled +{ + + component * m_parent; + +public: + + /* Zero means attach to main window layer */ + /* Send a 'created' signal in component reserved channel */ + component(component *parent = 0, const std::string& id = ""); + + /* Send a 'deleted' signal in component reserved channel */ + virtual ~component(); + + void set_parent(component*); + component * parent(); + + virtual void render() = 0; +}; + +} + +#endif |