GlPortal Class Reference  0.1.1
Source code documentation of the free and open 3D action puzzle game.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Data Fields | Private Member Functions | Private Attributes | Static Private Attributes
radix::Window Class Reference

#include <external/RadixEngine/include/radix/Window.hpp>

Inherits radix::Viewport, and radix::InputSource.

Public Member Functions

 Window ()
 
 ~Window ()
 
void create (const char *)
 
void setFullscreen ()
 
void setConfig (radix::Config &config)
 
void swapBuffers ()
 
void getSize (int *width, int *height) const
 
void close ()
 
void lockMouse ()
 
void unlockMouse ()
 
void processEvents ()
 
void keyPressed (KeyboardKey key, KeyboardModifier mod)
 
void keyReleased (KeyboardKey key, KeyboardModifier mod)
 
bool isKeyDown (KeyboardKey key)
 
std::string getCharBuffer ()
 
void addToBuffer (const std::string &character)
 
void clearBuffer ()
 
void truncateCharBuffer ()
 
void clear ()
 
void printScreenToFile (std::string fileName)
 
SDL_Surface * flipVertical (SDL_Surface *sfc)
 
- Public Member Functions inherited from radix::Viewport
virtual ~Viewport ()
 
- Public Member Functions inherited from radix::InputSource
void addDispatcher (EventDispatcher &d)
 
void removeDispatcher (EventDispatcher &d)
 

Data Fields

std::unique_ptr
< radix::GlGwenRenderer
gwenRenderer
 
std::unique_ptr
< Gwen::Skin::TexturedBase > 
gwenSkin
 
std::unique_ptr
< Gwen::Controls::Canvas > 
gwenCanvas
 
std::unique_ptr< radix::GWENInputgwenInput
 
radix::Config config
 

Private Member Functions

void processMouseButtonEvents (SDL_Event &event)
 
void processWindowEvents (SDL_Event &event)
 
void initEpoxy ()
 

Private Attributes

unsigned int width
 
unsigned int height
 
SDL_Window * window
 
SDL_GLContext context
 
std::vector< bool > keystates
 
std::string charbuffer
 

Static Private Attributes

static const char * DEFAULT_TITLE = "Radix Engine"
 
static const unsigned int DEFAULT_WIDTH = 800
 
static const unsigned int DEFAULT_HEIGHT = 600
 

Additional Inherited Members

- Public Types inherited from radix::InputSource
enum  MouseButton : uint8_t {
  MouseButton::Left = 0, MouseButton::Right = 1, MouseButton::Middle = 2, MouseButton::Aux1,
  MouseButton::Aux2, MouseButton::Aux3, MouseButton::Aux4, MouseButton::Aux5,
  MouseButton::Aux6, MouseButton::Aux7, MouseButton::Aux8, MouseButton::Unknown = 0xFF
}
 
using KeyboardKey = int
 
using KeyboardModifier = int
 
- Protected Attributes inherited from radix::InputSource
std::vector
< std::reference_wrapper
< EventDispatcher > > 
dispatchers
 

Constructor & Destructor Documentation

radix::Window::Window ( )
radix::Window::~Window ( )
default

Member Function Documentation

void radix::Window::addToBuffer ( const std::string &  character)
virtual

Implements radix::InputSource.

void radix::Window::clear ( )
virtual

Implements radix::InputSource.

void radix::Window::clearBuffer ( )
virtual

Implements radix::InputSource.

void radix::Window::close ( )
void radix::Window::create ( const char *  title)
SDL_Surface * radix::Window::flipVertical ( SDL_Surface *  sfc)
std::string radix::Window::getCharBuffer ( )
virtual

Implements radix::InputSource.

void radix::Window::getSize ( int *  width,
int *  height 
) const
virtual

Implements radix::Viewport.

void radix::Window::initEpoxy ( )
private
bool radix::Window::isKeyDown ( KeyboardKey  key)
virtual

Implements radix::InputSource.

void radix::Window::keyPressed ( KeyboardKey  key,
KeyboardModifier  mod 
)
virtual

Implements radix::InputSource.

void radix::Window::keyReleased ( KeyboardKey  key,
KeyboardModifier  mod 
)
virtual

Implements radix::InputSource.

void radix::Window::lockMouse ( )
void radix::Window::printScreenToFile ( std::string  fileName)
void radix::Window::processEvents ( )
virtual

Implements radix::InputSource.

void radix::Window::processMouseButtonEvents ( SDL_Event &  event)
private
void radix::Window::processWindowEvents ( SDL_Event &  event)
private
void radix::Window::setConfig ( radix::Config config)
void radix::Window::setFullscreen ( )
void radix::Window::swapBuffers ( )
void radix::Window::truncateCharBuffer ( )
virtual

Implements radix::InputSource.

void radix::Window::unlockMouse ( )

Field Documentation

std::string radix::Window::charbuffer
private
radix::Config radix::Window::config
SDL_GLContext radix::Window::context
private
const unsigned int radix::Window::DEFAULT_HEIGHT = 600
staticprivate
const char * radix::Window::DEFAULT_TITLE = "Radix Engine"
staticprivate
const unsigned int radix::Window::DEFAULT_WIDTH = 800
staticprivate
std::unique_ptr<Gwen::Controls::Canvas> radix::Window::gwenCanvas
std::unique_ptr<radix::GWENInput> radix::Window::gwenInput
std::unique_ptr<radix::GlGwenRenderer> radix::Window::gwenRenderer
std::unique_ptr<Gwen::Skin::TexturedBase> radix::Window::gwenSkin
unsigned int radix::Window::height
private
std::vector<bool> radix::Window::keystates
private
unsigned int radix::Window::width
private
SDL_Window* radix::Window::window
private

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