sfWindow Class Reference

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

#include <Window.hpp>

Inheritance diagram for sfWindow:

sfWindowListener sfNonCopyable sfRenderWindow List of all members.

Public Member Functions

 sfWindow ()
 Default constructor.
 sfWindow (sfVideoMode Mode, const std::string &Title, bool Fullscreen)
 Construct a new window.
 sfWindow (sfWindowHandle Handle)
 Construct the window from an existing control.
virtual ~sfWindow ()
 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.
unsigned int GetWidth () const
 Get the width of the rendering region of the window.
unsigned int GetHeight () const
 Get the height of the rendering region of the window.
unsigned int GetDepthBits () const
 Get the depth buffer bits.
unsigned int GetStencilBits () const
 Get the stencil buffer bits.
bool GetEvent (sfEvent &Event)
 Get the event on top of events stack, if any, and pop it.
void UseVerticalSync (bool Enabled)
 Enable / disable vertical synchronization.
void ShowMouseCursor (bool Show)
 Show or hide the mouse cursor.
bool SetCurrent () const
 Set the window as the current target for rendering.
void Display ()
 Display the window on screen.
const sfInputGetInput () const
 Get the input manager of the window.
float GetFrameTime () const
 Get time elapsed since last frame.

Detailed Description

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

Definition at line 52 of file Window/Window.hpp.


Constructor & Destructor Documentation

sfWindow::sfWindow (  ) 

Default constructor.

Definition at line 48 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 59 of file Window.cpp.

sfWindow::sfWindow ( sfWindowHandle  Handle  ) 

Construct the window from an existing control.

Parameters:
Handle : Platform-specific handle of the control

Definition at line 70 of file Window.cpp.

sfWindow::~sfWindow (  )  [virtual]

Destructor.

Definition at line 81 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 91 of file Window.cpp.

void sfWindow::Create ( sfWindowHandle  Handle  ) 

Create the window from an existing control.

Parameters:
Handle : Platform-specific handle of the control

Reimplemented in sfRenderWindow.

Definition at line 107 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 116 of file Window.cpp.

unsigned int sfWindow::GetHeight (  )  const

Get the height of the rendering region of the window.

Returns:
Height in pixels

Definition at line 125 of file Window.cpp.

unsigned int sfWindow::GetDepthBits (  )  const

Get the depth buffer bits.

Returns:
Depth bits (can be 0 if there is no depth buffer)

Definition at line 134 of file Window.cpp.

unsigned int sfWindow::GetStencilBits (  )  const

Get the stencil buffer bits.

Returns:
Stencil bits (can be 0 if there is no stencil buffer)

Definition at line 143 of file Window.cpp.

bool sfWindow::GetEvent ( sfEvent Event  ) 

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

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 152 of file Window.cpp.

void sfWindow::UseVerticalSync ( bool  Enabled  ) 

Enable / disable vertical synchronization.

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

Definition at line 170 of file Window.cpp.

void sfWindow::ShowMouseCursor ( bool  Show  ) 

Show or hide the mouse cursor.

Parameters:
Show : True to show, false to hide

Definition at line 180 of file Window.cpp.

bool sfWindow::SetCurrent (  )  const

Set the window as the current target for rendering.

Returns:
True if operation was successful, false otherwise

Definition at line 190 of file Window.cpp.

void sfWindow::Display (  ) 

Display the window on screen.

Reimplemented in sfRenderWindow.

Definition at line 205 of file Window.cpp.

const sfInput & sfWindow::GetInput (  )  const

Get the input manager of the window.

Returns:
Reference to the input

Definition at line 225 of file Window.cpp.

float sfWindow::GetFrameTime (  )  const

Get time elapsed since last frame.

Returns:
Time elapsed, in seconds

Definition at line 234 of file Window.cpp.


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