1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 00:07:43 +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

@ -28,13 +28,15 @@
#include <LibGUI/GWidget.h>
class GButton;
class GTextEditor;
namespace GUI {
class GSpinBox : public GWidget {
C_OBJECT(GSpinBox)
class Button;
class TextEditor;
class SpinBox : public Widget {
C_OBJECT(SpinBox)
public:
virtual ~GSpinBox() override;
virtual ~SpinBox() override;
int value() const { return m_value; }
void set_value(int);
@ -48,16 +50,18 @@ public:
Function<void(int value)> on_change;
protected:
explicit GSpinBox(GWidget* parent = nullptr);
explicit SpinBox(Widget* parent = nullptr);
virtual void resize_event(GResizeEvent&) override;
virtual void resize_event(ResizeEvent&) override;
private:
RefPtr<GTextEditor> m_editor;
RefPtr<GButton> m_increment_button;
RefPtr<GButton> m_decrement_button;
RefPtr<TextEditor> m_editor;
RefPtr<Button> m_increment_button;
RefPtr<Button> m_decrement_button;
int m_min { 0 };
int m_max { 100 };
int m_value { 0 };
};
}