2020-12-01 23:35:47 +01:00
|
|
|
/*
|
2021-05-18 22:09:15 +02:00
|
|
|
* Copyright (c) 2020-2021, the SerenityOS developers.
|
2020-12-01 23:35:47 +01:00
|
|
|
*
|
2021-04-22 01:24:48 -07:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-12-01 23:35:47 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2021-01-21 20:55:37 +01:00
|
|
|
#include <AK/Types.h>
|
2020-12-01 23:35:47 +01:00
|
|
|
#include <LibWeb/Forward.h>
|
|
|
|
|
|
|
|
|
|
namespace Web {
|
|
|
|
|
|
|
|
|
|
class EditEventHandler {
|
|
|
|
|
public:
|
2021-11-18 15:01:28 +01:00
|
|
|
explicit EditEventHandler(HTML::BrowsingContext& frame)
|
2020-12-01 23:35:47 +01:00
|
|
|
: m_frame(frame)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
virtual ~EditEventHandler() = default;
|
|
|
|
|
|
2021-05-18 22:09:15 +02:00
|
|
|
virtual void handle_delete_character_after(const DOM::Position&);
|
2020-12-06 19:51:55 +01:00
|
|
|
virtual void handle_delete(DOM::Range&);
|
2020-12-01 23:35:47 +01:00
|
|
|
virtual void handle_insert(DOM::Position, u32 code_point);
|
|
|
|
|
|
|
|
|
|
private:
|
2021-11-18 15:01:28 +01:00
|
|
|
HTML::BrowsingContext& m_frame;
|
2020-12-01 23:35:47 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|