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

@ -31,47 +31,49 @@
#include <AK/Vector.h>
#include <LibGUI/GWidget.h>
class GTextBox;
class GButton;
class GLabel;
namespace GUI {
class Button;
class Label;
class TextBox;
}
class CalculatorWidget final : public GWidget {
class CalculatorWidget final : public GUI::Widget {
C_OBJECT(CalculatorWidget)
public:
virtual ~CalculatorWidget() override;
private:
explicit CalculatorWidget(GWidget*);
void add_button(GButton&, Calculator::Operation);
void add_button(GButton&, int);
void add_button(GButton&);
explicit CalculatorWidget(GUI::Widget*);
void add_button(GUI::Button&, Calculator::Operation);
void add_button(GUI::Button&, int);
void add_button(GUI::Button&);
void update_display();
virtual void keydown_event(GKeyEvent&) override;
virtual void keydown_event(GUI::KeyEvent&) override;
Calculator m_calculator;
Keypad m_keypad;
RefPtr<GTextBox> m_entry;
RefPtr<GLabel> m_label;
RefPtr<GUI::TextBox> m_entry;
RefPtr<GUI::Label> m_label;
RefPtr<GButton> m_digit_button[10];
RefPtr<GButton> m_mem_add_button;
RefPtr<GButton> m_mem_save_button;
RefPtr<GButton> m_mem_recall_button;
RefPtr<GButton> m_mem_clear_button;
RefPtr<GButton> m_clear_button;
RefPtr<GButton> m_clear_error_button;
RefPtr<GButton> m_backspace_button;
RefPtr<GButton> m_decimal_point_button;
RefPtr<GButton> m_sign_button;
RefPtr<GButton> m_add_button;
RefPtr<GButton> m_subtract_button;
RefPtr<GButton> m_multiply_button;
RefPtr<GButton> m_divide_button;
RefPtr<GButton> m_sqrt_button;
RefPtr<GButton> m_inverse_button;
RefPtr<GButton> m_percent_button;
RefPtr<GButton> m_equals_button;
RefPtr<GUI::Button> m_digit_button[10];
RefPtr<GUI::Button> m_mem_add_button;
RefPtr<GUI::Button> m_mem_save_button;
RefPtr<GUI::Button> m_mem_recall_button;
RefPtr<GUI::Button> m_mem_clear_button;
RefPtr<GUI::Button> m_clear_button;
RefPtr<GUI::Button> m_clear_error_button;
RefPtr<GUI::Button> m_backspace_button;
RefPtr<GUI::Button> m_decimal_point_button;
RefPtr<GUI::Button> m_sign_button;
RefPtr<GUI::Button> m_add_button;
RefPtr<GUI::Button> m_subtract_button;
RefPtr<GUI::Button> m_multiply_button;
RefPtr<GUI::Button> m_divide_button;
RefPtr<GUI::Button> m_sqrt_button;
RefPtr<GUI::Button> m_inverse_button;
RefPtr<GUI::Button> m_percent_button;
RefPtr<GUI::Button> m_equals_button;
};