EditEventHandler.h 684 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * Copyright (c) 2020-2021, the SerenityOS developers.
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <AK/Types.h>
  8. #include <LibWeb/Forward.h>
  9. namespace Web {
  10. class EditEventHandler {
  11. public:
  12. explicit EditEventHandler(HTML::BrowsingContext& browsing_context)
  13. : m_browsing_context(browsing_context)
  14. {
  15. }
  16. virtual ~EditEventHandler() = default;
  17. virtual void handle_delete_character_after(JS::NonnullGCPtr<DOM::Position>);
  18. virtual void handle_delete(DOM::Range&);
  19. virtual void handle_insert(JS::NonnullGCPtr<DOM::Position>, u32 code_point);
  20. private:
  21. JS::NonnullGCPtr<HTML::BrowsingContext> m_browsing_context;
  22. };
  23. }