Conquer Space 0.0.0
A space themed grand strategy game set in the near future, with realistic orbital mechanics, and an emphasis on economics and politics.
Public Member Functions | Public Attributes | Private Attributes | List of all members
cqsp::engine::GLWindow Class Reference

#include <glfwwindow.h>

Inheritance diagram for cqsp::engine::GLWindow:
cqsp::engine::Window

Public Member Functions

 GLWindow (Application *app)
 
bool ButtonIsHeld (int btn) const
 
bool ButtonIsReleased (int btn) const
 
bool ButtonIsPressed (int btn) const
 
double GetMouseX () const
 
double GetMouseY () const
 
bool MouseButtonIsHeld (int btn) const
 
bool MouseButtonIsReleased (int btn) const
 
bool MouseButtonIsPressed (int btn) const
 
bool MouseDragged () const
 
void KeyboardCallback (GLFWwindow *_w, int key, int scancode, int action, int mods)
 
void MousePositionCallback (GLFWwindow *_w, double xpos, double ypos)
 
void MouseEnterCallback (GLFWwindow *_w, int entered)
 
void MouseButtonCallback (GLFWwindow *_w, int button, int action, int mods)
 
void ScrollCallback (GLFWwindow *_w, double xoffset, double yoffset)
 
void CharacterCallback (GLFWwindow *window, unsigned int codepoint)
 
void DropCallback (GLFWwindow *_w, int count, const char **paths)
 
void FrameBufferSizeCallback (GLFWwindow *window, int width, int height)
 
void SetCallbacks ()
 
void OnFrame ()
 Any cleanups or clearing the window has to do each frame More...
 
void SetWindowSize (int width, int height)
 
bool WindowSizeChanged () const
 
int GetScrollAmount () const
 
int GetWindowHeight () const
 
int GetWindowWidth () const
 
void InitWindow (int width, int height)
 
double MouseButtonLastReleased (int btn) const
 
bool MouseButtonDoubleClicked (int btn) const
 
void Destroy ()
 
float GetTime () const
 
void SetFullScreen (bool fullscreen) const
 
bool ShouldExit () const
 
bool ExitApplication ()
 
void SetIcon (std::string_view path)
 

Public Attributes

GLFWwindow * window
 
Applicationapp
 
std::vector< int > keys_pressed_last
 
std::vector< int > keys_released_last
 
std::vector< unsigned int > code_input
 
int m_mods
 

Private Attributes

bool window_size_changed
 
double m_mouse_x
 
double m_mouse_y
 
double m_mouse_x_on_pressed
 
double m_mouse_y_on_pressed
 
bool m_mouse_keys_held [GLFW_MOUSE_BUTTON_LAST] = {false}
 
bool m_mouse_keys_released [GLFW_MOUSE_BUTTON_LAST] = {false}
 
bool m_mouse_keys_pressed [GLFW_MOUSE_BUTTON_LAST] = {false}
 
double m_mouse_keys_last_pressed [GLFW_MOUSE_BUTTON_LAST] = {0.0}
 
double m_mouse_pressed_time [GLFW_MOUSE_BUTTON_LAST] = {0.0}
 
bool m_keys_held [GLFW_KEY_LAST] = {false}
 
bool m_keys_released [GLFW_KEY_LAST] = {false}
 
bool m_keys_pressed [GLFW_KEY_LAST] = {false}
 
double m_scroll_amount
 
int m_window_width
 
int m_window_height
 

Constructor & Destructor Documentation

◆ GLWindow()

cqsp::engine::GLWindow::GLWindow ( Application app)
inlineexplicit

Member Function Documentation

◆ ButtonIsHeld()

bool cqsp::engine::GLWindow::ButtonIsHeld ( int  btn) const
inlinevirtual

Implements cqsp::engine::Window.

◆ ButtonIsPressed()

bool cqsp::engine::GLWindow::ButtonIsPressed ( int  btn) const
inlinevirtual

