-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
/
InspectorWidget.h
54 lines (41 loc) · 1.56 KB
/
InspectorWidget.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2021-2022, Sam Atkins <atkinssj@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibGUI/Widget.h>
#include <LibWeb/Forward.h>
#include <LibWebView/Forward.h>
namespace Browser {
class InspectorWidget final : public GUI::Widget {
C_OBJECT(InspectorWidget)
public:
static NonnullRefPtr<InspectorWidget> create(WebView::OutOfProcessWebView& content_view);
virtual ~InspectorWidget();
void inspect();
void reset();
void select_default_node();
void select_hovered_node();
private:
explicit InspectorWidget(WebView::OutOfProcessWebView& content_view);
Gfx::IntPoint to_widget_position(Gfx::IntPoint) const;
RefPtr<WebView::OutOfProcessWebView> m_inspector_view;
OwnPtr<WebView::InspectorClient> m_inspector_client;
RefPtr<GUI::Menu> m_dom_node_text_context_menu;
RefPtr<GUI::Menu> m_dom_node_tag_context_menu;
RefPtr<GUI::Menu> m_dom_node_attribute_context_menu;
RefPtr<GUI::Action> m_edit_node_action;
RefPtr<GUI::Action> m_copy_node_action;
RefPtr<GUI::Action> m_screenshot_node_action;
RefPtr<GUI::Action> m_create_child_element_action;
RefPtr<GUI::Action> m_create_child_text_node_action;
RefPtr<GUI::Action> m_clone_node_action;
RefPtr<GUI::Action> m_delete_node_action;
RefPtr<GUI::Action> m_add_attribute_action;
RefPtr<GUI::Action> m_remove_attribute_action;
RefPtr<GUI::Action> m_copy_attribute_value_action;
};
}