mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 00:47:34 +00:00
CObject: Add a "name" property.
This will be useful for things like the VisualBuilder code generator.
This commit is contained in:
parent
c33766f039
commit
b06d2c04dc
1 changed files with 5 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <AK/AKString.h>
|
||||||
#include <AK/Function.h>
|
#include <AK/Function.h>
|
||||||
#include <AK/StdLibExtras.h>
|
#include <AK/StdLibExtras.h>
|
||||||
#include <AK/Vector.h>
|
#include <AK/Vector.h>
|
||||||
|
@ -18,6 +19,9 @@ public:
|
||||||
|
|
||||||
virtual void event(CEvent&);
|
virtual void event(CEvent&);
|
||||||
|
|
||||||
|
const String& name() const { return m_name; }
|
||||||
|
void set_name(const StringView& name) { m_name = name; }
|
||||||
|
|
||||||
Vector<CObject*>& children() { return m_children; }
|
Vector<CObject*>& children() { return m_children; }
|
||||||
const Vector<CObject*>& children() const { return m_children; }
|
const Vector<CObject*>& children() const { return m_children; }
|
||||||
|
|
||||||
|
@ -58,6 +62,7 @@ protected:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
CObject* m_parent { nullptr };
|
CObject* m_parent { nullptr };
|
||||||
|
String m_name;
|
||||||
int m_timer_id { 0 };
|
int m_timer_id { 0 };
|
||||||
bool m_widget { false };
|
bool m_widget { false };
|
||||||
Vector<CObject*> m_children;
|
Vector<CObject*> m_children;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue