aboutsummaryrefslogtreecommitdiff
path: root/include/QuickMedia.hpp
blob: 2ab47338d098d169786951324f7a39db7ec7868a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#pragma once

#include "SearchBar.hpp"
#include "Page.hpp"
#include "Storage.hpp"
#include <vector>
#include <memory>
#include <SFML/Graphics/Font.hpp>
#include <SFML/Graphics/RenderWindow.hpp>
#include <json/value.h>
#include <unordered_set>

namespace QuickMedia {
    class Body;
    class Plugin;
    
    class Program {
    public:
        Program();
        ~Program();
        int run(int argc, char **argv);
    private:
        void base_event_handler(sf::Event &event, Page previous_page);
        void search_suggestion_page();
        void search_result_page();
        void video_content_page();
        void episode_list_page();
        void image_page();
    private:
        sf::RenderWindow window;
        sf::Vector2f window_size;
        sf::Font font;
        Body *body;
        Plugin *current_plugin;
        std::unique_ptr<SearchBar> search_bar;
        Page current_page;
        // TODO: Combine these
        std::string video_url;
        std::string images_url;
        std::string content_title;
        std::string content_url;
        std::string chapter_title;
        int image_index;
        Path content_storage_file;
        Json::Value content_storage_json;
        std::unordered_set<std::string> watched_videos;
    };
}