From 78f01f5d041ba291aca05f768bb71eba71ebb58e Mon Sep 17 00:00:00 2001 From: dec05eba Date: Fri, 16 Apr 2021 23:36:37 +0200 Subject: Add a combined manga search page, highlight urls ending with ? --- plugins/MangaCombined.hpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 plugins/MangaCombined.hpp (limited to 'plugins/MangaCombined.hpp') diff --git a/plugins/MangaCombined.hpp b/plugins/MangaCombined.hpp new file mode 100644 index 0000000..b9627fe --- /dev/null +++ b/plugins/MangaCombined.hpp @@ -0,0 +1,27 @@ +#pragma once + +#include "Manga.hpp" +#include +#include + +namespace QuickMedia { + struct MangaPlugin { + std::unique_ptr page; + std::string title; + std::string service_name; + std::string logo_path; + }; + + class MangaCombinedSearchPage : public Page { + public: + MangaCombinedSearchPage(Program *program, std::vector search_pages); + const char* get_title() const override { return "All"; } + bool search_is_filter() override { return false; } + SearchResult search(const std::string &str, BodyItems &result_items) override; + PluginResult get_page(const std::string &str, int page, BodyItems &result_items) override; + PluginResult submit(const std::string &title, const std::string &url, std::vector &result_tabs) override; + sf::Vector2i get_thumbnail_max_size() override { return sf::Vector2i(101, 141); }; + private: + std::vector search_pages; + }; +} \ No newline at end of file -- cgit v1.2.3