1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:48:10 +00:00

HackStudio: Allow moving widgets around using the CursorTool

You can now move the widgets around, either by themselves or in group
selections, by dragging them with the cursor tool. :^)
This commit is contained in:
Andreas Kling 2019-11-10 22:31:10 +01:00
parent f6576c4b7c
commit 567769eb2f
4 changed files with 79 additions and 8 deletions

View file

@ -60,6 +60,15 @@ public:
m_widgets.clear();
}
template<typename Callback>
void for_each(Callback callback)
{
for (auto& it : m_widgets) {
if (callback(*it) == IterationDecision::Break)
break;
}
}
WidgetSelection() {}
private:
HashTable<GWidget*> m_widgets;