#include <Window.hpp>
Inheritance diagram for sf::Window:
Public Member Functions | |
Window () | |
Default constructor. | |
Window (VideoMode Mode, const std::string &Title, unsigned long WindowStyle=Style::Resize|Style::Close, int AntialiasingLevel=0) | |
Construct a new window. | |
Window (WindowHandle Handle, int AntialiasingLevel=0) | |
Construct the window from an existing control. | |
virtual | ~Window () |
Destructor. | |
void | Create (VideoMode Mode, const std::string &Title, unsigned long WindowStyle=Style::Resize|Style::Close, int AntialiasingLevel=0) |
Create (or recreate) the window. | |
void | Create (WindowHandle Handle, int AntialiasingLevel=0) |
Create (or recreate) 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 (Event &EventReceived) |
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. | |
void | SetCursorPosition (unsigned int Left, unsigned int Top) |
Change the position of the mouse cursor. | |
void | SetPosition (int Left, int Top) |
Change the position of the window on screen. | |
void | Show (bool State) |
Show or hide the window. | |
bool | SetCurrent () const |
Set the window as the current target for rendering. | |
void | Display () |
Display the window on screen. | |
const Input & | GetInput () const |
Get the input manager of the window. | |
void | SetFramerateLimit (unsigned int Limit) |
Limit the framerate to a maximum fixed frequency. | |
float | GetFrameTime () const |
Get time elapsed since last frame. | |
void | SetJoystickThreshold (float Threshold) |
Change the joystick threshold, ie. |
Definition at line 55 of file Window/Window.hpp.
sf::Window::Window | ( | ) |
Default constructor.
sf::Window::Window | ( | VideoMode | Mode, | |
const std::string & | Title, | |||
unsigned long | WindowStyle = Style::Resize|Style::Close , |
|||
int | AntialiasingLevel = 0 | |||
) |
Construct a new window.
Mode | : Video mode to use | |
Title | : Title of the window | |
WindowStyle | : Window style (Resize | Close by default) | |
AntialiasingLevel | : Level of antialiasing (0 by default, disabled) |
sf::Window::Window | ( | WindowHandle | Handle, | |
int | AntialiasingLevel = 0 | |||
) |
Construct the window from an existing control.
Handle | : Platform-specific handle of the control | |
AntialiasingLevel | : Level of antialiasing (0 by default, disabled) |
virtual sf::Window::~Window | ( | ) | [virtual] |
Destructor.
void sf::Window::Create | ( | VideoMode | Mode, | |
const std::string & | Title, | |||
unsigned long | WindowStyle = Style::Resize|Style::Close , |
|||
int | AntialiasingLevel = 0 | |||
) |
Create (or recreate) the window.
Mode | : Video mode to use | |
Title | : Title of the window | |
WindowStyle | : Window style (Resize | Close by default) | |
AntialiasingLevel | : Level of antialiasing (0 by default, disabled) |
void sf::Window::Create | ( | WindowHandle | Handle, | |
int | AntialiasingLevel = 0 | |||
) |
Create (or recreate) the window from an existing control.
Handle | : Platform-specific handle of the control | |
AntialiasingLevel | : Level of antialiasing (0 by default, disabled) |
unsigned int sf::Window::GetWidth | ( | ) | const |
Get the width of the rendering region of the window.
unsigned int sf::Window::GetHeight | ( | ) | const |
Get the height of the rendering region of the window.
unsigned int sf::Window::GetDepthBits | ( | ) | const |
Get the depth buffer bits.
unsigned int sf::Window::GetStencilBits | ( | ) | const |
Get the stencil buffer bits.
bool sf::Window::GetEvent | ( | Event & | EventReceived | ) |
Get the event on top of events stack, if any, and pop it.
EventReceived | : Event to fill, if any |
void sf::Window::UseVerticalSync | ( | bool | Enabled | ) |
Enable / disable vertical synchronization.
Enabled | : True to enable v-sync, false to deactivate |
void sf::Window::ShowMouseCursor | ( | bool | Show | ) |
Show or hide the mouse cursor.
Show | : True to show, false to hide |
void sf::Window::SetCursorPosition | ( | unsigned int | Left, | |
unsigned int | Top | |||
) |
Change the position of the mouse cursor.
Left | : Left coordinate of the cursor, relative to the window | |
Top | : Top coordinate of the cursor, relative to the window |
void sf::Window::SetPosition | ( | int | Left, | |
int | Top | |||
) |
Change the position of the window on screen.
Only works for top-level windows
Left | : Left position | |
Top | : Top position |
void sf::Window::Show | ( | bool | State | ) |
Show or hide the window.
State | : True to show, false to hide |
bool sf::Window::SetCurrent | ( | ) | const |
Set the window as the current target for rendering.
void sf::Window::Display | ( | ) |
Display the window on screen.
const Input& sf::Window::GetInput | ( | ) | const |
Get the input manager of the window.
void sf::Window::SetFramerateLimit | ( | unsigned int | Limit | ) |
Limit the framerate to a maximum fixed frequency.
Limit | : Framerate limit, in frames per seconds (use 0 to disable limit) |
float sf::Window::GetFrameTime | ( | ) | const |
Get time elapsed since last frame.
void sf::Window::SetJoystickThreshold | ( | float | Threshold | ) |
Change the joystick threshold, ie.
the value below which no move event will be generated
Threshold | : New threshold, in range [0, 100] |