#pragma once #include "tft_handler.h" #include "event_manager.h" #include "system_manager.h" #include #include "GLOBALS.h" #include "program.h" class Shell : public IEventListener { private: TFT_Handler* tft; DISPLAY_STATE* display_state; std::vector windows; std::vector task_bar_items; std::vector items; SystemManager* _system_manager; int handle_window_click(CLICK_EVENT event); int handle_desktop_click(CLICK_EVENT event); int handle_taskbar_click(CLICK_EVENT event); bool handle_start_button_click(CLICK_EVENT event); public: void init(TFT_Handler* th, DISPLAY_STATE* ds, SystemManager* system_manager); // ======= Window ======= void create_window(Window* window); void close_window(int window_id); void minimize_window(int window_id); void draw_window(const Window& window); // ======= Desktop ======= void draw_background(int color); void draw_task_bar(int color); void draw_start_menu(); void draw_desktop_Item(const DesktopItem& desktop_item); // ======= Shared ======= void draw_all(); // IEventListener interface void on_click_event(CLICK_EVENT event) override; };