A UI widget that adds navigation history to the
PathField widget supes up tree navigation via keyboard entry. This widget extends that
experience further by queuing up the user’s navigation history. As in any modern day browser, the
user can then directly jump to any previously visited path.
- browser_bar = BrowserBar(
visited_history_size=20, branching_options_provider=branching_options_provider, apply_path_handler=apply_path_handler,
The Browser Bar extends the
PathFieldUI widget for navigating tree views via the keyboard. Namely, it adds navigation history. As in any modern day browser, this allows the user to diectly jump to any previously visited path.
- Keyword Arguments
visited_history_size (int) – Maximum number of previously visited paths to queue up. Default 10.
apply_path_handler (func) – This function is called when the user updates the path and is expected to update the caller app accordingly. The user can update the path in one of 3 ways: 1. by hitting Enter on the input field, 2. selecting a path from the dropdown, or 3. by clicking on the “prev” or “next” buttons. Function signature: void apply_path_handler(path: str)
branching_options_provider (func) – This function is required to provide a list of possible branches whenever prompted with a path. For example, if path = “C:”, then the return value might be [“Program Files”, “temp”, …, “Users”]. Function signature: list(str) branching_options_provider(path: str)