mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 14:22:43 +00:00 
			
		
		
		
	 1682f0b760
			
		
	
	
		1682f0b760
		
	
	
	
	
		
			
			SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
		
			
				
	
	
		
			54 lines
		
	
	
	
		
			1.5 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			54 lines
		
	
	
	
		
			1.5 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #pragma once
 | |
| 
 | |
| #include <AK/Forward.h>
 | |
| #include <AK/NonnullOwnPtr.h>
 | |
| #include <AK/WeakPtr.h>
 | |
| #include <Kernel/API/KeyCode.h>
 | |
| #include <LibGUI/Forward.h>
 | |
| #include <LibGfx/Forward.h>
 | |
| #include <LibWeb/Forward.h>
 | |
| #include <LibWeb/Page/EditEventHandler.h>
 | |
| 
 | |
| namespace Web {
 | |
| 
 | |
| class Frame;
 | |
| 
 | |
| class EventHandler {
 | |
| public:
 | |
|     explicit EventHandler(Badge<Frame>, Frame&);
 | |
|     ~EventHandler();
 | |
| 
 | |
|     bool handle_mouseup(const Gfx::IntPoint&, unsigned button, unsigned modifiers);
 | |
|     bool handle_mousedown(const Gfx::IntPoint&, unsigned button, unsigned modifiers);
 | |
|     bool handle_mousemove(const Gfx::IntPoint&, unsigned buttons, unsigned modifiers);
 | |
|     bool handle_mousewheel(const Gfx::IntPoint&, unsigned buttons, unsigned modifiers, int wheel_delta);
 | |
| 
 | |
|     bool handle_keydown(KeyCode, unsigned modifiers, u32 code_point);
 | |
| 
 | |
|     void set_mouse_event_tracking_layout_node(Layout::Node*);
 | |
| 
 | |
|     void set_edit_event_handler(NonnullOwnPtr<EditEventHandler> value) { m_edit_event_handler = move(value); }
 | |
| 
 | |
| private:
 | |
|     bool focus_next_element();
 | |
|     bool focus_previous_element();
 | |
| 
 | |
|     Layout::InitialContainingBlockBox* layout_root();
 | |
|     const Layout::InitialContainingBlockBox* layout_root() const;
 | |
| 
 | |
|     Frame& m_frame;
 | |
| 
 | |
|     bool m_in_mouse_selection { false };
 | |
| 
 | |
|     WeakPtr<Layout::Node> m_mouse_event_tracking_layout_node;
 | |
| 
 | |
|     NonnullOwnPtr<EditEventHandler> m_edit_event_handler;
 | |
| };
 | |
| 
 | |
| }
 |