diff options
Diffstat (limited to 'include/Tab.hpp')
-rw-r--r-- | include/Tab.hpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/Tab.hpp b/include/Tab.hpp index ccb8c85..b277f88 100644 --- a/include/Tab.hpp +++ b/include/Tab.hpp @@ -1,5 +1,6 @@ #pragma once +#include <vector> #include <memory> namespace QuickMedia { @@ -7,9 +8,19 @@ namespace QuickMedia { class Page; class SearchBar; + struct LoginInputs { + std::vector<std::unique_ptr<SearchBar>> inputs; + int focused_input = 0; + bool needs_refresh = false; + }; + struct Tab { + Tab(std::unique_ptr<Body> body, std::unique_ptr<Page> page, std::unique_ptr<SearchBar> search_bar, LoginInputs login_inputs = {}) : + body(std::move(body)), page(std::move(page)), search_bar(std::move(search_bar)), login_inputs(std::move(login_inputs)) {} + std::unique_ptr<Body> body; std::unique_ptr<Page> page; // Only null when current page has |is_single_page()| set to true std::unique_ptr<SearchBar> search_bar; // Nullable + LoginInputs login_inputs; }; }
\ No newline at end of file |