ladybird/Userland/Applications/Browser/URLBox.h
Timothy Flynn 55092dd164 LibGUI+Browser: Move GUI::UrlBox to the Browser application
Browser is the only user of this component. Move it to allow making use
of LibWebView for URL highlighting.
2023-10-20 07:18:54 +02:00

34 lines
717 B
C++

/*
* 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 };
};
}