#pragma once #include "Calculator.h" #include "Keypad.h" #include #include class GTextBox; class GButton; class GLabel; class CalculatorWidget final : public GWidget { 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&); void update_display(); Calculator m_calculator; Keypad m_keypad; RefPtr m_entry; RefPtr m_label; RefPtr m_digit_button[10]; RefPtr m_mem_add_button; RefPtr m_mem_save_button; RefPtr m_mem_recall_button; RefPtr m_mem_clear_button; RefPtr m_clear_button; RefPtr m_clear_error_button; RefPtr m_backspace_button; RefPtr m_decimal_point_button; RefPtr m_sign_button; RefPtr m_add_button; RefPtr m_subtract_button; RefPtr m_multiply_button; RefPtr m_divide_button; RefPtr m_sqrt_button; RefPtr m_inverse_button; RefPtr m_percent_button; RefPtr m_equals_button; };