1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:07:35 +00:00

LibGUI: Put all classes in the GUI namespace and remove the leading G

This took me a moment. Welcome to the new world of GUI::Widget! :^)
This commit is contained in:
Andreas Kling 2020-02-02 15:07:41 +01:00
parent 2d39da5405
commit c5bd9d4ed1
337 changed files with 5400 additions and 4816 deletions

View file

@ -32,27 +32,29 @@
#include <AK/WeakPtr.h>
#include <LibGUI/GMargins.h>
class GWidget;
namespace GUI {
class GLayout {
class Widget;
class Layout {
public:
GLayout();
virtual ~GLayout();
Layout();
virtual ~Layout();
void add_widget(GWidget&);
void insert_widget_before(GWidget& widget, GWidget& before_widget);
void add_layout(OwnPtr<GLayout>&&);
void add_widget(Widget&);
void insert_widget_before(Widget& widget, Widget& before_widget);
void add_layout(OwnPtr<Layout>&&);
void add_spacer();
void remove_widget(GWidget&);
void remove_widget(Widget&);
virtual void run(GWidget&) = 0;
virtual void run(Widget&) = 0;
void notify_adopted(Badge<GWidget>, GWidget&);
void notify_disowned(Badge<GWidget>, GWidget&);
void notify_adopted(Badge<Widget>, Widget&);
void notify_disowned(Badge<Widget>, Widget&);
GMargins margins() const { return m_margins; }
void set_margins(const GMargins&);
Margins margins() const { return m_margins; }
void set_margins(const Margins&);
int spacing() const { return m_spacing; }
void set_spacing(int);
@ -67,14 +69,16 @@ protected:
};
Type type { Type::Invalid };
WeakPtr<GWidget> widget;
OwnPtr<GLayout> layout;
WeakPtr<Widget> widget;
OwnPtr<Layout> layout;
};
void add_entry(Entry&&);
WeakPtr<GWidget> m_owner;
WeakPtr<Widget> m_owner;
Vector<Entry> m_entries;
GMargins m_margins;
Margins m_margins;
int m_spacing { 3 };
};
}