ProgressPaintable.h 807 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * Copyright (c) 2022, Andreas Kling <kling@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <LibWeb/Layout/Progress.h>
  8. #include <LibWeb/Painting/PaintableBox.h>
  9. namespace Web::Painting {
  10. // FIXME: ProgressPaintable should inherit from LabelablePaintable, as it is a LabelableNode.
  11. // LabelablePaintable should be split into FormAssociatedLabelablePaintable once this
  12. // happens.
  13. class ProgressPaintable final : public PaintableBox {
  14. JS_CELL(ProgressPaintable, PaintableBox);
  15. public:
  16. static JS::NonnullGCPtr<ProgressPaintable> create(Layout::Progress const&);
  17. virtual void paint(PaintContext&, PaintPhase) const override;
  18. Layout::Progress const& layout_box() const;
  19. private:
  20. ProgressPaintable(Layout::Progress const&);
  21. };
  22. }