PocketPutr/Desktop_Test/window_manager.h
2025-12-14 13:00:01 +01:00

27 lines
623 B
C++

#pragma once
#include "window.h"
#include "tft_handler.h"
#include <vector>
#include "GLOBALS.h"
#define COL_WHITE 0xffff
#define COL_BLACK 0x0000
#define COL_GREY 0xbdf7
#define COL_LIGHT_GREY 0x8410
#define COL_DARK_BLUE 0x0014
#define COL_RED 0xf800
class WindowManager {
private:
TFT_Handler* tft; // Pointer to shared TFT handler
std::vector<Window> windows; // Track all windows
public:
void init(TFT_Handler* th);
void create_window(Window window);
void close_window(int window_id);
void draw_all(); // Redraw all windows
void draw_window(Window window);
int click_event(CLICK_EVENT event);
};