/TinyWindowManager

TinyWindowManager(TWM) is a simple and flexible window manager for your GUI Projects. It does draw anything itself but is flexible enough to support any renderer.

Primary LanguageC++MIT LicenseMIT

πŸͺŸ TinyWindowManager

TinyWindowManager (TWM) is a minimal, flexible window manager for lightweight GUI projects.
It handles basic window logic (position, dragging, focus, etc.) β€” while leaving rendering entirely up to you.

Currently, it’s designed to integrate easily with tools like rayGUI, but aims to stay renderer-independent.

🧩 A tiny foundation for custom GUI systems β€” simple, modular, and extensible.

✨ Features

  • πŸͺŸ Window logic only: manages window state, position, and focus
  • 🧱 Simple interface: Window structs + static functions for updates and drawing
  • ⚑ Lightweight: no dependencies, minimal code footprint
  • 🧠 Easy to use: override Init() and Draw() for defining behavior

βš™οΈ API Overview

namespace TWM {

struct Window {
    Rectangle Bounds;
    bool Dragging = false;
    bool Active = false;

    virtual void Init() {}
    virtual void Draw() {}
};

extern std::vector<Window *> States;

void MakeMoveable(Window* win, float TitleBarHeight = 20.0f);
void Update();
void Draw();

} // namespace TWM

πŸ“¦ Build

TinyWindowManager is written in C++, header-only. Just include TWM.hpp in your project and define TWM_IMPLEMENTATION once before importing it

πŸ“œ License

MIT License β€” free for personal and commercial use. Contributions and pull requests are welcome!

πŸ–₯️ Community & Support

Join the Discord server to chat about the project, ask questions, or follow development updates: https://discord.gg/7zvpWnE7QV