mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-13 01:59:14 +03:00
d6abfbdc5a
Now that CObject is fully ref-counted, just use RefPtr everywhere! :^)
27 lines
673 B
C++
27 lines
673 B
C++
#pragma once
|
|
|
|
#include "VBWidgetType.h"
|
|
#include <AK/HashMap.h>
|
|
#include <AK/NonnullOwnPtrVector.h>
|
|
#include <AK/OwnPtr.h>
|
|
#include <AK/String.h>
|
|
#include <LibGUI/GWidget.h>
|
|
|
|
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 RefPtr<GWidget> build_gwidget(VBWidget&, VBWidgetType, GWidget* parent, NonnullOwnPtrVector<VBProperty>&);
|
|
};
|
|
|
|
String to_class_name(VBWidgetType);
|
|
VBWidgetType widget_type_from_class_name(const StringView&);
|