Implements cqsp::engine::Window.

◆ ButtonIsReleased()

bool cqsp::engine::GLWindow::ButtonIsReleased ( int  btn) const
inlinevirtual

Implements cqsp::engine::Window.

◆ CharacterCallback()

void cqsp::engine::GLWindow::CharacterCallback ( GLFWwindow *  window,
unsigned int  codepoint 
)
inline

◆ Destroy()

void cqsp::engine::GLWindow::Destroy ( )
virtual

Implements cqsp::engine::Window.

◆ DropCallback()

void cqsp::engine::GLWindow::DropCallback ( GLFWwindow *  _w,
int  count,
const char **  paths 
)
inline

◆ ExitApplication()

bool cqsp::engine::GLWindow::ExitApplication ( )
virtual

Implements cqsp::engine::Window.

◆ FrameBufferSizeCallback()

void cqsp::engine::GLWindow::FrameBufferSizeCallback ( GLFWwindow *  window,
int  width,
int  height 
)

◆ GetMouseX()

double cqsp::engine::GLWindow::GetMouseX ( ) const
inlinevirtual

Implements cqsp::engine::Window.

◆ GetMouseY()

double cqsp::engine::GLWindow::GetMouseY ( ) const
inlinevirtual

Implements cqsp::engine::Window.

◆ GetScrollAmount()

int cqsp::engine::GLWindow::GetScrollAmount ( ) const
inlinevirtual

Implements cqsp::engine::Window.

◆ GetTime()

float cqsp::engine::GLWindow::GetTime ( ) const
virtual

Implements cqsp::engine::Window.

◆ GetWindowHeight()

int cqsp::engine::GLWindow::GetWindowHeight ( ) const
inlinevirtual

Implements cqsp::engine::Window.

◆ GetWindowWidth()

int cqsp::engine::GLWindow::GetWindowWidth ( ) const
inlinevirtual

Implements cqsp::engine::Window.

◆ InitWindow()

void cqsp::engine::GLWindow::InitWindow ( int  width,
int  height 
)
virtual

Implements cqsp::engine::Window.

◆ KeyboardCallback()

void cqsp::engine::GLWindow::KeyboardCallback ( GLFWwindow *  _w,
int  key,
int  scancode,
int  action,
int  mods 
)

◆ MouseButtonCallback()

void cqsp::engine::GLWindow::MouseButtonCallback ( GLFWwindow *  _w,
int  button,
int  action,
int  mods 
)

◆ MouseButtonDoubleClicked()

bool cqsp::engine::GLWindow::MouseButtonDoubleClicked ( int  btn) const
inlinevirtual

Implements cqsp::engine::Window.

◆ MouseButtonIsHeld()

bool cqsp::engine::GLWindow::MouseButtonIsHeld ( int  btn) const
inlinevirtual

Implements cqsp::engine::Window.

◆ MouseButtonIsPressed()

bool cqsp::engine::GLWindow::MouseButtonIsPressed ( int  btn) const
inlinevirtual

Implements cqsp::engine::Window.

◆ MouseButtonIsReleased()

bool cqsp::engine::GLWindow::MouseButtonIsReleased ( int  btn) const
inlinevirtual

Implements cqsp::engine::Window.

◆ MouseButtonLastReleased()

double cqsp::engine::GLWindow::MouseButtonLastReleased ( int  btn) const
inlinevirtual

Implements cqsp::engine::Window.

◆ MouseDragged()

bool cqsp::engine::GLWindow::MouseDragged ( ) const
inlinevirtual

Implements cqsp::engine::Window.

◆ MouseEnterCallback()

void cqsp::engine::GLWindow::MouseEnterCallback ( GLFWwindow *  _w,
int  entered 
)
inline

◆ MousePositionCallback()

void cqsp::engine::GLWindow::MousePositionCallback ( GLFWwindow *  _w,
double  xpos,
double  ypos 
)
inline

