1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 22:07:36 +00:00

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.
This commit is contained in:
Andreas Kling 2019-04-19 01:05:59 +02:00
parent 18785ba5c3
commit 3a33b8ea08
13 changed files with 123 additions and 46 deletions

View file

@ -9,6 +9,7 @@
#include "VBWidgetType.h"
class GPainter;
class GVariant;
class GWidget;
class VBForm;
class VBProperty;
@ -50,11 +51,16 @@ public:
VBWidgetPropertyModel& property_model() { return *m_property_model; }
void setup_properties();
void synchronize_properties();
void property_did_change();
private:
VBWidget(VBWidgetType, VBForm&);
void add_property(const String& name, Function<GVariant(const GWidget&)>&& getter, Function<void(GWidget&, const GVariant&)>&& setter);
VBWidgetType m_type { VBWidgetType::None };
VBForm& m_form;
GWidget* m_gwidget { nullptr };