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

#include <gBaseWindow.h>

Inheritance diagram for gBaseWindow:
Collaboration diagram for gBaseWindow:

Public Member Functions

 gBaseWindow ()
 
virtual ~gBaseWindow ()
 
virtual void initialize (int width, int height, int windowMode, bool isResizable)
 
virtual bool getShouldClose ()
 
bool isRendering ()
 
virtual void update ()
 
virtual void close ()
 
bool isVsyncEnabled ()
 
virtual void setVsync (bool vsync)
 
void enableVsync ()
 
void enableVsync (bool vsync)
 
void disableVsync ()
 
virtual void setCursor (int cursorNo)
 
virtual void setCursorMode (gCursorMode cursorMode)
 
gCursorMode getCursorMode ()
 
virtual void setCursorPos (int x, int y)
 
virtual void setIcon (std::string pngFullpath)
 
virtual void setIcon (unsigned char *imageData, int w, int h)
 
virtual void setClipboardString (std::string text)
 
virtual std::string getClipboardString ()
 
void setSize (int width, int height)
 
virtual void setWindowSize (int width, int height)
 
int getWidth ()
 
int getHeight ()
 
virtual void setTitle (const std::string &windowTitle)
 
void setTitle (std::string &&windowTitle)
 
const std::string & getTitle ()
 
virtual void setWindowResizable (bool isResizable)
 
virtual void setWindowSizeLimits (int minWidth, int minHeight, int maxWidth, int maxHeight)
 
- 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 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

gBaseWindow, looks at events for the game window, sets and gets the properties of the game window. It is a base class that's why If who want create window class, have to use this class as parent.

Use parent as gObject.

Constructor & Destructor Documentation

◆ gBaseWindow()

gBaseWindow::gBaseWindow ( )

◆ ~gBaseWindow()

virtual gBaseWindow::~gBaseWindow ( )
virtual

Member Function Documentation

◆ close()

virtual void gBaseWindow::close ( )
virtual

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

Reimplemented in gGLFWWindow.

◆ disableVsync()

void gBaseWindow::disableVsync ( )

◆ enableVsync() [1/2]

void gBaseWindow::enableVsync ( )

◆ enableVsync() [2/2]

void gBaseWindow::enableVsync ( bool  vsync)

◆ getClipboardString()

virtual std::string gBaseWindow::getClipboardString ( )
virtual

Reimplemented in gGLFWWindow.

◆ getCursorMode()

gCursorMode gBaseWindow::getCursorMode ( )

◆ getHeight()

int gBaseWindow::getHeight ( )

Get game window height size.

Returns
Game window's height.

◆ getShouldClose()

virtual bool gBaseWindow::getShouldClose ( )
virtual

Reimplemented in gGLFWWindow.

◆ getTitle()

const std::string & gBaseWindow::getTitle ( )

Gets the title at the top of the window.

Returns
Returns the title at the top of the window.

◆ getWidth()

int gBaseWindow::getWidth ( )

Get game window width size.

Game window's width.

◆ initialize()

virtual void gBaseWindow::initialize ( int  width,
int  height,
int  windowMode,
bool  isResizable 
)
virtual

Sets game window's width, height sizes and window mode.

Parameters
widthSize of game screen width.
heightSize of game screen height.
windowModeDetermines which mode the window is in. Example: Window Mode,Game Mode, Fullscreen Mode.

Reimplemented in gGLFWWindow.

◆ isRendering()

bool gBaseWindow::isRendering ( )

◆ isVsyncEnabled()

bool gBaseWindow::isVsyncEnabled ( )

◆ setClipboardString()

virtual void gBaseWindow::setClipboardString ( std::string  text)
virtual

Reimplemented in gGLFWWindow.

◆ setCursor()

virtual void gBaseWindow::setCursor ( int  cursorNo)
virtual

Reimplemented in gGLFWWindow.

◆ setCursorMode()

virtual void gBaseWindow::setCursorMode ( gCursorMode  cursorMode)
virtual

Reimplemented in gGLFWWindow.

◆ setCursorPos()

virtual void gBaseWindow::setCursorPos ( int  x,
int  y 
)
virtual

Reimplemented in gGLFWWindow.

◆ setIcon() [1/2]

virtual void gBaseWindow::setIcon ( std::string  pngFullpath)
virtual

Reimplemented in gGLFWWindow.

◆ setIcon() [2/2]

virtual void gBaseWindow::setIcon ( unsigned char *  imageData,
int  w,
int  h 
)
virtual

Reimplemented in gGLFWWindow.

◆ setSize()

void gBaseWindow::setSize ( int  width,
int  height 
)

Sets game window size.

Parameters
widthSize of game screen width.
heightSize of game screen height.

◆ setTitle() [1/2]

virtual void gBaseWindow::setTitle ( const std::string &  windowTitle)
virtual

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 in gGLFWWindow.

◆ setTitle() [2/2]

void gBaseWindow::setTitle ( std::string &&  windowTitle)

◆ setVsync()

virtual void gBaseWindow::setVsync ( bool  vsync)
virtual

Reimplemented in gGLFWWindow.

◆ setWindowResizable()

virtual void gBaseWindow::setWindowResizable ( bool  isResizable)
virtual

Reimplemented in gGLFWWindow.

◆ setWindowSize()

virtual void gBaseWindow::setWindowSize ( int  width,
int  height 
)
virtual

Reimplemented in gGLFWWindow.

◆ setWindowSizeLimits()

virtual void gBaseWindow::setWindowSizeLimits ( int  minWidth,
int  minHeight,
int  maxWidth,
int  maxHeight 
)
virtual

Reimplemented in gGLFWWindow.

◆ update()

virtual void gBaseWindow::update ( )
virtual

Performs the said operations at the specified frame rate.

Reimplemented in gGLFWWindow.

Member Data Documentation

◆ CURSOR_ARROW

const int gBaseWindow::CURSOR_ARROW = 0
static

◆ CURSOR_CROSSHAIR

const int gBaseWindow::CURSOR_CROSSHAIR = 2
static

◆ CURSOR_HAND

const int gBaseWindow::CURSOR_HAND = 3
static

◆ CURSOR_HRESIZE

const int gBaseWindow::CURSOR_HRESIZE = 4
static

◆ CURSOR_IBEAM

const int gBaseWindow::CURSOR_IBEAM = 1
static

◆ CURSOR_VRESIZE

const int gBaseWindow::CURSOR_VRESIZE = 5
static

◆ WINDOWMODE_APP

const int gBaseWindow::WINDOWMODE_APP = 2
static

◆ WINDOWMODE_FULLSCREEN

const int gBaseWindow::WINDOWMODE_FULLSCREEN = 1
static

◆ WINDOWMODE_FULLSCREENGUIAPP

const int gBaseWindow::WINDOWMODE_FULLSCREENGUIAPP = 3
static

◆ WINDOWMODE_GAME

const int gBaseWindow::WINDOWMODE_GAME = 0
static

◆ WINDOWMODE_GUIAPP

const int gBaseWindow::WINDOWMODE_GUIAPP = 4
static

◆ WINDOWMODE_NONE

const int gBaseWindow::WINDOWMODE_NONE = -1
static

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