diff options
| author | Eugen Wissner <belka@caraus.de> | 2023-04-15 08:43:30 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2023-04-15 08:43:30 +0200 |
| commit | 34b10f41aa285e423cccb161342b68ae7275da4b (patch) | |
| tree | e021c107400ec467b59a019c45d6659110c677cf /src/component.h | |
| parent | dbf14caee2f3ffbcfb21d5ca4d1566e0f57a1aed (diff) | |
| download | slackbuilder-34b10f41aa285e423cccb161342b68ae7275da4b.tar.gz | |
Retrieve updatable packages
Diffstat (limited to 'src/component.h')
| -rw-r--r-- | src/component.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/component.h b/src/component.h new file mode 100644 index 0000000..d1a587a --- /dev/null +++ b/src/component.h @@ -0,0 +1,20 @@ +#pragma once + +#include <ftxui/component/component.hpp> +#include <ftxui/dom/table.hpp> + +namespace katja +{ + class PackageList final : public ftxui::ComponentBase + { + std::vector<std::vector<std::string>> m_data; + std::vector<std::string> m_header; + std::size_t top_line{ 0 }; + + public: + PackageList(const std::vector<std::string>& header, const std::vector<std::vector<std::string>>& data); + + virtual ftxui::Element Render() override; + virtual bool OnEvent(ftxui::Event event) override; + }; +} |
