NE::Window Class Reference

Window interface. More...

#include <NEngine/Window.h>

Inheritance diagram for NE::Window:
NE::SDL_Window

List of all members.

Public Member Functions

virtual bool createWindow (const USize2 &winSize, const unsigned short bpp, const bool isFullscreen, const std::string &windowName, const std::string &windowIcon="", const bool showCursor=false)=0
 open the window
virtual USize2 getWindowSize (void) const =0
 Get the size of the Window.
virtual int getBitsPerPixel (void) const =0
 Get the number of bits per pixel.
virtual void destroyWindow (void)=0
 Close the Window.
virtual bool needWindowClosure (void) const =0
 Return if the window should be closed.

Protected Member Functions

virtual void * getNativeWindow (void) const =0
 return a pointer to the native window handle

Friends

class Renderer

Detailed Description

Window interface.

The Window class gives an interface to implement new platform specific windows in the game. Only basic features are implemented (e.g.: the strict minimum for games) such as opening the window, closing it, get the size. An additional function 'needWindowClosure()' should report if the window need to be closed or not (e.g.: after an event on the red cross)


Member Function Documentation

bool NE::Window::createWindow ( const USize2 winSize,
const unsigned short  bpp,
const bool  isFullscreen,
const std::string &  windowName,
const std::string &  windowIcon = "",
const bool  showCursor = false 
) [pure virtual]

open the window

Parameters:
winSize the size of the window to open
bpp the bits per pixel needed by the window
isFullscreen true if the window must be fullscreen
windowName the name of the window to display
windowIcon the path to the icon to use
showCursor true if the cursor is visible when on the window
Returns:
true if all goes right (window opened)

Implemented in NE::SDL_Window.

int NE::Window::getBitsPerPixel ( void   )  const [pure virtual]

Get the number of bits per pixel.

Returns:
the number of bits per pixel for the window

Implemented in NE::SDL_Window.

void * NE::Window::getNativeWindow ( void   )  const [protected, pure virtual]

return a pointer to the native window handle

Returns:
a pointer to the native window handler The use of a void* is done to avoid specific code

Implemented in NE::SDL_Window.

USize2 NE::Window::getWindowSize ( void   )  const [pure virtual]

Get the size of the Window.

Returns:
the size of the Window

Implemented in NE::SDL_Window.

bool NE::Window::needWindowClosure ( void   )  const [pure virtual]

Return if the window should be closed.

Returns:
true if the Window should be closed

Implemented in NE::SDL_Window.


The documentation for this class was generated from the following file:
 All Classes Functions Variables Typedefs
Generated on Thu Oct 6 22:11:38 2011 for WE_Kit by  doxygen 1.6.3