mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-11 10:18:15 +09:00
HackStudio: Show the edited form widget's widget tree in the tree view
This patch introduces a simple WidgetTreeModel that models the widget tree inside of a given root GWidget.
This commit is contained in:
parent
524da0ad01
commit
d5f735ecec
Notes:
sideshowbarker
2024-07-19 11:15:17 +09:00
Author: https://github.com/awesomekling
Commit: d5f735ecec
7 changed files with 121 additions and 1 deletions
|
@ -4,6 +4,7 @@
|
|||
|
||||
class FormWidget;
|
||||
class Tool;
|
||||
class WidgetTreeModel;
|
||||
|
||||
class FormEditorWidget final : public GScrollableWidget {
|
||||
C_OBJECT(FormEditorWidget)
|
||||
|
@ -18,6 +19,8 @@ public:
|
|||
|
||||
void set_tool(NonnullOwnPtr<Tool>);
|
||||
|
||||
WidgetTreeModel& model();
|
||||
|
||||
class WidgetSelection {
|
||||
public:
|
||||
bool is_empty() const
|
||||
|
@ -70,6 +73,7 @@ public:
|
|||
}
|
||||
|
||||
WidgetSelection() {}
|
||||
|
||||
private:
|
||||
HashTable<GWidget*> m_widgets;
|
||||
};
|
||||
|
@ -82,6 +86,7 @@ private:
|
|||
explicit FormEditorWidget(GWidget* parent);
|
||||
|
||||
RefPtr<FormWidget> m_form_widget;
|
||||
RefPtr<WidgetTreeModel> m_widget_tree_model;
|
||||
NonnullOwnPtr<Tool> m_tool;
|
||||
WidgetSelection m_selection;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue