HTMLTableElement.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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/DOM/ExceptionOr.h>
  8. #include <LibWeb/HTML/HTMLElement.h>
  9. #include <LibWeb/HTML/HTMLTableCaptionElement.h>
  10. #include <LibWeb/HTML/HTMLTableRowElement.h>
  11. #include <LibWeb/HTML/HTMLTableSectionElement.h>
  12. namespace Web::HTML {
  13. class HTMLTableElement final : public HTMLElement {
  14. public:
  15. using WrapperType = Bindings::HTMLTableElementWrapper;
  16. HTMLTableElement(DOM::Document&, DOM::QualifiedName);
  17. virtual ~HTMLTableElement() override;
  18. RefPtr<HTMLTableCaptionElement> caption();
  19. void set_caption(HTMLTableCaptionElement*);
  20. NonnullRefPtr<HTMLTableCaptionElement> create_caption();
  21. void delete_caption();
  22. RefPtr<HTMLTableSectionElement> t_head();
  23. DOM::ExceptionOr<void> set_t_head(HTMLTableSectionElement* thead);
  24. NonnullRefPtr<HTMLTableSectionElement> create_t_head();
  25. void delete_t_head();
  26. RefPtr<HTMLTableSectionElement> t_foot();
  27. DOM::ExceptionOr<void> set_t_foot(HTMLTableSectionElement* tfoot);
  28. NonnullRefPtr<HTMLTableSectionElement> create_t_foot();
  29. void delete_t_foot();
  30. NonnullRefPtr<DOM::HTMLCollection> t_bodies();
  31. NonnullRefPtr<HTMLTableSectionElement> create_t_body();
  32. NonnullRefPtr<DOM::HTMLCollection> rows();
  33. DOM::ExceptionOr<NonnullRefPtr<HTMLTableRowElement>> insert_row(long index);
  34. DOM::ExceptionOr<void> delete_row(long index);
  35. private:
  36. virtual void apply_presentational_hints(CSS::StyleProperties&) const override;
  37. };
  38. }