sfRenderWindow Class Reference

Simple wrapper for sfWindow that allows easy 2D rendering. More...

#include <RenderWindow.hpp>

Inheritance diagram for sfRenderWindow:

sfWindow List of all members.

Public Member Functions

 sfRenderWindow ()
 Default constructor.
 sfRenderWindow (sfVideoMode Mode, const std::string &Title, bool Fullscreen)
 Construct the window.
 sfRenderWindow (sfWindowHandle Handle)
 Construct the window from an existing control.
virtual ~sfRenderWindow ()
 Destructor.
void Create (sfVideoMode Mode, const std::string &Title, bool Fullscreen)
 Create the window.
void Create (sfWindowHandle Handle)
 Create the window from an existing control.
void Display ()
 Display window content on screen.
void Draw (sfDrawable &Object)
 Draw something on the window.
void Capture (const std::string &Filename) const
 Save the content of the window to a file.
void SetBackgroundColor (const sfColor &Color)
 Change the background color of the window.
bool GetEvent (sfEvent &Event)
 Get the event on top of events stack, if any.
void SetView (const sfView *View)
 Change the current active view.
const sfFloatRectGetViewRect () const
 Get the current view rectangle.
void BeginOpenGL ()
 Start custom OpenGL rendering.
void EndOpenGL ()
 End custom OpenGL rendering.

Detailed Description

Simple wrapper for sfWindow that allows easy 2D rendering.

Definition at line 44 of file RenderWindow.hpp.


Constructor & Destructor Documentation

sfRenderWindow::sfRenderWindow (  ) 

Default constructor.

Definition at line 39 of file RenderWindow.cpp.

sfRenderWindow::sfRenderWindow ( sfVideoMode  Mode,
const std::string &  Title,
bool  Fullscreen 
)

Construct the window.

Parameters:
Mode : Video mode to use
Title : Title of the window
Fullscreen : True to set fullscreen, false to stay in windowed mode

Definition at line 50 of file RenderWindow.cpp.

sfRenderWindow::sfRenderWindow ( sfWindowHandle  Handle  ) 

Construct the window from an existing control.

Parameters:
Handle : Platform-specific handle of the control

Definition at line 61 of file RenderWindow.cpp.

sfRenderWindow::~sfRenderWindow (  )  [virtual]

Destructor.

Definition at line 72 of file RenderWindow.cpp.


Member Function Documentation

void sfRenderWindow::Create ( sfVideoMode  Mode,
const std::string &  Title,
bool  Fullscreen 
)

Create the window.

Parameters:
Mode : Video mode to use
Title : Title of the window
Fullscreen : True to set fullscreen, false to stay in windowed mode

Reimplemented from sfWindow.

Definition at line 81 of file RenderWindow.cpp.

void sfRenderWindow::Create ( sfWindowHandle  Handle  ) 

Create the window from an existing control.

Parameters:
Handle : Platform-specific handle of the control

Reimplemented from sfWindow.

Definition at line 94 of file RenderWindow.cpp.

void sfRenderWindow::Display (  ) 

Display window content on screen.

Reimplemented from sfWindow.

Definition at line 107 of file RenderWindow.cpp.

void sfRenderWindow::Draw ( sfDrawable Object  ) 

Draw something on the window.

Parameters:
Object : Object to draw

Definition at line 140 of file RenderWindow.cpp.

void sfRenderWindow::Capture ( const std::string &  Filename  )  const

Save the content of the window to a file.

Parameters:
Filename : Path of the file to save (file is overwritten if it already exists)

Definition at line 161 of file RenderWindow.cpp.

void sfRenderWindow::SetBackgroundColor ( const sfColor Color  ) 

Change the background color of the window.

Parameters:
Color : New background color

Definition at line 184 of file RenderWindow.cpp.

bool sfRenderWindow::GetEvent ( sfEvent Event  ) 

Get the event on top of events stack, if any.

Parameters:
Event : Event to fill, if any
Returns:
True if an event was returned, false if events stack was empty

Reimplemented from sfWindow.

Definition at line 193 of file RenderWindow.cpp.

void sfRenderWindow::SetView ( const sfView View  ) 

Change the current active view.

Parameters:
View : Pointer to the new view (pass NULL to set the default view)

Definition at line 212 of file RenderWindow.cpp.

const sfFloatRect & sfRenderWindow::GetViewRect (  )  const

Get the current view rectangle.

Returns:
Current view rectangle, in global coordinates

Definition at line 248 of file RenderWindow.cpp.

void sfRenderWindow::BeginOpenGL (  ) 

Start custom OpenGL rendering.

Definition at line 257 of file RenderWindow.cpp.

void sfRenderWindow::EndOpenGL (  ) 

End custom OpenGL rendering.

Definition at line 277 of file RenderWindow.cpp.


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