aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-04-16 23:36:37 +0200
committerdec05eba <dec05eba@protonmail.com>2021-04-16 23:36:37 +0200
commit78f01f5d041ba291aca05f768bb71eba71ebb58e (patch)
treee63c4992ff642813770f5ac093fa0eb57e69eb97 /plugins
parent1376a92ef6d6a6418efefbcde5e01d1958e52fd5 (diff)
Add a combined manga search page, highlight urls ending with ?
Diffstat (limited to 'plugins')
-rw-r--r--plugins/MangaCombined.hpp27
-rw-r--r--plugins/Manganelo.hpp1
2 files changed, 27 insertions, 1 deletions
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 <vector>
+#include <map>
+
+namespace QuickMedia {
+ struct MangaPlugin {
+ std::unique_ptr<Page> page;
+ std::string title;
+ std::string service_name;
+ std::string logo_path;
+ };
+
+ class MangaCombinedSearchPage : public Page {
+ public:
+ MangaCombinedSearchPage(Program *program, std::vector<MangaPlugin> 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<Tab> &result_tabs) override;
+ sf::Vector2i get_thumbnail_max_size() override { return sf::Vector2i(101, 141); };
+ private:
+ std::vector<MangaPlugin> search_pages;
+ };
+} \ No newline at end of file
diff --git a/plugins/Manganelo.hpp b/plugins/Manganelo.hpp
index 530a1f2..ca44e05 100644
--- a/plugins/Manganelo.hpp
+++ b/plugins/Manganelo.hpp
@@ -1,7 +1,6 @@
#pragma once
#include "Manga.hpp"
-#include <functional>
namespace QuickMedia {
class ManganeloSearchPage : public Page {