sfRenderWindow Class Reference

#include <RenderWindow.hpp>

Inheritance diagram for sfRenderWindow:

sfWindow List of all members.

Public Member Functions

 sfRenderWindow ()
 sfRenderWindow (sfVideoMode Mode, const std::string &Title, bool Fullscreen)
 sfRenderWindow (void *Handle)
virtual ~sfRenderWindow ()
void Create (sfVideoMode Mode, const std::string &Title, bool Fullscreen)
void Create (void *Handle)
void Display ()
void Draw (sfDrawable &Object)
void Capture (const std::string &Filename) const
void SetBackgroundColor (const sfColor &Color)
bool GetEvent (sfEvent &Event)
void SetView (const sfView *View)
const sfFloatRectGetViewRect () const
void BeginOpenGL ()
void EndOpenGL ()

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.

References Create().

sfRenderWindow::sfRenderWindow ( void *  Handle  ) 

Construct the window from an existing control

Parameters:
Handle : Platform-specific handle of the control

Definition at line 61 of file RenderWindow.cpp.

References Create().

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 82 of file RenderWindow.cpp.

References sfWindow::Create().

Referenced by sfRenderWindow().

void sfRenderWindow::Create ( void *  Handle  ) 

Create the window from an existing control

Parameters:
Handle : Platform-specific handle of the control

Reimplemented from sfWindow.

Definition at line 95 of file RenderWindow.cpp.

References sfWindow::Create().

void sfRenderWindow::Display (  ) 

Display window content on screen

Reimplemented from sfWindow.

Definition at line 108 of file RenderWindow.cpp.

References sfColor::Alpha, sfColor::Blue, sfWindow::Display(), sfColor::Green, sfColor::Red, and sfWindow::SetCurrent().

void sfRenderWindow::Draw ( sfDrawable Object  ) 

Draw something on the window

Parameters:
Object : Object to draw

Definition at line 136 of file RenderWindow.cpp.

References sfDrawable::Render(), and sfWindow::SetCurrent().

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 (overwritten if already exist)

Definition at line 161 of file RenderWindow.cpp.

References sfWindow::GetHeight(), sfWindow::GetWidth(), sfImage::SaveToFile(), and sfWindow::SetCurrent().

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.

References sfWindow::GetEvent(), and sfEvent::Resize.

void sfRenderWindow::SetView ( const sfView View  ) 

Change the current active view

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

Definition at line 212 of file RenderWindow.cpp.

References sfRect< T >::Bottom, sfView::Height, sfRect< T >::Left, sfView::Left, sfRect< T >::Right, sfWindow::SetCurrent(), sfRect< T >::Top, sfView::Top, sfView::Width, and sfView::Zoom.

const sfFloatRect & sfRenderWindow::GetViewRect (  )  const

Get current view rectangle

Returns:
Current view rectangle

Definition at line 248 of file RenderWindow.cpp.

void sfRenderWindow::BeginOpenGL (  ) 

Start custom OpenGL rendering

Definition at line 257 of file RenderWindow.cpp.

References sfWindow::SetCurrent().

void sfRenderWindow::EndOpenGL (  ) 

End custom OpenGL rendering

Definition at line 277 of file RenderWindow.cpp.

References sfWindow::SetCurrent().


The documentation for this class was generated from the following files:
Generated for SFML by  doxygen 1.5.2