GlistEngine
Loading...
Searching...
No Matches
gGLFWWindow Class Reference

#include <gGLFWWindow.h>

Inheritance diagram for gGLFWWindow:
Collaboration diagram for gGLFWWindow:

Public Member Functions

 gGLFWWindow ()
 
 ~gGLFWWindow () override
 
void initialize (int width, int height, int windowMode, bool isResizable) override
 
bool getShouldClose () override
 
void update () override
 
void close () override
 
void setVsync (bool vsync) override
 
void setCursor (int cursorNo) override
 
void setCursorMode (gCursorMode cursorMode) override
 
void setCursorPos (int x, int y) override
 
void setClipboardString (std::string text) override
 
std::string getClipboardString () override
 
void setWindowSize (int width, int height) override
 
void setWindowResizable (bool isResizable) override
 
void setWindowSizeLimits (int minWidth, int minHeight, int maxWidth, int maxHeight) override
 
void setIcon (std::string pngFullpath) override
 
void setIcon (unsigned char *imageData, int w, int h) override
 
void setTitle (const std::string &windowTitle) override
 
bool isJoystickPresent (int joystickId) override
 
bool isGamepadButtonPressed (int joystickId, int buttonId) override
 
const float * getJoystickAxes (int joystickId, int *axisCountPtr) override
 
float getScaleX () const
 
float getScaleY () const
 
void setScale (float x, float y)
 
- Public Member Functions inherited from gBaseWindow
 gBaseWindow ()
 
virtual ~gBaseWindow ()
 
bool isRendering ()
 
bool isVsyncEnabled ()
 
void enableVsync ()
 
void enableVsync (bool vsync)
 
void disableVsync ()
 
gCursorMode getCursorMode ()
 
void setSize (int width, int height)
 
int getWidth ()
 
int getHeight ()
 
void setTitle (std::string &&windowTitle)
 
const std::string & getTitle ()
 
- Public Member Functions inherited from gObject
 gObject ()
 
void logi (std::string message)
 
void logd (std::string message)
 
void logw (std::string message)
 
void loge (std::string message)
 
void logi (std::string tag, std::string message)
 
void logd (std::string tag, std::string message)
 
void logw (std::string tag, std::string message)
 
void loge (std::string tag, std::string message)
 

Static Public Attributes

static constexpr gCursorMode CURSORMODE_NORMAL = gCursorMode::CURSORMODE_NORMAL
 
static constexpr gCursorMode CURSORMODE_HIDDEN = gCursorMode::CURSORMODE_HIDDEN
 
static constexpr gCursorMode CURSORMODE_DISABLED = gCursorMode::CURSORMODE_DISABLED
 
static constexpr gCursorMode CURSORMODE_RELATIVE = gCursorMode::CURSORMODE_RELATIVE
 
- Static Public Attributes inherited from gBaseWindow
static const int WINDOWMODE_NONE = -1
 
static const int WINDOWMODE_GAME = 0
 
static const int WINDOWMODE_FULLSCREEN = 1
 
static const int WINDOWMODE_APP = 2
 
static const int WINDOWMODE_FULLSCREENGUIAPP = 3
 
static const int WINDOWMODE_GUIAPP = 4
 
static const int CURSOR_ARROW = 0
 
static const int CURSOR_IBEAM = 1
 
static const int CURSOR_CROSSHAIR = 2
 
static const int CURSOR_HAND = 3
 
static const int CURSOR_HRESIZE = 4
 
static const int CURSOR_VRESIZE = 5
 
- Static Public Attributes inherited from gObject
static const int LOGLEVEL_SILENT
 
static const int LOGLEVEL_DEBUG
 
static const int LOGLEVEL_INFO
 
static const int LOGLEVEL_WARNING
 
static const int LOGLEVEL_ERROR
 

Additional Inherited Members

- Static Public Member Functions inherited from gObject
static std::string gGetAppDir ()
 
static std::string gGetAssetsDir ()
 
static void gSetAssetsDir (std::string assetsDir)
 
static std::string gGetFilesDir ()
 
static std::string gGetImagesDir ()
 
static std::string gGetFontsDir ()
 
static std::string gGetModelsDir ()
 
static std::string gGetTexturesDir ()
 
static std::string gGetShadersDir ()
 
static std::string gGetSoundsDir ()
 
static std::string gGetDatabasesDir ()
 
static std::string gGetVideosDir ()
 
static void setCurrentResolution (int scalingNo, int currentResolutionNo)
 
- Static Protected Attributes inherited from gObject
static int renderpassnum
 
static int renderpassno
 
static int releasescaling
 
static int releaseresolution
 

Detailed Description

gGLFWWindow, contain functions for game's window.

Uses parent as gBaseWindow.

Constructor & Destructor Documentation

◆ gGLFWWindow()

