mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-15 16:48:24 +03:00
26 lines
429 B
C++
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;
|
|
};
|