CheckBox.h 749 B

1234567891011121314151617181920212223242526
  1. /*
  2. * Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <LibWeb/HTML/HTMLInputElement.h>
  8. #include <LibWeb/Layout/LabelableNode.h>
  9. namespace Web::Layout {
  10. class CheckBox : public LabelableNode {
  11. public:
  12. CheckBox(DOM::Document&, HTML::HTMLInputElement&, NonnullRefPtr<CSS::StyleProperties>);
  13. virtual ~CheckBox() override;
  14. const HTML::HTMLInputElement& dom_node() const { return static_cast<const HTML::HTMLInputElement&>(LabelableNode::dom_node()); }
  15. HTML::HTMLInputElement& dom_node() { return static_cast<HTML::HTMLInputElement&>(LabelableNode::dom_node()); }
  16. private:
  17. virtual RefPtr<Painting::Paintable> create_paintable() const override;
  18. };
  19. }