mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:08:12 +00:00

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.)
20 lines
494 B
C++
20 lines
494 B
C++
#pragma once
|
|
|
|
#include "VBWidgetType.h"
|
|
#include <AK/HashMap.h>
|
|
#include <AK/OwnPtr.h>
|
|
#include <AK/AKString.h>
|
|
|
|
class GWidget;
|
|
class VBProperty;
|
|
|
|
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(VBWidgetType, GWidget* parent, HashMap<String, OwnPtr<VBProperty>>&);
|
|
};
|