summaryrefslogtreecommitdiffstats
path: root/engine/include/component.hpp
blob: 76b7d6c1a6d9f839686bed3813c22cc40916b81f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef __FLAT_COMPONENT_H__
#define __FLAT_COMPONENT_H__

#include "object.hpp"
#include "core/labelled.hpp"
#include <string>

namespace flat {

class component : virtual public object, virtual public core::labelled
{
private:
    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