Selection.cpp 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. /*
  2. * Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #include <LibWeb/Bindings/Intrinsics.h>
  7. #include <LibWeb/Selection/Selection.h>
  8. namespace Web::Selection {
  9. JS::NonnullGCPtr<Selection> Selection::create(JS::Realm& realm)
  10. {
  11. return *realm.heap().allocate<Selection>(realm, realm);
  12. }
  13. Selection::Selection(JS::Realm& realm)
  14. : PlatformObject(realm)
  15. {
  16. set_prototype(&Bindings::cached_web_prototype(realm, "Selection"));
  17. }
  18. Selection::~Selection() = default;
  19. DOM::Node* Selection::anchor_node()
  20. {
  21. TODO();
  22. }
  23. unsigned Selection::anchor_offset()
  24. {
  25. TODO();
  26. }
  27. DOM::Node* Selection::focus_node()
  28. {
  29. TODO();
  30. }
  31. unsigned Selection::focus_offset() const
  32. {
  33. TODO();
  34. }
  35. bool Selection::is_collapsed() const
  36. {
  37. TODO();
  38. }
  39. unsigned Selection::range_count() const
  40. {
  41. TODO();
  42. }
  43. String Selection::type() const
  44. {
  45. TODO();
  46. }
  47. DOM::Range* Selection::get_range_at(unsigned index)
  48. {
  49. (void)index;
  50. TODO();
  51. }
  52. void Selection::add_range(DOM::Range&)
  53. {
  54. TODO();
  55. }
  56. void Selection::remove_range(DOM::Range&)
  57. {
  58. TODO();
  59. }
  60. void Selection::remove_all_ranges()
  61. {
  62. TODO();
  63. }
  64. void Selection::empty()
  65. {
  66. TODO();
  67. }
  68. void Selection::collapse(DOM::Node*, unsigned offset)
  69. {
  70. (void)offset;
  71. TODO();
  72. }
  73. void Selection::set_position(DOM::Node*, unsigned offset)
  74. {
  75. (void)offset;
  76. TODO();
  77. }
  78. void Selection::collapse_to_start()
  79. {
  80. TODO();
  81. }
  82. void Selection::collapse_to_end()
  83. {
  84. TODO();
  85. }
  86. void Selection::extend(DOM::Node&, unsigned offset)
  87. {
  88. (void)offset;
  89. TODO();
  90. }
  91. void Selection::set_base_and_extent(DOM::Node& anchor_node, unsigned anchor_offset, DOM::Node& focus_node, unsigned focus_offset)
  92. {
  93. (void)anchor_node;
  94. (void)anchor_offset;
  95. (void)focus_node;
  96. (void)focus_offset;
  97. TODO();
  98. }
  99. void Selection::select_all_children(DOM::Node&)
  100. {
  101. TODO();
  102. }
  103. void Selection::delete_from_document()
  104. {
  105. TODO();
  106. }
  107. bool Selection::contains_node(DOM::Node&, bool allow_partial_containment) const
  108. {
  109. (void)allow_partial_containment;
  110. TODO();
  111. }
  112. String Selection::to_string() const
  113. {
  114. TODO();
  115. }
  116. }