forked from SerenityOS/serenity
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathURLBox.h
More file actions
34 lines (23 loc) · 717 Bytes
/
URLBox.h
File metadata and controls
34 lines (23 loc) · 717 Bytes
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
/*
* Copyright (c) 2023, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibGUI/TextBox.h>
namespace Browser {
class URLBox : public GUI::TextBox {
C_OBJECT(URLBox)
public:
virtual ~URLBox() override = default;
void set_focus_transition(bool focus_transition) { m_focus_transition = focus_transition; }
bool is_focus_transition() const { return m_focus_transition; }
private:
URLBox();
void highlight_url();
virtual void mousedown_event(GUI::MouseEvent&) override;
virtual void focusout_event(GUI::FocusEvent&) override;
virtual void focusin_event(GUI::FocusEvent&) override;
bool m_focus_transition { true };
};
}