1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-22 16:55:09 +00:00

VisualBuilder: Add a table view with the selected widget's properties.

This commit is contained in:
Andreas Kling 2019-04-11 21:41:09 +02:00
parent c57cf9834b
commit 707bfe848d
11 changed files with 113 additions and 6 deletions

View file

@ -2,11 +2,13 @@
#include "VBForm.h"
#include "VBProperty.h"
#include "VBWidgetRegistry.h"
#include "VBWidgetPropertyModel.h"
#include <LibGUI/GPainter.h>
VBWidget::VBWidget(VBWidgetType type, VBForm& form)
: m_type(type)
, m_form(form)
, m_property_model(VBWidgetPropertyModel::create(*this))
{
m_gwidget = VBWidgetRegistry::build_gwidget(type, &form, m_properties);
}
@ -69,6 +71,6 @@ Direction VBWidget::grabber_at(const Point& position) const
void VBWidget::for_each_property(Function<void(VBProperty&)> callback)
{
for (auto& it : m_properties) {
callback(*it.value);
callback(*it);
}
}