1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-10-17 04:12:08 +00:00
serenity/Applications/VisualBuilder/VBWidgetRegistry.h
Andreas Kling 3a33b8ea08 VisualBuilder: Hook up everything needed for widget property editing.
It's now possible to edit widget properties inline in the properties window.
We're currently relying on the basic GVariant conversion functions to do
all the "parsing" but that's not gonna be good enough.
2019-04-19 01:05:59 +02:00

21 lines
512 B
C++

#pragma once
#include "VBWidgetType.h"
#include <AK/HashMap.h>
#include <AK/OwnPtr.h>
#include <AK/AKString.h>
class GWidget;
class VBProperty;
class VBWidget;
class VBWidgetRegistry {
public:
template<typename Callback> static void for_each_widget_type(Callback callback)
{
for (unsigned i = 1; i < (unsigned)VBWidgetType::__Count; ++i)
callback((VBWidgetType)i);
}
static GWidget* build_gwidget(VBWidget&, VBWidgetType, GWidget* parent, Vector<OwnPtr<VBProperty>>&);
};