gGLFWWindow::gGLFWWindow ( )

◆ ~gGLFWWindow()

gGLFWWindow::~gGLFWWindow ( )
override

Member Function Documentation

◆ close()

void gGLFWWindow::close ( )
overridevirtual

Destroys all remaining windows and cursors, restores any modified gamma ramps and frees any other allocated resources.

Reimplemented from gBaseWindow.

◆ getClipboardString()

std::string gGLFWWindow::getClipboardString ( )
overridevirtual

Reimplemented from gBaseWindow.

◆ getJoystickAxes()

const float * gGLFWWindow::getJoystickAxes ( int  joystickId,
int *  axisCountPtr 
)
override

◆ getScaleX()

float gGLFWWindow::getScaleX ( ) const
inline

◆ getScaleY()

float gGLFWWindow::getScaleY ( ) const
inline

◆ getShouldClose()

bool gGLFWWindow::getShouldClose ( )
overridevirtual

Returns if the window should be closed or not.

Returns
bool varaible and says that windows should be closed or not.

Reimplemented from gBaseWindow.

◆ initialize()

void gGLFWWindow::initialize ( int  width,
int  height,
int  windowMode,
bool  isResizable 
)
overridevirtual

Assigns the entered values before the game window opens.

Parameters
widthSets what the width of the window should be.
heightSets what the height of the window should be.
windowModeDetermines which mode the window is in. Example: Window Mode,Game Mode, Fullscreen Mode.

Reimplemented from gBaseWindow.

◆ isGamepadButtonPressed()

bool gGLFWWindow::isGamepadButtonPressed ( int  joystickId,
int  buttonId 
)
override

◆ isJoystickPresent()

bool gGLFWWindow::isJoystickPresent ( int  joystickId)
override

◆ setClipboardString()

void gGLFWWindow::setClipboardString ( std::string  text)
overridevirtual

Reimplemented from gBaseWindow.

◆ setCursor()

void gGLFWWindow::setCursor ( int  cursorNo)
overridevirtual

Reimplemented from gBaseWindow.

◆ setCursorMode()

void gGLFWWindow::setCursorMode ( gCursorMode  cursorMode)
overridevirtual

Reimplemented from gBaseWindow.

◆ setCursorPos()

void gGLFWWindow::setCursorPos ( int  x,
int  y 
)
overridevirtual

Reimplemented from gBaseWindow.

◆ setIcon() [1/2]

void gGLFWWindow::setIcon ( std::string  pngFullpath)
overridevirtual

Reimplemented from gBaseWindow.

◆ setIcon() [2/2]

void gGLFWWindow::setIcon ( unsigned char *  imageData,
int  w,
int  h 
)
overridevirtual

Reimplemented from gBaseWindow.

◆ setScale()

void gGLFWWindow::setScale ( float  x,
float  y 
)

◆ setTitle()

void gGLFWWindow::setTitle ( const std::string &  windowTitle)
overridevirtual

The title at the top of the window is changed with the entered value.

Parameters
windowTitleThe text to be written in the title of the window.

Reimplemented from gBaseWindow.

◆ setVsync()

void gGLFWWindow::setVsync ( bool  vsync)
overridevirtual

Reimplemented from gBaseWindow.

◆ setWindowResizable()

void gGLFWWindow::setWindowResizable ( bool  isResizable)
overridevirtual

Reimplemented from gBaseWindow.

◆ setWindowSize()

void gGLFWWindow::setWindowSize ( int  width,
int  height 
)
overridevirtual

Reimplemented from gBaseWindow.

◆ setWindowSizeLimits()

void gGLFWWindow::setWindowSizeLimits ( int  minWidth,
int  minHeight,
int  maxWidth,
int  maxHeight 
)
overridevirtual

Reimplemented from gBaseWindow.

◆ update()

void gGLFWWindow::update ( )
overridevirtual

Performs the said operations at the specified frame rate.

Reimplemented from gBaseWindow.

Member Data Documentation

◆ CURSORMODE_DISABLED

constexpr gCursorMode gGLFWWindow::CURSORMODE_DISABLED = gCursorMode::CURSORMODE_DISABLED
staticconstexpr

◆ CURSORMODE_HIDDEN

constexpr gCursorMode gGLFWWindow::CURSORMODE_HIDDEN = gCursorMode::CURSORMODE_HIDDEN
staticconstexpr

◆ CURSORMODE_NORMAL

constexpr gCursorMode gGLFWWindow::CURSORMODE_NORMAL = gCursorMode::CURSORMODE_NORMAL
staticconstexpr

◆ CURSORMODE_RELATIVE

constexpr gCursorMode gGLFWWindow::CURSORMODE_RELATIVE = gCursorMode::CURSORMODE_RELATIVE
staticconstexpr

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