ladybird/Widgets/Object.h
2018-10-10 16:49:36 +02:00

26 lines
429 B
C++

#pragma once
#include <AK/Vector.h>
class Event;
class Object {
public:
Object(Object* parent = nullptr);
virtual ~Object();
virtual const char* className() const { return "Object"; }
virtual void event(Event&);
Vector<Object*>& children() { return m_children; }
private:
void addChild(Object&);
void removeChild(Object&);
Object* m_parent { nullptr };
Vector<Object*> m_children;
};