◆ OnFrame()

void cqsp::engine::GLWindow::OnFrame ( )
virtual

Any cleanups or clearing the window has to do each frame

Implements cqsp::engine::Window.

◆ ScrollCallback()

void cqsp::engine::GLWindow::ScrollCallback ( GLFWwindow *  _w,
double  xoffset,
double  yoffset 
)
inline

◆ SetCallbacks()

void cqsp::engine::GLWindow::SetCallbacks ( )
virtual

Implements cqsp::engine::Window.

◆ SetFullScreen()

void cqsp::engine::GLWindow::SetFullScreen ( bool  fullscreen) const
virtual

Implements cqsp::engine::Window.

◆ SetIcon()

void cqsp::engine::GLWindow::SetIcon ( std::string_view  path)
virtual

Implements cqsp::engine::Window.

◆ SetWindowSize()

void cqsp::engine::GLWindow::SetWindowSize ( int  width,
int  height 
)
inlinevirtual

Implements cqsp::engine::Window.

◆ ShouldExit()

bool cqsp::engine::GLWindow::ShouldExit ( ) const
virtual

Implements cqsp::engine::Window.

◆ WindowSizeChanged()

bool cqsp::engine::GLWindow::WindowSizeChanged ( ) const
inlinevirtual

Implements cqsp::engine::Window.

Member Data Documentation

◆ app

Application* cqsp::engine::GLWindow::app

◆ code_input

std::vector<unsigned int> cqsp::engine::GLWindow::code_input

◆ keys_pressed_last

std::vector<int> cqsp::engine::GLWindow::keys_pressed_last

◆ keys_released_last

std::vector<int> cqsp::engine::GLWindow::keys_released_last

◆ m_keys_held

bool cqsp::engine::GLWindow::m_keys_held[GLFW_KEY_LAST] = {false}
private

◆ m_keys_pressed

bool cqsp::engine::GLWindow::m_keys_pressed[GLFW_KEY_LAST] = {false}
private

◆ m_keys_released

bool cqsp::engine::GLWindow::m_keys_released[GLFW_KEY_LAST] = {false}
private

◆ m_mods

int cqsp::engine::GLWindow::m_mods

◆ m_mouse_keys_held

bool cqsp::engine::GLWindow::m_mouse_keys_held[GLFW_MOUSE_BUTTON_LAST] = {false}
private

◆ m_mouse_keys_last_pressed

double cqsp::engine::GLWindow::m_mouse_keys_last_pressed[GLFW_MOUSE_BUTTON_LAST] = {0.0}
private

◆ m_mouse_keys_pressed

bool cqsp::engine::GLWindow::m_mouse_keys_pressed[GLFW_MOUSE_BUTTON_LAST] = {false}
private

◆ m_mouse_keys_released

bool cqsp::engine::GLWindow::m_mouse_keys_released[GLFW_MOUSE_BUTTON_LAST] = {false}
private

◆ m_mouse_pressed_time

double cqsp::engine::GLWindow::m_mouse_pressed_time[GLFW_MOUSE_BUTTON_LAST] = {0.0}
private

◆ m_mouse_x

double cqsp::engine::GLWindow::m_mouse_x
private

◆ m_mouse_x_on_pressed

double cqsp::engine::GLWindow::m_mouse_x_on_pressed
private

◆ m_mouse_y

double cqsp::engine::GLWindow::m_mouse_y
private

◆ m_mouse_y_on_pressed

double cqsp::engine::GLWindow::m_mouse_y_on_pressed
private

◆ m_scroll_amount

double cqsp::engine::GLWindow::m_scroll_amount
private

◆ m_window_height

int cqsp::engine::GLWindow::m_window_height
private

◆ m_window_width

int cqsp::engine::GLWindow::m_window_width
private

◆ window

GLFWwindow* cqsp::engine::GLWindow::window

◆ window_size_changed

bool cqsp::engine::GLWindow::window_size_changed
private

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