sfWindow Class Reference

#include <Window.hpp>

Inheritance diagram for sfWindow:

sfWindowListener sfNonCopyable sfRenderWindow List of all members.

Public Member Functions

 sfWindow ()
 sfWindow (sfVideoMode Mode, const std::string &Title, bool Fullscreen)
 sfWindow (void *Handle)
virtual ~sfWindow ()
void Create (sfVideoMode Mode, const std::string &Title, bool Fullscreen)
void Create (void *Handle)
unsigned int GetWidth () const
unsigned int GetHeight () const
bool GetEvent (sfEvent &Event)
void UseVerticalSync (bool Enabled)
bool SetCurrent () const
void Display ()
const sfInputGetInput () const
float GetFrameTime () const

Detailed Description

sfWindow is a rendering window ; it can create a new window or connect to an existing one

Definition at line 50 of file Window.hpp.


Constructor & Destructor Documentation

sfWindow::sfWindow (  ) 

Default constructor

Definition at line 37 of file Window.cpp.

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

Construct a new 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 48 of file Window.cpp.

References Create().

sfWindow::sfWindow ( void *  Handle  ) 

Construct the window from an existing control

Parameters:
Handle : Platform-specific handle of the control

Definition at line 59 of file Window.cpp.

References Create().

sfWindow::~sfWindow (  )  [virtual]

Destructor

Definition at line 70 of file Window.cpp.


Member Function Documentation

void sfWindow::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 in sfRenderWindow.

Definition at line 80 of file Window.cpp.

References sfVideoMode::GetMode(), and sfVideoMode::IsValid().

Referenced by sfRenderWindow::Create(), and sfWindow().

void sfWindow::Create ( void *  Handle  ) 

Create the window from an existing control

Parameters:
Handle : Platform-specific handle of the control

Reimplemented in sfRenderWindow.

Definition at line 96 of file Window.cpp.

unsigned int sfWindow::GetWidth (  )  const

Get the width of the rendering region of the window

Returns:
Width in pixels

Definition at line 105 of file Window.cpp.

Referenced by sfRenderWindow::Capture(), and sfPostFX::Render().

unsigned int sfWindow::GetHeight (  )  const

Get the height of the rendering region of the window

Returns:
Height in pixels

Definition at line 114 of file Window.cpp.

Referenced by sfRenderWindow::Capture(), and sfPostFX::Render().

bool sfWindow::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 in sfRenderWindow.

Definition at line 123 of file Window.cpp.

Referenced by sfRenderWindow::GetEvent().

void sfWindow::UseVerticalSync ( bool  Enabled  ) 

Enable / disable vertical synchronization

Parameters:
Enabled : True to enable v-sync, false to deactivate

Definition at line 141 of file Window.cpp.

References SetCurrent().

bool sfWindow::SetCurrent (  )  const

Set the window as the current target for rendering

Returns:
True if operation was successful, false otherwise

Definition at line 151 of file Window.cpp.

Referenced by sfRenderWindow::BeginOpenGL(), sfRenderWindow::Capture(), Display(), sfRenderWindow::Display(), sfRenderWindow::Draw(), sfRenderWindow::EndOpenGL(), sfRenderWindow::SetView(), and UseVerticalSync().

void sfWindow::Display (  ) 

Display the window on screen

Reimplemented in sfRenderWindow.

Definition at line 166 of file Window.cpp.

References SetCurrent().

Referenced by sfRenderWindow::Display().

const sfInput & sfWindow::GetInput (  )  const

Get the input manager of the window

Returns:
Reference to the input

Definition at line 182 of file Window.cpp.

float sfWindow::GetFrameTime (  )  const

Get time elapsed since last frame

Returns:
Time elapsed, in seconds

Definition at line 191 of file Window.cpp.


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