sf::RenderWindow Class Reference

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

#include <RenderWindow.hpp>

Inheritance diagram for sf::RenderWindow:

sf::Window List of all members.

Public Member Functions

 RenderWindow ()
 Default constructor.
 RenderWindow (VideoMode Mode, const std::string &Title, Style WindowStyle=Resizable, int AntialiasingLevel=0)
 Construct the window.
 RenderWindow (WindowHandle Handle, int AntialiasingLevel=0)
 Construct the window from an existing control.
virtual ~RenderWindow ()
 Destructor.
void Create (VideoMode Mode, const std::string &Title, Style WindowStyle=Resizable, int AntialiasingLevel=0)
 Create the window.
void Create (WindowHandle Handle, int AntialiasingLevel=0)
 Create the window from an existing control.
void Display ()
 Display window content on screen.
void Draw (Drawable &Object)
 Draw something on the window.
Image Capture () const
 Save the content of the window to an image.
void SetBackgroundColor (const Color &Col)
 Change the background color of the window.
bool GetEvent (Event &EventReceived)
 Get the event on top of events stack, if any.
void SetView (const View *NewView)
 Change the current active view.
const FloatRectGetViewRect () const
 Get 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 47 of file RenderWindow.hpp.


Constructor & Destructor Documentation

sf::RenderWindow::RenderWindow (  ) 

Default constructor.

Definition at line 41 of file RenderWindow.cpp.

sf::RenderWindow::RenderWindow ( VideoMode  Mode,
const std::string &  Title,
Style  WindowStyle = Resizable,
int  AntialiasingLevel = 0 
)

Construct the window.

Parameters:
Mode : Video mode to use
Title : Title of the window
WindowStyle : Window style (resizable by default)
AntialiasingLevel : Level of antialiasing (0 by default, disabled)

Definition at line 52 of file RenderWindow.cpp.

sf::RenderWindow::RenderWindow ( WindowHandle  Handle,
int  AntialiasingLevel = 0 
)

Construct the window from an existing control.

Parameters:
Handle : Platform-specific handle of the control
AntialiasingLevel : Level of antialiasing (0 by default, disabled)

Definition at line 63 of file RenderWindow.cpp.

sf::RenderWindow::~RenderWindow (  )  [virtual]

Destructor.

Definition at line 74 of file RenderWindow.cpp.


Member Function Documentation

void sf::RenderWindow::Create ( VideoMode  Mode,
const std::string &  Title,
Style  WindowStyle = Resizable,
int  AntialiasingLevel = 0 
)

Create the window.

Parameters:
Mode : Video mode to use
Title : Title of the window
WindowStyle : Window style (resizable by default)
AntialiasingLevel : Level of antialiasing (0 by default, disabled)

Reimplemented from sf::Window.

Definition at line 83 of file RenderWindow.cpp.

void sf::RenderWindow::Create ( WindowHandle  Handle,
int  AntialiasingLevel = 0 
)

Create the window from an existing control.

Parameters:
Handle : Platform-specific handle of the control
AntialiasingLevel : Level of antialiasing (0 by default, disabled)

Reimplemented from sf::Window.

Definition at line 96 of file RenderWindow.cpp.

void sf::RenderWindow::Display (  ) 

Display window content on screen.

Reimplemented from sf::Window.

Definition at line 109 of file RenderWindow.cpp.

void sf::RenderWindow::Draw ( Drawable Object  ) 

Draw something on the window.

Parameters:
Object : Object to draw

Definition at line 146 of file RenderWindow.cpp.

Image sf::RenderWindow::Capture (  )  const

Save the content of the window to an image.

Returns:
Image instance containing the contents of the screen

Definition at line 167 of file RenderWindow.cpp.

void sf::RenderWindow::SetBackgroundColor ( const Color Col  ) 

Change the background color of the window.

Parameters:
Col : New background color

Definition at line 193 of file RenderWindow.cpp.

bool sf::RenderWindow::GetEvent ( Event EventReceived  ) 

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

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

Reimplemented from sf::Window.

Definition at line 202 of file RenderWindow.cpp.

void sf::RenderWindow::SetView ( const View NewView  ) 

Change the current active view.

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

Definition at line 221 of file RenderWindow.cpp.

const FloatRect & sf::RenderWindow::GetViewRect (  )  const

Get current view rectangle.

Returns:
Current view rectangle, in global coordinates

Definition at line 257 of file RenderWindow.cpp.

void sf::RenderWindow::BeginOpenGL (  ) 

Start custom OpenGL rendering.

Definition at line 266 of file RenderWindow.cpp.

void sf::RenderWindow::EndOpenGL (  ) 

End custom OpenGL rendering.

Definition at line 288 of file RenderWindow.cpp.


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