/* * Copyright (c) 2023, Sam Atkins * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include namespace GUI { class PathBreadcrumbbar : public Widget { C_OBJECT_ABSTRACT(PathBreadcrumbbar) public: static ErrorOr> try_create(); virtual ~PathBreadcrumbbar() override; void set_current_path(DeprecatedString const&); void show_location_text_box(); void hide_location_text_box(); bool has_parent_segment() const; bool has_child_segment() const; void select_parent_segment(); void select_child_segment(); Function on_path_change; Function on_paths_drop; Function on_hide_location_box; private: PathBreadcrumbbar(NonnullRefPtr, NonnullRefPtr); NonnullRefPtr m_location_text_box; NonnullRefPtr m_breadcrumbbar; DeprecatedString m_current_path; }; }