mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:07:35 +00:00
VisualBuilder: Add a widget registry and a property class.
I need somewhere to centralize the knowledge about the different widget types available. And VBProperty represents a property key/value of arbitrary type (it uses a GVariant for the value.)
This commit is contained in:
parent
ba4a726e8b
commit
f52e66ceda
11 changed files with 193 additions and 88 deletions
20
Applications/VisualBuilder/VBProperty.h
Normal file
20
Applications/VisualBuilder/VBProperty.h
Normal file
|
@ -0,0 +1,20 @@
|
|||
#pragma once
|
||||
|
||||
#include <AK/AKString.h>
|
||||
#include <LibGUI/GVariant.h>
|
||||
|
||||
class VBProperty {
|
||||
public:
|
||||
VBProperty(const String& name, const GVariant& value);
|
||||
~VBProperty();
|
||||
|
||||
String name() const { return m_name; }
|
||||
|
||||
bool is_readonly() const { return m_readonly; }
|
||||
void set_readonly(bool b) { m_readonly = b; }
|
||||
|
||||
private:
|
||||
String m_name;
|
||||
GVariant m_value;
|
||||
bool m_readonly { false };
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue