jubilant-funicular
WindowManager.h
1 #ifndef NTA_WINDOWMANAGER_H_INCLUDED
2 #define NTA_WINDOWMANAGER_H_INCLUDED
3 
4 #include <map>
5 
6 #include "nta/Window.h"
7 
8 namespace nta {
10  class WindowManager {
11  private:
13  static std::map<std::string, Window> m_windowMap;
14  public:
16  static Window* getWindow(crstring windowTitle, int width = 640,
17  int height = 480, int flags = 0);
18  static Window* getWindow(crstring windowTitle, int flags) {
19  return getWindow(windowTitle, 640, 480, flags);
20  }
21  static void destroyWindow(crstring title);
23  static void destroy();
24  };
25 }
26 
27 #endif // NTA_WINDOWMANAGER_H_INCLUDED
nta::WindowManager
Manages Windows (or GL contexts if you prefer)
Definition: WindowManager.h:10
nta::WindowManager::m_windowMap
static std::map< std::string, Window > m_windowMap
Collection of Window.
Definition: WindowManager.h:13
nta::Window
Represent a window.
Definition: Window.h:30
nta
Definition: Animation2D.h:6
nta::WindowManager::destroy
static void destroy()
Destorys the manager, freeing all necessary data.
Definition: WindowManager.cpp:16
nta::WindowManager::getWindow
static Window * getWindow(crstring windowTitle, int width=640, int height=480, int flags=0)
Gets a Window with specified title, width, height, and flags.
Definition: WindowManager.cpp:6