/* * Copyright (c) 2020, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include "Forward.h" #include #include #include namespace Spreadsheet { struct Format { Optional foreground_color; Optional background_color; }; struct ConditionalFormat : public Format { DeprecatedString condition; }; enum class FormatType { Background = 0, Foreground = 1 }; class ConditionView : public GUI::Widget { C_OBJECT(ConditionView) public: virtual ~ConditionView() override; private: ConditionView(ConditionalFormat&); ConditionalFormat& m_format; }; class ConditionsView : public GUI::Widget { C_OBJECT(ConditionsView) public: virtual ~ConditionsView() override; void set_formats(Vector*); void add_format(); void remove_top(); private: ConditionsView(); Vector* m_formats { nullptr }; NonnullRefPtrVector m_widgets; }; }