jubilant-funicular
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
nta::Window Class Reference

Represent a window. More...

#include <Window.h>

Collaboration diagram for nta::Window:
Collaboration graph
[legend]

Public Member Functions

 Window ()
 constructor and destructor
 
SDL_Window * getSDLWindow (GetSDLWindowKey key) const
 returns the underlying window
 
glm::vec2 getDimensions () const
 returns the window's dimensions
 
std::string getTitle () const
 returns the window's title
 
WindowID getID () const
 return the window's id
 
int getWidth () const
 returns the width of the window
 
int getHeight () const
 returns the height of the window
 
bool hasKeyboardFocus () const
 
bool hasMouseFocus () const
 
void resize (int width, int height)
 resizes the window
 
void setDimensions (int width, int height)
 updates the window's stored dimensions
 
void swapBuffers () const
 updates the screen
 

Static Public Member Functions

static WindowID getKeyboardFocus ()
 
static WindowID getMouseFocus ()
 
static void setKeyboardFocus (const WindowID &win)
 
static void setMouseFocus (const WindowID &win)
 

Private Member Functions

void createWindow (crstring title, int width, int height, int flags=0)
 creates a window
 

Private Attributes

SDL_Window * m_window
 the window
 
std::string m_title
 the title of the window
 
int m_width
 the dimensions of the window
 
int m_height
 

Static Private Attributes

static WindowID m_keyboard_focus
 
static std::mutex m_keyboard_mutex
 
static WindowID m_mouse_focus
 
static std::mutex m_mouse_mutex
 

Friends

class WindowManager
 

Detailed Description

Represent a window.

Definition at line 30 of file Window.h.


The documentation for this class was generated from the following files: