#pragma once #include #include #include #include #include "Color.h" #include "Rectangle.h" #include "ViewController.h" class View { public: View(Museum & m); virtual ~View(); public: virtual void window_size(unsigned int width, unsigned int height); virtual void dialog_file(void(*callback)(std::vector files, void* data), void* data); virtual void draw_rect(Rectangle r, Color c); private: virtual void draw_begin(); virtual void draw_end(); virtual void window_init(); virtual void window_deinit(); public: bool open = true; private: ViewController controller; private: unsigned int width = 0, height = 0; SDL_Window * window = nullptr; SDL_Renderer * renderer = nullptr; private: std::thread * worker = nullptr; void work(); };